5 ms·
This is tangential, but seeing the 8086 opcode table organized in octal groups made me realize the same applies for the instruction set of the Z80 (my home CPU)
by sanqui 3y ago
This is tangential, but seeing the 8086 opcode table organized in octal groups made me realize the same applies for the instruction set of the Z80 (my home CPU). Your articles are always very insightful, thank you!
- stevekemp 3y agoZilog and Intel have a lot of crossover in that regard, due to engineers moving from one to the other. There's a whole lot of documentation on decoding instructions for the z80 which makes these octal relationships clear. One good site is http://z80.info/ http://z80.info/, for example. (I started coding on the Z80, and nowadays tinker with a single-board machine running CP/M on one.)
- bonzini 3y agoThe 8080 has 7 registers and a single addressing mode for accumulator-based instructions (which is most of them), therefore base-8 organization is pretty natural. Likewise for 8086 which has 8 registers and 8 ways to use registers to form an addressing mode (with absolute addressing and three different displacement modes, there would be 8*3+1=25, but they sacrificed [BP] to fit everything in MOD={00,01,10}). Of course one wonders if the choice of 8 registers and 8 addressing mode was due to some kind of fixation with base 8, or vice versa. Compared to the 6809, the 6502 or the 68000, the biggest reminiscence of the Z80 is the difference between AX/CX/DX/BX having 8-bit parts and SI/DI/SP/BP not having them. Though the low/high parts of IX and IY were accessible on the Z80 via undocumented opcodes (maybe even SP? I don't remember).