Skip to main content
2 of 6
added 866 characters in body
Raffzahn
  • 249.4k
  • 23
  • 722
  • 1k

Just from memory the cases mentioned:

So far as I can see, the 6809 lacks instructions that the 6800 has, such as aba, eorb

ABA becomes PSHS B; ADDA ,S+ - a nifty use of the autoincrement feature :)

EORB is still the same on a '09.

the transfer instructions (tba, tap and the like).

The 6809 uses a unified instruction, 'TFR' so

`TBA` becomes `TFR B,A` (1F 98) `TAP` becomes `TFR A,CC` (1F 8A) 

and so on. Here's a full table taken from a Motorola manual:

6800 6809 Replacement ABA PSHS B; ADDA ,S + CBA PSHS B; CMPA ,S + CLC ANDCC #$FE CLI ANDCC #$EF CLV ANDCC #$FD CPX CMPX P DES LEAS -1,5 DEX LEAX -1 ,X INS LEAS 1.-S INX LEAX 1.X LDAA LDA LDAB LDB ORAA ORA ORAB ORB PSHA PSHS A PSHB PSHS B PULA PULS A PULB PULS B SBA PSHS B; SUBA ,S+ SEC ORCC #$01 SEI ORCC #$10 SEV ORCC #$02 STAA STA STAB STB TAB TFR A,B; TST A TAP TFR A,CC TBA TFR B,A; TST A TPA TFR CC,A TSX TFR S,X TXS TFR X,S WAI CWAI #$FF 

(hope I didn't add any typo or screw replacements)

Raffzahn
  • 249.4k
  • 23
  • 722
  • 1k