Implement op -0xbf

This commit is contained in:
Takashi Toyoshima 2014-12-07 01:50:39 +09:00
parent f694a16d58
commit 4f71331f06

88
6502.S
View File

@ -567,6 +567,11 @@ opa3:
opa7: opa7:
opab: opab:
opaf: opaf:
opb2:
opb3:
opb7:
opbb:
opbf:
_nop _nop
_decode _decode
@ -1125,39 +1130,62 @@ opae: // LDX - Absolute
_ld RX _ld RX
_decode _decode
opb0: opb0: // BCS (C==1)
b quit movs r0, #FLAG_C
opb1: tst SR, r0
b quit beq 1f
opb2: _bxx
b quit 1:
opb3: _decode
b quit
opb4: opb1: // LDA - (Indirect), Y
b quit _fromIndirectIndex
opb5: _ld RA
b quit _decode
opb6:
b quit opb4: // LDY - Zero Page, X
opb7: _fromZeroIndex RX
b quit _ld RY
_decode
opb5: // LDA - Zero Page, X
_fromZeroIndex RX
_ld RA
_decode
opb6: // LDX - Zero Page, Y
_fromZeroIndex RY
_ld RX
_decode
opb8: // CLV opb8: // CLV
_clx FLAG_V _clx FLAG_V
_decode _decode
opb9:
b quit opb9: // LDA - Absolute, Y
opba: _fromAbsoluteIndexed RY
b quit _ld RA
opbb: _decode
b quit
opbc: opba: // TSX
b quit _t SR, RX
opbd: _decode
b quit
opbe: opbc: // LDY - Absolute, X
b quit _fromAbsoluteIndexed RX
opbf: _ld RY
b quit _decode
opbd: // LDA - Absolute, X
_fromAbsoluteIndexed RX
_ld RA
_decode
opbe: // LDX - Absolute, Y
_fromAbsoluteIndexed RY
_ld RX
_decode
opc0: opc0:
b quit b quit
opc1: opc1: