AI guide
【One-Line Pitch】
A hands-on guide that rebuilds the machinery behind modern high-level features—objects, exceptions, closures, coroutines, and threads—directly in 64-bit MASM on Windows, so you understand what the runtime normally hides. Best for readers who already know basic x86-64 assembly and want the hard parts made explicit rather than taken on faith.
【Book Arc】
- **Opening (~0%–10%)**: Sets the premise—no runtime, no magic—and frames the volume as a continuation of Volume 1, then moves into Unicode/wide-string handling and transcendental math via the FPU, establishing the low-level toolkit used later.
- **Early (~10%–30%)**: Covers advanced procedures: lexical nesting, static links and displays, activation records, HLL-like signatures, parameter overloading, and the Windows ABI (register volatility, stack alignment, parameter setup/cleanup).
- **Middle (~30%–55%)**: Explores parameter-passing mechanisms in depth (by value/result, by name, lazy evaluation, variadic lists, procedures as parameters) and function-result conventions, then introduces iterators and the `foreach` macro pattern.
- **Late (~55%–80%)**: Builds concurrency from the ground up—threads, fibers, synchronization primitives (critical sections, events, mutexes, semaphores), race conditions, atomic instructions, memory fences—and then constructs OOP in MASM: vtables, method dispatch, inheritance, polymorphism, and multiple inheritance.
- **Ending (~80%–100%)**: Extends into coroutines, generators, and fibers, including fiber-local storage, recursion/reentrancy concerns, and how exceptions interact with coroutines; closes with appendices on the ASCII set, glossary, and Visual Studio/MASM setup.
【Key Takeaways】
- **The runtime is the curriculum** (Opening): Every chapter strips a familiar HLL construct down to instructions, making design decisions visible instead of assumed.
- **Unicode is where most code quietly breaks** (Opening): Wide-string handling is treated as a correctness problem at the ABI level, not an afterthought.
- **Calling conventions are load-bearing** (Early): The Windows ABI—volatile registers, stack alignment, parameter cleanup—determines whether your assembly interoperates with C/C++ at all.
- **Parameter passing is a design space, not a single rule** (Middle): The book catalogs many mechanisms (value/result, name, lazy, variadic, procedure-as-parameter) so you can reason about trade-offs.
- **Concurrency primitives are built, not imported** (Late): Threads, fibers, mutexes, semaphores, atomic instructions, and memory fences are assembled from first principles, exposing race conditions and deadlocks directly.
- **OOP is a data-layout discipline** (Late): Vtables, `this` pointers, method dispatch, and multiple inheritance (including the diamond problem) are reconstructed by hand in MASM.
- **Coroutines and generators are control-flow engineering** (Ending): Fibers, fiber-local storage, and generator state management show how suspend/resume semantics work beneath language features.
- **This is a programming book, not an optimization book** (Early): The author explicitly defers optimization to a future volume, so read it for understanding, not speed tuning.
【Reading Tips】
- Deep-read the ABI and parameter-passing chapters (Early–Middle); they underpin everything later and are where interop bugs originate.
- Skim the transcendental-function chapter if math isn't your goal—it's self-contained and mostly FPU instruction reference.
- Treat the OOP and concurrency chapters as the core payoff; work the listings rather than reading passively, since the value is in the construction.
- Keep Volume 1 and the companion library (`aoalib`) handy—many examples build on prior code and the C++ driver harness.
- Use the appendices (glossary, Visual Studio setup) as reference, not as sequential reading.
【Coverage Limits】
This guide is synthesized from stratified excerpts (front matter, table of contents, and introduction) plus the publisher blurb; chapter-level detail beyond titles and the stated scope is not covered, so specific code examples and internal arguments are not summarized here.
Passage locations
Excerpt 1
ite> as appropriate. The Art of 64-Bit Assembly, Volume 2 The Art of 64-Bit Assembly, Volume 2 CONTENTS IN DETAIL TITLE PAGE COPYRIGHT ABOUT THE AUTHOR AND T...
View in text
Excerpt 2
le Usage Scenario 11.6.4 Management of Generator State 11.6.5 A Class-Iterator Implementation of a Generator 11.6.6 A Coroutine/Fiber Implementation of a Gen...
View in text
Excerpt 3
soft Visual Studio tools such as nmake.exe , lib.exe , link.exe , and a text editor (such as the text editor that comes with Visual Studio, though any pure t...
View in text
Excerpt 4
g syntactical rules in English versus programming languages. First of all, a few typographical conventions. This book uses a monospaced font to denote any te...
View in text