Menu

Post image 1
Post image 2
Post image 3
Post image 4
1 / 4
0

ForgeZero: How I stopped fearing linkers and wrote a universal assembly builder (Node.js Go)

DEV Community·Alex Voste·17 days ago
#yD5UCIz4
#go#node#showdev#tooling#fasm#assembler
Reading 0:00
15s threshold

Hey everyone, low-level programmers and fellow weirdos. About two months ago, I was tinkering with a real-mode operating system that also had 64-bit support. Assembly was a daily grind: crypto protocols, syscalls, manual memory management. And I got tired of it. Tired of endlessly typing nasm ..., ld ..., babysitting flags, and cleaning up object file garbage. So I decided to write my own builder. First in Node.js (just for fast prototyping), and now I'm in the middle of a full rewrite in Go. And no, it's not just because Go is trendy – it's because when you write a system tool, it should be fast, native, and not drag around a 100 MB runtime. What it actually does You write: node index.js main.asm And you get an executable. That's it. The builder does everything: Finds all .asm (or .s, .fasm) files recursively. Calls the right assembler with the right flags. Picks the right linker for your OS (ld for Linux, gcc for Windows, ld for macOS). Links with libraries if needed. Optionally cleans up object files.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More