This repository contains miscellaneous programs written in assembly that can be assembled using nasm. By no means is my code efficient or follow reccomended practices.
bin/
: Where the assembled and linked programs will be emitted.lib/
: Utility functionssrc/
: The actual source files for the programs
-
First of all, you need a Unix-like system to run these programs (assembly is not very cross-platform). Note that only macOS has been tested.
-
You will also need nasm. See below for installation options.
- From the download page
- Via a package manager:
# macOS brew install nasm sudo port install nasm # Debian sudo apt-get install nasm # Arch sudo pacman -S nasm
-
GCC Compiler tools (for
make
andld
)- On macOS, install Xcode or 'the command line tools'.
- On Linux install gcc.
- Debian based systems:
sudo apt-get install gcc
- Debian based systems:
-
Finally, to assemble and link the programs, run
./build.sh
which just invokes the Makefile
Now in the bin
directory, you should see various programs (depending on your
machine's architecture).
The resources and tutorials I used to learn assembly.
- https://cs.lmu.edu/~ray/notes/nasmtutorial/
- https://www.cs.uaf.edu/2017/fall/cs301/reference/x86_64.html
- https://www.cs.tufts.edu/comp/40/docs/x64_cheatsheet.pdf
- https://www.cs.tufts.edu/comp/40/docs/asm64-handout.pdf
- https://www.felixcloutier.com/x86/
- https://github.com/HJLebbink/asm-dude/wiki