Re: Functional Test for the NMOS 6502 - request for verifica
Posted: Thu Dec 03, 2020 10:36 am
Well done!
The 6502 Microprocessor Resource
http://forum.6502.org/
Code: Select all
stx 0x88Code: Select all
if (cpu.a<operand) setflag(NEGATIVE); else clearflag(NEGATIVE);Code: Select all
if ((cpu.a-operand)&(1UL << 7)) setflag(NEGATIVE); else clearflag(NEGATIVE);Code: Select all
f47e: 0a COLOR_SHIFT asl A ;rotate low-order 7 bits
f47f: c9 c0 cmp #$c0 ; of HGR_BITS one bit posn
f481: 10 06 bpl LF489
f483: a5 1c lda HGR_BITS
f485: 49 7f eor #$7f
f487: 85 1c sta HGR_BITS
f489: 60 LF489 rts
Code: Select all
;partial test BNE & CMP, CPX, CPY immediate
cpy #1 ;testing BNE true
bne test_bne
trap
test_bne
lda #0
cmp #0 ;test compare immediate
trap_ne
trap_cc
trap_mi
cmp #1
trap_eq
trap_cs
trap_pl
Code: Select all
cmp #$C0
trap_eq
trap_cs
trap_mi