Hex Decoding into Assembly Language: Disassembly and Instruction Encoding

Shriira Press

Preface

A comprehensive, self-contained guide to the reverse of assembly — taking raw hexadecimal machine code and decoding it back into human-readable ass…

Welcome to Hex Decoding into Assembly Language: Disassembly and Instruction Encoding.

A comprehensive, self-contained guide to the reverse of assembly — taking raw hexadecimal machine code and decoding it back into human-readable assembly instructions. This is disassembly, and it rests on understanding instruction encoding: how a CPU's instructions are represented as bytes, how the bytes split into opcode and operand fields, and how a decoder walks a byte stream turning 48 01 D8 into add rax, rbx. This book teaches that skill across architectures — the byte-level formats of x86/x86-64, ARM, RISC-V, MIPS, and more — blending intuition (what decoding is and why it's hard), concepts (encoding formats and the decode algorithm), and runnable practice (decoding by hand and writing a disassembler). It includes a multi-architecture encoding catalog (Appendices C–H) and the actual ISA manuals (in manuals/) that are the ground truth for every encoding.

This title is part of the ShriIra library and is free to read in full, right here — our small contribution to making world-class knowledge easy to reach.

A note on reading it: open the Contents menu at the top of the reader to jump between chapters, use the Aa menu to set a comfortable text size, theme (light, sepia, or night), and single- or two-page layout. Your place is saved automatically, so you can always pick up where you left off.

We hope it serves you well.

— Shriira Press

Contents

  1. Chapter 1 — What Is Hex Decoding?
  2. Chapter 2 — From Hex to Instructions: The Decoding Problem
  3. Chapter 3 — Instruction Encoding Fundamentals
  4. Chapter 4 — The x86 Instruction Format
  5. Chapter 5 — Decoding x86-64 by Hand
  6. Chapter 6 — x86 Addressing: ModR/M and SIB Decoding
  7. Chapter 7 — Decoding ARM (AArch64)
  8. Chapter 8 — Decoding RISC-V
  9. Chapter 9 — Decoding MIPS and Fixed-Width ISAs
  10. Chapter 10 — Building a Disassembler
  11. Chapter 11 — Tools of the Trade
  12. Chapter 12 — Challenges: Variable Length, Code vs. Data, and Obfuscation
  13. Chapter 13 — Hex Decoding in Practice and the Profession
  14. Appendix A — Glossary and Quick Reference
  15. Appendix B — Further Reading and the ISA Manuals
  16. Appendix C — x86 / x86-64 Encoding Catalog
  17. Appendix D — ARM Encoding Catalog (AArch64 & AArch32)
  18. Appendix E — RISC-V Encoding Catalog
  19. Appendix F — MIPS Encoding Catalog
  20. Appendix G — 6502 Encoding Catalog
  21. Appendix H — Other Architectures: Z80, AVR, PowerPC, SPARC
0%
1/1