2012-05-30 01:23:28 +00:00
|
|
|
; Test file for 65C02 extended opcode compliance
|
|
|
|
; This odd little source file uses every addressing mode
|
|
|
|
; of every opcode, and uses the opcode itself as the argument
|
|
|
|
; to each instruction that takes one. The resulting binary's
|
|
|
|
; bytes are thus in strictly increasing numerical order.
|
|
|
|
|
|
|
|
; Some opcodes have multiple mnemonics; we provide both.
|
|
|
|
|
|
|
|
; This file also doesn't include the 65C02's opcodes that
|
|
|
|
; are also available in stock 6502s - see testbase.oph for
|
|
|
|
; those.
|
|
|
|
TSB $04 ; 04: TSB - Zero Page
|
|
|
|
RMB0 $07 ; 07: RMB0 - Zero Page
|
|
|
|
TSB $0C0C ; 0C: TSB - Absolute
|
2013-01-28 01:09:56 +00:00
|
|
|
BBR0 $0F, ^+$12 ; 0F: BBR0 - Zero Page, Relative
|
2012-05-30 01:23:28 +00:00
|
|
|
ORA ($12) ; 12: ORA - (Zero Page)
|
|
|
|
TRB $14 ; 14: TRB - Zero Page
|
|
|
|
RMB1 $17 ; 17: RMB1 - Zero Page
|
|
|
|
INA ; 1A: INA - Implied
|
|
|
|
INC ; INC - Implied
|
|
|
|
TRB $1C1C ; 1C: TRB - Absolute
|
2013-01-28 01:09:56 +00:00
|
|
|
BBR1 $1F, ^+$22 ; 1F: BBR1 - Zero Page, Relative
|
2012-05-30 01:23:28 +00:00
|
|
|
RMB2 $27 ; 27: RMB2 - Zero Page
|
2013-01-28 01:09:56 +00:00
|
|
|
BBR2 $2F, ^+$32 ; 2F: BBR2 - Zero Page, Relative
|
2012-05-30 01:23:28 +00:00
|
|
|
AND ($32) ; 32: AND - (Zero Page)
|
|
|
|
BIT $34, X ; 34: BIT - Zero Page, X
|
|
|
|
RMB3 $37 ; 37: RMB3 - Zero Page
|
2012-06-01 17:25:48 +00:00
|
|
|
DEA ; 3A: DEA - Implied
|
2012-05-30 01:23:28 +00:00
|
|
|
DEC ; 3A: DEC - Implied
|
|
|
|
BIT $3C3C,X ; 3C: BIT - Absolute, X
|
2013-01-28 01:09:56 +00:00
|
|
|
BBR3 $3F, ^+$42 ; 3F: BBR3 - Zero Page, Relative
|
2012-05-30 01:23:28 +00:00
|
|
|
RMB4 $47 ; 47: RMB4 - Zero Page
|
2013-01-28 01:09:56 +00:00
|
|
|
BBR4 $4F, ^+$52 ; 4F: BBR4 - Zero Page, Relative
|
2012-05-30 01:23:28 +00:00
|
|
|
EOR ($52) ; 52: EOR - (Zero Page)
|
|
|
|
RMB5 $57 ; 57: RMB5 - Zero Page
|
|
|
|
PHY ; 5A: PHY - Implied
|
2013-01-28 01:09:56 +00:00
|
|
|
BBR5 $5F, ^+$62 ; 5F: BBR5 - Zero Page, Relative
|
2012-05-30 01:23:28 +00:00
|
|
|
STZ $64 ; 64: STZ - Zero Page
|
|
|
|
RMB6 $67 ; 67: RMB6 - Zero Page
|
2013-01-28 01:09:56 +00:00
|
|
|
BBR6 $6F, ^+$72 ; 6F: BBR6 - Zero Page, Relative
|
2012-05-30 01:23:28 +00:00
|
|
|
ADC ($72) ; 72: ADC - (Zero Page)
|
|
|
|
STZ $74, X ; 74: STZ - Zero Page, X
|
|
|
|
RMB7 $77 ; 77: RMB7 - Zero Page
|
|
|
|
PLY ; 7A: PLY - Implied
|
|
|
|
JMP ($7C7C, X) ; 7C: JMP - (Absolute, X)
|
2013-01-28 01:09:56 +00:00
|
|
|
BBR7 $7F, ^+$82 ; 7F: BBR7 - Zero Page, Relative
|
2012-05-30 01:23:28 +00:00
|
|
|
BRA ^-$7E ; 80: BRA - Relative
|
|
|
|
SMB0 $87 ; 87: SMB0 - Zero Page
|
|
|
|
BIT #$89 ; 89: BIT - Immediate
|
2013-01-28 01:09:56 +00:00
|
|
|
BBS0 $8F, ^-$6E ; 8F: BBS0 - Zero Page, Relative
|
2012-05-30 01:23:28 +00:00
|
|
|
STA ($92) ; 92: STA - (Zero Page)
|
|
|
|
SMB1 $97 ; 97: SMB1 - Zero Page
|
|
|
|
STZ $9C9C ; 9C: STZ - Absolute
|
|
|
|
STZ $9E9E, X ; 9E: STZ - Absolute, X
|
2013-01-28 01:09:56 +00:00
|
|
|
BBS1 $9F, ^-$5E ; 9F: BBS1 - Zero Page, Relative
|
2012-05-30 01:23:28 +00:00
|
|
|
SMB2 $A7 ; A7: SMB2 - Zero Page
|
2013-01-28 01:09:56 +00:00
|
|
|
BBS2 $AF, ^-$4E ; AF: BBS2 - Zero Page, Relative
|
2012-05-30 01:23:28 +00:00
|
|
|
LDA ($B2) ; B2: LDA - (Zero Page)
|
|
|
|
SMB3 $B7 ; B7: SMB3 - Zero Page
|
2013-01-28 01:09:56 +00:00
|
|
|
BBS3 $BF, ^-$3E ; BF: BBS3 - Zero Page, Relative
|
2012-05-30 01:23:28 +00:00
|
|
|
SMB4 $C7 ; C7: SMB4 - Zero Page
|
|
|
|
WAI ; CB: WAI - Implied
|
2013-01-28 01:09:56 +00:00
|
|
|
BBS4 $CF, ^-$2E ; CF: BBS4 - Zero Page, Relative
|
2012-05-30 01:23:28 +00:00
|
|
|
CMP ($D2) ; D2: CMP - (Zero Page)
|
|
|
|
SMB5 $D7 ; D7: SMB5 - Zero Page
|
|
|
|
PHX ; DA: PHX - Implied
|
|
|
|
STP ; DB: STP - Implied
|
2013-01-28 01:09:56 +00:00
|
|
|
BBS5 $DF, ^-$1E ; DF: BBS5 - Zero Page, Relative
|
2012-05-30 01:23:28 +00:00
|
|
|
SMB6 $E7 ; E7: SMB6 - Zero Page
|
2013-01-28 01:09:56 +00:00
|
|
|
BBS6 $EF, ^-$0E ; EF: BBS6 - Zero Page, Relative
|
2012-05-30 01:23:28 +00:00
|
|
|
SBC ($F2) ; F2: SBC - (Zero Page)
|
|
|
|
SMB7 $F7 ; F7: SMB7 - Zero Page
|
|
|
|
PLX ; FA: PLX - Implied
|
2013-01-28 01:09:56 +00:00
|
|
|
BBS7 $FF, ^+$02 ; FF: BBS7 - Zero Page, Relative
|