Skip to content

nzec/asm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

asm

A few assembly programs I have written.

x86

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.

ARM

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

Bare Metal / Operating Systems

Books

Practical

Textbooks/Reference

Lectures/Notes

Web

Youtube

Examples

Forth

Assembly

References

Books

Web

Interpreter/Compiler