Level 21: Pointers
Task
Add Index Register (IX) for indirect addressing. Implement LDX, LDAX, STAX, INX in the decoder.
Solution
Word format, two ROMs, BusMUX. 1) Set BusConstant = 2 → PC.Inc. 2) ROM#1 → RAM.Addr. 3) IX is clocked. 4) Route RAM data to ALU8.B via BusMUX: RAM → BusMUX.A, ROM#1(operand) → BusMUX.B, BusMUX.Q → ALU8.B. Sel stays 0 (RAM) for now. 5) Use Splitter + AND/OR/NOT to decode LDX, LDA[IX], STA[IX], INX.