Compare commits
2 commits
27bce83c5f
...
f5654816e8
Author | SHA1 | Date | |
---|---|---|---|
f5654816e8 | |||
06fca94a96 |
3 changed files with 35 additions and 0 deletions
BIN
helloworld/hello
Executable file
BIN
helloworld/hello
Executable file
Binary file not shown.
35
helloworld/hello.asm
Normal file
35
helloworld/hello.asm
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
section .data
|
||||||
|
text db 65,10
|
||||||
|
fuckvalue db 255
|
||||||
|
sleeplength db 255
|
||||||
|
sleepcounter db 0
|
||||||
|
section .text
|
||||||
|
global _start
|
||||||
|
|
||||||
|
_start:
|
||||||
|
mov r8, [fuckvalue] ; put the shit in the register for later
|
||||||
|
mov r9, [text]
|
||||||
|
|
||||||
|
|
||||||
|
mov rax, 1 ;syscall 1
|
||||||
|
mov rdi, 1 ; arg 1 (stdout)
|
||||||
|
mov rsi, text ; the shit to print
|
||||||
|
mov rdx, 2 ; the length
|
||||||
|
syscall ;invoke
|
||||||
|
|
||||||
|
|
||||||
|
cmp r8, r9
|
||||||
|
je _end
|
||||||
|
|
||||||
|
;inc text
|
||||||
|
mov r9, [text]
|
||||||
|
inc r9
|
||||||
|
mov [text], r9
|
||||||
|
|
||||||
|
jmp _start
|
||||||
|
|
||||||
|
|
||||||
|
_end:
|
||||||
|
mov rax, 60
|
||||||
|
mov edi, 0
|
||||||
|
syscall
|
BIN
helloworld/hello.o
Normal file
BIN
helloworld/hello.o
Normal file
Binary file not shown.
Loading…
Reference in a new issue