x816 does nameless labels with + and - as label names, then jumps to them with "BNE +" or "BNE -". Example:
ca65 uses : for all nameless lables, and jumps to them with "BNE :+" or "BNE :-". Example (would assemble to same as above, but ca65 style):
ca65's system just makes so much more sense to me personally... yet I seem to see x816's style more often. Which method is generally more preferred by the users here?
I ask because with the recent heat surrounding nesasm and my own boredom I've started looking into making a little assembler of my own. Since the above styles' syntax are not mutually exclusive, I've considered having both of them in the assembler, which I think would be ideal. But I'm still not 100% sure how x816 style works.
can a "BNE +" jump to a "++" label? I mean like....
would that BNE jump to the DEC or the INC? If the DEC, then why do you need the double ++? And if the INC, then why bother with nameless labels when they're not really nameless (in a sense, the number of +'s becomes the name)?
It just confuses me. But I know a lot of people prefer it.
Code:
- NOP
LDA somewhere
BEQ +
DEC something
BNE -
+ RTS
LDA somewhere
BEQ +
DEC something
BNE -
+ RTS
ca65 uses : for all nameless lables, and jumps to them with "BNE :+" or "BNE :-". Example (would assemble to same as above, but ca65 style):
Code:
: NOP
LDA somewhere
BEQ :+
DEC something
BNE :-
: RTS
LDA somewhere
BEQ :+
DEC something
BNE :-
: RTS
ca65's system just makes so much more sense to me personally... yet I seem to see x816's style more often. Which method is generally more preferred by the users here?
I ask because with the recent heat surrounding nesasm and my own boredom I've started looking into making a little assembler of my own. Since the above styles' syntax are not mutually exclusive, I've considered having both of them in the assembler, which I think would be ideal. But I'm still not 100% sure how x816 style works.
can a "BNE +" jump to a "++" label? I mean like....
Code:
LDA blah
BNE +
JSR routine
++ DEC somewhere
+ INC somewhereelse
RTS
BNE +
JSR routine
++ DEC somewhere
+ INC somewhereelse
RTS
would that BNE jump to the DEC or the INC? If the DEC, then why do you need the double ++? And if the INC, then why bother with nameless labels when they're not really nameless (in a sense, the number of +'s becomes the name)?
It just confuses me. But I know a lot of people prefer it.