Skip to content

Commit

Permalink
asm-2: code comments fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Kuleshov <[email protected]>
  • Loading branch information
0xAX committed Dec 25, 2024
1 parent d7bd27c commit 8802296
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion content/asm_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ _start:
syscall
;; Specify the number of the system call (60 is `sys_exit`).
mov rax, 60
;; Set the first argument of `sys_exit` to `0`. The `0` status code is success.
;; Set the first argument of `sys_exit` to 0. The 0 status code is success.
mov rdi, 0
;; Call the `sys_exit` system call.
syscall
Expand Down
6 changes: 3 additions & 3 deletions content/asm_2.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,9 @@ section .text
_start:
;; Set the value of num1 to rax
mov rax, [num1]
;; Set the value of the num2 to the rbx
;; Set the value of num2 to rbx
mov rbx, [num2]
;; Get sum of the rax and rbx. The result is stored in the rax.
;; Get the sum of rax and rbx. The result is stored in rax.
add rax, rbx
.compare:
;; Compare the rax value with 150
Expand Down Expand Up @@ -473,7 +473,7 @@ _start:
.exit:
;; Specify the number of the system call (60 is `sys_exit`).
mov rax, 60
;; Set the first argument of `sys_exit` to `0`. The `0` status code is success.
;; Set the first argument of `sys_exit` to 0. The 0 status code is success.
mov rdi, 0
;; Call the `sys_exit` system call.
syscall
Expand Down
2 changes: 1 addition & 1 deletion hello/hello.asm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ _start:
syscall
;; Specify the number of the system call (60 is `sys_exit`).
mov rax, 60
;; Set the first argument of `sys_exit` to `0`. The `0` status code is success.
;; Set the first argument of `sys_exit` to 0. The 0 status code is success.
mov rdi, 0
;; Call the `sys_exit` system call.
syscall
6 changes: 3 additions & 3 deletions sum/sum.asm
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ section .text
_start:
;; Set the value of num1 to rax
mov rax, [num1]
;; Set the value of the num2 to the rbx
;; Set the value of num2 to rbx
mov rbx, [num2]
;; Get sum of the rax and rbx. The result is stored in the rax.
;; Get the sum of rax and rbx. The result is stored in rax.
add rax, rbx
.compare:
;; Compare the rax value with 150
Expand Down Expand Up @@ -47,7 +47,7 @@ _start:
.exit:
;; Specify the number of the system call (60 is `sys_exit`).
mov rax, 60
;; Set the first argument of `sys_exit` to `0`. The `0` status code is success.
;; Set the first argument of `sys_exit` to 0. The 0 status code is success.
mov rdi, 0
;; Call the `sys_exit` system call.
syscall

0 comments on commit 8802296

Please sign in to comment.