Volume 2: Machine-Level OOP, Exceptions, and Concurrency
Randall Hyde

#Assembly
#OOP
#Concurrency
#MASM
#x86
#AI
#HLL
🧩 هنر برنامهنویسی اسمبلی ۶۴ بیتی - جلد دوم
⚙️ نه جادویی در کاره، نه میانبری و نه Runtimeای که تقصیرها رو گردنش بندازی.
🤖 میتونی از یک AI بخوای توضیح بده vtableها در معماری x86 چطور کار میکنن و اون هم پاسخی بهت میده که درست به نظر میرسه. اما چیزی که ارائه نمیده اینه که Windows دقیقا انتظار داره ساختار vtable چطور باشه، چرا Dispatch متدها در سطح Instruction به اون شکل انجام میشه و اگر از قراردادهای رایج فاصله بگیری، چه چیزهایی خراب میشن.
📘 این جلد از مجموعه The Art of 64-Bit Assembly فاصله بین یک توضیح ظاهرا قابلقبول و درک واقعی موضوع رو از بین میبره.
🔬 هر فصل یکی از ساختارهایی رو بررسی میکنه که قبلا در C++، Python یا Rust از اون استفاده کردی، Runtime رو کاملا کنار میذاره و بعد اون ساختار رو از صفر با MASM و روی Windows بازسازی میکنه.
🧠 Objectها، Exceptionها، Closureها، Coroutineها و Concurrency همگی در سطح Instruction کالبدشکافی میشن و تمام تصمیمهای پیادهسازی بهشکل روشن و مستقیم در اختیارت قرار میگیرن.
🛠️ چیزهایی که میسازی
🏗️ برنامههای شیءگرا با MASM شامل vtableها، Dispatch متدها و وراثت که همگی رو از صفر و بهصورت دستی پیادهسازی میکنی
⚠️ سیستم Structured Exception Handling یا SEH در Windows که اون رو مستقیما در سطح Instruction نصب و مدیریت میکنی
🔄 Thunkها، Closureها و Iteratorهایی که مثل Functionهای مرتبهبالا رفتار میکنن
🧵 Coroutineها، Generatorها و Fiberها بدون استفاده از کد زبانهای سطح بالا
⚙️ برنامههای Concurrent با Primitiveهای واقعی همگامسازی که مستقیما با Assembly ساخته میشن
🔤 مدیریت صحیح Stringهای Unicode در همون سطحی که بیشتر کدها دچار اشتباه میشن
🧩 زبانهای Macro دامنهمحور داخل MASM که اونها رو از اصلهای پایه طراحی و پیادهسازی میکنی
🎯 اگر از قبل Assembly بلدی و میخوای دیگه بخشهای سخت رو بدون درک واقعی نپذیری، این کتاب برای توئه.
📖 فهرست مطالب
فصل ۱. Macroهای پیشرفته
فصل ۲. Stringهای Unicode
فصل ۳. Functionهای متعالی
فصل ۴. Procedureهای پیشرفته
فصل ۵. برنامهنویسی Concurrent
فصل ۶. برنامهنویسی شیءگرا با MASM
فصل ۷. مدیریت Exceptionها
فصل ۸. Thunkها و Closureها
فصل ۹. پیادهسازی پیشرفته پارامترها
فصل ۱۰. Iteratorها
فصل ۱۱. Coroutineها، Generatorها و Fiberها
👤 درباره نویسنده
👨💻 رندال هاید چندین دهه از مسیر حرفهای خودش رو صرف نوشتن کد Assembly برای تجهیزات پزشکی، سیستمهای هستهای و سختافزارهای Embedded کرده؛ حوزههایی که در اونها درست کار کردن کد یک انتخاب نیست، بلکه یک ضرورت مطلقه.
🎓 او برنامهنویسی Assembly رو در سطح دانشگاهی تدریس کرده و نویسنده کتابهای The Art of Assembly Language، The Art of ARM Assembly و مجموعه Write Great Code از انتشارات No Starch Press است.
No magic. No shortcuts. No runtime to blame.
You can ask an AI to explain how vtables work in x86. It will give you something that sounds right. What it won’t give you is what Windows actually expects the vtable to look like, why method dispatch behaves the way it does at the instruction level, or what breaks when you deviate from convention. This volume of The Art of 64-Bit Assembly closes the gap between a plausible explanation and genuine understanding.
Every chapter takes a construct you’ve used in C++, Python, or Rust, strips away the runtime, and rebuilds it from scratch in MASM, running under Windows. Objects, exceptions, closures, coroutines, concurrency: Each is dissected at the instruction level, with every decision made visible and explicit.
What you’ll build:
If you already know assembly and want to stop taking the hard parts on faith, this is the book.
Table of Contents
Chapter 1. Advanced Macros
Chapter 2. Unicode Strings
Chapter 3. Transcendental Functions
Chapter 4. Advanced Procedures
Chapter 5. Concurrent Programming
Chapter 6. Object-Oriented Programming with MASM
Chapter 7. Exception Handling
Chapter 8. Thunks and Closures
Chapter 9. Advanced Parameter Implementation
Chapter 10. Iterators
Chapter 11. Coroutines, Generators, and Fibers
Randall Hyde has spent decades writing assembly for medical devices, nuclear systems, and embedded hardware where correctness is not optional. He taught assembly language programming at the university level and is the author of The Art of Assembly Language, The Art of ARM Assembly, and the Write Great Code series, all from No Starch Press.









