BizHawk/ExternalProjects/vrEmu6502/test/programs/65C02_extended_opcodes_test...

11783 lines
587 KiB
Plaintext

AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 1
------------------------------------------------ 65C02_extended_opcodes_test.a65c ------------------------------------------------
2883 lines read, no errors in pass 1.
;
; 6 5 C 0 2 E X T E N D E D O P C O D E S T E S T
;
; Copyright (C) 2013-2017 Klaus Dormann
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
; This program is designed to test all additional 65C02 opcodes, addressing
; modes and functionality not available in the NMOS version of the 6502.
; The 6502_functional_test is a prerequisite to this test.
; NMI, IRQ, STP & WAI are covered in the 6502_interrupt_test.
;
; version 04-dec-2017
; contact info at http://2m5.de or email K@2m5.de
;
; assembled with AS65 from http://www.kingswood-consulting.co.uk/assemblers/
; command line switches: -l -m -s2 -w -x -h0
; | | | | | no page headers in listing
; | | | | 65C02 extensions
; | | | wide listing (133 char/col)
; | | write intel hex file instead of binary
; | expand macros in listing
; generate pass2 listing
;
; No IO - should be run from a monitor with access to registers.
; To run load intel hex image with a load command, than alter PC to 400 hex
; (code_segment) and enter a go command.
; Loop on program counter determines error or successful completion of test.
; Check listing for relevant traps (jump/branch *).
; Please note that in early tests some instructions will have to be used before
; they are actually tested!
;
; RESET, NMI or IRQ should not occur and will be trapped if vectors are enabled.
; Tests documented behavior of the original 65C02 only!
; Decimal ops will only be tested with valid BCD operands and the V flag will
; be ignored as it is absolutely useless in decimal mode.
;
; Debugging hints:
; Most of the code is written sequentially. if you hit a trap, check the
; immediately preceeding code for the instruction to be tested. Results are
; tested first, flags are checked second by pushing them onto the stack and
; pulling them to the accumulator after the result was checked. The "real"
; flags are no longer valid for the tested instruction at this time!
; If the tested instruction was indexed, the relevant index (X or Y) must
; also be checked. Opposed to the flags, X and Y registers are still valid.
;
; versions:
; 19-jul-2013 1st version distributed for testing
; 23-jul-2013 fixed BRA out of range due to larger trap macros
; added RAM integrity check
; 16-aug-2013 added error report to standard output option
; 23-aug-2015 change revoked
; 24-aug-2015 all self modifying immediate opcodes now execute in data RAM
; 28-aug-2015 fixed decimal adc/sbc immediate only testing carry
; 09-feb-2017 fixed RMB/SMB tested when they shouldn't be tested
; 04-dec-2017 fixed BRK not tested for actually going through the IRQ vector
; added option to skip the remainder of a failing test
; in report.i65
; added skip override to undefined opcode as NOP test
; C O N F I G U R A T I O N
;ROM_vectors writable (0=no, 1=yes)
;if ROM vectors can not be used interrupts will not be trapped
;as a consequence BRK can not be tested but will be emulated to test RTI
0001 = ROM_vectors = 1
;load_data_direct (0=move from code segment, 1=load directly)
;loading directly is preferred but may not be supported by your platform
;0 produces only consecutive object code, 1 is not suitable for a binary image
0001 = load_data_direct = 1
;I_flag behavior (0=force enabled, 1=force disabled, 2=prohibit change, 3=allow
;change) 2 requires extra code and is not recommended.
0003 = I_flag = 3
;configure memory - try to stay away from memory used by the system
;zero_page memory start address, $4e (78) consecutive Bytes required
; add 2 if I_flag = 2
000a = zero_page = $a
;data_segment memory start address, $63 (99) consecutive Bytes required
; + 12 Bytes at data_segment + $f9 (JMP indirect page cross test)
0200 = data_segment = $200
if (data_segment & $ff) != 0
ERROR ERROR ERROR low byte of data_segment MUST be $00 !!
endif
;code_segment memory start address, 10kB of consecutive space required
; add 1 kB if I_flag = 2
0400 = code_segment = $400
;added WDC only opcodes WAI & STP (0=test as NOPs, >0=no test)
0001 = wdc_op = 1
;added Rockwell & WDC opcodes BBR, BBS, RMB & SMB
;(0=test as NOPs, 1=full test, >1=no test)
0000 = rkwl_wdc_op = 0
;skip testing all undefined opcodes override
;0=test as NOP, >0=skip
0000 = skip_nop = 0
;report errors through I/O channel (0=use standard self trap loops, 1=include
;report.i65 as I/O channel, add 3 kB)
0000 = report = 0
;RAM integrity test option. Checks for undesired RAM writes.
;set lowest non RAM or RAM mirror address page (-1=disable, 0=64k, $40=16k)
;leave disabled if a monitor, OS or background interrupt is allowed to alter RAM
ffff = ram_top = -1
noopt ;do not take shortcuts
;macros for error & success traps to allow user modification
;example:
;trap macro
; jsr my_error_handler
; endm
;trap_eq macro
; bne skip\?
; trap ;failed equal (zero)
;skip\?
; endm
;
; my_error_handler should pop the calling address from the stack and report it.
; putting larger portions of code (more than 3 bytes) inside the trap macro
; may lead to branch range problems for some tests.
if report = 0
trap macro
jmp * ;failed anyway
endm
trap_eq macro
beq * ;failed equal (zero)
endm
trap_ne macro
bne * ;failed not equal (non zero)
endm
trap_cs macro
bcs * ;failed carry set
endm
trap_cc macro
bcc * ;failed carry clear
endm
trap_mi macro
bmi * ;failed minus (bit 7 set)
endm
trap_pl macro
bpl * ;failed plus (bit 7 clear)
endm
trap_vs macro
bvs * ;failed overflow set
endm
trap_vc macro
bvc * ;failed overflow clear
endm
; please observe that during the test the stack gets invalidated
; therefore a RTS inside the success macro is not possible
success macro
;db $db
jmp * ;test passed, no errors
endm
endif
if report = 1
trap macro
jsr report_error
endm
trap_eq macro
bne skip\?
trap ;failed equal (zero)
skip\?
endm
trap_ne macro
beq skip\?
trap ;failed not equal (non zero)
skip\?
endm
trap_cs macro
bcc skip\?
trap ;failed carry set
skip\?
endm
trap_cc macro
bcs skip\?
trap ;failed carry clear
skip\?
endm
trap_mi macro
bpl skip\?
trap ;failed minus (bit 7 set)
skip\?
endm
trap_pl macro
bmi skip\?
trap ;failed plus (bit 7 clear)
skip\?
endm
trap_vs macro
bvc skip\?
trap ;failed overflow set
skip\?
endm
trap_vc macro
bvs skip\?
trap ;failed overflow clear
skip\?
endm
; please observe that during the test the stack gets invalidated
; therefore a RTS inside the success macro is not possible
success macro
jsr report_success
endm
endif
0001 = carry equ %00000001 ;flag bits in status
0002 = zero equ %00000010
0004 = intdis equ %00000100
0008 = decmode equ %00001000
0010 = break equ %00010000
0020 = reserv equ %00100000
0040 = overfl equ %01000000
0080 = minus equ %10000000
0001 = fc equ carry
0002 = fz equ zero
0003 = fzc equ carry+zero
0040 = fv equ overfl
0042 = fvz equ overfl+zero
0080 = fn equ minus
0081 = fnc equ minus+carry
0082 = fnz equ minus+zero
0083 = fnzc equ minus+zero+carry
00c0 = fnv equ minus+overfl
0030 = fao equ break+reserv ;bits always on after PHP, BRK
0034 = fai equ fao+intdis ;+ forced interrupt disable
00ff = m8 equ $ff ;8 bit mask
00fb = m8i equ $ff&~intdis ;8 bit mask - interrupt disable
;macros to allow masking of status bits.
;masking of interrupt enable/disable on load and compare
;masking of always on bits after PHP or BRK (unused & break) on compare
if I_flag = 0
load_flag macro
lda #\1&m8i ;force enable interrupts (mask I)
endm
cmp_flag macro
cmp #(\1|fao)&m8i ;I_flag is always enabled + always on bits
endm
eor_flag macro
eor #(\1&m8i|fao) ;mask I, invert expected flags + always on bits
endm
endif
if I_flag = 1
load_flag macro
lda #\1|intdis ;force disable interrupts
endm
cmp_flag macro
cmp #(\1|fai)&m8 ;I_flag is always disabled + always on bits
endm
eor_flag macro
eor #(\1|fai) ;invert expected flags + always on bits + I
endm
endif
if I_flag = 2
load_flag macro
lda #\1
ora flag_I_on ;restore I-flag
and flag_I_off
endm
cmp_flag macro
eor flag_I_on ;I_flag is never changed
cmp #(\1|fao)&m8i ;expected flags + always on bits, mask I
endm
eor_flag macro
eor flag_I_on ;I_flag is never changed
eor #(\1&m8i|fao) ;mask I, invert expected flags + always on bits
endm
endif
if I_flag = 3
load_flag macro
lda #\1 ;allow test to change I-flag (no mask)
endm
cmp_flag macro
cmp #(\1|fao)&m8 ;expected flags + always on bits
endm
eor_flag macro
eor #\1|fao ;invert expected flags + always on bits
endm
endif
;macros to set (register|memory|zeropage) & status
set_stat macro ;setting flags in the processor status register
load_flag \1
pha ;use stack to load status
plp
endm
set_a macro ;precharging accu & status
load_flag \2
pha ;use stack to load status
lda #\1 ;precharge accu
plp
endm
set_x macro ;precharging index & status
load_flag \2
pha ;use stack to load status
ldx #\1 ;precharge index x
plp
endm
set_y macro ;precharging index & status
load_flag \2
pha ;use stack to load status
ldy #\1 ;precharge index y
plp
endm
set_ax macro ;precharging indexed accu & immediate status
load_flag \2
pha ;use stack to load status
lda \1,x ;precharge accu
plp
endm
set_ay macro ;precharging indexed accu & immediate status
load_flag \2
pha ;use stack to load status
lda \1,y ;precharge accu
plp
endm
set_z macro ;precharging indexed zp & immediate status
load_flag \2
pha ;use stack to load status
lda \1,x ;load to zeropage
sta zpt
plp
endm
set_zx macro ;precharging zp,x & immediate status
load_flag \2
pha ;use stack to load status
lda \1,x ;load to indexed zeropage
sta zpt,x
plp
endm
set_abs macro ;precharging indexed memory & immediate status
load_flag \2
pha ;use stack to load status
lda \1,x ;load to memory
sta abst
plp
endm
set_absx macro ;precharging abs,x & immediate status
load_flag \2
pha ;use stack to load status
lda \1,x ;load to indexed memory
sta abst,x
plp
endm
;macros to test (register|memory|zeropage) & status & (mask)
tst_stat macro ;testing flags in the processor status register
php ;save status
pla ;use stack to retrieve status
pha
cmp_flag \1
trap_ne
plp ;restore status
endm
tst_a macro ;testing result in accu & flags
php ;save flags
cmp #\1 ;test result
trap_ne
pla ;load status
pha
cmp_flag \2
trap_ne
plp ;restore status
endm
tst_as macro ;testing result in accu & flags, save accu
pha
php ;save flags
cmp #\1 ;test result
trap_ne
pla ;load status
pha
cmp_flag \2
trap_ne
plp ;restore status
pla
endm
tst_x macro ;testing result in x index & flags
php ;save flags
cpx #\1 ;test result
trap_ne
pla ;load status
pha
cmp_flag \2
trap_ne
plp ;restore status
endm
tst_y macro ;testing result in y index & flags
php ;save flags
cpy #\1 ;test result
trap_ne
pla ;load status
pha
cmp_flag \2
trap_ne
plp ;restore status
endm
tst_ax macro ;indexed testing result in accu & flags
php ;save flags
cmp \1,x ;test result
trap_ne
pla ;load status
eor_flag \3
cmp \2,x ;test flags
trap_ne ;
endm
tst_ay macro ;indexed testing result in accu & flags
php ;save flags
cmp \1,y ;test result
trap_ne ;
pla ;load status
eor_flag \3
cmp \2,y ;test flags
trap_ne
endm
tst_z macro ;indexed testing result in zp & flags
php ;save flags
lda zpt
cmp \1,x ;test result
trap_ne
pla ;load status
eor_flag \3
cmp \2,x ;test flags
trap_ne
endm
tst_zx macro ;testing result in zp,x & flags
php ;save flags
lda zpt,x
cmp \1,x ;test result
trap_ne
pla ;load status
eor_flag \3
cmp \2,x ;test flags
trap_ne
endm
tst_abs macro ;indexed testing result in memory & flags
php ;save flags
lda abst
cmp \1,x ;test result
trap_ne
pla ;load status
eor_flag \3
cmp \2,x ;test flags
trap_ne
endm
tst_absx macro ;testing result in abs,x & flags
php ;save flags
lda abst,x
cmp \1,x ;test result
trap_ne
pla ;load status
eor_flag \3
cmp \2,x ;test flags
trap_ne
endm
; RAM integrity test
; verifies that none of the previous tests has altered RAM outside of the
; designated write areas.
; uses zpt word as indirect pointer, zpt+2 word as checksum
if ram_top > -1
check_ram macro
cld
lda #0
sta zpt ;set low byte of indirect pointer
sta zpt+3 ;checksum high byte
ldx #11 ;reset modifiable RAM
ccs1\? sta jxi_tab,x ;JMP indirect page cross area
dex
bpl ccs1\?
clc
ldx #zp_bss-zero_page ;zeropage - write test area
ccs3\? adc zero_page,x
bcc ccs2\?
inc zpt+3 ;carry to high byte
clc
ccs2\? inx
bne ccs3\?
ldx #hi(abs1) ;set high byte of indirect pointer
stx zpt+1
ldy #lo(abs1) ;data after write & execute test area
ccs5\? adc (zpt),y
bcc ccs4\?
inc zpt+3 ;carry to high byte
clc
ccs4\? iny
bne ccs5\?
inx ;advance RAM high address
stx zpt+1
cpx #ram_top
bne ccs5\?
sta zpt+2 ;checksum low is
cmp ram_chksm ;checksum low expected
trap_ne ;checksum mismatch
lda zpt+3 ;checksum high is
cmp ram_chksm+1 ;checksum high expected
trap_ne ;checksum mismatch
endm
else
check_ram macro
;RAM check disabled - RAM size not set
endm
endif
next_test macro ;make sure, tests don't jump the fence
lda test_case ;previous test
cmp #test_num
trap_ne ;test is out of sequence
test_num = test_num + 1
lda #test_num ;*** next tests' number
sta test_case
;check_ram ;uncomment to find altered RAM after each test
endm
if load_data_direct = 1
data
else
bss ;uninitialized segment, copy of data at end of code!
endif
000a = org zero_page
;break test interrupt save
000a : 00 irq_a ds 1 ;a register
000b : 00 irq_x ds 1 ;x register
if I_flag = 2
;masking for I bit in status
flag_I_on ds 1 ;or mask to load flags
flag_I_off ds 1 ;and mask to load flags
endif
000c : zpt ;5 bytes store/modify test area
;add/subtract operand generation and result/flag prediction
000c : 00 adfc ds 1 ;carry flag before op
000d : 00 ad1 ds 1 ;operand 1 - accumulator
000e : 00 ad2 ds 1 ;operand 2 - memory / immediate
000f : 00 adrl ds 1 ;expected result bits 0-7
0010 : 00 adrh ds 1 ;expected result bit 8 (carry)
0011 : 00 adrf ds 1 ;expected flags NV0000ZC (-V in decimal mode)
0012 : 00 sb2 ds 1 ;operand 2 complemented for subtract
0013 : zp_bss
0013 : c3824100 zp1 db $c3,$82,$41,0 ;test patterns for LDx BIT ROL ROR ASL LSR
0017 : 7f zp7f db $7f ;test pattern for compare
;logical zeropage operands
0018 : 001f7180 zpOR db 0,$1f,$71,$80 ;test pattern for OR
001c : 0fff7f80 zpAN db $0f,$ff,$7f,$80 ;test pattern for AND
0020 : ff0f8f8f zpEO db $ff,$0f,$8f,$8f ;test pattern for EOR
;indirect addressing pointers
0024 : 1002 ind1 dw abs1 ;indirect pointer to pattern in absolute memory
0026 : 1102 dw abs1+1
0028 : 1202 dw abs1+2
002a : 1302 dw abs1+3
002c : 1402 dw abs7f
002e : 1801 inw1 dw abs1-$f8 ;indirect pointer for wrap-test pattern
0030 : 0502 indt dw abst ;indirect pointer to store area in absolute memory
0032 : 0602 dw abst+1
0034 : 0702 dw abst+2
0036 : 0802 dw abst+3
0038 : 0d01 inwt dw abst-$f8 ;indirect pointer for wrap-test store
003a : 4702 indAN dw absAN ;indirect pointer to AND pattern in absolute memory
003c : 4802 dw absAN+1
003e : 4902 dw absAN+2
0040 : 4a02 dw absAN+3
0042 : 4b02 indEO dw absEO ;indirect pointer to EOR pattern in absolute memory
0044 : 4c02 dw absEO+1
0046 : 4d02 dw absEO+2
0048 : 4e02 dw absEO+3
004a : 4302 indOR dw absOR ;indirect pointer to OR pattern in absolute memory
004c : 4402 dw absOR+1
004e : 4502 dw absOR+2
0050 : 4602 dw absOR+3
;add/subtract indirect pointers
0052 : 0502 adi2 dw ada2 ;indirect pointer to operand 2 in absolute memory
0054 : 0602 sbi2 dw sba2 ;indirect pointer to complemented operand 2 (SBC)
0056 : 0601 adiy2 dw ada2-$ff ;with offset for indirect indexed
0058 : 0701 sbiy2 dw sba2-$ff
005a : zp_bss_end
0200 = org data_segment
0200 : 0000 pg_x ds 2 ;high JMP indirect address for page cross bug
0202 : 00 test_case ds 1 ;current test number
0203 : 0000 ram_chksm ds 2 ;checksum for RAM integrity test
;add/subtract operand copy - abs tests write area
0205 : abst ;5 bytes store/modify test area
0205 : 00 ada2 ds 1 ;operand 2
0206 : 00 sba2 ds 1 ;operand 2 complemented for subtract
0207 : 000000 ds 3 ;fill remaining bytes
020a : data_bss
if load_data_direct = 1
020a : 6900 ex_adci adc #0 ;execute immediate opcodes
020c : 60 rts
020d : e900 ex_sbci sbc #0 ;execute immediate opcodes
020f : 60 rts
else
ex_adci ds 3
ex_sbci ds 3
endif
0210 : c3824100 abs1 db $c3,$82,$41,0 ;test patterns for LDx BIT ROL ROR ASL LSR
0214 : 7f abs7f db $7f ;test pattern for compare
;loads
0215 : 80800002 fLDx db fn,fn,0,fz ;expected flags for load
;shifts
0219 : rASL ;expected result ASL & ROL -carry
0219 : 86048200 rROL db $86,$04,$82,0 ; "
021d : 87058301 rROLc db $87,$05,$83,1 ;expected result ROL +carry
0221 : rLSR ;expected result LSR & ROR -carry
0221 : 61412000 rROR db $61,$41,$20,0 ; "
0225 : e1c1a080 rRORc db $e1,$c1,$a0,$80 ;expected result ROR +carry
0229 : fASL ;expected flags for shifts
0229 : 81018002 fROL db fnc,fc,fn,fz ;no carry in
022d : 81018000 fROLc db fnc,fc,fn,0 ;carry in
0231 : fLSR
0231 : 01000102 fROR db fc,0,fc,fz ;no carry in
0235 : 81808180 fRORc db fnc,fn,fnc,fn ;carry in
;increments (decrements)
0239 : 7f80ff0001 rINC db $7f,$80,$ff,0,1 ;expected result for INC/DEC
023e : 0080800200 fINC db 0,fn,fn,fz,0 ;expected flags for INC/DEC
;logical memory operand
0243 : 001f7180 absOR db 0,$1f,$71,$80 ;test pattern for OR
0247 : 0fff7f80 absAN db $0f,$ff,$7f,$80 ;test pattern for AND
024b : ff0f8f8f absEO db $ff,$0f,$8f,$8f ;test pattern for EOR
;logical accu operand
024f : 00f11f00 absORa db 0,$f1,$1f,0 ;test pattern for OR
0253 : f0ffffff absANa db $f0,$ff,$ff,$ff ;test pattern for AND
0257 : fff0f00f absEOa db $ff,$f0,$f0,$0f ;test pattern for EOR
;logical results
025b : 00ff7f80 absrlo db 0,$ff,$7f,$80
025f : 02800080 absflo db fz,fn,0,fn
0263 : data_bss_end
;define area for page crossing JMP (abs) & JMP (abs,x) test
02f9 = jxi_tab equ data_segment + $100 - 7 ;JMP (jxi_tab,x) x=6
02fd = ji_tab equ data_segment + $100 - 3 ;JMP (ji_tab+2)
0300 = jxp_tab equ data_segment + $100 ;JMP (jxp_tab-255) x=255
code
0400 = org code_segment
0400 : d8 start cld
0401 : a2ff ldx #$ff
0403 : 9a txs
0404 : a900 lda #0 ;*** test 0 = initialize
0406 : 8d0202 sta test_case
0000 = test_num = 0
;stop interrupts before initializing BSS
if I_flag = 1
sei
endif
;initialize I/O for report channel
if report = 1
jsr report_init
endif
;initialize BSS segment
if load_data_direct != 1
ldx #zp_end-zp_init-1
ld_zp lda zp_init,x
sta zp_bss,x
dex
bpl ld_zp
ldx #data_end-data_init-1
ld_data lda data_init,x
sta data_bss,x
dex
bpl ld_data
if ROM_vectors = 1
ldx #5
ld_vect lda vec_init,x
sta vec_bss,x
dex
bpl ld_vect
endif
endif
;retain status of interrupt flag
if I_flag = 2
php
pla
and #4 ;isolate flag
sta flag_I_on ;or mask
eor #lo(~4) ;reverse
sta flag_I_off ;and mask
endif
;generate checksum for RAM integrity test
if ram_top > -1
lda #0
sta zpt ;set low byte of indirect pointer
sta ram_chksm+1 ;checksum high byte
ldx #11 ;reset modifiable RAM
gcs1 sta jxi_tab,x ;JMP indirect page cross area
dex
bpl gcs1
clc
ldx #zp_bss-zero_page ;zeropage - write test area
gcs3 adc zero_page,x
bcc gcs2
inc ram_chksm+1 ;carry to high byte
clc
gcs2 inx
bne gcs3
ldx #hi(abs1) ;set high byte of indirect pointer
stx zpt+1
ldy #lo(abs1) ;data after write & execute test area
gcs5 adc (zpt),y
bcc gcs4
inc ram_chksm+1 ;carry to high byte
clc
gcs4 iny
bne gcs5
inx ;advance RAM high address
stx zpt+1
cpx #ram_top
bne gcs5
sta ram_chksm ;checksum complete
endif
next_test
0409 : ad0202 > lda test_case ;previous test
040c : c900 > cmp #test_num
> trap_ne ;test is out of sequence
040e : d0fe > bne * ;failed not equal (non zero)
>
0001 = >test_num = test_num + 1
0410 : a901 > lda #test_num ;*** next tests' number
0412 : 8d0202 > sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
;testing stack operations PHX PHY PLX PLY
0415 : a999 lda #$99 ;protect a
0417 : a2ff ldx #$ff ;initialize stack
0419 : 9a txs
041a : a255 ldx #$55
041c : da phx
041d : a2aa ldx #$aa
041f : da phx
0420 : ecfe01 cpx $1fe ;on stack ?
trap_ne
0423 : d0fe > bne * ;failed not equal (non zero)
0425 : ba tsx
0426 : e0fd cpx #$fd ;sp decremented?
trap_ne
0428 : d0fe > bne * ;failed not equal (non zero)
042a : 7a ply
042b : c0aa cpy #$aa ;successful retreived from stack?
trap_ne
042d : d0fe > bne * ;failed not equal (non zero)
042f : 7a ply
0430 : c055 cpy #$55
trap_ne
0432 : d0fe > bne * ;failed not equal (non zero)
0434 : ccff01 cpy $1ff ;remains on stack?
trap_ne
0437 : d0fe > bne * ;failed not equal (non zero)
0439 : ba tsx
043a : e0ff cpx #$ff ;sp incremented?
trap_ne
043c : d0fe > bne * ;failed not equal (non zero)
043e : a0a5 ldy #$a5
0440 : 5a phy
0441 : a05a ldy #$5a
0443 : 5a phy
0444 : ccfe01 cpy $1fe ;on stack ?
trap_ne
0447 : d0fe > bne * ;failed not equal (non zero)
0449 : ba tsx
044a : e0fd cpx #$fd ;sp decremented?
trap_ne
044c : d0fe > bne * ;failed not equal (non zero)
044e : fa plx
044f : e05a cpx #$5a ;successful retreived from stack?
trap_ne
0451 : d0fe > bne * ;failed not equal (non zero)
0453 : fa plx
0454 : e0a5 cpx #$a5
trap_ne
0456 : d0fe > bne * ;failed not equal (non zero)
0458 : ecff01 cpx $1ff ;remains on stack?
trap_ne
045b : d0fe > bne * ;failed not equal (non zero)
045d : ba tsx
045e : e0ff cpx #$ff ;sp incremented?
trap_ne
0460 : d0fe > bne * ;failed not equal (non zero)
0462 : c999 cmp #$99 ;unchanged?
trap_ne
0464 : d0fe > bne * ;failed not equal (non zero)
next_test
0466 : ad0202 > lda test_case ;previous test
0469 : c901 > cmp #test_num
> trap_ne ;test is out of sequence
046b : d0fe > bne * ;failed not equal (non zero)
>
0002 = >test_num = test_num + 1
046d : a902 > lda #test_num ;*** next tests' number
046f : 8d0202 > sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; test PHX does not alter flags or X but PLX does
0472 : a0aa ldy #$aa ;protect y
set_x 1,$ff ;push
> load_flag $ff
0474 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0476 : 48 > pha ;use stack to load status
0477 : a201 > ldx #1 ;precharge index x
0479 : 28 > plp
047a : da phx
tst_x 1,$ff
047b : 08 > php ;save flags
047c : e001 > cpx #1 ;test result
> trap_ne
047e : d0fe > bne * ;failed not equal (non zero)
>
0480 : 68 > pla ;load status
0481 : 48 > pha
> cmp_flag $ff
0482 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0484 : d0fe > bne * ;failed not equal (non zero)
>
0486 : 28 > plp ;restore status
set_x 0,0
> load_flag 0
0487 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0489 : 48 > pha ;use stack to load status
048a : a200 > ldx #0 ;precharge index x
048c : 28 > plp
048d : da phx
tst_x 0,0
048e : 08 > php ;save flags
048f : e000 > cpx #0 ;test result
> trap_ne
0491 : d0fe > bne * ;failed not equal (non zero)
>
0493 : 68 > pla ;load status
0494 : 48 > pha
> cmp_flag 0
0495 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0497 : d0fe > bne * ;failed not equal (non zero)
>
0499 : 28 > plp ;restore status
set_x $ff,$ff
> load_flag $ff
049a : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
049c : 48 > pha ;use stack to load status
049d : a2ff > ldx #$ff ;precharge index x
049f : 28 > plp
04a0 : da phx
tst_x $ff,$ff
04a1 : 08 > php ;save flags
04a2 : e0ff > cpx #$ff ;test result
> trap_ne
04a4 : d0fe > bne * ;failed not equal (non zero)
>
04a6 : 68 > pla ;load status
04a7 : 48 > pha
> cmp_flag $ff
04a8 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
04aa : d0fe > bne * ;failed not equal (non zero)
>
04ac : 28 > plp ;restore status
set_x 1,0
> load_flag 0
04ad : a900 > lda #0 ;allow test to change I-flag (no mask)
>
04af : 48 > pha ;use stack to load status
04b0 : a201 > ldx #1 ;precharge index x
04b2 : 28 > plp
04b3 : da phx
tst_x 1,0
04b4 : 08 > php ;save flags
04b5 : e001 > cpx #1 ;test result
> trap_ne
04b7 : d0fe > bne * ;failed not equal (non zero)
>
04b9 : 68 > pla ;load status
04ba : 48 > pha
> cmp_flag 0
04bb : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
04bd : d0fe > bne * ;failed not equal (non zero)
>
04bf : 28 > plp ;restore status
set_x 0,$ff
> load_flag $ff
04c0 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
04c2 : 48 > pha ;use stack to load status
04c3 : a200 > ldx #0 ;precharge index x
04c5 : 28 > plp
04c6 : da phx
tst_x 0,$ff
04c7 : 08 > php ;save flags
04c8 : e000 > cpx #0 ;test result
> trap_ne
04ca : d0fe > bne * ;failed not equal (non zero)
>
04cc : 68 > pla ;load status
04cd : 48 > pha
> cmp_flag $ff
04ce : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
04d0 : d0fe > bne * ;failed not equal (non zero)
>
04d2 : 28 > plp ;restore status
set_x $ff,0
> load_flag 0
04d3 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
04d5 : 48 > pha ;use stack to load status
04d6 : a2ff > ldx #$ff ;precharge index x
04d8 : 28 > plp
04d9 : da phx
tst_x $ff,0
04da : 08 > php ;save flags
04db : e0ff > cpx #$ff ;test result
> trap_ne
04dd : d0fe > bne * ;failed not equal (non zero)
>
04df : 68 > pla ;load status
04e0 : 48 > pha
> cmp_flag 0
04e1 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
04e3 : d0fe > bne * ;failed not equal (non zero)
>
04e5 : 28 > plp ;restore status
set_x 0,$ff ;pull
> load_flag $ff
04e6 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
04e8 : 48 > pha ;use stack to load status
04e9 : a200 > ldx #0 ;precharge index x
04eb : 28 > plp
04ec : fa plx
tst_x $ff,$ff-zero
04ed : 08 > php ;save flags
04ee : e0ff > cpx #$ff ;test result
> trap_ne
04f0 : d0fe > bne * ;failed not equal (non zero)
>
04f2 : 68 > pla ;load status
04f3 : 48 > pha
> cmp_flag $ff-zero
04f4 : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
04f6 : d0fe > bne * ;failed not equal (non zero)
>
04f8 : 28 > plp ;restore status
set_x $ff,0
> load_flag 0
04f9 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
04fb : 48 > pha ;use stack to load status
04fc : a2ff > ldx #$ff ;precharge index x
04fe : 28 > plp
04ff : fa plx
tst_x 0,zero
0500 : 08 > php ;save flags
0501 : e000 > cpx #0 ;test result
> trap_ne
0503 : d0fe > bne * ;failed not equal (non zero)
>
0505 : 68 > pla ;load status
0506 : 48 > pha
> cmp_flag zero
0507 : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0509 : d0fe > bne * ;failed not equal (non zero)
>
050b : 28 > plp ;restore status
set_x $fe,$ff
> load_flag $ff
050c : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
050e : 48 > pha ;use stack to load status
050f : a2fe > ldx #$fe ;precharge index x
0511 : 28 > plp
0512 : fa plx
tst_x 1,$ff-zero-minus
0513 : 08 > php ;save flags
0514 : e001 > cpx #1 ;test result
> trap_ne
0516 : d0fe > bne * ;failed not equal (non zero)
>
0518 : 68 > pla ;load status
0519 : 48 > pha
> cmp_flag $ff-zero-minus
051a : c97d > cmp #($ff-zero-minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
051c : d0fe > bne * ;failed not equal (non zero)
>
051e : 28 > plp ;restore status
set_x 0,0
> load_flag 0
051f : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0521 : 48 > pha ;use stack to load status
0522 : a200 > ldx #0 ;precharge index x
0524 : 28 > plp
0525 : fa plx
tst_x $ff,minus
0526 : 08 > php ;save flags
0527 : e0ff > cpx #$ff ;test result
> trap_ne
0529 : d0fe > bne * ;failed not equal (non zero)
>
052b : 68 > pla ;load status
052c : 48 > pha
> cmp_flag minus
052d : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
052f : d0fe > bne * ;failed not equal (non zero)
>
0531 : 28 > plp ;restore status
set_x $ff,$ff
> load_flag $ff
0532 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0534 : 48 > pha ;use stack to load status
0535 : a2ff > ldx #$ff ;precharge index x
0537 : 28 > plp
0538 : fa plx
tst_x 0,$ff-minus
0539 : 08 > php ;save flags
053a : e000 > cpx #0 ;test result
> trap_ne
053c : d0fe > bne * ;failed not equal (non zero)
>
053e : 68 > pla ;load status
053f : 48 > pha
> cmp_flag $ff-minus
0540 : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0542 : d0fe > bne * ;failed not equal (non zero)
>
0544 : 28 > plp ;restore status
set_x $fe,0
> load_flag 0
0545 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0547 : 48 > pha ;use stack to load status
0548 : a2fe > ldx #$fe ;precharge index x
054a : 28 > plp
054b : fa plx
tst_x 1,0
054c : 08 > php ;save flags
054d : e001 > cpx #1 ;test result
> trap_ne
054f : d0fe > bne * ;failed not equal (non zero)
>
0551 : 68 > pla ;load status
0552 : 48 > pha
> cmp_flag 0
0553 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0555 : d0fe > bne * ;failed not equal (non zero)
>
0557 : 28 > plp ;restore status
0558 : c0aa cpy #$aa ;Y unchanged
trap_ne
055a : d0fe > bne * ;failed not equal (non zero)
next_test
055c : ad0202 > lda test_case ;previous test
055f : c902 > cmp #test_num
> trap_ne ;test is out of sequence
0561 : d0fe > bne * ;failed not equal (non zero)
>
0003 = >test_num = test_num + 1
0563 : a903 > lda #test_num ;*** next tests' number
0565 : 8d0202 > sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; test PHY does not alter flags or Y but PLY does
0568 : a255 ldx #$55 ;x & a protected
set_y 1,$ff ;push
> load_flag $ff
056a : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
056c : 48 > pha ;use stack to load status
056d : a001 > ldy #1 ;precharge index y
056f : 28 > plp
0570 : 5a phy
tst_y 1,$ff
0571 : 08 > php ;save flags
0572 : c001 > cpy #1 ;test result
> trap_ne
0574 : d0fe > bne * ;failed not equal (non zero)
>
0576 : 68 > pla ;load status
0577 : 48 > pha
> cmp_flag $ff
0578 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
057a : d0fe > bne * ;failed not equal (non zero)
>
057c : 28 > plp ;restore status
set_y 0,0
> load_flag 0
057d : a900 > lda #0 ;allow test to change I-flag (no mask)
>
057f : 48 > pha ;use stack to load status
0580 : a000 > ldy #0 ;precharge index y
0582 : 28 > plp
0583 : 5a phy
tst_y 0,0
0584 : 08 > php ;save flags
0585 : c000 > cpy #0 ;test result
> trap_ne
0587 : d0fe > bne * ;failed not equal (non zero)
>
0589 : 68 > pla ;load status
058a : 48 > pha
> cmp_flag 0
058b : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
058d : d0fe > bne * ;failed not equal (non zero)
>
058f : 28 > plp ;restore status
set_y $ff,$ff
> load_flag $ff
0590 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0592 : 48 > pha ;use stack to load status
0593 : a0ff > ldy #$ff ;precharge index y
0595 : 28 > plp
0596 : 5a phy
tst_y $ff,$ff
0597 : 08 > php ;save flags
0598 : c0ff > cpy #$ff ;test result
> trap_ne
059a : d0fe > bne * ;failed not equal (non zero)
>
059c : 68 > pla ;load status
059d : 48 > pha
> cmp_flag $ff
059e : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
05a0 : d0fe > bne * ;failed not equal (non zero)
>
05a2 : 28 > plp ;restore status
set_y 1,0
> load_flag 0
05a3 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
05a5 : 48 > pha ;use stack to load status
05a6 : a001 > ldy #1 ;precharge index y
05a8 : 28 > plp
05a9 : 5a phy
tst_y 1,0
05aa : 08 > php ;save flags
05ab : c001 > cpy #1 ;test result
> trap_ne
05ad : d0fe > bne * ;failed not equal (non zero)
>
05af : 68 > pla ;load status
05b0 : 48 > pha
> cmp_flag 0
05b1 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
05b3 : d0fe > bne * ;failed not equal (non zero)
>
05b5 : 28 > plp ;restore status
set_y 0,$ff
> load_flag $ff
05b6 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
05b8 : 48 > pha ;use stack to load status
05b9 : a000 > ldy #0 ;precharge index y
05bb : 28 > plp
05bc : 5a phy
tst_y 0,$ff
05bd : 08 > php ;save flags
05be : c000 > cpy #0 ;test result
> trap_ne
05c0 : d0fe > bne * ;failed not equal (non zero)
>
05c2 : 68 > pla ;load status
05c3 : 48 > pha
> cmp_flag $ff
05c4 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
05c6 : d0fe > bne * ;failed not equal (non zero)
>
05c8 : 28 > plp ;restore status
set_y $ff,0
> load_flag 0
05c9 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
05cb : 48 > pha ;use stack to load status
05cc : a0ff > ldy #$ff ;precharge index y
05ce : 28 > plp
05cf : 5a phy
tst_y $ff,0
05d0 : 08 > php ;save flags
05d1 : c0ff > cpy #$ff ;test result
> trap_ne
05d3 : d0fe > bne * ;failed not equal (non zero)
>
05d5 : 68 > pla ;load status
05d6 : 48 > pha
> cmp_flag 0
05d7 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
05d9 : d0fe > bne * ;failed not equal (non zero)
>
05db : 28 > plp ;restore status
set_y 0,$ff ;pull
> load_flag $ff
05dc : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
05de : 48 > pha ;use stack to load status
05df : a000 > ldy #0 ;precharge index y
05e1 : 28 > plp
05e2 : 7a ply
tst_y $ff,$ff-zero
05e3 : 08 > php ;save flags
05e4 : c0ff > cpy #$ff ;test result
> trap_ne
05e6 : d0fe > bne * ;failed not equal (non zero)
>
05e8 : 68 > pla ;load status
05e9 : 48 > pha
> cmp_flag $ff-zero
05ea : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
05ec : d0fe > bne * ;failed not equal (non zero)
>
05ee : 28 > plp ;restore status
set_y $ff,0
> load_flag 0
05ef : a900 > lda #0 ;allow test to change I-flag (no mask)
>
05f1 : 48 > pha ;use stack to load status
05f2 : a0ff > ldy #$ff ;precharge index y
05f4 : 28 > plp
05f5 : 7a ply
tst_y 0,zero
05f6 : 08 > php ;save flags
05f7 : c000 > cpy #0 ;test result
> trap_ne
05f9 : d0fe > bne * ;failed not equal (non zero)
>
05fb : 68 > pla ;load status
05fc : 48 > pha
> cmp_flag zero
05fd : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
05ff : d0fe > bne * ;failed not equal (non zero)
>
0601 : 28 > plp ;restore status
set_y $fe,$ff
> load_flag $ff
0602 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0604 : 48 > pha ;use stack to load status
0605 : a0fe > ldy #$fe ;precharge index y
0607 : 28 > plp
0608 : 7a ply
tst_y 1,$ff-zero-minus
0609 : 08 > php ;save flags
060a : c001 > cpy #1 ;test result
> trap_ne
060c : d0fe > bne * ;failed not equal (non zero)
>
060e : 68 > pla ;load status
060f : 48 > pha
> cmp_flag $ff-zero-minus
0610 : c97d > cmp #($ff-zero-minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0612 : d0fe > bne * ;failed not equal (non zero)
>
0614 : 28 > plp ;restore status
set_y 0,0
> load_flag 0
0615 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0617 : 48 > pha ;use stack to load status
0618 : a000 > ldy #0 ;precharge index y
061a : 28 > plp
061b : 7a ply
tst_y $ff,minus
061c : 08 > php ;save flags
061d : c0ff > cpy #$ff ;test result
> trap_ne
061f : d0fe > bne * ;failed not equal (non zero)
>
0621 : 68 > pla ;load status
0622 : 48 > pha
> cmp_flag minus
0623 : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0625 : d0fe > bne * ;failed not equal (non zero)
>
0627 : 28 > plp ;restore status
set_y $ff,$ff
> load_flag $ff
0628 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
062a : 48 > pha ;use stack to load status
062b : a0ff > ldy #$ff ;precharge index y
062d : 28 > plp
062e : 7a ply
tst_y 0,$ff-minus
062f : 08 > php ;save flags
0630 : c000 > cpy #0 ;test result
> trap_ne
0632 : d0fe > bne * ;failed not equal (non zero)
>
0634 : 68 > pla ;load status
0635 : 48 > pha
> cmp_flag $ff-minus
0636 : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0638 : d0fe > bne * ;failed not equal (non zero)
>
063a : 28 > plp ;restore status
set_y $fe,0
> load_flag 0
063b : a900 > lda #0 ;allow test to change I-flag (no mask)
>
063d : 48 > pha ;use stack to load status
063e : a0fe > ldy #$fe ;precharge index y
0640 : 28 > plp
0641 : 7a ply
tst_y 1,0
0642 : 08 > php ;save flags
0643 : c001 > cpy #1 ;test result
> trap_ne
0645 : d0fe > bne * ;failed not equal (non zero)
>
0647 : 68 > pla ;load status
0648 : 48 > pha
> cmp_flag 0
0649 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
064b : d0fe > bne * ;failed not equal (non zero)
>
064d : 28 > plp ;restore status
064e : e055 cpx #$55 ;x unchanged?
trap_ne
0650 : d0fe > bne * ;failed not equal (non zero)
next_test
0652 : ad0202 > lda test_case ;previous test
0655 : c903 > cmp #test_num
> trap_ne ;test is out of sequence
0657 : d0fe > bne * ;failed not equal (non zero)
>
0004 = >test_num = test_num + 1
0659 : a904 > lda #test_num ;*** next tests' number
065b : 8d0202 > sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; PC modifying instructions (BRA, BBR, BBS, 1, 2, 3 byte NOPs, JMP(abs,x))
; testing unconditional branch BRA
065e : a281 ldx #$81 ;protect unused registers
0660 : a07e ldy #$7e
set_a 0,$ff
> load_flag $ff
0662 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0664 : 48 > pha ;use stack to load status
0665 : a900 > lda #0 ;precharge accu
0667 : 28 > plp
0668 : 8003 bra br1 ;branch should always be taken
trap
066a : 4c6a06 > jmp * ;failed anyway
066d : br1
tst_a 0,$ff
066d : 08 > php ;save flags
066e : c900 > cmp #0 ;test result
> trap_ne
0670 : d0fe > bne * ;failed not equal (non zero)
>
0672 : 68 > pla ;load status
0673 : 48 > pha
> cmp_flag $ff
0674 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0676 : d0fe > bne * ;failed not equal (non zero)
>
0678 : 28 > plp ;restore status
set_a $ff,0
> load_flag 0
0679 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
067b : 48 > pha ;use stack to load status
067c : a9ff > lda #$ff ;precharge accu
067e : 28 > plp
067f : 8003 bra br2 ;branch should always be taken
trap
0681 : 4c8106 > jmp * ;failed anyway
0684 : br2
tst_a $ff,0
0684 : 08 > php ;save flags
0685 : c9ff > cmp #$ff ;test result
> trap_ne
0687 : d0fe > bne * ;failed not equal (non zero)
>
0689 : 68 > pla ;load status
068a : 48 > pha
> cmp_flag 0
068b : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
068d : d0fe > bne * ;failed not equal (non zero)
>
068f : 28 > plp ;restore status
0690 : e081 cpx #$81
trap_ne
0692 : d0fe > bne * ;failed not equal (non zero)
0694 : c07e cpy #$7e
trap_ne
0696 : d0fe > bne * ;failed not equal (non zero)
next_test
0698 : ad0202 > lda test_case ;previous test
069b : c904 > cmp #test_num
> trap_ne ;test is out of sequence
069d : d0fe > bne * ;failed not equal (non zero)
>
0005 = >test_num = test_num + 1
069f : a905 > lda #test_num ;*** next tests' number
06a1 : 8d0202 > sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
06a4 : a000 ldy #0 ;branch range test
06a6 : 8061 bra bra0
06a8 : c001 bra1 cpy #1
trap_ne ;long range backward
06aa : d0fe > bne * ;failed not equal (non zero)
06ac : c8 iny
06ad : 8053 bra bra2
06af : c003 bra3 cpy #3
trap_ne ;long range backward
06b1 : d0fe > bne * ;failed not equal (non zero)
06b3 : c8 iny
06b4 : 8045 bra bra4
06b6 : c005 bra5 cpy #5
trap_ne ;long range backward
06b8 : d0fe > bne * ;failed not equal (non zero)
06ba : c8 iny
06bb : a000 ldy #0
06bd : 8004 bra brf0
06bf : c8 iny
06c0 : c8 iny
06c1 : c8 iny
06c2 : c8 iny
06c3 : 8003 brf0 bra brf1
06c5 : c8 iny
06c6 : c8 iny
06c7 : c8 iny
06c8 : c8 brf1 iny
06c9 : 8002 bra brf2
06cb : c8 iny
06cc : c8 iny
06cd : c8 brf2 iny
06ce : c8 iny
06cf : 8001 bra brf3
06d1 : c8 iny
06d2 : c8 brf3 iny
06d3 : c8 iny
06d4 : c8 iny
06d5 : 8000 bra brf4
06d7 : c8 brf4 iny
06d8 : c8 iny
06d9 : c8 iny
06da : c8 iny
06db : c00a cpy #10
trap_ne ;short range forward
06dd : d0fe > bne * ;failed not equal (non zero)
06df : 8012 bra brb0
06e1 : 88 brb4 dey
06e2 : 88 dey
06e3 : 88 dey
06e4 : 88 dey
06e5 : 800e bra brb5
06e7 : 88 brb3 dey
06e8 : 88 dey
06e9 : 88 dey
06ea : 80f5 bra brb4
06ec : 88 brb2 dey
06ed : 88 dey
06ee : 80f7 bra brb3
06f0 : 88 brb1 dey
06f1 : 80f9 bra brb2
06f3 : 80fb brb0 bra brb1
06f5 : c000 brb5 cpy #0
trap_ne ;short range backward
06f7 : d0fe > bne * ;failed not equal (non zero)
06f9 : 8015 bra bra6
06fb : c004 bra4 cpy #4
trap_ne ;long range forward
06fd : d0fe > bne * ;failed not equal (non zero)
06ff : c8 iny
0700 : 80b4 bra bra5
0702 : c002 bra2 cpy #2
trap_ne ;long range forward
0704 : d0fe > bne * ;failed not equal (non zero)
0706 : c8 iny
0707 : 80a6 bra bra3
0709 : c000 bra0 cpy #0
trap_ne ;long range forward
070b : d0fe > bne * ;failed not equal (non zero)
070d : c8 iny
070e : 8098 bra bra1
0710 : bra6
next_test
0710 : ad0202 > lda test_case ;previous test
0713 : c905 > cmp #test_num
> trap_ne ;test is out of sequence
0715 : d0fe > bne * ;failed not equal (non zero)
>
0006 = >test_num = test_num + 1
0717 : a906 > lda #test_num ;*** next tests' number
0719 : 8d0202 > sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
if rkwl_wdc_op = 1
; testing BBR & BBS
bbt macro ;\1 = bitnum
lda #(1<<\1) ;testing 1 bit on
sta zpt
set_a $33,0 ;with flags off
bbr \1,zpt,fail1\?
bbs \1,zpt,ok1\?
trap ;bbs branch not taken
fail1\?
trap ;bbr branch taken
ok1\?
tst_a $33,0
set_a $cc,$ff ;with flags on
bbr \1,zpt,fail2\?
bbs \1,zpt,ok2\?
trap ;bbs branch not taken
fail2\?
trap ;bbr branch taken
ok2\?
tst_a $cc,$ff
lda zpt
cmp #(1<<\1)
trap_ne ;zp altered
lda #$ff-(1<<\1) ;testing 1 bit off
sta zpt
set_a $33,0 ;with flags off
bbs \1,zpt,fail3\?
bbr \1,zpt,ok3\?
trap ;bbr branch not taken
fail3\?
trap ;bbs branch taken
ok3\?
tst_a $33,0
set_a $cc,$ff ;with flags on
bbs \1,zpt,fail4\?
bbr \1,zpt,ok4\?
trap ;bbr branch not taken
fail4\?
trap ;bbs branch taken
ok4\?
tst_a $cc,$ff
lda zpt
cmp #$ff-(1<<\1)
trap_ne ;zp altered
endm
ldx #$11 ;test bbr/bbs integrity
ldy #$22
bbt 0
bbt 1
bbt 2
bbt 3
bbt 4
bbt 5
bbt 6
bbt 7
cpx #$11
trap_ne ;x overwritten
cpy #$22
trap_ne ;y overwritten
next_test
bbrc macro ;\1 = bitnum
bbr \1,zpt,skip\?
eor #(1<<\1)
skip\?
endm
bbsc macro ;\1 = bitnum
bbs \1,zpt,skip\?
eor #(1<<\1)
skip\?
endm
lda #0 ;combined bit test
sta zpt
bbcl lda #0
bbrc 0
bbrc 1
bbrc 2
bbrc 3
bbrc 4
bbrc 5
bbrc 6
bbrc 7
eor zpt
trap_ne ;failed bbr bitnum in accu
lda #$ff
bbsc 0
bbsc 1
bbsc 2
bbsc 3
bbsc 4
bbsc 5
bbsc 6
bbsc 7
eor zpt
trap_ne ;failed bbs bitnum in accu
inc zpt
bne bbcl
next_test
endif
; testing NOP
nop_test macro ;\1 = opcode, \2 = # of bytes
ldy #$42
ldx #4-\2
db \1 ;test nop length
if \2 = 1
dex
dex
endif
if \2 = 2
iny
dex
endif
if \2 = 3
iny
iny
endif
dex
trap_ne ;wrong number of bytes
set_a $ff-\1,0
db \1 ;test nop integrity - flags off
nop
nop
tst_a $ff-\1,0
set_a $aa-\1,$ff
db \1 ;test nop integrity - flags on
nop
nop
tst_a $aa-\1,$ff
cpy #$42
trap_ne ;y changed
cpx #0
trap_ne ;x changed
endm
if skip_nop = 0
nop_test $02,2
071c : a042 > ldy #$42
071e : a202 > ldx #4-2
0720 : 02 > db $02 ;test nop length
> if 2 = 1
> dex
> dex
> endif
> if 2 = 2
0721 : c8 > iny
0722 : ca > dex
> endif
> if 2 = 3
> iny
> iny
> endif
0723 : ca > dex
> trap_ne ;wrong number of bytes
0724 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$02,0
> load_flag 0
0726 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0728 : 48 > pha ;use stack to load status
0729 : a9fd > lda #$ff-$02 ;precharge accu
072b : 28 > plp
>
072c : 02 > db $02 ;test nop integrity - flags off
072d : ea > nop
072e : ea > nop
> tst_a $ff-$02,0
072f : 08 > php ;save flags
0730 : c9fd > cmp #$ff-$02 ;test result
> trap_ne
0732 : d0fe > bne * ;failed not equal (non zero)
>
0734 : 68 > pla ;load status
0735 : 48 > pha
> cmp_flag 0
0736 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0738 : d0fe > bne * ;failed not equal (non zero)
>
073a : 28 > plp ;restore status
>
> set_a $aa-$02,$ff
> load_flag $ff
073b : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
073d : 48 > pha ;use stack to load status
073e : a9a8 > lda #$aa-$02 ;precharge accu
0740 : 28 > plp
>
0741 : 02 > db $02 ;test nop integrity - flags on
0742 : ea > nop
0743 : ea > nop
> tst_a $aa-$02,$ff
0744 : 08 > php ;save flags
0745 : c9a8 > cmp #$aa-$02 ;test result
> trap_ne
0747 : d0fe > bne * ;failed not equal (non zero)
>
0749 : 68 > pla ;load status
074a : 48 > pha
> cmp_flag $ff
074b : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
074d : d0fe > bne * ;failed not equal (non zero)
>
074f : 28 > plp ;restore status
>
0750 : c042 > cpy #$42
> trap_ne ;y changed
0752 : d0fe > bne * ;failed not equal (non zero)
>
0754 : e000 > cpx #0
> trap_ne ;x changed
0756 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $22,2
0758 : a042 > ldy #$42
075a : a202 > ldx #4-2
075c : 22 > db $22 ;test nop length
> if 2 = 1
> dex
> dex
> endif
> if 2 = 2
075d : c8 > iny
075e : ca > dex
> endif
> if 2 = 3
> iny
> iny
> endif
075f : ca > dex
> trap_ne ;wrong number of bytes
0760 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$22,0
> load_flag 0
0762 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0764 : 48 > pha ;use stack to load status
0765 : a9dd > lda #$ff-$22 ;precharge accu
0767 : 28 > plp
>
0768 : 22 > db $22 ;test nop integrity - flags off
0769 : ea > nop
076a : ea > nop
> tst_a $ff-$22,0
076b : 08 > php ;save flags
076c : c9dd > cmp #$ff-$22 ;test result
> trap_ne
076e : d0fe > bne * ;failed not equal (non zero)
>
0770 : 68 > pla ;load status
0771 : 48 > pha
> cmp_flag 0
0772 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0774 : d0fe > bne * ;failed not equal (non zero)
>
0776 : 28 > plp ;restore status
>
> set_a $aa-$22,$ff
> load_flag $ff
0777 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0779 : 48 > pha ;use stack to load status
077a : a988 > lda #$aa-$22 ;precharge accu
077c : 28 > plp
>
077d : 22 > db $22 ;test nop integrity - flags on
077e : ea > nop
077f : ea > nop
> tst_a $aa-$22,$ff
0780 : 08 > php ;save flags
0781 : c988 > cmp #$aa-$22 ;test result
> trap_ne
0783 : d0fe > bne * ;failed not equal (non zero)
>
0785 : 68 > pla ;load status
0786 : 48 > pha
> cmp_flag $ff
0787 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0789 : d0fe > bne * ;failed not equal (non zero)
>
078b : 28 > plp ;restore status
>
078c : c042 > cpy #$42
> trap_ne ;y changed
078e : d0fe > bne * ;failed not equal (non zero)
>
0790 : e000 > cpx #0
> trap_ne ;x changed
0792 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $42,2
0794 : a042 > ldy #$42
0796 : a202 > ldx #4-2
0798 : 42 > db $42 ;test nop length
> if 2 = 1
> dex
> dex
> endif
> if 2 = 2
0799 : c8 > iny
079a : ca > dex
> endif
> if 2 = 3
> iny
> iny
> endif
079b : ca > dex
> trap_ne ;wrong number of bytes
079c : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$42,0
> load_flag 0
079e : a900 > lda #0 ;allow test to change I-flag (no mask)
>
07a0 : 48 > pha ;use stack to load status
07a1 : a9bd > lda #$ff-$42 ;precharge accu
07a3 : 28 > plp
>
07a4 : 42 > db $42 ;test nop integrity - flags off
07a5 : ea > nop
07a6 : ea > nop
> tst_a $ff-$42,0
07a7 : 08 > php ;save flags
07a8 : c9bd > cmp #$ff-$42 ;test result
> trap_ne
07aa : d0fe > bne * ;failed not equal (non zero)
>
07ac : 68 > pla ;load status
07ad : 48 > pha
> cmp_flag 0
07ae : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
07b0 : d0fe > bne * ;failed not equal (non zero)
>
07b2 : 28 > plp ;restore status
>
> set_a $aa-$42,$ff
> load_flag $ff
07b3 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
07b5 : 48 > pha ;use stack to load status
07b6 : a968 > lda #$aa-$42 ;precharge accu
07b8 : 28 > plp
>
07b9 : 42 > db $42 ;test nop integrity - flags on
07ba : ea > nop
07bb : ea > nop
> tst_a $aa-$42,$ff
07bc : 08 > php ;save flags
07bd : c968 > cmp #$aa-$42 ;test result
> trap_ne
07bf : d0fe > bne * ;failed not equal (non zero)
>
07c1 : 68 > pla ;load status
07c2 : 48 > pha
> cmp_flag $ff
07c3 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
07c5 : d0fe > bne * ;failed not equal (non zero)
>
07c7 : 28 > plp ;restore status
>
07c8 : c042 > cpy #$42
> trap_ne ;y changed
07ca : d0fe > bne * ;failed not equal (non zero)
>
07cc : e000 > cpx #0
> trap_ne ;x changed
07ce : d0fe > bne * ;failed not equal (non zero)
>
nop_test $62,2
07d0 : a042 > ldy #$42
07d2 : a202 > ldx #4-2
07d4 : 62 > db $62 ;test nop length
> if 2 = 1
> dex
> dex
> endif
> if 2 = 2
07d5 : c8 > iny
07d6 : ca > dex
> endif
> if 2 = 3
> iny
> iny
> endif
07d7 : ca > dex
> trap_ne ;wrong number of bytes
07d8 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$62,0
> load_flag 0
07da : a900 > lda #0 ;allow test to change I-flag (no mask)
>
07dc : 48 > pha ;use stack to load status
07dd : a99d > lda #$ff-$62 ;precharge accu
07df : 28 > plp
>
07e0 : 62 > db $62 ;test nop integrity - flags off
07e1 : ea > nop
07e2 : ea > nop
> tst_a $ff-$62,0
07e3 : 08 > php ;save flags
07e4 : c99d > cmp #$ff-$62 ;test result
> trap_ne
07e6 : d0fe > bne * ;failed not equal (non zero)
>
07e8 : 68 > pla ;load status
07e9 : 48 > pha
> cmp_flag 0
07ea : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
07ec : d0fe > bne * ;failed not equal (non zero)
>
07ee : 28 > plp ;restore status
>
> set_a $aa-$62,$ff
> load_flag $ff
07ef : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
07f1 : 48 > pha ;use stack to load status
07f2 : a948 > lda #$aa-$62 ;precharge accu
07f4 : 28 > plp
>
07f5 : 62 > db $62 ;test nop integrity - flags on
07f6 : ea > nop
07f7 : ea > nop
> tst_a $aa-$62,$ff
07f8 : 08 > php ;save flags
07f9 : c948 > cmp #$aa-$62 ;test result
> trap_ne
07fb : d0fe > bne * ;failed not equal (non zero)
>
07fd : 68 > pla ;load status
07fe : 48 > pha
> cmp_flag $ff
07ff : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0801 : d0fe > bne * ;failed not equal (non zero)
>
0803 : 28 > plp ;restore status
>
0804 : c042 > cpy #$42
> trap_ne ;y changed
0806 : d0fe > bne * ;failed not equal (non zero)
>
0808 : e000 > cpx #0
> trap_ne ;x changed
080a : d0fe > bne * ;failed not equal (non zero)
>
nop_test $82,2
080c : a042 > ldy #$42
080e : a202 > ldx #4-2
0810 : 82 > db $82 ;test nop length
> if 2 = 1
> dex
> dex
> endif
> if 2 = 2
0811 : c8 > iny
0812 : ca > dex
> endif
> if 2 = 3
> iny
> iny
> endif
0813 : ca > dex
> trap_ne ;wrong number of bytes
0814 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$82,0
> load_flag 0
0816 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0818 : 48 > pha ;use stack to load status
0819 : a97d > lda #$ff-$82 ;precharge accu
081b : 28 > plp
>
081c : 82 > db $82 ;test nop integrity - flags off
081d : ea > nop
081e : ea > nop
> tst_a $ff-$82,0
081f : 08 > php ;save flags
0820 : c97d > cmp #$ff-$82 ;test result
> trap_ne
0822 : d0fe > bne * ;failed not equal (non zero)
>
0824 : 68 > pla ;load status
0825 : 48 > pha
> cmp_flag 0
0826 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0828 : d0fe > bne * ;failed not equal (non zero)
>
082a : 28 > plp ;restore status
>
> set_a $aa-$82,$ff
> load_flag $ff
082b : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
082d : 48 > pha ;use stack to load status
082e : a928 > lda #$aa-$82 ;precharge accu
0830 : 28 > plp
>
0831 : 82 > db $82 ;test nop integrity - flags on
0832 : ea > nop
0833 : ea > nop
> tst_a $aa-$82,$ff
0834 : 08 > php ;save flags
0835 : c928 > cmp #$aa-$82 ;test result
> trap_ne
0837 : d0fe > bne * ;failed not equal (non zero)
>
0839 : 68 > pla ;load status
083a : 48 > pha
> cmp_flag $ff
083b : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
083d : d0fe > bne * ;failed not equal (non zero)
>
083f : 28 > plp ;restore status
>
0840 : c042 > cpy #$42
> trap_ne ;y changed
0842 : d0fe > bne * ;failed not equal (non zero)
>
0844 : e000 > cpx #0
> trap_ne ;x changed
0846 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $c2,2
0848 : a042 > ldy #$42
084a : a202 > ldx #4-2
084c : c2 > db $c2 ;test nop length
> if 2 = 1
> dex
> dex
> endif
> if 2 = 2
084d : c8 > iny
084e : ca > dex
> endif
> if 2 = 3
> iny
> iny
> endif
084f : ca > dex
> trap_ne ;wrong number of bytes
0850 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$c2,0
> load_flag 0
0852 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0854 : 48 > pha ;use stack to load status
0855 : a93d > lda #$ff-$c2 ;precharge accu
0857 : 28 > plp
>
0858 : c2 > db $c2 ;test nop integrity - flags off
0859 : ea > nop
085a : ea > nop
> tst_a $ff-$c2,0
085b : 08 > php ;save flags
085c : c93d > cmp #$ff-$c2 ;test result
> trap_ne
085e : d0fe > bne * ;failed not equal (non zero)
>
0860 : 68 > pla ;load status
0861 : 48 > pha
> cmp_flag 0
0862 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0864 : d0fe > bne * ;failed not equal (non zero)
>
0866 : 28 > plp ;restore status
>
> set_a $aa-$c2,$ff
> load_flag $ff
0867 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0869 : 48 > pha ;use stack to load status
086a : a9e8 > lda #$aa-$c2 ;precharge accu
086c : 28 > plp
>
086d : c2 > db $c2 ;test nop integrity - flags on
086e : ea > nop
086f : ea > nop
> tst_a $aa-$c2,$ff
0870 : 08 > php ;save flags
0871 : c9e8 > cmp #$aa-$c2 ;test result
> trap_ne
0873 : d0fe > bne * ;failed not equal (non zero)
>
0875 : 68 > pla ;load status
0876 : 48 > pha
> cmp_flag $ff
0877 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0879 : d0fe > bne * ;failed not equal (non zero)
>
087b : 28 > plp ;restore status
>
087c : c042 > cpy #$42
> trap_ne ;y changed
087e : d0fe > bne * ;failed not equal (non zero)
>
0880 : e000 > cpx #0
> trap_ne ;x changed
0882 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $e2,2
0884 : a042 > ldy #$42
0886 : a202 > ldx #4-2
0888 : e2 > db $e2 ;test nop length
> if 2 = 1
> dex
> dex
> endif
> if 2 = 2
0889 : c8 > iny
088a : ca > dex
> endif
> if 2 = 3
> iny
> iny
> endif
088b : ca > dex
> trap_ne ;wrong number of bytes
088c : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$e2,0
> load_flag 0
088e : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0890 : 48 > pha ;use stack to load status
0891 : a91d > lda #$ff-$e2 ;precharge accu
0893 : 28 > plp
>
0894 : e2 > db $e2 ;test nop integrity - flags off
0895 : ea > nop
0896 : ea > nop
> tst_a $ff-$e2,0
0897 : 08 > php ;save flags
0898 : c91d > cmp #$ff-$e2 ;test result
> trap_ne
089a : d0fe > bne * ;failed not equal (non zero)
>
089c : 68 > pla ;load status
089d : 48 > pha
> cmp_flag 0
089e : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
08a0 : d0fe > bne * ;failed not equal (non zero)
>
08a2 : 28 > plp ;restore status
>
> set_a $aa-$e2,$ff
> load_flag $ff
08a3 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
08a5 : 48 > pha ;use stack to load status
08a6 : a9c8 > lda #$aa-$e2 ;precharge accu
08a8 : 28 > plp
>
08a9 : e2 > db $e2 ;test nop integrity - flags on
08aa : ea > nop
08ab : ea > nop
> tst_a $aa-$e2,$ff
08ac : 08 > php ;save flags
08ad : c9c8 > cmp #$aa-$e2 ;test result
> trap_ne
08af : d0fe > bne * ;failed not equal (non zero)
>
08b1 : 68 > pla ;load status
08b2 : 48 > pha
> cmp_flag $ff
08b3 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
08b5 : d0fe > bne * ;failed not equal (non zero)
>
08b7 : 28 > plp ;restore status
>
08b8 : c042 > cpy #$42
> trap_ne ;y changed
08ba : d0fe > bne * ;failed not equal (non zero)
>
08bc : e000 > cpx #0
> trap_ne ;x changed
08be : d0fe > bne * ;failed not equal (non zero)
>
nop_test $44,2
08c0 : a042 > ldy #$42
08c2 : a202 > ldx #4-2
08c4 : 44 > db $44 ;test nop length
> if 2 = 1
> dex
> dex
> endif
> if 2 = 2
08c5 : c8 > iny
08c6 : ca > dex
> endif
> if 2 = 3
> iny
> iny
> endif
08c7 : ca > dex
> trap_ne ;wrong number of bytes
08c8 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$44,0
> load_flag 0
08ca : a900 > lda #0 ;allow test to change I-flag (no mask)
>
08cc : 48 > pha ;use stack to load status
08cd : a9bb > lda #$ff-$44 ;precharge accu
08cf : 28 > plp
>
08d0 : 44 > db $44 ;test nop integrity - flags off
08d1 : ea > nop
08d2 : ea > nop
> tst_a $ff-$44,0
08d3 : 08 > php ;save flags
08d4 : c9bb > cmp #$ff-$44 ;test result
> trap_ne
08d6 : d0fe > bne * ;failed not equal (non zero)
>
08d8 : 68 > pla ;load status
08d9 : 48 > pha
> cmp_flag 0
08da : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
08dc : d0fe > bne * ;failed not equal (non zero)
>
08de : 28 > plp ;restore status
>
> set_a $aa-$44,$ff
> load_flag $ff
08df : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
08e1 : 48 > pha ;use stack to load status
08e2 : a966 > lda #$aa-$44 ;precharge accu
08e4 : 28 > plp
>
08e5 : 44 > db $44 ;test nop integrity - flags on
08e6 : ea > nop
08e7 : ea > nop
> tst_a $aa-$44,$ff
08e8 : 08 > php ;save flags
08e9 : c966 > cmp #$aa-$44 ;test result
> trap_ne
08eb : d0fe > bne * ;failed not equal (non zero)
>
08ed : 68 > pla ;load status
08ee : 48 > pha
> cmp_flag $ff
08ef : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
08f1 : d0fe > bne * ;failed not equal (non zero)
>
08f3 : 28 > plp ;restore status
>
08f4 : c042 > cpy #$42
> trap_ne ;y changed
08f6 : d0fe > bne * ;failed not equal (non zero)
>
08f8 : e000 > cpx #0
> trap_ne ;x changed
08fa : d0fe > bne * ;failed not equal (non zero)
>
nop_test $54,2
08fc : a042 > ldy #$42
08fe : a202 > ldx #4-2
0900 : 54 > db $54 ;test nop length
> if 2 = 1
> dex
> dex
> endif
> if 2 = 2
0901 : c8 > iny
0902 : ca > dex
> endif
> if 2 = 3
> iny
> iny
> endif
0903 : ca > dex
> trap_ne ;wrong number of bytes
0904 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$54,0
> load_flag 0
0906 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0908 : 48 > pha ;use stack to load status
0909 : a9ab > lda #$ff-$54 ;precharge accu
090b : 28 > plp
>
090c : 54 > db $54 ;test nop integrity - flags off
090d : ea > nop
090e : ea > nop
> tst_a $ff-$54,0
090f : 08 > php ;save flags
0910 : c9ab > cmp #$ff-$54 ;test result
> trap_ne
0912 : d0fe > bne * ;failed not equal (non zero)
>
0914 : 68 > pla ;load status
0915 : 48 > pha
> cmp_flag 0
0916 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0918 : d0fe > bne * ;failed not equal (non zero)
>
091a : 28 > plp ;restore status
>
> set_a $aa-$54,$ff
> load_flag $ff
091b : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
091d : 48 > pha ;use stack to load status
091e : a956 > lda #$aa-$54 ;precharge accu
0920 : 28 > plp
>
0921 : 54 > db $54 ;test nop integrity - flags on
0922 : ea > nop
0923 : ea > nop
> tst_a $aa-$54,$ff
0924 : 08 > php ;save flags
0925 : c956 > cmp #$aa-$54 ;test result
> trap_ne
0927 : d0fe > bne * ;failed not equal (non zero)
>
0929 : 68 > pla ;load status
092a : 48 > pha
> cmp_flag $ff
092b : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
092d : d0fe > bne * ;failed not equal (non zero)
>
092f : 28 > plp ;restore status
>
0930 : c042 > cpy #$42
> trap_ne ;y changed
0932 : d0fe > bne * ;failed not equal (non zero)
>
0934 : e000 > cpx #0
> trap_ne ;x changed
0936 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $d4,2
0938 : a042 > ldy #$42
093a : a202 > ldx #4-2
093c : d4 > db $d4 ;test nop length
> if 2 = 1
> dex
> dex
> endif
> if 2 = 2
093d : c8 > iny
093e : ca > dex
> endif
> if 2 = 3
> iny
> iny
> endif
093f : ca > dex
> trap_ne ;wrong number of bytes
0940 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$d4,0
> load_flag 0
0942 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0944 : 48 > pha ;use stack to load status
0945 : a92b > lda #$ff-$d4 ;precharge accu
0947 : 28 > plp
>
0948 : d4 > db $d4 ;test nop integrity - flags off
0949 : ea > nop
094a : ea > nop
> tst_a $ff-$d4,0
094b : 08 > php ;save flags
094c : c92b > cmp #$ff-$d4 ;test result
> trap_ne
094e : d0fe > bne * ;failed not equal (non zero)
>
0950 : 68 > pla ;load status
0951 : 48 > pha
> cmp_flag 0
0952 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0954 : d0fe > bne * ;failed not equal (non zero)
>
0956 : 28 > plp ;restore status
>
> set_a $aa-$d4,$ff
> load_flag $ff
0957 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0959 : 48 > pha ;use stack to load status
095a : a9d6 > lda #$aa-$d4 ;precharge accu
095c : 28 > plp
>
095d : d4 > db $d4 ;test nop integrity - flags on
095e : ea > nop
095f : ea > nop
> tst_a $aa-$d4,$ff
0960 : 08 > php ;save flags
0961 : c9d6 > cmp #$aa-$d4 ;test result
> trap_ne
0963 : d0fe > bne * ;failed not equal (non zero)
>
0965 : 68 > pla ;load status
0966 : 48 > pha
> cmp_flag $ff
0967 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0969 : d0fe > bne * ;failed not equal (non zero)
>
096b : 28 > plp ;restore status
>
096c : c042 > cpy #$42
> trap_ne ;y changed
096e : d0fe > bne * ;failed not equal (non zero)
>
0970 : e000 > cpx #0
> trap_ne ;x changed
0972 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $f4,2
0974 : a042 > ldy #$42
0976 : a202 > ldx #4-2
0978 : f4 > db $f4 ;test nop length
> if 2 = 1
> dex
> dex
> endif
> if 2 = 2
0979 : c8 > iny
097a : ca > dex
> endif
> if 2 = 3
> iny
> iny
> endif
097b : ca > dex
> trap_ne ;wrong number of bytes
097c : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$f4,0
> load_flag 0
097e : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0980 : 48 > pha ;use stack to load status
0981 : a90b > lda #$ff-$f4 ;precharge accu
0983 : 28 > plp
>
0984 : f4 > db $f4 ;test nop integrity - flags off
0985 : ea > nop
0986 : ea > nop
> tst_a $ff-$f4,0
0987 : 08 > php ;save flags
0988 : c90b > cmp #$ff-$f4 ;test result
> trap_ne
098a : d0fe > bne * ;failed not equal (non zero)
>
098c : 68 > pla ;load status
098d : 48 > pha
> cmp_flag 0
098e : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0990 : d0fe > bne * ;failed not equal (non zero)
>
0992 : 28 > plp ;restore status
>
> set_a $aa-$f4,$ff
> load_flag $ff
0993 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0995 : 48 > pha ;use stack to load status
0996 : a9b6 > lda #$aa-$f4 ;precharge accu
0998 : 28 > plp
>
0999 : f4 > db $f4 ;test nop integrity - flags on
099a : ea > nop
099b : ea > nop
> tst_a $aa-$f4,$ff
099c : 08 > php ;save flags
099d : c9b6 > cmp #$aa-$f4 ;test result
> trap_ne
099f : d0fe > bne * ;failed not equal (non zero)
>
09a1 : 68 > pla ;load status
09a2 : 48 > pha
> cmp_flag $ff
09a3 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
09a5 : d0fe > bne * ;failed not equal (non zero)
>
09a7 : 28 > plp ;restore status
>
09a8 : c042 > cpy #$42
> trap_ne ;y changed
09aa : d0fe > bne * ;failed not equal (non zero)
>
09ac : e000 > cpx #0
> trap_ne ;x changed
09ae : d0fe > bne * ;failed not equal (non zero)
>
nop_test $5c,3
09b0 : a042 > ldy #$42
09b2 : a201 > ldx #4-3
09b4 : 5c > db $5c ;test nop length
> if 3 = 1
> dex
> dex
> endif
> if 3 = 2
> iny
> dex
> endif
> if 3 = 3
09b5 : c8 > iny
09b6 : c8 > iny
> endif
09b7 : ca > dex
> trap_ne ;wrong number of bytes
09b8 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$5c,0
> load_flag 0
09ba : a900 > lda #0 ;allow test to change I-flag (no mask)
>
09bc : 48 > pha ;use stack to load status
09bd : a9a3 > lda #$ff-$5c ;precharge accu
09bf : 28 > plp
>
09c0 : 5c > db $5c ;test nop integrity - flags off
09c1 : ea > nop
09c2 : ea > nop
> tst_a $ff-$5c,0
09c3 : 08 > php ;save flags
09c4 : c9a3 > cmp #$ff-$5c ;test result
> trap_ne
09c6 : d0fe > bne * ;failed not equal (non zero)
>
09c8 : 68 > pla ;load status
09c9 : 48 > pha
> cmp_flag 0
09ca : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
09cc : d0fe > bne * ;failed not equal (non zero)
>
09ce : 28 > plp ;restore status
>
> set_a $aa-$5c,$ff
> load_flag $ff
09cf : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
09d1 : 48 > pha ;use stack to load status
09d2 : a94e > lda #$aa-$5c ;precharge accu
09d4 : 28 > plp
>
09d5 : 5c > db $5c ;test nop integrity - flags on
09d6 : ea > nop
09d7 : ea > nop
> tst_a $aa-$5c,$ff
09d8 : 08 > php ;save flags
09d9 : c94e > cmp #$aa-$5c ;test result
> trap_ne
09db : d0fe > bne * ;failed not equal (non zero)
>
09dd : 68 > pla ;load status
09de : 48 > pha
> cmp_flag $ff
09df : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
09e1 : d0fe > bne * ;failed not equal (non zero)
>
09e3 : 28 > plp ;restore status
>
09e4 : c042 > cpy #$42
> trap_ne ;y changed
09e6 : d0fe > bne * ;failed not equal (non zero)
>
09e8 : e000 > cpx #0
> trap_ne ;x changed
09ea : d0fe > bne * ;failed not equal (non zero)
>
nop_test $dc,3
09ec : a042 > ldy #$42
09ee : a201 > ldx #4-3
09f0 : dc > db $dc ;test nop length
> if 3 = 1
> dex
> dex
> endif
> if 3 = 2
> iny
> dex
> endif
> if 3 = 3
09f1 : c8 > iny
09f2 : c8 > iny
> endif
09f3 : ca > dex
> trap_ne ;wrong number of bytes
09f4 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$dc,0
> load_flag 0
09f6 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
09f8 : 48 > pha ;use stack to load status
09f9 : a923 > lda #$ff-$dc ;precharge accu
09fb : 28 > plp
>
09fc : dc > db $dc ;test nop integrity - flags off
09fd : ea > nop
09fe : ea > nop
> tst_a $ff-$dc,0
09ff : 08 > php ;save flags
0a00 : c923 > cmp #$ff-$dc ;test result
> trap_ne
0a02 : d0fe > bne * ;failed not equal (non zero)
>
0a04 : 68 > pla ;load status
0a05 : 48 > pha
> cmp_flag 0
0a06 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a08 : d0fe > bne * ;failed not equal (non zero)
>
0a0a : 28 > plp ;restore status
>
> set_a $aa-$dc,$ff
> load_flag $ff
0a0b : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0a0d : 48 > pha ;use stack to load status
0a0e : a9ce > lda #$aa-$dc ;precharge accu
0a10 : 28 > plp
>
0a11 : dc > db $dc ;test nop integrity - flags on
0a12 : ea > nop
0a13 : ea > nop
> tst_a $aa-$dc,$ff
0a14 : 08 > php ;save flags
0a15 : c9ce > cmp #$aa-$dc ;test result
> trap_ne
0a17 : d0fe > bne * ;failed not equal (non zero)
>
0a19 : 68 > pla ;load status
0a1a : 48 > pha
> cmp_flag $ff
0a1b : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a1d : d0fe > bne * ;failed not equal (non zero)
>
0a1f : 28 > plp ;restore status
>
0a20 : c042 > cpy #$42
> trap_ne ;y changed
0a22 : d0fe > bne * ;failed not equal (non zero)
>
0a24 : e000 > cpx #0
> trap_ne ;x changed
0a26 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $fc,3
0a28 : a042 > ldy #$42
0a2a : a201 > ldx #4-3
0a2c : fc > db $fc ;test nop length
> if 3 = 1
> dex
> dex
> endif
> if 3 = 2
> iny
> dex
> endif
> if 3 = 3
0a2d : c8 > iny
0a2e : c8 > iny
> endif
0a2f : ca > dex
> trap_ne ;wrong number of bytes
0a30 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$fc,0
> load_flag 0
0a32 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0a34 : 48 > pha ;use stack to load status
0a35 : a903 > lda #$ff-$fc ;precharge accu
0a37 : 28 > plp
>
0a38 : fc > db $fc ;test nop integrity - flags off
0a39 : ea > nop
0a3a : ea > nop
> tst_a $ff-$fc,0
0a3b : 08 > php ;save flags
0a3c : c903 > cmp #$ff-$fc ;test result
> trap_ne
0a3e : d0fe > bne * ;failed not equal (non zero)
>
0a40 : 68 > pla ;load status
0a41 : 48 > pha
> cmp_flag 0
0a42 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a44 : d0fe > bne * ;failed not equal (non zero)
>
0a46 : 28 > plp ;restore status
>
> set_a $aa-$fc,$ff
> load_flag $ff
0a47 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0a49 : 48 > pha ;use stack to load status
0a4a : a9ae > lda #$aa-$fc ;precharge accu
0a4c : 28 > plp
>
0a4d : fc > db $fc ;test nop integrity - flags on
0a4e : ea > nop
0a4f : ea > nop
> tst_a $aa-$fc,$ff
0a50 : 08 > php ;save flags
0a51 : c9ae > cmp #$aa-$fc ;test result
> trap_ne
0a53 : d0fe > bne * ;failed not equal (non zero)
>
0a55 : 68 > pla ;load status
0a56 : 48 > pha
> cmp_flag $ff
0a57 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a59 : d0fe > bne * ;failed not equal (non zero)
>
0a5b : 28 > plp ;restore status
>
0a5c : c042 > cpy #$42
> trap_ne ;y changed
0a5e : d0fe > bne * ;failed not equal (non zero)
>
0a60 : e000 > cpx #0
> trap_ne ;x changed
0a62 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $03,1
0a64 : a042 > ldy #$42
0a66 : a203 > ldx #4-1
0a68 : 03 > db $03 ;test nop length
> if 1 = 1
0a69 : ca > dex
0a6a : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0a6b : ca > dex
> trap_ne ;wrong number of bytes
0a6c : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$03,0
> load_flag 0
0a6e : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0a70 : 48 > pha ;use stack to load status
0a71 : a9fc > lda #$ff-$03 ;precharge accu
0a73 : 28 > plp
>
0a74 : 03 > db $03 ;test nop integrity - flags off
0a75 : ea > nop
0a76 : ea > nop
> tst_a $ff-$03,0
0a77 : 08 > php ;save flags
0a78 : c9fc > cmp #$ff-$03 ;test result
> trap_ne
0a7a : d0fe > bne * ;failed not equal (non zero)
>
0a7c : 68 > pla ;load status
0a7d : 48 > pha
> cmp_flag 0
0a7e : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a80 : d0fe > bne * ;failed not equal (non zero)
>
0a82 : 28 > plp ;restore status
>
> set_a $aa-$03,$ff
> load_flag $ff
0a83 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0a85 : 48 > pha ;use stack to load status
0a86 : a9a7 > lda #$aa-$03 ;precharge accu
0a88 : 28 > plp
>
0a89 : 03 > db $03 ;test nop integrity - flags on
0a8a : ea > nop
0a8b : ea > nop
> tst_a $aa-$03,$ff
0a8c : 08 > php ;save flags
0a8d : c9a7 > cmp #$aa-$03 ;test result
> trap_ne
0a8f : d0fe > bne * ;failed not equal (non zero)
>
0a91 : 68 > pla ;load status
0a92 : 48 > pha
> cmp_flag $ff
0a93 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a95 : d0fe > bne * ;failed not equal (non zero)
>
0a97 : 28 > plp ;restore status
>
0a98 : c042 > cpy #$42
> trap_ne ;y changed
0a9a : d0fe > bne * ;failed not equal (non zero)
>
0a9c : e000 > cpx #0
> trap_ne ;x changed
0a9e : d0fe > bne * ;failed not equal (non zero)
>
nop_test $13,1
0aa0 : a042 > ldy #$42
0aa2 : a203 > ldx #4-1
0aa4 : 13 > db $13 ;test nop length
> if 1 = 1
0aa5 : ca > dex
0aa6 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0aa7 : ca > dex
> trap_ne ;wrong number of bytes
0aa8 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$13,0
> load_flag 0
0aaa : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0aac : 48 > pha ;use stack to load status
0aad : a9ec > lda #$ff-$13 ;precharge accu
0aaf : 28 > plp
>
0ab0 : 13 > db $13 ;test nop integrity - flags off
0ab1 : ea > nop
0ab2 : ea > nop
> tst_a $ff-$13,0
0ab3 : 08 > php ;save flags
0ab4 : c9ec > cmp #$ff-$13 ;test result
> trap_ne
0ab6 : d0fe > bne * ;failed not equal (non zero)
>
0ab8 : 68 > pla ;load status
0ab9 : 48 > pha
> cmp_flag 0
0aba : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0abc : d0fe > bne * ;failed not equal (non zero)
>
0abe : 28 > plp ;restore status
>
> set_a $aa-$13,$ff
> load_flag $ff
0abf : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0ac1 : 48 > pha ;use stack to load status
0ac2 : a997 > lda #$aa-$13 ;precharge accu
0ac4 : 28 > plp
>
0ac5 : 13 > db $13 ;test nop integrity - flags on
0ac6 : ea > nop
0ac7 : ea > nop
> tst_a $aa-$13,$ff
0ac8 : 08 > php ;save flags
0ac9 : c997 > cmp #$aa-$13 ;test result
> trap_ne
0acb : d0fe > bne * ;failed not equal (non zero)
>
0acd : 68 > pla ;load status
0ace : 48 > pha
> cmp_flag $ff
0acf : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0ad1 : d0fe > bne * ;failed not equal (non zero)
>
0ad3 : 28 > plp ;restore status
>
0ad4 : c042 > cpy #$42
> trap_ne ;y changed
0ad6 : d0fe > bne * ;failed not equal (non zero)
>
0ad8 : e000 > cpx #0
> trap_ne ;x changed
0ada : d0fe > bne * ;failed not equal (non zero)
>
nop_test $23,1
0adc : a042 > ldy #$42
0ade : a203 > ldx #4-1
0ae0 : 23 > db $23 ;test nop length
> if 1 = 1
0ae1 : ca > dex
0ae2 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0ae3 : ca > dex
> trap_ne ;wrong number of bytes
0ae4 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$23,0
> load_flag 0
0ae6 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0ae8 : 48 > pha ;use stack to load status
0ae9 : a9dc > lda #$ff-$23 ;precharge accu
0aeb : 28 > plp
>
0aec : 23 > db $23 ;test nop integrity - flags off
0aed : ea > nop
0aee : ea > nop
> tst_a $ff-$23,0
0aef : 08 > php ;save flags
0af0 : c9dc > cmp #$ff-$23 ;test result
> trap_ne
0af2 : d0fe > bne * ;failed not equal (non zero)
>
0af4 : 68 > pla ;load status
0af5 : 48 > pha
> cmp_flag 0
0af6 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0af8 : d0fe > bne * ;failed not equal (non zero)
>
0afa : 28 > plp ;restore status
>
> set_a $aa-$23,$ff
> load_flag $ff
0afb : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0afd : 48 > pha ;use stack to load status
0afe : a987 > lda #$aa-$23 ;precharge accu
0b00 : 28 > plp
>
0b01 : 23 > db $23 ;test nop integrity - flags on
0b02 : ea > nop
0b03 : ea > nop
> tst_a $aa-$23,$ff
0b04 : 08 > php ;save flags
0b05 : c987 > cmp #$aa-$23 ;test result
> trap_ne
0b07 : d0fe > bne * ;failed not equal (non zero)
>
0b09 : 68 > pla ;load status
0b0a : 48 > pha
> cmp_flag $ff
0b0b : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0b0d : d0fe > bne * ;failed not equal (non zero)
>
0b0f : 28 > plp ;restore status
>
0b10 : c042 > cpy #$42
> trap_ne ;y changed
0b12 : d0fe > bne * ;failed not equal (non zero)
>
0b14 : e000 > cpx #0
> trap_ne ;x changed
0b16 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $33,1
0b18 : a042 > ldy #$42
0b1a : a203 > ldx #4-1
0b1c : 33 > db $33 ;test nop length
> if 1 = 1
0b1d : ca > dex
0b1e : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0b1f : ca > dex
> trap_ne ;wrong number of bytes
0b20 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$33,0
> load_flag 0
0b22 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0b24 : 48 > pha ;use stack to load status
0b25 : a9cc > lda #$ff-$33 ;precharge accu
0b27 : 28 > plp
>
0b28 : 33 > db $33 ;test nop integrity - flags off
0b29 : ea > nop
0b2a : ea > nop
> tst_a $ff-$33,0
0b2b : 08 > php ;save flags
0b2c : c9cc > cmp #$ff-$33 ;test result
> trap_ne
0b2e : d0fe > bne * ;failed not equal (non zero)
>
0b30 : 68 > pla ;load status
0b31 : 48 > pha
> cmp_flag 0
0b32 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0b34 : d0fe > bne * ;failed not equal (non zero)
>
0b36 : 28 > plp ;restore status
>
> set_a $aa-$33,$ff
> load_flag $ff
0b37 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0b39 : 48 > pha ;use stack to load status
0b3a : a977 > lda #$aa-$33 ;precharge accu
0b3c : 28 > plp
>
0b3d : 33 > db $33 ;test nop integrity - flags on
0b3e : ea > nop
0b3f : ea > nop
> tst_a $aa-$33,$ff
0b40 : 08 > php ;save flags
0b41 : c977 > cmp #$aa-$33 ;test result
> trap_ne
0b43 : d0fe > bne * ;failed not equal (non zero)
>
0b45 : 68 > pla ;load status
0b46 : 48 > pha
> cmp_flag $ff
0b47 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0b49 : d0fe > bne * ;failed not equal (non zero)
>
0b4b : 28 > plp ;restore status
>
0b4c : c042 > cpy #$42
> trap_ne ;y changed
0b4e : d0fe > bne * ;failed not equal (non zero)
>
0b50 : e000 > cpx #0
> trap_ne ;x changed
0b52 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $43,1
0b54 : a042 > ldy #$42
0b56 : a203 > ldx #4-1
0b58 : 43 > db $43 ;test nop length
> if 1 = 1
0b59 : ca > dex
0b5a : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0b5b : ca > dex
> trap_ne ;wrong number of bytes
0b5c : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$43,0
> load_flag 0
0b5e : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0b60 : 48 > pha ;use stack to load status
0b61 : a9bc > lda #$ff-$43 ;precharge accu
0b63 : 28 > plp
>
0b64 : 43 > db $43 ;test nop integrity - flags off
0b65 : ea > nop
0b66 : ea > nop
> tst_a $ff-$43,0
0b67 : 08 > php ;save flags
0b68 : c9bc > cmp #$ff-$43 ;test result
> trap_ne
0b6a : d0fe > bne * ;failed not equal (non zero)
>
0b6c : 68 > pla ;load status
0b6d : 48 > pha
> cmp_flag 0
0b6e : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0b70 : d0fe > bne * ;failed not equal (non zero)
>
0b72 : 28 > plp ;restore status
>
> set_a $aa-$43,$ff
> load_flag $ff
0b73 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0b75 : 48 > pha ;use stack to load status
0b76 : a967 > lda #$aa-$43 ;precharge accu
0b78 : 28 > plp
>
0b79 : 43 > db $43 ;test nop integrity - flags on
0b7a : ea > nop
0b7b : ea > nop
> tst_a $aa-$43,$ff
0b7c : 08 > php ;save flags
0b7d : c967 > cmp #$aa-$43 ;test result
> trap_ne
0b7f : d0fe > bne * ;failed not equal (non zero)
>
0b81 : 68 > pla ;load status
0b82 : 48 > pha
> cmp_flag $ff
0b83 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0b85 : d0fe > bne * ;failed not equal (non zero)
>
0b87 : 28 > plp ;restore status
>
0b88 : c042 > cpy #$42
> trap_ne ;y changed
0b8a : d0fe > bne * ;failed not equal (non zero)
>
0b8c : e000 > cpx #0
> trap_ne ;x changed
0b8e : d0fe > bne * ;failed not equal (non zero)
>
nop_test $53,1
0b90 : a042 > ldy #$42
0b92 : a203 > ldx #4-1
0b94 : 53 > db $53 ;test nop length
> if 1 = 1
0b95 : ca > dex
0b96 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0b97 : ca > dex
> trap_ne ;wrong number of bytes
0b98 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$53,0
> load_flag 0
0b9a : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0b9c : 48 > pha ;use stack to load status
0b9d : a9ac > lda #$ff-$53 ;precharge accu
0b9f : 28 > plp
>
0ba0 : 53 > db $53 ;test nop integrity - flags off
0ba1 : ea > nop
0ba2 : ea > nop
> tst_a $ff-$53,0
0ba3 : 08 > php ;save flags
0ba4 : c9ac > cmp #$ff-$53 ;test result
> trap_ne
0ba6 : d0fe > bne * ;failed not equal (non zero)
>
0ba8 : 68 > pla ;load status
0ba9 : 48 > pha
> cmp_flag 0
0baa : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0bac : d0fe > bne * ;failed not equal (non zero)
>
0bae : 28 > plp ;restore status
>
> set_a $aa-$53,$ff
> load_flag $ff
0baf : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0bb1 : 48 > pha ;use stack to load status
0bb2 : a957 > lda #$aa-$53 ;precharge accu
0bb4 : 28 > plp
>
0bb5 : 53 > db $53 ;test nop integrity - flags on
0bb6 : ea > nop
0bb7 : ea > nop
> tst_a $aa-$53,$ff
0bb8 : 08 > php ;save flags
0bb9 : c957 > cmp #$aa-$53 ;test result
> trap_ne
0bbb : d0fe > bne * ;failed not equal (non zero)
>
0bbd : 68 > pla ;load status
0bbe : 48 > pha
> cmp_flag $ff
0bbf : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0bc1 : d0fe > bne * ;failed not equal (non zero)
>
0bc3 : 28 > plp ;restore status
>
0bc4 : c042 > cpy #$42
> trap_ne ;y changed
0bc6 : d0fe > bne * ;failed not equal (non zero)
>
0bc8 : e000 > cpx #0
> trap_ne ;x changed
0bca : d0fe > bne * ;failed not equal (non zero)
>
nop_test $63,1
0bcc : a042 > ldy #$42
0bce : a203 > ldx #4-1
0bd0 : 63 > db $63 ;test nop length
> if 1 = 1
0bd1 : ca > dex
0bd2 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0bd3 : ca > dex
> trap_ne ;wrong number of bytes
0bd4 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$63,0
> load_flag 0
0bd6 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0bd8 : 48 > pha ;use stack to load status
0bd9 : a99c > lda #$ff-$63 ;precharge accu
0bdb : 28 > plp
>
0bdc : 63 > db $63 ;test nop integrity - flags off
0bdd : ea > nop
0bde : ea > nop
> tst_a $ff-$63,0
0bdf : 08 > php ;save flags
0be0 : c99c > cmp #$ff-$63 ;test result
> trap_ne
0be2 : d0fe > bne * ;failed not equal (non zero)
>
0be4 : 68 > pla ;load status
0be5 : 48 > pha
> cmp_flag 0
0be6 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0be8 : d0fe > bne * ;failed not equal (non zero)
>
0bea : 28 > plp ;restore status
>
> set_a $aa-$63,$ff
> load_flag $ff
0beb : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0bed : 48 > pha ;use stack to load status
0bee : a947 > lda #$aa-$63 ;precharge accu
0bf0 : 28 > plp
>
0bf1 : 63 > db $63 ;test nop integrity - flags on
0bf2 : ea > nop
0bf3 : ea > nop
> tst_a $aa-$63,$ff
0bf4 : 08 > php ;save flags
0bf5 : c947 > cmp #$aa-$63 ;test result
> trap_ne
0bf7 : d0fe > bne * ;failed not equal (non zero)
>
0bf9 : 68 > pla ;load status
0bfa : 48 > pha
> cmp_flag $ff
0bfb : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0bfd : d0fe > bne * ;failed not equal (non zero)
>
0bff : 28 > plp ;restore status
>
0c00 : c042 > cpy #$42
> trap_ne ;y changed
0c02 : d0fe > bne * ;failed not equal (non zero)
>
0c04 : e000 > cpx #0
> trap_ne ;x changed
0c06 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $73,1
0c08 : a042 > ldy #$42
0c0a : a203 > ldx #4-1
0c0c : 73 > db $73 ;test nop length
> if 1 = 1
0c0d : ca > dex
0c0e : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0c0f : ca > dex
> trap_ne ;wrong number of bytes
0c10 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$73,0
> load_flag 0
0c12 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0c14 : 48 > pha ;use stack to load status
0c15 : a98c > lda #$ff-$73 ;precharge accu
0c17 : 28 > plp
>
0c18 : 73 > db $73 ;test nop integrity - flags off
0c19 : ea > nop
0c1a : ea > nop
> tst_a $ff-$73,0
0c1b : 08 > php ;save flags
0c1c : c98c > cmp #$ff-$73 ;test result
> trap_ne
0c1e : d0fe > bne * ;failed not equal (non zero)
>
0c20 : 68 > pla ;load status
0c21 : 48 > pha
> cmp_flag 0
0c22 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0c24 : d0fe > bne * ;failed not equal (non zero)
>
0c26 : 28 > plp ;restore status
>
> set_a $aa-$73,$ff
> load_flag $ff
0c27 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0c29 : 48 > pha ;use stack to load status
0c2a : a937 > lda #$aa-$73 ;precharge accu
0c2c : 28 > plp
>
0c2d : 73 > db $73 ;test nop integrity - flags on
0c2e : ea > nop
0c2f : ea > nop
> tst_a $aa-$73,$ff
0c30 : 08 > php ;save flags
0c31 : c937 > cmp #$aa-$73 ;test result
> trap_ne
0c33 : d0fe > bne * ;failed not equal (non zero)
>
0c35 : 68 > pla ;load status
0c36 : 48 > pha
> cmp_flag $ff
0c37 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0c39 : d0fe > bne * ;failed not equal (non zero)
>
0c3b : 28 > plp ;restore status
>
0c3c : c042 > cpy #$42
> trap_ne ;y changed
0c3e : d0fe > bne * ;failed not equal (non zero)
>
0c40 : e000 > cpx #0
> trap_ne ;x changed
0c42 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $83,1
0c44 : a042 > ldy #$42
0c46 : a203 > ldx #4-1
0c48 : 83 > db $83 ;test nop length
> if 1 = 1
0c49 : ca > dex
0c4a : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0c4b : ca > dex
> trap_ne ;wrong number of bytes
0c4c : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$83,0
> load_flag 0
0c4e : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0c50 : 48 > pha ;use stack to load status
0c51 : a97c > lda #$ff-$83 ;precharge accu
0c53 : 28 > plp
>
0c54 : 83 > db $83 ;test nop integrity - flags off
0c55 : ea > nop
0c56 : ea > nop
> tst_a $ff-$83,0
0c57 : 08 > php ;save flags
0c58 : c97c > cmp #$ff-$83 ;test result
> trap_ne
0c5a : d0fe > bne * ;failed not equal (non zero)
>
0c5c : 68 > pla ;load status
0c5d : 48 > pha
> cmp_flag 0
0c5e : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0c60 : d0fe > bne * ;failed not equal (non zero)
>
0c62 : 28 > plp ;restore status
>
> set_a $aa-$83,$ff
> load_flag $ff
0c63 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0c65 : 48 > pha ;use stack to load status
0c66 : a927 > lda #$aa-$83 ;precharge accu
0c68 : 28 > plp
>
0c69 : 83 > db $83 ;test nop integrity - flags on
0c6a : ea > nop
0c6b : ea > nop
> tst_a $aa-$83,$ff
0c6c : 08 > php ;save flags
0c6d : c927 > cmp #$aa-$83 ;test result
> trap_ne
0c6f : d0fe > bne * ;failed not equal (non zero)
>
0c71 : 68 > pla ;load status
0c72 : 48 > pha
> cmp_flag $ff
0c73 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0c75 : d0fe > bne * ;failed not equal (non zero)
>
0c77 : 28 > plp ;restore status
>
0c78 : c042 > cpy #$42
> trap_ne ;y changed
0c7a : d0fe > bne * ;failed not equal (non zero)
>
0c7c : e000 > cpx #0
> trap_ne ;x changed
0c7e : d0fe > bne * ;failed not equal (non zero)
>
nop_test $93,1
0c80 : a042 > ldy #$42
0c82 : a203 > ldx #4-1
0c84 : 93 > db $93 ;test nop length
> if 1 = 1
0c85 : ca > dex
0c86 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0c87 : ca > dex
> trap_ne ;wrong number of bytes
0c88 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$93,0
> load_flag 0
0c8a : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0c8c : 48 > pha ;use stack to load status
0c8d : a96c > lda #$ff-$93 ;precharge accu
0c8f : 28 > plp
>
0c90 : 93 > db $93 ;test nop integrity - flags off
0c91 : ea > nop
0c92 : ea > nop
> tst_a $ff-$93,0
0c93 : 08 > php ;save flags
0c94 : c96c > cmp #$ff-$93 ;test result
> trap_ne
0c96 : d0fe > bne * ;failed not equal (non zero)
>
0c98 : 68 > pla ;load status
0c99 : 48 > pha
> cmp_flag 0
0c9a : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0c9c : d0fe > bne * ;failed not equal (non zero)
>
0c9e : 28 > plp ;restore status
>
> set_a $aa-$93,$ff
> load_flag $ff
0c9f : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0ca1 : 48 > pha ;use stack to load status
0ca2 : a917 > lda #$aa-$93 ;precharge accu
0ca4 : 28 > plp
>
0ca5 : 93 > db $93 ;test nop integrity - flags on
0ca6 : ea > nop
0ca7 : ea > nop
> tst_a $aa-$93,$ff
0ca8 : 08 > php ;save flags
0ca9 : c917 > cmp #$aa-$93 ;test result
> trap_ne
0cab : d0fe > bne * ;failed not equal (non zero)
>
0cad : 68 > pla ;load status
0cae : 48 > pha
> cmp_flag $ff
0caf : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0cb1 : d0fe > bne * ;failed not equal (non zero)
>
0cb3 : 28 > plp ;restore status
>
0cb4 : c042 > cpy #$42
> trap_ne ;y changed
0cb6 : d0fe > bne * ;failed not equal (non zero)
>
0cb8 : e000 > cpx #0
> trap_ne ;x changed
0cba : d0fe > bne * ;failed not equal (non zero)
>
nop_test $a3,1
0cbc : a042 > ldy #$42
0cbe : a203 > ldx #4-1
0cc0 : a3 > db $a3 ;test nop length
> if 1 = 1
0cc1 : ca > dex
0cc2 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0cc3 : ca > dex
> trap_ne ;wrong number of bytes
0cc4 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$a3,0
> load_flag 0
0cc6 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0cc8 : 48 > pha ;use stack to load status
0cc9 : a95c > lda #$ff-$a3 ;precharge accu
0ccb : 28 > plp
>
0ccc : a3 > db $a3 ;test nop integrity - flags off
0ccd : ea > nop
0cce : ea > nop
> tst_a $ff-$a3,0
0ccf : 08 > php ;save flags
0cd0 : c95c > cmp #$ff-$a3 ;test result
> trap_ne
0cd2 : d0fe > bne * ;failed not equal (non zero)
>
0cd4 : 68 > pla ;load status
0cd5 : 48 > pha
> cmp_flag 0
0cd6 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0cd8 : d0fe > bne * ;failed not equal (non zero)
>
0cda : 28 > plp ;restore status
>
> set_a $aa-$a3,$ff
> load_flag $ff
0cdb : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0cdd : 48 > pha ;use stack to load status
0cde : a907 > lda #$aa-$a3 ;precharge accu
0ce0 : 28 > plp
>
0ce1 : a3 > db $a3 ;test nop integrity - flags on
0ce2 : ea > nop
0ce3 : ea > nop
> tst_a $aa-$a3,$ff
0ce4 : 08 > php ;save flags
0ce5 : c907 > cmp #$aa-$a3 ;test result
> trap_ne
0ce7 : d0fe > bne * ;failed not equal (non zero)
>
0ce9 : 68 > pla ;load status
0cea : 48 > pha
> cmp_flag $ff
0ceb : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0ced : d0fe > bne * ;failed not equal (non zero)
>
0cef : 28 > plp ;restore status
>
0cf0 : c042 > cpy #$42
> trap_ne ;y changed
0cf2 : d0fe > bne * ;failed not equal (non zero)
>
0cf4 : e000 > cpx #0
> trap_ne ;x changed
0cf6 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $b3,1
0cf8 : a042 > ldy #$42
0cfa : a203 > ldx #4-1
0cfc : b3 > db $b3 ;test nop length
> if 1 = 1
0cfd : ca > dex
0cfe : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0cff : ca > dex
> trap_ne ;wrong number of bytes
0d00 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$b3,0
> load_flag 0
0d02 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0d04 : 48 > pha ;use stack to load status
0d05 : a94c > lda #$ff-$b3 ;precharge accu
0d07 : 28 > plp
>
0d08 : b3 > db $b3 ;test nop integrity - flags off
0d09 : ea > nop
0d0a : ea > nop
> tst_a $ff-$b3,0
0d0b : 08 > php ;save flags
0d0c : c94c > cmp #$ff-$b3 ;test result
> trap_ne
0d0e : d0fe > bne * ;failed not equal (non zero)
>
0d10 : 68 > pla ;load status
0d11 : 48 > pha
> cmp_flag 0
0d12 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0d14 : d0fe > bne * ;failed not equal (non zero)
>
0d16 : 28 > plp ;restore status
>
> set_a $aa-$b3,$ff
> load_flag $ff
0d17 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0d19 : 48 > pha ;use stack to load status
0d1a : a9f7 > lda #$aa-$b3 ;precharge accu
0d1c : 28 > plp
>
0d1d : b3 > db $b3 ;test nop integrity - flags on
0d1e : ea > nop
0d1f : ea > nop
> tst_a $aa-$b3,$ff
0d20 : 08 > php ;save flags
0d21 : c9f7 > cmp #$aa-$b3 ;test result
> trap_ne
0d23 : d0fe > bne * ;failed not equal (non zero)
>
0d25 : 68 > pla ;load status
0d26 : 48 > pha
> cmp_flag $ff
0d27 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0d29 : d0fe > bne * ;failed not equal (non zero)
>
0d2b : 28 > plp ;restore status
>
0d2c : c042 > cpy #$42
> trap_ne ;y changed
0d2e : d0fe > bne * ;failed not equal (non zero)
>
0d30 : e000 > cpx #0
> trap_ne ;x changed
0d32 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $c3,1
0d34 : a042 > ldy #$42
0d36 : a203 > ldx #4-1
0d38 : c3 > db $c3 ;test nop length
> if 1 = 1
0d39 : ca > dex
0d3a : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0d3b : ca > dex
> trap_ne ;wrong number of bytes
0d3c : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$c3,0
> load_flag 0
0d3e : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0d40 : 48 > pha ;use stack to load status
0d41 : a93c > lda #$ff-$c3 ;precharge accu
0d43 : 28 > plp
>
0d44 : c3 > db $c3 ;test nop integrity - flags off
0d45 : ea > nop
0d46 : ea > nop
> tst_a $ff-$c3,0
0d47 : 08 > php ;save flags
0d48 : c93c > cmp #$ff-$c3 ;test result
> trap_ne
0d4a : d0fe > bne * ;failed not equal (non zero)
>
0d4c : 68 > pla ;load status
0d4d : 48 > pha
> cmp_flag 0
0d4e : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0d50 : d0fe > bne * ;failed not equal (non zero)
>
0d52 : 28 > plp ;restore status
>
> set_a $aa-$c3,$ff
> load_flag $ff
0d53 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0d55 : 48 > pha ;use stack to load status
0d56 : a9e7 > lda #$aa-$c3 ;precharge accu
0d58 : 28 > plp
>
0d59 : c3 > db $c3 ;test nop integrity - flags on
0d5a : ea > nop
0d5b : ea > nop
> tst_a $aa-$c3,$ff
0d5c : 08 > php ;save flags
0d5d : c9e7 > cmp #$aa-$c3 ;test result
> trap_ne
0d5f : d0fe > bne * ;failed not equal (non zero)
>
0d61 : 68 > pla ;load status
0d62 : 48 > pha
> cmp_flag $ff
0d63 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0d65 : d0fe > bne * ;failed not equal (non zero)
>
0d67 : 28 > plp ;restore status
>
0d68 : c042 > cpy #$42
> trap_ne ;y changed
0d6a : d0fe > bne * ;failed not equal (non zero)
>
0d6c : e000 > cpx #0
> trap_ne ;x changed
0d6e : d0fe > bne * ;failed not equal (non zero)
>
nop_test $d3,1
0d70 : a042 > ldy #$42
0d72 : a203 > ldx #4-1
0d74 : d3 > db $d3 ;test nop length
> if 1 = 1
0d75 : ca > dex
0d76 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0d77 : ca > dex
> trap_ne ;wrong number of bytes
0d78 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$d3,0
> load_flag 0
0d7a : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0d7c : 48 > pha ;use stack to load status
0d7d : a92c > lda #$ff-$d3 ;precharge accu
0d7f : 28 > plp
>
0d80 : d3 > db $d3 ;test nop integrity - flags off
0d81 : ea > nop
0d82 : ea > nop
> tst_a $ff-$d3,0
0d83 : 08 > php ;save flags
0d84 : c92c > cmp #$ff-$d3 ;test result
> trap_ne
0d86 : d0fe > bne * ;failed not equal (non zero)
>
0d88 : 68 > pla ;load status
0d89 : 48 > pha
> cmp_flag 0
0d8a : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0d8c : d0fe > bne * ;failed not equal (non zero)
>
0d8e : 28 > plp ;restore status
>
> set_a $aa-$d3,$ff
> load_flag $ff
0d8f : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0d91 : 48 > pha ;use stack to load status
0d92 : a9d7 > lda #$aa-$d3 ;precharge accu
0d94 : 28 > plp
>
0d95 : d3 > db $d3 ;test nop integrity - flags on
0d96 : ea > nop
0d97 : ea > nop
> tst_a $aa-$d3,$ff
0d98 : 08 > php ;save flags
0d99 : c9d7 > cmp #$aa-$d3 ;test result
> trap_ne
0d9b : d0fe > bne * ;failed not equal (non zero)
>
0d9d : 68 > pla ;load status
0d9e : 48 > pha
> cmp_flag $ff
0d9f : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0da1 : d0fe > bne * ;failed not equal (non zero)
>
0da3 : 28 > plp ;restore status
>
0da4 : c042 > cpy #$42
> trap_ne ;y changed
0da6 : d0fe > bne * ;failed not equal (non zero)
>
0da8 : e000 > cpx #0
> trap_ne ;x changed
0daa : d0fe > bne * ;failed not equal (non zero)
>
nop_test $e3,1
0dac : a042 > ldy #$42
0dae : a203 > ldx #4-1
0db0 : e3 > db $e3 ;test nop length
> if 1 = 1
0db1 : ca > dex
0db2 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0db3 : ca > dex
> trap_ne ;wrong number of bytes
0db4 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$e3,0
> load_flag 0
0db6 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0db8 : 48 > pha ;use stack to load status
0db9 : a91c > lda #$ff-$e3 ;precharge accu
0dbb : 28 > plp
>
0dbc : e3 > db $e3 ;test nop integrity - flags off
0dbd : ea > nop
0dbe : ea > nop
> tst_a $ff-$e3,0
0dbf : 08 > php ;save flags
0dc0 : c91c > cmp #$ff-$e3 ;test result
> trap_ne
0dc2 : d0fe > bne * ;failed not equal (non zero)
>
0dc4 : 68 > pla ;load status
0dc5 : 48 > pha
> cmp_flag 0
0dc6 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0dc8 : d0fe > bne * ;failed not equal (non zero)
>
0dca : 28 > plp ;restore status
>
> set_a $aa-$e3,$ff
> load_flag $ff
0dcb : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0dcd : 48 > pha ;use stack to load status
0dce : a9c7 > lda #$aa-$e3 ;precharge accu
0dd0 : 28 > plp
>
0dd1 : e3 > db $e3 ;test nop integrity - flags on
0dd2 : ea > nop
0dd3 : ea > nop
> tst_a $aa-$e3,$ff
0dd4 : 08 > php ;save flags
0dd5 : c9c7 > cmp #$aa-$e3 ;test result
> trap_ne
0dd7 : d0fe > bne * ;failed not equal (non zero)
>
0dd9 : 68 > pla ;load status
0dda : 48 > pha
> cmp_flag $ff
0ddb : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0ddd : d0fe > bne * ;failed not equal (non zero)
>
0ddf : 28 > plp ;restore status
>
0de0 : c042 > cpy #$42
> trap_ne ;y changed
0de2 : d0fe > bne * ;failed not equal (non zero)
>
0de4 : e000 > cpx #0
> trap_ne ;x changed
0de6 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $f3,1
0de8 : a042 > ldy #$42
0dea : a203 > ldx #4-1
0dec : f3 > db $f3 ;test nop length
> if 1 = 1
0ded : ca > dex
0dee : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0def : ca > dex
> trap_ne ;wrong number of bytes
0df0 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$f3,0
> load_flag 0
0df2 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0df4 : 48 > pha ;use stack to load status
0df5 : a90c > lda #$ff-$f3 ;precharge accu
0df7 : 28 > plp
>
0df8 : f3 > db $f3 ;test nop integrity - flags off
0df9 : ea > nop
0dfa : ea > nop
> tst_a $ff-$f3,0
0dfb : 08 > php ;save flags
0dfc : c90c > cmp #$ff-$f3 ;test result
> trap_ne
0dfe : d0fe > bne * ;failed not equal (non zero)
>
0e00 : 68 > pla ;load status
0e01 : 48 > pha
> cmp_flag 0
0e02 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0e04 : d0fe > bne * ;failed not equal (non zero)
>
0e06 : 28 > plp ;restore status
>
> set_a $aa-$f3,$ff
> load_flag $ff
0e07 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0e09 : 48 > pha ;use stack to load status
0e0a : a9b7 > lda #$aa-$f3 ;precharge accu
0e0c : 28 > plp
>
0e0d : f3 > db $f3 ;test nop integrity - flags on
0e0e : ea > nop
0e0f : ea > nop
> tst_a $aa-$f3,$ff
0e10 : 08 > php ;save flags
0e11 : c9b7 > cmp #$aa-$f3 ;test result
> trap_ne
0e13 : d0fe > bne * ;failed not equal (non zero)
>
0e15 : 68 > pla ;load status
0e16 : 48 > pha
> cmp_flag $ff
0e17 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0e19 : d0fe > bne * ;failed not equal (non zero)
>
0e1b : 28 > plp ;restore status
>
0e1c : c042 > cpy #$42
> trap_ne ;y changed
0e1e : d0fe > bne * ;failed not equal (non zero)
>
0e20 : e000 > cpx #0
> trap_ne ;x changed
0e22 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $0b,1
0e24 : a042 > ldy #$42
0e26 : a203 > ldx #4-1
0e28 : 0b > db $0b ;test nop length
> if 1 = 1
0e29 : ca > dex
0e2a : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0e2b : ca > dex
> trap_ne ;wrong number of bytes
0e2c : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$0b,0
> load_flag 0
0e2e : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0e30 : 48 > pha ;use stack to load status
0e31 : a9f4 > lda #$ff-$0b ;precharge accu
0e33 : 28 > plp
>
0e34 : 0b > db $0b ;test nop integrity - flags off
0e35 : ea > nop
0e36 : ea > nop
> tst_a $ff-$0b,0
0e37 : 08 > php ;save flags
0e38 : c9f4 > cmp #$ff-$0b ;test result
> trap_ne
0e3a : d0fe > bne * ;failed not equal (non zero)
>
0e3c : 68 > pla ;load status
0e3d : 48 > pha
> cmp_flag 0
0e3e : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0e40 : d0fe > bne * ;failed not equal (non zero)
>
0e42 : 28 > plp ;restore status
>
> set_a $aa-$0b,$ff
> load_flag $ff
0e43 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0e45 : 48 > pha ;use stack to load status
0e46 : a99f > lda #$aa-$0b ;precharge accu
0e48 : 28 > plp
>
0e49 : 0b > db $0b ;test nop integrity - flags on
0e4a : ea > nop
0e4b : ea > nop
> tst_a $aa-$0b,$ff
0e4c : 08 > php ;save flags
0e4d : c99f > cmp #$aa-$0b ;test result
> trap_ne
0e4f : d0fe > bne * ;failed not equal (non zero)
>
0e51 : 68 > pla ;load status
0e52 : 48 > pha
> cmp_flag $ff
0e53 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0e55 : d0fe > bne * ;failed not equal (non zero)
>
0e57 : 28 > plp ;restore status
>
0e58 : c042 > cpy #$42
> trap_ne ;y changed
0e5a : d0fe > bne * ;failed not equal (non zero)
>
0e5c : e000 > cpx #0
> trap_ne ;x changed
0e5e : d0fe > bne * ;failed not equal (non zero)
>
nop_test $1b,1
0e60 : a042 > ldy #$42
0e62 : a203 > ldx #4-1
0e64 : 1b > db $1b ;test nop length
> if 1 = 1
0e65 : ca > dex
0e66 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0e67 : ca > dex
> trap_ne ;wrong number of bytes
0e68 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$1b,0
> load_flag 0
0e6a : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0e6c : 48 > pha ;use stack to load status
0e6d : a9e4 > lda #$ff-$1b ;precharge accu
0e6f : 28 > plp
>
0e70 : 1b > db $1b ;test nop integrity - flags off
0e71 : ea > nop
0e72 : ea > nop
> tst_a $ff-$1b,0
0e73 : 08 > php ;save flags
0e74 : c9e4 > cmp #$ff-$1b ;test result
> trap_ne
0e76 : d0fe > bne * ;failed not equal (non zero)
>
0e78 : 68 > pla ;load status
0e79 : 48 > pha
> cmp_flag 0
0e7a : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0e7c : d0fe > bne * ;failed not equal (non zero)
>
0e7e : 28 > plp ;restore status
>
> set_a $aa-$1b,$ff
> load_flag $ff
0e7f : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0e81 : 48 > pha ;use stack to load status
0e82 : a98f > lda #$aa-$1b ;precharge accu
0e84 : 28 > plp
>
0e85 : 1b > db $1b ;test nop integrity - flags on
0e86 : ea > nop
0e87 : ea > nop
> tst_a $aa-$1b,$ff
0e88 : 08 > php ;save flags
0e89 : c98f > cmp #$aa-$1b ;test result
> trap_ne
0e8b : d0fe > bne * ;failed not equal (non zero)
>
0e8d : 68 > pla ;load status
0e8e : 48 > pha
> cmp_flag $ff
0e8f : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0e91 : d0fe > bne * ;failed not equal (non zero)
>
0e93 : 28 > plp ;restore status
>
0e94 : c042 > cpy #$42
> trap_ne ;y changed
0e96 : d0fe > bne * ;failed not equal (non zero)
>
0e98 : e000 > cpx #0
> trap_ne ;x changed
0e9a : d0fe > bne * ;failed not equal (non zero)
>
nop_test $2b,1
0e9c : a042 > ldy #$42
0e9e : a203 > ldx #4-1
0ea0 : 2b > db $2b ;test nop length
> if 1 = 1
0ea1 : ca > dex
0ea2 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0ea3 : ca > dex
> trap_ne ;wrong number of bytes
0ea4 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$2b,0
> load_flag 0
0ea6 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0ea8 : 48 > pha ;use stack to load status
0ea9 : a9d4 > lda #$ff-$2b ;precharge accu
0eab : 28 > plp
>
0eac : 2b > db $2b ;test nop integrity - flags off
0ead : ea > nop
0eae : ea > nop
> tst_a $ff-$2b,0
0eaf : 08 > php ;save flags
0eb0 : c9d4 > cmp #$ff-$2b ;test result
> trap_ne
0eb2 : d0fe > bne * ;failed not equal (non zero)
>
0eb4 : 68 > pla ;load status
0eb5 : 48 > pha
> cmp_flag 0
0eb6 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0eb8 : d0fe > bne * ;failed not equal (non zero)
>
0eba : 28 > plp ;restore status
>
> set_a $aa-$2b,$ff
> load_flag $ff
0ebb : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0ebd : 48 > pha ;use stack to load status
0ebe : a97f > lda #$aa-$2b ;precharge accu
0ec0 : 28 > plp
>
0ec1 : 2b > db $2b ;test nop integrity - flags on
0ec2 : ea > nop
0ec3 : ea > nop
> tst_a $aa-$2b,$ff
0ec4 : 08 > php ;save flags
0ec5 : c97f > cmp #$aa-$2b ;test result
> trap_ne
0ec7 : d0fe > bne * ;failed not equal (non zero)
>
0ec9 : 68 > pla ;load status
0eca : 48 > pha
> cmp_flag $ff
0ecb : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0ecd : d0fe > bne * ;failed not equal (non zero)
>
0ecf : 28 > plp ;restore status
>
0ed0 : c042 > cpy #$42
> trap_ne ;y changed
0ed2 : d0fe > bne * ;failed not equal (non zero)
>
0ed4 : e000 > cpx #0
> trap_ne ;x changed
0ed6 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $3b,1
0ed8 : a042 > ldy #$42
0eda : a203 > ldx #4-1
0edc : 3b > db $3b ;test nop length
> if 1 = 1
0edd : ca > dex
0ede : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0edf : ca > dex
> trap_ne ;wrong number of bytes
0ee0 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$3b,0
> load_flag 0
0ee2 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0ee4 : 48 > pha ;use stack to load status
0ee5 : a9c4 > lda #$ff-$3b ;precharge accu
0ee7 : 28 > plp
>
0ee8 : 3b > db $3b ;test nop integrity - flags off
0ee9 : ea > nop
0eea : ea > nop
> tst_a $ff-$3b,0
0eeb : 08 > php ;save flags
0eec : c9c4 > cmp #$ff-$3b ;test result
> trap_ne
0eee : d0fe > bne * ;failed not equal (non zero)
>
0ef0 : 68 > pla ;load status
0ef1 : 48 > pha
> cmp_flag 0
0ef2 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0ef4 : d0fe > bne * ;failed not equal (non zero)
>
0ef6 : 28 > plp ;restore status
>
> set_a $aa-$3b,$ff
> load_flag $ff
0ef7 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0ef9 : 48 > pha ;use stack to load status
0efa : a96f > lda #$aa-$3b ;precharge accu
0efc : 28 > plp
>
0efd : 3b > db $3b ;test nop integrity - flags on
0efe : ea > nop
0eff : ea > nop
> tst_a $aa-$3b,$ff
0f00 : 08 > php ;save flags
0f01 : c96f > cmp #$aa-$3b ;test result
> trap_ne
0f03 : d0fe > bne * ;failed not equal (non zero)
>
0f05 : 68 > pla ;load status
0f06 : 48 > pha
> cmp_flag $ff
0f07 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0f09 : d0fe > bne * ;failed not equal (non zero)
>
0f0b : 28 > plp ;restore status
>
0f0c : c042 > cpy #$42
> trap_ne ;y changed
0f0e : d0fe > bne * ;failed not equal (non zero)
>
0f10 : e000 > cpx #0
> trap_ne ;x changed
0f12 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $4b,1
0f14 : a042 > ldy #$42
0f16 : a203 > ldx #4-1
0f18 : 4b > db $4b ;test nop length
> if 1 = 1
0f19 : ca > dex
0f1a : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0f1b : ca > dex
> trap_ne ;wrong number of bytes
0f1c : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$4b,0
> load_flag 0
0f1e : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0f20 : 48 > pha ;use stack to load status
0f21 : a9b4 > lda #$ff-$4b ;precharge accu
0f23 : 28 > plp
>
0f24 : 4b > db $4b ;test nop integrity - flags off
0f25 : ea > nop
0f26 : ea > nop
> tst_a $ff-$4b,0
0f27 : 08 > php ;save flags
0f28 : c9b4 > cmp #$ff-$4b ;test result
> trap_ne
0f2a : d0fe > bne * ;failed not equal (non zero)
>
0f2c : 68 > pla ;load status
0f2d : 48 > pha
> cmp_flag 0
0f2e : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0f30 : d0fe > bne * ;failed not equal (non zero)
>
0f32 : 28 > plp ;restore status
>
> set_a $aa-$4b,$ff
> load_flag $ff
0f33 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0f35 : 48 > pha ;use stack to load status
0f36 : a95f > lda #$aa-$4b ;precharge accu
0f38 : 28 > plp
>
0f39 : 4b > db $4b ;test nop integrity - flags on
0f3a : ea > nop
0f3b : ea > nop
> tst_a $aa-$4b,$ff
0f3c : 08 > php ;save flags
0f3d : c95f > cmp #$aa-$4b ;test result
> trap_ne
0f3f : d0fe > bne * ;failed not equal (non zero)
>
0f41 : 68 > pla ;load status
0f42 : 48 > pha
> cmp_flag $ff
0f43 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0f45 : d0fe > bne * ;failed not equal (non zero)
>
0f47 : 28 > plp ;restore status
>
0f48 : c042 > cpy #$42
> trap_ne ;y changed
0f4a : d0fe > bne * ;failed not equal (non zero)
>
0f4c : e000 > cpx #0
> trap_ne ;x changed
0f4e : d0fe > bne * ;failed not equal (non zero)
>
nop_test $5b,1
0f50 : a042 > ldy #$42
0f52 : a203 > ldx #4-1
0f54 : 5b > db $5b ;test nop length
> if 1 = 1
0f55 : ca > dex
0f56 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0f57 : ca > dex
> trap_ne ;wrong number of bytes
0f58 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$5b,0
> load_flag 0
0f5a : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0f5c : 48 > pha ;use stack to load status
0f5d : a9a4 > lda #$ff-$5b ;precharge accu
0f5f : 28 > plp
>
0f60 : 5b > db $5b ;test nop integrity - flags off
0f61 : ea > nop
0f62 : ea > nop
> tst_a $ff-$5b,0
0f63 : 08 > php ;save flags
0f64 : c9a4 > cmp #$ff-$5b ;test result
> trap_ne
0f66 : d0fe > bne * ;failed not equal (non zero)
>
0f68 : 68 > pla ;load status
0f69 : 48 > pha
> cmp_flag 0
0f6a : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0f6c : d0fe > bne * ;failed not equal (non zero)
>
0f6e : 28 > plp ;restore status
>
> set_a $aa-$5b,$ff
> load_flag $ff
0f6f : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0f71 : 48 > pha ;use stack to load status
0f72 : a94f > lda #$aa-$5b ;precharge accu
0f74 : 28 > plp
>
0f75 : 5b > db $5b ;test nop integrity - flags on
0f76 : ea > nop
0f77 : ea > nop
> tst_a $aa-$5b,$ff
0f78 : 08 > php ;save flags
0f79 : c94f > cmp #$aa-$5b ;test result
> trap_ne
0f7b : d0fe > bne * ;failed not equal (non zero)
>
0f7d : 68 > pla ;load status
0f7e : 48 > pha
> cmp_flag $ff
0f7f : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0f81 : d0fe > bne * ;failed not equal (non zero)
>
0f83 : 28 > plp ;restore status
>
0f84 : c042 > cpy #$42
> trap_ne ;y changed
0f86 : d0fe > bne * ;failed not equal (non zero)
>
0f88 : e000 > cpx #0
> trap_ne ;x changed
0f8a : d0fe > bne * ;failed not equal (non zero)
>
nop_test $6b,1
0f8c : a042 > ldy #$42
0f8e : a203 > ldx #4-1
0f90 : 6b > db $6b ;test nop length
> if 1 = 1
0f91 : ca > dex
0f92 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0f93 : ca > dex
> trap_ne ;wrong number of bytes
0f94 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$6b,0
> load_flag 0
0f96 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0f98 : 48 > pha ;use stack to load status
0f99 : a994 > lda #$ff-$6b ;precharge accu
0f9b : 28 > plp
>
0f9c : 6b > db $6b ;test nop integrity - flags off
0f9d : ea > nop
0f9e : ea > nop
> tst_a $ff-$6b,0
0f9f : 08 > php ;save flags
0fa0 : c994 > cmp #$ff-$6b ;test result
> trap_ne
0fa2 : d0fe > bne * ;failed not equal (non zero)
>
0fa4 : 68 > pla ;load status
0fa5 : 48 > pha
> cmp_flag 0
0fa6 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0fa8 : d0fe > bne * ;failed not equal (non zero)
>
0faa : 28 > plp ;restore status
>
> set_a $aa-$6b,$ff
> load_flag $ff
0fab : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0fad : 48 > pha ;use stack to load status
0fae : a93f > lda #$aa-$6b ;precharge accu
0fb0 : 28 > plp
>
0fb1 : 6b > db $6b ;test nop integrity - flags on
0fb2 : ea > nop
0fb3 : ea > nop
> tst_a $aa-$6b,$ff
0fb4 : 08 > php ;save flags
0fb5 : c93f > cmp #$aa-$6b ;test result
> trap_ne
0fb7 : d0fe > bne * ;failed not equal (non zero)
>
0fb9 : 68 > pla ;load status
0fba : 48 > pha
> cmp_flag $ff
0fbb : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0fbd : d0fe > bne * ;failed not equal (non zero)
>
0fbf : 28 > plp ;restore status
>
0fc0 : c042 > cpy #$42
> trap_ne ;y changed
0fc2 : d0fe > bne * ;failed not equal (non zero)
>
0fc4 : e000 > cpx #0
> trap_ne ;x changed
0fc6 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $7b,1
0fc8 : a042 > ldy #$42
0fca : a203 > ldx #4-1
0fcc : 7b > db $7b ;test nop length
> if 1 = 1
0fcd : ca > dex
0fce : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
0fcf : ca > dex
> trap_ne ;wrong number of bytes
0fd0 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$7b,0
> load_flag 0
0fd2 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
0fd4 : 48 > pha ;use stack to load status
0fd5 : a984 > lda #$ff-$7b ;precharge accu
0fd7 : 28 > plp
>
0fd8 : 7b > db $7b ;test nop integrity - flags off
0fd9 : ea > nop
0fda : ea > nop
> tst_a $ff-$7b,0
0fdb : 08 > php ;save flags
0fdc : c984 > cmp #$ff-$7b ;test result
> trap_ne
0fde : d0fe > bne * ;failed not equal (non zero)
>
0fe0 : 68 > pla ;load status
0fe1 : 48 > pha
> cmp_flag 0
0fe2 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0fe4 : d0fe > bne * ;failed not equal (non zero)
>
0fe6 : 28 > plp ;restore status
>
> set_a $aa-$7b,$ff
> load_flag $ff
0fe7 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
0fe9 : 48 > pha ;use stack to load status
0fea : a92f > lda #$aa-$7b ;precharge accu
0fec : 28 > plp
>
0fed : 7b > db $7b ;test nop integrity - flags on
0fee : ea > nop
0fef : ea > nop
> tst_a $aa-$7b,$ff
0ff0 : 08 > php ;save flags
0ff1 : c92f > cmp #$aa-$7b ;test result
> trap_ne
0ff3 : d0fe > bne * ;failed not equal (non zero)
>
0ff5 : 68 > pla ;load status
0ff6 : 48 > pha
> cmp_flag $ff
0ff7 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0ff9 : d0fe > bne * ;failed not equal (non zero)
>
0ffb : 28 > plp ;restore status
>
0ffc : c042 > cpy #$42
> trap_ne ;y changed
0ffe : d0fe > bne * ;failed not equal (non zero)
>
1000 : e000 > cpx #0
> trap_ne ;x changed
1002 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $8b,1
1004 : a042 > ldy #$42
1006 : a203 > ldx #4-1
1008 : 8b > db $8b ;test nop length
> if 1 = 1
1009 : ca > dex
100a : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
100b : ca > dex
> trap_ne ;wrong number of bytes
100c : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$8b,0
> load_flag 0
100e : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1010 : 48 > pha ;use stack to load status
1011 : a974 > lda #$ff-$8b ;precharge accu
1013 : 28 > plp
>
1014 : 8b > db $8b ;test nop integrity - flags off
1015 : ea > nop
1016 : ea > nop
> tst_a $ff-$8b,0
1017 : 08 > php ;save flags
1018 : c974 > cmp #$ff-$8b ;test result
> trap_ne
101a : d0fe > bne * ;failed not equal (non zero)
>
101c : 68 > pla ;load status
101d : 48 > pha
> cmp_flag 0
101e : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1020 : d0fe > bne * ;failed not equal (non zero)
>
1022 : 28 > plp ;restore status
>
> set_a $aa-$8b,$ff
> load_flag $ff
1023 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1025 : 48 > pha ;use stack to load status
1026 : a91f > lda #$aa-$8b ;precharge accu
1028 : 28 > plp
>
1029 : 8b > db $8b ;test nop integrity - flags on
102a : ea > nop
102b : ea > nop
> tst_a $aa-$8b,$ff
102c : 08 > php ;save flags
102d : c91f > cmp #$aa-$8b ;test result
> trap_ne
102f : d0fe > bne * ;failed not equal (non zero)
>
1031 : 68 > pla ;load status
1032 : 48 > pha
> cmp_flag $ff
1033 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1035 : d0fe > bne * ;failed not equal (non zero)
>
1037 : 28 > plp ;restore status
>
1038 : c042 > cpy #$42
> trap_ne ;y changed
103a : d0fe > bne * ;failed not equal (non zero)
>
103c : e000 > cpx #0
> trap_ne ;x changed
103e : d0fe > bne * ;failed not equal (non zero)
>
nop_test $9b,1
1040 : a042 > ldy #$42
1042 : a203 > ldx #4-1
1044 : 9b > db $9b ;test nop length
> if 1 = 1
1045 : ca > dex
1046 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
1047 : ca > dex
> trap_ne ;wrong number of bytes
1048 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$9b,0
> load_flag 0
104a : a900 > lda #0 ;allow test to change I-flag (no mask)
>
104c : 48 > pha ;use stack to load status
104d : a964 > lda #$ff-$9b ;precharge accu
104f : 28 > plp
>
1050 : 9b > db $9b ;test nop integrity - flags off
1051 : ea > nop
1052 : ea > nop
> tst_a $ff-$9b,0
1053 : 08 > php ;save flags
1054 : c964 > cmp #$ff-$9b ;test result
> trap_ne
1056 : d0fe > bne * ;failed not equal (non zero)
>
1058 : 68 > pla ;load status
1059 : 48 > pha
> cmp_flag 0
105a : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
105c : d0fe > bne * ;failed not equal (non zero)
>
105e : 28 > plp ;restore status
>
> set_a $aa-$9b,$ff
> load_flag $ff
105f : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1061 : 48 > pha ;use stack to load status
1062 : a90f > lda #$aa-$9b ;precharge accu
1064 : 28 > plp
>
1065 : 9b > db $9b ;test nop integrity - flags on
1066 : ea > nop
1067 : ea > nop
> tst_a $aa-$9b,$ff
1068 : 08 > php ;save flags
1069 : c90f > cmp #$aa-$9b ;test result
> trap_ne
106b : d0fe > bne * ;failed not equal (non zero)
>
106d : 68 > pla ;load status
106e : 48 > pha
> cmp_flag $ff
106f : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1071 : d0fe > bne * ;failed not equal (non zero)
>
1073 : 28 > plp ;restore status
>
1074 : c042 > cpy #$42
> trap_ne ;y changed
1076 : d0fe > bne * ;failed not equal (non zero)
>
1078 : e000 > cpx #0
> trap_ne ;x changed
107a : d0fe > bne * ;failed not equal (non zero)
>
nop_test $ab,1
107c : a042 > ldy #$42
107e : a203 > ldx #4-1
1080 : ab > db $ab ;test nop length
> if 1 = 1
1081 : ca > dex
1082 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
1083 : ca > dex
> trap_ne ;wrong number of bytes
1084 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$ab,0
> load_flag 0
1086 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1088 : 48 > pha ;use stack to load status
1089 : a954 > lda #$ff-$ab ;precharge accu
108b : 28 > plp
>
108c : ab > db $ab ;test nop integrity - flags off
108d : ea > nop
108e : ea > nop
> tst_a $ff-$ab,0
108f : 08 > php ;save flags
1090 : c954 > cmp #$ff-$ab ;test result
> trap_ne
1092 : d0fe > bne * ;failed not equal (non zero)
>
1094 : 68 > pla ;load status
1095 : 48 > pha
> cmp_flag 0
1096 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1098 : d0fe > bne * ;failed not equal (non zero)
>
109a : 28 > plp ;restore status
>
> set_a $aa-$ab,$ff
> load_flag $ff
109b : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
109d : 48 > pha ;use stack to load status
109e : a9ff > lda #$aa-$ab ;precharge accu
10a0 : 28 > plp
>
10a1 : ab > db $ab ;test nop integrity - flags on
10a2 : ea > nop
10a3 : ea > nop
> tst_a $aa-$ab,$ff
10a4 : 08 > php ;save flags
10a5 : c9ff > cmp #$aa-$ab ;test result
> trap_ne
10a7 : d0fe > bne * ;failed not equal (non zero)
>
10a9 : 68 > pla ;load status
10aa : 48 > pha
> cmp_flag $ff
10ab : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
10ad : d0fe > bne * ;failed not equal (non zero)
>
10af : 28 > plp ;restore status
>
10b0 : c042 > cpy #$42
> trap_ne ;y changed
10b2 : d0fe > bne * ;failed not equal (non zero)
>
10b4 : e000 > cpx #0
> trap_ne ;x changed
10b6 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $bb,1
10b8 : a042 > ldy #$42
10ba : a203 > ldx #4-1
10bc : bb > db $bb ;test nop length
> if 1 = 1
10bd : ca > dex
10be : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
10bf : ca > dex
> trap_ne ;wrong number of bytes
10c0 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$bb,0
> load_flag 0
10c2 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
10c4 : 48 > pha ;use stack to load status
10c5 : a944 > lda #$ff-$bb ;precharge accu
10c7 : 28 > plp
>
10c8 : bb > db $bb ;test nop integrity - flags off
10c9 : ea > nop
10ca : ea > nop
> tst_a $ff-$bb,0
10cb : 08 > php ;save flags
10cc : c944 > cmp #$ff-$bb ;test result
> trap_ne
10ce : d0fe > bne * ;failed not equal (non zero)
>
10d0 : 68 > pla ;load status
10d1 : 48 > pha
> cmp_flag 0
10d2 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
10d4 : d0fe > bne * ;failed not equal (non zero)
>
10d6 : 28 > plp ;restore status
>
> set_a $aa-$bb,$ff
> load_flag $ff
10d7 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
10d9 : 48 > pha ;use stack to load status
10da : a9ef > lda #$aa-$bb ;precharge accu
10dc : 28 > plp
>
10dd : bb > db $bb ;test nop integrity - flags on
10de : ea > nop
10df : ea > nop
> tst_a $aa-$bb,$ff
10e0 : 08 > php ;save flags
10e1 : c9ef > cmp #$aa-$bb ;test result
> trap_ne
10e3 : d0fe > bne * ;failed not equal (non zero)
>
10e5 : 68 > pla ;load status
10e6 : 48 > pha
> cmp_flag $ff
10e7 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
10e9 : d0fe > bne * ;failed not equal (non zero)
>
10eb : 28 > plp ;restore status
>
10ec : c042 > cpy #$42
> trap_ne ;y changed
10ee : d0fe > bne * ;failed not equal (non zero)
>
10f0 : e000 > cpx #0
> trap_ne ;x changed
10f2 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $eb,1
10f4 : a042 > ldy #$42
10f6 : a203 > ldx #4-1
10f8 : eb > db $eb ;test nop length
> if 1 = 1
10f9 : ca > dex
10fa : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
10fb : ca > dex
> trap_ne ;wrong number of bytes
10fc : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$eb,0
> load_flag 0
10fe : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1100 : 48 > pha ;use stack to load status
1101 : a914 > lda #$ff-$eb ;precharge accu
1103 : 28 > plp
>
1104 : eb > db $eb ;test nop integrity - flags off
1105 : ea > nop
1106 : ea > nop
> tst_a $ff-$eb,0
1107 : 08 > php ;save flags
1108 : c914 > cmp #$ff-$eb ;test result
> trap_ne
110a : d0fe > bne * ;failed not equal (non zero)
>
110c : 68 > pla ;load status
110d : 48 > pha
> cmp_flag 0
110e : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1110 : d0fe > bne * ;failed not equal (non zero)
>
1112 : 28 > plp ;restore status
>
> set_a $aa-$eb,$ff
> load_flag $ff
1113 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1115 : 48 > pha ;use stack to load status
1116 : a9bf > lda #$aa-$eb ;precharge accu
1118 : 28 > plp
>
1119 : eb > db $eb ;test nop integrity - flags on
111a : ea > nop
111b : ea > nop
> tst_a $aa-$eb,$ff
111c : 08 > php ;save flags
111d : c9bf > cmp #$aa-$eb ;test result
> trap_ne
111f : d0fe > bne * ;failed not equal (non zero)
>
1121 : 68 > pla ;load status
1122 : 48 > pha
> cmp_flag $ff
1123 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1125 : d0fe > bne * ;failed not equal (non zero)
>
1127 : 28 > plp ;restore status
>
1128 : c042 > cpy #$42
> trap_ne ;y changed
112a : d0fe > bne * ;failed not equal (non zero)
>
112c : e000 > cpx #0
> trap_ne ;x changed
112e : d0fe > bne * ;failed not equal (non zero)
>
nop_test $fb,1
1130 : a042 > ldy #$42
1132 : a203 > ldx #4-1
1134 : fb > db $fb ;test nop length
> if 1 = 1
1135 : ca > dex
1136 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
1137 : ca > dex
> trap_ne ;wrong number of bytes
1138 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$fb,0
> load_flag 0
113a : a900 > lda #0 ;allow test to change I-flag (no mask)
>
113c : 48 > pha ;use stack to load status
113d : a904 > lda #$ff-$fb ;precharge accu
113f : 28 > plp
>
1140 : fb > db $fb ;test nop integrity - flags off
1141 : ea > nop
1142 : ea > nop
> tst_a $ff-$fb,0
1143 : 08 > php ;save flags
1144 : c904 > cmp #$ff-$fb ;test result
> trap_ne
1146 : d0fe > bne * ;failed not equal (non zero)
>
1148 : 68 > pla ;load status
1149 : 48 > pha
> cmp_flag 0
114a : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
114c : d0fe > bne * ;failed not equal (non zero)
>
114e : 28 > plp ;restore status
>
> set_a $aa-$fb,$ff
> load_flag $ff
114f : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1151 : 48 > pha ;use stack to load status
1152 : a9af > lda #$aa-$fb ;precharge accu
1154 : 28 > plp
>
1155 : fb > db $fb ;test nop integrity - flags on
1156 : ea > nop
1157 : ea > nop
> tst_a $aa-$fb,$ff
1158 : 08 > php ;save flags
1159 : c9af > cmp #$aa-$fb ;test result
> trap_ne
115b : d0fe > bne * ;failed not equal (non zero)
>
115d : 68 > pla ;load status
115e : 48 > pha
> cmp_flag $ff
115f : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1161 : d0fe > bne * ;failed not equal (non zero)
>
1163 : 28 > plp ;restore status
>
1164 : c042 > cpy #$42
> trap_ne ;y changed
1166 : d0fe > bne * ;failed not equal (non zero)
>
1168 : e000 > cpx #0
> trap_ne ;x changed
116a : d0fe > bne * ;failed not equal (non zero)
>
if rkwl_wdc_op = 0 ;NOPs not available on Rockwell & WDC 65C02
nop_test $07,1
116c : a042 > ldy #$42
116e : a203 > ldx #4-1
1170 : 07 > db $07 ;test nop length
> if 1 = 1
1171 : ca > dex
1172 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
1173 : ca > dex
> trap_ne ;wrong number of bytes
1174 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$07,0
> load_flag 0
1176 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1178 : 48 > pha ;use stack to load status
1179 : a9f8 > lda #$ff-$07 ;precharge accu
117b : 28 > plp
>
117c : 07 > db $07 ;test nop integrity - flags off
117d : ea > nop
117e : ea > nop
> tst_a $ff-$07,0
117f : 08 > php ;save flags
1180 : c9f8 > cmp #$ff-$07 ;test result
> trap_ne
1182 : d0fe > bne * ;failed not equal (non zero)
>
1184 : 68 > pla ;load status
1185 : 48 > pha
> cmp_flag 0
1186 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1188 : d0fe > bne * ;failed not equal (non zero)
>
118a : 28 > plp ;restore status
>
> set_a $aa-$07,$ff
> load_flag $ff
118b : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
118d : 48 > pha ;use stack to load status
118e : a9a3 > lda #$aa-$07 ;precharge accu
1190 : 28 > plp
>
1191 : 07 > db $07 ;test nop integrity - flags on
1192 : ea > nop
1193 : ea > nop
> tst_a $aa-$07,$ff
1194 : 08 > php ;save flags
1195 : c9a3 > cmp #$aa-$07 ;test result
> trap_ne
1197 : d0fe > bne * ;failed not equal (non zero)
>
1199 : 68 > pla ;load status
119a : 48 > pha
> cmp_flag $ff
119b : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
119d : d0fe > bne * ;failed not equal (non zero)
>
119f : 28 > plp ;restore status
>
11a0 : c042 > cpy #$42
> trap_ne ;y changed
11a2 : d0fe > bne * ;failed not equal (non zero)
>
11a4 : e000 > cpx #0
> trap_ne ;x changed
11a6 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $17,1
11a8 : a042 > ldy #$42
11aa : a203 > ldx #4-1
11ac : 17 > db $17 ;test nop length
> if 1 = 1
11ad : ca > dex
11ae : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
11af : ca > dex
> trap_ne ;wrong number of bytes
11b0 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$17,0
> load_flag 0
11b2 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
11b4 : 48 > pha ;use stack to load status
11b5 : a9e8 > lda #$ff-$17 ;precharge accu
11b7 : 28 > plp
>
11b8 : 17 > db $17 ;test nop integrity - flags off
11b9 : ea > nop
11ba : ea > nop
> tst_a $ff-$17,0
11bb : 08 > php ;save flags
11bc : c9e8 > cmp #$ff-$17 ;test result
> trap_ne
11be : d0fe > bne * ;failed not equal (non zero)
>
11c0 : 68 > pla ;load status
11c1 : 48 > pha
> cmp_flag 0
11c2 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
11c4 : d0fe > bne * ;failed not equal (non zero)
>
11c6 : 28 > plp ;restore status
>
> set_a $aa-$17,$ff
> load_flag $ff
11c7 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
11c9 : 48 > pha ;use stack to load status
11ca : a993 > lda #$aa-$17 ;precharge accu
11cc : 28 > plp
>
11cd : 17 > db $17 ;test nop integrity - flags on
11ce : ea > nop
11cf : ea > nop
> tst_a $aa-$17,$ff
11d0 : 08 > php ;save flags
11d1 : c993 > cmp #$aa-$17 ;test result
> trap_ne
11d3 : d0fe > bne * ;failed not equal (non zero)
>
11d5 : 68 > pla ;load status
11d6 : 48 > pha
> cmp_flag $ff
11d7 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
11d9 : d0fe > bne * ;failed not equal (non zero)
>
11db : 28 > plp ;restore status
>
11dc : c042 > cpy #$42
> trap_ne ;y changed
11de : d0fe > bne * ;failed not equal (non zero)
>
11e0 : e000 > cpx #0
> trap_ne ;x changed
11e2 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $27,1
11e4 : a042 > ldy #$42
11e6 : a203 > ldx #4-1
11e8 : 27 > db $27 ;test nop length
> if 1 = 1
11e9 : ca > dex
11ea : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
11eb : ca > dex
> trap_ne ;wrong number of bytes
11ec : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$27,0
> load_flag 0
11ee : a900 > lda #0 ;allow test to change I-flag (no mask)
>
11f0 : 48 > pha ;use stack to load status
11f1 : a9d8 > lda #$ff-$27 ;precharge accu
11f3 : 28 > plp
>
11f4 : 27 > db $27 ;test nop integrity - flags off
11f5 : ea > nop
11f6 : ea > nop
> tst_a $ff-$27,0
11f7 : 08 > php ;save flags
11f8 : c9d8 > cmp #$ff-$27 ;test result
> trap_ne
11fa : d0fe > bne * ;failed not equal (non zero)
>
11fc : 68 > pla ;load status
11fd : 48 > pha
> cmp_flag 0
11fe : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1200 : d0fe > bne * ;failed not equal (non zero)
>
1202 : 28 > plp ;restore status
>
> set_a $aa-$27,$ff
> load_flag $ff
1203 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1205 : 48 > pha ;use stack to load status
1206 : a983 > lda #$aa-$27 ;precharge accu
1208 : 28 > plp
>
1209 : 27 > db $27 ;test nop integrity - flags on
120a : ea > nop
120b : ea > nop
> tst_a $aa-$27,$ff
120c : 08 > php ;save flags
120d : c983 > cmp #$aa-$27 ;test result
> trap_ne
120f : d0fe > bne * ;failed not equal (non zero)
>
1211 : 68 > pla ;load status
1212 : 48 > pha
> cmp_flag $ff
1213 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1215 : d0fe > bne * ;failed not equal (non zero)
>
1217 : 28 > plp ;restore status
>
1218 : c042 > cpy #$42
> trap_ne ;y changed
121a : d0fe > bne * ;failed not equal (non zero)
>
121c : e000 > cpx #0
> trap_ne ;x changed
121e : d0fe > bne * ;failed not equal (non zero)
>
nop_test $37,1
1220 : a042 > ldy #$42
1222 : a203 > ldx #4-1
1224 : 37 > db $37 ;test nop length
> if 1 = 1
1225 : ca > dex
1226 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
1227 : ca > dex
> trap_ne ;wrong number of bytes
1228 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$37,0
> load_flag 0
122a : a900 > lda #0 ;allow test to change I-flag (no mask)
>
122c : 48 > pha ;use stack to load status
122d : a9c8 > lda #$ff-$37 ;precharge accu
122f : 28 > plp
>
1230 : 37 > db $37 ;test nop integrity - flags off
1231 : ea > nop
1232 : ea > nop
> tst_a $ff-$37,0
1233 : 08 > php ;save flags
1234 : c9c8 > cmp #$ff-$37 ;test result
> trap_ne
1236 : d0fe > bne * ;failed not equal (non zero)
>
1238 : 68 > pla ;load status
1239 : 48 > pha
> cmp_flag 0
123a : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
123c : d0fe > bne * ;failed not equal (non zero)
>
123e : 28 > plp ;restore status
>
> set_a $aa-$37,$ff
> load_flag $ff
123f : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1241 : 48 > pha ;use stack to load status
1242 : a973 > lda #$aa-$37 ;precharge accu
1244 : 28 > plp
>
1245 : 37 > db $37 ;test nop integrity - flags on
1246 : ea > nop
1247 : ea > nop
> tst_a $aa-$37,$ff
1248 : 08 > php ;save flags
1249 : c973 > cmp #$aa-$37 ;test result
> trap_ne
124b : d0fe > bne * ;failed not equal (non zero)
>
124d : 68 > pla ;load status
124e : 48 > pha
> cmp_flag $ff
124f : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1251 : d0fe > bne * ;failed not equal (non zero)
>
1253 : 28 > plp ;restore status
>
1254 : c042 > cpy #$42
> trap_ne ;y changed
1256 : d0fe > bne * ;failed not equal (non zero)
>
1258 : e000 > cpx #0
> trap_ne ;x changed
125a : d0fe > bne * ;failed not equal (non zero)
>
nop_test $47,1
125c : a042 > ldy #$42
125e : a203 > ldx #4-1
1260 : 47 > db $47 ;test nop length
> if 1 = 1
1261 : ca > dex
1262 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
1263 : ca > dex
> trap_ne ;wrong number of bytes
1264 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$47,0
> load_flag 0
1266 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1268 : 48 > pha ;use stack to load status
1269 : a9b8 > lda #$ff-$47 ;precharge accu
126b : 28 > plp
>
126c : 47 > db $47 ;test nop integrity - flags off
126d : ea > nop
126e : ea > nop
> tst_a $ff-$47,0
126f : 08 > php ;save flags
1270 : c9b8 > cmp #$ff-$47 ;test result
> trap_ne
1272 : d0fe > bne * ;failed not equal (non zero)
>
1274 : 68 > pla ;load status
1275 : 48 > pha
> cmp_flag 0
1276 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1278 : d0fe > bne * ;failed not equal (non zero)
>
127a : 28 > plp ;restore status
>
> set_a $aa-$47,$ff
> load_flag $ff
127b : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
127d : 48 > pha ;use stack to load status
127e : a963 > lda #$aa-$47 ;precharge accu
1280 : 28 > plp
>
1281 : 47 > db $47 ;test nop integrity - flags on
1282 : ea > nop
1283 : ea > nop
> tst_a $aa-$47,$ff
1284 : 08 > php ;save flags
1285 : c963 > cmp #$aa-$47 ;test result
> trap_ne
1287 : d0fe > bne * ;failed not equal (non zero)
>
1289 : 68 > pla ;load status
128a : 48 > pha
> cmp_flag $ff
128b : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
128d : d0fe > bne * ;failed not equal (non zero)
>
128f : 28 > plp ;restore status
>
1290 : c042 > cpy #$42
> trap_ne ;y changed
1292 : d0fe > bne * ;failed not equal (non zero)
>
1294 : e000 > cpx #0
> trap_ne ;x changed
1296 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $57,1
1298 : a042 > ldy #$42
129a : a203 > ldx #4-1
129c : 57 > db $57 ;test nop length
> if 1 = 1
129d : ca > dex
129e : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
129f : ca > dex
> trap_ne ;wrong number of bytes
12a0 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$57,0
> load_flag 0
12a2 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
12a4 : 48 > pha ;use stack to load status
12a5 : a9a8 > lda #$ff-$57 ;precharge accu
12a7 : 28 > plp
>
12a8 : 57 > db $57 ;test nop integrity - flags off
12a9 : ea > nop
12aa : ea > nop
> tst_a $ff-$57,0
12ab : 08 > php ;save flags
12ac : c9a8 > cmp #$ff-$57 ;test result
> trap_ne
12ae : d0fe > bne * ;failed not equal (non zero)
>
12b0 : 68 > pla ;load status
12b1 : 48 > pha
> cmp_flag 0
12b2 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
12b4 : d0fe > bne * ;failed not equal (non zero)
>
12b6 : 28 > plp ;restore status
>
> set_a $aa-$57,$ff
> load_flag $ff
12b7 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
12b9 : 48 > pha ;use stack to load status
12ba : a953 > lda #$aa-$57 ;precharge accu
12bc : 28 > plp
>
12bd : 57 > db $57 ;test nop integrity - flags on
12be : ea > nop
12bf : ea > nop
> tst_a $aa-$57,$ff
12c0 : 08 > php ;save flags
12c1 : c953 > cmp #$aa-$57 ;test result
> trap_ne
12c3 : d0fe > bne * ;failed not equal (non zero)
>
12c5 : 68 > pla ;load status
12c6 : 48 > pha
> cmp_flag $ff
12c7 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
12c9 : d0fe > bne * ;failed not equal (non zero)
>
12cb : 28 > plp ;restore status
>
12cc : c042 > cpy #$42
> trap_ne ;y changed
12ce : d0fe > bne * ;failed not equal (non zero)
>
12d0 : e000 > cpx #0
> trap_ne ;x changed
12d2 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $67,1
12d4 : a042 > ldy #$42
12d6 : a203 > ldx #4-1
12d8 : 67 > db $67 ;test nop length
> if 1 = 1
12d9 : ca > dex
12da : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
12db : ca > dex
> trap_ne ;wrong number of bytes
12dc : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$67,0
> load_flag 0
12de : a900 > lda #0 ;allow test to change I-flag (no mask)
>
12e0 : 48 > pha ;use stack to load status
12e1 : a998 > lda #$ff-$67 ;precharge accu
12e3 : 28 > plp
>
12e4 : 67 > db $67 ;test nop integrity - flags off
12e5 : ea > nop
12e6 : ea > nop
> tst_a $ff-$67,0
12e7 : 08 > php ;save flags
12e8 : c998 > cmp #$ff-$67 ;test result
> trap_ne
12ea : d0fe > bne * ;failed not equal (non zero)
>
12ec : 68 > pla ;load status
12ed : 48 > pha
> cmp_flag 0
12ee : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
12f0 : d0fe > bne * ;failed not equal (non zero)
>
12f2 : 28 > plp ;restore status
>
> set_a $aa-$67,$ff
> load_flag $ff
12f3 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
12f5 : 48 > pha ;use stack to load status
12f6 : a943 > lda #$aa-$67 ;precharge accu
12f8 : 28 > plp
>
12f9 : 67 > db $67 ;test nop integrity - flags on
12fa : ea > nop
12fb : ea > nop
> tst_a $aa-$67,$ff
12fc : 08 > php ;save flags
12fd : c943 > cmp #$aa-$67 ;test result
> trap_ne
12ff : d0fe > bne * ;failed not equal (non zero)
>
1301 : 68 > pla ;load status
1302 : 48 > pha
> cmp_flag $ff
1303 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1305 : d0fe > bne * ;failed not equal (non zero)
>
1307 : 28 > plp ;restore status
>
1308 : c042 > cpy #$42
> trap_ne ;y changed
130a : d0fe > bne * ;failed not equal (non zero)
>
130c : e000 > cpx #0
> trap_ne ;x changed
130e : d0fe > bne * ;failed not equal (non zero)
>
nop_test $77,1
1310 : a042 > ldy #$42
1312 : a203 > ldx #4-1
1314 : 77 > db $77 ;test nop length
> if 1 = 1
1315 : ca > dex
1316 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
1317 : ca > dex
> trap_ne ;wrong number of bytes
1318 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$77,0
> load_flag 0
131a : a900 > lda #0 ;allow test to change I-flag (no mask)
>
131c : 48 > pha ;use stack to load status
131d : a988 > lda #$ff-$77 ;precharge accu
131f : 28 > plp
>
1320 : 77 > db $77 ;test nop integrity - flags off
1321 : ea > nop
1322 : ea > nop
> tst_a $ff-$77,0
1323 : 08 > php ;save flags
1324 : c988 > cmp #$ff-$77 ;test result
> trap_ne
1326 : d0fe > bne * ;failed not equal (non zero)
>
1328 : 68 > pla ;load status
1329 : 48 > pha
> cmp_flag 0
132a : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
132c : d0fe > bne * ;failed not equal (non zero)
>
132e : 28 > plp ;restore status
>
> set_a $aa-$77,$ff
> load_flag $ff
132f : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1331 : 48 > pha ;use stack to load status
1332 : a933 > lda #$aa-$77 ;precharge accu
1334 : 28 > plp
>
1335 : 77 > db $77 ;test nop integrity - flags on
1336 : ea > nop
1337 : ea > nop
> tst_a $aa-$77,$ff
1338 : 08 > php ;save flags
1339 : c933 > cmp #$aa-$77 ;test result
> trap_ne
133b : d0fe > bne * ;failed not equal (non zero)
>
133d : 68 > pla ;load status
133e : 48 > pha
> cmp_flag $ff
133f : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1341 : d0fe > bne * ;failed not equal (non zero)
>
1343 : 28 > plp ;restore status
>
1344 : c042 > cpy #$42
> trap_ne ;y changed
1346 : d0fe > bne * ;failed not equal (non zero)
>
1348 : e000 > cpx #0
> trap_ne ;x changed
134a : d0fe > bne * ;failed not equal (non zero)
>
nop_test $87,1
134c : a042 > ldy #$42
134e : a203 > ldx #4-1
1350 : 87 > db $87 ;test nop length
> if 1 = 1
1351 : ca > dex
1352 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
1353 : ca > dex
> trap_ne ;wrong number of bytes
1354 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$87,0
> load_flag 0
1356 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1358 : 48 > pha ;use stack to load status
1359 : a978 > lda #$ff-$87 ;precharge accu
135b : 28 > plp
>
135c : 87 > db $87 ;test nop integrity - flags off
135d : ea > nop
135e : ea > nop
> tst_a $ff-$87,0
135f : 08 > php ;save flags
1360 : c978 > cmp #$ff-$87 ;test result
> trap_ne
1362 : d0fe > bne * ;failed not equal (non zero)
>
1364 : 68 > pla ;load status
1365 : 48 > pha
> cmp_flag 0
1366 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1368 : d0fe > bne * ;failed not equal (non zero)
>
136a : 28 > plp ;restore status
>
> set_a $aa-$87,$ff
> load_flag $ff
136b : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
136d : 48 > pha ;use stack to load status
136e : a923 > lda #$aa-$87 ;precharge accu
1370 : 28 > plp
>
1371 : 87 > db $87 ;test nop integrity - flags on
1372 : ea > nop
1373 : ea > nop
> tst_a $aa-$87,$ff
1374 : 08 > php ;save flags
1375 : c923 > cmp #$aa-$87 ;test result
> trap_ne
1377 : d0fe > bne * ;failed not equal (non zero)
>
1379 : 68 > pla ;load status
137a : 48 > pha
> cmp_flag $ff
137b : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
137d : d0fe > bne * ;failed not equal (non zero)
>
137f : 28 > plp ;restore status
>
1380 : c042 > cpy #$42
> trap_ne ;y changed
1382 : d0fe > bne * ;failed not equal (non zero)
>
1384 : e000 > cpx #0
> trap_ne ;x changed
1386 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $97,1
1388 : a042 > ldy #$42
138a : a203 > ldx #4-1
138c : 97 > db $97 ;test nop length
> if 1 = 1
138d : ca > dex
138e : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
138f : ca > dex
> trap_ne ;wrong number of bytes
1390 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$97,0
> load_flag 0
1392 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1394 : 48 > pha ;use stack to load status
1395 : a968 > lda #$ff-$97 ;precharge accu
1397 : 28 > plp
>
1398 : 97 > db $97 ;test nop integrity - flags off
1399 : ea > nop
139a : ea > nop
> tst_a $ff-$97,0
139b : 08 > php ;save flags
139c : c968 > cmp #$ff-$97 ;test result
> trap_ne
139e : d0fe > bne * ;failed not equal (non zero)
>
13a0 : 68 > pla ;load status
13a1 : 48 > pha
> cmp_flag 0
13a2 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
13a4 : d0fe > bne * ;failed not equal (non zero)
>
13a6 : 28 > plp ;restore status
>
> set_a $aa-$97,$ff
> load_flag $ff
13a7 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
13a9 : 48 > pha ;use stack to load status
13aa : a913 > lda #$aa-$97 ;precharge accu
13ac : 28 > plp
>
13ad : 97 > db $97 ;test nop integrity - flags on
13ae : ea > nop
13af : ea > nop
> tst_a $aa-$97,$ff
13b0 : 08 > php ;save flags
13b1 : c913 > cmp #$aa-$97 ;test result
> trap_ne
13b3 : d0fe > bne * ;failed not equal (non zero)
>
13b5 : 68 > pla ;load status
13b6 : 48 > pha
> cmp_flag $ff
13b7 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
13b9 : d0fe > bne * ;failed not equal (non zero)
>
13bb : 28 > plp ;restore status
>
13bc : c042 > cpy #$42
> trap_ne ;y changed
13be : d0fe > bne * ;failed not equal (non zero)
>
13c0 : e000 > cpx #0
> trap_ne ;x changed
13c2 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $a7,1
13c4 : a042 > ldy #$42
13c6 : a203 > ldx #4-1
13c8 : a7 > db $a7 ;test nop length
> if 1 = 1
13c9 : ca > dex
13ca : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
13cb : ca > dex
> trap_ne ;wrong number of bytes
13cc : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$a7,0
> load_flag 0
13ce : a900 > lda #0 ;allow test to change I-flag (no mask)
>
13d0 : 48 > pha ;use stack to load status
13d1 : a958 > lda #$ff-$a7 ;precharge accu
13d3 : 28 > plp
>
13d4 : a7 > db $a7 ;test nop integrity - flags off
13d5 : ea > nop
13d6 : ea > nop
> tst_a $ff-$a7,0
13d7 : 08 > php ;save flags
13d8 : c958 > cmp #$ff-$a7 ;test result
> trap_ne
13da : d0fe > bne * ;failed not equal (non zero)
>
13dc : 68 > pla ;load status
13dd : 48 > pha
> cmp_flag 0
13de : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
13e0 : d0fe > bne * ;failed not equal (non zero)
>
13e2 : 28 > plp ;restore status
>
> set_a $aa-$a7,$ff
> load_flag $ff
13e3 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
13e5 : 48 > pha ;use stack to load status
13e6 : a903 > lda #$aa-$a7 ;precharge accu
13e8 : 28 > plp
>
13e9 : a7 > db $a7 ;test nop integrity - flags on
13ea : ea > nop
13eb : ea > nop
> tst_a $aa-$a7,$ff
13ec : 08 > php ;save flags
13ed : c903 > cmp #$aa-$a7 ;test result
> trap_ne
13ef : d0fe > bne * ;failed not equal (non zero)
>
13f1 : 68 > pla ;load status
13f2 : 48 > pha
> cmp_flag $ff
13f3 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
13f5 : d0fe > bne * ;failed not equal (non zero)
>
13f7 : 28 > plp ;restore status
>
13f8 : c042 > cpy #$42
> trap_ne ;y changed
13fa : d0fe > bne * ;failed not equal (non zero)
>
13fc : e000 > cpx #0
> trap_ne ;x changed
13fe : d0fe > bne * ;failed not equal (non zero)
>
nop_test $b7,1
1400 : a042 > ldy #$42
1402 : a203 > ldx #4-1
1404 : b7 > db $b7 ;test nop length
> if 1 = 1
1405 : ca > dex
1406 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
1407 : ca > dex
> trap_ne ;wrong number of bytes
1408 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$b7,0
> load_flag 0
140a : a900 > lda #0 ;allow test to change I-flag (no mask)
>
140c : 48 > pha ;use stack to load status
140d : a948 > lda #$ff-$b7 ;precharge accu
140f : 28 > plp
>
1410 : b7 > db $b7 ;test nop integrity - flags off
1411 : ea > nop
1412 : ea > nop
> tst_a $ff-$b7,0
1413 : 08 > php ;save flags
1414 : c948 > cmp #$ff-$b7 ;test result
> trap_ne
1416 : d0fe > bne * ;failed not equal (non zero)
>
1418 : 68 > pla ;load status
1419 : 48 > pha
> cmp_flag 0
141a : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
141c : d0fe > bne * ;failed not equal (non zero)
>
141e : 28 > plp ;restore status
>
> set_a $aa-$b7,$ff
> load_flag $ff
141f : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1421 : 48 > pha ;use stack to load status
1422 : a9f3 > lda #$aa-$b7 ;precharge accu
1424 : 28 > plp
>
1425 : b7 > db $b7 ;test nop integrity - flags on
1426 : ea > nop
1427 : ea > nop
> tst_a $aa-$b7,$ff
1428 : 08 > php ;save flags
1429 : c9f3 > cmp #$aa-$b7 ;test result
> trap_ne
142b : d0fe > bne * ;failed not equal (non zero)
>
142d : 68 > pla ;load status
142e : 48 > pha
> cmp_flag $ff
142f : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1431 : d0fe > bne * ;failed not equal (non zero)
>
1433 : 28 > plp ;restore status
>
1434 : c042 > cpy #$42
> trap_ne ;y changed
1436 : d0fe > bne * ;failed not equal (non zero)
>
1438 : e000 > cpx #0
> trap_ne ;x changed
143a : d0fe > bne * ;failed not equal (non zero)
>
nop_test $c7,1
143c : a042 > ldy #$42
143e : a203 > ldx #4-1
1440 : c7 > db $c7 ;test nop length
> if 1 = 1
1441 : ca > dex
1442 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
1443 : ca > dex
> trap_ne ;wrong number of bytes
1444 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$c7,0
> load_flag 0
1446 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1448 : 48 > pha ;use stack to load status
1449 : a938 > lda #$ff-$c7 ;precharge accu
144b : 28 > plp
>
144c : c7 > db $c7 ;test nop integrity - flags off
144d : ea > nop
144e : ea > nop
> tst_a $ff-$c7,0
144f : 08 > php ;save flags
1450 : c938 > cmp #$ff-$c7 ;test result
> trap_ne
1452 : d0fe > bne * ;failed not equal (non zero)
>
1454 : 68 > pla ;load status
1455 : 48 > pha
> cmp_flag 0
1456 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1458 : d0fe > bne * ;failed not equal (non zero)
>
145a : 28 > plp ;restore status
>
> set_a $aa-$c7,$ff
> load_flag $ff
145b : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
145d : 48 > pha ;use stack to load status
145e : a9e3 > lda #$aa-$c7 ;precharge accu
1460 : 28 > plp
>
1461 : c7 > db $c7 ;test nop integrity - flags on
1462 : ea > nop
1463 : ea > nop
> tst_a $aa-$c7,$ff
1464 : 08 > php ;save flags
1465 : c9e3 > cmp #$aa-$c7 ;test result
> trap_ne
1467 : d0fe > bne * ;failed not equal (non zero)
>
1469 : 68 > pla ;load status
146a : 48 > pha
> cmp_flag $ff
146b : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
146d : d0fe > bne * ;failed not equal (non zero)
>
146f : 28 > plp ;restore status
>
1470 : c042 > cpy #$42
> trap_ne ;y changed
1472 : d0fe > bne * ;failed not equal (non zero)
>
1474 : e000 > cpx #0
> trap_ne ;x changed
1476 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $d7,1
1478 : a042 > ldy #$42
147a : a203 > ldx #4-1
147c : d7 > db $d7 ;test nop length
> if 1 = 1
147d : ca > dex
147e : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
147f : ca > dex
> trap_ne ;wrong number of bytes
1480 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$d7,0
> load_flag 0
1482 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1484 : 48 > pha ;use stack to load status
1485 : a928 > lda #$ff-$d7 ;precharge accu
1487 : 28 > plp
>
1488 : d7 > db $d7 ;test nop integrity - flags off
1489 : ea > nop
148a : ea > nop
> tst_a $ff-$d7,0
148b : 08 > php ;save flags
148c : c928 > cmp #$ff-$d7 ;test result
> trap_ne
148e : d0fe > bne * ;failed not equal (non zero)
>
1490 : 68 > pla ;load status
1491 : 48 > pha
> cmp_flag 0
1492 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1494 : d0fe > bne * ;failed not equal (non zero)
>
1496 : 28 > plp ;restore status
>
> set_a $aa-$d7,$ff
> load_flag $ff
1497 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1499 : 48 > pha ;use stack to load status
149a : a9d3 > lda #$aa-$d7 ;precharge accu
149c : 28 > plp
>
149d : d7 > db $d7 ;test nop integrity - flags on
149e : ea > nop
149f : ea > nop
> tst_a $aa-$d7,$ff
14a0 : 08 > php ;save flags
14a1 : c9d3 > cmp #$aa-$d7 ;test result
> trap_ne
14a3 : d0fe > bne * ;failed not equal (non zero)
>
14a5 : 68 > pla ;load status
14a6 : 48 > pha
> cmp_flag $ff
14a7 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
14a9 : d0fe > bne * ;failed not equal (non zero)
>
14ab : 28 > plp ;restore status
>
14ac : c042 > cpy #$42
> trap_ne ;y changed
14ae : d0fe > bne * ;failed not equal (non zero)
>
14b0 : e000 > cpx #0
> trap_ne ;x changed
14b2 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $e7,1
14b4 : a042 > ldy #$42
14b6 : a203 > ldx #4-1
14b8 : e7 > db $e7 ;test nop length
> if 1 = 1
14b9 : ca > dex
14ba : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
14bb : ca > dex
> trap_ne ;wrong number of bytes
14bc : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$e7,0
> load_flag 0
14be : a900 > lda #0 ;allow test to change I-flag (no mask)
>
14c0 : 48 > pha ;use stack to load status
14c1 : a918 > lda #$ff-$e7 ;precharge accu
14c3 : 28 > plp
>
14c4 : e7 > db $e7 ;test nop integrity - flags off
14c5 : ea > nop
14c6 : ea > nop
> tst_a $ff-$e7,0
14c7 : 08 > php ;save flags
14c8 : c918 > cmp #$ff-$e7 ;test result
> trap_ne
14ca : d0fe > bne * ;failed not equal (non zero)
>
14cc : 68 > pla ;load status
14cd : 48 > pha
> cmp_flag 0
14ce : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
14d0 : d0fe > bne * ;failed not equal (non zero)
>
14d2 : 28 > plp ;restore status
>
> set_a $aa-$e7,$ff
> load_flag $ff
14d3 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
14d5 : 48 > pha ;use stack to load status
14d6 : a9c3 > lda #$aa-$e7 ;precharge accu
14d8 : 28 > plp
>
14d9 : e7 > db $e7 ;test nop integrity - flags on
14da : ea > nop
14db : ea > nop
> tst_a $aa-$e7,$ff
14dc : 08 > php ;save flags
14dd : c9c3 > cmp #$aa-$e7 ;test result
> trap_ne
14df : d0fe > bne * ;failed not equal (non zero)
>
14e1 : 68 > pla ;load status
14e2 : 48 > pha
> cmp_flag $ff
14e3 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
14e5 : d0fe > bne * ;failed not equal (non zero)
>
14e7 : 28 > plp ;restore status
>
14e8 : c042 > cpy #$42
> trap_ne ;y changed
14ea : d0fe > bne * ;failed not equal (non zero)
>
14ec : e000 > cpx #0
> trap_ne ;x changed
14ee : d0fe > bne * ;failed not equal (non zero)
>
nop_test $f7,1
14f0 : a042 > ldy #$42
14f2 : a203 > ldx #4-1
14f4 : f7 > db $f7 ;test nop length
> if 1 = 1
14f5 : ca > dex
14f6 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
14f7 : ca > dex
> trap_ne ;wrong number of bytes
14f8 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$f7,0
> load_flag 0
14fa : a900 > lda #0 ;allow test to change I-flag (no mask)
>
14fc : 48 > pha ;use stack to load status
14fd : a908 > lda #$ff-$f7 ;precharge accu
14ff : 28 > plp
>
1500 : f7 > db $f7 ;test nop integrity - flags off
1501 : ea > nop
1502 : ea > nop
> tst_a $ff-$f7,0
1503 : 08 > php ;save flags
1504 : c908 > cmp #$ff-$f7 ;test result
> trap_ne
1506 : d0fe > bne * ;failed not equal (non zero)
>
1508 : 68 > pla ;load status
1509 : 48 > pha
> cmp_flag 0
150a : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
150c : d0fe > bne * ;failed not equal (non zero)
>
150e : 28 > plp ;restore status
>
> set_a $aa-$f7,$ff
> load_flag $ff
150f : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1511 : 48 > pha ;use stack to load status
1512 : a9b3 > lda #$aa-$f7 ;precharge accu
1514 : 28 > plp
>
1515 : f7 > db $f7 ;test nop integrity - flags on
1516 : ea > nop
1517 : ea > nop
> tst_a $aa-$f7,$ff
1518 : 08 > php ;save flags
1519 : c9b3 > cmp #$aa-$f7 ;test result
> trap_ne
151b : d0fe > bne * ;failed not equal (non zero)
>
151d : 68 > pla ;load status
151e : 48 > pha
> cmp_flag $ff
151f : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1521 : d0fe > bne * ;failed not equal (non zero)
>
1523 : 28 > plp ;restore status
>
1524 : c042 > cpy #$42
> trap_ne ;y changed
1526 : d0fe > bne * ;failed not equal (non zero)
>
1528 : e000 > cpx #0
> trap_ne ;x changed
152a : d0fe > bne * ;failed not equal (non zero)
>
nop_test $0f,1
152c : a042 > ldy #$42
152e : a203 > ldx #4-1
1530 : 0f > db $0f ;test nop length
> if 1 = 1
1531 : ca > dex
1532 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
1533 : ca > dex
> trap_ne ;wrong number of bytes
1534 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$0f,0
> load_flag 0
1536 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1538 : 48 > pha ;use stack to load status
1539 : a9f0 > lda #$ff-$0f ;precharge accu
153b : 28 > plp
>
153c : 0f > db $0f ;test nop integrity - flags off
153d : ea > nop
153e : ea > nop
> tst_a $ff-$0f,0
153f : 08 > php ;save flags
1540 : c9f0 > cmp #$ff-$0f ;test result
> trap_ne
1542 : d0fe > bne * ;failed not equal (non zero)
>
1544 : 68 > pla ;load status
1545 : 48 > pha
> cmp_flag 0
1546 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1548 : d0fe > bne * ;failed not equal (non zero)
>
154a : 28 > plp ;restore status
>
> set_a $aa-$0f,$ff
> load_flag $ff
154b : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
154d : 48 > pha ;use stack to load status
154e : a99b > lda #$aa-$0f ;precharge accu
1550 : 28 > plp
>
1551 : 0f > db $0f ;test nop integrity - flags on
1552 : ea > nop
1553 : ea > nop
> tst_a $aa-$0f,$ff
1554 : 08 > php ;save flags
1555 : c99b > cmp #$aa-$0f ;test result
> trap_ne
1557 : d0fe > bne * ;failed not equal (non zero)
>
1559 : 68 > pla ;load status
155a : 48 > pha
> cmp_flag $ff
155b : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
155d : d0fe > bne * ;failed not equal (non zero)
>
155f : 28 > plp ;restore status
>
1560 : c042 > cpy #$42
> trap_ne ;y changed
1562 : d0fe > bne * ;failed not equal (non zero)
>
1564 : e000 > cpx #0
> trap_ne ;x changed
1566 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $1f,1
1568 : a042 > ldy #$42
156a : a203 > ldx #4-1
156c : 1f > db $1f ;test nop length
> if 1 = 1
156d : ca > dex
156e : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
156f : ca > dex
> trap_ne ;wrong number of bytes
1570 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$1f,0
> load_flag 0
1572 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1574 : 48 > pha ;use stack to load status
1575 : a9e0 > lda #$ff-$1f ;precharge accu
1577 : 28 > plp
>
1578 : 1f > db $1f ;test nop integrity - flags off
1579 : ea > nop
157a : ea > nop
> tst_a $ff-$1f,0
157b : 08 > php ;save flags
157c : c9e0 > cmp #$ff-$1f ;test result
> trap_ne
157e : d0fe > bne * ;failed not equal (non zero)
>
1580 : 68 > pla ;load status
1581 : 48 > pha
> cmp_flag 0
1582 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1584 : d0fe > bne * ;failed not equal (non zero)
>
1586 : 28 > plp ;restore status
>
> set_a $aa-$1f,$ff
> load_flag $ff
1587 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1589 : 48 > pha ;use stack to load status
158a : a98b > lda #$aa-$1f ;precharge accu
158c : 28 > plp
>
158d : 1f > db $1f ;test nop integrity - flags on
158e : ea > nop
158f : ea > nop
> tst_a $aa-$1f,$ff
1590 : 08 > php ;save flags
1591 : c98b > cmp #$aa-$1f ;test result
> trap_ne
1593 : d0fe > bne * ;failed not equal (non zero)
>
1595 : 68 > pla ;load status
1596 : 48 > pha
> cmp_flag $ff
1597 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1599 : d0fe > bne * ;failed not equal (non zero)
>
159b : 28 > plp ;restore status
>
159c : c042 > cpy #$42
> trap_ne ;y changed
159e : d0fe > bne * ;failed not equal (non zero)
>
15a0 : e000 > cpx #0
> trap_ne ;x changed
15a2 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $2f,1
15a4 : a042 > ldy #$42
15a6 : a203 > ldx #4-1
15a8 : 2f > db $2f ;test nop length
> if 1 = 1
15a9 : ca > dex
15aa : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
15ab : ca > dex
> trap_ne ;wrong number of bytes
15ac : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$2f,0
> load_flag 0
15ae : a900 > lda #0 ;allow test to change I-flag (no mask)
>
15b0 : 48 > pha ;use stack to load status
15b1 : a9d0 > lda #$ff-$2f ;precharge accu
15b3 : 28 > plp
>
15b4 : 2f > db $2f ;test nop integrity - flags off
15b5 : ea > nop
15b6 : ea > nop
> tst_a $ff-$2f,0
15b7 : 08 > php ;save flags
15b8 : c9d0 > cmp #$ff-$2f ;test result
> trap_ne
15ba : d0fe > bne * ;failed not equal (non zero)
>
15bc : 68 > pla ;load status
15bd : 48 > pha
> cmp_flag 0
15be : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
15c0 : d0fe > bne * ;failed not equal (non zero)
>
15c2 : 28 > plp ;restore status
>
> set_a $aa-$2f,$ff
> load_flag $ff
15c3 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
15c5 : 48 > pha ;use stack to load status
15c6 : a97b > lda #$aa-$2f ;precharge accu
15c8 : 28 > plp
>
15c9 : 2f > db $2f ;test nop integrity - flags on
15ca : ea > nop
15cb : ea > nop
> tst_a $aa-$2f,$ff
15cc : 08 > php ;save flags
15cd : c97b > cmp #$aa-$2f ;test result
> trap_ne
15cf : d0fe > bne * ;failed not equal (non zero)
>
15d1 : 68 > pla ;load status
15d2 : 48 > pha
> cmp_flag $ff
15d3 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
15d5 : d0fe > bne * ;failed not equal (non zero)
>
15d7 : 28 > plp ;restore status
>
15d8 : c042 > cpy #$42
> trap_ne ;y changed
15da : d0fe > bne * ;failed not equal (non zero)
>
15dc : e000 > cpx #0
> trap_ne ;x changed
15de : d0fe > bne * ;failed not equal (non zero)
>
nop_test $3f,1
15e0 : a042 > ldy #$42
15e2 : a203 > ldx #4-1
15e4 : 3f > db $3f ;test nop length
> if 1 = 1
15e5 : ca > dex
15e6 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
15e7 : ca > dex
> trap_ne ;wrong number of bytes
15e8 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$3f,0
> load_flag 0
15ea : a900 > lda #0 ;allow test to change I-flag (no mask)
>
15ec : 48 > pha ;use stack to load status
15ed : a9c0 > lda #$ff-$3f ;precharge accu
15ef : 28 > plp
>
15f0 : 3f > db $3f ;test nop integrity - flags off
15f1 : ea > nop
15f2 : ea > nop
> tst_a $ff-$3f,0
15f3 : 08 > php ;save flags
15f4 : c9c0 > cmp #$ff-$3f ;test result
> trap_ne
15f6 : d0fe > bne * ;failed not equal (non zero)
>
15f8 : 68 > pla ;load status
15f9 : 48 > pha
> cmp_flag 0
15fa : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
15fc : d0fe > bne * ;failed not equal (non zero)
>
15fe : 28 > plp ;restore status
>
> set_a $aa-$3f,$ff
> load_flag $ff
15ff : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1601 : 48 > pha ;use stack to load status
1602 : a96b > lda #$aa-$3f ;precharge accu
1604 : 28 > plp
>
1605 : 3f > db $3f ;test nop integrity - flags on
1606 : ea > nop
1607 : ea > nop
> tst_a $aa-$3f,$ff
1608 : 08 > php ;save flags
1609 : c96b > cmp #$aa-$3f ;test result
> trap_ne
160b : d0fe > bne * ;failed not equal (non zero)
>
160d : 68 > pla ;load status
160e : 48 > pha
> cmp_flag $ff
160f : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1611 : d0fe > bne * ;failed not equal (non zero)
>
1613 : 28 > plp ;restore status
>
1614 : c042 > cpy #$42
> trap_ne ;y changed
1616 : d0fe > bne * ;failed not equal (non zero)
>
1618 : e000 > cpx #0
> trap_ne ;x changed
161a : d0fe > bne * ;failed not equal (non zero)
>
nop_test $4f,1
161c : a042 > ldy #$42
161e : a203 > ldx #4-1
1620 : 4f > db $4f ;test nop length
> if 1 = 1
1621 : ca > dex
1622 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
1623 : ca > dex
> trap_ne ;wrong number of bytes
1624 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$4f,0
> load_flag 0
1626 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1628 : 48 > pha ;use stack to load status
1629 : a9b0 > lda #$ff-$4f ;precharge accu
162b : 28 > plp
>
162c : 4f > db $4f ;test nop integrity - flags off
162d : ea > nop
162e : ea > nop
> tst_a $ff-$4f,0
162f : 08 > php ;save flags
1630 : c9b0 > cmp #$ff-$4f ;test result
> trap_ne
1632 : d0fe > bne * ;failed not equal (non zero)
>
1634 : 68 > pla ;load status
1635 : 48 > pha
> cmp_flag 0
1636 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1638 : d0fe > bne * ;failed not equal (non zero)
>
163a : 28 > plp ;restore status
>
> set_a $aa-$4f,$ff
> load_flag $ff
163b : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
163d : 48 > pha ;use stack to load status
163e : a95b > lda #$aa-$4f ;precharge accu
1640 : 28 > plp
>
1641 : 4f > db $4f ;test nop integrity - flags on
1642 : ea > nop
1643 : ea > nop
> tst_a $aa-$4f,$ff
1644 : 08 > php ;save flags
1645 : c95b > cmp #$aa-$4f ;test result
> trap_ne
1647 : d0fe > bne * ;failed not equal (non zero)
>
1649 : 68 > pla ;load status
164a : 48 > pha
> cmp_flag $ff
164b : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
164d : d0fe > bne * ;failed not equal (non zero)
>
164f : 28 > plp ;restore status
>
1650 : c042 > cpy #$42
> trap_ne ;y changed
1652 : d0fe > bne * ;failed not equal (non zero)
>
1654 : e000 > cpx #0
> trap_ne ;x changed
1656 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $5f,1
1658 : a042 > ldy #$42
165a : a203 > ldx #4-1
165c : 5f > db $5f ;test nop length
> if 1 = 1
165d : ca > dex
165e : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
165f : ca > dex
> trap_ne ;wrong number of bytes
1660 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$5f,0
> load_flag 0
1662 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1664 : 48 > pha ;use stack to load status
1665 : a9a0 > lda #$ff-$5f ;precharge accu
1667 : 28 > plp
>
1668 : 5f > db $5f ;test nop integrity - flags off
1669 : ea > nop
166a : ea > nop
> tst_a $ff-$5f,0
166b : 08 > php ;save flags
166c : c9a0 > cmp #$ff-$5f ;test result
> trap_ne
166e : d0fe > bne * ;failed not equal (non zero)
>
1670 : 68 > pla ;load status
1671 : 48 > pha
> cmp_flag 0
1672 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1674 : d0fe > bne * ;failed not equal (non zero)
>
1676 : 28 > plp ;restore status
>
> set_a $aa-$5f,$ff
> load_flag $ff
1677 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1679 : 48 > pha ;use stack to load status
167a : a94b > lda #$aa-$5f ;precharge accu
167c : 28 > plp
>
167d : 5f > db $5f ;test nop integrity - flags on
167e : ea > nop
167f : ea > nop
> tst_a $aa-$5f,$ff
1680 : 08 > php ;save flags
1681 : c94b > cmp #$aa-$5f ;test result
> trap_ne
1683 : d0fe > bne * ;failed not equal (non zero)
>
1685 : 68 > pla ;load status
1686 : 48 > pha
> cmp_flag $ff
1687 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1689 : d0fe > bne * ;failed not equal (non zero)
>
168b : 28 > plp ;restore status
>
168c : c042 > cpy #$42
> trap_ne ;y changed
168e : d0fe > bne * ;failed not equal (non zero)
>
1690 : e000 > cpx #0
> trap_ne ;x changed
1692 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $6f,1
1694 : a042 > ldy #$42
1696 : a203 > ldx #4-1
1698 : 6f > db $6f ;test nop length
> if 1 = 1
1699 : ca > dex
169a : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
169b : ca > dex
> trap_ne ;wrong number of bytes
169c : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$6f,0
> load_flag 0
169e : a900 > lda #0 ;allow test to change I-flag (no mask)
>
16a0 : 48 > pha ;use stack to load status
16a1 : a990 > lda #$ff-$6f ;precharge accu
16a3 : 28 > plp
>
16a4 : 6f > db $6f ;test nop integrity - flags off
16a5 : ea > nop
16a6 : ea > nop
> tst_a $ff-$6f,0
16a7 : 08 > php ;save flags
16a8 : c990 > cmp #$ff-$6f ;test result
> trap_ne
16aa : d0fe > bne * ;failed not equal (non zero)
>
16ac : 68 > pla ;load status
16ad : 48 > pha
> cmp_flag 0
16ae : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
16b0 : d0fe > bne * ;failed not equal (non zero)
>
16b2 : 28 > plp ;restore status
>
> set_a $aa-$6f,$ff
> load_flag $ff
16b3 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
16b5 : 48 > pha ;use stack to load status
16b6 : a93b > lda #$aa-$6f ;precharge accu
16b8 : 28 > plp
>
16b9 : 6f > db $6f ;test nop integrity - flags on
16ba : ea > nop
16bb : ea > nop
> tst_a $aa-$6f,$ff
16bc : 08 > php ;save flags
16bd : c93b > cmp #$aa-$6f ;test result
> trap_ne
16bf : d0fe > bne * ;failed not equal (non zero)
>
16c1 : 68 > pla ;load status
16c2 : 48 > pha
> cmp_flag $ff
16c3 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
16c5 : d0fe > bne * ;failed not equal (non zero)
>
16c7 : 28 > plp ;restore status
>
16c8 : c042 > cpy #$42
> trap_ne ;y changed
16ca : d0fe > bne * ;failed not equal (non zero)
>
16cc : e000 > cpx #0
> trap_ne ;x changed
16ce : d0fe > bne * ;failed not equal (non zero)
>
nop_test $7f,1
16d0 : a042 > ldy #$42
16d2 : a203 > ldx #4-1
16d4 : 7f > db $7f ;test nop length
> if 1 = 1
16d5 : ca > dex
16d6 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
16d7 : ca > dex
> trap_ne ;wrong number of bytes
16d8 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$7f,0
> load_flag 0
16da : a900 > lda #0 ;allow test to change I-flag (no mask)
>
16dc : 48 > pha ;use stack to load status
16dd : a980 > lda #$ff-$7f ;precharge accu
16df : 28 > plp
>
16e0 : 7f > db $7f ;test nop integrity - flags off
16e1 : ea > nop
16e2 : ea > nop
> tst_a $ff-$7f,0
16e3 : 08 > php ;save flags
16e4 : c980 > cmp #$ff-$7f ;test result
> trap_ne
16e6 : d0fe > bne * ;failed not equal (non zero)
>
16e8 : 68 > pla ;load status
16e9 : 48 > pha
> cmp_flag 0
16ea : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
16ec : d0fe > bne * ;failed not equal (non zero)
>
16ee : 28 > plp ;restore status
>
> set_a $aa-$7f,$ff
> load_flag $ff
16ef : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
16f1 : 48 > pha ;use stack to load status
16f2 : a92b > lda #$aa-$7f ;precharge accu
16f4 : 28 > plp
>
16f5 : 7f > db $7f ;test nop integrity - flags on
16f6 : ea > nop
16f7 : ea > nop
> tst_a $aa-$7f,$ff
16f8 : 08 > php ;save flags
16f9 : c92b > cmp #$aa-$7f ;test result
> trap_ne
16fb : d0fe > bne * ;failed not equal (non zero)
>
16fd : 68 > pla ;load status
16fe : 48 > pha
> cmp_flag $ff
16ff : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1701 : d0fe > bne * ;failed not equal (non zero)
>
1703 : 28 > plp ;restore status
>
1704 : c042 > cpy #$42
> trap_ne ;y changed
1706 : d0fe > bne * ;failed not equal (non zero)
>
1708 : e000 > cpx #0
> trap_ne ;x changed
170a : d0fe > bne * ;failed not equal (non zero)
>
nop_test $8f,1
170c : a042 > ldy #$42
170e : a203 > ldx #4-1
1710 : 8f > db $8f ;test nop length
> if 1 = 1
1711 : ca > dex
1712 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
1713 : ca > dex
> trap_ne ;wrong number of bytes
1714 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$8f,0
> load_flag 0
1716 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1718 : 48 > pha ;use stack to load status
1719 : a970 > lda #$ff-$8f ;precharge accu
171b : 28 > plp
>
171c : 8f > db $8f ;test nop integrity - flags off
171d : ea > nop
171e : ea > nop
> tst_a $ff-$8f,0
171f : 08 > php ;save flags
1720 : c970 > cmp #$ff-$8f ;test result
> trap_ne
1722 : d0fe > bne * ;failed not equal (non zero)
>
1724 : 68 > pla ;load status
1725 : 48 > pha
> cmp_flag 0
1726 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1728 : d0fe > bne * ;failed not equal (non zero)
>
172a : 28 > plp ;restore status
>
> set_a $aa-$8f,$ff
> load_flag $ff
172b : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
172d : 48 > pha ;use stack to load status
172e : a91b > lda #$aa-$8f ;precharge accu
1730 : 28 > plp
>
1731 : 8f > db $8f ;test nop integrity - flags on
1732 : ea > nop
1733 : ea > nop
> tst_a $aa-$8f,$ff
1734 : 08 > php ;save flags
1735 : c91b > cmp #$aa-$8f ;test result
> trap_ne
1737 : d0fe > bne * ;failed not equal (non zero)
>
1739 : 68 > pla ;load status
173a : 48 > pha
> cmp_flag $ff
173b : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
173d : d0fe > bne * ;failed not equal (non zero)
>
173f : 28 > plp ;restore status
>
1740 : c042 > cpy #$42
> trap_ne ;y changed
1742 : d0fe > bne * ;failed not equal (non zero)
>
1744 : e000 > cpx #0
> trap_ne ;x changed
1746 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $9f,1
1748 : a042 > ldy #$42
174a : a203 > ldx #4-1
174c : 9f > db $9f ;test nop length
> if 1 = 1
174d : ca > dex
174e : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
174f : ca > dex
> trap_ne ;wrong number of bytes
1750 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$9f,0
> load_flag 0
1752 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1754 : 48 > pha ;use stack to load status
1755 : a960 > lda #$ff-$9f ;precharge accu
1757 : 28 > plp
>
1758 : 9f > db $9f ;test nop integrity - flags off
1759 : ea > nop
175a : ea > nop
> tst_a $ff-$9f,0
175b : 08 > php ;save flags
175c : c960 > cmp #$ff-$9f ;test result
> trap_ne
175e : d0fe > bne * ;failed not equal (non zero)
>
1760 : 68 > pla ;load status
1761 : 48 > pha
> cmp_flag 0
1762 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1764 : d0fe > bne * ;failed not equal (non zero)
>
1766 : 28 > plp ;restore status
>
> set_a $aa-$9f,$ff
> load_flag $ff
1767 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1769 : 48 > pha ;use stack to load status
176a : a90b > lda #$aa-$9f ;precharge accu
176c : 28 > plp
>
176d : 9f > db $9f ;test nop integrity - flags on
176e : ea > nop
176f : ea > nop
> tst_a $aa-$9f,$ff
1770 : 08 > php ;save flags
1771 : c90b > cmp #$aa-$9f ;test result
> trap_ne
1773 : d0fe > bne * ;failed not equal (non zero)
>
1775 : 68 > pla ;load status
1776 : 48 > pha
> cmp_flag $ff
1777 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1779 : d0fe > bne * ;failed not equal (non zero)
>
177b : 28 > plp ;restore status
>
177c : c042 > cpy #$42
> trap_ne ;y changed
177e : d0fe > bne * ;failed not equal (non zero)
>
1780 : e000 > cpx #0
> trap_ne ;x changed
1782 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $af,1
1784 : a042 > ldy #$42
1786 : a203 > ldx #4-1
1788 : af > db $af ;test nop length
> if 1 = 1
1789 : ca > dex
178a : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
178b : ca > dex
> trap_ne ;wrong number of bytes
178c : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$af,0
> load_flag 0
178e : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1790 : 48 > pha ;use stack to load status
1791 : a950 > lda #$ff-$af ;precharge accu
1793 : 28 > plp
>
1794 : af > db $af ;test nop integrity - flags off
1795 : ea > nop
1796 : ea > nop
> tst_a $ff-$af,0
1797 : 08 > php ;save flags
1798 : c950 > cmp #$ff-$af ;test result
> trap_ne
179a : d0fe > bne * ;failed not equal (non zero)
>
179c : 68 > pla ;load status
179d : 48 > pha
> cmp_flag 0
179e : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
17a0 : d0fe > bne * ;failed not equal (non zero)
>
17a2 : 28 > plp ;restore status
>
> set_a $aa-$af,$ff
> load_flag $ff
17a3 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
17a5 : 48 > pha ;use stack to load status
17a6 : a9fb > lda #$aa-$af ;precharge accu
17a8 : 28 > plp
>
17a9 : af > db $af ;test nop integrity - flags on
17aa : ea > nop
17ab : ea > nop
> tst_a $aa-$af,$ff
17ac : 08 > php ;save flags
17ad : c9fb > cmp #$aa-$af ;test result
> trap_ne
17af : d0fe > bne * ;failed not equal (non zero)
>
17b1 : 68 > pla ;load status
17b2 : 48 > pha
> cmp_flag $ff
17b3 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
17b5 : d0fe > bne * ;failed not equal (non zero)
>
17b7 : 28 > plp ;restore status
>
17b8 : c042 > cpy #$42
> trap_ne ;y changed
17ba : d0fe > bne * ;failed not equal (non zero)
>
17bc : e000 > cpx #0
> trap_ne ;x changed
17be : d0fe > bne * ;failed not equal (non zero)
>
nop_test $bf,1
17c0 : a042 > ldy #$42
17c2 : a203 > ldx #4-1
17c4 : bf > db $bf ;test nop length
> if 1 = 1
17c5 : ca > dex
17c6 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
17c7 : ca > dex
> trap_ne ;wrong number of bytes
17c8 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$bf,0
> load_flag 0
17ca : a900 > lda #0 ;allow test to change I-flag (no mask)
>
17cc : 48 > pha ;use stack to load status
17cd : a940 > lda #$ff-$bf ;precharge accu
17cf : 28 > plp
>
17d0 : bf > db $bf ;test nop integrity - flags off
17d1 : ea > nop
17d2 : ea > nop
> tst_a $ff-$bf,0
17d3 : 08 > php ;save flags
17d4 : c940 > cmp #$ff-$bf ;test result
> trap_ne
17d6 : d0fe > bne * ;failed not equal (non zero)
>
17d8 : 68 > pla ;load status
17d9 : 48 > pha
> cmp_flag 0
17da : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
17dc : d0fe > bne * ;failed not equal (non zero)
>
17de : 28 > plp ;restore status
>
> set_a $aa-$bf,$ff
> load_flag $ff
17df : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
17e1 : 48 > pha ;use stack to load status
17e2 : a9eb > lda #$aa-$bf ;precharge accu
17e4 : 28 > plp
>
17e5 : bf > db $bf ;test nop integrity - flags on
17e6 : ea > nop
17e7 : ea > nop
> tst_a $aa-$bf,$ff
17e8 : 08 > php ;save flags
17e9 : c9eb > cmp #$aa-$bf ;test result
> trap_ne
17eb : d0fe > bne * ;failed not equal (non zero)
>
17ed : 68 > pla ;load status
17ee : 48 > pha
> cmp_flag $ff
17ef : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
17f1 : d0fe > bne * ;failed not equal (non zero)
>
17f3 : 28 > plp ;restore status
>
17f4 : c042 > cpy #$42
> trap_ne ;y changed
17f6 : d0fe > bne * ;failed not equal (non zero)
>
17f8 : e000 > cpx #0
> trap_ne ;x changed
17fa : d0fe > bne * ;failed not equal (non zero)
>
nop_test $cf,1
17fc : a042 > ldy #$42
17fe : a203 > ldx #4-1
1800 : cf > db $cf ;test nop length
> if 1 = 1
1801 : ca > dex
1802 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
1803 : ca > dex
> trap_ne ;wrong number of bytes
1804 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$cf,0
> load_flag 0
1806 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1808 : 48 > pha ;use stack to load status
1809 : a930 > lda #$ff-$cf ;precharge accu
180b : 28 > plp
>
180c : cf > db $cf ;test nop integrity - flags off
180d : ea > nop
180e : ea > nop
> tst_a $ff-$cf,0
180f : 08 > php ;save flags
1810 : c930 > cmp #$ff-$cf ;test result
> trap_ne
1812 : d0fe > bne * ;failed not equal (non zero)
>
1814 : 68 > pla ;load status
1815 : 48 > pha
> cmp_flag 0
1816 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1818 : d0fe > bne * ;failed not equal (non zero)
>
181a : 28 > plp ;restore status
>
> set_a $aa-$cf,$ff
> load_flag $ff
181b : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
181d : 48 > pha ;use stack to load status
181e : a9db > lda #$aa-$cf ;precharge accu
1820 : 28 > plp
>
1821 : cf > db $cf ;test nop integrity - flags on
1822 : ea > nop
1823 : ea > nop
> tst_a $aa-$cf,$ff
1824 : 08 > php ;save flags
1825 : c9db > cmp #$aa-$cf ;test result
> trap_ne
1827 : d0fe > bne * ;failed not equal (non zero)
>
1829 : 68 > pla ;load status
182a : 48 > pha
> cmp_flag $ff
182b : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
182d : d0fe > bne * ;failed not equal (non zero)
>
182f : 28 > plp ;restore status
>
1830 : c042 > cpy #$42
> trap_ne ;y changed
1832 : d0fe > bne * ;failed not equal (non zero)
>
1834 : e000 > cpx #0
> trap_ne ;x changed
1836 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $df,1
1838 : a042 > ldy #$42
183a : a203 > ldx #4-1
183c : df > db $df ;test nop length
> if 1 = 1
183d : ca > dex
183e : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
183f : ca > dex
> trap_ne ;wrong number of bytes
1840 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$df,0
> load_flag 0
1842 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1844 : 48 > pha ;use stack to load status
1845 : a920 > lda #$ff-$df ;precharge accu
1847 : 28 > plp
>
1848 : df > db $df ;test nop integrity - flags off
1849 : ea > nop
184a : ea > nop
> tst_a $ff-$df,0
184b : 08 > php ;save flags
184c : c920 > cmp #$ff-$df ;test result
> trap_ne
184e : d0fe > bne * ;failed not equal (non zero)
>
1850 : 68 > pla ;load status
1851 : 48 > pha
> cmp_flag 0
1852 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1854 : d0fe > bne * ;failed not equal (non zero)
>
1856 : 28 > plp ;restore status
>
> set_a $aa-$df,$ff
> load_flag $ff
1857 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1859 : 48 > pha ;use stack to load status
185a : a9cb > lda #$aa-$df ;precharge accu
185c : 28 > plp
>
185d : df > db $df ;test nop integrity - flags on
185e : ea > nop
185f : ea > nop
> tst_a $aa-$df,$ff
1860 : 08 > php ;save flags
1861 : c9cb > cmp #$aa-$df ;test result
> trap_ne
1863 : d0fe > bne * ;failed not equal (non zero)
>
1865 : 68 > pla ;load status
1866 : 48 > pha
> cmp_flag $ff
1867 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1869 : d0fe > bne * ;failed not equal (non zero)
>
186b : 28 > plp ;restore status
>
186c : c042 > cpy #$42
> trap_ne ;y changed
186e : d0fe > bne * ;failed not equal (non zero)
>
1870 : e000 > cpx #0
> trap_ne ;x changed
1872 : d0fe > bne * ;failed not equal (non zero)
>
nop_test $ef,1
1874 : a042 > ldy #$42
1876 : a203 > ldx #4-1
1878 : ef > db $ef ;test nop length
> if 1 = 1
1879 : ca > dex
187a : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
187b : ca > dex
> trap_ne ;wrong number of bytes
187c : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$ef,0
> load_flag 0
187e : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1880 : 48 > pha ;use stack to load status
1881 : a910 > lda #$ff-$ef ;precharge accu
1883 : 28 > plp
>
1884 : ef > db $ef ;test nop integrity - flags off
1885 : ea > nop
1886 : ea > nop
> tst_a $ff-$ef,0
1887 : 08 > php ;save flags
1888 : c910 > cmp #$ff-$ef ;test result
> trap_ne
188a : d0fe > bne * ;failed not equal (non zero)
>
188c : 68 > pla ;load status
188d : 48 > pha
> cmp_flag 0
188e : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1890 : d0fe > bne * ;failed not equal (non zero)
>
1892 : 28 > plp ;restore status
>
> set_a $aa-$ef,$ff
> load_flag $ff
1893 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1895 : 48 > pha ;use stack to load status
1896 : a9bb > lda #$aa-$ef ;precharge accu
1898 : 28 > plp
>
1899 : ef > db $ef ;test nop integrity - flags on
189a : ea > nop
189b : ea > nop
> tst_a $aa-$ef,$ff
189c : 08 > php ;save flags
189d : c9bb > cmp #$aa-$ef ;test result
> trap_ne
189f : d0fe > bne * ;failed not equal (non zero)
>
18a1 : 68 > pla ;load status
18a2 : 48 > pha
> cmp_flag $ff
18a3 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
18a5 : d0fe > bne * ;failed not equal (non zero)
>
18a7 : 28 > plp ;restore status
>
18a8 : c042 > cpy #$42
> trap_ne ;y changed
18aa : d0fe > bne * ;failed not equal (non zero)
>
18ac : e000 > cpx #0
> trap_ne ;x changed
18ae : d0fe > bne * ;failed not equal (non zero)
>
nop_test $ff,1
18b0 : a042 > ldy #$42
18b2 : a203 > ldx #4-1
18b4 : ff > db $ff ;test nop length
> if 1 = 1
18b5 : ca > dex
18b6 : ca > dex
> endif
> if 1 = 2
> iny
> dex
> endif
> if 1 = 3
> iny
> iny
> endif
18b7 : ca > dex
> trap_ne ;wrong number of bytes
18b8 : d0fe > bne * ;failed not equal (non zero)
>
> set_a $ff-$ff,0
> load_flag 0
18ba : a900 > lda #0 ;allow test to change I-flag (no mask)
>
18bc : 48 > pha ;use stack to load status
18bd : a900 > lda #$ff-$ff ;precharge accu
18bf : 28 > plp
>
18c0 : ff > db $ff ;test nop integrity - flags off
18c1 : ea > nop
18c2 : ea > nop
> tst_a $ff-$ff,0
18c3 : 08 > php ;save flags
18c4 : c900 > cmp #$ff-$ff ;test result
> trap_ne
18c6 : d0fe > bne * ;failed not equal (non zero)
>
18c8 : 68 > pla ;load status
18c9 : 48 > pha
> cmp_flag 0
18ca : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
18cc : d0fe > bne * ;failed not equal (non zero)
>
18ce : 28 > plp ;restore status
>
> set_a $aa-$ff,$ff
> load_flag $ff
18cf : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
18d1 : 48 > pha ;use stack to load status
18d2 : a9ab > lda #$aa-$ff ;precharge accu
18d4 : 28 > plp
>
18d5 : ff > db $ff ;test nop integrity - flags on
18d6 : ea > nop
18d7 : ea > nop
> tst_a $aa-$ff,$ff
18d8 : 08 > php ;save flags
18d9 : c9ab > cmp #$aa-$ff ;test result
> trap_ne
18db : d0fe > bne * ;failed not equal (non zero)
>
18dd : 68 > pla ;load status
18de : 48 > pha
> cmp_flag $ff
18df : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
18e1 : d0fe > bne * ;failed not equal (non zero)
>
18e3 : 28 > plp ;restore status
>
18e4 : c042 > cpy #$42
> trap_ne ;y changed
18e6 : d0fe > bne * ;failed not equal (non zero)
>
18e8 : e000 > cpx #0
> trap_ne ;x changed
18ea : d0fe > bne * ;failed not equal (non zero)
>
endif
if wdc_op = 0 ;NOPs not available on WDC 65C02 (WAI, STP)
nop_test $cb,1
nop_test $db,1
endif
next_test
18ec : ad0202 > lda test_case ;previous test
18ef : c906 > cmp #test_num
> trap_ne ;test is out of sequence
18f1 : d0fe > bne * ;failed not equal (non zero)
>
0007 = >test_num = test_num + 1
18f3 : a907 > lda #test_num ;*** next tests' number
18f5 : 8d0202 > sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
endif
; jump indirect (test page cross bug is fixed)
18f8 : a203 ldx #3 ;prepare table
18fa : bd5625 ji1 lda ji_adr,x
18fd : 9dfd02 sta ji_tab,x
1900 : ca dex
1901 : 10f7 bpl ji1
1903 : a927 lda #hi(ji_px) ;high address if page cross bug
1905 : 8d0002 sta pg_x
set_stat 0
> load_flag 0
1908 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
190a : 48 > pha ;use stack to load status
190b : 28 > plp
190c : a949 lda #'I'
190e : a24e ldx #'N'
1910 : a044 ldy #'D' ;N=0, V=0, Z=0, C=0
1912 : 6cfd02 jmp (ji_tab)
1915 : ea nop
trap_ne ;runover protection
1916 : d0fe > bne * ;failed not equal (non zero)
1918 : 88 dey
1919 : 88 dey
191a : 08 ji_ret php ;either SP or Y count will fail, if we do not hit
191b : 88 dey
191c : 88 dey
191d : 88 dey
191e : 28 plp
trap_eq ;returned flags OK?
191f : f0fe > beq * ;failed equal (zero)
trap_pl
1921 : 10fe > bpl * ;failed plus (bit 7 clear)
trap_cc
1923 : 90fe > bcc * ;failed carry clear
trap_vc
1925 : 50fe > bvc * ;failed overflow clear
1927 : c9e3 cmp #('I'^$aa) ;returned registers OK?
trap_ne
1929 : d0fe > bne * ;failed not equal (non zero)
192b : e04f cpx #('N'+1)
trap_ne
192d : d0fe > bne * ;failed not equal (non zero)
192f : c03e cpy #('D'-6)
trap_ne
1931 : d0fe > bne * ;failed not equal (non zero)
1933 : ba tsx ;SP check
1934 : e0ff cpx #$ff
trap_ne
1936 : d0fe > bne * ;failed not equal (non zero)
next_test
1938 : ad0202 > lda test_case ;previous test
193b : c907 > cmp #test_num
> trap_ne ;test is out of sequence
193d : d0fe > bne * ;failed not equal (non zero)
>
0008 = >test_num = test_num + 1
193f : a908 > lda #test_num ;*** next tests' number
1941 : 8d0202 > sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; jump indexed indirect
1944 : a20b ldx #11 ;prepare table
1946 : bd9225 jxi1 lda jxi_adr,x
1949 : 9df902 sta jxi_tab,x
194c : ca dex
194d : 10f7 bpl jxi1
194f : a927 lda #hi(jxi_px) ;high address if page cross bug
1951 : 8d0002 sta pg_x
set_stat 0
> load_flag 0
1954 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1956 : 48 > pha ;use stack to load status
1957 : 28 > plp
1958 : a958 lda #'X'
195a : a204 ldx #4
195c : a049 ldy #'I' ;N=0, V=0, Z=0, C=0
195e : 7cf902 jmp (jxi_tab,x)
1961 : ea nop
trap_ne ;runover protection
1962 : d0fe > bne * ;failed not equal (non zero)
1964 : 88 dey
1965 : 88 dey
1966 : 08 jxi_ret php ;either SP or Y count will fail, if we do not hit
1967 : 88 dey
1968 : 88 dey
1969 : 88 dey
196a : 28 plp
trap_eq ;returned flags OK?
196b : f0fe > beq * ;failed equal (zero)
trap_pl
196d : 10fe > bpl * ;failed plus (bit 7 clear)
trap_cc
196f : 90fe > bcc * ;failed carry clear
trap_vc
1971 : 50fe > bvc * ;failed overflow clear
1973 : c9f2 cmp #('X'^$aa) ;returned registers OK?
trap_ne
1975 : d0fe > bne * ;failed not equal (non zero)
1977 : e006 cpx #6
trap_ne
1979 : d0fe > bne * ;failed not equal (non zero)
197b : c043 cpy #('I'-6)
trap_ne
197d : d0fe > bne * ;failed not equal (non zero)
197f : ba tsx ;SP check
1980 : e0ff cpx #$ff
trap_ne
1982 : d0fe > bne * ;failed not equal (non zero)
1984 : a9a0 lda #lo(jxp_ok) ;test with index causing a page cross
1986 : 8d0003 sta jxp_tab
1989 : a919 lda #hi(jxp_ok)
198b : 8d0103 sta jxp_tab+1
198e : a99d lda #lo(jxp_px)
1990 : 8d0002 sta pg_x
1993 : a919 lda #hi(jxp_px)
1995 : 8d0102 sta pg_x+1
1998 : a2ff ldx #$ff
199a : 7c0102 jmp (jxp_tab-$ff,x)
199d : jxp_px
trap ;page cross by index to wrong page
199d : 4c9d19 > jmp * ;failed anyway
19a0 : jxp_ok
next_test
19a0 : ad0202 > lda test_case ;previous test
19a3 : c908 > cmp #test_num
> trap_ne ;test is out of sequence
19a5 : d0fe > bne * ;failed not equal (non zero)
>
0009 = >test_num = test_num + 1
19a7 : a909 > lda #test_num ;*** next tests' number
19a9 : 8d0202 > sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
if ROM_vectors = 1
; test BRK clears decimal mode
load_flag 0 ;with interrupts enabled if allowed!
19ac : a900 > lda #0 ;allow test to change I-flag (no mask)
19ae : 48 pha
19af : a942 lda #'B'
19b1 : a252 ldx #'R'
19b3 : a04b ldy #'K'
19b5 : 28 plp ;N=0, V=0, Z=0, C=0
19b6 : 00 brk
19b7 : 88 dey ;should not be executed
19b8 : brk_ret0 ;address of break return
19b8 : 08 php ;either SP or Y count will fail, if we do not hit
19b9 : 88 dey
19ba : 88 dey
19bb : 88 dey
19bc : c9e8 cmp #'B'^$aa ;returned registers OK?
;the IRQ vector was never executed if A & X stay unmodified
trap_ne
19be : d0fe > bne * ;failed not equal (non zero)
19c0 : e053 cpx #'R'+1
trap_ne
19c2 : d0fe > bne * ;failed not equal (non zero)
19c4 : c045 cpy #'K'-6
trap_ne
19c6 : d0fe > bne * ;failed not equal (non zero)
19c8 : 68 pla ;returned flags OK (unchanged)?
cmp_flag 0
19c9 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
trap_ne
19cb : d0fe > bne * ;failed not equal (non zero)
19cd : ba tsx ;sp?
19ce : e0ff cpx #$ff
trap_ne
19d0 : d0fe > bne * ;failed not equal (non zero)
;pass 2
load_flag $ff ;with interrupts disabled if allowed!
19d2 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
19d4 : 48 pha
19d5 : a9bd lda #$ff-'B'
19d7 : a2ad ldx #$ff-'R'
19d9 : a0b4 ldy #$ff-'K'
19db : 28 plp ;N=1, V=1, Z=1, C=1
19dc : 00 brk
19dd : 88 dey ;should not be executed
19de : brk_ret1 ;address of break return
19de : 08 php ;either SP or Y count will fail, if we do not hit
19df : 88 dey
19e0 : 88 dey
19e1 : 88 dey
19e2 : c917 cmp #($ff-'B')^$aa ;returned registers OK?
;the IRQ vector was never executed if A & X stay unmodified
trap_ne
19e4 : d0fe > bne * ;failed not equal (non zero)
19e6 : e0ae cpx #$ff-'R'+1
trap_ne
19e8 : d0fe > bne * ;failed not equal (non zero)
19ea : c0ae cpy #$ff-'K'-6
trap_ne
19ec : d0fe > bne * ;failed not equal (non zero)
19ee : 68 pla ;returned flags OK (unchanged)?
cmp_flag $ff
19ef : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
trap_ne
19f1 : d0fe > bne * ;failed not equal (non zero)
19f3 : ba tsx ;sp?
19f4 : e0ff cpx #$ff
trap_ne
19f6 : d0fe > bne * ;failed not equal (non zero)
next_test
19f8 : ad0202 > lda test_case ;previous test
19fb : c909 > cmp #test_num
> trap_ne ;test is out of sequence
19fd : d0fe > bne * ;failed not equal (non zero)
>
000a = >test_num = test_num + 1
19ff : a90a > lda #test_num ;*** next tests' number
1a01 : 8d0202 > sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
endif
; testing accumulator increment/decrement INC A & DEC A
1a04 : a2ac ldx #$ac ;protect x & y
1a06 : a0dc ldy #$dc
set_a $fe,$ff
> load_flag $ff
1a08 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1a0a : 48 > pha ;use stack to load status
1a0b : a9fe > lda #$fe ;precharge accu
1a0d : 28 > plp
1a0e : 1a inc a ;ff
tst_as $ff,$ff-zero
1a0f : 48 > pha
1a10 : 08 > php ;save flags
1a11 : c9ff > cmp #$ff ;test result
> trap_ne
1a13 : d0fe > bne * ;failed not equal (non zero)
>
1a15 : 68 > pla ;load status
1a16 : 48 > pha
> cmp_flag $ff-zero
1a17 : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1a19 : d0fe > bne * ;failed not equal (non zero)
>
1a1b : 28 > plp ;restore status
1a1c : 68 > pla
1a1d : 1a inc a ;00
tst_as 0,$ff-minus
1a1e : 48 > pha
1a1f : 08 > php ;save flags
1a20 : c900 > cmp #0 ;test result
> trap_ne
1a22 : d0fe > bne * ;failed not equal (non zero)
>
1a24 : 68 > pla ;load status
1a25 : 48 > pha
> cmp_flag $ff-minus
1a26 : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1a28 : d0fe > bne * ;failed not equal (non zero)
>
1a2a : 28 > plp ;restore status
1a2b : 68 > pla
1a2c : 1a inc a ;01
tst_as 1,$ff-minus-zero
1a2d : 48 > pha
1a2e : 08 > php ;save flags
1a2f : c901 > cmp #1 ;test result
> trap_ne
1a31 : d0fe > bne * ;failed not equal (non zero)
>
1a33 : 68 > pla ;load status
1a34 : 48 > pha
> cmp_flag $ff-minus-zero
1a35 : c97d > cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1a37 : d0fe > bne * ;failed not equal (non zero)
>
1a39 : 28 > plp ;restore status
1a3a : 68 > pla
1a3b : 3a dec a ;00
tst_as 0,$ff-minus
1a3c : 48 > pha
1a3d : 08 > php ;save flags
1a3e : c900 > cmp #0 ;test result
> trap_ne
1a40 : d0fe > bne * ;failed not equal (non zero)
>
1a42 : 68 > pla ;load status
1a43 : 48 > pha
> cmp_flag $ff-minus
1a44 : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1a46 : d0fe > bne * ;failed not equal (non zero)
>
1a48 : 28 > plp ;restore status
1a49 : 68 > pla
1a4a : 3a dec a ;ff
tst_as $ff,$ff-zero
1a4b : 48 > pha
1a4c : 08 > php ;save flags
1a4d : c9ff > cmp #$ff ;test result
> trap_ne
1a4f : d0fe > bne * ;failed not equal (non zero)
>
1a51 : 68 > pla ;load status
1a52 : 48 > pha
> cmp_flag $ff-zero
1a53 : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1a55 : d0fe > bne * ;failed not equal (non zero)
>
1a57 : 28 > plp ;restore status
1a58 : 68 > pla
1a59 : 3a dec a ;fe
set_a $fe,0
> load_flag 0
1a5a : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1a5c : 48 > pha ;use stack to load status
1a5d : a9fe > lda #$fe ;precharge accu
1a5f : 28 > plp
1a60 : 1a inc a ;ff
tst_as $ff,minus
1a61 : 48 > pha
1a62 : 08 > php ;save flags
1a63 : c9ff > cmp #$ff ;test result
> trap_ne
1a65 : d0fe > bne * ;failed not equal (non zero)
>
1a67 : 68 > pla ;load status
1a68 : 48 > pha
> cmp_flag minus
1a69 : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1a6b : d0fe > bne * ;failed not equal (non zero)
>
1a6d : 28 > plp ;restore status
1a6e : 68 > pla
1a6f : 1a inc a ;00
tst_as 0,zero
1a70 : 48 > pha
1a71 : 08 > php ;save flags
1a72 : c900 > cmp #0 ;test result
> trap_ne
1a74 : d0fe > bne * ;failed not equal (non zero)
>
1a76 : 68 > pla ;load status
1a77 : 48 > pha
> cmp_flag zero
1a78 : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1a7a : d0fe > bne * ;failed not equal (non zero)
>
1a7c : 28 > plp ;restore status
1a7d : 68 > pla
1a7e : 1a inc a ;01
tst_as 1,0
1a7f : 48 > pha
1a80 : 08 > php ;save flags
1a81 : c901 > cmp #1 ;test result
> trap_ne
1a83 : d0fe > bne * ;failed not equal (non zero)
>
1a85 : 68 > pla ;load status
1a86 : 48 > pha
> cmp_flag 0
1a87 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1a89 : d0fe > bne * ;failed not equal (non zero)
>
1a8b : 28 > plp ;restore status
1a8c : 68 > pla
1a8d : 3a dec a ;00
tst_as 0,zero
1a8e : 48 > pha
1a8f : 08 > php ;save flags
1a90 : c900 > cmp #0 ;test result
> trap_ne
1a92 : d0fe > bne * ;failed not equal (non zero)
>
1a94 : 68 > pla ;load status
1a95 : 48 > pha
> cmp_flag zero
1a96 : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1a98 : d0fe > bne * ;failed not equal (non zero)
>
1a9a : 28 > plp ;restore status
1a9b : 68 > pla
1a9c : 3a dec a ;ff
tst_as $ff,minus
1a9d : 48 > pha
1a9e : 08 > php ;save flags
1a9f : c9ff > cmp #$ff ;test result
> trap_ne
1aa1 : d0fe > bne * ;failed not equal (non zero)
>
1aa3 : 68 > pla ;load status
1aa4 : 48 > pha
> cmp_flag minus
1aa5 : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1aa7 : d0fe > bne * ;failed not equal (non zero)
>
1aa9 : 28 > plp ;restore status
1aaa : 68 > pla
1aab : e0ac cpx #$ac
trap_ne ;x altered during test
1aad : d0fe > bne * ;failed not equal (non zero)
1aaf : c0dc cpy #$dc
trap_ne ;y altered during test
1ab1 : d0fe > bne * ;failed not equal (non zero)
1ab3 : ba tsx
1ab4 : e0ff cpx #$ff
trap_ne ;sp push/pop mismatch
1ab6 : d0fe > bne * ;failed not equal (non zero)
next_test
1ab8 : ad0202 > lda test_case ;previous test
1abb : c90a > cmp #test_num
> trap_ne ;test is out of sequence
1abd : d0fe > bne * ;failed not equal (non zero)
>
000b = >test_num = test_num + 1
1abf : a90b > lda #test_num ;*** next tests' number
1ac1 : 8d0202 > sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; testing load / store accumulator LDA / STA (zp)
1ac4 : a299 ldx #$99 ;protect x & y
1ac6 : a066 ldy #$66
set_stat 0
> load_flag 0
1ac8 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1aca : 48 > pha ;use stack to load status
1acb : 28 > plp
1acc : b224 lda (ind1)
1ace : 08 php ;test stores do not alter flags
1acf : 49c3 eor #$c3
1ad1 : 28 plp
1ad2 : 9230 sta (indt)
1ad4 : 08 php ;flags after load/store sequence
1ad5 : 49c3 eor #$c3
1ad7 : c9c3 cmp #$c3 ;test result
trap_ne
1ad9 : d0fe > bne * ;failed not equal (non zero)
1adb : 68 pla ;load status
eor_flag 0
1adc : 4930 > eor #0|fao ;invert expected flags + always on bits
1ade : cd1502 cmp fLDx ;test flags
trap_ne
1ae1 : d0fe > bne * ;failed not equal (non zero)
set_stat 0
> load_flag 0
1ae3 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1ae5 : 48 > pha ;use stack to load status
1ae6 : 28 > plp
1ae7 : b226 lda (ind1+2)
1ae9 : 08 php ;test stores do not alter flags
1aea : 49c3 eor #$c3
1aec : 28 plp
1aed : 9232 sta (indt+2)
1aef : 08 php ;flags after load/store sequence
1af0 : 49c3 eor #$c3
1af2 : c982 cmp #$82 ;test result
trap_ne
1af4 : d0fe > bne * ;failed not equal (non zero)
1af6 : 68 pla ;load status
eor_flag 0
1af7 : 4930 > eor #0|fao ;invert expected flags + always on bits
1af9 : cd1602 cmp fLDx+1 ;test flags
trap_ne
1afc : d0fe > bne * ;failed not equal (non zero)
set_stat 0
> load_flag 0
1afe : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1b00 : 48 > pha ;use stack to load status
1b01 : 28 > plp
1b02 : b228 lda (ind1+4)
1b04 : 08 php ;test stores do not alter flags
1b05 : 49c3 eor #$c3
1b07 : 28 plp
1b08 : 9234 sta (indt+4)
1b0a : 08 php ;flags after load/store sequence
1b0b : 49c3 eor #$c3
1b0d : c941 cmp #$41 ;test result
trap_ne
1b0f : d0fe > bne * ;failed not equal (non zero)
1b11 : 68 pla ;load status
eor_flag 0
1b12 : 4930 > eor #0|fao ;invert expected flags + always on bits
1b14 : cd1702 cmp fLDx+2 ;test flags
trap_ne
1b17 : d0fe > bne * ;failed not equal (non zero)
set_stat 0
> load_flag 0
1b19 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1b1b : 48 > pha ;use stack to load status
1b1c : 28 > plp
1b1d : b22a lda (ind1+6)
1b1f : 08 php ;test stores do not alter flags
1b20 : 49c3 eor #$c3
1b22 : 28 plp
1b23 : 9236 sta (indt+6)
1b25 : 08 php ;flags after load/store sequence
1b26 : 49c3 eor #$c3
1b28 : c900 cmp #0 ;test result
trap_ne
1b2a : d0fe > bne * ;failed not equal (non zero)
1b2c : 68 pla ;load status
eor_flag 0
1b2d : 4930 > eor #0|fao ;invert expected flags + always on bits
1b2f : cd1802 cmp fLDx+3 ;test flags
trap_ne
1b32 : d0fe > bne * ;failed not equal (non zero)
1b34 : e099 cpx #$99
trap_ne ;x altered during test
1b36 : d0fe > bne * ;failed not equal (non zero)
1b38 : c066 cpy #$66
trap_ne ;y altered during test
1b3a : d0fe > bne * ;failed not equal (non zero)
1b3c : a003 ldy #3 ;testing store result
1b3e : a200 ldx #0
1b40 : b90502 tstai1 lda abst,y
1b43 : 49c3 eor #$c3
1b45 : d91002 cmp abs1,y
trap_ne ;store to indirect data
1b48 : d0fe > bne * ;failed not equal (non zero)
1b4a : 8a txa
1b4b : 990502 sta abst,y ;clear
1b4e : 88 dey
1b4f : 10ef bpl tstai1
1b51 : a299 ldx #$99 ;protect x & y
1b53 : a066 ldy #$66
set_stat $ff
> load_flag $ff
1b55 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1b57 : 48 > pha ;use stack to load status
1b58 : 28 > plp
1b59 : b224 lda (ind1)
1b5b : 08 php ;test stores do not alter flags
1b5c : 49c3 eor #$c3
1b5e : 28 plp
1b5f : 9230 sta (indt)
1b61 : 08 php ;flags after load/store sequence
1b62 : 49c3 eor #$c3
1b64 : c9c3 cmp #$c3 ;test result
trap_ne
1b66 : d0fe > bne * ;failed not equal (non zero)
1b68 : 68 pla ;load status
eor_flag lo~fnz ;mask bits not altered
1b69 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits
1b6b : cd1502 cmp fLDx ;test flags
trap_ne
1b6e : d0fe > bne * ;failed not equal (non zero)
set_stat $ff
> load_flag $ff
1b70 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1b72 : 48 > pha ;use stack to load status
1b73 : 28 > plp
1b74 : b226 lda (ind1+2)
1b76 : 08 php ;test stores do not alter flags
1b77 : 49c3 eor #$c3
1b79 : 28 plp
1b7a : 9232 sta (indt+2)
1b7c : 08 php ;flags after load/store sequence
1b7d : 49c3 eor #$c3
1b7f : c982 cmp #$82 ;test result
trap_ne
1b81 : d0fe > bne * ;failed not equal (non zero)
1b83 : 68 pla ;load status
eor_flag lo~fnz ;mask bits not altered
1b84 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits
1b86 : cd1602 cmp fLDx+1 ;test flags
trap_ne
1b89 : d0fe > bne * ;failed not equal (non zero)
set_stat $ff
> load_flag $ff
1b8b : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1b8d : 48 > pha ;use stack to load status
1b8e : 28 > plp
1b8f : b228 lda (ind1+4)
1b91 : 08 php ;test stores do not alter flags
1b92 : 49c3 eor #$c3
1b94 : 28 plp
1b95 : 9234 sta (indt+4)
1b97 : 08 php ;flags after load/store sequence
1b98 : 49c3 eor #$c3
1b9a : c941 cmp #$41 ;test result
trap_ne
1b9c : d0fe > bne * ;failed not equal (non zero)
1b9e : 68 pla ;load status
eor_flag lo~fnz ;mask bits not altered
1b9f : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits
1ba1 : cd1702 cmp fLDx+2 ;test flags
trap_ne
1ba4 : d0fe > bne * ;failed not equal (non zero)
set_stat $ff
> load_flag $ff
1ba6 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1ba8 : 48 > pha ;use stack to load status
1ba9 : 28 > plp
1baa : b22a lda (ind1+6)
1bac : 08 php ;test stores do not alter flags
1bad : 49c3 eor #$c3
1baf : 28 plp
1bb0 : 9236 sta (indt+6)
1bb2 : 08 php ;flags after load/store sequence
1bb3 : 49c3 eor #$c3
1bb5 : c900 cmp #0 ;test result
trap_ne
1bb7 : d0fe > bne * ;failed not equal (non zero)
1bb9 : 68 pla ;load status
eor_flag lo~fnz ;mask bits not altered
1bba : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits
1bbc : cd1802 cmp fLDx+3 ;test flags
trap_ne
1bbf : d0fe > bne * ;failed not equal (non zero)
1bc1 : e099 cpx #$99
trap_ne ;x altered during test
1bc3 : d0fe > bne * ;failed not equal (non zero)
1bc5 : c066 cpy #$66
trap_ne ;y altered during test
1bc7 : d0fe > bne * ;failed not equal (non zero)
1bc9 : a003 ldy #3 ;testing store result
1bcb : a200 ldx #0
1bcd : b90502 tstai2 lda abst,y
1bd0 : 49c3 eor #$c3
1bd2 : d91002 cmp abs1,y
trap_ne ;store to indirect data
1bd5 : d0fe > bne * ;failed not equal (non zero)
1bd7 : 8a txa
1bd8 : 990502 sta abst,y ;clear
1bdb : 88 dey
1bdc : 10ef bpl tstai2
1bde : ba tsx
1bdf : e0ff cpx #$ff
trap_ne ;sp push/pop mismatch
1be1 : d0fe > bne * ;failed not equal (non zero)
next_test
1be3 : ad0202 > lda test_case ;previous test
1be6 : c90b > cmp #test_num
> trap_ne ;test is out of sequence
1be8 : d0fe > bne * ;failed not equal (non zero)
>
000c = >test_num = test_num + 1
1bea : a90c > lda #test_num ;*** next tests' number
1bec : 8d0202 > sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; testing STZ - zp / abs / zp,x / abs,x
1bef : a07b ldy #123 ;protect y
1bf1 : a204 ldx #4 ;precharge test area
1bf3 : a907 lda #7
1bf5 : 950c tstz1 sta zpt,x
1bf7 : 0a asl a
1bf8 : ca dex
1bf9 : 10fa bpl tstz1
1bfb : a204 ldx #4
set_a $55,$ff
> load_flag $ff
1bfd : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1bff : 48 > pha ;use stack to load status
1c00 : a955 > lda #$55 ;precharge accu
1c02 : 28 > plp
1c03 : 640c stz zpt
1c05 : 640d stz zpt+1
1c07 : 640e stz zpt+2
1c09 : 640f stz zpt+3
1c0b : 6410 stz zpt+4
tst_a $55,$ff
1c0d : 08 > php ;save flags
1c0e : c955 > cmp #$55 ;test result
> trap_ne
1c10 : d0fe > bne * ;failed not equal (non zero)
>
1c12 : 68 > pla ;load status
1c13 : 48 > pha
> cmp_flag $ff
1c14 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1c16 : d0fe > bne * ;failed not equal (non zero)
>
1c18 : 28 > plp ;restore status
1c19 : b50c tstz2 lda zpt,x ;verify zeros stored
trap_ne ;non zero after STZ zp
1c1b : d0fe > bne * ;failed not equal (non zero)
1c1d : ca dex
1c1e : 10f9 bpl tstz2
1c20 : a204 ldx #4 ;precharge test area
1c22 : a907 lda #7
1c24 : 950c tstz3 sta zpt,x
1c26 : 0a asl a
1c27 : ca dex
1c28 : 10fa bpl tstz3
1c2a : a204 ldx #4
set_a $aa,0
> load_flag 0
1c2c : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1c2e : 48 > pha ;use stack to load status
1c2f : a9aa > lda #$aa ;precharge accu
1c31 : 28 > plp
1c32 : 640c stz zpt
1c34 : 640d stz zpt+1
1c36 : 640e stz zpt+2
1c38 : 640f stz zpt+3
1c3a : 6410 stz zpt+4
tst_a $aa,0
1c3c : 08 > php ;save flags
1c3d : c9aa > cmp #$aa ;test result
> trap_ne
1c3f : d0fe > bne * ;failed not equal (non zero)
>
1c41 : 68 > pla ;load status
1c42 : 48 > pha
> cmp_flag 0
1c43 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1c45 : d0fe > bne * ;failed not equal (non zero)
>
1c47 : 28 > plp ;restore status
1c48 : b50c tstz4 lda zpt,x ;verify zeros stored
trap_ne ;non zero after STZ zp
1c4a : d0fe > bne * ;failed not equal (non zero)
1c4c : ca dex
1c4d : 10f9 bpl tstz4
1c4f : a204 ldx #4 ;precharge test area
1c51 : a907 lda #7
1c53 : 9d0502 tstz5 sta abst,x
1c56 : 0a asl a
1c57 : ca dex
1c58 : 10f9 bpl tstz5
1c5a : a204 ldx #4
set_a $55,$ff
> load_flag $ff
1c5c : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1c5e : 48 > pha ;use stack to load status
1c5f : a955 > lda #$55 ;precharge accu
1c61 : 28 > plp
1c62 : 9c0502 stz abst
1c65 : 9c0602 stz abst+1
1c68 : 9c0702 stz abst+2
1c6b : 9c0802 stz abst+3
1c6e : 9c0902 stz abst+4
tst_a $55,$ff
1c71 : 08 > php ;save flags
1c72 : c955 > cmp #$55 ;test result
> trap_ne
1c74 : d0fe > bne * ;failed not equal (non zero)
>
1c76 : 68 > pla ;load status
1c77 : 48 > pha
> cmp_flag $ff
1c78 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1c7a : d0fe > bne * ;failed not equal (non zero)
>
1c7c : 28 > plp ;restore status
1c7d : bd0502 tstz6 lda abst,x ;verify zeros stored
trap_ne ;non zero after STZ abs
1c80 : d0fe > bne * ;failed not equal (non zero)
1c82 : ca dex
1c83 : 10f8 bpl tstz6
1c85 : a204 ldx #4 ;precharge test area
1c87 : a907 lda #7
1c89 : 9d0502 tstz7 sta abst,x
1c8c : 0a asl a
1c8d : ca dex
1c8e : 10f9 bpl tstz7
1c90 : a204 ldx #4
set_a $aa,0
> load_flag 0
1c92 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1c94 : 48 > pha ;use stack to load status
1c95 : a9aa > lda #$aa ;precharge accu
1c97 : 28 > plp
1c98 : 9c0502 stz abst
1c9b : 9c0602 stz abst+1
1c9e : 9c0702 stz abst+2
1ca1 : 9c0802 stz abst+3
1ca4 : 9c0902 stz abst+4
tst_a $aa,0
1ca7 : 08 > php ;save flags
1ca8 : c9aa > cmp #$aa ;test result
> trap_ne
1caa : d0fe > bne * ;failed not equal (non zero)
>
1cac : 68 > pla ;load status
1cad : 48 > pha
> cmp_flag 0
1cae : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1cb0 : d0fe > bne * ;failed not equal (non zero)
>
1cb2 : 28 > plp ;restore status
1cb3 : bd0502 tstz8 lda abst,x ;verify zeros stored
trap_ne ;non zero after STZ abs
1cb6 : d0fe > bne * ;failed not equal (non zero)
1cb8 : ca dex
1cb9 : 10f8 bpl tstz8
1cbb : a204 ldx #4 ;precharge test area
1cbd : a907 lda #7
1cbf : 950c tstz11 sta zpt,x
1cc1 : 0a asl a
1cc2 : ca dex
1cc3 : 10fa bpl tstz11
1cc5 : a204 ldx #4
1cc7 : tstz15
set_a $55,$ff
> load_flag $ff
1cc7 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1cc9 : 48 > pha ;use stack to load status
1cca : a955 > lda #$55 ;precharge accu
1ccc : 28 > plp
1ccd : 740c stz zpt,x
tst_a $55,$ff
1ccf : 08 > php ;save flags
1cd0 : c955 > cmp #$55 ;test result
> trap_ne
1cd2 : d0fe > bne * ;failed not equal (non zero)
>
1cd4 : 68 > pla ;load status
1cd5 : 48 > pha
> cmp_flag $ff
1cd6 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1cd8 : d0fe > bne * ;failed not equal (non zero)
>
1cda : 28 > plp ;restore status
1cdb : ca dex
1cdc : 10e9 bpl tstz15
1cde : a204 ldx #4
1ce0 : b50c tstz12 lda zpt,x ;verify zeros stored
trap_ne ;non zero after STZ zp
1ce2 : d0fe > bne * ;failed not equal (non zero)
1ce4 : ca dex
1ce5 : 10f9 bpl tstz12
1ce7 : a204 ldx #4 ;precharge test area
1ce9 : a907 lda #7
1ceb : 950c tstz13 sta zpt,x
1ced : 0a asl a
1cee : ca dex
1cef : 10fa bpl tstz13
1cf1 : a204 ldx #4
1cf3 : tstz16
set_a $aa,0
> load_flag 0
1cf3 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1cf5 : 48 > pha ;use stack to load status
1cf6 : a9aa > lda #$aa ;precharge accu
1cf8 : 28 > plp
1cf9 : 740c stz zpt,x
tst_a $aa,0
1cfb : 08 > php ;save flags
1cfc : c9aa > cmp #$aa ;test result
> trap_ne
1cfe : d0fe > bne * ;failed not equal (non zero)
>
1d00 : 68 > pla ;load status
1d01 : 48 > pha
> cmp_flag 0
1d02 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1d04 : d0fe > bne * ;failed not equal (non zero)
>
1d06 : 28 > plp ;restore status
1d07 : ca dex
1d08 : 10e9 bpl tstz16
1d0a : a204 ldx #4
1d0c : b50c tstz14 lda zpt,x ;verify zeros stored
trap_ne ;non zero after STZ zp
1d0e : d0fe > bne * ;failed not equal (non zero)
1d10 : ca dex
1d11 : 10f9 bpl tstz14
1d13 : a204 ldx #4 ;precharge test area
1d15 : a907 lda #7
1d17 : 9d0502 tstz21 sta abst,x
1d1a : 0a asl a
1d1b : ca dex
1d1c : 10f9 bpl tstz21
1d1e : a204 ldx #4
1d20 : tstz25
set_a $55,$ff
> load_flag $ff
1d20 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1d22 : 48 > pha ;use stack to load status
1d23 : a955 > lda #$55 ;precharge accu
1d25 : 28 > plp
1d26 : 9e0502 stz abst,x
tst_a $55,$ff
1d29 : 08 > php ;save flags
1d2a : c955 > cmp #$55 ;test result
> trap_ne
1d2c : d0fe > bne * ;failed not equal (non zero)
>
1d2e : 68 > pla ;load status
1d2f : 48 > pha
> cmp_flag $ff
1d30 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1d32 : d0fe > bne * ;failed not equal (non zero)
>
1d34 : 28 > plp ;restore status
1d35 : ca dex
1d36 : 10e8 bpl tstz25
1d38 : a204 ldx #4
1d3a : bd0502 tstz22 lda abst,x ;verify zeros stored
trap_ne ;non zero after STZ zp
1d3d : d0fe > bne * ;failed not equal (non zero)
1d3f : ca dex
1d40 : 10f8 bpl tstz22
1d42 : a204 ldx #4 ;precharge test area
1d44 : a907 lda #7
1d46 : 9d0502 tstz23 sta abst,x
1d49 : 0a asl a
1d4a : ca dex
1d4b : 10f9 bpl tstz23
1d4d : a204 ldx #4
1d4f : tstz26
set_a $aa,0
> load_flag 0
1d4f : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1d51 : 48 > pha ;use stack to load status
1d52 : a9aa > lda #$aa ;precharge accu
1d54 : 28 > plp
1d55 : 9e0502 stz abst,x
tst_a $aa,0
1d58 : 08 > php ;save flags
1d59 : c9aa > cmp #$aa ;test result
> trap_ne
1d5b : d0fe > bne * ;failed not equal (non zero)
>
1d5d : 68 > pla ;load status
1d5e : 48 > pha
> cmp_flag 0
1d5f : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1d61 : d0fe > bne * ;failed not equal (non zero)
>
1d63 : 28 > plp ;restore status
1d64 : ca dex
1d65 : 10e8 bpl tstz26
1d67 : a204 ldx #4
1d69 : bd0502 tstz24 lda abst,x ;verify zeros stored
trap_ne ;non zero after STZ zp
1d6c : d0fe > bne * ;failed not equal (non zero)
1d6e : ca dex
1d6f : 10f8 bpl tstz24
1d71 : c07b cpy #123
trap_ne ;y altered during test
1d73 : d0fe > bne * ;failed not equal (non zero)
1d75 : ba tsx
1d76 : e0ff cpx #$ff
trap_ne ;sp push/pop mismatch
1d78 : d0fe > bne * ;failed not equal (non zero)
next_test
1d7a : ad0202 > lda test_case ;previous test
1d7d : c90c > cmp #test_num
> trap_ne ;test is out of sequence
1d7f : d0fe > bne * ;failed not equal (non zero)
>
000d = >test_num = test_num + 1
1d81 : a90d > lda #test_num ;*** next tests' number
1d83 : 8d0202 > sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; testing BIT - zp,x / abs,x / #
1d86 : a042 ldy #$42
1d88 : a203 ldx #3
set_a $ff,0
> load_flag 0
1d8a : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1d8c : 48 > pha ;use stack to load status
1d8d : a9ff > lda #$ff ;precharge accu
1d8f : 28 > plp
1d90 : 3413 bit zp1,x ;00 - should set Z / clear NV
tst_a $ff,fz
1d92 : 08 > php ;save flags
1d93 : c9ff > cmp #$ff ;test result
> trap_ne
1d95 : d0fe > bne * ;failed not equal (non zero)
>
1d97 : 68 > pla ;load status
1d98 : 48 > pha
> cmp_flag fz
1d99 : c932 > cmp #(fz |fao)&m8 ;expected flags + always on bits
>
> trap_ne
1d9b : d0fe > bne * ;failed not equal (non zero)
>
1d9d : 28 > plp ;restore status
1d9e : ca dex
set_a 1,0
> load_flag 0
1d9f : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1da1 : 48 > pha ;use stack to load status
1da2 : a901 > lda #1 ;precharge accu
1da4 : 28 > plp
1da5 : 3413 bit zp1,x ;41 - should set V (M6) / clear NZ
tst_a 1,fv
1da7 : 08 > php ;save flags
1da8 : c901 > cmp #1 ;test result
> trap_ne
1daa : d0fe > bne * ;failed not equal (non zero)
>
1dac : 68 > pla ;load status
1dad : 48 > pha
> cmp_flag fv
1dae : c970 > cmp #(fv|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1db0 : d0fe > bne * ;failed not equal (non zero)
>
1db2 : 28 > plp ;restore status
1db3 : ca dex
set_a 1,0
> load_flag 0
1db4 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1db6 : 48 > pha ;use stack to load status
1db7 : a901 > lda #1 ;precharge accu
1db9 : 28 > plp
1dba : 3413 bit zp1,x ;82 - should set N (M7) & Z / clear V
tst_a 1,fnz
1dbc : 08 > php ;save flags
1dbd : c901 > cmp #1 ;test result
> trap_ne
1dbf : d0fe > bne * ;failed not equal (non zero)
>
1dc1 : 68 > pla ;load status
1dc2 : 48 > pha
> cmp_flag fnz
1dc3 : c9b2 > cmp #(fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1dc5 : d0fe > bne * ;failed not equal (non zero)
>
1dc7 : 28 > plp ;restore status
1dc8 : ca dex
set_a 1,0
> load_flag 0
1dc9 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1dcb : 48 > pha ;use stack to load status
1dcc : a901 > lda #1 ;precharge accu
1dce : 28 > plp
1dcf : 3413 bit zp1,x ;c3 - should set N (M7) & V (M6) / clear Z
tst_a 1,fnv
1dd1 : 08 > php ;save flags
1dd2 : c901 > cmp #1 ;test result
> trap_ne
1dd4 : d0fe > bne * ;failed not equal (non zero)
>
1dd6 : 68 > pla ;load status
1dd7 : 48 > pha
> cmp_flag fnv
1dd8 : c9f0 > cmp #(fnv|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1dda : d0fe > bne * ;failed not equal (non zero)
>
1ddc : 28 > plp ;restore status
set_a 1,$ff
> load_flag $ff
1ddd : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1ddf : 48 > pha ;use stack to load status
1de0 : a901 > lda #1 ;precharge accu
1de2 : 28 > plp
1de3 : 3413 bit zp1,x ;c3 - should set N (M7) & V (M6) / clear Z
tst_a 1,~fz
1de5 : 08 > php ;save flags
1de6 : c901 > cmp #1 ;test result
> trap_ne
1de8 : d0fe > bne * ;failed not equal (non zero)
>
1dea : 68 > pla ;load status
1deb : 48 > pha
> cmp_flag ~fz
1dec : c9fd > cmp #(~fz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1dee : d0fe > bne * ;failed not equal (non zero)
>
1df0 : 28 > plp ;restore status
1df1 : e8 inx
set_a 1,$ff
> load_flag $ff
1df2 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1df4 : 48 > pha ;use stack to load status
1df5 : a901 > lda #1 ;precharge accu
1df7 : 28 > plp
1df8 : 3413 bit zp1,x ;82 - should set N (M7) & Z / clear V
tst_a 1,~fv
1dfa : 08 > php ;save flags
1dfb : c901 > cmp #1 ;test result
> trap_ne
1dfd : d0fe > bne * ;failed not equal (non zero)
>
1dff : 68 > pla ;load status
1e00 : 48 > pha
> cmp_flag ~fv
1e01 : c9bf > cmp #(~fv|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1e03 : d0fe > bne * ;failed not equal (non zero)
>
1e05 : 28 > plp ;restore status
1e06 : e8 inx
set_a 1,$ff
> load_flag $ff
1e07 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1e09 : 48 > pha ;use stack to load status
1e0a : a901 > lda #1 ;precharge accu
1e0c : 28 > plp
1e0d : 3413 bit zp1,x ;41 - should set V (M6) / clear NZ
tst_a 1,~fnz
1e0f : 08 > php ;save flags
1e10 : c901 > cmp #1 ;test result
> trap_ne
1e12 : d0fe > bne * ;failed not equal (non zero)
>
1e14 : 68 > pla ;load status
1e15 : 48 > pha
> cmp_flag ~fnz
1e16 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1e18 : d0fe > bne * ;failed not equal (non zero)
>
1e1a : 28 > plp ;restore status
1e1b : e8 inx
set_a $ff,$ff
> load_flag $ff
1e1c : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1e1e : 48 > pha ;use stack to load status
1e1f : a9ff > lda #$ff ;precharge accu
1e21 : 28 > plp
1e22 : 3413 bit zp1,x ;00 - should set Z / clear NV
tst_a $ff,~fnv
1e24 : 08 > php ;save flags
1e25 : c9ff > cmp #$ff ;test result
> trap_ne
1e27 : d0fe > bne * ;failed not equal (non zero)
>
1e29 : 68 > pla ;load status
1e2a : 48 > pha
> cmp_flag ~fnv
1e2b : c93f > cmp #(~fnv |fao)&m8 ;expected flags + always on bits
>
> trap_ne
1e2d : d0fe > bne * ;failed not equal (non zero)
>
1e2f : 28 > plp ;restore status
set_a $ff,0
> load_flag 0
1e30 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1e32 : 48 > pha ;use stack to load status
1e33 : a9ff > lda #$ff ;precharge accu
1e35 : 28 > plp
1e36 : 3c1002 bit abs1,x ;00 - should set Z / clear NV
tst_a $ff,fz
1e39 : 08 > php ;save flags
1e3a : c9ff > cmp #$ff ;test result
> trap_ne
1e3c : d0fe > bne * ;failed not equal (non zero)
>
1e3e : 68 > pla ;load status
1e3f : 48 > pha
> cmp_flag fz
1e40 : c932 > cmp #(fz |fao)&m8 ;expected flags + always on bits
>
> trap_ne
1e42 : d0fe > bne * ;failed not equal (non zero)
>
1e44 : 28 > plp ;restore status
1e45 : ca dex
set_a 1,0
> load_flag 0
1e46 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1e48 : 48 > pha ;use stack to load status
1e49 : a901 > lda #1 ;precharge accu
1e4b : 28 > plp
1e4c : 3c1002 bit abs1,x ;41 - should set V (M6) / clear NZ
tst_a 1,fv
1e4f : 08 > php ;save flags
1e50 : c901 > cmp #1 ;test result
> trap_ne
1e52 : d0fe > bne * ;failed not equal (non zero)
>
1e54 : 68 > pla ;load status
1e55 : 48 > pha
> cmp_flag fv
1e56 : c970 > cmp #(fv|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1e58 : d0fe > bne * ;failed not equal (non zero)
>
1e5a : 28 > plp ;restore status
1e5b : ca dex
set_a 1,0
> load_flag 0
1e5c : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1e5e : 48 > pha ;use stack to load status
1e5f : a901 > lda #1 ;precharge accu
1e61 : 28 > plp
1e62 : 3c1002 bit abs1,x ;82 - should set N (M7) & Z / clear V
tst_a 1,fnz
1e65 : 08 > php ;save flags
1e66 : c901 > cmp #1 ;test result
> trap_ne
1e68 : d0fe > bne * ;failed not equal (non zero)
>
1e6a : 68 > pla ;load status
1e6b : 48 > pha
> cmp_flag fnz
1e6c : c9b2 > cmp #(fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1e6e : d0fe > bne * ;failed not equal (non zero)
>
1e70 : 28 > plp ;restore status
1e71 : ca dex
set_a 1,0
> load_flag 0
1e72 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1e74 : 48 > pha ;use stack to load status
1e75 : a901 > lda #1 ;precharge accu
1e77 : 28 > plp
1e78 : 3c1002 bit abs1,x ;c3 - should set N (M7) & V (M6) / clear Z
tst_a 1,fnv
1e7b : 08 > php ;save flags
1e7c : c901 > cmp #1 ;test result
> trap_ne
1e7e : d0fe > bne * ;failed not equal (non zero)
>
1e80 : 68 > pla ;load status
1e81 : 48 > pha
> cmp_flag fnv
1e82 : c9f0 > cmp #(fnv|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1e84 : d0fe > bne * ;failed not equal (non zero)
>
1e86 : 28 > plp ;restore status
set_a 1,$ff
> load_flag $ff
1e87 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1e89 : 48 > pha ;use stack to load status
1e8a : a901 > lda #1 ;precharge accu
1e8c : 28 > plp
1e8d : 3c1002 bit abs1,x ;c3 - should set N (M7) & V (M6) / clear Z
tst_a 1,~fz
1e90 : 08 > php ;save flags
1e91 : c901 > cmp #1 ;test result
> trap_ne
1e93 : d0fe > bne * ;failed not equal (non zero)
>
1e95 : 68 > pla ;load status
1e96 : 48 > pha
> cmp_flag ~fz
1e97 : c9fd > cmp #(~fz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1e99 : d0fe > bne * ;failed not equal (non zero)
>
1e9b : 28 > plp ;restore status
1e9c : e8 inx
set_a 1,$ff
> load_flag $ff
1e9d : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1e9f : 48 > pha ;use stack to load status
1ea0 : a901 > lda #1 ;precharge accu
1ea2 : 28 > plp
1ea3 : 3c1002 bit abs1,x ;82 - should set N (M7) & Z / clear V
tst_a 1,~fv
1ea6 : 08 > php ;save flags
1ea7 : c901 > cmp #1 ;test result
> trap_ne
1ea9 : d0fe > bne * ;failed not equal (non zero)
>
1eab : 68 > pla ;load status
1eac : 48 > pha
> cmp_flag ~fv
1ead : c9bf > cmp #(~fv|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1eaf : d0fe > bne * ;failed not equal (non zero)
>
1eb1 : 28 > plp ;restore status
1eb2 : e8 inx
set_a 1,$ff
> load_flag $ff
1eb3 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1eb5 : 48 > pha ;use stack to load status
1eb6 : a901 > lda #1 ;precharge accu
1eb8 : 28 > plp
1eb9 : 3c1002 bit abs1,x ;41 - should set V (M6) / clear NZ
tst_a 1,~fnz
1ebc : 08 > php ;save flags
1ebd : c901 > cmp #1 ;test result
> trap_ne
1ebf : d0fe > bne * ;failed not equal (non zero)
>
1ec1 : 68 > pla ;load status
1ec2 : 48 > pha
> cmp_flag ~fnz
1ec3 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1ec5 : d0fe > bne * ;failed not equal (non zero)
>
1ec7 : 28 > plp ;restore status
1ec8 : e8 inx
set_a $ff,$ff
> load_flag $ff
1ec9 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1ecb : 48 > pha ;use stack to load status
1ecc : a9ff > lda #$ff ;precharge accu
1ece : 28 > plp
1ecf : 3c1002 bit abs1,x ;00 - should set Z / clear NV
tst_a $ff,~fnv
1ed2 : 08 > php ;save flags
1ed3 : c9ff > cmp #$ff ;test result
> trap_ne
1ed5 : d0fe > bne * ;failed not equal (non zero)
>
1ed7 : 68 > pla ;load status
1ed8 : 48 > pha
> cmp_flag ~fnv
1ed9 : c93f > cmp #(~fnv |fao)&m8 ;expected flags + always on bits
>
> trap_ne
1edb : d0fe > bne * ;failed not equal (non zero)
>
1edd : 28 > plp ;restore status
set_a $ff,0
> load_flag 0
1ede : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1ee0 : 48 > pha ;use stack to load status
1ee1 : a9ff > lda #$ff ;precharge accu
1ee3 : 28 > plp
1ee4 : 8900 bit #$00 ;00 - should set Z
tst_a $ff,fz
1ee6 : 08 > php ;save flags
1ee7 : c9ff > cmp #$ff ;test result
> trap_ne
1ee9 : d0fe > bne * ;failed not equal (non zero)
>
1eeb : 68 > pla ;load status
1eec : 48 > pha
> cmp_flag fz
1eed : c932 > cmp #(fz |fao)&m8 ;expected flags + always on bits
>
> trap_ne
1eef : d0fe > bne * ;failed not equal (non zero)
>
1ef1 : 28 > plp ;restore status
1ef2 : ca dex
set_a 1,0
> load_flag 0
1ef3 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1ef5 : 48 > pha ;use stack to load status
1ef6 : a901 > lda #1 ;precharge accu
1ef8 : 28 > plp
1ef9 : 8941 bit #$41 ;41 - should clear Z
tst_a 1,0
1efb : 08 > php ;save flags
1efc : c901 > cmp #1 ;test result
> trap_ne
1efe : d0fe > bne * ;failed not equal (non zero)
>
1f00 : 68 > pla ;load status
1f01 : 48 > pha
> cmp_flag 0
1f02 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1f04 : d0fe > bne * ;failed not equal (non zero)
>
1f06 : 28 > plp ;restore status
; *** DEBUG INFO ***
; if it fails the previous test and your BIT # has set the V flag
; see http://forum.6502.org/viewtopic.php?f=2&t=2241&p=27243#p27239
; why it shouldn't alter N or V flags on a BIT #
1f07 : ca dex
set_a 1,0
> load_flag 0
1f08 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1f0a : 48 > pha ;use stack to load status
1f0b : a901 > lda #1 ;precharge accu
1f0d : 28 > plp
1f0e : 8982 bit #$82 ;82 - should set Z
tst_a 1,fz
1f10 : 08 > php ;save flags
1f11 : c901 > cmp #1 ;test result
> trap_ne
1f13 : d0fe > bne * ;failed not equal (non zero)
>
1f15 : 68 > pla ;load status
1f16 : 48 > pha
> cmp_flag fz
1f17 : c932 > cmp #(fz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1f19 : d0fe > bne * ;failed not equal (non zero)
>
1f1b : 28 > plp ;restore status
1f1c : ca dex
set_a 1,0
> load_flag 0
1f1d : a900 > lda #0 ;allow test to change I-flag (no mask)
>
1f1f : 48 > pha ;use stack to load status
1f20 : a901 > lda #1 ;precharge accu
1f22 : 28 > plp
1f23 : 89c3 bit #$c3 ;c3 - should clear Z
tst_a 1,0
1f25 : 08 > php ;save flags
1f26 : c901 > cmp #1 ;test result
> trap_ne
1f28 : d0fe > bne * ;failed not equal (non zero)
>
1f2a : 68 > pla ;load status
1f2b : 48 > pha
> cmp_flag 0
1f2c : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1f2e : d0fe > bne * ;failed not equal (non zero)
>
1f30 : 28 > plp ;restore status
set_a 1,$ff
> load_flag $ff
1f31 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1f33 : 48 > pha ;use stack to load status
1f34 : a901 > lda #1 ;precharge accu
1f36 : 28 > plp
1f37 : 89c3 bit #$c3 ;c3 - clear Z
tst_a 1,~fz
1f39 : 08 > php ;save flags
1f3a : c901 > cmp #1 ;test result
> trap_ne
1f3c : d0fe > bne * ;failed not equal (non zero)
>
1f3e : 68 > pla ;load status
1f3f : 48 > pha
> cmp_flag ~fz
1f40 : c9fd > cmp #(~fz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1f42 : d0fe > bne * ;failed not equal (non zero)
>
1f44 : 28 > plp ;restore status
1f45 : e8 inx
set_a 1,$ff
> load_flag $ff
1f46 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1f48 : 48 > pha ;use stack to load status
1f49 : a901 > lda #1 ;precharge accu
1f4b : 28 > plp
1f4c : 8982 bit #$82 ;82 - should set Z
tst_a 1,$ff
1f4e : 08 > php ;save flags
1f4f : c901 > cmp #1 ;test result
> trap_ne
1f51 : d0fe > bne * ;failed not equal (non zero)
>
1f53 : 68 > pla ;load status
1f54 : 48 > pha
> cmp_flag $ff
1f55 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1f57 : d0fe > bne * ;failed not equal (non zero)
>
1f59 : 28 > plp ;restore status
1f5a : e8 inx
set_a 1,$ff
> load_flag $ff
1f5b : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1f5d : 48 > pha ;use stack to load status
1f5e : a901 > lda #1 ;precharge accu
1f60 : 28 > plp
1f61 : 8941 bit #$41 ;41 - should clear Z
tst_a 1,~fz
1f63 : 08 > php ;save flags
1f64 : c901 > cmp #1 ;test result
> trap_ne
1f66 : d0fe > bne * ;failed not equal (non zero)
>
1f68 : 68 > pla ;load status
1f69 : 48 > pha
> cmp_flag ~fz
1f6a : c9fd > cmp #(~fz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1f6c : d0fe > bne * ;failed not equal (non zero)
>
1f6e : 28 > plp ;restore status
1f6f : e8 inx
set_a $ff,$ff
> load_flag $ff
1f70 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1f72 : 48 > pha ;use stack to load status
1f73 : a9ff > lda #$ff ;precharge accu
1f75 : 28 > plp
1f76 : 8900 bit #$00 ;00 - should set Z
tst_a $ff,$ff
1f78 : 08 > php ;save flags
1f79 : c9ff > cmp #$ff ;test result
> trap_ne
1f7b : d0fe > bne * ;failed not equal (non zero)
>
1f7d : 68 > pla ;load status
1f7e : 48 > pha
> cmp_flag $ff
1f7f : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1f81 : d0fe > bne * ;failed not equal (non zero)
>
1f83 : 28 > plp ;restore status
1f84 : e003 cpx #3
trap_ne ;x altered during test
1f86 : d0fe > bne * ;failed not equal (non zero)
1f88 : c042 cpy #$42
trap_ne ;y altered during test
1f8a : d0fe > bne * ;failed not equal (non zero)
1f8c : ba tsx
1f8d : e0ff cpx #$ff
trap_ne ;sp push/pop mismatch
1f8f : d0fe > bne * ;failed not equal (non zero)
next_test
1f91 : ad0202 > lda test_case ;previous test
1f94 : c90d > cmp #test_num
> trap_ne ;test is out of sequence
1f96 : d0fe > bne * ;failed not equal (non zero)
>
000e = >test_num = test_num + 1
1f98 : a90e > lda #test_num ;*** next tests' number
1f9a : 8d0202 > sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; testing TRB, TSB - zp / abs
trbt macro ;\1 = memory, \2 = flags
sty \1
load_flag \2
pha
lda zpt+1
plp
trb \1
php
cmp zpt+1
trap_ne ;accu was changed
pla
pha
ora #fz ;mask Z
cmp_flag \2|fz
trap_ne ;flags changed except Z
pla
and #fz
cmp zpt+2
trap_ne ;Z flag invalid
lda zpt+3
cmp zpt
trap_ne ;altered bits in memory wrong
endm
tsbt macro ;\1 = memory, \2 = flags
sty \1
load_flag \2
pha
lda zpt+1
plp
tsb \1
php
cmp zpt+1
trap_ne ;accu was changed
pla
pha
ora #fz ;mask Z
cmp_flag \2|fz
trap_ne ;flags changed except Z
pla
and #fz
cmp zpt+2
trap_ne ;Z flag invalid
lda zpt+4
cmp zpt
trap_ne ;altered bits in memory wrong
endm
1f9d : a2c0 ldx #$c0
1f9f : a000 ldy #0 ;op1 - memory save
; zpt ;op1 - memory modifiable
1fa1 : 640d stz zpt+1 ;op2 - accu
; zpt+2 ;and flags
; zpt+3 ;memory after reset
; zpt+4 ;memory after set
1fa3 : 98 tbt1 tya
1fa4 : 250d and zpt+1 ;set Z by anding the 2 operands
1fa6 : 08 php
1fa7 : 68 pla
1fa8 : 2902 and #fz ;mask Z
1faa : 850e sta zpt+2
1fac : 98 tya ;reset op1 bits by op2
1fad : 49ff eor #$ff
1faf : 050d ora zpt+1
1fb1 : 49ff eor #$ff
1fb3 : 850f sta zpt+3
1fb5 : 98 tya ;set op1 bits by op2
1fb6 : 050d ora zpt+1
1fb8 : 8510 sta zpt+4
trbt zpt,$ff
1fba : 840c > sty zpt
> load_flag $ff
1fbc : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1fbe : 48 > pha
1fbf : a50d > lda zpt+1
1fc1 : 28 > plp
1fc2 : 140c > trb zpt
1fc4 : 08 > php
1fc5 : c50d > cmp zpt+1
> trap_ne ;accu was changed
1fc7 : d0fe > bne * ;failed not equal (non zero)
>
1fc9 : 68 > pla
1fca : 48 > pha
1fcb : 0902 > ora #fz ;mask Z
> cmp_flag $ff|fz
1fcd : c9ff > cmp #($ff|fz|fao)&m8 ;expected flags + always on bits
>
> trap_ne ;flags changed except Z
1fcf : d0fe > bne * ;failed not equal (non zero)
>
1fd1 : 68 > pla
1fd2 : 2902 > and #fz
1fd4 : c50e > cmp zpt+2
> trap_ne ;Z flag invalid
1fd6 : d0fe > bne * ;failed not equal (non zero)
>
1fd8 : a50f > lda zpt+3
1fda : c50c > cmp zpt
> trap_ne ;altered bits in memory wrong
1fdc : d0fe > bne * ;failed not equal (non zero)
>
trbt abst,$ff
1fde : 8c0502 > sty abst
> load_flag $ff
1fe1 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
1fe3 : 48 > pha
1fe4 : a50d > lda zpt+1
1fe6 : 28 > plp
1fe7 : 1c0502 > trb abst
1fea : 08 > php
1feb : c50d > cmp zpt+1
> trap_ne ;accu was changed
1fed : d0fe > bne * ;failed not equal (non zero)
>
1fef : 68 > pla
1ff0 : 48 > pha
1ff1 : 0902 > ora #fz ;mask Z
> cmp_flag $ff|fz
1ff3 : c9ff > cmp #($ff|fz|fao)&m8 ;expected flags + always on bits
>
> trap_ne ;flags changed except Z
1ff5 : d0fe > bne * ;failed not equal (non zero)
>
1ff7 : 68 > pla
1ff8 : 2902 > and #fz
1ffa : c50e > cmp zpt+2
> trap_ne ;Z flag invalid
1ffc : d0fe > bne * ;failed not equal (non zero)
>
1ffe : a50f > lda zpt+3
2000 : c50c > cmp zpt
> trap_ne ;altered bits in memory wrong
2002 : d0fe > bne * ;failed not equal (non zero)
>
trbt zpt,0
2004 : 840c > sty zpt
> load_flag 0
2006 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
2008 : 48 > pha
2009 : a50d > lda zpt+1
200b : 28 > plp
200c : 140c > trb zpt
200e : 08 > php
200f : c50d > cmp zpt+1
> trap_ne ;accu was changed
2011 : d0fe > bne * ;failed not equal (non zero)
>
2013 : 68 > pla
2014 : 48 > pha
2015 : 0902 > ora #fz ;mask Z
> cmp_flag 0|fz
2017 : c932 > cmp #(0|fz|fao)&m8 ;expected flags + always on bits
>
> trap_ne ;flags changed except Z
2019 : d0fe > bne * ;failed not equal (non zero)
>
201b : 68 > pla
201c : 2902 > and #fz
201e : c50e > cmp zpt+2
> trap_ne ;Z flag invalid
2020 : d0fe > bne * ;failed not equal (non zero)
>
2022 : a50f > lda zpt+3
2024 : c50c > cmp zpt
> trap_ne ;altered bits in memory wrong
2026 : d0fe > bne * ;failed not equal (non zero)
>
trbt abst,0
2028 : 8c0502 > sty abst
> load_flag 0
202b : a900 > lda #0 ;allow test to change I-flag (no mask)
>
202d : 48 > pha
202e : a50d > lda zpt+1
2030 : 28 > plp
2031 : 1c0502 > trb abst
2034 : 08 > php
2035 : c50d > cmp zpt+1
> trap_ne ;accu was changed
2037 : d0fe > bne * ;failed not equal (non zero)
>
2039 : 68 > pla
203a : 48 > pha
203b : 0902 > ora #fz ;mask Z
> cmp_flag 0|fz
203d : c932 > cmp #(0|fz|fao)&m8 ;expected flags + always on bits
>
> trap_ne ;flags changed except Z
203f : d0fe > bne * ;failed not equal (non zero)
>
2041 : 68 > pla
2042 : 2902 > and #fz
2044 : c50e > cmp zpt+2
> trap_ne ;Z flag invalid
2046 : d0fe > bne * ;failed not equal (non zero)
>
2048 : a50f > lda zpt+3
204a : c50c > cmp zpt
> trap_ne ;altered bits in memory wrong
204c : d0fe > bne * ;failed not equal (non zero)
>
tsbt zpt,$ff
204e : 840c > sty zpt
> load_flag $ff
2050 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
2052 : 48 > pha
2053 : a50d > lda zpt+1
2055 : 28 > plp
2056 : 040c > tsb zpt
2058 : 08 > php
2059 : c50d > cmp zpt+1
> trap_ne ;accu was changed
205b : d0fe > bne * ;failed not equal (non zero)
>
205d : 68 > pla
205e : 48 > pha
205f : 0902 > ora #fz ;mask Z
> cmp_flag $ff|fz
2061 : c9ff > cmp #($ff|fz|fao)&m8 ;expected flags + always on bits
>
> trap_ne ;flags changed except Z
2063 : d0fe > bne * ;failed not equal (non zero)
>
2065 : 68 > pla
2066 : 2902 > and #fz
2068 : c50e > cmp zpt+2
> trap_ne ;Z flag invalid
206a : d0fe > bne * ;failed not equal (non zero)
>
206c : a510 > lda zpt+4
206e : c50c > cmp zpt
> trap_ne ;altered bits in memory wrong
2070 : d0fe > bne * ;failed not equal (non zero)
>
tsbt abst,$ff
2072 : 8c0502 > sty abst
> load_flag $ff
2075 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
2077 : 48 > pha
2078 : a50d > lda zpt+1
207a : 28 > plp
207b : 0c0502 > tsb abst
207e : 08 > php
207f : c50d > cmp zpt+1
> trap_ne ;accu was changed
2081 : d0fe > bne * ;failed not equal (non zero)
>
2083 : 68 > pla
2084 : 48 > pha
2085 : 0902 > ora #fz ;mask Z
> cmp_flag $ff|fz
2087 : c9ff > cmp #($ff|fz|fao)&m8 ;expected flags + always on bits
>
> trap_ne ;flags changed except Z
2089 : d0fe > bne * ;failed not equal (non zero)
>
208b : 68 > pla
208c : 2902 > and #fz
208e : c50e > cmp zpt+2
> trap_ne ;Z flag invalid
2090 : d0fe > bne * ;failed not equal (non zero)
>
2092 : a510 > lda zpt+4
2094 : c50c > cmp zpt
> trap_ne ;altered bits in memory wrong
2096 : d0fe > bne * ;failed not equal (non zero)
>
tsbt zpt,0
2098 : 840c > sty zpt
> load_flag 0
209a : a900 > lda #0 ;allow test to change I-flag (no mask)
>
209c : 48 > pha
209d : a50d > lda zpt+1
209f : 28 > plp
20a0 : 040c > tsb zpt
20a2 : 08 > php
20a3 : c50d > cmp zpt+1
> trap_ne ;accu was changed
20a5 : d0fe > bne * ;failed not equal (non zero)
>
20a7 : 68 > pla
20a8 : 48 > pha
20a9 : 0902 > ora #fz ;mask Z
> cmp_flag 0|fz
20ab : c932 > cmp #(0|fz|fao)&m8 ;expected flags + always on bits
>
> trap_ne ;flags changed except Z
20ad : d0fe > bne * ;failed not equal (non zero)
>
20af : 68 > pla
20b0 : 2902 > and #fz
20b2 : c50e > cmp zpt+2
> trap_ne ;Z flag invalid
20b4 : d0fe > bne * ;failed not equal (non zero)
>
20b6 : a510 > lda zpt+4
20b8 : c50c > cmp zpt
> trap_ne ;altered bits in memory wrong
20ba : d0fe > bne * ;failed not equal (non zero)
>
tsbt abst,0
20bc : 8c0502 > sty abst
> load_flag 0
20bf : a900 > lda #0 ;allow test to change I-flag (no mask)
>
20c1 : 48 > pha
20c2 : a50d > lda zpt+1
20c4 : 28 > plp
20c5 : 0c0502 > tsb abst
20c8 : 08 > php
20c9 : c50d > cmp zpt+1
> trap_ne ;accu was changed
20cb : d0fe > bne * ;failed not equal (non zero)
>
20cd : 68 > pla
20ce : 48 > pha
20cf : 0902 > ora #fz ;mask Z
> cmp_flag 0|fz
20d1 : c932 > cmp #(0|fz|fao)&m8 ;expected flags + always on bits
>
> trap_ne ;flags changed except Z
20d3 : d0fe > bne * ;failed not equal (non zero)
>
20d5 : 68 > pla
20d6 : 2902 > and #fz
20d8 : c50e > cmp zpt+2
> trap_ne ;Z flag invalid
20da : d0fe > bne * ;failed not equal (non zero)
>
20dc : a510 > lda zpt+4
20de : c50c > cmp zpt
> trap_ne ;altered bits in memory wrong
20e0 : d0fe > bne * ;failed not equal (non zero)
>
20e2 : c8 iny ;iterate op1
20e3 : d004 bne tbt3
20e5 : e60d inc zpt+1 ;iterate op2
20e7 : f003 beq tbt2
20e9 : 4ca31f tbt3 jmp tbt1
20ec : tbt2
20ec : e0c0 cpx #$c0
trap_ne ;x altered during test
20ee : d0fe > bne * ;failed not equal (non zero)
20f0 : ba tsx
20f1 : e0ff cpx #$ff
trap_ne ;sp push/pop mismatch
20f3 : d0fe > bne * ;failed not equal (non zero)
next_test
20f5 : ad0202 > lda test_case ;previous test
20f8 : c90e > cmp #test_num
> trap_ne ;test is out of sequence
20fa : d0fe > bne * ;failed not equal (non zero)
>
000f = >test_num = test_num + 1
20fc : a90f > lda #test_num ;*** next tests' number
20fe : 8d0202 > sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
if rkwl_wdc_op = 1
; testing RMB, SMB - zp
rmbt macro ;\1 = bitnum
lda #$ff
sta zpt
set_a $a5,0
rmb \1,zpt
tst_a $a5,0
lda zpt
cmp #$ff-(1<<\1)
trap_ne ;wrong bits set or cleared
lda #1<<\1
sta zpt
set_a $5a,$ff
rmb \1,zpt
tst_a $5a,$ff
lda zpt
trap_ne ;wrong bits set or cleared
endm
smbt macro ;\1 = bitnum
lda #$ff-(1<<\1)
sta zpt
set_a $a5,0
smb \1,zpt
tst_a $a5,0
lda zpt
cmp #$ff
trap_ne ;wrong bits set or cleared
lda #0
sta zpt
set_a $5a,$ff
smb \1,zpt
tst_a $5a,$ff
lda zpt
cmp #1<<\1
trap_ne ;wrong bits set or cleared
endm
ldx #$ba ;protect x & y
ldy #$d0
rmbt 0
rmbt 1
rmbt 2
rmbt 3
rmbt 4
rmbt 5
rmbt 6
rmbt 7
smbt 0
smbt 1
smbt 2
smbt 3
smbt 4
smbt 5
smbt 6
smbt 7
cpx #$ba
trap_ne ;x altered during test
cpy #$d0
trap_ne ;y altered during test
tsx
cpx #$ff
trap_ne ;sp push/pop mismatch
next_test
endif
; testing CMP - (zp)
2101 : a2de ldx #$de ;protect x & y
2103 : a0ad ldy #$ad
set_a $80,0
> load_flag 0
2105 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
2107 : 48 > pha ;use stack to load status
2108 : a980 > lda #$80 ;precharge accu
210a : 28 > plp
210b : d22c cmp (ind1+8)
tst_a $80,fc
210d : 08 > php ;save flags
210e : c980 > cmp #$80 ;test result
> trap_ne
2110 : d0fe > bne * ;failed not equal (non zero)
>
2112 : 68 > pla ;load status
2113 : 48 > pha
> cmp_flag fc
2114 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2116 : d0fe > bne * ;failed not equal (non zero)
>
2118 : 28 > plp ;restore status
set_a $7f,0
> load_flag 0
2119 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
211b : 48 > pha ;use stack to load status
211c : a97f > lda #$7f ;precharge accu
211e : 28 > plp
211f : d22c cmp (ind1+8)
tst_a $7f,fzc
2121 : 08 > php ;save flags
2122 : c97f > cmp #$7f ;test result
> trap_ne
2124 : d0fe > bne * ;failed not equal (non zero)
>
2126 : 68 > pla ;load status
2127 : 48 > pha
> cmp_flag fzc
2128 : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
212a : d0fe > bne * ;failed not equal (non zero)
>
212c : 28 > plp ;restore status
set_a $7e,0
> load_flag 0
212d : a900 > lda #0 ;allow test to change I-flag (no mask)
>
212f : 48 > pha ;use stack to load status
2130 : a97e > lda #$7e ;precharge accu
2132 : 28 > plp
2133 : d22c cmp (ind1+8)
tst_a $7e,fn
2135 : 08 > php ;save flags
2136 : c97e > cmp #$7e ;test result
> trap_ne
2138 : d0fe > bne * ;failed not equal (non zero)
>
213a : 68 > pla ;load status
213b : 48 > pha
> cmp_flag fn
213c : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
213e : d0fe > bne * ;failed not equal (non zero)
>
2140 : 28 > plp ;restore status
set_a $80,$ff
> load_flag $ff
2141 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
2143 : 48 > pha ;use stack to load status
2144 : a980 > lda #$80 ;precharge accu
2146 : 28 > plp
2147 : d22c cmp (ind1+8)
tst_a $80,~fnz
2149 : 08 > php ;save flags
214a : c980 > cmp #$80 ;test result
> trap_ne
214c : d0fe > bne * ;failed not equal (non zero)
>
214e : 68 > pla ;load status
214f : 48 > pha
> cmp_flag ~fnz
2150 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2152 : d0fe > bne * ;failed not equal (non zero)
>
2154 : 28 > plp ;restore status
set_a $7f,$ff
> load_flag $ff
2155 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
2157 : 48 > pha ;use stack to load status
2158 : a97f > lda #$7f ;precharge accu
215a : 28 > plp
215b : d22c cmp (ind1+8)
tst_a $7f,~fn
215d : 08 > php ;save flags
215e : c97f > cmp #$7f ;test result
> trap_ne
2160 : d0fe > bne * ;failed not equal (non zero)
>
2162 : 68 > pla ;load status
2163 : 48 > pha
> cmp_flag ~fn
2164 : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2166 : d0fe > bne * ;failed not equal (non zero)
>
2168 : 28 > plp ;restore status
set_a $7e,$ff
> load_flag $ff
2169 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
216b : 48 > pha ;use stack to load status
216c : a97e > lda #$7e ;precharge accu
216e : 28 > plp
216f : d22c cmp (ind1+8)
tst_a $7e,~fzc
2171 : 08 > php ;save flags
2172 : c97e > cmp #$7e ;test result
> trap_ne
2174 : d0fe > bne * ;failed not equal (non zero)
>
2176 : 68 > pla ;load status
2177 : 48 > pha
> cmp_flag ~fzc
2178 : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
217a : d0fe > bne * ;failed not equal (non zero)
>
217c : 28 > plp ;restore status
217d : e0de cpx #$de
trap_ne ;x altered during test
217f : d0fe > bne * ;failed not equal (non zero)
2181 : c0ad cpy #$ad
trap_ne ;y altered during test
2183 : d0fe > bne * ;failed not equal (non zero)
2185 : ba tsx
2186 : e0ff cpx #$ff
trap_ne ;sp push/pop mismatch
2188 : d0fe > bne * ;failed not equal (non zero)
next_test
218a : ad0202 > lda test_case ;previous test
218d : c90f > cmp #test_num
> trap_ne ;test is out of sequence
218f : d0fe > bne * ;failed not equal (non zero)
>
0010 = >test_num = test_num + 1
2191 : a910 > lda #test_num ;*** next tests' number
2193 : 8d0202 > sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; testing logical instructions - AND EOR ORA (zp)
2196 : a242 ldx #$42 ;protect x & y
2198 : a000 ldy #0 ;AND
219a : a53a lda indAN ;set indirect address
219c : 850c sta zpt
219e : a53b lda indAN+1
21a0 : 850d sta zpt+1
21a2 : tand1
set_ay absANa,0
> load_flag 0
21a2 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
21a4 : 48 > pha ;use stack to load status
21a5 : b95302 > lda absANa,y ;precharge accu
21a8 : 28 > plp
21a9 : 320c and (zpt)
tst_ay absrlo,absflo,0
21ab : 08 > php ;save flags
21ac : d95b02 > cmp absrlo,y ;test result
> trap_ne ;
21af : d0fe > bne * ;failed not equal (non zero)
>
21b1 : 68 > pla ;load status
> eor_flag 0
21b2 : 4930 > eor #0|fao ;invert expected flags + always on bits
>
21b4 : d95f02 > cmp absflo,y ;test flags
> trap_ne
21b7 : d0fe > bne * ;failed not equal (non zero)
>
21b9 : e60c inc zpt
21bb : c8 iny
21bc : c004 cpy #4
21be : d0e2 bne tand1
21c0 : 88 dey
21c1 : c60c dec zpt
21c3 : tand2
set_ay absANa,$ff
> load_flag $ff
21c3 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
21c5 : 48 > pha ;use stack to load status
21c6 : b95302 > lda absANa,y ;precharge accu
21c9 : 28 > plp
21ca : 320c and (zpt)
tst_ay absrlo,absflo,$ff-fnz
21cc : 08 > php ;save flags
21cd : d95b02 > cmp absrlo,y ;test result
> trap_ne ;
21d0 : d0fe > bne * ;failed not equal (non zero)
>
21d2 : 68 > pla ;load status
> eor_flag $ff-fnz
21d3 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits
>
21d5 : d95f02 > cmp absflo,y ;test flags
> trap_ne
21d8 : d0fe > bne * ;failed not equal (non zero)
>
21da : c60c dec zpt
21dc : 88 dey
21dd : 10e4 bpl tand2
21df : a000 ldy #0 ;EOR
21e1 : a542 lda indEO ;set indirect address
21e3 : 850c sta zpt
21e5 : a543 lda indEO+1
21e7 : 850d sta zpt+1
21e9 : teor1
set_ay absEOa,0
> load_flag 0
21e9 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
21eb : 48 > pha ;use stack to load status
21ec : b95702 > lda absEOa,y ;precharge accu
21ef : 28 > plp
21f0 : 520c eor (zpt)
tst_ay absrlo,absflo,0
21f2 : 08 > php ;save flags
21f3 : d95b02 > cmp absrlo,y ;test result
> trap_ne ;
21f6 : d0fe > bne * ;failed not equal (non zero)
>
21f8 : 68 > pla ;load status
> eor_flag 0
21f9 : 4930 > eor #0|fao ;invert expected flags + always on bits
>
21fb : d95f02 > cmp absflo,y ;test flags
> trap_ne
21fe : d0fe > bne * ;failed not equal (non zero)
>
2200 : e60c inc zpt
2202 : c8 iny
2203 : c004 cpy #4
2205 : d0e2 bne teor1
2207 : 88 dey
2208 : c60c dec zpt
220a : teor2
set_ay absEOa,$ff
> load_flag $ff
220a : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
220c : 48 > pha ;use stack to load status
220d : b95702 > lda absEOa,y ;precharge accu
2210 : 28 > plp
2211 : 520c eor (zpt)
tst_ay absrlo,absflo,$ff-fnz
2213 : 08 > php ;save flags
2214 : d95b02 > cmp absrlo,y ;test result
> trap_ne ;
2217 : d0fe > bne * ;failed not equal (non zero)
>
2219 : 68 > pla ;load status
> eor_flag $ff-fnz
221a : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits
>
221c : d95f02 > cmp absflo,y ;test flags
> trap_ne
221f : d0fe > bne * ;failed not equal (non zero)
>
2221 : c60c dec zpt
2223 : 88 dey
2224 : 10e4 bpl teor2
2226 : a000 ldy #0 ;ORA
2228 : a54a lda indOR ;set indirect address
222a : 850c sta zpt
222c : a54b lda indOR+1
222e : 850d sta zpt+1
2230 : tora1
set_ay absORa,0
> load_flag 0
2230 : a900 > lda #0 ;allow test to change I-flag (no mask)
>
2232 : 48 > pha ;use stack to load status
2233 : b94f02 > lda absORa,y ;precharge accu
2236 : 28 > plp
2237 : 120c ora (zpt)
tst_ay absrlo,absflo,0
2239 : 08 > php ;save flags
223a : d95b02 > cmp absrlo,y ;test result
> trap_ne ;
223d : d0fe > bne * ;failed not equal (non zero)
>
223f : 68 > pla ;load status
> eor_flag 0
2240 : 4930 > eor #0|fao ;invert expected flags + always on bits
>
2242 : d95f02 > cmp absflo,y ;test flags
> trap_ne
2245 : d0fe > bne * ;failed not equal (non zero)
>
2247 : e60c inc zpt
2249 : c8 iny
224a : c004 cpy #4
224c : d0e2 bne tora1
224e : 88 dey
224f : c60c dec zpt
2251 : tora2
set_ay absORa,$ff
> load_flag $ff
2251 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
2253 : 48 > pha ;use stack to load status
2254 : b94f02 > lda absORa,y ;precharge accu
2257 : 28 > plp
2258 : 120c ora (zpt)
tst_ay absrlo,absflo,$ff-fnz
225a : 08 > php ;save flags
225b : d95b02 > cmp absrlo,y ;test result
> trap_ne ;
225e : d0fe > bne * ;failed not equal (non zero)
>
2260 : 68 > pla ;load status
> eor_flag $ff-fnz
2261 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits
>
2263 : d95f02 > cmp absflo,y ;test flags
> trap_ne
2266 : d0fe > bne * ;failed not equal (non zero)
>
2268 : c60c dec zpt
226a : 88 dey
226b : 10e4 bpl tora2
226d : e042 cpx #$42
trap_ne ;x altered during test
226f : d0fe > bne * ;failed not equal (non zero)
2271 : ba tsx
2272 : e0ff cpx #$ff
trap_ne ;sp push/pop mismatch
2274 : d0fe > bne * ;failed not equal (non zero)
next_test
2276 : ad0202 > lda test_case ;previous test
2279 : c910 > cmp #test_num
> trap_ne ;test is out of sequence
227b : d0fe > bne * ;failed not equal (non zero)
>
0011 = >test_num = test_num + 1
227d : a911 > lda #test_num ;*** next tests' number
227f : 8d0202 > sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
if I_flag = 3
2282 : 58 cli
endif
; full binary add/subtract test - (zp) only
; iterates through all combinations of operands and carry input
; uses increments/decrements to predict result & result flags
2283 : d8 cld
2284 : a20e ldx #ad2 ;for indexed test
2286 : a0ff ldy #$ff ;max range
2288 : a900 lda #0 ;start with adding zeroes & no carry
228a : 850c sta adfc ;carry in - for diag
228c : 850d sta ad1 ;operand 1 - accumulator
228e : 850e sta ad2 ;operand 2 - memory or immediate
2290 : 8d0502 sta ada2 ;non zp
2293 : 850f sta adrl ;expected result bits 0-7
2295 : 8510 sta adrh ;expected result bit 8 (carry out)
2297 : a9ff lda #$ff ;complemented operand 2 for subtract
2299 : 8512 sta sb2
229b : 8d0602 sta sba2 ;non zp
229e : a902 lda #2 ;expected Z-flag
22a0 : 8511 sta adrf
22a2 : 18 tadd clc ;test with carry clear
22a3 : 201925 jsr chkadd
22a6 : e60c inc adfc ;now with carry
22a8 : e60f inc adrl ;result +1
22aa : 08 php ;save N & Z from low result
22ab : 08 php
22ac : 68 pla ;accu holds expected flags
22ad : 2982 and #$82 ;mask N & Z
22af : 28 plp
22b0 : d002 bne tadd1
22b2 : e610 inc adrh ;result bit 8 - carry
22b4 : 0510 tadd1 ora adrh ;merge C to expected flags
22b6 : 8511 sta adrf ;save expected flags except overflow
22b8 : 38 sec ;test with carry set
22b9 : 201925 jsr chkadd
22bc : c60c dec adfc ;same for operand +1 but no carry
22be : e60d inc ad1
22c0 : d0e0 bne tadd ;iterate op1
22c2 : a900 lda #0 ;preset result to op2 when op1 = 0
22c4 : 8510 sta adrh
22c6 : ee0502 inc ada2
22c9 : e60e inc ad2
22cb : 08 php ;save NZ as operand 2 becomes the new result
22cc : 68 pla
22cd : 2982 and #$82 ;mask N00000Z0
22cf : 8511 sta adrf ;no need to check carry as we are adding to 0
22d1 : c612 dec sb2 ;complement subtract operand 2
22d3 : ce0602 dec sba2
22d6 : a50e lda ad2
22d8 : 850f sta adrl
22da : d0c6 bne tadd ;iterate op2
22dc : e00e cpx #ad2
trap_ne ;x altered during test
22de : d0fe > bne * ;failed not equal (non zero)
22e0 : c0ff cpy #$ff
trap_ne ;y altered during test
22e2 : d0fe > bne * ;failed not equal (non zero)
22e4 : ba tsx
22e5 : e0ff cpx #$ff
trap_ne ;sp push/pop mismatch
22e7 : d0fe > bne * ;failed not equal (non zero)
next_test
22e9 : ad0202 > lda test_case ;previous test
22ec : c911 > cmp #test_num
> trap_ne ;test is out of sequence
22ee : d0fe > bne * ;failed not equal (non zero)
>
0012 = >test_num = test_num + 1
22f0 : a912 > lda #test_num ;*** next tests' number
22f2 : 8d0202 > sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; decimal add/subtract test
; *** WARNING - tests documented behavior only! ***
; only valid BCD operands are tested, the V flag is ignored
; although V is declared as beeing valid on the 65C02 it has absolutely
; no use in BCD math. No sign = no overflow!
; iterates through all valid combinations of operands and carry input
; uses increments/decrements to predict result & carry flag
22f5 : f8 sed
22f6 : a20e ldx #ad2 ;for indexed test
22f8 : a0ff ldy #$ff ;max range
22fa : a999 lda #$99 ;start with adding 99 to 99 with carry
22fc : 850d sta ad1 ;operand 1 - accumulator
22fe : 850e sta ad2 ;operand 2 - memory or immediate
2300 : 8d0502 sta ada2 ;non zp
2303 : 850f sta adrl ;expected result bits 0-7
2305 : a901 lda #1 ;set carry in & out
2307 : 850c sta adfc ;carry in - for diag
2309 : 8510 sta adrh ;expected result bit 8 (carry out)
230b : a981 lda #$81 ;set N & C (99 + 99 + C = 99 + C)
230d : 8511 sta adrf
230f : a900 lda #0 ;complemented operand 2 for subtract
2311 : 8512 sta sb2
2313 : 8d0602 sta sba2 ;non zp
2316 : 38 tdad sec ;test with carry set
2317 : 20c223 jsr chkdad
231a : c60c dec adfc ;now with carry clear
231c : a50f lda adrl ;decimal adjust result
231e : d008 bne tdad1 ;skip clear carry & preset result 99 (9A-1)
2320 : c610 dec adrh
2322 : a999 lda #$99
2324 : 850f sta adrl
2326 : d012 bne tdad3
2328 : 290f tdad1 and #$f ;lower nibble mask
232a : d00c bne tdad2 ;no decimal adjust needed
232c : c60f dec adrl ;decimal adjust (?0-6)
232e : c60f dec adrl
2330 : c60f dec adrl
2332 : c60f dec adrl
2334 : c60f dec adrl
2336 : c60f dec adrl
2338 : c60f tdad2 dec adrl ;result -1
233a : 08 tdad3 php ;save valid flags
233b : 68 pla
233c : 2982 and #$82 ;N-----Z-
233e : 0510 ora adrh ;N-----ZC
2340 : 8511 sta adrf
2342 : 18 clc ;test with carry clear
2343 : 20c223 jsr chkdad
2346 : e60c inc adfc ;same for operand -1 but with carry
2348 : a50d lda ad1 ;decimal adjust operand 1
234a : f015 beq tdad5 ;iterate operand 2
234c : 290f and #$f ;lower nibble mask
234e : d00c bne tdad4 ;skip decimal adjust
2350 : c60d dec ad1 ;decimal adjust (?0-6)
2352 : c60d dec ad1
2354 : c60d dec ad1
2356 : c60d dec ad1
2358 : c60d dec ad1
235a : c60d dec ad1
235c : c60d tdad4 dec ad1 ;operand 1 -1
235e : 4c1623 jmp tdad ;iterate op1
2361 : a999 tdad5 lda #$99 ;precharge op1 max
2363 : 850d sta ad1
2365 : a50e lda ad2 ;decimal adjust operand 2
2367 : f039 beq tdad7 ;end of iteration
2369 : 290f and #$f ;lower nibble mask
236b : d018 bne tdad6 ;skip decimal adjust
236d : c60e dec ad2 ;decimal adjust (?0-6)
236f : c60e dec ad2
2371 : c60e dec ad2
2373 : c60e dec ad2
2375 : c60e dec ad2
2377 : c60e dec ad2
2379 : e612 inc sb2 ;complemented decimal adjust for subtract (?9+6)
237b : e612 inc sb2
237d : e612 inc sb2
237f : e612 inc sb2
2381 : e612 inc sb2
2383 : e612 inc sb2
2385 : c60e tdad6 dec ad2 ;operand 2 -1
2387 : e612 inc sb2 ;complemented operand for subtract
2389 : a512 lda sb2
238b : 8d0602 sta sba2 ;copy as non zp operand
238e : a50e lda ad2
2390 : 8d0502 sta ada2 ;copy as non zp operand
2393 : 850f sta adrl ;new result since op1+carry=00+carry +op2=op2
2395 : 08 php ;save flags
2396 : 68 pla
2397 : 2982 and #$82 ;N-----Z-
2399 : 0901 ora #1 ;N-----ZC
239b : 8511 sta adrf
239d : e610 inc adrh ;result carry
239f : 4c1623 jmp tdad ;iterate op2
23a2 : e00e tdad7 cpx #ad2
trap_ne ;x altered during test
23a4 : d0fe > bne * ;failed not equal (non zero)
23a6 : c0ff cpy #$ff
trap_ne ;y altered during test
23a8 : d0fe > bne * ;failed not equal (non zero)
23aa : ba tsx
23ab : e0ff cpx #$ff
trap_ne ;sp push/pop mismatch
23ad : d0fe > bne * ;failed not equal (non zero)
23af : d8 cld
23b0 : ad0202 lda test_case
23b3 : c912 cmp #test_num
trap_ne ;previous test is out of sequence
23b5 : d0fe > bne * ;failed not equal (non zero)
23b7 : a9f0 lda #$f0 ;mark opcode testing complete
23b9 : 8d0202 sta test_case
; final RAM integrity test
; verifies that none of the previous tests has altered RAM outside of the
; designated write areas.
check_ram
> ;RAM check disabled - RAM size not set
; *** DEBUG INFO ***
; to debug checksum errors uncomment check_ram in the next_test macro to
; narrow down the responsible opcode.
; may give false errors when monitor, OS or other background activity is
; allowed during previous tests.
; S U C C E S S ************************************************
; -------------
success ;if you get here everything went well
> ;db $db
23bc : 4cbc23 > jmp * ;test passed, no errors
; -------------
; S U C C E S S ************************************************
23bf : 4c0004 jmp start ;run again
; core subroutine of the decimal add/subtract test
; *** WARNING - tests documented behavior only! ***
; only valid BCD operands are tested, V flag is ignored
; iterates through all valid combinations of operands and carry input
; uses increments/decrements to predict result & carry flag
23c2 : chkdad
; decimal ADC / SBC zp
23c2 : 08 php ;save carry for subtract
23c3 : a50d lda ad1
23c5 : 650e adc ad2 ;perform add
23c7 : 08 php
23c8 : c50f cmp adrl ;check result
trap_ne ;bad result
23ca : d0fe > bne * ;failed not equal (non zero)
23cc : 68 pla ;check flags
23cd : 2983 and #$83 ;mask N-----ZC
23cf : c511 cmp adrf
trap_ne ;bad flags
23d1 : d0fe > bne * ;failed not equal (non zero)
23d3 : 28 plp
23d4 : 08 php ;save carry for next add
23d5 : a50d lda ad1
23d7 : e512 sbc sb2 ;perform subtract
23d9 : 08 php
23da : c50f cmp adrl ;check result
trap_ne ;bad result
23dc : d0fe > bne * ;failed not equal (non zero)
23de : 68 pla ;check flags
23df : 2983 and #$83 ;mask N-----ZC
23e1 : c511 cmp adrf
trap_ne ;bad flags
23e3 : d0fe > bne * ;failed not equal (non zero)
23e5 : 28 plp
; decimal ADC / SBC abs
23e6 : 08 php ;save carry for subtract
23e7 : a50d lda ad1
23e9 : 6d0502 adc ada2 ;perform add
23ec : 08 php
23ed : c50f cmp adrl ;check result
trap_ne ;bad result
23ef : d0fe > bne * ;failed not equal (non zero)
23f1 : 68 pla ;check flags
23f2 : 2983 and #$83 ;mask N-----ZC
23f4 : c511 cmp adrf
trap_ne ;bad flags
23f6 : d0fe > bne * ;failed not equal (non zero)
23f8 : 28 plp
23f9 : 08 php ;save carry for next add
23fa : a50d lda ad1
23fc : ed0602 sbc sba2 ;perform subtract
23ff : 08 php
2400 : c50f cmp adrl ;check result
trap_ne ;bad result
2402 : d0fe > bne * ;failed not equal (non zero)
2404 : 68 pla ;check flags
2405 : 2983 and #$83 ;mask N-----ZC
2407 : c511 cmp adrf
trap_ne ;bad flags
2409 : d0fe > bne * ;failed not equal (non zero)
240b : 28 plp
; decimal ADC / SBC #
240c : 08 php ;save carry for subtract
240d : a50e lda ad2
240f : 8d0b02 sta ex_adci+1 ;set ADC # operand
2412 : a50d lda ad1
2414 : 200a02 jsr ex_adci ;execute ADC # in RAM
2417 : 08 php
2418 : c50f cmp adrl ;check result
trap_ne ;bad result
241a : d0fe > bne * ;failed not equal (non zero)
241c : 68 pla ;check flags
241d : 2983 and #$83 ;mask N-----ZC
241f : c511 cmp adrf
trap_ne ;bad flags
2421 : d0fe > bne * ;failed not equal (non zero)
2423 : 28 plp
2424 : 08 php ;save carry for next add
2425 : a512 lda sb2
2427 : 8d0e02 sta ex_sbci+1 ;set SBC # operand
242a : a50d lda ad1
242c : 200d02 jsr ex_sbci ;execute SBC # in RAM
242f : 08 php
2430 : c50f cmp adrl ;check result
trap_ne ;bad result
2432 : d0fe > bne * ;failed not equal (non zero)
2434 : 68 pla ;check flags
2435 : 2983 and #$83 ;mask N-----ZC
2437 : c511 cmp adrf
trap_ne ;bad flags
2439 : d0fe > bne * ;failed not equal (non zero)
243b : 28 plp
; decimal ADC / SBC zp,x
243c : 08 php ;save carry for subtract
243d : a50d lda ad1
243f : 7500 adc 0,x ;perform add
2441 : 08 php
2442 : c50f cmp adrl ;check result
trap_ne ;bad result
2444 : d0fe > bne * ;failed not equal (non zero)
2446 : 68 pla ;check flags
2447 : 2983 and #$83 ;mask N-----ZC
2449 : c511 cmp adrf
trap_ne ;bad flags
244b : d0fe > bne * ;failed not equal (non zero)
244d : 28 plp
244e : 08 php ;save carry for next add
244f : a50d lda ad1
2451 : f504 sbc sb2-ad2,x ;perform subtract
2453 : 08 php
2454 : c50f cmp adrl ;check result
trap_ne ;bad result
2456 : d0fe > bne * ;failed not equal (non zero)
2458 : 68 pla ;check flags
2459 : 2983 and #$83 ;mask N-----ZC
245b : c511 cmp adrf
trap_ne ;bad flags
245d : d0fe > bne * ;failed not equal (non zero)
245f : 28 plp
; decimal ADC / SBC abs,x
2460 : 08 php ;save carry for subtract
2461 : a50d lda ad1
2463 : 7df701 adc ada2-ad2,x ;perform add
2466 : 08 php
2467 : c50f cmp adrl ;check result
trap_ne ;bad result
2469 : d0fe > bne * ;failed not equal (non zero)
246b : 68 pla ;check flags
246c : 2983 and #$83 ;mask N-----ZC
246e : c511 cmp adrf
trap_ne ;bad flags
2470 : d0fe > bne * ;failed not equal (non zero)
2472 : 28 plp
2473 : 08 php ;save carry for next add
2474 : a50d lda ad1
2476 : fdf801 sbc sba2-ad2,x ;perform subtract
2479 : 08 php
247a : c50f cmp adrl ;check result
trap_ne ;bad result
247c : d0fe > bne * ;failed not equal (non zero)
247e : 68 pla ;check flags
247f : 2983 and #$83 ;mask N-----ZC
2481 : c511 cmp adrf
trap_ne ;bad flags
2483 : d0fe > bne * ;failed not equal (non zero)
2485 : 28 plp
; decimal ADC / SBC abs,y
2486 : 08 php ;save carry for subtract
2487 : a50d lda ad1
2489 : 790601 adc ada2-$ff,y ;perform add
248c : 08 php
248d : c50f cmp adrl ;check result
trap_ne ;bad result
248f : d0fe > bne * ;failed not equal (non zero)
2491 : 68 pla ;check flags
2492 : 2983 and #$83 ;mask N-----ZC
2494 : c511 cmp adrf
trap_ne ;bad flags
2496 : d0fe > bne * ;failed not equal (non zero)
2498 : 28 plp
2499 : 08 php ;save carry for next add
249a : a50d lda ad1
249c : f90701 sbc sba2-$ff,y ;perform subtract
249f : 08 php
24a0 : c50f cmp adrl ;check result
trap_ne ;bad result
24a2 : d0fe > bne * ;failed not equal (non zero)
24a4 : 68 pla ;check flags
24a5 : 2983 and #$83 ;mask N-----ZC
24a7 : c511 cmp adrf
trap_ne ;bad flags
24a9 : d0fe > bne * ;failed not equal (non zero)
24ab : 28 plp
; decimal ADC / SBC (zp,x)
24ac : 08 php ;save carry for subtract
24ad : a50d lda ad1
24af : 6144 adc (lo adi2-ad2,x) ;perform add
24b1 : 08 php
24b2 : c50f cmp adrl ;check result
trap_ne ;bad result
24b4 : d0fe > bne * ;failed not equal (non zero)
24b6 : 68 pla ;check flags
24b7 : 2983 and #$83 ;mask N-----ZC
24b9 : c511 cmp adrf
trap_ne ;bad flags
24bb : d0fe > bne * ;failed not equal (non zero)
24bd : 28 plp
24be : 08 php ;save carry for next add
24bf : a50d lda ad1
24c1 : e146 sbc (lo sbi2-ad2,x) ;perform subtract
24c3 : 08 php
24c4 : c50f cmp adrl ;check result
trap_ne ;bad result
24c6 : d0fe > bne * ;failed not equal (non zero)
24c8 : 68 pla ;check flags
24c9 : 2983 and #$83 ;mask N-----ZC
24cb : c511 cmp adrf
trap_ne ;bad flags
24cd : d0fe > bne * ;failed not equal (non zero)
24cf : 28 plp
; decimal ADC / SBC (abs),y
24d0 : 08 php ;save carry for subtract
24d1 : a50d lda ad1
24d3 : 7156 adc (adiy2),y ;perform add
24d5 : 08 php
24d6 : c50f cmp adrl ;check result
trap_ne ;bad result
24d8 : d0fe > bne * ;failed not equal (non zero)
24da : 68 pla ;check flags
24db : 2983 and #$83 ;mask N-----ZC
24dd : c511 cmp adrf
trap_ne ;bad flags
24df : d0fe > bne * ;failed not equal (non zero)
24e1 : 28 plp
24e2 : 08 php ;save carry for next add
24e3 : a50d lda ad1
24e5 : f158 sbc (sbiy2),y ;perform subtract
24e7 : 08 php
24e8 : c50f cmp adrl ;check result
trap_ne ;bad result
24ea : d0fe > bne * ;failed not equal (non zero)
24ec : 68 pla ;check flags
24ed : 2983 and #$83 ;mask N-----ZC
24ef : c511 cmp adrf
trap_ne ;bad flags
24f1 : d0fe > bne * ;failed not equal (non zero)
24f3 : 28 plp
; decimal ADC / SBC (zp)
24f4 : 08 php ;save carry for subtract
24f5 : a50d lda ad1
24f7 : 7252 adc (adi2) ;perform add
24f9 : 08 php
24fa : c50f cmp adrl ;check result
trap_ne ;bad result
24fc : d0fe > bne * ;failed not equal (non zero)
24fe : 68 pla ;check flags
24ff : 2983 and #$83 ;mask N-----ZC
2501 : c511 cmp adrf
trap_ne ;bad flags
2503 : d0fe > bne * ;failed not equal (non zero)
2505 : 28 plp
2506 : 08 php ;save carry for next add
2507 : a50d lda ad1
2509 : f254 sbc (sbi2) ;perform subtract
250b : 08 php
250c : c50f cmp adrl ;check result
trap_ne ;bad result
250e : d0fe > bne * ;failed not equal (non zero)
2510 : 68 pla ;check flags
2511 : 2983 and #$83 ;mask N-----ZC
2513 : c511 cmp adrf
trap_ne ;bad flags
2515 : d0fe > bne * ;failed not equal (non zero)
2517 : 28 plp
2518 : 60 rts
; core subroutine of the full binary add/subtract test
; iterates through all combinations of operands and carry input
; uses increments/decrements to predict result & result flags
2519 : a511 chkadd lda adrf ;add V-flag if overflow
251b : 2983 and #$83 ;keep N-----ZC / clear V
251d : 48 pha
251e : a50d lda ad1 ;test sign unequal between operands
2520 : 450e eor ad2
2522 : 300a bmi ckad1 ;no overflow possible - operands have different sign
2524 : a50d lda ad1 ;test sign equal between operands and result
2526 : 450f eor adrl
2528 : 1004 bpl ckad1 ;no overflow occured - operand and result have same sign
252a : 68 pla
252b : 0940 ora #$40 ;set V
252d : 48 pha
252e : 68 ckad1 pla
252f : 8511 sta adrf ;save expected flags
; binary ADC / SBC (zp)
2531 : 08 php ;save carry for subtract
2532 : a50d lda ad1
2534 : 7252 adc (adi2) ;perform add
2536 : 08 php
2537 : c50f cmp adrl ;check result
trap_ne ;bad result
2539 : d0fe > bne * ;failed not equal (non zero)
253b : 68 pla ;check flags
253c : 29c3 and #$c3 ;mask NV----ZC
253e : c511 cmp adrf
trap_ne ;bad flags
2540 : d0fe > bne * ;failed not equal (non zero)
2542 : 28 plp
2543 : 08 php ;save carry for next add
2544 : a50d lda ad1
2546 : f254 sbc (sbi2) ;perform subtract
2548 : 08 php
2549 : c50f cmp adrl ;check result
trap_ne ;bad result
254b : d0fe > bne * ;failed not equal (non zero)
254d : 68 pla ;check flags
254e : 29c3 and #$c3 ;mask NV----ZC
2550 : c511 cmp adrf
trap_ne ;bad flags
2552 : d0fe > bne * ;failed not equal (non zero)
2554 : 28 plp
2555 : 60 rts
; target for the jump indirect test
2556 : 5c25 ji_adr dw test_ji
2558 : 1a19 dw ji_ret
255a : 88 dey
255b : 88 dey
255c : test_ji
255c : 08 php ;either SP or Y count will fail, if we do not hit
255d : 88 dey
255e : 88 dey
255f : 88 dey
2560 : 28 plp
trap_cs ;flags loaded?
2561 : b0fe > bcs * ;failed carry set
trap_vs
2563 : 70fe > bvs * ;failed overflow set
trap_mi
2565 : 30fe > bmi * ;failed minus (bit 7 set)
trap_eq
2567 : f0fe > beq * ;failed equal (zero)
2569 : c949 cmp #'I' ;registers loaded?
trap_ne
256b : d0fe > bne * ;failed not equal (non zero)
256d : e04e cpx #'N'
trap_ne
256f : d0fe > bne * ;failed not equal (non zero)
2571 : c041 cpy #('D'-3)
trap_ne
2573 : d0fe > bne * ;failed not equal (non zero)
2575 : 48 pha ;save a,x
2576 : 8a txa
2577 : 48 pha
2578 : ba tsx
2579 : e0fd cpx #$fd ;check SP
trap_ne
257b : d0fe > bne * ;failed not equal (non zero)
257d : 68 pla ;restore x
257e : aa tax
set_stat $ff
> load_flag $ff
257f : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
2581 : 48 > pha ;use stack to load status
2582 : 28 > plp
2583 : 68 pla ;restore a
2584 : e8 inx ;return registers with modifications
2585 : 49aa eor #$aa ;N=1, V=1, Z=0, C=1
2587 : 6cff02 jmp (ji_tab+2)
258a : ea nop
258b : ea nop
trap ;runover protection
258c : 4c8c25 > jmp * ;failed anyway
258f : 4c0004 jmp start ;catastrophic error - cannot continue
; target for the jump indirect test
2592 : d925 jxi_adr dw trap_ind
2594 : d925 dw trap_ind
2596 : a025 dw test_jxi ;+4
2598 : 6619 dw jxi_ret ;+6
259a : d925 dw trap_ind
259c : d925 dw trap_ind
259e : 88 dey
259f : 88 dey
25a0 : test_jxi
25a0 : 08 php ;either SP or Y count will fail, if we do not hit
25a1 : 88 dey
25a2 : 88 dey
25a3 : 88 dey
25a4 : 28 plp
trap_cs ;flags loaded?
25a5 : b0fe > bcs * ;failed carry set
trap_vs
25a7 : 70fe > bvs * ;failed overflow set
trap_mi
25a9 : 30fe > bmi * ;failed minus (bit 7 set)
trap_eq
25ab : f0fe > beq * ;failed equal (zero)
25ad : c958 cmp #'X' ;registers loaded?
trap_ne
25af : d0fe > bne * ;failed not equal (non zero)
25b1 : e004 cpx #4
trap_ne
25b3 : d0fe > bne * ;failed not equal (non zero)
25b5 : c046 cpy #('I'-3)
trap_ne
25b7 : d0fe > bne * ;failed not equal (non zero)
25b9 : 48 pha ;save a,x
25ba : 8a txa
25bb : 48 pha
25bc : ba tsx
25bd : e0fd cpx #$fd ;check SP
trap_ne
25bf : d0fe > bne * ;failed not equal (non zero)
25c1 : 68 pla ;restore x
25c2 : aa tax
set_stat $ff
> load_flag $ff
25c3 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
>
25c5 : 48 > pha ;use stack to load status
25c6 : 28 > plp
25c7 : 68 pla ;restore a
25c8 : e8 inx ;return registers with modifications
25c9 : e8 inx
25ca : 49aa eor #$aa ;N=1, V=1, Z=0, C=1
25cc : 7cf902 jmp (jxi_tab,x)
25cf : ea nop
25d0 : ea nop
trap ;runover protection
25d1 : 4cd125 > jmp * ;failed anyway
25d4 : 4c0004 jmp start ;catastrophic error - cannot continue
; JMP (abs,x) with bad x
25d7 : ea nop
25d8 : ea nop
25d9 : trap_ind
25d9 : ea nop
25da : ea nop
trap ;near miss indexed indirect jump
25db : 4cdb25 > jmp * ;failed anyway
25de : 4c0004 jmp start ;catastrophic error - cannot continue
;trap in case of unexpected IRQ, NMI, BRK, RESET
25e1 : nmi_trap
trap ;check stack for conditions at NMI
25e1 : 4ce125 > jmp * ;failed anyway
25e4 : 4c0004 jmp start ;catastrophic error - cannot continue
25e7 : res_trap
trap ;unexpected RESET
25e7 : 4ce725 > jmp * ;failed anyway
25ea : 4c0004 jmp start ;catastrophic error - cannot continue
25ed : 88 dey
25ee : 88 dey
25ef : irq_trap ;BRK test or unextpected BRK or IRQ
25ef : 08 php ;either SP or Y count will fail, if we do not hit
25f0 : 88 dey
25f1 : 88 dey
25f2 : 88 dey
;next traps could be caused by unexpected BRK or IRQ
;check stack for BREAK and originating location
;possible jump/branch into weeds (uninitialized space)
25f3 : c9bd cmp #$ff-'B' ;BRK pass 2 registers loaded?
25f5 : f042 beq break2
25f7 : c942 cmp #'B' ;BRK pass 1 registers loaded?
trap_ne
25f9 : d0fe > bne * ;failed not equal (non zero)
25fb : e052 cpx #'R'
trap_ne
25fd : d0fe > bne * ;failed not equal (non zero)
25ff : c048 cpy #'K'-3
trap_ne
2601 : d0fe > bne * ;failed not equal (non zero)
2603 : 850a sta irq_a ;save registers during break test
2605 : 860b stx irq_x
2607 : ba tsx ;test break on stack
2608 : bd0201 lda $102,x
cmp_flag 0 ;break test should have B=1 & unused=1 on stack
260b : c930 > cmp #(0 |fao)&m8 ;expected flags + always on bits
trap_ne ;possible no break flag on stack
260d : d0fe > bne * ;failed not equal (non zero)
260f : 68 pla
cmp_flag intdis ;should have added interrupt disable
2610 : c934 > cmp #(intdis |fao)&m8 ;expected flags + always on bits
trap_ne
2612 : d0fe > bne * ;failed not equal (non zero)
2614 : ba tsx
2615 : e0fc cpx #$fc ;sp -3? (return addr, flags)
trap_ne
2617 : d0fe > bne * ;failed not equal (non zero)
2619 : adff01 lda $1ff ;propper return on stack
261c : c919 cmp #hi(brk_ret0)
trap_ne
261e : d0fe > bne * ;failed not equal (non zero)
2620 : adfe01 lda $1fe
2623 : c9b8 cmp #lo(brk_ret0)
trap_ne
2625 : d0fe > bne * ;failed not equal (non zero)
load_flag $ff
2627 : a9ff > lda #$ff ;allow test to change I-flag (no mask)
2629 : 48 pha
262a : a60b ldx irq_x
262c : e8 inx ;return registers with modifications
262d : a50a lda irq_a
262f : 49aa eor #$aa
2631 : 28 plp ;N=1, V=1, Z=1, C=1 but original flags should be restored
2632 : 40 rti
trap ;runover protection
2633 : 4c3326 > jmp * ;failed anyway
2636 : 4c0004 jmp start ;catastrophic error - cannot continue
2639 : break2 ;BRK pass 2
2639 : e0ad cpx #$ff-'R'
trap_ne
263b : d0fe > bne * ;failed not equal (non zero)
263d : c0b1 cpy #$ff-'K'-3
trap_ne
263f : d0fe > bne * ;failed not equal (non zero)
2641 : 850a sta irq_a ;save registers during break test
2643 : 860b stx irq_x
2645 : ba tsx ;test break on stack
2646 : bd0201 lda $102,x
cmp_flag $ff ;break test should have B=1
2649 : c9ff > cmp #($ff |fao)&m8 ;expected flags + always on bits
trap_ne ;possibly no break flag on stack
264b : d0fe > bne * ;failed not equal (non zero)
264d : 68 pla
cmp_flag $ff-decmode ;actual passed flags should have decmode cleared
264e : c9f7 > cmp #($ff-decmode |fao)&m8 ;expected flags + always on bits
trap_ne
2650 : d0fe > bne * ;failed not equal (non zero)
2652 : ba tsx
2653 : e0fc cpx #$fc ;sp -3? (return addr, flags)
trap_ne
2655 : d0fe > bne * ;failed not equal (non zero)
2657 : adff01 lda $1ff ;propper return on stack
265a : c919 cmp #hi(brk_ret1)
trap_ne
265c : d0fe > bne * ;failed not equal (non zero)
265e : adfe01 lda $1fe
2661 : c9de cmp #lo(brk_ret1)
trap_ne
2663 : d0fe > bne * ;failed not equal (non zero)
load_flag intdis
2665 : a904 > lda #intdis ;allow test to change I-flag (no mask)
2667 : 48 pha
2668 : a60b ldx irq_x
266a : e8 inx ;return registers with modifications
266b : a50a lda irq_a
266d : 49aa eor #$aa
266f : 28 plp ;N=0, V=0, Z=0, C=0 but original flags should be restored
2670 : 40 rti
trap ;runover protection
2671 : 4c7126 > jmp * ;failed anyway
2674 : 4c0004 jmp start ;catastrophic error - cannot continue
if report = 1
include "report.i65"
endif
;copy of data to initialize BSS segment
if load_data_direct != 1
zp_init
zp1_ db $c3,$82,$41,0 ;test patterns for LDx BIT ROL ROR ASL LSR
zp7f_ db $7f ;test pattern for compare
;logical zeropage operands
zpOR_ db 0,$1f,$71,$80 ;test pattern for OR
zpAN_ db $0f,$ff,$7f,$80 ;test pattern for AND
zpEO_ db $ff,$0f,$8f,$8f ;test pattern for EOR
;indirect addressing pointers
ind1_ dw abs1 ;indirect pointer to pattern in absolute memory
dw abs1+1
dw abs1+2
dw abs1+3
dw abs7f
inw1_ dw abs1-$f8 ;indirect pointer for wrap-test pattern
indt_ dw abst ;indirect pointer to store area in absolute memory
dw abst+1
dw abst+2
dw abst+3
inwt_ dw abst-$f8 ;indirect pointer for wrap-test store
indAN_ dw absAN ;indirect pointer to AND pattern in absolute memory
dw absAN+1
dw absAN+2
dw absAN+3
indEO_ dw absEO ;indirect pointer to EOR pattern in absolute memory
dw absEO+1
dw absEO+2
dw absEO+3
indOR_ dw absOR ;indirect pointer to OR pattern in absolute memory
dw absOR+1
dw absOR+2
dw absOR+3
;add/subtract indirect pointers
adi2_ dw ada2 ;indirect pointer to operand 2 in absolute memory
sbi2_ dw sba2 ;indirect pointer to complemented operand 2 (SBC)
adiy2_ dw ada2-$ff ;with offset for indirect indexed
sbiy2_ dw sba2-$ff
zp_end
if (zp_end - zp_init) != (zp_bss_end - zp_bss)
;force assembler error if size is different
ERROR ERROR ERROR ;mismatch between bss and zeropage data
endif
data_init
ex_adc_ adc #0 ;execute immediate opcodes
rts
ex_sbc_ sbc #0 ;execute immediate opcodes
rts
abs1_ db $c3,$82,$41,0 ;test patterns for LDx BIT ROL ROR ASL LSR
abs7f_ db $7f ;test pattern for compare
;loads
fLDx_ db fn,fn,0,fz ;expected flags for load
;shifts
rASL_ ;expected result ASL & ROL -carry
rROL_ db $86,$04,$82,0 ; "
rROLc_ db $87,$05,$83,1 ;expected result ROL +carry
rLSR_ ;expected result LSR & ROR -carry
rROR_ db $61,$41,$20,0 ; "
rRORc_ db $e1,$c1,$a0,$80 ;expected result ROR +carry
fASL_ ;expected flags for shifts
fROL_ db fnc,fc,fn,fz ;no carry in
fROLc_ db fnc,fc,fn,0 ;carry in
fLSR_
fROR_ db fc,0,fc,fz ;no carry in
fRORc_ db fnc,fn,fnc,fn ;carry in
;increments (decrements)
rINC_ db $7f,$80,$ff,0,1 ;expected result for INC/DEC
fINC_ db 0,fn,fn,fz,0 ;expected flags for INC/DEC
;logical memory operand
absOR_ db 0,$1f,$71,$80 ;test pattern for OR
absAN_ db $0f,$ff,$7f,$80 ;test pattern for AND
absEO_ db $ff,$0f,$8f,$8f ;test pattern for EOR
;logical accu operand
absORa_ db 0,$f1,$1f,0 ;test pattern for OR
absANa_ db $f0,$ff,$ff,$ff ;test pattern for AND
absEOa_ db $ff,$f0,$f0,$0f ;test pattern for EOR
;logical results
absrlo_ db 0,$ff,$7f,$80
absflo_ db fz,fn,0,fn
data_end
if (data_end - data_init) != (data_bss_end - data_bss)
;force assembler error if size is different
ERROR ERROR ERROR ;mismatch between bss and data
endif
vec_init
dw nmi_trap
dw res_trap
dw irq_trap
vec_bss equ $fffa
endif ;end of RAM init data
; code at end of image due to the need to add blank space as required
if ($ff & (ji_ret - * - 2)) < ($ff & (jxi_ret - * - 2))
; JMP (abs) when $xxff and $xx00 are from same page
2677 : 00000000000000.. ds lo(ji_ret - * - 2)
2718 : ea nop
2719 : ea nop
271a : ea ji_px nop ;low address byte matched with ji_ret
271b : ea nop
trap ;jmp indirect page cross bug
271c : 4c1c27 > jmp * ;failed anyway
; JMP (abs,x) when $xxff and $xx00 are from same page
271f : 00000000000000.. ds lo(jxi_ret - * - 2)
2764 : ea nop
2765 : ea nop
2766 : ea jxi_px nop ;low address byte matched with jxi_ret
2767 : ea nop
trap ;jmp indexed indirect page cross bug
2768 : 4c6827 > jmp * ;failed anyway
else
; JMP (abs,x) when $xxff and $xx00 are from same page
ds lo(jxi_ret - * - 2)
nop
nop
jxi_px nop ;low address byte matched with jxi_ret
nop
trap ;jmp indexed indirect page cross bug
; JMP (abs) when $xxff and $xx00 are from same page
ds lo(ji_ret - * - 2)
nop
nop
ji_px nop ;low address byte matched with ji_ret
nop
trap ;jmp indirect page cross bug
endif
if (load_data_direct = 1) & (ROM_vectors = 1)
fffa = org $fffa ;vectors
fffa : e125 dw nmi_trap
fffc : e725 dw res_trap
fffe : ef25 dw irq_trap
endif
fffa = end start
No errors in pass 2.