NASM Coding: Basics

A quick summary of the files we will work with and common syscalls:

File ID Description Use
stdin
0
Keyboard Input
stdout
1
Screen Output
stderr
2
Screen (for printing error messages) Output
Syscall ID # of Args Description
read
0
$3$ Reading from files
write
1
$3$ Writing to files
_exit
60
$1$ Exiting the program

The full list of all the supported Linux syscalls (there are slightly over 300 such functions) and their syscall numbers are listed in this article. In the scope of this class, however, we will use only the 3 syscalls we mentioned in the summary table above.