-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Following on from the forceaddr off issue, I had a problem with as65 not assembling and that's why I was attempting workarounds with forceaddr:
A bit of research shows that the 6809-style >z009d isn't used for 6502 assembly. Here are some assembler manual links that describe how they deal with absolute and zeropage addressing.
This in the best description: ACME Assembler
This is also good: KickAssembler
And this one: DASM (PDF page 61/62, manual page 52/53)
And one more that shows it in action:

Generally it seems, there are two ways of managing absolute/zero page addressing:
- The old way where the assembler decides by the number of characters in the number, $nn = zero page, $nnnn = absolute.
- The modern way where you append a
.zor.ato thelda.
It seems to me that all the assemblers I looked at recognize 1. and newer assemblers recognize 1. & 2. There appear to be other forcing parameters also that some assemblers recognize, but I'm not sure they're really necessary, Kick Assembler has specifically deprecated them all, apart from .z/.a.
The as65 assembler specifically complains about the jsr >z009d, probably because jsr is always uses a 16 bit address. I get four jsr errors in my listing, but there are many other instructions with this address mode e.g. asl >m0000 that do not throw an error. It would appear '>' is valid for addresses, but, from what I can tell, it's for manipulating the address data at assemble time, not selecting address mode. I still have a lot of non-matching code between the original binary and the dissassembled/reassembled binary, so I will look into this a bit more and report back.
