From: Frank K. <fbk...@zy...> - 2009-08-19 17:11:41
|
H. Peter Anvin wrote: > On 08/19/2009 01:48 AM, Holger Hanrath wrote: >> On Tue, 18 Aug 2009 21:19:21 +0200 >> Holger Hanrath <ha...@gm...> wrote: >> >> >> here is the program what that does what i want in native x86_64: >> > > Yes, but inefficient. > >> ; write 3 bytes from argv[0] to stdout >> ; syscall numbers from asm/unistd_64.h >> stdout equ 1 >> write equ 1 >> exit equ 60 >> >> mov rax, write > > Small number... you probably want "mov eax,..." instead. > > etc. Or even: push write pop rax Smaller, if that's the goal, but slower (I think), and it doesn't do much for "readability", IMO. There's a tutorial here: <http://www.vikaskumar.org/wiki/index.php?title=X86-64_Tutorial> Might help... Best, Frank |