Input/Output

Doing I/O may be quite tricky, even more so in Assembly. Normal processes do not have permission to access the hardware I/O devices directly, so the input and output must be handled by the operating system. Instructing the operating system to do so is typically done through so-called system calls, that hand control over to the kernel until the action is performed.

However, as you may have guessed, different operating systems have different ways of... well... operating. Luckily, the C Standard Library is available on essentially any major operating system you might run on your device and it offers abstractions for I/O that hide the underlying system calls. Furthermore, the functions of the C Standard Library (like printf and scanf) come with many niceties, like ASCII-to-integer (or vise versa) conversions.

Last updated