tebe6502 / Mad-Assembler

6502, 65816 assembler (Atari XE/XL)
MIT License
78 stars 16 forks source link

Nested structures have stricter access #18

Closed dfbg closed 1 year ago

dfbg commented 1 year ago
.struct Pointer
    l .byte
    h .byte
.ends

.struct DCB_S
    device  .byte
    unit    .byte
    command .byte
    status  .byte
    buffer  Pointer
    timeout .byte
    unused  .byte
    count   .word
    aux1    .byte
    aux2    .byte
.ends

.zpvar ADRESS   Pointer = $64       ;INDIRECT POINTER
.var DCB        DCB_S = $300        ;DEVICE CONTROL BLOCK

This works:

mwa #$600 ADRESS

This doesn't but should:

mwa #$600 dcb.buffer

This does:

mwa #$600 dcb.buffer.l