[stella] About Stella's debugger asm

seagtgruff at aol.com seagtgruff at aol.com
Sun May 4 18:34:39 CDT 2008


I've seen some programmers use "#" in their equates to denote that they're defining a constant, as follows:

One = #1 ; or One = #$01

versus the definition of an address:

Read_Address_$01 = $01
Write_Address_$01 = $01

So if you're disassembling some code that is writing to address $01, use Write_Address_$01. If the code is reading from address $01, use Read_Address_$01. Or, if it is referring to the immediate value #$01, use #One.

Michael


-----Original Message-----
From: Stephen Anthony <sa666666 at gmail.com>
To: Atari 2600 programming list <stella at atari2600.org>
Sent: Sun, 4 May 2008 1:42 pm
Subject: Re: [stella] About Stella's debugger asm



On May 1, 2008 12:17:45 pm Rastignac wrote:
>       Hi !
>
>   How to deal with the differences between my asm code and stella's
> disasm code ? Is there a way or something ?
>
>   If my code contains:
> sta WSYNC
> stx PF2
> stx PF0
> stx PF1
>
>   Stella's debugger says:
> STA CXPOFB
> STX MusicNtscDuration
> STX INPT5
> STX PF1

Just an update with my progress so far.  I've partially fixed this, but 
it's still not perfect in every case.  I see two possible issues (as 
suggested by Manuel):

1)  Certain addresses have different labels depending on read or write 
context.  I've added code that determines if an opcode is reading from 
or writing to its address, and have associated lists of read and write 
labels.  So that will take care of the 'WSYNC' vs. 'CXPOFB' and 'PF0' 
vs. 'INPT5' issue.

2)  For the 'PF2' vs. 'MusicNtscDuration', Stella now looks for system 
equates before user equates.  This solves the problem here, but in a 
non-optimal way.  What's really needed is more context to determine 
which one should be used.

So, #2 is still a WIP.

Steve

_______________________________________________
Stella mailing list
Stella at atari2600.org
http://atari2600.org/mailman/listinfo/stella

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://atari2600.org/pipermail/stella/attachments/20080504/bb7b1239/attachment.html 


More information about the Stella mailing list