x86_64 Assembly Linux System Call Confusion
You’re running into one surprising difference between i386 and x86_64: they don’t use the same system call mechanism. The correct code is: movq $60, %rax movq $2, %rdi ; not %rbx! syscall Interrupt 0x80 always invokes 32-bit system calls. It’s used to allow 32-bit applications to run on 64-bit systems. For the purposes of learning, … Read more