funni 🚨🤔🚨
i deleted the hello.o object file and fisted bottom text
This commit is contained in:
parent
8ac09847df
commit
7aeef0b079
2 changed files with 34 additions and 9 deletions
|
@ -17,24 +17,49 @@ main:
|
||||||
syscall ;invoke
|
syscall ;invoke
|
||||||
; ^^^^ is the linux syscall way of printing a string
|
; ^^^^ is the linux syscall way of printing a string
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mov r8b, [text]
|
mov r8b, [text]
|
||||||
add r8b, 1
|
add r8b, 1
|
||||||
mov [text], r8b
|
mov [text], r8b
|
||||||
|
|
||||||
|
mov rdi, text
|
||||||
|
|
||||||
|
|
||||||
mov rdi, text
|
|
||||||
cld
|
cld
|
||||||
call puts ;this is the put s way of printing a string
|
call puts ;this is the put s way of printing a string
|
||||||
add rsp, 8
|
|
||||||
ret
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
mov r8b, [text+3] ;14
|
||||||
|
sub r8b, 16
|
||||||
|
mov [text+3], r8b
|
||||||
|
|
||||||
|
mov r8b, [text+2]
|
||||||
|
sub r8b, 16
|
||||||
|
mov [text+2], r8b
|
||||||
|
|
||||||
|
mov r8b, [text+4]
|
||||||
|
sub r8b, 10
|
||||||
|
mov [text+4], r8b
|
||||||
|
|
||||||
|
mov r8b, [text]
|
||||||
|
add r8b, 4
|
||||||
|
mov [text], r8b
|
||||||
|
|
||||||
|
mov rdi, text
|
||||||
|
cld
|
||||||
|
call puts ;this is the put s way of printing a string
|
||||||
|
|
||||||
|
|
||||||
_end:
|
_end:
|
||||||
mov rax, 60 ; exit
|
add rsp, 8
|
||||||
mov edi, 1 ; error 1
|
ret
|
||||||
syscall
|
|
||||||
|
; mov rax, 60 ; exit
|
||||||
|
; mov edi, 1 ; error 1 dont need the exit anymore beacue libc or somthing
|
||||||
|
; syscall
|
||||||
|
|
||||||
|
|
||||||
|
|
BIN
printf/hello.o
BIN
printf/hello.o
Binary file not shown.
Loading…
Reference in a new issue