Low-Level Programming Project
HelloAssembly
HelloAssembly is a small low-level programming project built to compare two very direct ways of doing the same thing: printing a line to standard output in Linux and printing a line to the console in Windows. The programs are intentionally small, which makes the assembly readable enough to show directly on the project page.
What this project shows
The Linux version exports a tiny assembly routine that a C driver calls three times. That keeps the assembly focused on register setup and the `sys_write` syscall itself. The Windows version is a native console program that calls `GetStdHandle`, `WriteFile`, and `ExitProcess` directly using the Windows x64 calling convention.
The interesting part is not the output string. It is the contrast in how each operating system expects work to be described: syscall numbers and file descriptors on Linux, versus API functions, argument registers, shadow space, and imported symbols on Windows.
Linux path
Uses `rax`, `rdi`, `rsi`, and `rdx` to set up `sys_write`, then invokes `syscall` directly.
Windows path
Calls Win32 functions with `rcx`, `rdx`, `r8`, and `r9`, plus stack shadow space for `WriteFile`.
Why it works well as a showcase
The source is small enough to read in one sitting, but still exposes real platform-level details.
Repository structure
The repo includes `hello.asm`, `hello_windows.asm`, a tiny `main.c` harness, and generated outputs.
Key takeaways
- The Linux example is minimal because the kernel interface is exposed directly through `syscall`.
- The Windows example is longer because console output is handled through imported system functions.
- RIP-relative addressing keeps the string reference position-independent in both examples.
- The project makes calling conventions easier to understand because each file has one job and very few moving parts.
Build flow
- Linux: assemble `hello.asm`, link it with `main.c`, then run the executable from Linux or WSL.
- Windows: assemble `hello_windows.asm`, link against `kernel32`, then run the resulting `.exe` in PowerShell.
- Both paths print the same `Hello, World!` message, but they get there through different OS interfaces.