No EQU Variable Substitution Data In List file / Label file. Advice? (ASM6F)
Posted: Wed Jul 01, 2020 2:42 am
Hey guys, i'm running into a slightly annoying issue, and i wonder if anyone here has a good solution for it.
I am using EQU string substitutions as static constant variables, which is great because they are substituted in atcompile assemble time, take up no extra ROM space and load in immediate mode. The issue is, neither the List file nor the Mesen Label .mlb file generate any notation about this.
Which looks like this in the source code:
And looks like so in the List file:
As you can see, it simply puts #$0F in there with no mention of X_MAP_SIZE anywhere. The .mlb label file is the same. The EQU string substitution works as advertised i guess, heh... I also tried putting a comment after the EQU, but ASM6F didn't substitute that in. I can't assign a label to it, as far as i know, as it doesn't technically "exist" and is just an immediate #$0F in the ROM wherever it lands after being assembled... Can i do that somehow? Anyway, i wish there was a way to simply read what the string substitution "variable" was when stepping through the debugger. I mean i could just put a comment with the variable name after every time i use an EQU variable; but that would be very messy and all but defeat the point of using EQU in the first place...
Anyway, Is there a better / different way to substitute in static variables or a different compiler i could try that handles this better? I really like ASM6F and this is a really nitpicky thing, but i was wondering if anyone has dealt with this before and has a good solution. Thanks!
I am using EQU string substitutions as static constant variables, which is great because they are substituted in at
Code: Select all
; Constant Variables
X_MAP_SIZE EQU #$0F
Y_MAP_SIZE EQU #$0F
Code: Select all
BPL nameTableSwitchR ; Check map size bounds
LDA X_MAP_SIZE
STA xMap
Code: Select all
083C9 10 04 BPL nameTableSwitchR ; Check map size bounds
083CB A9 0F LDA #$0F
083CD 85 A0 STA xMap
Anyway, Is there a better / different way to substitute in static variables or a different compiler i could try that handles this better? I really like ASM6F and this is a really nitpicky thing, but i was wondering if anyone has dealt with this before and has a good solution. Thanks!