prb28 / vscode-amiga-assembly

Amiga Assembly extension for Visual Studio Code
GNU General Public License v3.0
178 stars 12 forks source link

Watching vars accessed via base register #295

Open howprice opened 7 months ago

howprice commented 7 months ago

Is there a way to watch variables accessed via a base register? For example:

; 'vars' data structure, representing application state
    RSRESET
systemVBR:  rs.l    1
oldView:    rs.l    1
oldDMACON:  rs.w    1
...
vars_SIZEOF:    rs.b    0
...
vars:
    dcb.b         vars_SIZEOF
...
    lea vars(pc),a5     ; A5 points to vars throughout
    move.l  a4,systemVBR(a5)
...
    movea.l graphicsBase(a5),a6
        move.l  gb_ActiView(a6),oldView(a5)
...
    lea _custom,a6          ; A6 = $dff000 throughout
    move.w  DMACONR(a6),oldDMACON(a5)   ; store system DMACON $dff002

It would be great if systemVBR(a5), oldView(a5) and oldDMACON(a5) could be added to the Watch window. Is this possible?

My current workaround is to view vars as hex and manually work out offset to read the value. Should something like A5+oldDMACON work? I hope I am missing something.

Many thanks