How do you know which registers you need to use for the system calls? Is this for every machine different? So why is it eax, ebx, etc.? How can I find out for my machine? Will it be different for every processor, I mean will there be a difference for i586 and i386?
_start: ; entry point for commands ; use the write syscall to print 'Hello world!' to stdout mov eax, 4 ; move syscall 4(write) to the eax register mov ebx, 1 ; move field descriptor for stdout to ebx mov ecx, msg ; move the memory address of our string to ecx mov edx, 13 ; move the length of the string to edx int 0x80 ; execute the syscall section .data msg: db “Hello world!”, 0x0a ; the string, followed by a new line character