From 7aeef0b079127360045622f892ba4e5eee3e3c16 Mon Sep 17 00:00:00 2001 From: zombie Date: Tue, 7 Sep 2021 21:27:56 -0400 Subject: [PATCH] =?UTF-8?q?funni=20=F0=9F=9A=A8=F0=9F=A4=94=F0=9F=9A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit i deleted the hello.o object file and fisted bottom text --- printf/hello.asm | 43 ++++++++++++++++++++++++++++++++++--------- printf/hello.o | Bin 1056 -> 0 bytes 2 files changed, 34 insertions(+), 9 deletions(-) delete mode 100644 printf/hello.o diff --git a/printf/hello.asm b/printf/hello.asm index 6b0f071..66763dc 100644 --- a/printf/hello.asm +++ b/printf/hello.asm @@ -17,24 +17,49 @@ main: syscall ;invoke ; ^^^^ is the linux syscall way of printing a string + + + + mov r8b, [text] add r8b, 1 mov [text], r8b - - - - mov rdi, text + mov rdi, text cld 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: - mov rax, 60 ; exit - mov edi, 1 ; error 1 - syscall + add rsp, 8 + ret + +; mov rax, 60 ; exit +; mov edi, 1 ; error 1 dont need the exit anymore beacue libc or somthing +; syscall diff --git a/printf/hello.o b/printf/hello.o deleted file mode 100644 index c3f4ec98402835bd446e976e0c82630dfc5898f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1056 zcmb<-^>JfjWMqH=Mg}_u1P><4z~F#jLfH-s>HnwNrzACS4ox?$-BA>dkS8+d{?B&2fi{gUkk{(?9