The Art of 64-bit Assembly
A new volume of *The Art of 64‑Bit Assembly* focused on Windows x64 and MASM prompts broader debate about whether learning and hand‑writing assembly is still valuable in an era of powerful compilers and large language models. Many commenters argue that assembly remains essential for understanding systems, writing critical low‑level code, and achieving peak performance in narrow hotspots, while others note that modern compilers usually outperform humans except in specialized cases. The thread also touches on ABI and calling convention details, assembler tool preferences (MASM vs NASM/FASM/GAS), and frustration that AI and marketing debates often overshadow substantive engagement with technically rich books.
C++ ABIs, vtables, and Windows conventions
- Thread clarifies that vtable layout is part of C++ compiler ABIs (MSVC vs Itanium), not kernel ABIs.
- Windows user‑mode APIs use C linkage; vtables and COM are user‑space conventions.
- COM vtables are language‑independent: first entries are specific methods, all
__stdcall, layout effectively matches a restricted C++ subset. - Toolchains like MSYS2/Cygwin mix calling conventions: SysV/Itanium internally, Windows conventions at API boundaries.
- Takeaway: interoperability depends on understanding which ABI and calling convention each component uses.
Is assembly still written in the age of LLMs?
- Many say yes: for OS context switches, interrupt handlers, real‑time MCUs, JITs, coroutines, runtimes, and very hot or timing‑critical loops.
- Several view assembly as a hobby and a way to deeply understand systems.
- Some report LLMs work well for translation between assemblers, ARM SIMD, and as a driver for reverse‑engineering tools.
- Others find LLM‑generated assembly unreliable and slower, and would not trust it for critical code.
- Consensus: compilers usually beat humans for most code; humans can still outperform them on small, highly specialized, performance‑critical kernels.
AI, understanding, and the book’s positioning
- Debate over a marketing line claiming AI explanations of vtables lack “genuine understanding.”
- Some call this anti‑AI marketing; others argue that even if models are trained on the book, they won’t reliably apply it or confer the same understanding as reading.
- Concern that discourse gets dominated by “is this AI‑generated?” rather than the technical content.
Assemblers, tooling, and macro/preprocessor usage
- Strong opinions on MASM vs NASM/YASM/FASM/GAS; MASM praised for features, criticized for Windows‑centricity and availability.
- GAS seen as compiler‑oriented with weaker macro facilities; some rely on external preprocessors or powerful macro assemblers to manage namespaces, register/stack state, and portability.
- Historical “assembler wars” reminisced; modern practice often mixes assemblers and uses macro libraries heavily.
Books and ecosystem around x86/ARM assembly
- Multiple other assembly and low‑level programming books are recommended (x86‑64, ARM, Linux‑oriented).
- Several commenters praise previous editions of this “Art of Assembly” series and related low‑level coding books, though note a strong emphasis on Windows and some distrust of compilers.