From 0593429e8c3cbbd9e82f97df0215b394d015e460 Mon Sep 17 00:00:00 2001 From: Win Date: Tue, 11 Jun 2024 19:54:36 +0700 Subject: [PATCH] added stuff --- x86-64/in-out/in-out.asm | 11 +++++++++++ x86-64/minimum/minimum.asm | 6 +----- 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 x86-64/in-out/in-out.asm diff --git a/x86-64/in-out/in-out.asm b/x86-64/in-out/in-out.asm new file mode 100644 index 0000000..d50875e --- /dev/null +++ b/x86-64/in-out/in-out.asm @@ -0,0 +1,11 @@ +format ELF64 executable 0 + +segment readable executable + +entry $ + ; read from stdin + xor rax, rax + + +segment readable writable +buf rb 80 diff --git a/x86-64/minimum/minimum.asm b/x86-64/minimum/minimum.asm index 835f67c..7bb2b8d 100644 --- a/x86-64/minimum/minimum.asm +++ b/x86-64/minimum/minimum.asm @@ -34,12 +34,8 @@ loop_through: mov rcx, rax jmp loop_through -print: - mov rax, 0x01 - mov rdi, 1 - mov esi - exit: + mov rdi, rcx mov rax, 0x3c syscall