Your place is saved automatically on this browser.
Use M to look at memory
Enter:
The beginning of memory contains:
3E 42 21 00 60 C9These are the actual bytes that the Z80 will execute.
Opcode and operand
An instruction often consists of an opcode plus one or more operand bytes. The opcode identifies the operation. The operand supplies the value or address involved.
For example:
You do not need to memorise opcode numbers. Odin exists so that we can write readable mnemonics instead.
Z80 instructions are not all the same length
A Z80 instruction can occupy a different number of bytes depending on the instruction and its operands. This is called variable-length instruction encoding.
This is why our first instruction begins at $6000, the second begins at $6002, and RET begins at $6005. The CPU advances through however many bytes belong to each instruction.
You do not need to memorise instruction lengths. Odin assembles the code for us. Understanding that lengths vary simply helps memory dumps and addresses make sense.
