Z80 Assembly 13: Instruction Set Encoding (Reading Machine Code)
Assembly vs. Machine Code Assembly language uses mnemonics (like LD or ADD) that are easy for humans to read. Machine code is the raw binary sequence of bytes (the opcodes) that the CPU directly executes. Understanding the encoding helps with optimization and debugging. Opcode Structure: The Z80’s Chessboard Most Z80 instructions fit into a flexible, 8-bit format that can be visualized as a grid. An 8-bit opcode is often broken into three 2- or 3-bit fields: ...