mirror of
https://github.com/michaelcmartin/Ophis.git
synced 2024-11-08 07:04:39 +00:00
dcc37f5751
Fix numerous bugs revealed through tests, some more remain.
107 lines
4.1 KiB
Plaintext
107 lines
4.1 KiB
Plaintext
; Test file for 4502 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 4502's opcodes that
|
|
; are also available in stock 6502s - see testbase.oph for
|
|
; those. However, it does include those extensions share
|
|
; with the 65C02.
|
|
CLE ; 02: CLE - Implied
|
|
SEE ; 03: SEE - Implied
|
|
TSB $04 ; 04: TSB - Zero Page
|
|
RMB0 $07 ; 07: RMB0 - Zero Page
|
|
TSY ; 0B: TSY - Implied
|
|
TSB $0C0C ; 0C: TSB - Absolute
|
|
BBR0 $0F, ^+$12 ; 0F: BBR0 - Zero Page, Relative
|
|
ORA ($12), Z ; 12: ORA - (Zero Page), Z
|
|
TRB $14 ; 14: TRB - Zero Page
|
|
RMB1 $17 ; 17: RMB1 - Zero Page
|
|
INC ; 1A: INC - Implied
|
|
INZ ; 1B: INZ - Implied
|
|
TRB $1C1C ; 1C: TRB - Absolute
|
|
BBR1 $1F, ^+$22 ; 1F: BBR1 - Zero Page, Relative
|
|
JSR ($2222) ; 22: JSR - (Absolute)
|
|
JSR ($2323,X) ; 23: JSR - (Absolute, X)
|
|
RMB2 $27 ; 27: RMB2 - Zero Page
|
|
TYS ; 2B: TYS - Implied
|
|
BBR2 $2F, ^+$32 ; 2F: BBR2 - Zero Page, Relative
|
|
AND ($32), Z ; 32: AND - (Zero Page), Z
|
|
BIT $34, X ; 34: BIT - Zero Page, X
|
|
RMB3 $37 ; 37: RMB3 - Zero Page
|
|
DEA ; 3A: DEA - Implied
|
|
DEC ; 3A: DEC - Implied
|
|
DEZ ; 3B: DEZ - Implied
|
|
BIT $3C3C,X ; 3C: BIT - Absolute, X
|
|
BBR3 $3F, ^+$42 ; 3F: BBR3 - Zero Page, Relative
|
|
NEG ; 42: NEG - Implied
|
|
ASR ; 43: ASR - Implied
|
|
RMB4 $47 ; 47: RMB4 - Zero Page
|
|
TAZ ; 4B: TAZ - Implied
|
|
BBR4 $4F, ^+$52 ; 4F: BBR4 - Zero Page, Relative
|
|
EOR ($52),Z ; 52: EOR - (Zero Page), Z
|
|
RMB5 $57 ; 57: RMB5 - Zero Page
|
|
PHY ; 5A: PHY - Implied
|
|
TAB ; 5B: TAB - Implied
|
|
MAP ; 5C: MAP - Implied
|
|
BBR5 $5F, ^+$62 ; 5F: BBR5 - Zero Page, Relative
|
|
RTS #$62 ; 62: RTS - Immediate
|
|
STZ $64 ; 64: STZ - Zero Page
|
|
RMB6 $67 ; 67: RMB6 - Zero Page
|
|
TZA ; 6B: TZA - Implied
|
|
JMP ($6C6C) ; 6C: JMP - (Absolute)
|
|
BBR6 $6F, ^+$72 ; 6F: BBR6 - Zero Page, Relative
|
|
ADC ($72), Z ; 72: ADC - (Zero Page), Z
|
|
STZ $74, X ; 74: STZ - Zero Page, X
|
|
RMB7 $77 ; 77: RMB7 - Zero Page
|
|
PLY ; 7A: PLY - Implied
|
|
TBA ; 7B: TBA - Implied
|
|
JMP ($7C7C, X) ; 7C: JMP - (Absolute, X)
|
|
BBR7 $7F, ^+$82 ; 7F: BBR7 - Zero Page, Relative
|
|
BRA ^-$7E ; 80: BRA - Relative
|
|
SMB0 $87 ; 87: SMB0 - Zero Page
|
|
BIT #$89 ; 89: BIT - Immediate
|
|
STY $8B8B,X ; 8B: STY - Absolute, X
|
|
BBS0 $8F, ^-$6E ; 8F: BBS0 - Zero Page, Relative
|
|
STA ($92),Z ; 92: STA - (Zero Page), Z
|
|
SMB1 $97 ; 97: SMB1 - Zero Page
|
|
STX $9B9B,Y ; 9B: STX - Absolute, Y
|
|
STZ $9C9C ; 9C: STZ - Absolute
|
|
STZ $9E9E, X ; 9E: STZ - Absolute, X
|
|
BBS1 $9F, ^-$5E ; 9F: BBS1 - Zero Page, Relative
|
|
LDZ #$A3 ; A3: LDZ - Immediate
|
|
SMB2 $A7 ; A7: SMB2 - Zero Page
|
|
LDZ $ABAB ; AB: LDZ - Absolute
|
|
BBS2 $AF, ^-$4E ; AF: BBS2 - Zero Page, Relative
|
|
LDA ($B2),Z ; B2: LDA - (Zero Page), Z
|
|
SMB3 $B7 ; B7: SMB3 - Zero Page
|
|
LDZ $BBBB,X ; BB: LDZ - Absolute, X
|
|
LDY $BCBC,X ; BC: LDY - Absolute, X
|
|
BBS3 $BF, ^-$3E ; BF: BBS3 - Zero Page, Relative
|
|
CPZ #$C2 ; C2: CPZ - Immediate
|
|
DEW $C3C3 ; C3: DEW - Absolute
|
|
SMB4 $C7 ; C7: SMB4 - Zero Page
|
|
ASW $CBCB ; CB: ASW - Absolute
|
|
BBS4 $CF, ^-$2E ; CF: BBS4 - Zero Page, Relative
|
|
CMP ($D2),Z ; D2: CMP - (Zero Page), Z
|
|
SMB5 $D7 ; D7: SMB5 - Zero Page
|
|
PHX ; DA: PHX - Implied
|
|
PHZ ; DB: PHZ - Implied
|
|
BBS5 $DF, ^-$1E ; DF: BBS5 - Zero Page, Relative
|
|
LDA ($E2,SP),Y ; E2: LDA - (Zero Page, SP), Y
|
|
INW $E3E3 ; E3: INW - Absolute
|
|
PHW #$E4E4 ; E4: PHW - ImmediateLong
|
|
SMB6 $E7 ; E7: SMB6 - Zero Page
|
|
EOM ; EA: EOM - Implied
|
|
ROW $EBEB ; EB: ROW - Absolute
|
|
BBS6 $EF, ^-$0E ; EF: BBS6 - Zero Page, Relative
|
|
SBC ($F2), Z ; F2: SBC - (Zero Page), Z
|
|
SMB7 $F7 ; F7: SMB7 - Zero Page
|
|
PLX ; FA: PLX - Implied
|
|
PLZ ; FB: PLZ - Implied
|
|
PHW $FCFC ; FC: PHW - Absolute
|
|
BBS7 $FF, ^+$02 ; FF: BBS7 - Zero Page, Relative
|