asd
This commit is contained in:
parent
d8f9936073
commit
4fe311d996
2 changed files with 21 additions and 0 deletions
|
@ -21,4 +21,5 @@ add_executable(length length.asm)
|
||||||
add_executable(yes yes.asm)
|
add_executable(yes yes.asm)
|
||||||
add_executable(case case.asm)
|
add_executable(case case.asm)
|
||||||
add_executable(diff diff.asm)
|
add_executable(diff diff.asm)
|
||||||
|
add_executable(arg arg.asm)
|
||||||
|
|
||||||
|
|
20
arg.asm
Normal file
20
arg.asm
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
extern puts
|
||||||
|
|
||||||
|
|
||||||
|
section .data
|
||||||
|
text db 48,0
|
||||||
|
section .text
|
||||||
|
global main
|
||||||
|
|
||||||
|
main:
|
||||||
|
sub rsp, 8 ;enter
|
||||||
|
|
||||||
|
add [text], rdi
|
||||||
|
|
||||||
|
mov rdi, text
|
||||||
|
cld
|
||||||
|
call puts
|
||||||
|
|
||||||
|
_end:
|
||||||
|
add rsp, 8 ;exit
|
||||||
|
ret
|
Loading…
Reference in a new issue