Skip to content

Commit

Permalink
modify c casm
Browse files Browse the repository at this point in the history
  • Loading branch information
lushl9301 committed Apr 1, 2015
1 parent 662f090 commit a8c20f4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions casm/casm1/casm.asm
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ extern print
section .text

_start:
call print
call print

;; exit
mov rax, 60
mov rdi, 0
syscall
;; exit
mov rax, 60
mov rdi, 0
syscall
22 changes: 11 additions & 11 deletions casm/casm3/casm.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ global printHelloWorld

section .text
printHelloWorld:
;; 1 arg
mov r10, rdi
;; 2 arg
mov r11, rsi
;; call write syscall
mov rax, 1
mov rdi, 1
mov rsi, r10
mov rdx, r11
syscall
ret
;; 1 arg
mov r10, rdi
;; 2 arg
mov r11, rsi
;; call write syscall
mov rax, 1
mov rdi, 1
mov rsi, r10
mov rdx, r11
syscall
ret

0 comments on commit a8c20f4

Please sign in to comment.