This is a countdown timer written in NASM x86 assembly for linux machines. It can also be used on Windows using WSL.
NASM is the required version of assembly becuase of how the macros are defined in helpers.inc
- nasm - for assembly
- ddd - not technically required but a great debugger
- gcc-multilib - for debugging?
nasm -gdwarf -f elf64 timer.asm -o timer.o
-gdwarf sets debugging symbols to be enabled in the dwarf format vs the stabs format. After trying both, I found no difference for my needs. The main part is that -g is enabled.
Can also be written as -g -F dwarf
-f elf64 sets the linking format
-o is the output object file
ld timer.o -o timer
timer <name> 00 00 00
For example:
This timer to bake a pizza for 1 hour, 5 minutes, and 30 seconds.
The name is an optional argument
timer Pizza 1 5 30
There are a lot of resources out there for assembly help, but with all the different syntax and types it can be tricky. Here are a couple of resources that can help if you're getting into it.