User Tools

Site Tools


programming:assembly:assembly_programming

This is an old revision of the document!


Assembly Programming

There are many Assembly compilers out there. nasm is one compiler that is available across platforms and can be used to program x86 processors.

x86 on Linux

Use interrupt 0x80 to make Linux system calls like reading and writing to file descriptors and sockets. For a list of system calls in Linux, refer to https://man7.org/linux/man-pages/man2/syscalls.2.html

x86 on DOS

Use interrupt 0x21 to make DOS system calls like reading and writing files. For a list of DOS system calls, refer to https://en.wikipedia.org/wiki/DOS_API

x86 on BIOS

When interacting with the BIOS, you use a different system call for each function. BIOS will have less system calls available than an kernel like DOS or Linux, but it gives you the tools you need to build an operating system. For example, BIOS will let you change the video mode, get input from keyboard, write text to screen, and draw pixels on the screen.

For a list of BIOS system calls, refer to https://en.wikipedia.org/wiki/BIOS_interrupt_call.

programming/assembly/assembly_programming.1616308106.txt.gz · Last modified: 2021/03/21 06:28 by nanodano