0
votes

I am trying to learn assembly language in my spare time to help me in my role as a developer using high level languages.

I have followed the NASM tutorial here: http://leto.net/writing/nasm.php.

I am able to create and run a simple program that prints HelloWorld to the screen. I am confused by the following paragraph in the link above:

mov eax,5       ; the syscall number for open()

So where do find out all of the semantics for all of the various system calls?
Well first, the numbers are listed in asm/unistd.h in Linux, and  sys/syscall.h
in the *BSD's

I assume that this means that: if there is a 5 in the eax register, then it is a system call for open. Are the rest of the system calls documented somewhere?

I am using NASM on a Windows 7 PC.

1
bsd/linux syscall IDs aren't going to be of much use if you're running under Windows... - Marc B
@Marc B, thanks. Do you know what the equivalent of syscalls are in Windows? - w0051977

1 Answers