On Sonntag 25 Oktober 2009, Ullrich von Bassewitz wrote: > Hi! > > On Sat, Oct 24, 2009 at 11:22:25PM +0200, Groepaz wrote: > > ok well then.... its probably a bug in the assembler =) > > No, it's not a bug, it's a feature :-) see my other mail :) > .proc starts a scope, so the symbols within .proc/.endproc are local to the > new scope. Using explicit scope specification with :: does not handle > forward references, because scopes are different from symbols (see > http://www.cc65.org/doc/ca65-7.html#ss7.4). > > The solution is probably simple: Don't use scopes. The names of your > symbols seem to be choosen to be distinct anyway, so there's no real need > to enclose each one in it's own scope. Your example without scopes: thats not an option. it's compiler generated code, which uses scopes, and i cant do anything about it. i could remove them from the patterns that i generate myself, but that doesnt really change anything (and removing them would sometimes break other stuff). i must be able to "export" a symbol from within a scope to global namespace, so i can make forward references to it. (using the scopes has other benefits too, which i dont want to miss - like beeing able to determine which parts of the code belong together and can be moved around as one entity, there is no other way to do this.) the only way i can do it right now is to use distinct prefixes for the offending symbols too, and then create "prototypes" using .export for them - but thats very ugly, and i really want to avoid it. so i still say whats needed is a pseudoop that works just like export, but doesnt actually mark the symbol as exported. shouldnt be hard to add at all :) -- http://www.hitmen-console.org http://magicdisk.untergrund.net http://www.pokefinder.org http://ftp.pokefinder.org Irren ist menschlich. Aber wer richtigen Mist bauen will, braucht einen Computer. ---------------------------------------------------------------------- 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 Oct 25 23:20:13 2009
This archive was generated by hypermail 2.1.8 : 2009-10-25 23:20:16 CET