A sum of all bite-size puzzles/examples to learn Flat Assembler (FASM), piece by piece.
- hello world : hello.asm
- concat string : concate_string.asm
- fibonacci & print numbers : fib.asm
Need to run make to compile & link :
- time / lib64 : time.asm
- malloc / lib64 : malloc.asm
- printf / lib64 : printf_float.asm
I'm building a macros library to transform FASM into a more friendly place, less repetitive work to do, so everyone may focus on actual fun stuffs.
Just include macros.asm to your file.
This is what FASM is lacking to unite its fragile community brilliant minds - which may simplify many work with properly done library. Just a plan but I will make it into my TODO list.
Function: it may just simply manage a .toml file like cargo, then fetch every library from a git repo & auto regenerate Makefile to add it up in linker ld or gcc of your choice later.
-
If you consider my minimal already-setup image based on
ubuntu-24.04/6.11.11-linuxkit:docker pull deulamco/ubuntu-amd64:latest -
Else, start your own container :
docker run --rm -it --platform linux/amd64 -v $(pwd):/local ubuntu:24.04 -
Install packages :
apt update -y && apt install fasm make binutils libc6-dev -
Save your container -> image to use later :
docker ps docker commit asteartnh3 your_hub/repo_name:tag docker push your_hub/repo_name:tag -
Run :
docker run -it -v $(pwd):/local your_hub/repo_name:tag
** This playground is based on x86-64 only, so we need a fixed environment to emulate it exclusively.