4 ms·
There is a typo in the chapter "Important commands that don't exist!". NEG is described as: EOR #255 (XOR/Flip bits) SEC (Clear carry) ADD #1 (add 1)
by jcmeyrignac 7y ago
There is a typo in the chapter "Important commands that don't exist!".
NEG is described as:
EOR #255 (XOR/Flip bits)
SEC (Clear carry)
ADD #1 (add 1)
Of course, it's:
EOR #255 (XOR/Flip bits)
CLC (Clear carry)
ADC #1 (add 1 with carry 0)
or:
EOR #255 (XOR/Flip bits)
SEC (Set carry)
ADC #0 (add 0 with carry 1)
- jcmeyrignac 7y agoAnother one: DEC (dec de) INC z_E BNE IncDE_Done INC z_D IncDE_Done: Should be: LDA z_E BNE DecDE DEC z_D DecDe: DEC z_E
- jdswain 7y agoThere is an INC A instruction on the 65C02 and 65816, so this is better if you have anything newer than the NMOS 6502: EOR #255 ; Invert INC A ; Add 1 It looks like the Lynx has a 65SC02 which is a 65C02 without the bit manipulation instructions, so it should have the INC A instruction.