MESSEN Debugging - Comments don't line up - CC65

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
User avatar
Posts: 190
Joined: Wed Dec 11, 2019 9:38 pm

MESSEN Debugging - Comments don't line up - CC65

Post by Goose2k » Mon Jul 13, 2020 4:20 pm

I am trying to get debugging in Messen working for the first time, and there seems to be some issue with source comments not lining up with the code.

Here's a small example:

As appears in C code:
As appears in generated .s file:
debug_asm.png (11.05 KiB) Viewed 4647 times
As appears in Messen debugger (I've highlighted a few issues):
And here is the batch file I use to generate all the files:

Code: Select all

@echo off

set name="main"

set path=%path%;..\bin\

set CC65_HOME=..\

MUSIC\text2data.exe MUSIC\songs.txt -ca65
MUSIC\nsf2data.exe MUSIC\sounds.nsf -ca65

cc65 -g -Oirs %name%.c --add-source
ca65 crt0.s
ca65 %name%.s -g

ld65 -C nrom_32k_vert.cfg --dbgfile %name%.dbg -o %name%.nes crt0.o %name%.o nes.lib -Ln labels.txt

del *.o

move /Y %name%.dbg BUILD\ 
move /Y labels.txt BUILD\ 
move /Y %name%.s BUILD\ 
move /Y %name%.nes BUILD\ 

I'm kind of fumbling my way through all this, so there may be something silly in there. :D

I've attached all the generate files in a zip, and the full source code can be found here on github:
(196.45 KiB) Downloaded 67 times

Post Reply