On Sun, Aug 21, 2011 at 7:38 PM, Ullrich von Bassewitz <uz@musoftware.de> wrote: > Ok, after some digging around, I see what you mean. This is an error in the > way, the macro nesting counter works. I've fixed it, thanks a lot! Thanks for fixing it, works great! I found another bug, it's somewhat related to recursive macros. I reduced it down to this: test2.s: .byte 0 .macro foo b .if b < 0 .exitmac .endif .byte 1 foo b-1 .endmacro foo 1 The memory config is the same as in the previous message, as is the command line for compiling. The binary produced by this is of course 00 01 01. Here's the produced debug file: version major=2,minor=0 info file=1,lib=0,mod=1,scope=1,seg=6,span=7 mod id=0,name="test2.o",file=0 seg id=0,name="CODE",start=0x008000,size=0x0003,addrsize=absolute,type=ro,oname="test2.bin",ooffs=0 seg id=1,name="RODATA",start=0x000000,size=0x0000,addrsize=absolute,type=rw seg id=2,name="BSS",start=0x000000,size=0x0000,addrsize=absolute,type=rw seg id=3,name="DATA",start=0x000000,size=0x0000,addrsize=absolute,type=rw seg id=4,name="ZEROPAGE",start=0x000000,size=0x0000,addrsize=zeropage,type=rw seg id=5,name="NULL",start=0x000000,size=0x0000,addrsize=absolute,type=rw file id=0,name="test2.s",size=103,mtime=0x4E515DA6,mod=0 line id=0,file=0,line=6,type=2,count=2,span=0 line id=1,file=0,line=7,type=2,count=2,span=1+2 line id=2,file=0,line=3,type=2,count=2 line id=3,file=0,line=1,span=3 line id=4,file=0,line=9,span=4 line id=5,file=0,line=7,type=2,count=3 line id=6,file=0,line=3,type=2,count=1 line id=7,file=0,line=3,type=2,count=3 line id=8,file=0,line=6,type=2,count=1,span=5 span id=0,seg=0,start=2,size=1 span id=1,seg=0,start=2,size=1 span id=2,seg=0,start=0,size=3 span id=3,seg=0,start=0,size=1 span id=4,seg=0,start=1,size=2 span id=5,seg=0,start=1,size=1 span id=6,seg=0,start=0,size=3 scope id=0,name="",mod=0,size=3,span=6 Take a look at line id=1 (the line with the recursive macro invocation). It references two spans, 1 and 2. Span 1 is fine, but span 2 covers the whole area 0..2, so if I try to get line infos for address 0, line 7 will erroneously show up. Like said, this has something to do with the macro being recursive. I noticed it happening with two different recursive macros in my project. -thefox ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Sun Aug 21 21:47:44 2011
This archive was generated by hypermail 2.1.8 : 2011-08-21 21:47:46 CEST