CPY $0006 gets assembled as $C4 $C6 rather than $CC $C6$ C00
An assembler for the legendary 6502 processor and it's derivatives
Brought to you by:
soci
An instruction such as:
CPY $0006
gets assembled as:
C4C6
rather than
CCC600
I'm aiming for a byte-for-byte identical build from a disassembled binary so this is a bug for me. Is there any way of getting around it (other than .BYTE $CC $C6 $00)?
For simple numeric arguments leading zeros do not influence the addressing mode used. Instead it depends on the numerical value which with the current settings results in a zero page addressing mode.
You have two choices to use absolute (data bank) addressing:
The third is using an unspecified direct page so that this address does not fall into its range but that's not applicable for this simple case.
Perfect! Thanks very much for that!