The basic operation for accessing a value from a structure is to take the address of the structure, add a compile-time constant offset to it, and use that address. There&#x27;s an addressing mode specifically for this in the Z80: you put the struct address in a register, and have the constant offset as part of the instruction. So you can do stuff like this: (numbers in comments are: &lt;bytes for this instruction&gt; &lt;bytes total&gt; &#x2F; &lt;cycles for this instruction&gt; &lt;cycles total&gt;)<p><pre><code>    &lt;&lt;put address in IX&gt;&gt;
    LD A,(IX+0)            ; A=SELF.X              3 3  &#x2F; 19 19
    ADD A,(IX+2)           ; A=SELF.X+SELF.DX      3 6  &#x2F; 19 38
    LD (IX+0),A            ; SELF.X=SELF.X+SELF.DX 3 9  &#x2F; 19 57
    XOR A                  ; A=0                   1 10 &#x2F; 4  61
    LD (IX+2),A            ; SELF.DX=0             3 13 &#x2F; 19 80
</code></pre>
The 6502 doesn&#x27;t have anything exactly like this. You do have an indirect addressing mode, but the offset goes in a register. So for every access, you need to have the offset into the index register. (There&#x27;s no point adding the offset to the address; the offset is mandatory, so you&#x27;d then just have to load zero into the index register every time.) So the above in 6502:<p><pre><code>    &lt;&lt;put address in $70&gt;&gt;
    LDY #2                                         2 2  &#x2F; 2 2
    LDA ($70),Y            ; A=SELF.DX             2 4  &#x2F; 5 7
    LDY #0                                         2 6  &#x2F; 2 9
    CLC                                            1 7  &#x2F; 2 11
    ADC ($70),Y            ; A=SELF.DX+SELF.X      2 9  &#x2F; 5 16
    STA ($70),Y            ; SELF.X=SELF.X+SELF.DX 2 11 &#x2F; 6 22
    TYA                                            1 12 &#x2F; 2 24
    LDY #2                                         2 14 &#x2F; 2 26
    STA ($70),Y            ; SELF.DX=0             2 16 &#x2F; 6 32
</code></pre>
Which is rather unwieldy, takes up more space, and is a bit slow (the 4:1 ratio I mentioned in my original past is here closer to 2:1) - even after I rearranged the code a bit so the Y value didn&#x27;t need reloading so much. You also have the issue that the struct address is a 16-bit quantity, something that is inconvenient to handle on the 6502. There are no instructions that operate on 16-bit data.<p>One thing the 6502 does have though is an addressing mode where the operand&#x27;s address is a fixed 16-bit value (from the instruction) plus an 8-bit index register. So, with this in mind, what you could do is have a separate table for each struct field. So this switches things around, and instead of a runtime 16-bit address (of the struct) and a compile-time 8-bit offset (of the field), you have a compile-time 16-bit address (of the field table) and a runtime 8-bit offset (for the row in the table). Which is a perfect fit. Best of all, the indexing is free if you arrange things correctly, which is not that hard to do. Then the code would look more like this:<p><pre><code>    &lt;&lt;put row in X&gt;&gt;
    CLC                     ;                        1 1  &#x2F; 2 2
    LDA XS,X                ; A = SELF.X             3 4  &#x2F; 4 6
    ADC DXS,X               ; A = SELF.X+SELF.DX     3 7  &#x2F; 4 10
    STA XS,X                ; SELF.X=SELF.X+SELF.DX  3 10 &#x2F; 4 14
    LDA #0                  ;                        2 12 &#x2F; 2 16
    STA DXS,X               ; SELF.DX=0              3 15 &#x2F; 4 20
</code></pre>
And there&#x27;s that 4:1 ratio again...<p>Each object&#x27;s &quot;address&quot; is now an 8-bit quantity (it&#x27;s just an index into the tables), so much easier to deal with. And moving from one object to the next is very quick, since it&#x27;s just incrementing a register.<p>There doesn&#x27;t appear to be anything analogous to this alternative approach on the Z80.