A Simple "Hello, World!" example using Flat Assembler.
I use a Nix Flake to manage the build toolchain, and provide a development shell:
- Install the Nix Package Manager the standard way, or using the Determinate Installer.
- Configure Nix to use Flakes. (default config if using the Determinate Installer)
- Install direnv.
- Create a
.envrc
file to enable the development shell:
echo "use flake" > .envrc
- enable direnv:
direnv allow
- Build the project:
nix build
- Run the built program, should be on path at
./result/bin/fasm-hello
:
fasm-hello
You can find more flat assembler examples at their website here.