A few assembly programs I have written.
Most use x86-64 conventions and Linux syscalls.
To run them, do the following:
as hello.s -o hello.o # assembe
ld hello.o -o hello # link
./hello # run
If they require extra steps, there is probably a Makefile in the folder.
Assumes Linux running on a ARMel/ARMhf system.
To cross-compile and emulate, install the following:
sudo apt install gcc-12-arm-linux-gnueabi # for cross-compiling to ARMel
sudo apt install gcc-12-arm-linux-gnueabihf # for cross-compiling to ARMhf
sudo apt install qemu-user # for emulating
sudo apt install gdb-multiarch # for debugging
To run them, do the following:
make run TARGET=hello # run
make gdb TARGET=hello # debug using gdb
make gef TARGET=hello # debug using gef (if installed)
make clean TARGET=hello # remove .o and .out files
- Writing a Simple Operating System from Scratch (HackerNews)
- The little book about OS development (HackerNews)
- Operating Systems: From 0 to 1 (HackerNews)
- How to Make a Computer Operating System
- Operating System Development Series
- linux-insides
- 6.828: Operating System Engineering - MIT
- CS 140: Operating Systems - Stanford
- Hack the Kernel - ops-class.org
- Gforth Manual
- A Beginner's Guide to Forth - J.V. Noble
- Annexia Forth (archive.org)
- Starting Forth - Leo Brodie
- Forth Tutorials
- Decompilation of Forth code with 'see' - StackOverflow
- Intel® 64 and IA-32 Architectures Software Developer Manuals
- AMD64 Architecture Programmer’s Manual
- System V x86-64 psABI
- The Art of Assembly Language (DOS/16-bit)
- Programming from the Ground Up - Jonathan Bartlett
- PC Assembly Language - Paul Carter
- Introduction to 64 Bit Assembly Language Programming for Linux - Ray Seyfarth (Not free)
- x86-64 Assembly Language Programming with Ubuntu - Ed Jorgensen
- Linux Assembly - Peter Berends (Dutch)
- Linux Assembly Language Programming by Bob Neveln