From fe99e5616243a1bdbceaf5907390ce4443de7db0 Mon Sep 17 00:00:00 2001 From: Klaus2m5 Date: Thu, 7 Dec 2017 16:49:40 +0100 Subject: [PATCH] fixed BRK not tested with interrupts disabled added option to skip the remainder of a failing test in report.i65 added otion to skip undefined opcode as NOP test for the 65C02 replaced binaries with the current version of the test --- 6502_functional_test.a65 | 135 +- 65C02_extended_opcodes_test.a65c | 177 +- bin_files/6502_functional_test.bin | Bin 65536 -> 65536 bytes bin_files/6502_functional_test.lst | 17467 ++++++++++---------- bin_files/65C02_extended_opcodes_test.bin | Bin 65536 -> 65536 bytes bin_files/65C02_extended_opcodes_test.lst | 5762 +++---- report.i65 | 49 +- 7 files changed, 12207 insertions(+), 11383 deletions(-) diff --git a/6502_functional_test.a65 b/6502_functional_test.a65 index 3655e37..2c4031c 100644 --- a/6502_functional_test.a65 +++ b/6502_functional_test.a65 @@ -21,7 +21,7 @@ ; addressing modes with focus on propper setting of the processor status ; register bits. ; -; version 21-oct-2015 +; 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/ @@ -73,6 +73,9 @@ ; 24-aug-2015 all self modifying immediate opcodes now execute in data RAM ; added small branch offset pretest ; 21-oct-2015 added option to disable decimal mode ADC & SBC tests +; 04-dec-2017 fixed BRK only tested with interrupts enabled +; added option to skip the remainder of a failing test +; in report.i65 ; C O N F I G U R A T I O N @@ -1608,35 +1611,40 @@ jsr_ret = *-1 ;last address of jsr = return address ; break & return from interrupt if ROM_vectors = 1 - set_stat 0 + load_flag 0 ;with interrupts enabled if allowed! + pha lda #'B' ldx #'R' - ldy #'K' ;N=0, V=0, Z=0, C=0 + ldy #'K' + plp ;N=0, V=0, Z=0, C=0 brk else - lda #hi brk_ret ;emulated break + lda #hi brk_ret0 ;emulated break pha - lda #lo brk_ret + lda #lo brk_ret0 pha - lda #fao ;set break & unused on stack + load_flag fao ;set break & unused on stack + pha + load_flag intdis ;during interrupt pha - set_stat intdis lda #'B' ldx #'R' - ldy #'K' ;N=0, V=0, Z=0, C=0 + ldy #'K' + plp ;N=0, V=0, Z=0, C=0 jmp irq_trap endif dey ;should not be executed -brk_ret ;address of break return +brk_ret0 ;address of break return php ;either SP or Y count will fail, if we do not hit dey dey dey - cmp #('B'^$aa) ;returned registers OK? + cmp #'B'^$aa ;returned registers OK? + ;the IRQ vector was never executed if A & X stay unmodified trap_ne - cpx #('R'+1) + cpx #'R'+1 trap_ne - cpy #('K'-6) + cpy #'K'-6 trap_ne pla ;returned flags OK (unchanged)? cmp_flag 0 @@ -1644,6 +1652,47 @@ brk_ret ;address of break return tsx ;sp? cpx #$ff trap_ne + if ROM_vectors = 1 + load_flag $ff ;with interrupts disabled if allowed! + pha + lda #$ff-'B' + ldx #$ff-'R' + ldy #$ff-'K' + plp ;N=1, V=1, Z=1, C=1 + brk + else + lda #hi brk_ret1 ;emulated break + pha + lda #lo brk_ret1 + pha + load_flag $ff + pha ;set break & unused on stack + pha ;actual flags + lda #$ff-'B' + ldx #$ff-'R' + ldy #$ff-'K' + plp ;N=1, V=1, Z=1, C=1 + jmp irq_trap + endif + dey ;should not be executed +brk_ret1 ;address of break return + php ;either SP or Y count will fail, if we do not hit + dey + dey + dey + cmp #($ff-'B')^$aa ;returned registers OK? + ;the IRQ vector was never executed if A & X stay unmodified + trap_ne + cpx #$ff-'R'+1 + trap_ne + cpy #$ff-'K'-6 + trap_ne + pla ;returned flags OK (unchanged)? + cmp_flag $ff + trap_ne + tsx ;sp? + cpx #$ff + trap_ne next_test ; test set and clear flags CLC CLI CLD CLV SEC SEI SED @@ -5808,6 +5857,7 @@ test_ind eor #$aa ;N=1, V=1, Z=0, C=1 jmp (ptr_ind_ret) trap ;runover protection + jmp start ;catastrophic error - cannot continue ; target for the jump subroutine test dey @@ -5848,12 +5898,15 @@ test_jsr eor #$aa ;N=1, V=1, Z=0, C=1 rts trap ;runover protection + jmp start ;catastrophic error - cannot continue ;trap in case of unexpected IRQ, NMI, BRK, RESET - BRK test target nmi_trap trap ;check stack for conditions at NMI + jmp start ;catastrophic error - cannot continue res_trap trap ;unexpected RESET + jmp start ;catastrophic error - cannot continue dey dey @@ -5862,41 +5915,81 @@ irq_trap ;BRK test or unextpected BRK or IRQ dey dey dey - ;next 4 traps could be caused by unexpected BRK or IRQ + ;next traps could be caused by unexpected BRK or IRQ ;check stack for BREAK and originating location ;possible jump/branch into weeds (uninitialized space) - cmp #'B' ;registers loaded? + cmp #$ff-'B' ;BRK pass 2 registers loaded? + beq break2 + cmp #'B' ;BRK pass 1 registers loaded? trap_ne cpx #'R' trap_ne - cpy #('K'-3) + cpy #'K'-3 trap_ne sta irq_a ;save registers during break test stx irq_x tsx ;test break on stack lda $102,x - cmp_flag 0 ;break test should have B=1 + cmp_flag 0 ;break test should have B=1 & unused=1 on stack trap_ne ; - no break flag on stack pla - cmp #fai ;should have added interrupt disable + cmp_flag intdis ;should have added interrupt disable trap_ne tsx cpx #$fc ;sp -3? (return addr, flags) trap_ne lda $1ff ;propper return on stack - cmp #hi(brk_ret) + cmp #hi(brk_ret0) trap_ne lda $1fe - cmp #lo(brk_ret) + cmp #lo(brk_ret0) trap_ne - set_stat $ff + load_flag $ff + pha ldx irq_x inx ;return registers with modifications lda irq_a - eor #$aa ;N=1, V=1, Z=0, C=1 but original flags should be restored + eor #$aa + plp ;N=1, V=1, Z=1, C=1 but original flags should be restored rti trap ;runover protection + jmp start ;catastrophic error - cannot continue +break2 ;BRK pass 2 + cpx #$ff-'R' + trap_ne + cpy #$ff-'K'-3 + trap_ne + sta irq_a ;save registers during break test + stx irq_x + tsx ;test break on stack + lda $102,x + cmp_flag $ff ;break test should have B=1 + trap_ne ; - no break flag on stack + pla + ora #decmode ;ignore decmode cleared if 65c02 + cmp_flag $ff ;actual passed flags + trap_ne + tsx + cpx #$fc ;sp -3? (return addr, flags) + trap_ne + lda $1ff ;propper return on stack + cmp #hi(brk_ret1) + trap_ne + lda $1fe + cmp #lo(brk_ret1) + trap_ne + load_flag intdis + pha + ldx irq_x + inx ;return registers with modifications + lda irq_a + eor #$aa + plp ;N=0, V=0, Z=0, C=0 but original flags should be restored + rti + trap ;runover protection + jmp start ;catastrophic error - cannot continue + if report = 1 include "report.i65" endif diff --git a/65C02_extended_opcodes_test.a65c b/65C02_extended_opcodes_test.a65c index a504861..e18e098 100644 --- a/65C02_extended_opcodes_test.a65c +++ b/65C02_extended_opcodes_test.a65c @@ -20,9 +20,9 @@ ; 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, BRK, STP & WAI are covered in the 6502_interrupt_test. +; NMI, IRQ, STP & WAI are covered in the 6502_interrupt_test. ; -; version 09-feb-2017 +; 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/ @@ -65,6 +65,10 @@ ; 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 @@ -106,6 +110,10 @@ wdc_op = 1 ;(0=test as NOPs, 1=full test, >1=no test) rkwl_wdc_op = 1 +;skip testing all undefined opcodes override +;0=test as NOP, >0=skip +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) report = 0 @@ -552,6 +560,9 @@ test_num = test_num + 1 bss ;uninitialized segment, copy of data at end of code! endif org zero_page +;break test interrupt save +irq_a ds 1 ;a register +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 @@ -1131,7 +1142,8 @@ nop_test macro ;\1 = opcode, \2 = # of bytes cpx #0 trap_ne ;x changed endm - + + if skip_nop = 0 nop_test $02,2 nop_test $22,2 nop_test $42,2 @@ -1215,6 +1227,7 @@ nop_test macro ;\1 = opcode, \2 = # of bytes nop_test $db,1 endif next_test + endif ; jump indirect (test page cross bug is fixed) ldx #3 ;prepare table @@ -1310,10 +1323,59 @@ jxp_ok if ROM_vectors = 1 ; test BRK clears decimal mode - sed + load_flag 0 ;with interrupts enabled if allowed! + pha + lda #'B' + ldx #'R' + ldy #'K' + plp ;N=0, V=0, Z=0, C=0 brk - nop -brk_ret + dey ;should not be executed +brk_ret0 ;address of break return + php ;either SP or Y count will fail, if we do not hit + dey + dey + dey + cmp #'B'^$aa ;returned registers OK? + ;the IRQ vector was never executed if A & X stay unmodified + trap_ne + cpx #'R'+1 + trap_ne + cpy #'K'-6 + trap_ne + pla ;returned flags OK (unchanged)? + cmp_flag 0 + trap_ne + tsx ;sp? + cpx #$ff + trap_ne +;pass 2 + load_flag $ff ;with interrupts disabled if allowed! + pha + lda #$ff-'B' + ldx #$ff-'R' + ldy #$ff-'K' + plp ;N=1, V=1, Z=1, C=1 + brk + dey ;should not be executed +brk_ret1 ;address of break return + php ;either SP or Y count will fail, if we do not hit + dey + dey + dey + cmp #($ff-'B')^$aa ;returned registers OK? + ;the IRQ vector was never executed if A & X stay unmodified + trap_ne + cpx #$ff-'R'+1 + trap_ne + cpy #$ff-'K'-6 + trap_ne + pla ;returned flags OK (unchanged)? + cmp_flag $ff + trap_ne + tsx ;sp? + cpx #$ff + trap_ne next_test endif @@ -2534,6 +2596,7 @@ test_ji nop nop trap ;runover protection + jmp start ;catastrophic error - cannot continue ; target for the jump indirect test jxi_adr dw trap_ind @@ -2578,6 +2641,7 @@ test_jxi nop nop trap ;runover protection + jmp start ;catastrophic error - cannot continue ; JMP (abs,x) with bad x nop @@ -2586,33 +2650,96 @@ trap_ind nop nop trap ;near miss indexed indirect jump + jmp start ;catastrophic error - cannot continue ;trap in case of unexpected IRQ, NMI, BRK, RESET nmi_trap trap ;check stack for conditions at NMI + jmp start ;catastrophic error - cannot continue res_trap trap ;unexpected RESET -irq_trap - php ;save decimal flag + jmp start ;catastrophic error - cannot continue + + dey + dey +irq_trap ;BRK test or unextpected BRK or IRQ + php ;either SP or Y count will fail, if we do not hit + dey + dey + 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) + cmp #$ff-'B' ;BRK pass 2 registers loaded? + beq break2 + cmp #'B' ;BRK pass 1 registers loaded? + trap_ne + cpx #'R' + trap_ne + cpy #'K'-3 + trap_ne + sta irq_a ;save registers during break test + stx irq_x tsx ;test break on stack lda $102,x - and #break - trap_eq ;check stack for conditions at IRQ - if ROM_vectors = 1 - pla ;test decimal mode cleared - and #decmode - trap_ne ;decimal mode not cleared after BRK - plp ;pop saved flags - pla ;return address low - cmp #lo(brk_ret) - trap_ne ;unexpected BRK - pla ;return address high - cmp #hi(brk_ret) - trap_ne ;unexpected BRK - jmp brk_ret - else - trap_ne ;check stack for conditions at BRK - endif + cmp_flag 0 ;break test should have B=1 & unused=1 on stack + trap_ne ;possible no break flag on stack + pla + cmp_flag intdis ;should have added interrupt disable + trap_ne + tsx + cpx #$fc ;sp -3? (return addr, flags) + trap_ne + lda $1ff ;propper return on stack + cmp #hi(brk_ret0) + trap_ne + lda $1fe + cmp #lo(brk_ret0) + trap_ne + load_flag $ff + pha + ldx irq_x + inx ;return registers with modifications + lda irq_a + eor #$aa + plp ;N=1, V=1, Z=1, C=1 but original flags should be restored + rti + trap ;runover protection + jmp start ;catastrophic error - cannot continue + +break2 ;BRK pass 2 + cpx #$ff-'R' + trap_ne + cpy #$ff-'K'-3 + trap_ne + sta irq_a ;save registers during break test + stx irq_x + tsx ;test break on stack + lda $102,x + cmp_flag $ff ;break test should have B=1 + trap_ne ;possibly no break flag on stack + pla + cmp_flag $ff-decmode ;actual passed flags should have decmode cleared + trap_ne + tsx + cpx #$fc ;sp -3? (return addr, flags) + trap_ne + lda $1ff ;propper return on stack + cmp #hi(brk_ret1) + trap_ne + lda $1fe + cmp #lo(brk_ret1) + trap_ne + load_flag intdis + pha + ldx irq_x + inx ;return registers with modifications + lda irq_a + eor #$aa + plp ;N=0, V=0, Z=0, C=0 but original flags should be restored + rti + trap ;runover protection + jmp start ;catastrophic error - cannot continue if report = 1 include "report.i65" diff --git a/bin_files/6502_functional_test.bin b/bin_files/6502_functional_test.bin index 8a20227a6decf69bcdf87155cace7278caa2996a..c9a35e1d6bd2e7d85844da2abf7034d5ed820e6e 100644 GIT binary patch literal 65536 zcmeHOeQZ_tc|P}C`}!EJ?Th&`-%bk2C1IJAl_4P2c*~Lbt_T zeMQ*p#{Tm?0Z()g-^V2T}&JoAW*ZL3DXBbJV~kJ8GUfTt)P@4x7;&bO{uUu*0z$eFawJhq`p?$}4oQ2o+*Te-OqGYq znesqM8A{5~KcWmH%0TmQ0h0s_jdW*wFwlOf4CFJ1#_kl$onr&^&(31`(li-M)5S97 zB#~2toM5^=n_0Yl$Uy>S1`mL#{CVy4R&!+tQQ~m=f|G|`Zrc@>{ zKnR?`Y0tJT-o0dK>D01J(%+HVp7j4Hbu{V!X{y-dKbi8sobvxX<$o>ZKa=u0$J(gd z_H5CeO8R?JLoNb)Qf+P~=^sw*cDE<}zfT2;_Ux2fO#1(rI_eH3{XXeGA^qP^1>MU3 zhRi>g%D8Pw|DyE&b1K-N{O?Hrb(w!NwcXvF^#3Cj+)@6r#ILOr`RO|0pIaA{Rej6r zM18BIe~t7%R2S@3{zvLWeVgk<{l4@+S{J;j{7*>#S7iRvb)vt&sw3rVAVV!pYiDi% z>IaEzyElf>bheYQS%?}qWWu0ff@oQankEzcR+N>fqpU=YWhI)ZPK|{P5scGWm?YyT z6=Ru9vaYVMt}t;ZtSe01tD>w#Vk}|zMzDm`do6lT(bl2KPiH$ubr}K;wozd-bx=+U zId!Dh%G@T(Ysud5##%ygN-F`ssaVcm$qkcG@00ueP^i)sxQ8Ws9gsZ9o(;C-H|BQu zAAIV@jbeFnatbHg(en24*v(?O1hkRQ7t4hU7cO)R_@AuTA#E~b3qm#`WQRocfLgCn zJM!CdpLu%uI)L`}dbpfsL*)062Go&9th2BlxwCZc*8HQn9j#wl7fmZ6?TbkBt+ZK4 zn=R9VP5B+U&t@G#Ha3aiM-jXk{nP5m(-f)<=Ld7I>!^i@I*BO!?F>)mK}bCtxM{-0 zMWMyRs^N6cuBQXqrpM{vV;p=#TQ1YVf5LKGTYg9fZ^A;?20Eq9zZqvbfST1V|oy&B*8^#}MBUPD3l?|veU#2=IJ-VbJj#e2DK5QRDkQOFabP)<%1bHN)iz<6Ma!2?rFukFDDlhaGZAXZuk7!S<( zfCmzVib10B;DO1>Pm?l-^w~wqc$4(l)FU68l86@p2Hh)|1nO2kHXJ#@aV)}dA&bWr zhj<+2K!C;3YZ3&9cx*V(MSl8FwqN%q8xaPJWl|U-G=XE;NGq>kWyyAgA;OiLK9(J@ zSHrs?3>KF(#JEI|-IbLk+p=(JrnJQk*y2Xo;snj=Wp6N%ptFqTARnOYf^s>w3lA*U zwC%!!wtV7c$~q&KpFq0+Dh=pk5ZQY}1Na7!16e5x%q9yI%Am5)h%%@wG}1|pG{Vt@ zMsi8=|6s0nsADvHJn4EJqi-+7tx0D`+uKX=yEpSLLQqMykS;3(C~quu31%SsQkr1q z(gZ@7cO*>J7>$FNymLD3sN|Q@r<1O#=MZY^&AdmYH=*WA zaL<#Ie6EHzVxY8Nx|eD9eC4i{?v2vDT)P)2cS^eDB3xQQZs<^zyGwGDyBc@bCBaSZ zYTR9y1UI>>ad$~>^nFtA=s_COIXR}V?UOBPgAX>4cV4vXlZ&*sk-YPxO`lw>y-nm@ zAicWhDDS{EL2P=C5)WJx%%qcT=r(*lB*hce4fazzHgq zg*N$(-pxhIrbn4~yqk-aP4{B(OalhbRBiA~sRmEhmv{QG^fZTq=|NihOH?Vgvadl7 z;9$dG4VkG}Y-3-eRQ_P&U@e)c-sfuFz9uR8!KT3!nW^OGQZ8*hpo4j8>t7Y8dVlt? z*!upF*w()~PoBbu#n$(a?2qd6>U`xETi-tt+xk}*D7V=9e(^L9b+u|$xs8BTxs8@p zxs9w_rtcWHJn2l|F>ZO*nZ9$Q-o^Ol=k|LSd$f|`7Bo@LO(rG1g;Rn*du_vSosupRYFt-XaofO$|pE1RZzT|cTZ!21!v_-hwCv*fHsHU77oz4S<*LN34A8I$r~;c$N#JjbiuVz2 zhLb8-NVB|iYLR;Czm>l;ye#qJuYBsyeVi|Ud(H9L z2{4S@9{Q!?ux^Sz%zb=%MdJDO=~2zhu)-eg@CfZSYLJ2G7)K@ML}e z|F;ZypDI`+HyLl?tz4jAF4N0GY&YKgTRC69BHnFm^R(@I#x_^mrpPAV5;S;!sBAVK zUigVP*h0KFjV;8ZSJhO@baoB)M!m^s3S5IlQ?J=gg=?^x%4kYlgH={WQ=^4xinK6I zl@_Kc)54@W>FTfunl6@_=DV}k7Sek|^zKqY9zLWFOM7rVZXX+>?(jZ>jwC)6xi=d5 zKNRUut4Y>-QPLtuF*aB)}xE8PNB9tuzsNtmR@VyLl1 zs*&r?o(;>i%)%I_w$cr^m2Swbbi+Qjx00M}ac;83sZFk7Ho1n_ z1Ub^Bf#W}tV=eT$wacXXMmN(vt7wNc37;nSxLS|CDg0MZ$ zS{|nzo~_<^R^_aZ=7gSS$Bjqi+*ggKOlYCU=1C~eO2xA_%7Yx~d3M}*1kcy1)h2jC zk6oMKfoF~4`E-;g^gKJRJfz_=Xt>;H*ptqt(q3OWCggic$e3GqNp7kb?kyraDyfxi zyLIhW_B}IjQ_}#q-8MIM9=fA4Tih}`s(CL=0oip#BlL_)bdIdRj9Sf%UQA~fq`gx! zog*=~Rz+_b+>eRu=xFq=#N4_UEBjM3aFZCww%s;2DG|D(~ir9V7{1L?i4vNEJIGIuyGOjS-!TUB{jod(m}7BkW#u9XcX9AiIuegr1Q&NAALm z?xqcVYUs{9kEe5I=VMWNm;aX#8*pGuR;Zcs+m zR|eT%nCV8Gbj|SG+yV3n#CYfkEw)t1@? z4<}ty@y}4PihZYgtR%UDs((gRQ!vVj0?UG`0wXpG9L8F}RQ)Pce-BlkJhk*lJyk#a zCvLXYbG`9DQ!D*d{4Qj0e#nUFctqE@6(P@P~Bm65Nz%K!eU*`)yt(2_ccOXpF z8iW)?VMS;Rd5=uahnL2)C&bNN)Ti^vCu#p+TLta)Fwt`A%(gNTJ!HPEM0=Yg z>CKRHx;^IX(oXf>H@WZn{b(w^qkT=i?H%>YY~c@?AB<)9W+p;nr-xwophBj9t@=Pn{-4OWE4 zP;*E6&ej>`9`WfsHFx;Fw4wjI(9qx^rqN$O&NBk9Y zhxZGy>~QW8pXL>FzZY}Q%DJ~3X%cgP40CU+Xr87jBA|IRLMtF54eW>@T)QS%lSrplg;T#_cZi0Lj9hm zo=h;^(~J+50=H*QOKbk&iS$I1=XI{$kFPFIWNI@#bJoLpK0VP;EFm+4=lh99^7qU+ z-~1E$c(tdgc%DdBgXBJt+!iFqLy8~)z6^4SW_{~lu05abYbtu@Gr@7BHm`0frq4Io ze_9YTk?w1lnlF3}=dC~fp@)#x(APNC24~CpM)PN)+59=*IMLike0{RbiA=GFYP=6M z-j5nvE_=bwr*_iU#anL6!%VS!IV+4fk_Y4s*0$qo=H6}k?YDcEH|P*~fDppHAGlM% z^`BbnJ2hTk!&e%;bNIql=jy~cf`jFHbKLR_mOd8rZ}@aCYHB>vj8C>(=fv&JN9L1# zUfkaB*G>$f;iHVLrW-SXbGhZEuoasvP*pxd#Jn{|F>eQJf^?Fjjv<3A8J2S zx`VZ(@8V}WC-H^vrh4bzbziRc?_L+r>%bSMx8aM^_&B*T@9EZc{?2vS^?24+^`&gh zhObc5w=VJB@4<3n>}8xM#5_RUyZnD31pgKB?{^H^*znY*u}uKl0s8i0xo6hF*=L4b z@m0`H`X=?665bxQVBZq3-<>_#H>+bHyTSi}uu6l-e$C3BM&tG3Bfoe)zSSMnw440j zU61_V!v815Ewciw04u->umY?AE5Hh{0;~WlzzVPetN<&(3a|pK04u->umY?AE5Hh{ z0;~WlzzVPetN<&(3a|pK04u->umY?AE5Hh{0;~WlzzVPetN<&(3a|pK04u->umY?A zE5Hh{0;~WlzzVPetN<&(3a|pK04u->umY?AE5Hh{0;~WlzzVPetN<&(3a|pK04u-> zumY?AE5Hh{0;~WlzzVPetN<&(3a|pK04u->umY?AE5Hh{0;~WlzzVPetN<&(3a|pK z04u->umY?AE5Hh{0;~WlzzVPetN<&(3a|pK04u->umY?AE5Hh{0;~WlzzVPetN<&( z3a|pK04u->umY?AE5Hh{0;~WlzzVPetN<&(3a|pK04u->umY?AE5Hh{0;~WlzzVPe ztN<&(3a|pK04u->umY?AE5Hh{0;~WlzzVPetN<&(3a|pK04u->{9h^X%DV5Y`=@pP E3ya{&@Bjb+ literal 65536 zcmeI3ZERcTb;rp|k-m~Bijv>tw^(VNln&fLnN!VM+9YxlS900Zb(YTiur0-~LLIun z`LH1aqDXcvO)#P~0g}KDP?ROYR9A=sWvGkTs~dH)1&gx-W4!Irlp~&Ti-P&I8Va&K~C;=d;e|oO>OzXox4{%lzjzfPkL9 z82Zpq%o%Ao9Q&K(x8h&x>5N_eNnz+ve8|Cnv3M-*92z<_gq6VY(2x_eS0wh~*4PrY zyR_6A!`e7Qv7z69?zzN^#pM^h*jUV&j5%|$O3jPoxKJBCHjzzqe8cG*92;-&V)^ek zlz**%mhSzvrZ1P568Srl(=q&5-$1D1K;;0{bi9(tKalid1n-$zS8Xo7RGX@0YZFx^ zs4Btuv=U4!0fli8CV?n%cayC7Z}6Q~MJ6rqnZud~2%GnqQO3uTSMSrt(`-`OcKvKi5Uw_U0YRZA(u2h$kP2}%O9d!03@_SNVyf?SxR1*2Gq@Ho668QsC|Ho4Q^^`ZH^p8pZ z$5UCSE0G_R`jM1(ztTS|^~a?DcT@YEgNgjhDetDzzb50qF8$w-`q`9MQ}w+i{Vz)W zyHdZ9@&=XuL+O7*#$T5D)GF@{rEgm$>hD-3>f5?X^mqFzBHsWENt)Ipg$dC2;<;Xz zHle?lz~%tei;)O}h6vDdWVK8p=q)SDQCnG#I+o>Vton53FXoP$Va{4JHSMj~0) zfM1vIIOW&nI}R!<%aJlxv3t{4Lh3z<-cz)7X!5hUz8PJHhz8k=keNEjCk3BX#A{n& zH~DqsK5*wcd^pu@2*0~hD_$y`CQ$E_`h6c%^%B&lW%gBw79TF`?;Pn4x>e!!dvMEJZcT7&)^59t z`wL%;iDYw&Fn$=u52Als9shK1hDVw_aJqN6SR$Orxm|QXdvbsdKE}c0T5^#N{u`1T zTJky_ya5TF^>j?L-9-m?;h;lH9;bu5AvvHWH|Ss&Bp0=W&Qdx)2;u8mIEhiGQDqCN zEY_&bMVBsCu%ji#3%M4wWq4s0vutbd!uXV_R6h#sm>-3f+>b(?_)$pXM0YA(;GEAh6jsu%w>|{EooL@+vOgO5Z zqo{2(`yQ3viqf-G`pqA1IC{J>K05usQy&#>{x}nVp`DJet0aO^vc@p2W77jOP36MwFqj;|LJ6oYb$ z2$ugZ$iE%_tKm-*e_2d?BKNfDdZIcb>b*c+3-uZ~$)_7=BPObcr8=Y4Yn3`F)jd+( zs@3b1IwjR|5iVp&4GxjH2V`ziN97*4AaavBD)+zzk(<;}xd&u!^!=*d(GeQcSve-Z z?N=Ms29LCmc1^JBSDUmpL)x{$reAH=+E&u8lUm(#Fz>__k=XPcOgwQ#WHvnqGf!L* zsZGzp)Du@kZqsvd#=WN2+V8Y@*uB<>dEf+uw4>np}eSbCbnNP3c%{sL8stt_?30gSXvHjtQ##Wt2QlKe$8%4KtskEbZT(AY;f25V$)vjMN@i_;O>`tdWNwSNU`FRooj zXzj<(g!cXw?7dXe-jAONE&eN5e5t0zA3qb?{7`Or%9*}Hx#c-$`VQrmC!Og#lv|#4 zrtiXxdp^ARg~RUo@a7kK-1FhhFT~vQ;mtSkOamsKsoKOdrJ8uMzJkB`N36}qX6ns9 zVr@P)Qg8kdYxAEnn}5XG{HNsRV~pNfx?hOf+=ehd~c=L27{`@b!^%p)a*1osncyk;Xrf*FBm&##16n$9u_+&Qz>@HHv zr>BGyR2OTn-Fax24DeAz04i}kO6)+1v?wL9Y-8dwI~Tgjme$Z*$HX;uE_8`4tra?P zft?FoUrXzRPF!8Z`xWcrTA$CHp!NC8iCUk}oUrxz%!OrAuF!DQL&PMmrf6_D>JefR zmr~M2JwQz2I!d~z$A|iSroZ}proZ}proZ}pray1S6*ppfJkZaC-eFhVh3!WMug4X) zV3O%a1~2A{`!C7#&CkR$b(?smUK7vMY2wNHe)W$G_yo$^AU7Ew&TU(#-!9YJLTooa z*4wsLzau_qWNWnSZ;foVmMxJ?eAs8=-KS)BJiPG}c98k;-Y_yh9=)rkT9$J=us7=C zLsQ@mESh@HZYtb?%~V2D;ts5`5}F#Vn5IZ8rm513Y09)>Qk`^l*Z`&*CDYahAGuE)J|Q`8+kN6?m(PgxEIE&q=!V`Or1*3=9iZV`Qha4e z@hwYLGc3;=8l&o1M5W`pu*yKhRmUQ*Wo#l(`!q)7p@@say0B6$qRK-N)L3d7n?Pf; zq~Q(a&aQXohQt=oe$b8&3K^WS8I+7V zayJ!N?xq6E-Sq#HZS~1X7S2twaBAagG858`*=lB+!Q8Zs;=ZP!LT9xOvU>^8L%@gxRBl7%NRBa-Uud!4hd{okK!()1OHxzCQ121mL8O+qt=6?$-nXxio0>*&TW#m2 z&V6+dvz1$V2U%OWzrI4{Dz~k+D_6OtI*8uNZL2kZ@yYWo;J?-I$J?7+25)ijxm9Qc z@(uNg)%6ydgnUCSEgn)af`hPQ1TAz&c8oh$tb>qH9YG7b4x(aP1czeRp<@K+V%PB( zEB2!62wK>^=sL7Ta6on)K?^;jDxD)+F{4g1qvzAPb!qp+O6N#Ot*PiugZit&J2)D> zDQ1zv<=SaJMj<73t(Qk&| z^$t}oQOz(!A$CAnMnpi^*#Whk6_BdMr=Z?#s#>f$(W|K~wF^F-a7@KNL&eJWooHK` z8C6ZjC?^pqKteul&2oRLQ zvd}T)6EZ13vpMX&ARg_4I_*a~nf7z{)up}aJ6cNZc~yLReG(ae2cB;$W^WUc(JU#K zdqc_rtyG_Ulls=*4Z70j*;mwu-a)aS`lsa7JI7wT zlbZjslk1C|dgs_b-bqsn80h|KEjs1Yp?@%P>ZF(cMz8&8>YZxp2=JxosS67k!m`jY z)YRerNaqSu59qX?nmTlU`1zHl9#m>iHFYTe0G`oP4=OeNt9t5C_v{Y32Bsd+*G(PT zuY|n)sRwjAubBF$F!h|AddJxJyJ+fPaB_{2Q|}l%*F{qc80h|K>K$_G&?h6OPI~EY z^xB`M-l3+B04>o|7Zx&vWuarJsl$D3#|l#q=(L}jI&@p^S!wD)rS?=)hjIfvqo*EJ zYWn`vp^onjx(22m(AP~J+P09lKlOl4=Uq5JCwmTK-;S|gEN1W>w%BlbxMes4`opcm zS#No`9luWUoZ+^P&dS{j>4jF;?caVFUq@cZCbPqByC9uSFSJyu@XX>)zmOsQaNBJA zoAis-;nvD5CE1Q7cOc0Pk>t3a!iytc7QU2bSLb(k&ZbMP6?Zo49fxcC_SQ;zw$=XI z0h@(%sby)c(6!83fAeiS;nq^hEOkNIF`F@e7uwC=*~~(FiSm_Xn+w^>@I@-}4iveB zBJ;<0=3@P`S3tM z@@T1T`?q>aEe~e8n(%LHwxPfA{@(uKHXG#3S$x$h0MeHjkiN)()S}GTJ)f~aYH|D6 zeu#aLT5Lf25+9^5F(7@B0qKhjNMB??`XV2sFY!V85+9^5@j*(-qv|`*Q?-NmpBk2G zbNZ{(_#Slc(cV+ln^;Nu5`3G(>EgVjqAx;eC|s)K`8A6C4MwN-JPH5&d;hKbGzZYAL)84wc)0b z=2NE~@y*PB`eO5`Dn6~WA{~*DUT$72HT6y0pKtzc{{MlP025#WOn?b60Vco%m;e)C z0!)AjFaajO1egF5U;<2l2`~XBzyz286JP>NfC(@GCcp%k025#WOn?b60Vco%m;e)C z0!)AjFaajO1egF5U;<2l2`~XBzyz286JP>NfC(@GCcp%k025#WOn?b60Vco%m;e)C z0!)AjFaajO1egF5U;<2l2`~XBzyz286JP>NfC(@GCcp%k025#WOn?b60Vco%m;e)C z0!)AjFaajO1egF5U;<2l2`~XBzyz286JP>NfC(@GCcp%k025#WOn?b60Vco%m;e)C z0!)AjFaajO1egF5U;<2l2`~XBzyz286JP>NfC(@GCcp%k025#WOn?b60Vco%m;e)C z0!)AjFaajO1egF5U;<2l2`~XBzyz286JP>NfC(@GCcp%k025#WOn?b6fnP0wneN%{ Hf9U>yF)>V1 diff --git a/bin_files/6502_functional_test.lst b/bin_files/6502_functional_test.lst index 9051910..d178888 100644 --- a/bin_files/6502_functional_test.lst +++ b/bin_files/6502_functional_test.lst @@ -1,11 +1,11 @@ AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 1 ---------------------------------------------------- 6502_functional_test.a65 ---------------------------------------------------- -5803 lines read, no errors in pass 1. +6104 lines read, no errors in pass 1. ; ; 6 5 0 2 F U N C T I O N A L T E S T ; - ; Copyright (C) 2012-2013 Klaus Dormann + ; Copyright (C) 2012-2015 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 @@ -25,8 +25,7 @@ AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood ; addressing modes with focus on propper setting of the processor status ; register bits. ; - ; version 16-aug-2013 - ; edited to provide a pre-configured bin file loadable at $0000 for full 64k + ; 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/ @@ -72,6 +71,15 @@ AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood ; added test sequence check to detect if tests jump their fence ; 23-jul-2013 added RAM integrity check option ; 16-aug-2013 added error report to standard output option + ; 13-dec-2014 added binary/decimal opcode table switch test + ; 14-dec-2014 improved relative address test + ; 23-aug-2015 added option to disable self modifying tests + ; 24-aug-2015 all self modifying immediate opcodes now execute in data RAM + ; added small branch offset pretest + ; 21-oct-2015 added option to disable decimal mode ADC & SBC tests + ; 04-dec-2017 fixed BRK only tested with interrupts enabled + ; added option to skip the remainder of a failing test + ; in report.i65 ; C O N F I G U R A T I O N @@ -96,7 +104,7 @@ AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood ; add 2 if I_flag = 2 000a = zero_page = $a - ;data_segment memory start address, $5B (91) consecutive Bytes required + ;data_segment memory start address, $6A (106) consecutive Bytes required 0200 = data_segment = $200 if (data_segment & $ff) != 0 ERROR ERROR ERROR low byte of data_segment MUST be $00 !! @@ -104,9 +112,13 @@ AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood ;code_segment memory start address, 13kB of consecutive space required ; add 2.5 kB if I_flag = 2 - ;parts of the code are self modifying and must reside in RAM 0400 = code_segment = $400 + ;self modifying code may be disabled to allow running in ROM + ;0=part of the code is self modifying and must reside in RAM + ;1=tests disabled: branch range +0000 = disable_selfmod = 0 + ;report errors through I/O channel (0=use standard self trap loops, 1=include ;report.i65 as I/O channel, add 3.5 kB) 0000 = report = 0 @@ -116,6 +128,10 @@ AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood ;leave disabled if a monitor, OS or background interrupt is allowed to alter RAM ffff = ram_top = -1 + ;disable test decimal mode ADC & SBC, 0=enable, 1=disable, + ;2=disable including decimal flag in processor status +0000 = disable_decimal = 0 + noopt ;do not take shortcuts ;macros for error & success traps to allow user modification @@ -240,12 +256,16 @@ ffff = ram_top = -1 0030 = fao equ break+reserv ;bits always on after PHP, BRK 0034 = fai equ fao+intdis ;+ forced interrupt disable +0038 = faod equ fao+decmode ;+ ignore decimal +003c = faid equ fai+decmode ;+ ignore decimal 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 test of decimal bit ;masking of interrupt enable/disable on load and compare ;masking of always on bits after PHP or BRK (unused & break) on compare + if disable_decimal < 2 if I_flag = 0 load_flag macro lda #\1&m8i ;force enable interrupts (mask I) @@ -294,6 +314,64 @@ ffff = ram_top = -1 eor #\1|fao ;invert expected flags + always on bits endm endif + else + if I_flag = 0 + load_flag macro + lda #\1&m8i ;force enable interrupts (mask I) + endm + cmp_flag macro + ora #decmode ;ignore decimal mode bit + cmp #(\1|faod)&m8i ;I_flag is always enabled + always on bits + endm + eor_flag macro + ora #decmode ;ignore decimal mode bit + eor #(\1&m8i|faod) ;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 + ora #decmode ;ignore decimal mode bit + cmp #(\1|faid)&m8 ;I_flag is always disabled + always on bits + endm + eor_flag macro + ora #decmode ;ignore decimal mode bit + eor #(\1|faid) ;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 + ora #decmode ;ignore decimal mode bit + cmp #(\1|faod)&m8i ;expected flags + always on bits, mask I + endm + eor_flag macro + eor flag_I_on ;I_flag is never changed + ora #decmode ;ignore decimal mode bit + eor #(\1&m8i|faod) ;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 + ora #decmode ;ignore decimal mode bit + cmp #(\1|faod)&m8 ;expected flags + always on bits + endm + eor_flag macro + ora #decmode ;ignore decimal mode bit + eor #\1|faod ;invert expected flags + always on bits + endm + endif + endif ;macros to set (register|memory|zeropage) & status set_stat macro ;setting flags in the processor status register @@ -486,17 +564,9 @@ ffff = ram_top = -1 lda #0 sta zpt ;set low byte of indirect pointer sta zpt+3 ;checksum high byte + if disable_selfmod = 0 sta range_adr ;reset self modifying code - sta tandi1 - sta tandi2 - sta teori1 - sta teori2 - sta torai1 - sta torai2 - sta chkdadi - sta chkdsbi - sta chkadi - sta chksbi + endif clc ldx #zp_bss-zero_page ;zeropage - write test area ccs3\? adc zero_page,x @@ -505,9 +575,9 @@ ffff = ram_top = -1 clc ccs2\? inx bne ccs3\? - ldx #hi(data_segment) ;set high byte of indirect pointer + ldx #hi(abs1) ;set high byte of indirect pointer stx zpt+1 - ldy #lo(data_bss) ;data after write test area + ldy #lo(abs1) ;data after write & execute test area ccs5\? adc (zpt),y bcc ccs4\? inc zpt+3 ;carry to high byte @@ -574,29 +644,29 @@ ffff = ram_top = -1 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 : 0802 ind1 dw abs1 ;indirect pointer to pattern in absolute memory -0026 : 0902 dw abs1+1 -0028 : 0a02 dw abs1+2 -002a : 0b02 dw abs1+3 -002c : 0c02 dw abs7f -002e : 1001 inw1 dw abs1-$f8 ;indirect pointer for wrap-test pattern +0024 : 1702 ind1 dw abs1 ;indirect pointer to pattern in absolute memory +0026 : 1802 dw abs1+1 +0028 : 1902 dw abs1+2 +002a : 1a02 dw abs1+3 +002c : 1b02 dw abs7f +002e : 1f01 inw1 dw abs1-$f8 ;indirect pointer for wrap-test pattern 0030 : 0302 indt dw abst ;indirect pointer to store area in absolute memory 0032 : 0402 dw abst+1 0034 : 0502 dw abst+2 0036 : 0602 dw abst+3 0038 : 0b01 inwt dw abst-$f8 ;indirect pointer for wrap-test store -003a : 3f02 indAN dw absAN ;indirect pointer to AND pattern in absolute memory -003c : 4002 dw absAN+1 -003e : 4102 dw absAN+2 -0040 : 4202 dw absAN+3 -0042 : 4302 indEO dw absEO ;indirect pointer to EOR pattern in absolute memory -0044 : 4402 dw absEO+1 -0046 : 4502 dw absEO+2 -0048 : 4602 dw absEO+3 -004a : 3b02 indOR dw absOR ;indirect pointer to OR pattern in absolute memory -004c : 3c02 dw absOR+1 -004e : 3d02 dw absOR+2 -0050 : 3e02 dw absOR+3 +003a : 4e02 indAN dw absAN ;indirect pointer to AND pattern in absolute memory +003c : 4f02 dw absAN+1 +003e : 5002 dw absAN+2 +0040 : 5102 dw absAN+3 +0042 : 5202 indEO dw absEO ;indirect pointer to EOR pattern in absolute memory +0044 : 5302 dw absEO+1 +0046 : 5402 dw absEO+2 +0048 : 5502 dw absEO+3 +004a : 4a02 indOR dw absOR ;indirect pointer to OR pattern in absolute memory +004c : 4b02 dw absOR+1 +004e : 4c02 dw absOR+2 +0050 : 4d02 dw absOR+3 ;add/subtract indirect pointers 0052 : 0302 adi2 dw ada2 ;indirect pointer to operand 2 in absolute memory 0054 : 0402 sbi2 dw sba2 ;indirect pointer to complemented operand 2 (SBC) @@ -613,38 +683,56 @@ ffff = ram_top = -1 0204 : 00 sba2 ds 1 ;operand 2 complemented for subtract 0205 : 000000 ds 3 ;fill remaining bytes 0208 : data_bss -0208 : c3824100 abs1 db $c3,$82,$41,0 ;test patterns for LDx BIT ROL ROR ASL LSR -020c : 7f abs7f db $7f ;test pattern for compare + if load_data_direct = 1 +0208 : 2900 ex_andi and #0 ;execute immediate opcodes +020a : 60 rts +020b : 4900 ex_eori eor #0 ;execute immediate opcodes +020d : 60 rts +020e : 0900 ex_orai ora #0 ;execute immediate opcodes +0210 : 60 rts +0211 : 6900 ex_adci adc #0 ;execute immediate opcodes +0213 : 60 rts +0214 : e900 ex_sbci sbc #0 ;execute immediate opcodes +0216 : 60 rts + else + ex_andi ds 3 + ex_eori ds 3 + ex_orai ds 3 + ex_adci ds 3 + ex_sbci ds 3 + endif +0217 : c3824100 abs1 db $c3,$82,$41,0 ;test patterns for LDx BIT ROL ROR ASL LSR +021b : 7f abs7f db $7f ;test pattern for compare ;loads -020d : 80800002 fLDx db fn,fn,0,fz ;expected flags for load +021c : 80800002 fLDx db fn,fn,0,fz ;expected flags for load ;shifts -0211 : rASL ;expected result ASL & ROL -carry -0211 : 86048200 rROL db $86,$04,$82,0 ; " -0215 : 87058301 rROLc db $87,$05,$83,1 ;expected result ROL +carry -0219 : rLSR ;expected result LSR & ROR -carry -0219 : 61412000 rROR db $61,$41,$20,0 ; " -021d : e1c1a080 rRORc db $e1,$c1,$a0,$80 ;expected result ROR +carry -0221 : fASL ;expected flags for shifts -0221 : 81018002 fROL db fnc,fc,fn,fz ;no carry in -0225 : 81018000 fROLc db fnc,fc,fn,0 ;carry in -0229 : fLSR -0229 : 01000102 fROR db fc,0,fc,fz ;no carry in -022d : 81808180 fRORc db fnc,fn,fnc,fn ;carry in +0220 : rASL ;expected result ASL & ROL -carry +0220 : 86048200 rROL db $86,$04,$82,0 ; " +0224 : 87058301 rROLc db $87,$05,$83,1 ;expected result ROL +carry +0228 : rLSR ;expected result LSR & ROR -carry +0228 : 61412000 rROR db $61,$41,$20,0 ; " +022c : e1c1a080 rRORc db $e1,$c1,$a0,$80 ;expected result ROR +carry +0230 : fASL ;expected flags for shifts +0230 : 81018002 fROL db fnc,fc,fn,fz ;no carry in +0234 : 81018000 fROLc db fnc,fc,fn,0 ;carry in +0238 : fLSR +0238 : 01000102 fROR db fc,0,fc,fz ;no carry in +023c : 81808180 fRORc db fnc,fn,fnc,fn ;carry in ;increments (decrements) -0231 : 7f80ff0001 rINC db $7f,$80,$ff,0,1 ;expected result for INC/DEC -0236 : 0080800200 fINC db 0,fn,fn,fz,0 ;expected flags for INC/DEC +0240 : 7f80ff0001 rINC db $7f,$80,$ff,0,1 ;expected result for INC/DEC +0245 : 0080800200 fINC db 0,fn,fn,fz,0 ;expected flags for INC/DEC ;logical memory operand -023b : 001f7180 absOR db 0,$1f,$71,$80 ;test pattern for OR -023f : 0fff7f80 absAN db $0f,$ff,$7f,$80 ;test pattern for AND -0243 : ff0f8f8f absEO db $ff,$0f,$8f,$8f ;test pattern for EOR +024a : 001f7180 absOR db 0,$1f,$71,$80 ;test pattern for OR +024e : 0fff7f80 absAN db $0f,$ff,$7f,$80 ;test pattern for AND +0252 : ff0f8f8f absEO db $ff,$0f,$8f,$8f ;test pattern for EOR ;logical accu operand -0247 : 00f11f00 absORa db 0,$f1,$1f,0 ;test pattern for OR -024b : f0ffffff absANa db $f0,$ff,$ff,$ff ;test pattern for AND -024f : fff0f00f absEOa db $ff,$f0,$f0,$0f ;test pattern for EOR +0256 : 00f11f00 absORa db 0,$f1,$1f,0 ;test pattern for OR +025a : f0ffffff absANa db $f0,$ff,$ff,$ff ;test pattern for AND +025e : fff0f00f absEOa db $ff,$f0,$f0,$0f ;test pattern for EOR ;logical results -0253 : 00ff7f80 absrlo db 0,$ff,$7f,$80 -0257 : 02800080 absflo db fz,fn,0,fn -025b : data_bss_end +0262 : 00ff7f80 absrlo db 0,$ff,$7f,$80 +0266 : 02800080 absflo db fz,fn,0,fn +026a : data_bss_end code @@ -666,6 +754,53 @@ ffff = ram_top = -1 jsr report_init endif + ;pretest small branch offset +0409 : a205 ldx #5 +040b : 4c3304 jmp psb_test +040e : psb_bwok +040e : a005 ldy #5 +0410 : d008 bne psb_forw + trap ;branch should be taken +0412 : 4c1204 > jmp * ;failed anyway + +0415 : 88 dey ;forward landing zone +0416 : 88 dey +0417 : 88 dey +0418 : 88 dey +0419 : 88 dey +041a : psb_forw +041a : 88 dey +041b : 88 dey +041c : 88 dey +041d : 88 dey +041e : 88 dey +041f : f017 beq psb_fwok + trap ;forward offset +0421 : 4c2104 > jmp * ;failed anyway + + +0424 : ca dex ;backward landing zone +0425 : ca dex +0426 : ca dex +0427 : ca dex +0428 : ca dex +0429 : psb_back +0429 : ca dex +042a : ca dex +042b : ca dex +042c : ca dex +042d : ca dex +042e : f0de beq psb_bwok + trap ;backward offset +0430 : 4c3004 > jmp * ;failed anyway + +0433 : psb_test +0433 : d0f4 bne psb_back + trap ;branch should be taken +0435 : 4c3504 > jmp * ;failed anyway + +0438 : psb_fwok + ;initialize BSS segment if load_data_direct != 1 ldx #zp_end-zp_init-1 @@ -702,17 +837,9 @@ ffff = ram_top = -1 lda #0 sta zpt ;set low byte of indirect pointer sta ram_chksm+1 ;checksum high byte + if disable_selfmod = 0 sta range_adr ;reset self modifying code - sta tandi1 - sta tandi2 - sta teori1 - sta teori2 - sta torai1 - sta torai2 - sta chkdadi - sta chkdsbi - sta chkadi - sta chksbi + endif clc ldx #zp_bss-zero_page ;zeropage - write test area gcs3 adc zero_page,x @@ -721,9 +848,9 @@ ffff = ram_top = -1 clc gcs2 inx bne gcs3 - ldx #hi(data_segment) ;set high byte of indirect pointer + ldx #hi(abs1) ;set high byte of indirect pointer stx zpt+1 - ldy #lo(data_bss) ;data after write test area + ldy #lo(abs1) ;data after write & execute test area gcs5 adc (zpt),y bcc gcs4 inc ram_chksm+1 ;carry to high byte @@ -737,104 +864,58 @@ ffff = ram_top = -1 sta ram_chksm ;checksum complete endif next_test -0409 : ad0002 > lda test_case ;previous test -040c : c900 > cmp #test_num +0438 : ad0002 > lda test_case ;previous test +043b : c900 > cmp #test_num > trap_ne ;test is out of sequence -040e : d0fe > bne * ;failed not equal (non zero) +043d : d0fe > bne * ;failed not equal (non zero) > 0001 = >test_num = test_num + 1 -0410 : a901 > lda #test_num ;*** next tests' number -0412 : 8d0002 > sta test_case +043f : a901 > lda #test_num ;*** next tests' number +0441 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test + if disable_selfmod = 0 ;testing relative addressing with BEQ -0415 : a0fe ldy #$fe ;testing maximum range, not -1/-2 (invalid/self adr) -0417 : range_loop -0417 : 88 dey ;next relative address -0418 : 98 tya -0419 : aa tax ;precharge count to end of loop -041a : 1003 bpl range_fw ;calculate relative address -041c : 18 clc ;avoid branch self or to relative address of branch -041d : 6902 adc #2 -041f : range_fw -041f : 497f eor #$7f ;complement except sign -0421 : 8da804 sta range_adr ;load into test target -0424 : a900 lda #0 ;should set zero flag in status register -0426 : 4ca704 jmp range_op +0444 : a0fe ldy #$fe ;testing maximum range, not -1/-2 (invalid/self adr) +0446 : range_loop +0446 : 88 dey ;next relative address +0447 : 98 tya +0448 : aa tax ;precharge count to end of loop +0449 : 1008 bpl range_fw ;calculate relative address +044b : 18 clc ;avoid branch self or to relative address of branch +044c : 6902 adc #2 +044e : ea nop ;offset landing zone - tolerate +/-5 offset to branch +044f : ea nop +0450 : ea nop +0451 : ea nop +0452 : ea nop +0453 : range_fw +0453 : ea nop +0454 : ea nop +0455 : ea nop +0456 : ea nop +0457 : ea nop +0458 : 497f eor #$7f ;complement except sign +045a : 8de604 sta range_adr ;load into test target +045d : a900 lda #0 ;should set zero flag in status register +045f : 4ce504 jmp range_op - ;relative address target field with branch under test in the middle -0429 : ca dex ;-128 - max backward -042a : ca dex -042b : ca dex -042c : ca dex -042d : ca dex -042e : ca dex -042f : ca dex -0430 : ca dex -0431 : ca dex ;-120 -0432 : ca dex -0433 : ca dex -0434 : ca dex -0435 : ca dex -0436 : ca dex -0437 : ca dex -0438 : ca dex -0439 : ca dex -043a : ca dex -043b : ca dex ;-110 -043c : ca dex -043d : ca dex -043e : ca dex -043f : ca dex -0440 : ca dex -0441 : ca dex -0442 : ca dex -0443 : ca dex -0444 : ca dex -0445 : ca dex ;-100 -0446 : ca dex -0447 : ca dex -0448 : ca dex -0449 : ca dex -044a : ca dex -044b : ca dex -044c : ca dex -044d : ca dex -044e : ca dex -044f : ca dex ;-90 -0450 : ca dex -0451 : ca dex -0452 : ca dex -0453 : ca dex -0454 : ca dex -0455 : ca dex -0456 : ca dex -0457 : ca dex -0458 : ca dex -0459 : ca dex ;-80 -045a : ca dex -045b : ca dex -045c : ca dex -045d : ca dex -045e : ca dex -045f : ca dex -0460 : ca dex -0461 : ca dex -0462 : ca dex -0463 : ca dex ;-70 +0462 : ca dex ; offset landing zone - backward branch too far +0463 : ca dex 0464 : ca dex 0465 : ca dex 0466 : ca dex -0467 : ca dex + ;relative address target field with branch under test in the middle +0467 : ca dex ;-128 - max backward 0468 : ca dex 0469 : ca dex 046a : ca dex 046b : ca dex 046c : ca dex -046d : ca dex ;-60 +046d : ca dex 046e : ca dex -046f : ca dex +046f : ca dex ;-120 0470 : ca dex 0471 : ca dex 0472 : ca dex @@ -842,9 +923,9 @@ ffff = ram_top = -1 0474 : ca dex 0475 : ca dex 0476 : ca dex -0477 : ca dex ;-50 +0477 : ca dex 0478 : ca dex -0479 : ca dex +0479 : ca dex ;-110 047a : ca dex 047b : ca dex 047c : ca dex @@ -852,9 +933,9 @@ ffff = ram_top = -1 047e : ca dex 047f : ca dex 0480 : ca dex -0481 : ca dex ;-40 +0481 : ca dex 0482 : ca dex -0483 : ca dex +0483 : ca dex ;-100 0484 : ca dex 0485 : ca dex 0486 : ca dex @@ -862,9 +943,9 @@ ffff = ram_top = -1 0488 : ca dex 0489 : ca dex 048a : ca dex -048b : ca dex ;-30 +048b : ca dex 048c : ca dex -048d : ca dex +048d : ca dex ;-90 048e : ca dex 048f : ca dex 0490 : ca dex @@ -872,9 +953,9 @@ ffff = ram_top = -1 0492 : ca dex 0493 : ca dex 0494 : ca dex -0495 : ca dex ;-20 +0495 : ca dex 0496 : ca dex -0497 : ca dex +0497 : ca dex ;-80 0498 : ca dex 0499 : ca dex 049a : ca dex @@ -882,20 +963,19 @@ ffff = ram_top = -1 049c : ca dex 049d : ca dex 049e : ca dex -049f : ca dex ;-10 +049f : ca dex 04a0 : ca dex -04a1 : ca dex +04a1 : ca dex ;-70 04a2 : ca dex 04a3 : ca dex 04a4 : ca dex 04a5 : ca dex -04a6 : ca dex ;-3 -04a7 : range_op ;test target with zero flag=0, z=1 if previous dex -04a8 = range_adr = *+1 ;modifiable relative address -04a7 : f03e beq *+64 ;if called without modification -04a9 : ca dex ;+0 +04a6 : ca dex +04a7 : ca dex +04a8 : ca dex +04a9 : ca dex 04aa : ca dex -04ab : ca dex +04ab : ca dex ;-60 04ac : ca dex 04ad : ca dex 04ae : ca dex @@ -903,9 +983,9 @@ ffff = ram_top = -1 04b0 : ca dex 04b1 : ca dex 04b2 : ca dex -04b3 : ca dex ;+10 +04b3 : ca dex 04b4 : ca dex -04b5 : ca dex +04b5 : ca dex ;-50 04b6 : ca dex 04b7 : ca dex 04b8 : ca dex @@ -913,9 +993,9 @@ ffff = ram_top = -1 04ba : ca dex 04bb : ca dex 04bc : ca dex -04bd : ca dex ;+20 +04bd : ca dex 04be : ca dex -04bf : ca dex +04bf : ca dex ;-40 04c0 : ca dex 04c1 : ca dex 04c2 : ca dex @@ -923,9 +1003,9 @@ ffff = ram_top = -1 04c4 : ca dex 04c5 : ca dex 04c6 : ca dex -04c7 : ca dex ;+30 +04c7 : ca dex 04c8 : ca dex -04c9 : ca dex +04c9 : ca dex ;-30 04ca : ca dex 04cb : ca dex 04cc : ca dex @@ -933,9 +1013,9 @@ ffff = ram_top = -1 04ce : ca dex 04cf : ca dex 04d0 : ca dex -04d1 : ca dex ;+40 +04d1 : ca dex 04d2 : ca dex -04d3 : ca dex +04d3 : ca dex ;-20 04d4 : ca dex 04d5 : ca dex 04d6 : ca dex @@ -943,19 +1023,20 @@ ffff = ram_top = -1 04d8 : ca dex 04d9 : ca dex 04da : ca dex -04db : ca dex ;+50 +04db : ca dex 04dc : ca dex -04dd : ca dex +04dd : ca dex ;-10 04de : ca dex 04df : ca dex 04e0 : ca dex 04e1 : ca dex 04e2 : ca dex 04e3 : ca dex -04e4 : ca dex -04e5 : ca dex ;+60 -04e6 : ca dex -04e7 : ca dex +04e4 : ca dex ;-3 +04e5 : range_op ;test target with zero flag=0, z=1 if previous dex +04e6 = range_adr = *+1 ;modifiable relative address +04e5 : f03e beq *+64 ;+64 if called without modification +04e7 : ca dex ;+0 04e8 : ca dex 04e9 : ca dex 04ea : ca dex @@ -963,9 +1044,9 @@ ffff = ram_top = -1 04ec : ca dex 04ed : ca dex 04ee : ca dex -04ef : ca dex ;+70 +04ef : ca dex 04f0 : ca dex -04f1 : ca dex +04f1 : ca dex ;+10 04f2 : ca dex 04f3 : ca dex 04f4 : ca dex @@ -973,9 +1054,9 @@ ffff = ram_top = -1 04f6 : ca dex 04f7 : ca dex 04f8 : ca dex -04f9 : ca dex ;+80 +04f9 : ca dex 04fa : ca dex -04fb : ca dex +04fb : ca dex ;+20 04fc : ca dex 04fd : ca dex 04fe : ca dex @@ -983,9 +1064,9 @@ ffff = ram_top = -1 0500 : ca dex 0501 : ca dex 0502 : ca dex -0503 : ca dex ;+90 +0503 : ca dex 0504 : ca dex -0505 : ca dex +0505 : ca dex ;+30 0506 : ca dex 0507 : ca dex 0508 : ca dex @@ -993,9 +1074,9 @@ ffff = ram_top = -1 050a : ca dex 050b : ca dex 050c : ca dex -050d : ca dex ;+100 +050d : ca dex 050e : ca dex -050f : ca dex +050f : ca dex ;+40 0510 : ca dex 0511 : ca dex 0512 : ca dex @@ -1003,9 +1084,9 @@ ffff = ram_top = -1 0514 : ca dex 0515 : ca dex 0516 : ca dex -0517 : ca dex ;+110 +0517 : ca dex 0518 : ca dex -0519 : ca dex +0519 : ca dex ;+50 051a : ca dex 051b : ca dex 051c : ca dex @@ -1013,1764 +1094,1745 @@ ffff = ram_top = -1 051e : ca dex 051f : ca dex 0520 : ca dex -0521 : ca dex ;+120 +0521 : ca dex 0522 : ca dex -0523 : ca dex +0523 : ca dex ;+60 0524 : ca dex 0525 : ca dex 0526 : ca dex 0527 : ca dex -0528 : f003 beq range_ok ;+127 - max forward +0528 : ca dex +0529 : ca dex +052a : ca dex +052b : ca dex +052c : ca dex +052d : ca dex ;+70 +052e : ca dex +052f : ca dex +0530 : ca dex +0531 : ca dex +0532 : ca dex +0533 : ca dex +0534 : ca dex +0535 : ca dex +0536 : ca dex +0537 : ca dex ;+80 +0538 : ca dex +0539 : ca dex +053a : ca dex +053b : ca dex +053c : ca dex +053d : ca dex +053e : ca dex +053f : ca dex +0540 : ca dex +0541 : ca dex ;+90 +0542 : ca dex +0543 : ca dex +0544 : ca dex +0545 : ca dex +0546 : ca dex +0547 : ca dex +0548 : ca dex +0549 : ca dex +054a : ca dex +054b : ca dex ;+100 +054c : ca dex +054d : ca dex +054e : ca dex +054f : ca dex +0550 : ca dex +0551 : ca dex +0552 : ca dex +0553 : ca dex +0554 : ca dex +0555 : ca dex ;+110 +0556 : ca dex +0557 : ca dex +0558 : ca dex +0559 : ca dex +055a : ca dex +055b : ca dex +055c : ca dex +055d : ca dex +055e : ca dex +055f : ca dex ;+120 +0560 : ca dex +0561 : ca dex +0562 : ca dex +0563 : ca dex +0564 : ca dex +0565 : ca dex +0566 : ea nop ;offset landing zone - forward branch too far +0567 : ea nop +0568 : ea nop +0569 : ea nop +056a : ea nop +056b : f008 beq range_ok ;+127 - max forward trap ; bad range -052a : 4c2a05 > jmp * ;failed anyway +056d : 4c6d05 > jmp * ;failed anyway -052d : range_ok -052d : c000 cpy #0 -052f : f003 beq range_end -0531 : 4c1704 jmp range_loop -0534 : range_end ;range test successful +0570 : ea nop ;offset landing zone - tolerate +/-5 offset to branch +0571 : ea nop +0572 : ea nop +0573 : ea nop +0574 : ea nop +0575 : range_ok +0575 : ea nop +0576 : ea nop +0577 : ea nop +0578 : ea nop +0579 : ea nop +057a : c000 cpy #0 +057c : f003 beq range_end +057e : 4c4604 jmp range_loop +0581 : range_end ;range test successful + endif next_test -0534 : ad0002 > lda test_case ;previous test -0537 : c901 > cmp #test_num +0581 : ad0002 > lda test_case ;previous test +0584 : c901 > cmp #test_num > trap_ne ;test is out of sequence -0539 : d0fe > bne * ;failed not equal (non zero) +0586 : d0fe > bne * ;failed not equal (non zero) > 0002 = >test_num = test_num + 1 -053b : a902 > lda #test_num ;*** next tests' number -053d : 8d0002 > sta test_case +0588 : a902 > lda #test_num ;*** next tests' number +058a : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ;partial test BNE & CMP, CPX, CPY immediate -0540 : c001 cpy #1 ;testing BNE true -0542 : d003 bne test_bne +058d : c001 cpy #1 ;testing BNE true +058f : d003 bne test_bne trap -0544 : 4c4405 > jmp * ;failed anyway +0591 : 4c9105 > jmp * ;failed anyway -0547 : test_bne -0547 : a900 lda #0 -0549 : c900 cmp #0 ;test compare immediate +0594 : test_bne +0594 : a900 lda #0 +0596 : c900 cmp #0 ;test compare immediate trap_ne -054b : d0fe > bne * ;failed not equal (non zero) +0598 : d0fe > bne * ;failed not equal (non zero) trap_cc -054d : 90fe > bcc * ;failed carry clear +059a : 90fe > bcc * ;failed carry clear trap_mi -054f : 30fe > bmi * ;failed minus (bit 7 set) +059c : 30fe > bmi * ;failed minus (bit 7 set) -0551 : c901 cmp #1 +059e : c901 cmp #1 trap_eq -0553 : f0fe > beq * ;failed equal (zero) +05a0 : f0fe > beq * ;failed equal (zero) trap_cs -0555 : b0fe > bcs * ;failed carry set +05a2 : b0fe > bcs * ;failed carry set trap_pl -0557 : 10fe > bpl * ;failed plus (bit 7 clear) +05a4 : 10fe > bpl * ;failed plus (bit 7 clear) -0559 : aa tax -055a : e000 cpx #0 ;test compare x immediate +05a6 : aa tax +05a7 : e000 cpx #0 ;test compare x immediate trap_ne -055c : d0fe > bne * ;failed not equal (non zero) +05a9 : d0fe > bne * ;failed not equal (non zero) trap_cc -055e : 90fe > bcc * ;failed carry clear +05ab : 90fe > bcc * ;failed carry clear trap_mi -0560 : 30fe > bmi * ;failed minus (bit 7 set) +05ad : 30fe > bmi * ;failed minus (bit 7 set) -0562 : e001 cpx #1 +05af : e001 cpx #1 trap_eq -0564 : f0fe > beq * ;failed equal (zero) +05b1 : f0fe > beq * ;failed equal (zero) trap_cs -0566 : b0fe > bcs * ;failed carry set +05b3 : b0fe > bcs * ;failed carry set trap_pl -0568 : 10fe > bpl * ;failed plus (bit 7 clear) +05b5 : 10fe > bpl * ;failed plus (bit 7 clear) -056a : a8 tay -056b : c000 cpy #0 ;test compare y immediate +05b7 : a8 tay +05b8 : c000 cpy #0 ;test compare y immediate trap_ne -056d : d0fe > bne * ;failed not equal (non zero) +05ba : d0fe > bne * ;failed not equal (non zero) trap_cc -056f : 90fe > bcc * ;failed carry clear +05bc : 90fe > bcc * ;failed carry clear trap_mi -0571 : 30fe > bmi * ;failed minus (bit 7 set) +05be : 30fe > bmi * ;failed minus (bit 7 set) -0573 : c001 cpy #1 +05c0 : c001 cpy #1 trap_eq -0575 : f0fe > beq * ;failed equal (zero) +05c2 : f0fe > beq * ;failed equal (zero) trap_cs -0577 : b0fe > bcs * ;failed carry set +05c4 : b0fe > bcs * ;failed carry set trap_pl -0579 : 10fe > bpl * ;failed plus (bit 7 clear) +05c6 : 10fe > bpl * ;failed plus (bit 7 clear) next_test -057b : ad0002 > lda test_case ;previous test -057e : c902 > cmp #test_num +05c8 : ad0002 > lda test_case ;previous test +05cb : c902 > cmp #test_num > trap_ne ;test is out of sequence -0580 : d0fe > bne * ;failed not equal (non zero) +05cd : d0fe > bne * ;failed not equal (non zero) > 0003 = >test_num = test_num + 1 -0582 : a903 > lda #test_num ;*** next tests' number -0584 : 8d0002 > sta test_case +05cf : a903 > lda #test_num ;*** next tests' number +05d1 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ;testing stack operations PHA PHP PLA PLP -0587 : a2ff ldx #$ff ;initialize stack -0589 : 9a txs -058a : a955 lda #$55 -058c : 48 pha -058d : a9aa lda #$aa -058f : 48 pha -0590 : cdfe01 cmp $1fe ;on stack ? +05d4 : a2ff ldx #$ff ;initialize stack +05d6 : 9a txs +05d7 : a955 lda #$55 +05d9 : 48 pha +05da : a9aa lda #$aa +05dc : 48 pha +05dd : cdfe01 cmp $1fe ;on stack ? trap_ne -0593 : d0fe > bne * ;failed not equal (non zero) +05e0 : d0fe > bne * ;failed not equal (non zero) -0595 : ba tsx -0596 : 8a txa ;overwrite accu -0597 : c9fd cmp #$fd ;sp decremented? +05e2 : ba tsx +05e3 : 8a txa ;overwrite accu +05e4 : c9fd cmp #$fd ;sp decremented? trap_ne -0599 : d0fe > bne * ;failed not equal (non zero) +05e6 : d0fe > bne * ;failed not equal (non zero) -059b : 68 pla -059c : c9aa cmp #$aa ;successful retreived from stack? +05e8 : 68 pla +05e9 : c9aa cmp #$aa ;successful retreived from stack? trap_ne -059e : d0fe > bne * ;failed not equal (non zero) +05eb : d0fe > bne * ;failed not equal (non zero) -05a0 : 68 pla -05a1 : c955 cmp #$55 +05ed : 68 pla +05ee : c955 cmp #$55 trap_ne -05a3 : d0fe > bne * ;failed not equal (non zero) +05f0 : d0fe > bne * ;failed not equal (non zero) -05a5 : cdff01 cmp $1ff ;remains on stack? +05f2 : cdff01 cmp $1ff ;remains on stack? trap_ne -05a8 : d0fe > bne * ;failed not equal (non zero) +05f5 : d0fe > bne * ;failed not equal (non zero) -05aa : ba tsx -05ab : e0ff cpx #$ff ;sp incremented? +05f7 : ba tsx +05f8 : e0ff cpx #$ff ;sp incremented? trap_ne -05ad : d0fe > bne * ;failed not equal (non zero) +05fa : d0fe > bne * ;failed not equal (non zero) next_test -05af : ad0002 > lda test_case ;previous test -05b2 : c903 > cmp #test_num +05fc : ad0002 > lda test_case ;previous test +05ff : c903 > cmp #test_num > trap_ne ;test is out of sequence -05b4 : d0fe > bne * ;failed not equal (non zero) +0601 : d0fe > bne * ;failed not equal (non zero) > 0004 = >test_num = test_num + 1 -05b6 : a904 > lda #test_num ;*** next tests' number -05b8 : 8d0002 > sta test_case +0603 : a904 > lda #test_num ;*** next tests' number +0605 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ;testing branch decisions BPL BMI BVC BVS BCC BCS BNE BEQ set_stat $ff ;all on > load_flag $ff -05bb : a9ff > lda #$ff ;allow test to change I-flag (no mask) +0608 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -05bd : 48 > pha ;use stack to load status -05be : 28 > plp +060a : 48 > pha ;use stack to load status +060b : 28 > plp -05bf : 101a bpl nbr1 ;branches should not be taken -05c1 : 501b bvc nbr2 -05c3 : 901c bcc nbr3 -05c5 : d01d bne nbr4 -05c7 : 3003 bmi br1 ;branches should be taken +060c : 101a bpl nbr1 ;branches should not be taken +060e : 501b bvc nbr2 +0610 : 901c bcc nbr3 +0612 : d01d bne nbr4 +0614 : 3003 bmi br1 ;branches should be taken trap -05c9 : 4cc905 > jmp * ;failed anyway +0616 : 4c1606 > jmp * ;failed anyway -05cc : 7003 br1 bvs br2 +0619 : 7003 br1 bvs br2 trap -05ce : 4cce05 > jmp * ;failed anyway +061b : 4c1b06 > jmp * ;failed anyway -05d1 : b003 br2 bcs br3 +061e : b003 br2 bcs br3 trap -05d3 : 4cd305 > jmp * ;failed anyway +0620 : 4c2006 > jmp * ;failed anyway -05d6 : f00f br3 beq br4 +0623 : f00f br3 beq br4 trap -05d8 : 4cd805 > jmp * ;failed anyway +0625 : 4c2506 > jmp * ;failed anyway -05db : nbr1 +0628 : nbr1 trap ;previous bpl taken -05db : 4cdb05 > jmp * ;failed anyway +0628 : 4c2806 > jmp * ;failed anyway -05de : nbr2 +062b : nbr2 trap ;previous bvc taken -05de : 4cde05 > jmp * ;failed anyway +062b : 4c2b06 > jmp * ;failed anyway -05e1 : nbr3 +062e : nbr3 trap ;previous bcc taken -05e1 : 4ce105 > jmp * ;failed anyway +062e : 4c2e06 > jmp * ;failed anyway -05e4 : nbr4 +0631 : nbr4 trap ;previous bne taken -05e4 : 4ce405 > jmp * ;failed anyway +0631 : 4c3106 > jmp * ;failed anyway -05e7 : 08 br4 php -05e8 : ba tsx -05e9 : e0fe cpx #$fe ;sp after php? +0634 : 08 br4 php +0635 : ba tsx +0636 : e0fe cpx #$fe ;sp after php? trap_ne -05eb : d0fe > bne * ;failed not equal (non zero) +0638 : d0fe > bne * ;failed not equal (non zero) -05ed : 68 pla +063a : 68 pla cmp_flag $ff ;returned all flags on? -05ee : c9ff > cmp #($ff |fao)&m8 ;expected flags + always on bits +063b : c9ff > cmp #($ff |fao)&m8 ;expected flags + always on bits trap_ne -05f0 : d0fe > bne * ;failed not equal (non zero) +063d : d0fe > bne * ;failed not equal (non zero) -05f2 : ba tsx -05f3 : e0ff cpx #$ff ;sp after php? +063f : ba tsx +0640 : e0ff cpx #$ff ;sp after php? trap_ne -05f5 : d0fe > bne * ;failed not equal (non zero) +0642 : d0fe > bne * ;failed not equal (non zero) set_stat 0 ;all off > load_flag 0 -05f7 : a900 > lda #0 ;allow test to change I-flag (no mask) +0644 : a900 > lda #0 ;allow test to change I-flag (no mask) > -05f9 : 48 > pha ;use stack to load status -05fa : 28 > plp +0646 : 48 > pha ;use stack to load status +0647 : 28 > plp -05fb : 301a bmi nbr11 ;branches should not be taken -05fd : 701b bvs nbr12 -05ff : b01c bcs nbr13 -0601 : f01d beq nbr14 -0603 : 1003 bpl br11 ;branches should be taken +0648 : 301a bmi nbr11 ;branches should not be taken +064a : 701b bvs nbr12 +064c : b01c bcs nbr13 +064e : f01d beq nbr14 +0650 : 1003 bpl br11 ;branches should be taken trap -0605 : 4c0506 > jmp * ;failed anyway +0652 : 4c5206 > jmp * ;failed anyway -0608 : 5003 br11 bvc br12 +0655 : 5003 br11 bvc br12 trap -060a : 4c0a06 > jmp * ;failed anyway +0657 : 4c5706 > jmp * ;failed anyway -060d : 9003 br12 bcc br13 +065a : 9003 br12 bcc br13 trap -060f : 4c0f06 > jmp * ;failed anyway +065c : 4c5c06 > jmp * ;failed anyway -0612 : d00f br13 bne br14 +065f : d00f br13 bne br14 trap -0614 : 4c1406 > jmp * ;failed anyway +0661 : 4c6106 > jmp * ;failed anyway -0617 : nbr11 +0664 : nbr11 trap ;previous bmi taken -0617 : 4c1706 > jmp * ;failed anyway +0664 : 4c6406 > jmp * ;failed anyway -061a : nbr12 +0667 : nbr12 trap ;previous bvs taken -061a : 4c1a06 > jmp * ;failed anyway +0667 : 4c6706 > jmp * ;failed anyway -061d : nbr13 +066a : nbr13 trap ;previous bcs taken -061d : 4c1d06 > jmp * ;failed anyway +066a : 4c6a06 > jmp * ;failed anyway -0620 : nbr14 +066d : nbr14 trap ;previous beq taken -0620 : 4c2006 > jmp * ;failed anyway +066d : 4c6d06 > jmp * ;failed anyway -0623 : 08 br14 php -0624 : 68 pla +0670 : 08 br14 php +0671 : 68 pla cmp_flag 0 ;flags off except break (pushed by sw) + reserved? -0625 : c930 > cmp #(0 |fao)&m8 ;expected flags + always on bits +0672 : c930 > cmp #(0 |fao)&m8 ;expected flags + always on bits trap_ne -0627 : d0fe > bne * ;failed not equal (non zero) +0674 : d0fe > bne * ;failed not equal (non zero) ;crosscheck flags set_stat zero > load_flag zero -0629 : a902 > lda #zero ;allow test to change I-flag (no mask) +0676 : a902 > lda #zero ;allow test to change I-flag (no mask) > -062b : 48 > pha ;use stack to load status -062c : 28 > plp +0678 : 48 > pha ;use stack to load status +0679 : 28 > plp -062d : d002 bne brzs1 -062f : f003 beq brzs2 -0631 : brzs1 +067a : d002 bne brzs1 +067c : f003 beq brzs2 +067e : brzs1 trap ;branch zero/non zero -0631 : 4c3106 > jmp * ;failed anyway +067e : 4c7e06 > jmp * ;failed anyway -0634 : b002 brzs2 bcs brzs3 -0636 : 9003 bcc brzs4 -0638 : brzs3 +0681 : b002 brzs2 bcs brzs3 +0683 : 9003 bcc brzs4 +0685 : brzs3 trap ;branch carry/no carry -0638 : 4c3806 > jmp * ;failed anyway +0685 : 4c8506 > jmp * ;failed anyway -063b : 3002 brzs4 bmi brzs5 -063d : 1003 bpl brzs6 -063f : brzs5 +0688 : 3002 brzs4 bmi brzs5 +068a : 1003 bpl brzs6 +068c : brzs5 trap ;branch minus/plus -063f : 4c3f06 > jmp * ;failed anyway +068c : 4c8c06 > jmp * ;failed anyway -0642 : 7002 brzs6 bvs brzs7 -0644 : 5003 bvc brzs8 -0646 : brzs7 +068f : 7002 brzs6 bvs brzs7 +0691 : 5003 bvc brzs8 +0693 : brzs7 trap ;branch overflow/no overflow -0646 : 4c4606 > jmp * ;failed anyway +0693 : 4c9306 > jmp * ;failed anyway -0649 : brzs8 +0696 : brzs8 set_stat carry > load_flag carry -0649 : a901 > lda #carry ;allow test to change I-flag (no mask) +0696 : a901 > lda #carry ;allow test to change I-flag (no mask) > -064b : 48 > pha ;use stack to load status -064c : 28 > plp +0698 : 48 > pha ;use stack to load status +0699 : 28 > plp -064d : f002 beq brcs1 -064f : d003 bne brcs2 -0651 : brcs1 +069a : f002 beq brcs1 +069c : d003 bne brcs2 +069e : brcs1 trap ;branch zero/non zero -0651 : 4c5106 > jmp * ;failed anyway +069e : 4c9e06 > jmp * ;failed anyway -0654 : 9002 brcs2 bcc brcs3 -0656 : b003 bcs brcs4 -0658 : brcs3 +06a1 : 9002 brcs2 bcc brcs3 +06a3 : b003 bcs brcs4 +06a5 : brcs3 trap ;branch carry/no carry -0658 : 4c5806 > jmp * ;failed anyway +06a5 : 4ca506 > jmp * ;failed anyway -065b : 3002 brcs4 bmi brcs5 -065d : 1003 bpl brcs6 -065f : brcs5 +06a8 : 3002 brcs4 bmi brcs5 +06aa : 1003 bpl brcs6 +06ac : brcs5 trap ;branch minus/plus -065f : 4c5f06 > jmp * ;failed anyway +06ac : 4cac06 > jmp * ;failed anyway -0662 : 7002 brcs6 bvs brcs7 -0664 : 5003 bvc brcs8 -0666 : brcs7 +06af : 7002 brcs6 bvs brcs7 +06b1 : 5003 bvc brcs8 +06b3 : brcs7 trap ;branch overflow/no overflow -0666 : 4c6606 > jmp * ;failed anyway +06b3 : 4cb306 > jmp * ;failed anyway -0669 : brcs8 +06b6 : brcs8 set_stat minus > load_flag minus -0669 : a980 > lda #minus ;allow test to change I-flag (no mask) +06b6 : a980 > lda #minus ;allow test to change I-flag (no mask) > -066b : 48 > pha ;use stack to load status -066c : 28 > plp +06b8 : 48 > pha ;use stack to load status +06b9 : 28 > plp -066d : f002 beq brmi1 -066f : d003 bne brmi2 -0671 : brmi1 +06ba : f002 beq brmi1 +06bc : d003 bne brmi2 +06be : brmi1 trap ;branch zero/non zero -0671 : 4c7106 > jmp * ;failed anyway +06be : 4cbe06 > jmp * ;failed anyway -0674 : b002 brmi2 bcs brmi3 -0676 : 9003 bcc brmi4 -0678 : brmi3 +06c1 : b002 brmi2 bcs brmi3 +06c3 : 9003 bcc brmi4 +06c5 : brmi3 trap ;branch carry/no carry -0678 : 4c7806 > jmp * ;failed anyway +06c5 : 4cc506 > jmp * ;failed anyway -067b : 1002 brmi4 bpl brmi5 -067d : 3003 bmi brmi6 -067f : brmi5 +06c8 : 1002 brmi4 bpl brmi5 +06ca : 3003 bmi brmi6 +06cc : brmi5 trap ;branch minus/plus -067f : 4c7f06 > jmp * ;failed anyway +06cc : 4ccc06 > jmp * ;failed anyway -0682 : 7002 brmi6 bvs brmi7 -0684 : 5003 bvc brmi8 -0686 : brmi7 +06cf : 7002 brmi6 bvs brmi7 +06d1 : 5003 bvc brmi8 +06d3 : brmi7 trap ;branch overflow/no overflow -0686 : 4c8606 > jmp * ;failed anyway +06d3 : 4cd306 > jmp * ;failed anyway -0689 : brmi8 +06d6 : brmi8 set_stat overfl > load_flag overfl -0689 : a940 > lda #overfl ;allow test to change I-flag (no mask) +06d6 : a940 > lda #overfl ;allow test to change I-flag (no mask) > -068b : 48 > pha ;use stack to load status -068c : 28 > plp +06d8 : 48 > pha ;use stack to load status +06d9 : 28 > plp -068d : f002 beq brvs1 -068f : d003 bne brvs2 -0691 : brvs1 +06da : f002 beq brvs1 +06dc : d003 bne brvs2 +06de : brvs1 trap ;branch zero/non zero -0691 : 4c9106 > jmp * ;failed anyway +06de : 4cde06 > jmp * ;failed anyway -0694 : b002 brvs2 bcs brvs3 -0696 : 9003 bcc brvs4 -0698 : brvs3 +06e1 : b002 brvs2 bcs brvs3 +06e3 : 9003 bcc brvs4 +06e5 : brvs3 trap ;branch carry/no carry -0698 : 4c9806 > jmp * ;failed anyway +06e5 : 4ce506 > jmp * ;failed anyway -069b : 3002 brvs4 bmi brvs5 -069d : 1003 bpl brvs6 -069f : brvs5 +06e8 : 3002 brvs4 bmi brvs5 +06ea : 1003 bpl brvs6 +06ec : brvs5 trap ;branch minus/plus -069f : 4c9f06 > jmp * ;failed anyway +06ec : 4cec06 > jmp * ;failed anyway -06a2 : 5002 brvs6 bvc brvs7 -06a4 : 7003 bvs brvs8 -06a6 : brvs7 +06ef : 5002 brvs6 bvc brvs7 +06f1 : 7003 bvs brvs8 +06f3 : brvs7 trap ;branch overflow/no overflow -06a6 : 4ca606 > jmp * ;failed anyway +06f3 : 4cf306 > jmp * ;failed anyway -06a9 : brvs8 +06f6 : brvs8 set_stat $ff-zero > load_flag $ff-zero -06a9 : a9fd > lda #$ff-zero ;allow test to change I-flag (no mask) +06f6 : a9fd > lda #$ff-zero ;allow test to change I-flag (no mask) > -06ab : 48 > pha ;use stack to load status -06ac : 28 > plp +06f8 : 48 > pha ;use stack to load status +06f9 : 28 > plp -06ad : f002 beq brzc1 -06af : d003 bne brzc2 -06b1 : brzc1 +06fa : f002 beq brzc1 +06fc : d003 bne brzc2 +06fe : brzc1 trap ;branch zero/non zero -06b1 : 4cb106 > jmp * ;failed anyway +06fe : 4cfe06 > jmp * ;failed anyway -06b4 : 9002 brzc2 bcc brzc3 -06b6 : b003 bcs brzc4 -06b8 : brzc3 +0701 : 9002 brzc2 bcc brzc3 +0703 : b003 bcs brzc4 +0705 : brzc3 trap ;branch carry/no carry -06b8 : 4cb806 > jmp * ;failed anyway +0705 : 4c0507 > jmp * ;failed anyway -06bb : 1002 brzc4 bpl brzc5 -06bd : 3003 bmi brzc6 -06bf : brzc5 +0708 : 1002 brzc4 bpl brzc5 +070a : 3003 bmi brzc6 +070c : brzc5 trap ;branch minus/plus -06bf : 4cbf06 > jmp * ;failed anyway +070c : 4c0c07 > jmp * ;failed anyway -06c2 : 5002 brzc6 bvc brzc7 -06c4 : 7003 bvs brzc8 -06c6 : brzc7 +070f : 5002 brzc6 bvc brzc7 +0711 : 7003 bvs brzc8 +0713 : brzc7 trap ;branch overflow/no overflow -06c6 : 4cc606 > jmp * ;failed anyway +0713 : 4c1307 > jmp * ;failed anyway -06c9 : brzc8 +0716 : brzc8 set_stat $ff-carry > load_flag $ff-carry -06c9 : a9fe > lda #$ff-carry ;allow test to change I-flag (no mask) +0716 : a9fe > lda #$ff-carry ;allow test to change I-flag (no mask) > -06cb : 48 > pha ;use stack to load status -06cc : 28 > plp +0718 : 48 > pha ;use stack to load status +0719 : 28 > plp -06cd : d002 bne brcc1 -06cf : f003 beq brcc2 -06d1 : brcc1 +071a : d002 bne brcc1 +071c : f003 beq brcc2 +071e : brcc1 trap ;branch zero/non zero -06d1 : 4cd106 > jmp * ;failed anyway +071e : 4c1e07 > jmp * ;failed anyway -06d4 : b002 brcc2 bcs brcc3 -06d6 : 9003 bcc brcc4 -06d8 : brcc3 +0721 : b002 brcc2 bcs brcc3 +0723 : 9003 bcc brcc4 +0725 : brcc3 trap ;branch carry/no carry -06d8 : 4cd806 > jmp * ;failed anyway +0725 : 4c2507 > jmp * ;failed anyway -06db : 1002 brcc4 bpl brcc5 -06dd : 3003 bmi brcc6 -06df : brcc5 +0728 : 1002 brcc4 bpl brcc5 +072a : 3003 bmi brcc6 +072c : brcc5 trap ;branch minus/plus -06df : 4cdf06 > jmp * ;failed anyway +072c : 4c2c07 > jmp * ;failed anyway -06e2 : 5002 brcc6 bvc brcc7 -06e4 : 7003 bvs brcc8 -06e6 : brcc7 +072f : 5002 brcc6 bvc brcc7 +0731 : 7003 bvs brcc8 +0733 : brcc7 trap ;branch overflow/no overflow -06e6 : 4ce606 > jmp * ;failed anyway +0733 : 4c3307 > jmp * ;failed anyway -06e9 : brcc8 +0736 : brcc8 set_stat $ff-minus > load_flag $ff-minus -06e9 : a97f > lda #$ff-minus ;allow test to change I-flag (no mask) +0736 : a97f > lda #$ff-minus ;allow test to change I-flag (no mask) > -06eb : 48 > pha ;use stack to load status -06ec : 28 > plp +0738 : 48 > pha ;use stack to load status +0739 : 28 > plp -06ed : d002 bne brpl1 -06ef : f003 beq brpl2 -06f1 : brpl1 +073a : d002 bne brpl1 +073c : f003 beq brpl2 +073e : brpl1 trap ;branch zero/non zero -06f1 : 4cf106 > jmp * ;failed anyway +073e : 4c3e07 > jmp * ;failed anyway -06f4 : 9002 brpl2 bcc brpl3 -06f6 : b003 bcs brpl4 -06f8 : brpl3 +0741 : 9002 brpl2 bcc brpl3 +0743 : b003 bcs brpl4 +0745 : brpl3 trap ;branch carry/no carry -06f8 : 4cf806 > jmp * ;failed anyway +0745 : 4c4507 > jmp * ;failed anyway -06fb : 3002 brpl4 bmi brpl5 -06fd : 1003 bpl brpl6 -06ff : brpl5 +0748 : 3002 brpl4 bmi brpl5 +074a : 1003 bpl brpl6 +074c : brpl5 trap ;branch minus/plus -06ff : 4cff06 > jmp * ;failed anyway +074c : 4c4c07 > jmp * ;failed anyway -0702 : 5002 brpl6 bvc brpl7 -0704 : 7003 bvs brpl8 -0706 : brpl7 +074f : 5002 brpl6 bvc brpl7 +0751 : 7003 bvs brpl8 +0753 : brpl7 trap ;branch overflow/no overflow -0706 : 4c0607 > jmp * ;failed anyway +0753 : 4c5307 > jmp * ;failed anyway -0709 : brpl8 +0756 : brpl8 set_stat $ff-overfl > load_flag $ff-overfl -0709 : a9bf > lda #$ff-overfl ;allow test to change I-flag (no mask) +0756 : a9bf > lda #$ff-overfl ;allow test to change I-flag (no mask) > -070b : 48 > pha ;use stack to load status -070c : 28 > plp +0758 : 48 > pha ;use stack to load status +0759 : 28 > plp -070d : d002 bne brvc1 -070f : f003 beq brvc2 -0711 : brvc1 +075a : d002 bne brvc1 +075c : f003 beq brvc2 +075e : brvc1 trap ;branch zero/non zero -0711 : 4c1107 > jmp * ;failed anyway +075e : 4c5e07 > jmp * ;failed anyway -0714 : 9002 brvc2 bcc brvc3 -0716 : b003 bcs brvc4 -0718 : brvc3 +0761 : 9002 brvc2 bcc brvc3 +0763 : b003 bcs brvc4 +0765 : brvc3 trap ;branch carry/no carry -0718 : 4c1807 > jmp * ;failed anyway +0765 : 4c6507 > jmp * ;failed anyway -071b : 1002 brvc4 bpl brvc5 -071d : 3003 bmi brvc6 -071f : brvc5 +0768 : 1002 brvc4 bpl brvc5 +076a : 3003 bmi brvc6 +076c : brvc5 trap ;branch minus/plus -071f : 4c1f07 > jmp * ;failed anyway +076c : 4c6c07 > jmp * ;failed anyway -0722 : 7002 brvc6 bvs brvc7 -0724 : 5003 bvc brvc8 -0726 : brvc7 +076f : 7002 brvc6 bvs brvc7 +0771 : 5003 bvc brvc8 +0773 : brvc7 trap ;branch overflow/no overflow -0726 : 4c2607 > jmp * ;failed anyway +0773 : 4c7307 > jmp * ;failed anyway -0729 : brvc8 +0776 : brvc8 next_test -0729 : ad0002 > lda test_case ;previous test -072c : c904 > cmp #test_num +0776 : ad0002 > lda test_case ;previous test +0779 : c904 > cmp #test_num > trap_ne ;test is out of sequence -072e : d0fe > bne * ;failed not equal (non zero) +077b : d0fe > bne * ;failed not equal (non zero) > 0005 = >test_num = test_num + 1 -0730 : a905 > lda #test_num ;*** next tests' number -0732 : 8d0002 > sta test_case +077d : a905 > lda #test_num ;*** next tests' number +077f : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; test PHA does not alter flags or accumulator but PLA does -0735 : a255 ldx #$55 ;x & y protected -0737 : a0aa ldy #$aa +0782 : a255 ldx #$55 ;x & y protected +0784 : a0aa ldy #$aa set_a 1,$ff ;push > load_flag $ff -0739 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +0786 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -073b : 48 > pha ;use stack to load status -073c : a901 > lda #1 ;precharge accu -073e : 28 > plp +0788 : 48 > pha ;use stack to load status +0789 : a901 > lda #1 ;precharge accu +078b : 28 > plp -073f : 48 pha +078c : 48 pha tst_a 1,$ff -0740 : 08 > php ;save flags -0741 : c901 > cmp #1 ;test result +078d : 08 > php ;save flags +078e : c901 > cmp #1 ;test result > trap_ne -0743 : d0fe > bne * ;failed not equal (non zero) +0790 : d0fe > bne * ;failed not equal (non zero) > -0745 : 68 > pla ;load status -0746 : 48 > pha +0792 : 68 > pla ;load status +0793 : 48 > pha > cmp_flag $ff -0747 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +0794 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -0749 : d0fe > bne * ;failed not equal (non zero) +0796 : d0fe > bne * ;failed not equal (non zero) > -074b : 28 > plp ;restore status +0798 : 28 > plp ;restore status set_a 0,0 > load_flag 0 -074c : a900 > lda #0 ;allow test to change I-flag (no mask) +0799 : a900 > lda #0 ;allow test to change I-flag (no mask) > -074e : 48 > pha ;use stack to load status -074f : a900 > lda #0 ;precharge accu -0751 : 28 > plp +079b : 48 > pha ;use stack to load status +079c : a900 > lda #0 ;precharge accu +079e : 28 > plp -0752 : 48 pha +079f : 48 pha tst_a 0,0 -0753 : 08 > php ;save flags -0754 : c900 > cmp #0 ;test result +07a0 : 08 > php ;save flags +07a1 : c900 > cmp #0 ;test result > trap_ne -0756 : d0fe > bne * ;failed not equal (non zero) +07a3 : d0fe > bne * ;failed not equal (non zero) > -0758 : 68 > pla ;load status -0759 : 48 > pha +07a5 : 68 > pla ;load status +07a6 : 48 > pha > cmp_flag 0 -075a : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +07a7 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -075c : d0fe > bne * ;failed not equal (non zero) +07a9 : d0fe > bne * ;failed not equal (non zero) > -075e : 28 > plp ;restore status +07ab : 28 > plp ;restore status set_a $ff,$ff > load_flag $ff -075f : a9ff > lda #$ff ;allow test to change I-flag (no mask) +07ac : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -0761 : 48 > pha ;use stack to load status -0762 : a9ff > lda #$ff ;precharge accu -0764 : 28 > plp +07ae : 48 > pha ;use stack to load status +07af : a9ff > lda #$ff ;precharge accu +07b1 : 28 > plp -0765 : 48 pha +07b2 : 48 pha tst_a $ff,$ff -0766 : 08 > php ;save flags -0767 : c9ff > cmp #$ff ;test result +07b3 : 08 > php ;save flags +07b4 : c9ff > cmp #$ff ;test result > trap_ne -0769 : d0fe > bne * ;failed not equal (non zero) +07b6 : d0fe > bne * ;failed not equal (non zero) > -076b : 68 > pla ;load status -076c : 48 > pha +07b8 : 68 > pla ;load status +07b9 : 48 > pha > cmp_flag $ff -076d : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +07ba : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -076f : d0fe > bne * ;failed not equal (non zero) +07bc : d0fe > bne * ;failed not equal (non zero) > -0771 : 28 > plp ;restore status +07be : 28 > plp ;restore status set_a 1,0 > load_flag 0 -0772 : a900 > lda #0 ;allow test to change I-flag (no mask) +07bf : a900 > lda #0 ;allow test to change I-flag (no mask) > -0774 : 48 > pha ;use stack to load status -0775 : a901 > lda #1 ;precharge accu -0777 : 28 > plp +07c1 : 48 > pha ;use stack to load status +07c2 : a901 > lda #1 ;precharge accu +07c4 : 28 > plp -0778 : 48 pha +07c5 : 48 pha tst_a 1,0 -0779 : 08 > php ;save flags -077a : c901 > cmp #1 ;test result +07c6 : 08 > php ;save flags +07c7 : c901 > cmp #1 ;test result > trap_ne -077c : d0fe > bne * ;failed not equal (non zero) +07c9 : d0fe > bne * ;failed not equal (non zero) > -077e : 68 > pla ;load status -077f : 48 > pha +07cb : 68 > pla ;load status +07cc : 48 > pha > cmp_flag 0 -0780 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +07cd : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -0782 : d0fe > bne * ;failed not equal (non zero) +07cf : d0fe > bne * ;failed not equal (non zero) > -0784 : 28 > plp ;restore status +07d1 : 28 > plp ;restore status set_a 0,$ff > load_flag $ff -0785 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +07d2 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -0787 : 48 > pha ;use stack to load status -0788 : a900 > lda #0 ;precharge accu -078a : 28 > plp +07d4 : 48 > pha ;use stack to load status +07d5 : a900 > lda #0 ;precharge accu +07d7 : 28 > plp -078b : 48 pha +07d8 : 48 pha tst_a 0,$ff -078c : 08 > php ;save flags -078d : c900 > cmp #0 ;test result +07d9 : 08 > php ;save flags +07da : c900 > cmp #0 ;test result > trap_ne -078f : d0fe > bne * ;failed not equal (non zero) +07dc : d0fe > bne * ;failed not equal (non zero) > -0791 : 68 > pla ;load status -0792 : 48 > pha +07de : 68 > pla ;load status +07df : 48 > pha > cmp_flag $ff -0793 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +07e0 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -0795 : d0fe > bne * ;failed not equal (non zero) +07e2 : d0fe > bne * ;failed not equal (non zero) > -0797 : 28 > plp ;restore status +07e4 : 28 > plp ;restore status set_a $ff,0 > load_flag 0 -0798 : a900 > lda #0 ;allow test to change I-flag (no mask) +07e5 : a900 > lda #0 ;allow test to change I-flag (no mask) > -079a : 48 > pha ;use stack to load status -079b : a9ff > lda #$ff ;precharge accu -079d : 28 > plp +07e7 : 48 > pha ;use stack to load status +07e8 : a9ff > lda #$ff ;precharge accu +07ea : 28 > plp -079e : 48 pha +07eb : 48 pha tst_a $ff,0 -079f : 08 > php ;save flags -07a0 : c9ff > cmp #$ff ;test result +07ec : 08 > php ;save flags +07ed : c9ff > cmp #$ff ;test result > trap_ne -07a2 : d0fe > bne * ;failed not equal (non zero) +07ef : d0fe > bne * ;failed not equal (non zero) > -07a4 : 68 > pla ;load status -07a5 : 48 > pha +07f1 : 68 > pla ;load status +07f2 : 48 > pha > cmp_flag 0 -07a6 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +07f3 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -07a8 : d0fe > bne * ;failed not equal (non zero) +07f5 : d0fe > bne * ;failed not equal (non zero) > -07aa : 28 > plp ;restore status +07f7 : 28 > plp ;restore status set_a 0,$ff ;pull > load_flag $ff -07ab : a9ff > lda #$ff ;allow test to change I-flag (no mask) +07f8 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -07ad : 48 > pha ;use stack to load status -07ae : a900 > lda #0 ;precharge accu -07b0 : 28 > plp +07fa : 48 > pha ;use stack to load status +07fb : a900 > lda #0 ;precharge accu +07fd : 28 > plp -07b1 : 68 pla +07fe : 68 pla tst_a $ff,$ff-zero -07b2 : 08 > php ;save flags -07b3 : c9ff > cmp #$ff ;test result +07ff : 08 > php ;save flags +0800 : c9ff > cmp #$ff ;test result > trap_ne -07b5 : d0fe > bne * ;failed not equal (non zero) +0802 : d0fe > bne * ;failed not equal (non zero) > -07b7 : 68 > pla ;load status -07b8 : 48 > pha +0804 : 68 > pla ;load status +0805 : 48 > pha > cmp_flag $ff-zero -07b9 : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits +0806 : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits > > trap_ne -07bb : d0fe > bne * ;failed not equal (non zero) +0808 : d0fe > bne * ;failed not equal (non zero) > -07bd : 28 > plp ;restore status +080a : 28 > plp ;restore status set_a $ff,0 > load_flag 0 -07be : a900 > lda #0 ;allow test to change I-flag (no mask) +080b : a900 > lda #0 ;allow test to change I-flag (no mask) > -07c0 : 48 > pha ;use stack to load status -07c1 : a9ff > lda #$ff ;precharge accu -07c3 : 28 > plp +080d : 48 > pha ;use stack to load status +080e : a9ff > lda #$ff ;precharge accu +0810 : 28 > plp -07c4 : 68 pla +0811 : 68 pla tst_a 0,zero -07c5 : 08 > php ;save flags -07c6 : c900 > cmp #0 ;test result +0812 : 08 > php ;save flags +0813 : c900 > cmp #0 ;test result > trap_ne -07c8 : d0fe > bne * ;failed not equal (non zero) +0815 : d0fe > bne * ;failed not equal (non zero) > -07ca : 68 > pla ;load status -07cb : 48 > pha +0817 : 68 > pla ;load status +0818 : 48 > pha > cmp_flag zero -07cc : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits +0819 : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits > > trap_ne -07ce : d0fe > bne * ;failed not equal (non zero) +081b : d0fe > bne * ;failed not equal (non zero) > -07d0 : 28 > plp ;restore status +081d : 28 > plp ;restore status set_a $fe,$ff > load_flag $ff -07d1 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +081e : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -07d3 : 48 > pha ;use stack to load status -07d4 : a9fe > lda #$fe ;precharge accu -07d6 : 28 > plp +0820 : 48 > pha ;use stack to load status +0821 : a9fe > lda #$fe ;precharge accu +0823 : 28 > plp -07d7 : 68 pla +0824 : 68 pla tst_a 1,$ff-zero-minus -07d8 : 08 > php ;save flags -07d9 : c901 > cmp #1 ;test result +0825 : 08 > php ;save flags +0826 : c901 > cmp #1 ;test result > trap_ne -07db : d0fe > bne * ;failed not equal (non zero) +0828 : d0fe > bne * ;failed not equal (non zero) > -07dd : 68 > pla ;load status -07de : 48 > pha +082a : 68 > pla ;load status +082b : 48 > pha > cmp_flag $ff-zero-minus -07df : c97d > cmp #($ff-zero-minus|fao)&m8 ;expected flags + always on bits +082c : c97d > cmp #($ff-zero-minus|fao)&m8 ;expected flags + always on bits > > trap_ne -07e1 : d0fe > bne * ;failed not equal (non zero) +082e : d0fe > bne * ;failed not equal (non zero) > -07e3 : 28 > plp ;restore status +0830 : 28 > plp ;restore status set_a 0,0 > load_flag 0 -07e4 : a900 > lda #0 ;allow test to change I-flag (no mask) +0831 : a900 > lda #0 ;allow test to change I-flag (no mask) > -07e6 : 48 > pha ;use stack to load status -07e7 : a900 > lda #0 ;precharge accu -07e9 : 28 > plp +0833 : 48 > pha ;use stack to load status +0834 : a900 > lda #0 ;precharge accu +0836 : 28 > plp -07ea : 68 pla +0837 : 68 pla tst_a $ff,minus -07eb : 08 > php ;save flags -07ec : c9ff > cmp #$ff ;test result +0838 : 08 > php ;save flags +0839 : c9ff > cmp #$ff ;test result > trap_ne -07ee : d0fe > bne * ;failed not equal (non zero) +083b : d0fe > bne * ;failed not equal (non zero) > -07f0 : 68 > pla ;load status -07f1 : 48 > pha +083d : 68 > pla ;load status +083e : 48 > pha > cmp_flag minus -07f2 : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits +083f : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits > > trap_ne -07f4 : d0fe > bne * ;failed not equal (non zero) +0841 : d0fe > bne * ;failed not equal (non zero) > -07f6 : 28 > plp ;restore status +0843 : 28 > plp ;restore status set_a $ff,$ff > load_flag $ff -07f7 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +0844 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -07f9 : 48 > pha ;use stack to load status -07fa : a9ff > lda #$ff ;precharge accu -07fc : 28 > plp +0846 : 48 > pha ;use stack to load status +0847 : a9ff > lda #$ff ;precharge accu +0849 : 28 > plp -07fd : 68 pla +084a : 68 pla tst_a 0,$ff-minus -07fe : 08 > php ;save flags -07ff : c900 > cmp #0 ;test result +084b : 08 > php ;save flags +084c : c900 > cmp #0 ;test result > trap_ne -0801 : d0fe > bne * ;failed not equal (non zero) +084e : d0fe > bne * ;failed not equal (non zero) > -0803 : 68 > pla ;load status -0804 : 48 > pha +0850 : 68 > pla ;load status +0851 : 48 > pha > cmp_flag $ff-minus -0805 : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits +0852 : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits > > trap_ne -0807 : d0fe > bne * ;failed not equal (non zero) +0854 : d0fe > bne * ;failed not equal (non zero) > -0809 : 28 > plp ;restore status +0856 : 28 > plp ;restore status set_a $fe,0 > load_flag 0 -080a : a900 > lda #0 ;allow test to change I-flag (no mask) +0857 : a900 > lda #0 ;allow test to change I-flag (no mask) > -080c : 48 > pha ;use stack to load status -080d : a9fe > lda #$fe ;precharge accu -080f : 28 > plp +0859 : 48 > pha ;use stack to load status +085a : a9fe > lda #$fe ;precharge accu +085c : 28 > plp -0810 : 68 pla +085d : 68 pla tst_a 1,0 -0811 : 08 > php ;save flags -0812 : c901 > cmp #1 ;test result +085e : 08 > php ;save flags +085f : c901 > cmp #1 ;test result > trap_ne -0814 : d0fe > bne * ;failed not equal (non zero) +0861 : d0fe > bne * ;failed not equal (non zero) > -0816 : 68 > pla ;load status -0817 : 48 > pha +0863 : 68 > pla ;load status +0864 : 48 > pha > cmp_flag 0 -0818 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +0865 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -081a : d0fe > bne * ;failed not equal (non zero) +0867 : d0fe > bne * ;failed not equal (non zero) > -081c : 28 > plp ;restore status +0869 : 28 > plp ;restore status -081d : e055 cpx #$55 ;x & y unchanged? +086a : e055 cpx #$55 ;x & y unchanged? trap_ne -081f : d0fe > bne * ;failed not equal (non zero) +086c : d0fe > bne * ;failed not equal (non zero) -0821 : c0aa cpy #$aa +086e : c0aa cpy #$aa trap_ne -0823 : d0fe > bne * ;failed not equal (non zero) +0870 : d0fe > bne * ;failed not equal (non zero) next_test -0825 : ad0002 > lda test_case ;previous test -0828 : c905 > cmp #test_num +0872 : ad0002 > lda test_case ;previous test +0875 : c905 > cmp #test_num > trap_ne ;test is out of sequence -082a : d0fe > bne * ;failed not equal (non zero) +0877 : d0fe > bne * ;failed not equal (non zero) > 0006 = >test_num = test_num + 1 -082c : a906 > lda #test_num ;*** next tests' number -082e : 8d0002 > sta test_case +0879 : a906 > lda #test_num ;*** next tests' number +087b : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; partial pretest EOR # set_a $3c,0 > load_flag 0 -0831 : a900 > lda #0 ;allow test to change I-flag (no mask) +087e : a900 > lda #0 ;allow test to change I-flag (no mask) > -0833 : 48 > pha ;use stack to load status -0834 : a93c > lda #$3c ;precharge accu -0836 : 28 > plp +0880 : 48 > pha ;use stack to load status +0881 : a93c > lda #$3c ;precharge accu +0883 : 28 > plp -0837 : 49c3 eor #$c3 +0884 : 49c3 eor #$c3 tst_a $ff,fn -0839 : 08 > php ;save flags -083a : c9ff > cmp #$ff ;test result +0886 : 08 > php ;save flags +0887 : c9ff > cmp #$ff ;test result > trap_ne -083c : d0fe > bne * ;failed not equal (non zero) +0889 : d0fe > bne * ;failed not equal (non zero) > -083e : 68 > pla ;load status -083f : 48 > pha +088b : 68 > pla ;load status +088c : 48 > pha > cmp_flag fn -0840 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits +088d : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits > > trap_ne -0842 : d0fe > bne * ;failed not equal (non zero) +088f : d0fe > bne * ;failed not equal (non zero) > -0844 : 28 > plp ;restore status +0891 : 28 > plp ;restore status set_a $c3,0 > load_flag 0 -0845 : a900 > lda #0 ;allow test to change I-flag (no mask) +0892 : a900 > lda #0 ;allow test to change I-flag (no mask) > -0847 : 48 > pha ;use stack to load status -0848 : a9c3 > lda #$c3 ;precharge accu -084a : 28 > plp +0894 : 48 > pha ;use stack to load status +0895 : a9c3 > lda #$c3 ;precharge accu +0897 : 28 > plp -084b : 49c3 eor #$c3 +0898 : 49c3 eor #$c3 tst_a 0,fz -084d : 08 > php ;save flags -084e : c900 > cmp #0 ;test result +089a : 08 > php ;save flags +089b : c900 > cmp #0 ;test result > trap_ne -0850 : d0fe > bne * ;failed not equal (non zero) +089d : d0fe > bne * ;failed not equal (non zero) > -0852 : 68 > pla ;load status -0853 : 48 > pha +089f : 68 > pla ;load status +08a0 : 48 > pha > cmp_flag fz -0854 : c932 > cmp #(fz|fao)&m8 ;expected flags + always on bits +08a1 : c932 > cmp #(fz|fao)&m8 ;expected flags + always on bits > > trap_ne -0856 : d0fe > bne * ;failed not equal (non zero) +08a3 : d0fe > bne * ;failed not equal (non zero) > -0858 : 28 > plp ;restore status +08a5 : 28 > plp ;restore status next_test -0859 : ad0002 > lda test_case ;previous test -085c : c906 > cmp #test_num +08a6 : ad0002 > lda test_case ;previous test +08a9 : c906 > cmp #test_num > trap_ne ;test is out of sequence -085e : d0fe > bne * ;failed not equal (non zero) +08ab : d0fe > bne * ;failed not equal (non zero) > 0007 = >test_num = test_num + 1 -0860 : a907 > lda #test_num ;*** next tests' number -0862 : 8d0002 > sta test_case +08ad : a907 > lda #test_num ;*** next tests' number +08af : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; PC modifying instructions except branches (NOP, JMP, JSR, RTS, BRK, RTI) ; testing NOP -0865 : a224 ldx #$24 -0867 : a042 ldy #$42 +08b2 : a224 ldx #$24 +08b4 : a042 ldy #$42 set_a $18,0 > load_flag 0 -0869 : a900 > lda #0 ;allow test to change I-flag (no mask) +08b6 : a900 > lda #0 ;allow test to change I-flag (no mask) > -086b : 48 > pha ;use stack to load status -086c : a918 > lda #$18 ;precharge accu -086e : 28 > plp +08b8 : 48 > pha ;use stack to load status +08b9 : a918 > lda #$18 ;precharge accu +08bb : 28 > plp -086f : ea nop +08bc : ea nop tst_a $18,0 -0870 : 08 > php ;save flags -0871 : c918 > cmp #$18 ;test result +08bd : 08 > php ;save flags +08be : c918 > cmp #$18 ;test result > trap_ne -0873 : d0fe > bne * ;failed not equal (non zero) +08c0 : d0fe > bne * ;failed not equal (non zero) > -0875 : 68 > pla ;load status -0876 : 48 > pha +08c2 : 68 > pla ;load status +08c3 : 48 > pha > cmp_flag 0 -0877 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +08c4 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -0879 : d0fe > bne * ;failed not equal (non zero) +08c6 : d0fe > bne * ;failed not equal (non zero) > -087b : 28 > plp ;restore status +08c8 : 28 > plp ;restore status -087c : e024 cpx #$24 +08c9 : e024 cpx #$24 trap_ne -087e : d0fe > bne * ;failed not equal (non zero) +08cb : d0fe > bne * ;failed not equal (non zero) -0880 : c042 cpy #$42 +08cd : c042 cpy #$42 trap_ne -0882 : d0fe > bne * ;failed not equal (non zero) +08cf : d0fe > bne * ;failed not equal (non zero) -0884 : a2db ldx #$db -0886 : a0bd ldy #$bd +08d1 : a2db ldx #$db +08d3 : a0bd ldy #$bd set_a $e7,$ff > load_flag $ff -0888 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +08d5 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -088a : 48 > pha ;use stack to load status -088b : a9e7 > lda #$e7 ;precharge accu -088d : 28 > plp +08d7 : 48 > pha ;use stack to load status +08d8 : a9e7 > lda #$e7 ;precharge accu +08da : 28 > plp -088e : ea nop +08db : ea nop tst_a $e7,$ff -088f : 08 > php ;save flags -0890 : c9e7 > cmp #$e7 ;test result +08dc : 08 > php ;save flags +08dd : c9e7 > cmp #$e7 ;test result > trap_ne -0892 : d0fe > bne * ;failed not equal (non zero) +08df : d0fe > bne * ;failed not equal (non zero) > -0894 : 68 > pla ;load status -0895 : 48 > pha +08e1 : 68 > pla ;load status +08e2 : 48 > pha > cmp_flag $ff -0896 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +08e3 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -0898 : d0fe > bne * ;failed not equal (non zero) +08e5 : d0fe > bne * ;failed not equal (non zero) > -089a : 28 > plp ;restore status +08e7 : 28 > plp ;restore status -089b : e0db cpx #$db +08e8 : e0db cpx #$db trap_ne -089d : d0fe > bne * ;failed not equal (non zero) +08ea : d0fe > bne * ;failed not equal (non zero) -089f : c0bd cpy #$bd +08ec : c0bd cpy #$bd trap_ne -08a1 : d0fe > bne * ;failed not equal (non zero) +08ee : d0fe > bne * ;failed not equal (non zero) next_test -08a3 : ad0002 > lda test_case ;previous test -08a6 : c907 > cmp #test_num +08f0 : ad0002 > lda test_case ;previous test +08f3 : c907 > cmp #test_num > trap_ne ;test is out of sequence -08a8 : d0fe > bne * ;failed not equal (non zero) +08f5 : d0fe > bne * ;failed not equal (non zero) > 0008 = >test_num = test_num + 1 -08aa : a908 > lda #test_num ;*** next tests' number -08ac : 8d0002 > sta test_case +08f7 : a908 > lda #test_num ;*** next tests' number +08f9 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; jump absolute set_stat $0 > load_flag $0 -08af : a900 > lda #$0 ;allow test to change I-flag (no mask) +08fc : a900 > lda #$0 ;allow test to change I-flag (no mask) > -08b1 : 48 > pha ;use stack to load status -08b2 : 28 > plp +08fe : 48 > pha ;use stack to load status +08ff : 28 > plp -08b3 : a946 lda #'F' -08b5 : a241 ldx #'A' -08b7 : a052 ldy #'R' ;N=0, V=0, Z=0, C=0 -08b9 : 4c1b36 jmp test_far -08bc : ea nop -08bd : ea nop +0900 : a946 lda #'F' +0902 : a241 ldx #'A' +0904 : a052 ldy #'R' ;N=0, V=0, Z=0, C=0 +0906 : 4cef36 jmp test_far +0909 : ea nop +090a : ea nop trap_ne ;runover protection -08be : d0fe > bne * ;failed not equal (non zero) +090b : d0fe > bne * ;failed not equal (non zero) -08c0 : e8 inx -08c1 : e8 inx -08c2 : far_ret +090d : e8 inx +090e : e8 inx +090f : far_ret trap_eq ;returned flags OK? -08c2 : f0fe > beq * ;failed equal (zero) +090f : f0fe > beq * ;failed equal (zero) trap_pl -08c4 : 10fe > bpl * ;failed plus (bit 7 clear) +0911 : 10fe > bpl * ;failed plus (bit 7 clear) trap_cc -08c6 : 90fe > bcc * ;failed carry clear +0913 : 90fe > bcc * ;failed carry clear trap_vc -08c8 : 50fe > bvc * ;failed overflow clear +0915 : 50fe > bvc * ;failed overflow clear -08ca : c9ec cmp #('F'^$aa) ;returned registers OK? +0917 : c9ec cmp #('F'^$aa) ;returned registers OK? trap_ne -08cc : d0fe > bne * ;failed not equal (non zero) +0919 : d0fe > bne * ;failed not equal (non zero) -08ce : e042 cpx #('A'+1) +091b : e042 cpx #('A'+1) trap_ne -08d0 : d0fe > bne * ;failed not equal (non zero) +091d : d0fe > bne * ;failed not equal (non zero) -08d2 : c04f cpy #('R'-3) +091f : c04f cpy #('R'-3) trap_ne -08d4 : d0fe > bne * ;failed not equal (non zero) +0921 : d0fe > bne * ;failed not equal (non zero) -08d6 : ca dex -08d7 : c8 iny -08d8 : c8 iny -08d9 : c8 iny -08da : 49aa eor #$aa ;N=0, V=1, Z=0, C=1 -08dc : 4ce508 jmp test_near -08df : ea nop -08e0 : ea nop +0923 : ca dex +0924 : c8 iny +0925 : c8 iny +0926 : c8 iny +0927 : 49aa eor #$aa ;N=0, V=1, Z=0, C=1 +0929 : 4c3209 jmp test_near +092c : ea nop +092d : ea nop trap_ne ;runover protection -08e1 : d0fe > bne * ;failed not equal (non zero) +092e : d0fe > bne * ;failed not equal (non zero) -08e3 : e8 inx -08e4 : e8 inx -08e5 : test_near +0930 : e8 inx +0931 : e8 inx +0932 : test_near trap_eq ;passed flags OK? -08e5 : f0fe > beq * ;failed equal (zero) +0932 : f0fe > beq * ;failed equal (zero) trap_mi -08e7 : 30fe > bmi * ;failed minus (bit 7 set) +0934 : 30fe > bmi * ;failed minus (bit 7 set) trap_cc -08e9 : 90fe > bcc * ;failed carry clear +0936 : 90fe > bcc * ;failed carry clear trap_vc -08eb : 50fe > bvc * ;failed overflow clear +0938 : 50fe > bvc * ;failed overflow clear -08ed : c946 cmp #'F' ;passed registers OK? +093a : c946 cmp #'F' ;passed registers OK? trap_ne -08ef : d0fe > bne * ;failed not equal (non zero) +093c : d0fe > bne * ;failed not equal (non zero) -08f1 : e041 cpx #'A' +093e : e041 cpx #'A' trap_ne -08f3 : d0fe > bne * ;failed not equal (non zero) +0940 : d0fe > bne * ;failed not equal (non zero) -08f5 : c052 cpy #'R' +0942 : c052 cpy #'R' trap_ne -08f7 : d0fe > bne * ;failed not equal (non zero) +0944 : d0fe > bne * ;failed not equal (non zero) next_test -08f9 : ad0002 > lda test_case ;previous test -08fc : c908 > cmp #test_num +0946 : ad0002 > lda test_case ;previous test +0949 : c908 > cmp #test_num > trap_ne ;test is out of sequence -08fe : d0fe > bne * ;failed not equal (non zero) +094b : d0fe > bne * ;failed not equal (non zero) > 0009 = >test_num = test_num + 1 -0900 : a909 > lda #test_num ;*** next tests' number -0902 : 8d0002 > sta test_case +094d : a909 > lda #test_num ;*** next tests' number +094f : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; jump indirect set_stat 0 > load_flag 0 -0905 : a900 > lda #0 ;allow test to change I-flag (no mask) +0952 : a900 > lda #0 ;allow test to change I-flag (no mask) > -0907 : 48 > pha ;use stack to load status -0908 : 28 > plp +0954 : 48 > pha ;use stack to load status +0955 : 28 > plp -0909 : a949 lda #'I' -090b : a24e ldx #'N' -090d : a044 ldy #'D' ;N=0, V=0, Z=0, C=0 -090f : 6c4a36 jmp (ptr_tst_ind) -0912 : ea nop +0956 : a949 lda #'I' +0958 : a24e ldx #'N' +095a : a044 ldy #'D' ;N=0, V=0, Z=0, C=0 +095c : 6c1e37 jmp (ptr_tst_ind) +095f : ea nop trap_ne ;runover protection -0913 : d0fe > bne * ;failed not equal (non zero) +0960 : d0fe > bne * ;failed not equal (non zero) -0915 : 88 dey -0916 : 88 dey -0917 : ind_ret -0917 : 08 php ;either SP or Y count will fail, if we do not hit -0918 : 88 dey -0919 : 88 dey -091a : 88 dey -091b : 28 plp +0962 : 88 dey +0963 : 88 dey +0964 : ind_ret +0964 : 08 php ;either SP or Y count will fail, if we do not hit +0965 : 88 dey +0966 : 88 dey +0967 : 88 dey +0968 : 28 plp trap_eq ;returned flags OK? -091c : f0fe > beq * ;failed equal (zero) +0969 : f0fe > beq * ;failed equal (zero) trap_pl -091e : 10fe > bpl * ;failed plus (bit 7 clear) +096b : 10fe > bpl * ;failed plus (bit 7 clear) trap_cc -0920 : 90fe > bcc * ;failed carry clear +096d : 90fe > bcc * ;failed carry clear trap_vc -0922 : 50fe > bvc * ;failed overflow clear +096f : 50fe > bvc * ;failed overflow clear -0924 : c9e3 cmp #('I'^$aa) ;returned registers OK? +0971 : c9e3 cmp #('I'^$aa) ;returned registers OK? trap_ne -0926 : d0fe > bne * ;failed not equal (non zero) +0973 : d0fe > bne * ;failed not equal (non zero) -0928 : e04f cpx #('N'+1) +0975 : e04f cpx #('N'+1) trap_ne -092a : d0fe > bne * ;failed not equal (non zero) +0977 : d0fe > bne * ;failed not equal (non zero) -092c : c03e cpy #('D'-6) +0979 : c03e cpy #('D'-6) trap_ne -092e : d0fe > bne * ;failed not equal (non zero) +097b : d0fe > bne * ;failed not equal (non zero) -0930 : ba tsx ;SP check -0931 : e0ff cpx #$ff +097d : ba tsx ;SP check +097e : e0ff cpx #$ff trap_ne -0933 : d0fe > bne * ;failed not equal (non zero) +0980 : d0fe > bne * ;failed not equal (non zero) next_test -0935 : ad0002 > lda test_case ;previous test -0938 : c909 > cmp #test_num +0982 : ad0002 > lda test_case ;previous test +0985 : c909 > cmp #test_num > trap_ne ;test is out of sequence -093a : d0fe > bne * ;failed not equal (non zero) +0987 : d0fe > bne * ;failed not equal (non zero) > 000a = >test_num = test_num + 1 -093c : a90a > lda #test_num ;*** next tests' number -093e : 8d0002 > sta test_case +0989 : a90a > lda #test_num ;*** next tests' number +098b : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; jump subroutine & return from subroutine set_stat 0 > load_flag 0 -0941 : a900 > lda #0 ;allow test to change I-flag (no mask) +098e : a900 > lda #0 ;allow test to change I-flag (no mask) > -0943 : 48 > pha ;use stack to load status -0944 : 28 > plp +0990 : 48 > pha ;use stack to load status +0991 : 28 > plp -0945 : a94a lda #'J' -0947 : a253 ldx #'S' -0949 : a052 ldy #'R' ;N=0, V=0, Z=0, C=0 -094b : 208636 jsr test_jsr -094d = jsr_ret = *-1 ;last address of jsr = return address -094e : 08 php ;either SP or Y count will fail, if we do not hit -094f : 88 dey -0950 : 88 dey -0951 : 88 dey -0952 : 28 plp +0992 : a94a lda #'J' +0994 : a253 ldx #'S' +0996 : a052 ldy #'R' ;N=0, V=0, Z=0, C=0 +0998 : 205d37 jsr test_jsr +099a = jsr_ret = *-1 ;last address of jsr = return address +099b : 08 php ;either SP or Y count will fail, if we do not hit +099c : 88 dey +099d : 88 dey +099e : 88 dey +099f : 28 plp trap_eq ;returned flags OK? -0953 : f0fe > beq * ;failed equal (zero) +09a0 : f0fe > beq * ;failed equal (zero) trap_pl -0955 : 10fe > bpl * ;failed plus (bit 7 clear) +09a2 : 10fe > bpl * ;failed plus (bit 7 clear) trap_cc -0957 : 90fe > bcc * ;failed carry clear +09a4 : 90fe > bcc * ;failed carry clear trap_vc -0959 : 50fe > bvc * ;failed overflow clear +09a6 : 50fe > bvc * ;failed overflow clear -095b : c9e0 cmp #('J'^$aa) ;returned registers OK? +09a8 : c9e0 cmp #('J'^$aa) ;returned registers OK? trap_ne -095d : d0fe > bne * ;failed not equal (non zero) +09aa : d0fe > bne * ;failed not equal (non zero) -095f : e054 cpx #('S'+1) +09ac : e054 cpx #('S'+1) trap_ne -0961 : d0fe > bne * ;failed not equal (non zero) +09ae : d0fe > bne * ;failed not equal (non zero) -0963 : c04c cpy #('R'-6) +09b0 : c04c cpy #('R'-6) trap_ne -0965 : d0fe > bne * ;failed not equal (non zero) +09b2 : d0fe > bne * ;failed not equal (non zero) -0967 : ba tsx ;sp? -0968 : e0ff cpx #$ff +09b4 : ba tsx ;sp? +09b5 : e0ff cpx #$ff trap_ne -096a : d0fe > bne * ;failed not equal (non zero) +09b7 : d0fe > bne * ;failed not equal (non zero) next_test -096c : ad0002 > lda test_case ;previous test -096f : c90a > cmp #test_num +09b9 : ad0002 > lda test_case ;previous test +09bc : c90a > cmp #test_num > trap_ne ;test is out of sequence -0971 : d0fe > bne * ;failed not equal (non zero) +09be : d0fe > bne * ;failed not equal (non zero) > 000b = >test_num = test_num + 1 -0973 : a90b > lda #test_num ;*** next tests' number -0975 : 8d0002 > sta test_case +09c0 : a90b > lda #test_num ;*** next tests' number +09c2 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; break & return from interrupt if ROM_vectors = 1 - set_stat 0 - > load_flag 0 -0978 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -097a : 48 > pha ;use stack to load status -097b : 28 > plp + load_flag 0 ;with interrupts enabled if allowed! +09c5 : a900 > lda #0 ;allow test to change I-flag (no mask) -097c : a942 lda #'B' -097e : a252 ldx #'R' -0980 : a04b ldy #'K' ;N=0, V=0, Z=0, C=0 -0982 : 00 brk +09c7 : 48 pha +09c8 : a942 lda #'B' +09ca : a252 ldx #'R' +09cc : a04b ldy #'K' +09ce : 28 plp ;N=0, V=0, Z=0, C=0 +09cf : 00 brk else - lda #hi brk_ret ;emulated break + lda #hi brk_ret0 ;emulated break pha - lda #lo brk_ret + lda #lo brk_ret0 pha - lda #fao ;set break & unused on stack + load_flag fao ;set break & unused on stack + pha + load_flag intdis ;during interrupt pha - set_stat intdis lda #'B' ldx #'R' - ldy #'K' ;N=0, V=0, Z=0, C=0 + ldy #'K' + plp ;N=0, V=0, Z=0, C=0 jmp irq_trap endif -0983 : 88 dey ;should not be executed -0984 : brk_ret ;address of break return -0984 : 08 php ;either SP or Y count will fail, if we do not hit -0985 : 88 dey -0986 : 88 dey -0987 : 88 dey -0988 : c9e8 cmp #('B'^$aa) ;returned registers OK? +09d0 : 88 dey ;should not be executed +09d1 : brk_ret0 ;address of break return +09d1 : 08 php ;either SP or Y count will fail, if we do not hit +09d2 : 88 dey +09d3 : 88 dey +09d4 : 88 dey +09d5 : c9e8 cmp #'B'^$aa ;returned registers OK? + ;the IRQ vector was never executed if A & X stay unmodified trap_ne -098a : d0fe > bne * ;failed not equal (non zero) +09d7 : d0fe > bne * ;failed not equal (non zero) -098c : e053 cpx #('R'+1) +09d9 : e053 cpx #'R'+1 trap_ne -098e : d0fe > bne * ;failed not equal (non zero) +09db : d0fe > bne * ;failed not equal (non zero) -0990 : c045 cpy #('K'-6) +09dd : c045 cpy #'K'-6 trap_ne -0992 : d0fe > bne * ;failed not equal (non zero) +09df : d0fe > bne * ;failed not equal (non zero) -0994 : 68 pla ;returned flags OK (unchanged)? +09e1 : 68 pla ;returned flags OK (unchanged)? cmp_flag 0 -0995 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +09e2 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits trap_ne -0997 : d0fe > bne * ;failed not equal (non zero) +09e4 : d0fe > bne * ;failed not equal (non zero) -0999 : ba tsx ;sp? -099a : e0ff cpx #$ff +09e6 : ba tsx ;sp? +09e7 : e0ff cpx #$ff trap_ne -099c : d0fe > bne * ;failed not equal (non zero) +09e9 : d0fe > bne * ;failed not equal (non zero) + + if ROM_vectors = 1 + load_flag $ff ;with interrupts disabled if allowed! +09eb : a9ff > lda #$ff ;allow test to change I-flag (no mask) + +09ed : 48 pha +09ee : a9bd lda #$ff-'B' +09f0 : a2ad ldx #$ff-'R' +09f2 : a0b4 ldy #$ff-'K' +09f4 : 28 plp ;N=1, V=1, Z=1, C=1 +09f5 : 00 brk + else + lda #hi brk_ret1 ;emulated break + pha + lda #lo brk_ret1 + pha + load_flag $ff + pha ;set break & unused on stack + pha ;actual flags + lda #$ff-'B' + ldx #$ff-'R' + ldy #$ff-'K' + plp ;N=1, V=1, Z=1, C=1 + jmp irq_trap + endif +09f6 : 88 dey ;should not be executed +09f7 : brk_ret1 ;address of break return +09f7 : 08 php ;either SP or Y count will fail, if we do not hit +09f8 : 88 dey +09f9 : 88 dey +09fa : 88 dey +09fb : c917 cmp #($ff-'B')^$aa ;returned registers OK? + ;the IRQ vector was never executed if A & X stay unmodified + trap_ne +09fd : d0fe > bne * ;failed not equal (non zero) + +09ff : e0ae cpx #$ff-'R'+1 + trap_ne +0a01 : d0fe > bne * ;failed not equal (non zero) + +0a03 : c0ae cpy #$ff-'K'-6 + trap_ne +0a05 : d0fe > bne * ;failed not equal (non zero) + +0a07 : 68 pla ;returned flags OK (unchanged)? + cmp_flag $ff +0a08 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits + + trap_ne +0a0a : d0fe > bne * ;failed not equal (non zero) + +0a0c : ba tsx ;sp? +0a0d : e0ff cpx #$ff + trap_ne +0a0f : d0fe > bne * ;failed not equal (non zero) next_test -099e : ad0002 > lda test_case ;previous test -09a1 : c90b > cmp #test_num +0a11 : ad0002 > lda test_case ;previous test +0a14 : c90b > cmp #test_num > trap_ne ;test is out of sequence -09a3 : d0fe > bne * ;failed not equal (non zero) +0a16 : d0fe > bne * ;failed not equal (non zero) > 000c = >test_num = test_num + 1 -09a5 : a90c > lda #test_num ;*** next tests' number -09a7 : 8d0002 > sta test_case +0a18 : a90c > lda #test_num ;*** next tests' number +0a1a : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; test set and clear flags CLC CLI CLD CLV SEC SEI SED set_stat $ff > load_flag $ff -09aa : a9ff > lda #$ff ;allow test to change I-flag (no mask) +0a1d : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -09ac : 48 > pha ;use stack to load status -09ad : 28 > plp +0a1f : 48 > pha ;use stack to load status +0a20 : 28 > plp -09ae : 18 clc +0a21 : 18 clc tst_stat $ff-carry -09af : 08 > php ;save status -09b0 : 68 > pla ;use stack to retrieve status -09b1 : 48 > pha +0a22 : 08 > php ;save status +0a23 : 68 > pla ;use stack to retrieve status +0a24 : 48 > pha > cmp_flag $ff-carry -09b2 : c9fe > cmp #($ff-carry|fao)&m8 ;expected flags + always on bits +0a25 : c9fe > cmp #($ff-carry|fao)&m8 ;expected flags + always on bits > > trap_ne -09b4 : d0fe > bne * ;failed not equal (non zero) +0a27 : d0fe > bne * ;failed not equal (non zero) > -09b6 : 28 > plp ;restore status +0a29 : 28 > plp ;restore status -09b7 : 38 sec +0a2a : 38 sec tst_stat $ff -09b8 : 08 > php ;save status -09b9 : 68 > pla ;use stack to retrieve status -09ba : 48 > pha +0a2b : 08 > php ;save status +0a2c : 68 > pla ;use stack to retrieve status +0a2d : 48 > pha > cmp_flag $ff -09bb : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +0a2e : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -09bd : d0fe > bne * ;failed not equal (non zero) +0a30 : d0fe > bne * ;failed not equal (non zero) > -09bf : 28 > plp ;restore status +0a32 : 28 > plp ;restore status if I_flag = 3 -09c0 : 58 cli +0a33 : 58 cli tst_stat $ff-intdis -09c1 : 08 > php ;save status -09c2 : 68 > pla ;use stack to retrieve status -09c3 : 48 > pha +0a34 : 08 > php ;save status +0a35 : 68 > pla ;use stack to retrieve status +0a36 : 48 > pha > cmp_flag $ff-intdis -09c4 : c9fb > cmp #($ff-intdis|fao)&m8 ;expected flags + always on bits +0a37 : c9fb > cmp #($ff-intdis|fao)&m8 ;expected flags + always on bits > > trap_ne -09c6 : d0fe > bne * ;failed not equal (non zero) +0a39 : d0fe > bne * ;failed not equal (non zero) > -09c8 : 28 > plp ;restore status +0a3b : 28 > plp ;restore status -09c9 : 78 sei +0a3c : 78 sei tst_stat $ff -09ca : 08 > php ;save status -09cb : 68 > pla ;use stack to retrieve status -09cc : 48 > pha +0a3d : 08 > php ;save status +0a3e : 68 > pla ;use stack to retrieve status +0a3f : 48 > pha > cmp_flag $ff -09cd : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +0a40 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -09cf : d0fe > bne * ;failed not equal (non zero) +0a42 : d0fe > bne * ;failed not equal (non zero) > -09d1 : 28 > plp ;restore status +0a44 : 28 > plp ;restore status endif -09d2 : d8 cld +0a45 : d8 cld tst_stat $ff-decmode -09d3 : 08 > php ;save status -09d4 : 68 > pla ;use stack to retrieve status -09d5 : 48 > pha +0a46 : 08 > php ;save status +0a47 : 68 > pla ;use stack to retrieve status +0a48 : 48 > pha > cmp_flag $ff-decmode -09d6 : c9f7 > cmp #($ff-decmode|fao)&m8 ;expected flags + always on bits +0a49 : c9f7 > cmp #($ff-decmode|fao)&m8 ;expected flags + always on bits > > trap_ne -09d8 : d0fe > bne * ;failed not equal (non zero) +0a4b : d0fe > bne * ;failed not equal (non zero) > -09da : 28 > plp ;restore status +0a4d : 28 > plp ;restore status -09db : f8 sed +0a4e : f8 sed tst_stat $ff -09dc : 08 > php ;save status -09dd : 68 > pla ;use stack to retrieve status -09de : 48 > pha +0a4f : 08 > php ;save status +0a50 : 68 > pla ;use stack to retrieve status +0a51 : 48 > pha > cmp_flag $ff -09df : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +0a52 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -09e1 : d0fe > bne * ;failed not equal (non zero) +0a54 : d0fe > bne * ;failed not equal (non zero) > -09e3 : 28 > plp ;restore status +0a56 : 28 > plp ;restore status -09e4 : b8 clv +0a57 : b8 clv tst_stat $ff-overfl -09e5 : 08 > php ;save status -09e6 : 68 > pla ;use stack to retrieve status -09e7 : 48 > pha +0a58 : 08 > php ;save status +0a59 : 68 > pla ;use stack to retrieve status +0a5a : 48 > pha > cmp_flag $ff-overfl -09e8 : c9bf > cmp #($ff-overfl|fao)&m8 ;expected flags + always on bits +0a5b : c9bf > cmp #($ff-overfl|fao)&m8 ;expected flags + always on bits > > trap_ne -09ea : d0fe > bne * ;failed not equal (non zero) +0a5d : d0fe > bne * ;failed not equal (non zero) > -09ec : 28 > plp ;restore status +0a5f : 28 > plp ;restore status set_stat 0 > load_flag 0 -09ed : a900 > lda #0 ;allow test to change I-flag (no mask) +0a60 : a900 > lda #0 ;allow test to change I-flag (no mask) > -09ef : 48 > pha ;use stack to load status -09f0 : 28 > plp +0a62 : 48 > pha ;use stack to load status +0a63 : 28 > plp tst_stat 0 -09f1 : 08 > php ;save status -09f2 : 68 > pla ;use stack to retrieve status -09f3 : 48 > pha +0a64 : 08 > php ;save status +0a65 : 68 > pla ;use stack to retrieve status +0a66 : 48 > pha > cmp_flag 0 -09f4 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +0a67 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -09f6 : d0fe > bne * ;failed not equal (non zero) +0a69 : d0fe > bne * ;failed not equal (non zero) > -09f8 : 28 > plp ;restore status +0a6b : 28 > plp ;restore status -09f9 : 38 sec +0a6c : 38 sec tst_stat carry -09fa : 08 > php ;save status -09fb : 68 > pla ;use stack to retrieve status -09fc : 48 > pha +0a6d : 08 > php ;save status +0a6e : 68 > pla ;use stack to retrieve status +0a6f : 48 > pha > cmp_flag carry -09fd : c931 > cmp #(carry|fao)&m8 ;expected flags + always on bits +0a70 : c931 > cmp #(carry|fao)&m8 ;expected flags + always on bits > > trap_ne -09ff : d0fe > bne * ;failed not equal (non zero) +0a72 : d0fe > bne * ;failed not equal (non zero) > -0a01 : 28 > plp ;restore status +0a74 : 28 > plp ;restore status -0a02 : 18 clc +0a75 : 18 clc tst_stat 0 -0a03 : 08 > php ;save status -0a04 : 68 > pla ;use stack to retrieve status -0a05 : 48 > pha +0a76 : 08 > php ;save status +0a77 : 68 > pla ;use stack to retrieve status +0a78 : 48 > pha > cmp_flag 0 -0a06 : c930 > cmp #(0 |fao)&m8 ;expected flags + always on bits +0a79 : c930 > cmp #(0 |fao)&m8 ;expected flags + always on bits > > trap_ne -0a08 : d0fe > bne * ;failed not equal (non zero) +0a7b : d0fe > bne * ;failed not equal (non zero) > -0a0a : 28 > plp ;restore status +0a7d : 28 > plp ;restore status if I_flag = 3 -0a0b : 78 sei +0a7e : 78 sei tst_stat intdis -0a0c : 08 > php ;save status -0a0d : 68 > pla ;use stack to retrieve status -0a0e : 48 > pha +0a7f : 08 > php ;save status +0a80 : 68 > pla ;use stack to retrieve status +0a81 : 48 > pha > cmp_flag intdis -0a0f : c934 > cmp #(intdis|fao)&m8 ;expected flags + always on bits +0a82 : c934 > cmp #(intdis|fao)&m8 ;expected flags + always on bits > > trap_ne -0a11 : d0fe > bne * ;failed not equal (non zero) +0a84 : d0fe > bne * ;failed not equal (non zero) > -0a13 : 28 > plp ;restore status +0a86 : 28 > plp ;restore status -0a14 : 58 cli +0a87 : 58 cli tst_stat 0 -0a15 : 08 > php ;save status -0a16 : 68 > pla ;use stack to retrieve status -0a17 : 48 > pha +0a88 : 08 > php ;save status +0a89 : 68 > pla ;use stack to retrieve status +0a8a : 48 > pha > cmp_flag 0 -0a18 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +0a8b : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -0a1a : d0fe > bne * ;failed not equal (non zero) +0a8d : d0fe > bne * ;failed not equal (non zero) > -0a1c : 28 > plp ;restore status +0a8f : 28 > plp ;restore status endif -0a1d : f8 sed +0a90 : f8 sed tst_stat decmode -0a1e : 08 > php ;save status -0a1f : 68 > pla ;use stack to retrieve status -0a20 : 48 > pha +0a91 : 08 > php ;save status +0a92 : 68 > pla ;use stack to retrieve status +0a93 : 48 > pha > cmp_flag decmode -0a21 : c938 > cmp #(decmode|fao)&m8 ;expected flags + always on bits +0a94 : c938 > cmp #(decmode|fao)&m8 ;expected flags + always on bits > > trap_ne -0a23 : d0fe > bne * ;failed not equal (non zero) +0a96 : d0fe > bne * ;failed not equal (non zero) > -0a25 : 28 > plp ;restore status +0a98 : 28 > plp ;restore status -0a26 : d8 cld +0a99 : d8 cld tst_stat 0 -0a27 : 08 > php ;save status -0a28 : 68 > pla ;use stack to retrieve status -0a29 : 48 > pha +0a9a : 08 > php ;save status +0a9b : 68 > pla ;use stack to retrieve status +0a9c : 48 > pha > cmp_flag 0 -0a2a : c930 > cmp #(0 |fao)&m8 ;expected flags + always on bits +0a9d : c930 > cmp #(0 |fao)&m8 ;expected flags + always on bits > > trap_ne -0a2c : d0fe > bne * ;failed not equal (non zero) +0a9f : d0fe > bne * ;failed not equal (non zero) > -0a2e : 28 > plp ;restore status +0aa1 : 28 > plp ;restore status set_stat overfl > load_flag overfl -0a2f : a940 > lda #overfl ;allow test to change I-flag (no mask) +0aa2 : a940 > lda #overfl ;allow test to change I-flag (no mask) > -0a31 : 48 > pha ;use stack to load status -0a32 : 28 > plp +0aa4 : 48 > pha ;use stack to load status +0aa5 : 28 > plp tst_stat overfl -0a33 : 08 > php ;save status -0a34 : 68 > pla ;use stack to retrieve status -0a35 : 48 > pha +0aa6 : 08 > php ;save status +0aa7 : 68 > pla ;use stack to retrieve status +0aa8 : 48 > pha > cmp_flag overfl -0a36 : c970 > cmp #(overfl|fao)&m8 ;expected flags + always on bits +0aa9 : c970 > cmp #(overfl|fao)&m8 ;expected flags + always on bits > > trap_ne -0a38 : d0fe > bne * ;failed not equal (non zero) +0aab : d0fe > bne * ;failed not equal (non zero) > -0a3a : 28 > plp ;restore status +0aad : 28 > plp ;restore status -0a3b : b8 clv +0aae : b8 clv tst_stat 0 -0a3c : 08 > php ;save status -0a3d : 68 > pla ;use stack to retrieve status -0a3e : 48 > pha +0aaf : 08 > php ;save status +0ab0 : 68 > pla ;use stack to retrieve status +0ab1 : 48 > pha > cmp_flag 0 -0a3f : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +0ab2 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -0a41 : d0fe > bne * ;failed not equal (non zero) +0ab4 : d0fe > bne * ;failed not equal (non zero) > -0a43 : 28 > plp ;restore status +0ab6 : 28 > plp ;restore status next_test -0a44 : ad0002 > lda test_case ;previous test -0a47 : c90c > cmp #test_num +0ab7 : ad0002 > lda test_case ;previous test +0aba : c90c > cmp #test_num > trap_ne ;test is out of sequence -0a49 : d0fe > bne * ;failed not equal (non zero) +0abc : d0fe > bne * ;failed not equal (non zero) > 000d = >test_num = test_num + 1 -0a4b : a90d > lda #test_num ;*** next tests' number -0a4d : 8d0002 > sta test_case +0abe : a90d > lda #test_num ;*** next tests' number +0ac0 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; testing index register increment/decrement and transfer ; INX INY DEX DEY TAX TXA TAY TYA -0a50 : a2fe ldx #$fe +0ac3 : a2fe ldx #$fe set_stat $ff > load_flag $ff -0a52 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +0ac5 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -0a54 : 48 > pha ;use stack to load status -0a55 : 28 > plp +0ac7 : 48 > pha ;use stack to load status +0ac8 : 28 > plp -0a56 : e8 inx ;ff +0ac9 : e8 inx ;ff tst_x $ff,$ff-zero -0a57 : 08 > php ;save flags -0a58 : e0ff > cpx #$ff ;test result - > trap_ne -0a5a : d0fe > bne * ;failed not equal (non zero) - > -0a5c : 68 > pla ;load status -0a5d : 48 > pha - > cmp_flag $ff-zero -0a5e : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits - > - > trap_ne -0a60 : d0fe > bne * ;failed not equal (non zero) - > -0a62 : 28 > plp ;restore status - -0a63 : e8 inx ;00 - tst_x 0,$ff-minus -0a64 : 08 > php ;save flags -0a65 : e000 > cpx #0 ;test result - > trap_ne -0a67 : d0fe > bne * ;failed not equal (non zero) - > -0a69 : 68 > pla ;load status -0a6a : 48 > pha - > cmp_flag $ff-minus -0a6b : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits - > - > trap_ne -0a6d : d0fe > bne * ;failed not equal (non zero) - > -0a6f : 28 > plp ;restore status - -0a70 : e8 inx ;01 - tst_x 1,$ff-minus-zero -0a71 : 08 > php ;save flags -0a72 : e001 > cpx #1 ;test result - > trap_ne -0a74 : d0fe > bne * ;failed not equal (non zero) - > -0a76 : 68 > pla ;load status -0a77 : 48 > pha - > cmp_flag $ff-minus-zero -0a78 : c97d > cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits - > - > trap_ne -0a7a : d0fe > bne * ;failed not equal (non zero) - > -0a7c : 28 > plp ;restore status - -0a7d : ca dex ;00 - tst_x 0,$ff-minus -0a7e : 08 > php ;save flags -0a7f : e000 > cpx #0 ;test result - > trap_ne -0a81 : d0fe > bne * ;failed not equal (non zero) - > -0a83 : 68 > pla ;load status -0a84 : 48 > pha - > cmp_flag $ff-minus -0a85 : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits - > - > trap_ne -0a87 : d0fe > bne * ;failed not equal (non zero) - > -0a89 : 28 > plp ;restore status - -0a8a : ca dex ;ff - tst_x $ff,$ff-zero -0a8b : 08 > php ;save flags -0a8c : e0ff > cpx #$ff ;test result - > trap_ne -0a8e : d0fe > bne * ;failed not equal (non zero) - > -0a90 : 68 > pla ;load status -0a91 : 48 > pha - > cmp_flag $ff-zero -0a92 : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits - > - > trap_ne -0a94 : d0fe > bne * ;failed not equal (non zero) - > -0a96 : 28 > plp ;restore status - -0a97 : ca dex ;fe - set_stat 0 - > load_flag 0 -0a98 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -0a9a : 48 > pha ;use stack to load status -0a9b : 28 > plp - -0a9c : e8 inx ;ff - tst_x $ff,minus -0a9d : 08 > php ;save flags -0a9e : e0ff > cpx #$ff ;test result - > trap_ne -0aa0 : d0fe > bne * ;failed not equal (non zero) - > -0aa2 : 68 > pla ;load status -0aa3 : 48 > pha - > cmp_flag minus -0aa4 : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits - > - > trap_ne -0aa6 : d0fe > bne * ;failed not equal (non zero) - > -0aa8 : 28 > plp ;restore status - -0aa9 : e8 inx ;00 - tst_x 0,zero -0aaa : 08 > php ;save flags -0aab : e000 > cpx #0 ;test result - > trap_ne -0aad : d0fe > bne * ;failed not equal (non zero) - > -0aaf : 68 > pla ;load status -0ab0 : 48 > pha - > cmp_flag zero -0ab1 : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits - > - > trap_ne -0ab3 : d0fe > bne * ;failed not equal (non zero) - > -0ab5 : 28 > plp ;restore status - -0ab6 : e8 inx ;01 - tst_x 1,0 -0ab7 : 08 > php ;save flags -0ab8 : e001 > cpx #1 ;test result - > trap_ne -0aba : d0fe > bne * ;failed not equal (non zero) - > -0abc : 68 > pla ;load status -0abd : 48 > pha - > cmp_flag 0 -0abe : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits - > - > trap_ne -0ac0 : d0fe > bne * ;failed not equal (non zero) - > -0ac2 : 28 > plp ;restore status - -0ac3 : ca dex ;00 - tst_x 0,zero -0ac4 : 08 > php ;save flags -0ac5 : e000 > cpx #0 ;test result - > trap_ne -0ac7 : d0fe > bne * ;failed not equal (non zero) - > -0ac9 : 68 > pla ;load status -0aca : 48 > pha - > cmp_flag zero -0acb : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits - > +0aca : 08 > php ;save flags +0acb : e0ff > cpx #$ff ;test result > trap_ne 0acd : d0fe > bne * ;failed not equal (non zero) > -0acf : 28 > plp ;restore status - -0ad0 : ca dex ;ff - tst_x $ff,minus -0ad1 : 08 > php ;save flags -0ad2 : e0ff > cpx #$ff ;test result +0acf : 68 > pla ;load status +0ad0 : 48 > pha + > cmp_flag $ff-zero +0ad1 : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits + > > trap_ne -0ad4 : d0fe > bne * ;failed not equal (non zero) - > -0ad6 : 68 > pla ;load status -0ad7 : 48 > pha - > cmp_flag minus -0ad8 : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits +0ad3 : d0fe > bne * ;failed not equal (non zero) > +0ad5 : 28 > plp ;restore status + +0ad6 : e8 inx ;00 + tst_x 0,$ff-minus +0ad7 : 08 > php ;save flags +0ad8 : e000 > cpx #0 ;test result > trap_ne 0ada : d0fe > bne * ;failed not equal (non zero) > -0adc : 28 > plp ;restore status - - -0add : a0fe ldy #$fe - set_stat $ff - > load_flag $ff -0adf : a9ff > lda #$ff ;allow test to change I-flag (no mask) +0adc : 68 > pla ;load status +0add : 48 > pha + > cmp_flag $ff-minus +0ade : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits > -0ae1 : 48 > pha ;use stack to load status -0ae2 : 28 > plp + > trap_ne +0ae0 : d0fe > bne * ;failed not equal (non zero) + > +0ae2 : 28 > plp ;restore status -0ae3 : c8 iny ;ff - tst_y $ff,$ff-zero +0ae3 : e8 inx ;01 + tst_x 1,$ff-minus-zero 0ae4 : 08 > php ;save flags -0ae5 : c0ff > cpy #$ff ;test result +0ae5 : e001 > cpx #1 ;test result > trap_ne 0ae7 : d0fe > bne * ;failed not equal (non zero) > 0ae9 : 68 > pla ;load status 0aea : 48 > pha - > cmp_flag $ff-zero -0aeb : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits + > cmp_flag $ff-minus-zero +0aeb : c97d > cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits > > trap_ne 0aed : d0fe > bne * ;failed not equal (non zero) > 0aef : 28 > plp ;restore status -0af0 : c8 iny ;00 - tst_y 0,$ff-minus +0af0 : ca dex ;00 + tst_x 0,$ff-minus 0af1 : 08 > php ;save flags -0af2 : c000 > cpy #0 ;test result +0af2 : e000 > cpx #0 ;test result > trap_ne 0af4 : d0fe > bne * ;failed not equal (non zero) > @@ -2784,86 +2846,86 @@ ffff = ram_top = -1 > 0afc : 28 > plp ;restore status -0afd : c8 iny ;01 - tst_y 1,$ff-minus-zero +0afd : ca dex ;ff + tst_x $ff,$ff-zero 0afe : 08 > php ;save flags -0aff : c001 > cpy #1 ;test result +0aff : e0ff > cpx #$ff ;test result > trap_ne 0b01 : d0fe > bne * ;failed not equal (non zero) > 0b03 : 68 > pla ;load status 0b04 : 48 > pha - > cmp_flag $ff-minus-zero -0b05 : c97d > cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits + > cmp_flag $ff-zero +0b05 : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits > > trap_ne 0b07 : d0fe > bne * ;failed not equal (non zero) > 0b09 : 28 > plp ;restore status -0b0a : 88 dey ;00 - tst_y 0,$ff-minus -0b0b : 08 > php ;save flags -0b0c : c000 > cpy #0 ;test result - > trap_ne -0b0e : d0fe > bne * ;failed not equal (non zero) - > -0b10 : 68 > pla ;load status -0b11 : 48 > pha - > cmp_flag $ff-minus -0b12 : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits - > - > trap_ne -0b14 : d0fe > bne * ;failed not equal (non zero) - > -0b16 : 28 > plp ;restore status - -0b17 : 88 dey ;ff - tst_y $ff,$ff-zero -0b18 : 08 > php ;save flags -0b19 : c0ff > cpy #$ff ;test result - > trap_ne -0b1b : d0fe > bne * ;failed not equal (non zero) - > -0b1d : 68 > pla ;load status -0b1e : 48 > pha - > cmp_flag $ff-zero -0b1f : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits - > - > trap_ne -0b21 : d0fe > bne * ;failed not equal (non zero) - > -0b23 : 28 > plp ;restore status - -0b24 : 88 dey ;fe +0b0a : ca dex ;fe set_stat 0 > load_flag 0 -0b25 : a900 > lda #0 ;allow test to change I-flag (no mask) +0b0b : a900 > lda #0 ;allow test to change I-flag (no mask) > -0b27 : 48 > pha ;use stack to load status -0b28 : 28 > plp +0b0d : 48 > pha ;use stack to load status +0b0e : 28 > plp -0b29 : c8 iny ;ff - tst_y $ff,0+minus +0b0f : e8 inx ;ff + tst_x $ff,minus +0b10 : 08 > php ;save flags +0b11 : e0ff > cpx #$ff ;test result + > trap_ne +0b13 : d0fe > bne * ;failed not equal (non zero) + > +0b15 : 68 > pla ;load status +0b16 : 48 > pha + > cmp_flag minus +0b17 : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits + > + > trap_ne +0b19 : d0fe > bne * ;failed not equal (non zero) + > +0b1b : 28 > plp ;restore status + +0b1c : e8 inx ;00 + tst_x 0,zero +0b1d : 08 > php ;save flags +0b1e : e000 > cpx #0 ;test result + > trap_ne +0b20 : d0fe > bne * ;failed not equal (non zero) + > +0b22 : 68 > pla ;load status +0b23 : 48 > pha + > cmp_flag zero +0b24 : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits + > + > trap_ne +0b26 : d0fe > bne * ;failed not equal (non zero) + > +0b28 : 28 > plp ;restore status + +0b29 : e8 inx ;01 + tst_x 1,0 0b2a : 08 > php ;save flags -0b2b : c0ff > cpy #$ff ;test result +0b2b : e001 > cpx #1 ;test result > trap_ne 0b2d : d0fe > bne * ;failed not equal (non zero) > 0b2f : 68 > pla ;load status 0b30 : 48 > pha - > cmp_flag 0+minus -0b31 : c9b0 > cmp #(0+minus|fao)&m8 ;expected flags + always on bits + > cmp_flag 0 +0b31 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne 0b33 : d0fe > bne * ;failed not equal (non zero) > 0b35 : 28 > plp ;restore status -0b36 : c8 iny ;00 - tst_y 0,zero +0b36 : ca dex ;00 + tst_x 0,zero 0b37 : 08 > php ;save flags -0b38 : c000 > cpy #0 ;test result +0b38 : e000 > cpx #0 ;test result > trap_ne 0b3a : d0fe > bne * ;failed not equal (non zero) > @@ -2877,736 +2939,752 @@ ffff = ram_top = -1 > 0b42 : 28 > plp ;restore status -0b43 : c8 iny ;01 - tst_y 1,0 +0b43 : ca dex ;ff + tst_x $ff,minus 0b44 : 08 > php ;save flags -0b45 : c001 > cpy #1 ;test result +0b45 : e0ff > cpx #$ff ;test result > trap_ne 0b47 : d0fe > bne * ;failed not equal (non zero) > 0b49 : 68 > pla ;load status 0b4a : 48 > pha - > cmp_flag 0 -0b4b : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits + > cmp_flag minus +0b4b : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits > > trap_ne 0b4d : d0fe > bne * ;failed not equal (non zero) > 0b4f : 28 > plp ;restore status -0b50 : 88 dey ;00 - tst_y 0,zero -0b51 : 08 > php ;save flags -0b52 : c000 > cpy #0 ;test result - > trap_ne -0b54 : d0fe > bne * ;failed not equal (non zero) - > -0b56 : 68 > pla ;load status -0b57 : 48 > pha - > cmp_flag zero -0b58 : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits + +0b50 : a0fe ldy #$fe + set_stat $ff + > load_flag $ff +0b52 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > +0b54 : 48 > pha ;use stack to load status +0b55 : 28 > plp + +0b56 : c8 iny ;ff + tst_y $ff,$ff-zero +0b57 : 08 > php ;save flags +0b58 : c0ff > cpy #$ff ;test result > trap_ne 0b5a : d0fe > bne * ;failed not equal (non zero) > -0b5c : 28 > plp ;restore status - -0b5d : 88 dey ;ff - tst_y $ff,minus -0b5e : 08 > php ;save flags -0b5f : c0ff > cpy #$ff ;test result +0b5c : 68 > pla ;load status +0b5d : 48 > pha + > cmp_flag $ff-zero +0b5e : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits + > > trap_ne -0b61 : d0fe > bne * ;failed not equal (non zero) - > -0b63 : 68 > pla ;load status -0b64 : 48 > pha - > cmp_flag minus -0b65 : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits +0b60 : d0fe > bne * ;failed not equal (non zero) > +0b62 : 28 > plp ;restore status + +0b63 : c8 iny ;00 + tst_y 0,$ff-minus +0b64 : 08 > php ;save flags +0b65 : c000 > cpy #0 ;test result > trap_ne 0b67 : d0fe > bne * ;failed not equal (non zero) > -0b69 : 28 > plp ;restore status - - -0b6a : a2ff ldx #$ff - set_stat $ff - > load_flag $ff -0b6c : a9ff > lda #$ff ;allow test to change I-flag (no mask) +0b69 : 68 > pla ;load status +0b6a : 48 > pha + > cmp_flag $ff-minus +0b6b : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits > -0b6e : 48 > pha ;use stack to load status -0b6f : 28 > plp + > trap_ne +0b6d : d0fe > bne * ;failed not equal (non zero) + > +0b6f : 28 > plp ;restore status -0b70 : 8a txa - tst_a $ff,$ff-zero +0b70 : c8 iny ;01 + tst_y 1,$ff-minus-zero 0b71 : 08 > php ;save flags -0b72 : c9ff > cmp #$ff ;test result +0b72 : c001 > cpy #1 ;test result > trap_ne 0b74 : d0fe > bne * ;failed not equal (non zero) > 0b76 : 68 > pla ;load status 0b77 : 48 > pha - > cmp_flag $ff-zero -0b78 : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits + > cmp_flag $ff-minus-zero +0b78 : c97d > cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits > > trap_ne 0b7a : d0fe > bne * ;failed not equal (non zero) > 0b7c : 28 > plp ;restore status -0b7d : 08 php -0b7e : e8 inx ;00 -0b7f : 28 plp -0b80 : 8a txa - tst_a 0,$ff-minus -0b81 : 08 > php ;save flags -0b82 : c900 > cmp #0 ;test result +0b7d : 88 dey ;00 + tst_y 0,$ff-minus +0b7e : 08 > php ;save flags +0b7f : c000 > cpy #0 ;test result > trap_ne -0b84 : d0fe > bne * ;failed not equal (non zero) +0b81 : d0fe > bne * ;failed not equal (non zero) > -0b86 : 68 > pla ;load status -0b87 : 48 > pha +0b83 : 68 > pla ;load status +0b84 : 48 > pha > cmp_flag $ff-minus -0b88 : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits +0b85 : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits > > trap_ne -0b8a : d0fe > bne * ;failed not equal (non zero) +0b87 : d0fe > bne * ;failed not equal (non zero) > -0b8c : 28 > plp ;restore status +0b89 : 28 > plp ;restore status -0b8d : 08 php -0b8e : e8 inx ;01 -0b8f : 28 plp -0b90 : 8a txa - tst_a 1,$ff-minus-zero -0b91 : 08 > php ;save flags -0b92 : c901 > cmp #1 ;test result +0b8a : 88 dey ;ff + tst_y $ff,$ff-zero +0b8b : 08 > php ;save flags +0b8c : c0ff > cpy #$ff ;test result + > trap_ne +0b8e : d0fe > bne * ;failed not equal (non zero) + > +0b90 : 68 > pla ;load status +0b91 : 48 > pha + > cmp_flag $ff-zero +0b92 : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits + > > trap_ne 0b94 : d0fe > bne * ;failed not equal (non zero) > -0b96 : 68 > pla ;load status -0b97 : 48 > pha - > cmp_flag $ff-minus-zero -0b98 : c97d > cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits - > - > trap_ne -0b9a : d0fe > bne * ;failed not equal (non zero) - > -0b9c : 28 > plp ;restore status +0b96 : 28 > plp ;restore status +0b97 : 88 dey ;fe set_stat 0 > load_flag 0 -0b9d : a900 > lda #0 ;allow test to change I-flag (no mask) +0b98 : a900 > lda #0 ;allow test to change I-flag (no mask) > -0b9f : 48 > pha ;use stack to load status -0ba0 : 28 > plp +0b9a : 48 > pha ;use stack to load status +0b9b : 28 > plp -0ba1 : 8a txa - tst_a 1,0 -0ba2 : 08 > php ;save flags -0ba3 : c901 > cmp #1 ;test result +0b9c : c8 iny ;ff + tst_y $ff,0+minus +0b9d : 08 > php ;save flags +0b9e : c0ff > cpy #$ff ;test result > trap_ne -0ba5 : d0fe > bne * ;failed not equal (non zero) +0ba0 : d0fe > bne * ;failed not equal (non zero) > -0ba7 : 68 > pla ;load status -0ba8 : 48 > pha - > cmp_flag 0 -0ba9 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +0ba2 : 68 > pla ;load status +0ba3 : 48 > pha + > cmp_flag 0+minus +0ba4 : c9b0 > cmp #(0+minus|fao)&m8 ;expected flags + always on bits > > trap_ne -0bab : d0fe > bne * ;failed not equal (non zero) +0ba6 : d0fe > bne * ;failed not equal (non zero) > -0bad : 28 > plp ;restore status +0ba8 : 28 > plp ;restore status -0bae : 08 php -0baf : ca dex ;00 -0bb0 : 28 plp -0bb1 : 8a txa - tst_a 0,zero -0bb2 : 08 > php ;save flags -0bb3 : c900 > cmp #0 ;test result +0ba9 : c8 iny ;00 + tst_y 0,zero +0baa : 08 > php ;save flags +0bab : c000 > cpy #0 ;test result > trap_ne -0bb5 : d0fe > bne * ;failed not equal (non zero) +0bad : d0fe > bne * ;failed not equal (non zero) > -0bb7 : 68 > pla ;load status -0bb8 : 48 > pha +0baf : 68 > pla ;load status +0bb0 : 48 > pha > cmp_flag zero -0bb9 : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits +0bb1 : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits > > trap_ne -0bbb : d0fe > bne * ;failed not equal (non zero) +0bb3 : d0fe > bne * ;failed not equal (non zero) > -0bbd : 28 > plp ;restore status +0bb5 : 28 > plp ;restore status -0bbe : 08 php -0bbf : ca dex ;ff -0bc0 : 28 plp -0bc1 : 8a txa - tst_a $ff,minus -0bc2 : 08 > php ;save flags -0bc3 : c9ff > cmp #$ff ;test result +0bb6 : c8 iny ;01 + tst_y 1,0 +0bb7 : 08 > php ;save flags +0bb8 : c001 > cpy #1 ;test result > trap_ne -0bc5 : d0fe > bne * ;failed not equal (non zero) +0bba : d0fe > bne * ;failed not equal (non zero) > -0bc7 : 68 > pla ;load status -0bc8 : 48 > pha +0bbc : 68 > pla ;load status +0bbd : 48 > pha + > cmp_flag 0 +0bbe : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits + > + > trap_ne +0bc0 : d0fe > bne * ;failed not equal (non zero) + > +0bc2 : 28 > plp ;restore status + +0bc3 : 88 dey ;00 + tst_y 0,zero +0bc4 : 08 > php ;save flags +0bc5 : c000 > cpy #0 ;test result + > trap_ne +0bc7 : d0fe > bne * ;failed not equal (non zero) + > +0bc9 : 68 > pla ;load status +0bca : 48 > pha + > cmp_flag zero +0bcb : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits + > + > trap_ne +0bcd : d0fe > bne * ;failed not equal (non zero) + > +0bcf : 28 > plp ;restore status + +0bd0 : 88 dey ;ff + tst_y $ff,minus +0bd1 : 08 > php ;save flags +0bd2 : c0ff > cpy #$ff ;test result + > trap_ne +0bd4 : d0fe > bne * ;failed not equal (non zero) + > +0bd6 : 68 > pla ;load status +0bd7 : 48 > pha > cmp_flag minus -0bc9 : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits +0bd8 : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits > > trap_ne -0bcb : d0fe > bne * ;failed not equal (non zero) +0bda : d0fe > bne * ;failed not equal (non zero) > -0bcd : 28 > plp ;restore status +0bdc : 28 > plp ;restore status - -0bce : a0ff ldy #$ff + +0bdd : a2ff ldx #$ff set_stat $ff > load_flag $ff -0bd0 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +0bdf : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -0bd2 : 48 > pha ;use stack to load status -0bd3 : 28 > plp +0be1 : 48 > pha ;use stack to load status +0be2 : 28 > plp -0bd4 : 98 tya +0be3 : 8a txa tst_a $ff,$ff-zero -0bd5 : 08 > php ;save flags -0bd6 : c9ff > cmp #$ff ;test result +0be4 : 08 > php ;save flags +0be5 : c9ff > cmp #$ff ;test result > trap_ne -0bd8 : d0fe > bne * ;failed not equal (non zero) +0be7 : d0fe > bne * ;failed not equal (non zero) > -0bda : 68 > pla ;load status -0bdb : 48 > pha +0be9 : 68 > pla ;load status +0bea : 48 > pha > cmp_flag $ff-zero -0bdc : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits +0beb : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits > > trap_ne -0bde : d0fe > bne * ;failed not equal (non zero) +0bed : d0fe > bne * ;failed not equal (non zero) > -0be0 : 28 > plp ;restore status +0bef : 28 > plp ;restore status -0be1 : 08 php -0be2 : c8 iny ;00 -0be3 : 28 plp -0be4 : 98 tya +0bf0 : 08 php +0bf1 : e8 inx ;00 +0bf2 : 28 plp +0bf3 : 8a txa tst_a 0,$ff-minus -0be5 : 08 > php ;save flags -0be6 : c900 > cmp #0 ;test result +0bf4 : 08 > php ;save flags +0bf5 : c900 > cmp #0 ;test result > trap_ne -0be8 : d0fe > bne * ;failed not equal (non zero) +0bf7 : d0fe > bne * ;failed not equal (non zero) > -0bea : 68 > pla ;load status -0beb : 48 > pha +0bf9 : 68 > pla ;load status +0bfa : 48 > pha > cmp_flag $ff-minus -0bec : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits +0bfb : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits > > trap_ne -0bee : d0fe > bne * ;failed not equal (non zero) +0bfd : d0fe > bne * ;failed not equal (non zero) > -0bf0 : 28 > plp ;restore status +0bff : 28 > plp ;restore status -0bf1 : 08 php -0bf2 : c8 iny ;01 -0bf3 : 28 plp -0bf4 : 98 tya +0c00 : 08 php +0c01 : e8 inx ;01 +0c02 : 28 plp +0c03 : 8a txa tst_a 1,$ff-minus-zero -0bf5 : 08 > php ;save flags -0bf6 : c901 > cmp #1 ;test result +0c04 : 08 > php ;save flags +0c05 : c901 > cmp #1 ;test result > trap_ne -0bf8 : d0fe > bne * ;failed not equal (non zero) +0c07 : d0fe > bne * ;failed not equal (non zero) > -0bfa : 68 > pla ;load status -0bfb : 48 > pha +0c09 : 68 > pla ;load status +0c0a : 48 > pha > cmp_flag $ff-minus-zero -0bfc : c97d > cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits +0c0b : c97d > cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits > > trap_ne -0bfe : d0fe > bne * ;failed not equal (non zero) +0c0d : d0fe > bne * ;failed not equal (non zero) > -0c00 : 28 > plp ;restore status +0c0f : 28 > plp ;restore status set_stat 0 > load_flag 0 -0c01 : a900 > lda #0 ;allow test to change I-flag (no mask) +0c10 : a900 > lda #0 ;allow test to change I-flag (no mask) > -0c03 : 48 > pha ;use stack to load status -0c04 : 28 > plp +0c12 : 48 > pha ;use stack to load status +0c13 : 28 > plp -0c05 : 98 tya +0c14 : 8a txa tst_a 1,0 -0c06 : 08 > php ;save flags -0c07 : c901 > cmp #1 ;test result +0c15 : 08 > php ;save flags +0c16 : c901 > cmp #1 ;test result > trap_ne -0c09 : d0fe > bne * ;failed not equal (non zero) +0c18 : d0fe > bne * ;failed not equal (non zero) > -0c0b : 68 > pla ;load status -0c0c : 48 > pha +0c1a : 68 > pla ;load status +0c1b : 48 > pha > cmp_flag 0 -0c0d : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +0c1c : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -0c0f : d0fe > bne * ;failed not equal (non zero) +0c1e : d0fe > bne * ;failed not equal (non zero) > -0c11 : 28 > plp ;restore status +0c20 : 28 > plp ;restore status -0c12 : 08 php -0c13 : 88 dey ;00 -0c14 : 28 plp -0c15 : 98 tya +0c21 : 08 php +0c22 : ca dex ;00 +0c23 : 28 plp +0c24 : 8a txa tst_a 0,zero -0c16 : 08 > php ;save flags -0c17 : c900 > cmp #0 ;test result +0c25 : 08 > php ;save flags +0c26 : c900 > cmp #0 ;test result > trap_ne -0c19 : d0fe > bne * ;failed not equal (non zero) +0c28 : d0fe > bne * ;failed not equal (non zero) > -0c1b : 68 > pla ;load status -0c1c : 48 > pha +0c2a : 68 > pla ;load status +0c2b : 48 > pha > cmp_flag zero -0c1d : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits +0c2c : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits > > trap_ne -0c1f : d0fe > bne * ;failed not equal (non zero) +0c2e : d0fe > bne * ;failed not equal (non zero) > -0c21 : 28 > plp ;restore status +0c30 : 28 > plp ;restore status -0c22 : 08 php -0c23 : 88 dey ;ff -0c24 : 28 plp -0c25 : 98 tya +0c31 : 08 php +0c32 : ca dex ;ff +0c33 : 28 plp +0c34 : 8a txa tst_a $ff,minus -0c26 : 08 > php ;save flags -0c27 : c9ff > cmp #$ff ;test result +0c35 : 08 > php ;save flags +0c36 : c9ff > cmp #$ff ;test result > trap_ne -0c29 : d0fe > bne * ;failed not equal (non zero) +0c38 : d0fe > bne * ;failed not equal (non zero) > -0c2b : 68 > pla ;load status -0c2c : 48 > pha +0c3a : 68 > pla ;load status +0c3b : 48 > pha > cmp_flag minus -0c2d : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits +0c3c : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits > > trap_ne -0c2f : d0fe > bne * ;failed not equal (non zero) +0c3e : d0fe > bne * ;failed not equal (non zero) > -0c31 : 28 > plp ;restore status +0c40 : 28 > plp ;restore status + + +0c41 : a0ff ldy #$ff + set_stat $ff + > load_flag $ff +0c43 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +0c45 : 48 > pha ;use stack to load status +0c46 : 28 > plp + +0c47 : 98 tya + tst_a $ff,$ff-zero +0c48 : 08 > php ;save flags +0c49 : c9ff > cmp #$ff ;test result + > trap_ne +0c4b : d0fe > bne * ;failed not equal (non zero) + > +0c4d : 68 > pla ;load status +0c4e : 48 > pha + > cmp_flag $ff-zero +0c4f : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits + > + > trap_ne +0c51 : d0fe > bne * ;failed not equal (non zero) + > +0c53 : 28 > plp ;restore status + +0c54 : 08 php +0c55 : c8 iny ;00 +0c56 : 28 plp +0c57 : 98 tya + tst_a 0,$ff-minus +0c58 : 08 > php ;save flags +0c59 : c900 > cmp #0 ;test result + > trap_ne +0c5b : d0fe > bne * ;failed not equal (non zero) + > +0c5d : 68 > pla ;load status +0c5e : 48 > pha + > cmp_flag $ff-minus +0c5f : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits + > + > trap_ne +0c61 : d0fe > bne * ;failed not equal (non zero) + > +0c63 : 28 > plp ;restore status + +0c64 : 08 php +0c65 : c8 iny ;01 +0c66 : 28 plp +0c67 : 98 tya + tst_a 1,$ff-minus-zero +0c68 : 08 > php ;save flags +0c69 : c901 > cmp #1 ;test result + > trap_ne +0c6b : d0fe > bne * ;failed not equal (non zero) + > +0c6d : 68 > pla ;load status +0c6e : 48 > pha + > cmp_flag $ff-minus-zero +0c6f : c97d > cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits + > + > trap_ne +0c71 : d0fe > bne * ;failed not equal (non zero) + > +0c73 : 28 > plp ;restore status + + set_stat 0 + > load_flag 0 +0c74 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +0c76 : 48 > pha ;use stack to load status +0c77 : 28 > plp + +0c78 : 98 tya + tst_a 1,0 +0c79 : 08 > php ;save flags +0c7a : c901 > cmp #1 ;test result + > trap_ne +0c7c : d0fe > bne * ;failed not equal (non zero) + > +0c7e : 68 > pla ;load status +0c7f : 48 > pha + > cmp_flag 0 +0c80 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits + > + > trap_ne +0c82 : d0fe > bne * ;failed not equal (non zero) + > +0c84 : 28 > plp ;restore status + +0c85 : 08 php +0c86 : 88 dey ;00 +0c87 : 28 plp +0c88 : 98 tya + tst_a 0,zero +0c89 : 08 > php ;save flags +0c8a : c900 > cmp #0 ;test result + > trap_ne +0c8c : d0fe > bne * ;failed not equal (non zero) + > +0c8e : 68 > pla ;load status +0c8f : 48 > pha + > cmp_flag zero +0c90 : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits + > + > trap_ne +0c92 : d0fe > bne * ;failed not equal (non zero) + > +0c94 : 28 > plp ;restore status + +0c95 : 08 php +0c96 : 88 dey ;ff +0c97 : 28 plp +0c98 : 98 tya + tst_a $ff,minus +0c99 : 08 > php ;save flags +0c9a : c9ff > cmp #$ff ;test result + > trap_ne +0c9c : d0fe > bne * ;failed not equal (non zero) + > +0c9e : 68 > pla ;load status +0c9f : 48 > pha + > cmp_flag minus +0ca0 : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits + > + > trap_ne +0ca2 : d0fe > bne * ;failed not equal (non zero) + > +0ca4 : 28 > plp ;restore status load_flag $ff -0c32 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +0ca5 : a9ff > lda #$ff ;allow test to change I-flag (no mask) -0c34 : 48 pha -0c35 : a2ff ldx #$ff ;ff -0c37 : 8a txa -0c38 : 28 plp -0c39 : a8 tay +0ca7 : 48 pha +0ca8 : a2ff ldx #$ff ;ff +0caa : 8a txa +0cab : 28 plp +0cac : a8 tay tst_y $ff,$ff-zero -0c3a : 08 > php ;save flags -0c3b : c0ff > cpy #$ff ;test result +0cad : 08 > php ;save flags +0cae : c0ff > cpy #$ff ;test result > trap_ne -0c3d : d0fe > bne * ;failed not equal (non zero) +0cb0 : d0fe > bne * ;failed not equal (non zero) > -0c3f : 68 > pla ;load status -0c40 : 48 > pha +0cb2 : 68 > pla ;load status +0cb3 : 48 > pha > cmp_flag $ff-zero -0c41 : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits +0cb4 : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits > > trap_ne -0c43 : d0fe > bne * ;failed not equal (non zero) +0cb6 : d0fe > bne * ;failed not equal (non zero) > -0c45 : 28 > plp ;restore status +0cb8 : 28 > plp ;restore status -0c46 : 08 php -0c47 : e8 inx ;00 -0c48 : 8a txa -0c49 : 28 plp -0c4a : a8 tay +0cb9 : 08 php +0cba : e8 inx ;00 +0cbb : 8a txa +0cbc : 28 plp +0cbd : a8 tay tst_y 0,$ff-minus -0c4b : 08 > php ;save flags -0c4c : c000 > cpy #0 ;test result +0cbe : 08 > php ;save flags +0cbf : c000 > cpy #0 ;test result > trap_ne -0c4e : d0fe > bne * ;failed not equal (non zero) +0cc1 : d0fe > bne * ;failed not equal (non zero) > -0c50 : 68 > pla ;load status -0c51 : 48 > pha +0cc3 : 68 > pla ;load status +0cc4 : 48 > pha > cmp_flag $ff-minus -0c52 : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits +0cc5 : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits > > trap_ne -0c54 : d0fe > bne * ;failed not equal (non zero) +0cc7 : d0fe > bne * ;failed not equal (non zero) > -0c56 : 28 > plp ;restore status +0cc9 : 28 > plp ;restore status -0c57 : 08 php -0c58 : e8 inx ;01 -0c59 : 8a txa -0c5a : 28 plp -0c5b : a8 tay +0cca : 08 php +0ccb : e8 inx ;01 +0ccc : 8a txa +0ccd : 28 plp +0cce : a8 tay tst_y 1,$ff-minus-zero -0c5c : 08 > php ;save flags -0c5d : c001 > cpy #1 ;test result +0ccf : 08 > php ;save flags +0cd0 : c001 > cpy #1 ;test result > trap_ne -0c5f : d0fe > bne * ;failed not equal (non zero) +0cd2 : d0fe > bne * ;failed not equal (non zero) > -0c61 : 68 > pla ;load status -0c62 : 48 > pha +0cd4 : 68 > pla ;load status +0cd5 : 48 > pha > cmp_flag $ff-minus-zero -0c63 : c97d > cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits +0cd6 : c97d > cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits > > trap_ne -0c65 : d0fe > bne * ;failed not equal (non zero) +0cd8 : d0fe > bne * ;failed not equal (non zero) > -0c67 : 28 > plp ;restore status +0cda : 28 > plp ;restore status load_flag 0 -0c68 : a900 > lda #0 ;allow test to change I-flag (no mask) +0cdb : a900 > lda #0 ;allow test to change I-flag (no mask) -0c6a : 48 pha -0c6b : a900 lda #0 -0c6d : 8a txa -0c6e : 28 plp -0c6f : a8 tay +0cdd : 48 pha +0cde : a900 lda #0 +0ce0 : 8a txa +0ce1 : 28 plp +0ce2 : a8 tay tst_y 1,0 -0c70 : 08 > php ;save flags -0c71 : c001 > cpy #1 ;test result +0ce3 : 08 > php ;save flags +0ce4 : c001 > cpy #1 ;test result > trap_ne -0c73 : d0fe > bne * ;failed not equal (non zero) +0ce6 : d0fe > bne * ;failed not equal (non zero) > -0c75 : 68 > pla ;load status -0c76 : 48 > pha +0ce8 : 68 > pla ;load status +0ce9 : 48 > pha > cmp_flag 0 -0c77 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +0cea : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -0c79 : d0fe > bne * ;failed not equal (non zero) +0cec : d0fe > bne * ;failed not equal (non zero) > -0c7b : 28 > plp ;restore status +0cee : 28 > plp ;restore status -0c7c : 08 php -0c7d : ca dex ;00 -0c7e : 8a txa -0c7f : 28 plp -0c80 : a8 tay +0cef : 08 php +0cf0 : ca dex ;00 +0cf1 : 8a txa +0cf2 : 28 plp +0cf3 : a8 tay tst_y 0,zero -0c81 : 08 > php ;save flags -0c82 : c000 > cpy #0 ;test result +0cf4 : 08 > php ;save flags +0cf5 : c000 > cpy #0 ;test result > trap_ne -0c84 : d0fe > bne * ;failed not equal (non zero) +0cf7 : d0fe > bne * ;failed not equal (non zero) > -0c86 : 68 > pla ;load status -0c87 : 48 > pha +0cf9 : 68 > pla ;load status +0cfa : 48 > pha > cmp_flag zero -0c88 : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits +0cfb : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits > > trap_ne -0c8a : d0fe > bne * ;failed not equal (non zero) +0cfd : d0fe > bne * ;failed not equal (non zero) > -0c8c : 28 > plp ;restore status +0cff : 28 > plp ;restore status -0c8d : 08 php -0c8e : ca dex ;ff -0c8f : 8a txa -0c90 : 28 plp -0c91 : a8 tay +0d00 : 08 php +0d01 : ca dex ;ff +0d02 : 8a txa +0d03 : 28 plp +0d04 : a8 tay tst_y $ff,minus -0c92 : 08 > php ;save flags -0c93 : c0ff > cpy #$ff ;test result +0d05 : 08 > php ;save flags +0d06 : c0ff > cpy #$ff ;test result > trap_ne -0c95 : d0fe > bne * ;failed not equal (non zero) +0d08 : d0fe > bne * ;failed not equal (non zero) > -0c97 : 68 > pla ;load status -0c98 : 48 > pha +0d0a : 68 > pla ;load status +0d0b : 48 > pha > cmp_flag minus -0c99 : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits +0d0c : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits > > trap_ne -0c9b : d0fe > bne * ;failed not equal (non zero) +0d0e : d0fe > bne * ;failed not equal (non zero) > -0c9d : 28 > plp ;restore status +0d10 : 28 > plp ;restore status load_flag $ff -0c9e : a9ff > lda #$ff ;allow test to change I-flag (no mask) +0d11 : a9ff > lda #$ff ;allow test to change I-flag (no mask) -0ca0 : 48 pha -0ca1 : a0ff ldy #$ff ;ff -0ca3 : 98 tya -0ca4 : 28 plp -0ca5 : aa tax +0d13 : 48 pha +0d14 : a0ff ldy #$ff ;ff +0d16 : 98 tya +0d17 : 28 plp +0d18 : aa tax tst_x $ff,$ff-zero -0ca6 : 08 > php ;save flags -0ca7 : e0ff > cpx #$ff ;test result +0d19 : 08 > php ;save flags +0d1a : e0ff > cpx #$ff ;test result > trap_ne -0ca9 : d0fe > bne * ;failed not equal (non zero) +0d1c : d0fe > bne * ;failed not equal (non zero) > -0cab : 68 > pla ;load status -0cac : 48 > pha +0d1e : 68 > pla ;load status +0d1f : 48 > pha > cmp_flag $ff-zero -0cad : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits +0d20 : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits > > trap_ne -0caf : d0fe > bne * ;failed not equal (non zero) +0d22 : d0fe > bne * ;failed not equal (non zero) > -0cb1 : 28 > plp ;restore status +0d24 : 28 > plp ;restore status -0cb2 : 08 php -0cb3 : c8 iny ;00 -0cb4 : 98 tya -0cb5 : 28 plp -0cb6 : aa tax +0d25 : 08 php +0d26 : c8 iny ;00 +0d27 : 98 tya +0d28 : 28 plp +0d29 : aa tax tst_x 0,$ff-minus -0cb7 : 08 > php ;save flags -0cb8 : e000 > cpx #0 ;test result +0d2a : 08 > php ;save flags +0d2b : e000 > cpx #0 ;test result > trap_ne -0cba : d0fe > bne * ;failed not equal (non zero) +0d2d : d0fe > bne * ;failed not equal (non zero) > -0cbc : 68 > pla ;load status -0cbd : 48 > pha +0d2f : 68 > pla ;load status +0d30 : 48 > pha > cmp_flag $ff-minus -0cbe : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits +0d31 : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits > > trap_ne -0cc0 : d0fe > bne * ;failed not equal (non zero) +0d33 : d0fe > bne * ;failed not equal (non zero) > -0cc2 : 28 > plp ;restore status +0d35 : 28 > plp ;restore status -0cc3 : 08 php -0cc4 : c8 iny ;01 -0cc5 : 98 tya -0cc6 : 28 plp -0cc7 : aa tax +0d36 : 08 php +0d37 : c8 iny ;01 +0d38 : 98 tya +0d39 : 28 plp +0d3a : aa tax tst_x 1,$ff-minus-zero -0cc8 : 08 > php ;save flags -0cc9 : e001 > cpx #1 ;test result +0d3b : 08 > php ;save flags +0d3c : e001 > cpx #1 ;test result > trap_ne -0ccb : d0fe > bne * ;failed not equal (non zero) +0d3e : d0fe > bne * ;failed not equal (non zero) > -0ccd : 68 > pla ;load status -0cce : 48 > pha +0d40 : 68 > pla ;load status +0d41 : 48 > pha > cmp_flag $ff-minus-zero -0ccf : c97d > cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits +0d42 : c97d > cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits > > trap_ne -0cd1 : d0fe > bne * ;failed not equal (non zero) +0d44 : d0fe > bne * ;failed not equal (non zero) > -0cd3 : 28 > plp ;restore status +0d46 : 28 > plp ;restore status load_flag 0 -0cd4 : a900 > lda #0 ;allow test to change I-flag (no mask) +0d47 : a900 > lda #0 ;allow test to change I-flag (no mask) -0cd6 : 48 pha -0cd7 : a900 lda #0 ;preset status -0cd9 : 98 tya -0cda : 28 plp -0cdb : aa tax +0d49 : 48 pha +0d4a : a900 lda #0 ;preset status +0d4c : 98 tya +0d4d : 28 plp +0d4e : aa tax tst_x 1,0 -0cdc : 08 > php ;save flags -0cdd : e001 > cpx #1 ;test result +0d4f : 08 > php ;save flags +0d50 : e001 > cpx #1 ;test result > trap_ne -0cdf : d0fe > bne * ;failed not equal (non zero) +0d52 : d0fe > bne * ;failed not equal (non zero) > -0ce1 : 68 > pla ;load status -0ce2 : 48 > pha +0d54 : 68 > pla ;load status +0d55 : 48 > pha > cmp_flag 0 -0ce3 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +0d56 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -0ce5 : d0fe > bne * ;failed not equal (non zero) +0d58 : d0fe > bne * ;failed not equal (non zero) > -0ce7 : 28 > plp ;restore status +0d5a : 28 > plp ;restore status -0ce8 : 08 php -0ce9 : 88 dey ;00 -0cea : 98 tya -0ceb : 28 plp -0cec : aa tax +0d5b : 08 php +0d5c : 88 dey ;00 +0d5d : 98 tya +0d5e : 28 plp +0d5f : aa tax tst_x 0,zero -0ced : 08 > php ;save flags -0cee : e000 > cpx #0 ;test result +0d60 : 08 > php ;save flags +0d61 : e000 > cpx #0 ;test result > trap_ne -0cf0 : d0fe > bne * ;failed not equal (non zero) +0d63 : d0fe > bne * ;failed not equal (non zero) > -0cf2 : 68 > pla ;load status -0cf3 : 48 > pha +0d65 : 68 > pla ;load status +0d66 : 48 > pha > cmp_flag zero -0cf4 : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits +0d67 : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits > > trap_ne -0cf6 : d0fe > bne * ;failed not equal (non zero) +0d69 : d0fe > bne * ;failed not equal (non zero) > -0cf8 : 28 > plp ;restore status +0d6b : 28 > plp ;restore status -0cf9 : 08 php -0cfa : 88 dey ;ff -0cfb : 98 tya -0cfc : 28 plp -0cfd : aa tax +0d6c : 08 php +0d6d : 88 dey ;ff +0d6e : 98 tya +0d6f : 28 plp +0d70 : aa tax tst_x $ff,minus -0cfe : 08 > php ;save flags -0cff : e0ff > cpx #$ff ;test result +0d71 : 08 > php ;save flags +0d72 : e0ff > cpx #$ff ;test result > trap_ne -0d01 : d0fe > bne * ;failed not equal (non zero) +0d74 : d0fe > bne * ;failed not equal (non zero) > -0d03 : 68 > pla ;load status -0d04 : 48 > pha +0d76 : 68 > pla ;load status +0d77 : 48 > pha > cmp_flag minus -0d05 : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits +0d78 : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits > > trap_ne -0d07 : d0fe > bne * ;failed not equal (non zero) +0d7a : d0fe > bne * ;failed not equal (non zero) > -0d09 : 28 > plp ;restore status +0d7c : 28 > plp ;restore status next_test -0d0a : ad0002 > lda test_case ;previous test -0d0d : c90d > cmp #test_num +0d7d : ad0002 > lda test_case ;previous test +0d80 : c90d > cmp #test_num > trap_ne ;test is out of sequence -0d0f : d0fe > bne * ;failed not equal (non zero) +0d82 : d0fe > bne * ;failed not equal (non zero) > 000e = >test_num = test_num + 1 -0d11 : a90e > lda #test_num ;*** next tests' number -0d13 : 8d0002 > sta test_case +0d84 : a90e > lda #test_num ;*** next tests' number +0d86 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ;TSX sets NZ - TXS does not -0d16 : a201 ldx #1 ;01 - set_stat $ff - > load_flag $ff -0d18 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -0d1a : 48 > pha ;use stack to load status -0d1b : 28 > plp - -0d1c : 9a txs -0d1d : 08 php -0d1e : ad0101 lda $101 - cmp_flag $ff -0d21 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits - - trap_ne -0d23 : d0fe > bne * ;failed not equal (non zero) - - set_stat 0 - > load_flag 0 -0d25 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -0d27 : 48 > pha ;use stack to load status -0d28 : 28 > plp - -0d29 : 9a txs -0d2a : 08 php -0d2b : ad0101 lda $101 - cmp_flag 0 -0d2e : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits - - trap_ne -0d30 : d0fe > bne * ;failed not equal (non zero) - -0d32 : ca dex ;00 - set_stat $ff - > load_flag $ff -0d33 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -0d35 : 48 > pha ;use stack to load status -0d36 : 28 > plp - -0d37 : 9a txs -0d38 : 08 php -0d39 : ad0001 lda $100 - cmp_flag $ff -0d3c : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits - - trap_ne -0d3e : d0fe > bne * ;failed not equal (non zero) - - set_stat 0 - > load_flag 0 -0d40 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -0d42 : 48 > pha ;use stack to load status -0d43 : 28 > plp - -0d44 : 9a txs -0d45 : 08 php -0d46 : ad0001 lda $100 - cmp_flag 0 -0d49 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits - - trap_ne -0d4b : d0fe > bne * ;failed not equal (non zero) - -0d4d : ca dex ;ff - set_stat $ff - > load_flag $ff -0d4e : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -0d50 : 48 > pha ;use stack to load status -0d51 : 28 > plp - -0d52 : 9a txs -0d53 : 08 php -0d54 : adff01 lda $1ff - cmp_flag $ff -0d57 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits - - trap_ne -0d59 : d0fe > bne * ;failed not equal (non zero) - - set_stat 0 - > load_flag 0 -0d5b : a900 > lda #0 ;allow test to change I-flag (no mask) - > -0d5d : 48 > pha ;use stack to load status -0d5e : 28 > plp - -0d5f : 9a txs -0d60 : 08 php -0d61 : adff01 lda $1ff - cmp_flag 0 -0d64 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits - - -0d66 : a201 ldx #1 -0d68 : 9a txs ;sp=01 - set_stat $ff - > load_flag $ff -0d69 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -0d6b : 48 > pha ;use stack to load status -0d6c : 28 > plp - -0d6d : ba tsx ;clears Z, N -0d6e : 08 php ;sp=00 -0d6f : e001 cpx #1 - trap_ne -0d71 : d0fe > bne * ;failed not equal (non zero) - -0d73 : ad0101 lda $101 - cmp_flag $ff-minus-zero -0d76 : c97d > cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits - - trap_ne -0d78 : d0fe > bne * ;failed not equal (non zero) - - set_stat $ff - > load_flag $ff -0d7a : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -0d7c : 48 > pha ;use stack to load status -0d7d : 28 > plp - -0d7e : ba tsx ;clears N, sets Z -0d7f : 08 php ;sp=ff -0d80 : e000 cpx #0 - trap_ne -0d82 : d0fe > bne * ;failed not equal (non zero) - -0d84 : ad0001 lda $100 - cmp_flag $ff-minus -0d87 : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits - - trap_ne -0d89 : d0fe > bne * ;failed not equal (non zero) - + ; This section also tests for proper stack wrap around. +0d89 : a201 ldx #1 ;01 set_stat $ff > load_flag $ff 0d8b : a9ff > lda #$ff ;allow test to change I-flag (no mask) @@ -3614,3075 +3692,3213 @@ ffff = ram_top = -1 0d8d : 48 > pha ;use stack to load status 0d8e : 28 > plp -0d8f : ba tsx ;clears N, sets Z -0d90 : 08 php ;sp=fe -0d91 : e0ff cpx #$ff - trap_ne -0d93 : d0fe > bne * ;failed not equal (non zero) - -0d95 : adff01 lda $1ff - cmp_flag $ff-zero -0d98 : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits +0d8f : 9a txs +0d90 : 08 php +0d91 : ad0101 lda $101 + cmp_flag $ff +0d94 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits trap_ne -0d9a : d0fe > bne * ;failed not equal (non zero) +0d96 : d0fe > bne * ;failed not equal (non zero) - -0d9c : a201 ldx #1 -0d9e : 9a txs ;sp=01 set_stat 0 > load_flag 0 -0d9f : a900 > lda #0 ;allow test to change I-flag (no mask) +0d98 : a900 > lda #0 ;allow test to change I-flag (no mask) > -0da1 : 48 > pha ;use stack to load status -0da2 : 28 > plp +0d9a : 48 > pha ;use stack to load status +0d9b : 28 > plp -0da3 : ba tsx ;clears Z, N -0da4 : 08 php ;sp=00 -0da5 : e001 cpx #1 - trap_ne -0da7 : d0fe > bne * ;failed not equal (non zero) - -0da9 : ad0101 lda $101 +0d9c : 9a txs +0d9d : 08 php +0d9e : ad0101 lda $101 cmp_flag 0 -0dac : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +0da1 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits trap_ne -0dae : d0fe > bne * ;failed not equal (non zero) +0da3 : d0fe > bne * ;failed not equal (non zero) - set_stat 0 - > load_flag 0 -0db0 : a900 > lda #0 ;allow test to change I-flag (no mask) +0da5 : ca dex ;00 + set_stat $ff + > load_flag $ff +0da6 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -0db2 : 48 > pha ;use stack to load status -0db3 : 28 > plp +0da8 : 48 > pha ;use stack to load status +0da9 : 28 > plp -0db4 : ba tsx ;clears N, sets Z -0db5 : 08 php ;sp=ff -0db6 : e000 cpx #0 - trap_ne -0db8 : d0fe > bne * ;failed not equal (non zero) - -0dba : ad0001 lda $100 - cmp_flag zero -0dbd : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits +0daa : 9a txs +0dab : 08 php +0dac : ad0001 lda $100 + cmp_flag $ff +0daf : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits trap_ne -0dbf : d0fe > bne * ;failed not equal (non zero) +0db1 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -0dc1 : a900 > lda #0 ;allow test to change I-flag (no mask) +0db3 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +0db5 : 48 > pha ;use stack to load status +0db6 : 28 > plp + +0db7 : 9a txs +0db8 : 08 php +0db9 : ad0001 lda $100 + cmp_flag 0 +0dbc : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits + + trap_ne +0dbe : d0fe > bne * ;failed not equal (non zero) + +0dc0 : ca dex ;ff + set_stat $ff + > load_flag $ff +0dc1 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > 0dc3 : 48 > pha ;use stack to load status 0dc4 : 28 > plp -0dc5 : ba tsx ;clears N, sets Z -0dc6 : 08 php ;sp=fe -0dc7 : e0ff cpx #$ff - trap_ne -0dc9 : d0fe > bne * ;failed not equal (non zero) +0dc5 : 9a txs +0dc6 : 08 php +0dc7 : adff01 lda $1ff + cmp_flag $ff +0dca : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits -0dcb : adff01 lda $1ff + trap_ne +0dcc : d0fe > bne * ;failed not equal (non zero) + + set_stat 0 + > load_flag 0 +0dce : a900 > lda #0 ;allow test to change I-flag (no mask) + > +0dd0 : 48 > pha ;use stack to load status +0dd1 : 28 > plp + +0dd2 : 9a txs +0dd3 : 08 php +0dd4 : adff01 lda $1ff + cmp_flag 0 +0dd7 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits + + +0dd9 : a201 ldx #1 +0ddb : 9a txs ;sp=01 + set_stat $ff + > load_flag $ff +0ddc : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +0dde : 48 > pha ;use stack to load status +0ddf : 28 > plp + +0de0 : ba tsx ;clears Z, N +0de1 : 08 php ;sp=00 +0de2 : e001 cpx #1 + trap_ne +0de4 : d0fe > bne * ;failed not equal (non zero) + +0de6 : ad0101 lda $101 + cmp_flag $ff-minus-zero +0de9 : c97d > cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits + + trap_ne +0deb : d0fe > bne * ;failed not equal (non zero) + + set_stat $ff + > load_flag $ff +0ded : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +0def : 48 > pha ;use stack to load status +0df0 : 28 > plp + +0df1 : ba tsx ;clears N, sets Z +0df2 : 08 php ;sp=ff +0df3 : e000 cpx #0 + trap_ne +0df5 : d0fe > bne * ;failed not equal (non zero) + +0df7 : ad0001 lda $100 + cmp_flag $ff-minus +0dfa : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits + + trap_ne +0dfc : d0fe > bne * ;failed not equal (non zero) + + set_stat $ff + > load_flag $ff +0dfe : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +0e00 : 48 > pha ;use stack to load status +0e01 : 28 > plp + +0e02 : ba tsx ;clears N, sets Z +0e03 : 08 php ;sp=fe +0e04 : e0ff cpx #$ff + trap_ne +0e06 : d0fe > bne * ;failed not equal (non zero) + +0e08 : adff01 lda $1ff + cmp_flag $ff-zero +0e0b : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits + + trap_ne +0e0d : d0fe > bne * ;failed not equal (non zero) + + +0e0f : a201 ldx #1 +0e11 : 9a txs ;sp=01 + set_stat 0 + > load_flag 0 +0e12 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +0e14 : 48 > pha ;use stack to load status +0e15 : 28 > plp + +0e16 : ba tsx ;clears Z, N +0e17 : 08 php ;sp=00 +0e18 : e001 cpx #1 + trap_ne +0e1a : d0fe > bne * ;failed not equal (non zero) + +0e1c : ad0101 lda $101 + cmp_flag 0 +0e1f : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits + + trap_ne +0e21 : d0fe > bne * ;failed not equal (non zero) + + set_stat 0 + > load_flag 0 +0e23 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +0e25 : 48 > pha ;use stack to load status +0e26 : 28 > plp + +0e27 : ba tsx ;clears N, sets Z +0e28 : 08 php ;sp=ff +0e29 : e000 cpx #0 + trap_ne +0e2b : d0fe > bne * ;failed not equal (non zero) + +0e2d : ad0001 lda $100 + cmp_flag zero +0e30 : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits + + trap_ne +0e32 : d0fe > bne * ;failed not equal (non zero) + + set_stat 0 + > load_flag 0 +0e34 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +0e36 : 48 > pha ;use stack to load status +0e37 : 28 > plp + +0e38 : ba tsx ;clears N, sets Z +0e39 : 08 php ;sp=fe +0e3a : e0ff cpx #$ff + trap_ne +0e3c : d0fe > bne * ;failed not equal (non zero) + +0e3e : adff01 lda $1ff cmp_flag minus -0dce : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits +0e41 : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits trap_ne -0dd0 : d0fe > bne * ;failed not equal (non zero) +0e43 : d0fe > bne * ;failed not equal (non zero) -0dd2 : 68 pla ;sp=ff +0e45 : 68 pla ;sp=ff next_test -0dd3 : ad0002 > lda test_case ;previous test -0dd6 : c90e > cmp #test_num +0e46 : ad0002 > lda test_case ;previous test +0e49 : c90e > cmp #test_num > trap_ne ;test is out of sequence -0dd8 : d0fe > bne * ;failed not equal (non zero) +0e4b : d0fe > bne * ;failed not equal (non zero) > 000f = >test_num = test_num + 1 -0dda : a90f > lda #test_num ;*** next tests' number -0ddc : 8d0002 > sta test_case +0e4d : a90f > lda #test_num ;*** next tests' number +0e4f : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; testing index register load & store LDY LDX STY STX all addressing modes ; LDX / STX - zp,y / abs,y -0ddf : a003 ldy #3 -0de1 : tldx +0e52 : a003 ldy #3 +0e54 : tldx set_stat 0 > load_flag 0 -0de1 : a900 > lda #0 ;allow test to change I-flag (no mask) +0e54 : a900 > lda #0 ;allow test to change I-flag (no mask) > -0de3 : 48 > pha ;use stack to load status -0de4 : 28 > plp +0e56 : 48 > pha ;use stack to load status +0e57 : 28 > plp -0de5 : b613 ldx zp1,y -0de7 : 08 php ;test stores do not alter flags -0de8 : 8a txa -0de9 : 49c3 eor #$c3 -0deb : 28 plp -0dec : 990302 sta abst,y -0def : 08 php ;flags after load/store sequence -0df0 : 49c3 eor #$c3 -0df2 : d90802 cmp abs1,y ;test result - trap_ne -0df5 : d0fe > bne * ;failed not equal (non zero) - -0df7 : 68 pla ;load status - eor_flag 0 -0df8 : 4930 > eor #0|fao ;invert expected flags + always on bits - -0dfa : d90d02 cmp fLDx,y ;test flags - trap_ne -0dfd : d0fe > bne * ;failed not equal (non zero) - -0dff : 88 dey -0e00 : 10df bpl tldx - -0e02 : a003 ldy #3 -0e04 : tldx1 - set_stat $ff - > load_flag $ff -0e04 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -0e06 : 48 > pha ;use stack to load status -0e07 : 28 > plp - -0e08 : b613 ldx zp1,y -0e0a : 08 php ;test stores do not alter flags -0e0b : 8a txa -0e0c : 49c3 eor #$c3 -0e0e : 28 plp -0e0f : 990302 sta abst,y -0e12 : 08 php ;flags after load/store sequence -0e13 : 49c3 eor #$c3 -0e15 : d90802 cmp abs1,y ;test result - trap_ne -0e18 : d0fe > bne * ;failed not equal (non zero) - -0e1a : 68 pla ;load status - eor_flag lo~fnz ;mask bits not altered -0e1b : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits - -0e1d : d90d02 cmp fLDx,y ;test flags - trap_ne -0e20 : d0fe > bne * ;failed not equal (non zero) - -0e22 : 88 dey -0e23 : 10df bpl tldx1 - -0e25 : a003 ldy #3 -0e27 : tldx2 - set_stat 0 - > load_flag 0 -0e27 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -0e29 : 48 > pha ;use stack to load status -0e2a : 28 > plp - -0e2b : be0802 ldx abs1,y -0e2e : 08 php ;test stores do not alter flags -0e2f : 8a txa -0e30 : 49c3 eor #$c3 -0e32 : aa tax -0e33 : 28 plp -0e34 : 960c stx zpt,y -0e36 : 08 php ;flags after load/store sequence -0e37 : 49c3 eor #$c3 -0e39 : d91300 cmp zp1,y ;test result - trap_ne -0e3c : d0fe > bne * ;failed not equal (non zero) - -0e3e : 68 pla ;load status - eor_flag 0 -0e3f : 4930 > eor #0|fao ;invert expected flags + always on bits - -0e41 : d90d02 cmp fLDx,y ;test flags - trap_ne -0e44 : d0fe > bne * ;failed not equal (non zero) - -0e46 : 88 dey -0e47 : 10de bpl tldx2 - -0e49 : a003 ldy #3 -0e4b : tldx3 - set_stat $ff - > load_flag $ff -0e4b : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -0e4d : 48 > pha ;use stack to load status -0e4e : 28 > plp - -0e4f : be0802 ldx abs1,y -0e52 : 08 php ;test stores do not alter flags -0e53 : 8a txa -0e54 : 49c3 eor #$c3 -0e56 : aa tax -0e57 : 28 plp -0e58 : 960c stx zpt,y -0e5a : 08 php ;flags after load/store sequence -0e5b : 49c3 eor #$c3 -0e5d : d91300 cmp zp1,y ;test result - trap_ne -0e60 : d0fe > bne * ;failed not equal (non zero) - -0e62 : 68 pla ;load status - eor_flag lo~fnz ;mask bits not altered -0e63 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits - -0e65 : d90d02 cmp fLDx,y ;test flags +0e58 : b613 ldx zp1,y +0e5a : 08 php ;test stores do not alter flags +0e5b : 8a txa +0e5c : 49c3 eor #$c3 +0e5e : 28 plp +0e5f : 990302 sta abst,y +0e62 : 08 php ;flags after load/store sequence +0e63 : 49c3 eor #$c3 +0e65 : d91702 cmp abs1,y ;test result trap_ne 0e68 : d0fe > bne * ;failed not equal (non zero) -0e6a : 88 dey -0e6b : 10de bpl tldx3 - -0e6d : a003 ldy #3 ;testing store result -0e6f : a200 ldx #0 -0e71 : b90c00 tstx lda zpt,y -0e74 : 49c3 eor #$c3 -0e76 : d91300 cmp zp1,y - trap_ne ;store to zp data -0e79 : d0fe > bne * ;failed not equal (non zero) +0e6a : 68 pla ;load status + eor_flag 0 +0e6b : 4930 > eor #0|fao ;invert expected flags + always on bits -0e7b : 960c stx zpt,y ;clear -0e7d : b90302 lda abst,y -0e80 : 49c3 eor #$c3 -0e82 : d90802 cmp abs1,y - trap_ne ;store to abs data -0e85 : d0fe > bne * ;failed not equal (non zero) +0e6d : d91c02 cmp fLDx,y ;test flags + trap_ne +0e70 : d0fe > bne * ;failed not equal (non zero) -0e87 : 8a txa -0e88 : 990302 sta abst,y ;clear -0e8b : 88 dey -0e8c : 10e3 bpl tstx - next_test -0e8e : ad0002 > lda test_case ;previous test -0e91 : c90f > cmp #test_num - > trap_ne ;test is out of sequence +0e72 : 88 dey +0e73 : 10df bpl tldx + +0e75 : a003 ldy #3 +0e77 : tldx1 + set_stat $ff + > load_flag $ff +0e77 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +0e79 : 48 > pha ;use stack to load status +0e7a : 28 > plp + +0e7b : b613 ldx zp1,y +0e7d : 08 php ;test stores do not alter flags +0e7e : 8a txa +0e7f : 49c3 eor #$c3 +0e81 : 28 plp +0e82 : 990302 sta abst,y +0e85 : 08 php ;flags after load/store sequence +0e86 : 49c3 eor #$c3 +0e88 : d91702 cmp abs1,y ;test result + trap_ne +0e8b : d0fe > bne * ;failed not equal (non zero) + +0e8d : 68 pla ;load status + eor_flag lo~fnz ;mask bits not altered +0e8e : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits + +0e90 : d91c02 cmp fLDx,y ;test flags + trap_ne 0e93 : d0fe > bne * ;failed not equal (non zero) + +0e95 : 88 dey +0e96 : 10df bpl tldx1 + +0e98 : a003 ldy #3 +0e9a : tldx2 + set_stat 0 + > load_flag 0 +0e9a : a900 > lda #0 ;allow test to change I-flag (no mask) + > +0e9c : 48 > pha ;use stack to load status +0e9d : 28 > plp + +0e9e : be1702 ldx abs1,y +0ea1 : 08 php ;test stores do not alter flags +0ea2 : 8a txa +0ea3 : 49c3 eor #$c3 +0ea5 : aa tax +0ea6 : 28 plp +0ea7 : 960c stx zpt,y +0ea9 : 08 php ;flags after load/store sequence +0eaa : 49c3 eor #$c3 +0eac : d91300 cmp zp1,y ;test result + trap_ne +0eaf : d0fe > bne * ;failed not equal (non zero) + +0eb1 : 68 pla ;load status + eor_flag 0 +0eb2 : 4930 > eor #0|fao ;invert expected flags + always on bits + +0eb4 : d91c02 cmp fLDx,y ;test flags + trap_ne +0eb7 : d0fe > bne * ;failed not equal (non zero) + +0eb9 : 88 dey +0eba : 10de bpl tldx2 + +0ebc : a003 ldy #3 +0ebe : tldx3 + set_stat $ff + > load_flag $ff +0ebe : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +0ec0 : 48 > pha ;use stack to load status +0ec1 : 28 > plp + +0ec2 : be1702 ldx abs1,y +0ec5 : 08 php ;test stores do not alter flags +0ec6 : 8a txa +0ec7 : 49c3 eor #$c3 +0ec9 : aa tax +0eca : 28 plp +0ecb : 960c stx zpt,y +0ecd : 08 php ;flags after load/store sequence +0ece : 49c3 eor #$c3 +0ed0 : d91300 cmp zp1,y ;test result + trap_ne +0ed3 : d0fe > bne * ;failed not equal (non zero) + +0ed5 : 68 pla ;load status + eor_flag lo~fnz ;mask bits not altered +0ed6 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits + +0ed8 : d91c02 cmp fLDx,y ;test flags + trap_ne +0edb : d0fe > bne * ;failed not equal (non zero) + +0edd : 88 dey +0ede : 10de bpl tldx3 + +0ee0 : a003 ldy #3 ;testing store result +0ee2 : a200 ldx #0 +0ee4 : b90c00 tstx lda zpt,y +0ee7 : 49c3 eor #$c3 +0ee9 : d91300 cmp zp1,y + trap_ne ;store to zp data +0eec : d0fe > bne * ;failed not equal (non zero) + +0eee : 960c stx zpt,y ;clear +0ef0 : b90302 lda abst,y +0ef3 : 49c3 eor #$c3 +0ef5 : d91702 cmp abs1,y + trap_ne ;store to abs data +0ef8 : d0fe > bne * ;failed not equal (non zero) + +0efa : 8a txa +0efb : 990302 sta abst,y ;clear +0efe : 88 dey +0eff : 10e3 bpl tstx + next_test +0f01 : ad0002 > lda test_case ;previous test +0f04 : c90f > cmp #test_num + > trap_ne ;test is out of sequence +0f06 : d0fe > bne * ;failed not equal (non zero) > 0010 = >test_num = test_num + 1 -0e95 : a910 > lda #test_num ;*** next tests' number -0e97 : 8d0002 > sta test_case +0f08 : a910 > lda #test_num ;*** next tests' number +0f0a : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; indexed wraparound test (only zp should wrap) -0e9a : a0fd ldy #3+$fa -0e9c : b619 tldx4 ldx zp1-$fa&$ff,y ;wrap on indexed zp -0e9e : 8a txa -0e9f : 990901 sta abst-$fa,y ;no STX abs,y! -0ea2 : 88 dey -0ea3 : c0fa cpy #$fa -0ea5 : b0f5 bcs tldx4 -0ea7 : a0fd ldy #3+$fa -0ea9 : be0e01 tldx5 ldx abs1-$fa,y ;no wrap on indexed abs -0eac : 9612 stx zpt-$fa&$ff,y -0eae : 88 dey -0eaf : c0fa cpy #$fa -0eb1 : b0f6 bcs tldx5 -0eb3 : a003 ldy #3 ;testing wraparound result -0eb5 : a200 ldx #0 -0eb7 : b90c00 tstx1 lda zpt,y -0eba : d91300 cmp zp1,y +0f0d : a0fd ldy #3+$fa +0f0f : b619 tldx4 ldx zp1-$fa&$ff,y ;wrap on indexed zp +0f11 : 8a txa +0f12 : 990901 sta abst-$fa,y ;no STX abs,y! +0f15 : 88 dey +0f16 : c0fa cpy #$fa +0f18 : b0f5 bcs tldx4 +0f1a : a0fd ldy #3+$fa +0f1c : be1d01 tldx5 ldx abs1-$fa,y ;no wrap on indexed abs +0f1f : 9612 stx zpt-$fa&$ff,y +0f21 : 88 dey +0f22 : c0fa cpy #$fa +0f24 : b0f6 bcs tldx5 +0f26 : a003 ldy #3 ;testing wraparound result +0f28 : a200 ldx #0 +0f2a : b90c00 tstx1 lda zpt,y +0f2d : d91300 cmp zp1,y trap_ne ;store to zp data -0ebd : d0fe > bne * ;failed not equal (non zero) +0f30 : d0fe > bne * ;failed not equal (non zero) -0ebf : 960c stx zpt,y ;clear -0ec1 : b90302 lda abst,y -0ec4 : d90802 cmp abs1,y +0f32 : 960c stx zpt,y ;clear +0f34 : b90302 lda abst,y +0f37 : d91702 cmp abs1,y trap_ne ;store to abs data -0ec7 : d0fe > bne * ;failed not equal (non zero) +0f3a : d0fe > bne * ;failed not equal (non zero) -0ec9 : 8a txa -0eca : 990302 sta abst,y ;clear -0ecd : 88 dey -0ece : 10e7 bpl tstx1 +0f3c : 8a txa +0f3d : 990302 sta abst,y ;clear +0f40 : 88 dey +0f41 : 10e7 bpl tstx1 next_test -0ed0 : ad0002 > lda test_case ;previous test -0ed3 : c910 > cmp #test_num +0f43 : ad0002 > lda test_case ;previous test +0f46 : c910 > cmp #test_num > trap_ne ;test is out of sequence -0ed5 : d0fe > bne * ;failed not equal (non zero) +0f48 : d0fe > bne * ;failed not equal (non zero) > 0011 = >test_num = test_num + 1 -0ed7 : a911 > lda #test_num ;*** next tests' number -0ed9 : 8d0002 > sta test_case +0f4a : a911 > lda #test_num ;*** next tests' number +0f4c : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; LDY / STY - zp,x / abs,x -0edc : a203 ldx #3 -0ede : tldy +0f4f : a203 ldx #3 +0f51 : tldy set_stat 0 > load_flag 0 -0ede : a900 > lda #0 ;allow test to change I-flag (no mask) +0f51 : a900 > lda #0 ;allow test to change I-flag (no mask) > -0ee0 : 48 > pha ;use stack to load status -0ee1 : 28 > plp +0f53 : 48 > pha ;use stack to load status +0f54 : 28 > plp -0ee2 : b413 ldy zp1,x -0ee4 : 08 php ;test stores do not alter flags -0ee5 : 98 tya -0ee6 : 49c3 eor #$c3 -0ee8 : 28 plp -0ee9 : 9d0302 sta abst,x -0eec : 08 php ;flags after load/store sequence -0eed : 49c3 eor #$c3 -0eef : dd0802 cmp abs1,x ;test result +0f55 : b413 ldy zp1,x +0f57 : 08 php ;test stores do not alter flags +0f58 : 98 tya +0f59 : 49c3 eor #$c3 +0f5b : 28 plp +0f5c : 9d0302 sta abst,x +0f5f : 08 php ;flags after load/store sequence +0f60 : 49c3 eor #$c3 +0f62 : dd1702 cmp abs1,x ;test result trap_ne -0ef2 : d0fe > bne * ;failed not equal (non zero) +0f65 : d0fe > bne * ;failed not equal (non zero) -0ef4 : 68 pla ;load status +0f67 : 68 pla ;load status eor_flag 0 -0ef5 : 4930 > eor #0|fao ;invert expected flags + always on bits +0f68 : 4930 > eor #0|fao ;invert expected flags + always on bits -0ef7 : dd0d02 cmp fLDx,x ;test flags +0f6a : dd1c02 cmp fLDx,x ;test flags trap_ne -0efa : d0fe > bne * ;failed not equal (non zero) +0f6d : d0fe > bne * ;failed not equal (non zero) -0efc : ca dex -0efd : 10df bpl tldy +0f6f : ca dex +0f70 : 10df bpl tldy -0eff : a203 ldx #3 -0f01 : tldy1 +0f72 : a203 ldx #3 +0f74 : tldy1 set_stat $ff > load_flag $ff -0f01 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +0f74 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -0f03 : 48 > pha ;use stack to load status -0f04 : 28 > plp +0f76 : 48 > pha ;use stack to load status +0f77 : 28 > plp -0f05 : b413 ldy zp1,x -0f07 : 08 php ;test stores do not alter flags -0f08 : 98 tya -0f09 : 49c3 eor #$c3 -0f0b : 28 plp -0f0c : 9d0302 sta abst,x -0f0f : 08 php ;flags after load/store sequence -0f10 : 49c3 eor #$c3 -0f12 : dd0802 cmp abs1,x ;test result +0f78 : b413 ldy zp1,x +0f7a : 08 php ;test stores do not alter flags +0f7b : 98 tya +0f7c : 49c3 eor #$c3 +0f7e : 28 plp +0f7f : 9d0302 sta abst,x +0f82 : 08 php ;flags after load/store sequence +0f83 : 49c3 eor #$c3 +0f85 : dd1702 cmp abs1,x ;test result trap_ne -0f15 : d0fe > bne * ;failed not equal (non zero) +0f88 : d0fe > bne * ;failed not equal (non zero) -0f17 : 68 pla ;load status +0f8a : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -0f18 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +0f8b : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -0f1a : dd0d02 cmp fLDx,x ;test flags +0f8d : dd1c02 cmp fLDx,x ;test flags trap_ne -0f1d : d0fe > bne * ;failed not equal (non zero) +0f90 : d0fe > bne * ;failed not equal (non zero) -0f1f : ca dex -0f20 : 10df bpl tldy1 +0f92 : ca dex +0f93 : 10df bpl tldy1 -0f22 : a203 ldx #3 -0f24 : tldy2 +0f95 : a203 ldx #3 +0f97 : tldy2 set_stat 0 > load_flag 0 -0f24 : a900 > lda #0 ;allow test to change I-flag (no mask) +0f97 : a900 > lda #0 ;allow test to change I-flag (no mask) > -0f26 : 48 > pha ;use stack to load status -0f27 : 28 > plp +0f99 : 48 > pha ;use stack to load status +0f9a : 28 > plp -0f28 : bc0802 ldy abs1,x -0f2b : 08 php ;test stores do not alter flags -0f2c : 98 tya -0f2d : 49c3 eor #$c3 -0f2f : a8 tay -0f30 : 28 plp -0f31 : 940c sty zpt,x -0f33 : 08 php ;flags after load/store sequence -0f34 : 49c3 eor #$c3 -0f36 : d513 cmp zp1,x ;test result +0f9b : bc1702 ldy abs1,x +0f9e : 08 php ;test stores do not alter flags +0f9f : 98 tya +0fa0 : 49c3 eor #$c3 +0fa2 : a8 tay +0fa3 : 28 plp +0fa4 : 940c sty zpt,x +0fa6 : 08 php ;flags after load/store sequence +0fa7 : 49c3 eor #$c3 +0fa9 : d513 cmp zp1,x ;test result trap_ne -0f38 : d0fe > bne * ;failed not equal (non zero) +0fab : d0fe > bne * ;failed not equal (non zero) -0f3a : 68 pla ;load status +0fad : 68 pla ;load status eor_flag 0 -0f3b : 4930 > eor #0|fao ;invert expected flags + always on bits +0fae : 4930 > eor #0|fao ;invert expected flags + always on bits -0f3d : dd0d02 cmp fLDx,x ;test flags +0fb0 : dd1c02 cmp fLDx,x ;test flags trap_ne -0f40 : d0fe > bne * ;failed not equal (non zero) +0fb3 : d0fe > bne * ;failed not equal (non zero) -0f42 : ca dex -0f43 : 10df bpl tldy2 +0fb5 : ca dex +0fb6 : 10df bpl tldy2 -0f45 : a203 ldx #3 -0f47 : tldy3 +0fb8 : a203 ldx #3 +0fba : tldy3 set_stat $ff > load_flag $ff -0f47 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +0fba : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -0f49 : 48 > pha ;use stack to load status -0f4a : 28 > plp +0fbc : 48 > pha ;use stack to load status +0fbd : 28 > plp -0f4b : bc0802 ldy abs1,x -0f4e : 08 php ;test stores do not alter flags -0f4f : 98 tya -0f50 : 49c3 eor #$c3 -0f52 : a8 tay -0f53 : 28 plp -0f54 : 940c sty zpt,x -0f56 : 08 php ;flags after load/store sequence -0f57 : 49c3 eor #$c3 -0f59 : d513 cmp zp1,x ;test result +0fbe : bc1702 ldy abs1,x +0fc1 : 08 php ;test stores do not alter flags +0fc2 : 98 tya +0fc3 : 49c3 eor #$c3 +0fc5 : a8 tay +0fc6 : 28 plp +0fc7 : 940c sty zpt,x +0fc9 : 08 php ;flags after load/store sequence +0fca : 49c3 eor #$c3 +0fcc : d513 cmp zp1,x ;test result trap_ne -0f5b : d0fe > bne * ;failed not equal (non zero) +0fce : d0fe > bne * ;failed not equal (non zero) -0f5d : 68 pla ;load status +0fd0 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -0f5e : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +0fd1 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -0f60 : dd0d02 cmp fLDx,x ;test flags +0fd3 : dd1c02 cmp fLDx,x ;test flags trap_ne -0f63 : d0fe > bne * ;failed not equal (non zero) +0fd6 : d0fe > bne * ;failed not equal (non zero) -0f65 : ca dex -0f66 : 10df bpl tldy3 +0fd8 : ca dex +0fd9 : 10df bpl tldy3 -0f68 : a203 ldx #3 ;testing store result -0f6a : a000 ldy #0 -0f6c : b50c tsty lda zpt,x -0f6e : 49c3 eor #$c3 -0f70 : d513 cmp zp1,x +0fdb : a203 ldx #3 ;testing store result +0fdd : a000 ldy #0 +0fdf : b50c tsty lda zpt,x +0fe1 : 49c3 eor #$c3 +0fe3 : d513 cmp zp1,x trap_ne ;store to zp,x data -0f72 : d0fe > bne * ;failed not equal (non zero) +0fe5 : d0fe > bne * ;failed not equal (non zero) -0f74 : 940c sty zpt,x ;clear -0f76 : bd0302 lda abst,x -0f79 : 49c3 eor #$c3 -0f7b : dd0802 cmp abs1,x +0fe7 : 940c sty zpt,x ;clear +0fe9 : bd0302 lda abst,x +0fec : 49c3 eor #$c3 +0fee : dd1702 cmp abs1,x trap_ne ;store to abs,x data -0f7e : d0fe > bne * ;failed not equal (non zero) +0ff1 : d0fe > bne * ;failed not equal (non zero) -0f80 : 8a txa -0f81 : 9d0302 sta abst,x ;clear -0f84 : ca dex -0f85 : 10e5 bpl tsty +0ff3 : 8a txa +0ff4 : 9d0302 sta abst,x ;clear +0ff7 : ca dex +0ff8 : 10e5 bpl tsty next_test -0f87 : ad0002 > lda test_case ;previous test -0f8a : c911 > cmp #test_num +0ffa : ad0002 > lda test_case ;previous test +0ffd : c911 > cmp #test_num > trap_ne ;test is out of sequence -0f8c : d0fe > bne * ;failed not equal (non zero) +0fff : d0fe > bne * ;failed not equal (non zero) > 0012 = >test_num = test_num + 1 -0f8e : a912 > lda #test_num ;*** next tests' number -0f90 : 8d0002 > sta test_case +1001 : a912 > lda #test_num ;*** next tests' number +1003 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; indexed wraparound test (only zp should wrap) -0f93 : a2fd ldx #3+$fa -0f95 : b419 tldy4 ldy zp1-$fa&$ff,x ;wrap on indexed zp -0f97 : 98 tya -0f98 : 9d0901 sta abst-$fa,x ;no STX abs,x! -0f9b : ca dex -0f9c : e0fa cpx #$fa -0f9e : b0f5 bcs tldy4 -0fa0 : a2fd ldx #3+$fa -0fa2 : bc0e01 tldy5 ldy abs1-$fa,x ;no wrap on indexed abs -0fa5 : 9412 sty zpt-$fa&$ff,x -0fa7 : ca dex -0fa8 : e0fa cpx #$fa -0faa : b0f6 bcs tldy5 -0fac : a203 ldx #3 ;testing wraparound result -0fae : a000 ldy #0 -0fb0 : b50c tsty1 lda zpt,x -0fb2 : d513 cmp zp1,x +1006 : a2fd ldx #3+$fa +1008 : b419 tldy4 ldy zp1-$fa&$ff,x ;wrap on indexed zp +100a : 98 tya +100b : 9d0901 sta abst-$fa,x ;no STX abs,x! +100e : ca dex +100f : e0fa cpx #$fa +1011 : b0f5 bcs tldy4 +1013 : a2fd ldx #3+$fa +1015 : bc1d01 tldy5 ldy abs1-$fa,x ;no wrap on indexed abs +1018 : 9412 sty zpt-$fa&$ff,x +101a : ca dex +101b : e0fa cpx #$fa +101d : b0f6 bcs tldy5 +101f : a203 ldx #3 ;testing wraparound result +1021 : a000 ldy #0 +1023 : b50c tsty1 lda zpt,x +1025 : d513 cmp zp1,x trap_ne ;store to zp,x data -0fb4 : d0fe > bne * ;failed not equal (non zero) +1027 : d0fe > bne * ;failed not equal (non zero) -0fb6 : 940c sty zpt,x ;clear -0fb8 : bd0302 lda abst,x -0fbb : dd0802 cmp abs1,x +1029 : 940c sty zpt,x ;clear +102b : bd0302 lda abst,x +102e : dd1702 cmp abs1,x trap_ne ;store to abs,x data -0fbe : d0fe > bne * ;failed not equal (non zero) +1031 : d0fe > bne * ;failed not equal (non zero) -0fc0 : 8a txa -0fc1 : 9d0302 sta abst,x ;clear -0fc4 : ca dex -0fc5 : 10e9 bpl tsty1 +1033 : 8a txa +1034 : 9d0302 sta abst,x ;clear +1037 : ca dex +1038 : 10e9 bpl tsty1 next_test -0fc7 : ad0002 > lda test_case ;previous test -0fca : c912 > cmp #test_num +103a : ad0002 > lda test_case ;previous test +103d : c912 > cmp #test_num > trap_ne ;test is out of sequence -0fcc : d0fe > bne * ;failed not equal (non zero) +103f : d0fe > bne * ;failed not equal (non zero) > 0013 = >test_num = test_num + 1 -0fce : a913 > lda #test_num ;*** next tests' number -0fd0 : 8d0002 > sta test_case +1041 : a913 > lda #test_num ;*** next tests' number +1043 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; LDX / STX - zp / abs / # set_stat 0 > load_flag 0 -0fd3 : a900 > lda #0 ;allow test to change I-flag (no mask) +1046 : a900 > lda #0 ;allow test to change I-flag (no mask) > -0fd5 : 48 > pha ;use stack to load status -0fd6 : 28 > plp +1048 : 48 > pha ;use stack to load status +1049 : 28 > plp -0fd7 : a613 ldx zp1 -0fd9 : 08 php ;test stores do not alter flags -0fda : 8a txa -0fdb : 49c3 eor #$c3 -0fdd : aa tax -0fde : 28 plp -0fdf : 8e0302 stx abst -0fe2 : 08 php ;flags after load/store sequence -0fe3 : 49c3 eor #$c3 -0fe5 : aa tax -0fe6 : e0c3 cpx #$c3 ;test result +104a : a613 ldx zp1 +104c : 08 php ;test stores do not alter flags +104d : 8a txa +104e : 49c3 eor #$c3 +1050 : aa tax +1051 : 28 plp +1052 : 8e0302 stx abst +1055 : 08 php ;flags after load/store sequence +1056 : 49c3 eor #$c3 +1058 : aa tax +1059 : e0c3 cpx #$c3 ;test result trap_ne -0fe8 : d0fe > bne * ;failed not equal (non zero) +105b : d0fe > bne * ;failed not equal (non zero) -0fea : 68 pla ;load status +105d : 68 pla ;load status eor_flag 0 -0feb : 4930 > eor #0|fao ;invert expected flags + always on bits +105e : 4930 > eor #0|fao ;invert expected flags + always on bits -0fed : cd0d02 cmp fLDx ;test flags +1060 : cd1c02 cmp fLDx ;test flags trap_ne -0ff0 : d0fe > bne * ;failed not equal (non zero) +1063 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -0ff2 : a900 > lda #0 ;allow test to change I-flag (no mask) +1065 : a900 > lda #0 ;allow test to change I-flag (no mask) > -0ff4 : 48 > pha ;use stack to load status -0ff5 : 28 > plp +1067 : 48 > pha ;use stack to load status +1068 : 28 > plp -0ff6 : a614 ldx zp1+1 -0ff8 : 08 php ;test stores do not alter flags -0ff9 : 8a txa -0ffa : 49c3 eor #$c3 -0ffc : aa tax -0ffd : 28 plp -0ffe : 8e0402 stx abst+1 -1001 : 08 php ;flags after load/store sequence -1002 : 49c3 eor #$c3 -1004 : aa tax -1005 : e082 cpx #$82 ;test result +1069 : a614 ldx zp1+1 +106b : 08 php ;test stores do not alter flags +106c : 8a txa +106d : 49c3 eor #$c3 +106f : aa tax +1070 : 28 plp +1071 : 8e0402 stx abst+1 +1074 : 08 php ;flags after load/store sequence +1075 : 49c3 eor #$c3 +1077 : aa tax +1078 : e082 cpx #$82 ;test result trap_ne -1007 : d0fe > bne * ;failed not equal (non zero) +107a : d0fe > bne * ;failed not equal (non zero) -1009 : 68 pla ;load status +107c : 68 pla ;load status eor_flag 0 -100a : 4930 > eor #0|fao ;invert expected flags + always on bits +107d : 4930 > eor #0|fao ;invert expected flags + always on bits -100c : cd0e02 cmp fLDx+1 ;test flags +107f : cd1d02 cmp fLDx+1 ;test flags trap_ne -100f : d0fe > bne * ;failed not equal (non zero) +1082 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -1011 : a900 > lda #0 ;allow test to change I-flag (no mask) +1084 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1013 : 48 > pha ;use stack to load status -1014 : 28 > plp +1086 : 48 > pha ;use stack to load status +1087 : 28 > plp -1015 : a615 ldx zp1+2 -1017 : 08 php ;test stores do not alter flags -1018 : 8a txa -1019 : 49c3 eor #$c3 -101b : aa tax -101c : 28 plp -101d : 8e0502 stx abst+2 -1020 : 08 php ;flags after load/store sequence -1021 : 49c3 eor #$c3 -1023 : aa tax -1024 : e041 cpx #$41 ;test result +1088 : a615 ldx zp1+2 +108a : 08 php ;test stores do not alter flags +108b : 8a txa +108c : 49c3 eor #$c3 +108e : aa tax +108f : 28 plp +1090 : 8e0502 stx abst+2 +1093 : 08 php ;flags after load/store sequence +1094 : 49c3 eor #$c3 +1096 : aa tax +1097 : e041 cpx #$41 ;test result trap_ne -1026 : d0fe > bne * ;failed not equal (non zero) +1099 : d0fe > bne * ;failed not equal (non zero) -1028 : 68 pla ;load status +109b : 68 pla ;load status eor_flag 0 -1029 : 4930 > eor #0|fao ;invert expected flags + always on bits +109c : 4930 > eor #0|fao ;invert expected flags + always on bits -102b : cd0f02 cmp fLDx+2 ;test flags +109e : cd1e02 cmp fLDx+2 ;test flags trap_ne -102e : d0fe > bne * ;failed not equal (non zero) +10a1 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -1030 : a900 > lda #0 ;allow test to change I-flag (no mask) +10a3 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1032 : 48 > pha ;use stack to load status -1033 : 28 > plp +10a5 : 48 > pha ;use stack to load status +10a6 : 28 > plp -1034 : a616 ldx zp1+3 -1036 : 08 php ;test stores do not alter flags -1037 : 8a txa -1038 : 49c3 eor #$c3 -103a : aa tax -103b : 28 plp -103c : 8e0602 stx abst+3 -103f : 08 php ;flags after load/store sequence -1040 : 49c3 eor #$c3 -1042 : aa tax -1043 : e000 cpx #0 ;test result +10a7 : a616 ldx zp1+3 +10a9 : 08 php ;test stores do not alter flags +10aa : 8a txa +10ab : 49c3 eor #$c3 +10ad : aa tax +10ae : 28 plp +10af : 8e0602 stx abst+3 +10b2 : 08 php ;flags after load/store sequence +10b3 : 49c3 eor #$c3 +10b5 : aa tax +10b6 : e000 cpx #0 ;test result trap_ne -1045 : d0fe > bne * ;failed not equal (non zero) +10b8 : d0fe > bne * ;failed not equal (non zero) -1047 : 68 pla ;load status +10ba : 68 pla ;load status eor_flag 0 -1048 : 4930 > eor #0|fao ;invert expected flags + always on bits +10bb : 4930 > eor #0|fao ;invert expected flags + always on bits -104a : cd1002 cmp fLDx+3 ;test flags +10bd : cd1f02 cmp fLDx+3 ;test flags trap_ne -104d : d0fe > bne * ;failed not equal (non zero) +10c0 : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -104f : a9ff > lda #$ff ;allow test to change I-flag (no mask) +10c2 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1051 : 48 > pha ;use stack to load status -1052 : 28 > plp +10c4 : 48 > pha ;use stack to load status +10c5 : 28 > plp -1053 : a613 ldx zp1 -1055 : 08 php ;test stores do not alter flags -1056 : 8a txa -1057 : 49c3 eor #$c3 -1059 : aa tax -105a : 28 plp -105b : 8e0302 stx abst -105e : 08 php ;flags after load/store sequence -105f : 49c3 eor #$c3 -1061 : aa tax -1062 : e0c3 cpx #$c3 ;test result +10c6 : a613 ldx zp1 +10c8 : 08 php ;test stores do not alter flags +10c9 : 8a txa +10ca : 49c3 eor #$c3 +10cc : aa tax +10cd : 28 plp +10ce : 8e0302 stx abst +10d1 : 08 php ;flags after load/store sequence +10d2 : 49c3 eor #$c3 +10d4 : aa tax +10d5 : e0c3 cpx #$c3 ;test result trap_ne ; -1064 : d0fe > bne * ;failed not equal (non zero) +10d7 : d0fe > bne * ;failed not equal (non zero) -1066 : 68 pla ;load status +10d9 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -1067 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +10da : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -1069 : cd0d02 cmp fLDx ;test flags - trap_ne -106c : d0fe > bne * ;failed not equal (non zero) - - set_stat $ff - > load_flag $ff -106e : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -1070 : 48 > pha ;use stack to load status -1071 : 28 > plp - -1072 : a614 ldx zp1+1 -1074 : 08 php ;test stores do not alter flags -1075 : 8a txa -1076 : 49c3 eor #$c3 -1078 : aa tax -1079 : 28 plp -107a : 8e0402 stx abst+1 -107d : 08 php ;flags after load/store sequence -107e : 49c3 eor #$c3 -1080 : aa tax -1081 : e082 cpx #$82 ;test result - trap_ne -1083 : d0fe > bne * ;failed not equal (non zero) - -1085 : 68 pla ;load status - eor_flag lo~fnz ;mask bits not altered -1086 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits - -1088 : cd0e02 cmp fLDx+1 ;test flags - trap_ne -108b : d0fe > bne * ;failed not equal (non zero) - - set_stat $ff - > load_flag $ff -108d : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -108f : 48 > pha ;use stack to load status -1090 : 28 > plp - -1091 : a615 ldx zp1+2 -1093 : 08 php ;test stores do not alter flags -1094 : 8a txa -1095 : 49c3 eor #$c3 -1097 : aa tax -1098 : 28 plp -1099 : 8e0502 stx abst+2 -109c : 08 php ;flags after load/store sequence -109d : 49c3 eor #$c3 -109f : aa tax -10a0 : e041 cpx #$41 ;test result - trap_ne ; -10a2 : d0fe > bne * ;failed not equal (non zero) - -10a4 : 68 pla ;load status - eor_flag lo~fnz ;mask bits not altered -10a5 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits - -10a7 : cd0f02 cmp fLDx+2 ;test flags - trap_ne -10aa : d0fe > bne * ;failed not equal (non zero) - - set_stat $ff - > load_flag $ff -10ac : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -10ae : 48 > pha ;use stack to load status -10af : 28 > plp - -10b0 : a616 ldx zp1+3 -10b2 : 08 php ;test stores do not alter flags -10b3 : 8a txa -10b4 : 49c3 eor #$c3 -10b6 : aa tax -10b7 : 28 plp -10b8 : 8e0602 stx abst+3 -10bb : 08 php ;flags after load/store sequence -10bc : 49c3 eor #$c3 -10be : aa tax -10bf : e000 cpx #0 ;test result - trap_ne -10c1 : d0fe > bne * ;failed not equal (non zero) - -10c3 : 68 pla ;load status - eor_flag lo~fnz ;mask bits not altered -10c4 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits - -10c6 : cd1002 cmp fLDx+3 ;test flags - trap_ne -10c9 : d0fe > bne * ;failed not equal (non zero) - - - set_stat 0 - > load_flag 0 -10cb : a900 > lda #0 ;allow test to change I-flag (no mask) - > -10cd : 48 > pha ;use stack to load status -10ce : 28 > plp - -10cf : ae0802 ldx abs1 -10d2 : 08 php ;test stores do not alter flags -10d3 : 8a txa -10d4 : 49c3 eor #$c3 -10d6 : aa tax -10d7 : 28 plp -10d8 : 860c stx zpt -10da : 08 php ;flags after load/store sequence -10db : 49c3 eor #$c3 -10dd : c513 cmp zp1 ;test result +10dc : cd1c02 cmp fLDx ;test flags trap_ne 10df : d0fe > bne * ;failed not equal (non zero) -10e1 : 68 pla ;load status - eor_flag 0 -10e2 : 4930 > eor #0|fao ;invert expected flags + always on bits - -10e4 : cd0d02 cmp fLDx ;test flags - trap_ne -10e7 : d0fe > bne * ;failed not equal (non zero) - - set_stat 0 - > load_flag 0 -10e9 : a900 > lda #0 ;allow test to change I-flag (no mask) + set_stat $ff + > load_flag $ff +10e1 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -10eb : 48 > pha ;use stack to load status -10ec : 28 > plp +10e3 : 48 > pha ;use stack to load status +10e4 : 28 > plp -10ed : ae0902 ldx abs1+1 -10f0 : 08 php ;test stores do not alter flags -10f1 : 8a txa -10f2 : 49c3 eor #$c3 -10f4 : aa tax -10f5 : 28 plp -10f6 : 860d stx zpt+1 -10f8 : 08 php ;flags after load/store sequence -10f9 : 49c3 eor #$c3 -10fb : c514 cmp zp1+1 ;test result +10e5 : a614 ldx zp1+1 +10e7 : 08 php ;test stores do not alter flags +10e8 : 8a txa +10e9 : 49c3 eor #$c3 +10eb : aa tax +10ec : 28 plp +10ed : 8e0402 stx abst+1 +10f0 : 08 php ;flags after load/store sequence +10f1 : 49c3 eor #$c3 +10f3 : aa tax +10f4 : e082 cpx #$82 ;test result trap_ne -10fd : d0fe > bne * ;failed not equal (non zero) +10f6 : d0fe > bne * ;failed not equal (non zero) -10ff : 68 pla ;load status - eor_flag 0 -1100 : 4930 > eor #0|fao ;invert expected flags + always on bits +10f8 : 68 pla ;load status + eor_flag lo~fnz ;mask bits not altered +10f9 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -1102 : cd0e02 cmp fLDx+1 ;test flags +10fb : cd1d02 cmp fLDx+1 ;test flags trap_ne -1105 : d0fe > bne * ;failed not equal (non zero) +10fe : d0fe > bne * ;failed not equal (non zero) - set_stat 0 - > load_flag 0 -1107 : a900 > lda #0 ;allow test to change I-flag (no mask) + set_stat $ff + > load_flag $ff +1100 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1109 : 48 > pha ;use stack to load status -110a : 28 > plp +1102 : 48 > pha ;use stack to load status +1103 : 28 > plp -110b : ae0a02 ldx abs1+2 -110e : 08 php ;test stores do not alter flags -110f : 8a txa +1104 : a615 ldx zp1+2 +1106 : 08 php ;test stores do not alter flags +1107 : 8a txa +1108 : 49c3 eor #$c3 +110a : aa tax +110b : 28 plp +110c : 8e0502 stx abst+2 +110f : 08 php ;flags after load/store sequence 1110 : 49c3 eor #$c3 1112 : aa tax -1113 : 28 plp -1114 : 860e stx zpt+2 -1116 : 08 php ;flags after load/store sequence -1117 : 49c3 eor #$c3 -1119 : c515 cmp zp1+2 ;test result - trap_ne -111b : d0fe > bne * ;failed not equal (non zero) +1113 : e041 cpx #$41 ;test result + trap_ne ; +1115 : d0fe > bne * ;failed not equal (non zero) -111d : 68 pla ;load status - eor_flag 0 -111e : 4930 > eor #0|fao ;invert expected flags + always on bits +1117 : 68 pla ;load status + eor_flag lo~fnz ;mask bits not altered +1118 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -1120 : cd0f02 cmp fLDx+2 ;test flags +111a : cd1e02 cmp fLDx+2 ;test flags trap_ne -1123 : d0fe > bne * ;failed not equal (non zero) +111d : d0fe > bne * ;failed not equal (non zero) + + set_stat $ff + > load_flag $ff +111f : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +1121 : 48 > pha ;use stack to load status +1122 : 28 > plp + +1123 : a616 ldx zp1+3 +1125 : 08 php ;test stores do not alter flags +1126 : 8a txa +1127 : 49c3 eor #$c3 +1129 : aa tax +112a : 28 plp +112b : 8e0602 stx abst+3 +112e : 08 php ;flags after load/store sequence +112f : 49c3 eor #$c3 +1131 : aa tax +1132 : e000 cpx #0 ;test result + trap_ne +1134 : d0fe > bne * ;failed not equal (non zero) + +1136 : 68 pla ;load status + eor_flag lo~fnz ;mask bits not altered +1137 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits + +1139 : cd1f02 cmp fLDx+3 ;test flags + trap_ne +113c : d0fe > bne * ;failed not equal (non zero) + set_stat 0 > load_flag 0 -1125 : a900 > lda #0 ;allow test to change I-flag (no mask) +113e : a900 > lda #0 ;allow test to change I-flag (no mask) > -1127 : 48 > pha ;use stack to load status -1128 : 28 > plp +1140 : 48 > pha ;use stack to load status +1141 : 28 > plp -1129 : ae0b02 ldx abs1+3 -112c : 08 php ;test stores do not alter flags -112d : 8a txa -112e : 49c3 eor #$c3 -1130 : aa tax -1131 : 28 plp -1132 : 860f stx zpt+3 -1134 : 08 php ;flags after load/store sequence -1135 : 49c3 eor #$c3 -1137 : c516 cmp zp1+3 ;test result +1142 : ae1702 ldx abs1 +1145 : 08 php ;test stores do not alter flags +1146 : 8a txa +1147 : 49c3 eor #$c3 +1149 : aa tax +114a : 28 plp +114b : 860c stx zpt +114d : 08 php ;flags after load/store sequence +114e : 49c3 eor #$c3 +1150 : c513 cmp zp1 ;test result trap_ne -1139 : d0fe > bne * ;failed not equal (non zero) +1152 : d0fe > bne * ;failed not equal (non zero) -113b : 68 pla ;load status +1154 : 68 pla ;load status eor_flag 0 -113c : 4930 > eor #0|fao ;invert expected flags + always on bits +1155 : 4930 > eor #0|fao ;invert expected flags + always on bits -113e : cd1002 cmp fLDx+3 ;test flags +1157 : cd1c02 cmp fLDx ;test flags trap_ne -1141 : d0fe > bne * ;failed not equal (non zero) +115a : d0fe > bne * ;failed not equal (non zero) - - set_stat $ff - > load_flag $ff -1143 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + set_stat 0 + > load_flag 0 +115c : a900 > lda #0 ;allow test to change I-flag (no mask) > -1145 : 48 > pha ;use stack to load status -1146 : 28 > plp +115e : 48 > pha ;use stack to load status +115f : 28 > plp -1147 : ae0802 ldx abs1 -114a : 08 php ;test stores do not alter flags -114b : 8a txa -114c : 49c3 eor #$c3 -114e : aa tax -114f : 28 plp -1150 : 860c stx zpt -1152 : 08 php ;flags after load/store sequence -1153 : 49c3 eor #$c3 -1155 : aa tax -1156 : e413 cpx zp1 ;test result +1160 : ae1802 ldx abs1+1 +1163 : 08 php ;test stores do not alter flags +1164 : 8a txa +1165 : 49c3 eor #$c3 +1167 : aa tax +1168 : 28 plp +1169 : 860d stx zpt+1 +116b : 08 php ;flags after load/store sequence +116c : 49c3 eor #$c3 +116e : c514 cmp zp1+1 ;test result trap_ne -1158 : d0fe > bne * ;failed not equal (non zero) +1170 : d0fe > bne * ;failed not equal (non zero) -115a : 68 pla ;load status - eor_flag lo~fnz ;mask bits not altered -115b : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +1172 : 68 pla ;load status + eor_flag 0 +1173 : 4930 > eor #0|fao ;invert expected flags + always on bits -115d : cd0d02 cmp fLDx ;test flags +1175 : cd1d02 cmp fLDx+1 ;test flags trap_ne -1160 : d0fe > bne * ;failed not equal (non zero) +1178 : d0fe > bne * ;failed not equal (non zero) - set_stat $ff - > load_flag $ff -1162 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + set_stat 0 + > load_flag 0 +117a : a900 > lda #0 ;allow test to change I-flag (no mask) > -1164 : 48 > pha ;use stack to load status -1165 : 28 > plp +117c : 48 > pha ;use stack to load status +117d : 28 > plp -1166 : ae0902 ldx abs1+1 -1169 : 08 php ;test stores do not alter flags -116a : 8a txa -116b : 49c3 eor #$c3 -116d : aa tax -116e : 28 plp -116f : 860d stx zpt+1 -1171 : 08 php ;flags after load/store sequence -1172 : 49c3 eor #$c3 -1174 : aa tax -1175 : e414 cpx zp1+1 ;test result - trap_ne -1177 : d0fe > bne * ;failed not equal (non zero) - -1179 : 68 pla ;load status - eor_flag lo~fnz ;mask bits not altered -117a : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits - -117c : cd0e02 cmp fLDx+1 ;test flags - trap_ne -117f : d0fe > bne * ;failed not equal (non zero) - - set_stat $ff - > load_flag $ff -1181 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -1183 : 48 > pha ;use stack to load status -1184 : 28 > plp - -1185 : ae0a02 ldx abs1+2 -1188 : 08 php ;test stores do not alter flags -1189 : 8a txa +117e : ae1902 ldx abs1+2 +1181 : 08 php ;test stores do not alter flags +1182 : 8a txa +1183 : 49c3 eor #$c3 +1185 : aa tax +1186 : 28 plp +1187 : 860e stx zpt+2 +1189 : 08 php ;flags after load/store sequence 118a : 49c3 eor #$c3 -118c : aa tax -118d : 28 plp -118e : 860e stx zpt+2 -1190 : 08 php ;flags after load/store sequence -1191 : 49c3 eor #$c3 -1193 : aa tax -1194 : e415 cpx zp1+2 ;test result +118c : c515 cmp zp1+2 ;test result + trap_ne +118e : d0fe > bne * ;failed not equal (non zero) + +1190 : 68 pla ;load status + eor_flag 0 +1191 : 4930 > eor #0|fao ;invert expected flags + always on bits + +1193 : cd1e02 cmp fLDx+2 ;test flags trap_ne 1196 : d0fe > bne * ;failed not equal (non zero) -1198 : 68 pla ;load status - eor_flag lo~fnz ;mask bits not altered -1199 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits + set_stat 0 + > load_flag 0 +1198 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +119a : 48 > pha ;use stack to load status +119b : 28 > plp -119b : cd0f02 cmp fLDx+2 ;test flags +119c : ae1a02 ldx abs1+3 +119f : 08 php ;test stores do not alter flags +11a0 : 8a txa +11a1 : 49c3 eor #$c3 +11a3 : aa tax +11a4 : 28 plp +11a5 : 860f stx zpt+3 +11a7 : 08 php ;flags after load/store sequence +11a8 : 49c3 eor #$c3 +11aa : c516 cmp zp1+3 ;test result trap_ne -119e : d0fe > bne * ;failed not equal (non zero) +11ac : d0fe > bne * ;failed not equal (non zero) + +11ae : 68 pla ;load status + eor_flag 0 +11af : 4930 > eor #0|fao ;invert expected flags + always on bits + +11b1 : cd1f02 cmp fLDx+3 ;test flags + trap_ne +11b4 : d0fe > bne * ;failed not equal (non zero) + set_stat $ff > load_flag $ff -11a0 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +11b6 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -11a2 : 48 > pha ;use stack to load status -11a3 : 28 > plp +11b8 : 48 > pha ;use stack to load status +11b9 : 28 > plp -11a4 : ae0b02 ldx abs1+3 -11a7 : 08 php ;test stores do not alter flags -11a8 : 8a txa -11a9 : 49c3 eor #$c3 -11ab : aa tax -11ac : 28 plp -11ad : 860f stx zpt+3 -11af : 08 php ;flags after load/store sequence -11b0 : 49c3 eor #$c3 -11b2 : aa tax -11b3 : e416 cpx zp1+3 ;test result +11ba : ae1702 ldx abs1 +11bd : 08 php ;test stores do not alter flags +11be : 8a txa +11bf : 49c3 eor #$c3 +11c1 : aa tax +11c2 : 28 plp +11c3 : 860c stx zpt +11c5 : 08 php ;flags after load/store sequence +11c6 : 49c3 eor #$c3 +11c8 : aa tax +11c9 : e413 cpx zp1 ;test result trap_ne -11b5 : d0fe > bne * ;failed not equal (non zero) +11cb : d0fe > bne * ;failed not equal (non zero) -11b7 : 68 pla ;load status +11cd : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -11b8 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +11ce : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -11ba : cd1002 cmp fLDx+3 ;test flags +11d0 : cd1c02 cmp fLDx ;test flags trap_ne -11bd : d0fe > bne * ;failed not equal (non zero) +11d3 : d0fe > bne * ;failed not equal (non zero) + + set_stat $ff + > load_flag $ff +11d5 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +11d7 : 48 > pha ;use stack to load status +11d8 : 28 > plp + +11d9 : ae1802 ldx abs1+1 +11dc : 08 php ;test stores do not alter flags +11dd : 8a txa +11de : 49c3 eor #$c3 +11e0 : aa tax +11e1 : 28 plp +11e2 : 860d stx zpt+1 +11e4 : 08 php ;flags after load/store sequence +11e5 : 49c3 eor #$c3 +11e7 : aa tax +11e8 : e414 cpx zp1+1 ;test result + trap_ne +11ea : d0fe > bne * ;failed not equal (non zero) + +11ec : 68 pla ;load status + eor_flag lo~fnz ;mask bits not altered +11ed : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits + +11ef : cd1d02 cmp fLDx+1 ;test flags + trap_ne +11f2 : d0fe > bne * ;failed not equal (non zero) + + set_stat $ff + > load_flag $ff +11f4 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +11f6 : 48 > pha ;use stack to load status +11f7 : 28 > plp + +11f8 : ae1902 ldx abs1+2 +11fb : 08 php ;test stores do not alter flags +11fc : 8a txa +11fd : 49c3 eor #$c3 +11ff : aa tax +1200 : 28 plp +1201 : 860e stx zpt+2 +1203 : 08 php ;flags after load/store sequence +1204 : 49c3 eor #$c3 +1206 : aa tax +1207 : e415 cpx zp1+2 ;test result + trap_ne +1209 : d0fe > bne * ;failed not equal (non zero) + +120b : 68 pla ;load status + eor_flag lo~fnz ;mask bits not altered +120c : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits + +120e : cd1e02 cmp fLDx+2 ;test flags + trap_ne +1211 : d0fe > bne * ;failed not equal (non zero) + + set_stat $ff + > load_flag $ff +1213 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +1215 : 48 > pha ;use stack to load status +1216 : 28 > plp + +1217 : ae1a02 ldx abs1+3 +121a : 08 php ;test stores do not alter flags +121b : 8a txa +121c : 49c3 eor #$c3 +121e : aa tax +121f : 28 plp +1220 : 860f stx zpt+3 +1222 : 08 php ;flags after load/store sequence +1223 : 49c3 eor #$c3 +1225 : aa tax +1226 : e416 cpx zp1+3 ;test result + trap_ne +1228 : d0fe > bne * ;failed not equal (non zero) + +122a : 68 pla ;load status + eor_flag lo~fnz ;mask bits not altered +122b : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits + +122d : cd1f02 cmp fLDx+3 ;test flags + trap_ne +1230 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -11bf : a900 > lda #0 ;allow test to change I-flag (no mask) +1232 : a900 > lda #0 ;allow test to change I-flag (no mask) > -11c1 : 48 > pha ;use stack to load status -11c2 : 28 > plp +1234 : 48 > pha ;use stack to load status +1235 : 28 > plp -11c3 : a2c3 ldx #$c3 -11c5 : 08 php -11c6 : ec0802 cpx abs1 ;test result +1236 : a2c3 ldx #$c3 +1238 : 08 php +1239 : ec1702 cpx abs1 ;test result trap_ne -11c9 : d0fe > bne * ;failed not equal (non zero) +123c : d0fe > bne * ;failed not equal (non zero) -11cb : 68 pla ;load status +123e : 68 pla ;load status eor_flag 0 -11cc : 4930 > eor #0|fao ;invert expected flags + always on bits +123f : 4930 > eor #0|fao ;invert expected flags + always on bits -11ce : cd0d02 cmp fLDx ;test flags +1241 : cd1c02 cmp fLDx ;test flags trap_ne -11d1 : d0fe > bne * ;failed not equal (non zero) +1244 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -11d3 : a900 > lda #0 ;allow test to change I-flag (no mask) +1246 : a900 > lda #0 ;allow test to change I-flag (no mask) > -11d5 : 48 > pha ;use stack to load status -11d6 : 28 > plp +1248 : 48 > pha ;use stack to load status +1249 : 28 > plp -11d7 : a282 ldx #$82 -11d9 : 08 php -11da : ec0902 cpx abs1+1 ;test result +124a : a282 ldx #$82 +124c : 08 php +124d : ec1802 cpx abs1+1 ;test result trap_ne -11dd : d0fe > bne * ;failed not equal (non zero) +1250 : d0fe > bne * ;failed not equal (non zero) -11df : 68 pla ;load status +1252 : 68 pla ;load status eor_flag 0 -11e0 : 4930 > eor #0|fao ;invert expected flags + always on bits +1253 : 4930 > eor #0|fao ;invert expected flags + always on bits -11e2 : cd0e02 cmp fLDx+1 ;test flags +1255 : cd1d02 cmp fLDx+1 ;test flags trap_ne -11e5 : d0fe > bne * ;failed not equal (non zero) +1258 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -11e7 : a900 > lda #0 ;allow test to change I-flag (no mask) +125a : a900 > lda #0 ;allow test to change I-flag (no mask) > -11e9 : 48 > pha ;use stack to load status -11ea : 28 > plp +125c : 48 > pha ;use stack to load status +125d : 28 > plp -11eb : a241 ldx #$41 -11ed : 08 php -11ee : ec0a02 cpx abs1+2 ;test result +125e : a241 ldx #$41 +1260 : 08 php +1261 : ec1902 cpx abs1+2 ;test result trap_ne -11f1 : d0fe > bne * ;failed not equal (non zero) +1264 : d0fe > bne * ;failed not equal (non zero) -11f3 : 68 pla ;load status +1266 : 68 pla ;load status eor_flag 0 -11f4 : 4930 > eor #0|fao ;invert expected flags + always on bits +1267 : 4930 > eor #0|fao ;invert expected flags + always on bits -11f6 : cd0f02 cmp fLDx+2 ;test flags +1269 : cd1e02 cmp fLDx+2 ;test flags trap_ne -11f9 : d0fe > bne * ;failed not equal (non zero) +126c : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -11fb : a900 > lda #0 ;allow test to change I-flag (no mask) +126e : a900 > lda #0 ;allow test to change I-flag (no mask) > -11fd : 48 > pha ;use stack to load status -11fe : 28 > plp +1270 : 48 > pha ;use stack to load status +1271 : 28 > plp -11ff : a200 ldx #0 -1201 : 08 php -1202 : ec0b02 cpx abs1+3 ;test result +1272 : a200 ldx #0 +1274 : 08 php +1275 : ec1a02 cpx abs1+3 ;test result trap_ne -1205 : d0fe > bne * ;failed not equal (non zero) +1278 : d0fe > bne * ;failed not equal (non zero) -1207 : 68 pla ;load status +127a : 68 pla ;load status eor_flag 0 -1208 : 4930 > eor #0|fao ;invert expected flags + always on bits +127b : 4930 > eor #0|fao ;invert expected flags + always on bits -120a : cd1002 cmp fLDx+3 ;test flags +127d : cd1f02 cmp fLDx+3 ;test flags trap_ne -120d : d0fe > bne * ;failed not equal (non zero) +1280 : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -120f : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1282 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1211 : 48 > pha ;use stack to load status -1212 : 28 > plp +1284 : 48 > pha ;use stack to load status +1285 : 28 > plp -1213 : a2c3 ldx #$c3 -1215 : 08 php -1216 : ec0802 cpx abs1 ;test result +1286 : a2c3 ldx #$c3 +1288 : 08 php +1289 : ec1702 cpx abs1 ;test result trap_ne -1219 : d0fe > bne * ;failed not equal (non zero) +128c : d0fe > bne * ;failed not equal (non zero) -121b : 68 pla ;load status +128e : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -121c : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +128f : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -121e : cd0d02 cmp fLDx ;test flags +1291 : cd1c02 cmp fLDx ;test flags trap_ne -1221 : d0fe > bne * ;failed not equal (non zero) +1294 : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -1223 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1296 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1225 : 48 > pha ;use stack to load status -1226 : 28 > plp +1298 : 48 > pha ;use stack to load status +1299 : 28 > plp -1227 : a282 ldx #$82 -1229 : 08 php -122a : ec0902 cpx abs1+1 ;test result +129a : a282 ldx #$82 +129c : 08 php +129d : ec1802 cpx abs1+1 ;test result trap_ne -122d : d0fe > bne * ;failed not equal (non zero) +12a0 : d0fe > bne * ;failed not equal (non zero) -122f : 68 pla ;load status +12a2 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -1230 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +12a3 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -1232 : cd0e02 cmp fLDx+1 ;test flags +12a5 : cd1d02 cmp fLDx+1 ;test flags trap_ne -1235 : d0fe > bne * ;failed not equal (non zero) +12a8 : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -1237 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +12aa : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1239 : 48 > pha ;use stack to load status -123a : 28 > plp +12ac : 48 > pha ;use stack to load status +12ad : 28 > plp -123b : a241 ldx #$41 -123d : 08 php -123e : ec0a02 cpx abs1+2 ;test result +12ae : a241 ldx #$41 +12b0 : 08 php +12b1 : ec1902 cpx abs1+2 ;test result trap_ne -1241 : d0fe > bne * ;failed not equal (non zero) +12b4 : d0fe > bne * ;failed not equal (non zero) -1243 : 68 pla ;load status +12b6 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -1244 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +12b7 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -1246 : cd0f02 cmp fLDx+2 ;test flags +12b9 : cd1e02 cmp fLDx+2 ;test flags trap_ne -1249 : d0fe > bne * ;failed not equal (non zero) +12bc : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -124b : a9ff > lda #$ff ;allow test to change I-flag (no mask) +12be : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -124d : 48 > pha ;use stack to load status -124e : 28 > plp +12c0 : 48 > pha ;use stack to load status +12c1 : 28 > plp -124f : a200 ldx #0 -1251 : 08 php -1252 : ec0b02 cpx abs1+3 ;test result +12c2 : a200 ldx #0 +12c4 : 08 php +12c5 : ec1a02 cpx abs1+3 ;test result trap_ne -1255 : d0fe > bne * ;failed not equal (non zero) +12c8 : d0fe > bne * ;failed not equal (non zero) -1257 : 68 pla ;load status +12ca : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -1258 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +12cb : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -125a : cd1002 cmp fLDx+3 ;test flags +12cd : cd1f02 cmp fLDx+3 ;test flags trap_ne -125d : d0fe > bne * ;failed not equal (non zero) +12d0 : d0fe > bne * ;failed not equal (non zero) -125f : a200 ldx #0 -1261 : a50c lda zpt -1263 : 49c3 eor #$c3 -1265 : c513 cmp zp1 +12d2 : a200 ldx #0 +12d4 : a50c lda zpt +12d6 : 49c3 eor #$c3 +12d8 : c513 cmp zp1 trap_ne ;store to zp data -1267 : d0fe > bne * ;failed not equal (non zero) +12da : d0fe > bne * ;failed not equal (non zero) -1269 : 860c stx zpt ;clear -126b : ad0302 lda abst -126e : 49c3 eor #$c3 -1270 : cd0802 cmp abs1 +12dc : 860c stx zpt ;clear +12de : ad0302 lda abst +12e1 : 49c3 eor #$c3 +12e3 : cd1702 cmp abs1 trap_ne ;store to abs data -1273 : d0fe > bne * ;failed not equal (non zero) +12e6 : d0fe > bne * ;failed not equal (non zero) -1275 : 8e0302 stx abst ;clear -1278 : a50d lda zpt+1 -127a : 49c3 eor #$c3 -127c : c514 cmp zp1+1 +12e8 : 8e0302 stx abst ;clear +12eb : a50d lda zpt+1 +12ed : 49c3 eor #$c3 +12ef : c514 cmp zp1+1 trap_ne ;store to zp data -127e : d0fe > bne * ;failed not equal (non zero) +12f1 : d0fe > bne * ;failed not equal (non zero) -1280 : 860d stx zpt+1 ;clear -1282 : ad0402 lda abst+1 -1285 : 49c3 eor #$c3 -1287 : cd0902 cmp abs1+1 +12f3 : 860d stx zpt+1 ;clear +12f5 : ad0402 lda abst+1 +12f8 : 49c3 eor #$c3 +12fa : cd1802 cmp abs1+1 trap_ne ;store to abs data -128a : d0fe > bne * ;failed not equal (non zero) +12fd : d0fe > bne * ;failed not equal (non zero) -128c : 8e0402 stx abst+1 ;clear -128f : a50e lda zpt+2 -1291 : 49c3 eor #$c3 -1293 : c515 cmp zp1+2 +12ff : 8e0402 stx abst+1 ;clear +1302 : a50e lda zpt+2 +1304 : 49c3 eor #$c3 +1306 : c515 cmp zp1+2 trap_ne ;store to zp data -1295 : d0fe > bne * ;failed not equal (non zero) +1308 : d0fe > bne * ;failed not equal (non zero) -1297 : 860e stx zpt+2 ;clear -1299 : ad0502 lda abst+2 -129c : 49c3 eor #$c3 -129e : cd0a02 cmp abs1+2 +130a : 860e stx zpt+2 ;clear +130c : ad0502 lda abst+2 +130f : 49c3 eor #$c3 +1311 : cd1902 cmp abs1+2 trap_ne ;store to abs data -12a1 : d0fe > bne * ;failed not equal (non zero) +1314 : d0fe > bne * ;failed not equal (non zero) -12a3 : 8e0502 stx abst+2 ;clear -12a6 : a50f lda zpt+3 -12a8 : 49c3 eor #$c3 -12aa : c516 cmp zp1+3 +1316 : 8e0502 stx abst+2 ;clear +1319 : a50f lda zpt+3 +131b : 49c3 eor #$c3 +131d : c516 cmp zp1+3 trap_ne ;store to zp data -12ac : d0fe > bne * ;failed not equal (non zero) +131f : d0fe > bne * ;failed not equal (non zero) -12ae : 860f stx zpt+3 ;clear -12b0 : ad0602 lda abst+3 -12b3 : 49c3 eor #$c3 -12b5 : cd0b02 cmp abs1+3 +1321 : 860f stx zpt+3 ;clear +1323 : ad0602 lda abst+3 +1326 : 49c3 eor #$c3 +1328 : cd1a02 cmp abs1+3 trap_ne ;store to abs data -12b8 : d0fe > bne * ;failed not equal (non zero) +132b : d0fe > bne * ;failed not equal (non zero) -12ba : 8e0602 stx abst+3 ;clear +132d : 8e0602 stx abst+3 ;clear next_test -12bd : ad0002 > lda test_case ;previous test -12c0 : c913 > cmp #test_num +1330 : ad0002 > lda test_case ;previous test +1333 : c913 > cmp #test_num > trap_ne ;test is out of sequence -12c2 : d0fe > bne * ;failed not equal (non zero) +1335 : d0fe > bne * ;failed not equal (non zero) > 0014 = >test_num = test_num + 1 -12c4 : a914 > lda #test_num ;*** next tests' number -12c6 : 8d0002 > sta test_case +1337 : a914 > lda #test_num ;*** next tests' number +1339 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; LDY / STY - zp / abs / # set_stat 0 > load_flag 0 -12c9 : a900 > lda #0 ;allow test to change I-flag (no mask) +133c : a900 > lda #0 ;allow test to change I-flag (no mask) > -12cb : 48 > pha ;use stack to load status -12cc : 28 > plp +133e : 48 > pha ;use stack to load status +133f : 28 > plp -12cd : a413 ldy zp1 -12cf : 08 php ;test stores do not alter flags -12d0 : 98 tya -12d1 : 49c3 eor #$c3 -12d3 : a8 tay -12d4 : 28 plp -12d5 : 8c0302 sty abst -12d8 : 08 php ;flags after load/store sequence -12d9 : 49c3 eor #$c3 -12db : a8 tay -12dc : c0c3 cpy #$c3 ;test result +1340 : a413 ldy zp1 +1342 : 08 php ;test stores do not alter flags +1343 : 98 tya +1344 : 49c3 eor #$c3 +1346 : a8 tay +1347 : 28 plp +1348 : 8c0302 sty abst +134b : 08 php ;flags after load/store sequence +134c : 49c3 eor #$c3 +134e : a8 tay +134f : c0c3 cpy #$c3 ;test result trap_ne -12de : d0fe > bne * ;failed not equal (non zero) +1351 : d0fe > bne * ;failed not equal (non zero) -12e0 : 68 pla ;load status +1353 : 68 pla ;load status eor_flag 0 -12e1 : 4930 > eor #0|fao ;invert expected flags + always on bits +1354 : 4930 > eor #0|fao ;invert expected flags + always on bits -12e3 : cd0d02 cmp fLDx ;test flags +1356 : cd1c02 cmp fLDx ;test flags trap_ne -12e6 : d0fe > bne * ;failed not equal (non zero) +1359 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -12e8 : a900 > lda #0 ;allow test to change I-flag (no mask) +135b : a900 > lda #0 ;allow test to change I-flag (no mask) > -12ea : 48 > pha ;use stack to load status -12eb : 28 > plp +135d : 48 > pha ;use stack to load status +135e : 28 > plp -12ec : a414 ldy zp1+1 -12ee : 08 php ;test stores do not alter flags -12ef : 98 tya -12f0 : 49c3 eor #$c3 -12f2 : a8 tay -12f3 : 28 plp -12f4 : 8c0402 sty abst+1 -12f7 : 08 php ;flags after load/store sequence -12f8 : 49c3 eor #$c3 -12fa : a8 tay -12fb : c082 cpy #$82 ;test result +135f : a414 ldy zp1+1 +1361 : 08 php ;test stores do not alter flags +1362 : 98 tya +1363 : 49c3 eor #$c3 +1365 : a8 tay +1366 : 28 plp +1367 : 8c0402 sty abst+1 +136a : 08 php ;flags after load/store sequence +136b : 49c3 eor #$c3 +136d : a8 tay +136e : c082 cpy #$82 ;test result trap_ne -12fd : d0fe > bne * ;failed not equal (non zero) +1370 : d0fe > bne * ;failed not equal (non zero) -12ff : 68 pla ;load status +1372 : 68 pla ;load status eor_flag 0 -1300 : 4930 > eor #0|fao ;invert expected flags + always on bits +1373 : 4930 > eor #0|fao ;invert expected flags + always on bits -1302 : cd0e02 cmp fLDx+1 ;test flags +1375 : cd1d02 cmp fLDx+1 ;test flags trap_ne -1305 : d0fe > bne * ;failed not equal (non zero) +1378 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -1307 : a900 > lda #0 ;allow test to change I-flag (no mask) +137a : a900 > lda #0 ;allow test to change I-flag (no mask) > -1309 : 48 > pha ;use stack to load status -130a : 28 > plp +137c : 48 > pha ;use stack to load status +137d : 28 > plp -130b : a415 ldy zp1+2 -130d : 08 php ;test stores do not alter flags -130e : 98 tya -130f : 49c3 eor #$c3 -1311 : a8 tay -1312 : 28 plp -1313 : 8c0502 sty abst+2 -1316 : 08 php ;flags after load/store sequence -1317 : 49c3 eor #$c3 -1319 : a8 tay -131a : c041 cpy #$41 ;test result +137e : a415 ldy zp1+2 +1380 : 08 php ;test stores do not alter flags +1381 : 98 tya +1382 : 49c3 eor #$c3 +1384 : a8 tay +1385 : 28 plp +1386 : 8c0502 sty abst+2 +1389 : 08 php ;flags after load/store sequence +138a : 49c3 eor #$c3 +138c : a8 tay +138d : c041 cpy #$41 ;test result trap_ne -131c : d0fe > bne * ;failed not equal (non zero) +138f : d0fe > bne * ;failed not equal (non zero) -131e : 68 pla ;load status +1391 : 68 pla ;load status eor_flag 0 -131f : 4930 > eor #0|fao ;invert expected flags + always on bits +1392 : 4930 > eor #0|fao ;invert expected flags + always on bits -1321 : cd0f02 cmp fLDx+2 ;test flags +1394 : cd1e02 cmp fLDx+2 ;test flags trap_ne -1324 : d0fe > bne * ;failed not equal (non zero) +1397 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -1326 : a900 > lda #0 ;allow test to change I-flag (no mask) +1399 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1328 : 48 > pha ;use stack to load status -1329 : 28 > plp +139b : 48 > pha ;use stack to load status +139c : 28 > plp -132a : a416 ldy zp1+3 -132c : 08 php ;test stores do not alter flags -132d : 98 tya -132e : 49c3 eor #$c3 -1330 : a8 tay -1331 : 28 plp -1332 : 8c0602 sty abst+3 -1335 : 08 php ;flags after load/store sequence -1336 : 49c3 eor #$c3 -1338 : a8 tay -1339 : c000 cpy #0 ;test result +139d : a416 ldy zp1+3 +139f : 08 php ;test stores do not alter flags +13a0 : 98 tya +13a1 : 49c3 eor #$c3 +13a3 : a8 tay +13a4 : 28 plp +13a5 : 8c0602 sty abst+3 +13a8 : 08 php ;flags after load/store sequence +13a9 : 49c3 eor #$c3 +13ab : a8 tay +13ac : c000 cpy #0 ;test result trap_ne -133b : d0fe > bne * ;failed not equal (non zero) +13ae : d0fe > bne * ;failed not equal (non zero) -133d : 68 pla ;load status +13b0 : 68 pla ;load status eor_flag 0 -133e : 4930 > eor #0|fao ;invert expected flags + always on bits +13b1 : 4930 > eor #0|fao ;invert expected flags + always on bits -1340 : cd1002 cmp fLDx+3 ;test flags +13b3 : cd1f02 cmp fLDx+3 ;test flags trap_ne -1343 : d0fe > bne * ;failed not equal (non zero) +13b6 : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -1345 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +13b8 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1347 : 48 > pha ;use stack to load status -1348 : 28 > plp +13ba : 48 > pha ;use stack to load status +13bb : 28 > plp -1349 : a413 ldy zp1 -134b : 08 php ;test stores do not alter flags -134c : 98 tya -134d : 49c3 eor #$c3 -134f : a8 tay -1350 : 28 plp -1351 : 8c0302 sty abst -1354 : 08 php ;flags after load/store sequence -1355 : 49c3 eor #$c3 -1357 : a8 tay -1358 : c0c3 cpy #$c3 ;test result +13bc : a413 ldy zp1 +13be : 08 php ;test stores do not alter flags +13bf : 98 tya +13c0 : 49c3 eor #$c3 +13c2 : a8 tay +13c3 : 28 plp +13c4 : 8c0302 sty abst +13c7 : 08 php ;flags after load/store sequence +13c8 : 49c3 eor #$c3 +13ca : a8 tay +13cb : c0c3 cpy #$c3 ;test result trap_ne -135a : d0fe > bne * ;failed not equal (non zero) +13cd : d0fe > bne * ;failed not equal (non zero) -135c : 68 pla ;load status +13cf : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -135d : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +13d0 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -135f : cd0d02 cmp fLDx ;test flags +13d2 : cd1c02 cmp fLDx ;test flags trap_ne -1362 : d0fe > bne * ;failed not equal (non zero) +13d5 : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -1364 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +13d7 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1366 : 48 > pha ;use stack to load status -1367 : 28 > plp +13d9 : 48 > pha ;use stack to load status +13da : 28 > plp -1368 : a414 ldy zp1+1 -136a : 08 php ;test stores do not alter flags -136b : 98 tya -136c : 49c3 eor #$c3 -136e : a8 tay -136f : 28 plp -1370 : 8c0402 sty abst+1 -1373 : 08 php ;flags after load/store sequence -1374 : 49c3 eor #$c3 -1376 : a8 tay -1377 : c082 cpy #$82 ;test result +13db : a414 ldy zp1+1 +13dd : 08 php ;test stores do not alter flags +13de : 98 tya +13df : 49c3 eor #$c3 +13e1 : a8 tay +13e2 : 28 plp +13e3 : 8c0402 sty abst+1 +13e6 : 08 php ;flags after load/store sequence +13e7 : 49c3 eor #$c3 +13e9 : a8 tay +13ea : c082 cpy #$82 ;test result trap_ne -1379 : d0fe > bne * ;failed not equal (non zero) +13ec : d0fe > bne * ;failed not equal (non zero) -137b : 68 pla ;load status +13ee : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -137c : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +13ef : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -137e : cd0e02 cmp fLDx+1 ;test flags +13f1 : cd1d02 cmp fLDx+1 ;test flags trap_ne -1381 : d0fe > bne * ;failed not equal (non zero) +13f4 : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -1383 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +13f6 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1385 : 48 > pha ;use stack to load status -1386 : 28 > plp +13f8 : 48 > pha ;use stack to load status +13f9 : 28 > plp -1387 : a415 ldy zp1+2 -1389 : 08 php ;test stores do not alter flags -138a : 98 tya -138b : 49c3 eor #$c3 -138d : a8 tay -138e : 28 plp -138f : 8c0502 sty abst+2 -1392 : 08 php ;flags after load/store sequence -1393 : 49c3 eor #$c3 -1395 : a8 tay -1396 : c041 cpy #$41 ;test result +13fa : a415 ldy zp1+2 +13fc : 08 php ;test stores do not alter flags +13fd : 98 tya +13fe : 49c3 eor #$c3 +1400 : a8 tay +1401 : 28 plp +1402 : 8c0502 sty abst+2 +1405 : 08 php ;flags after load/store sequence +1406 : 49c3 eor #$c3 +1408 : a8 tay +1409 : c041 cpy #$41 ;test result trap_ne -1398 : d0fe > bne * ;failed not equal (non zero) +140b : d0fe > bne * ;failed not equal (non zero) -139a : 68 pla ;load status +140d : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -139b : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +140e : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -139d : cd0f02 cmp fLDx+2 ;test flags +1410 : cd1e02 cmp fLDx+2 ;test flags trap_ne -13a0 : d0fe > bne * ;failed not equal (non zero) +1413 : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -13a2 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1415 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -13a4 : 48 > pha ;use stack to load status -13a5 : 28 > plp +1417 : 48 > pha ;use stack to load status +1418 : 28 > plp -13a6 : a416 ldy zp1+3 -13a8 : 08 php ;test stores do not alter flags -13a9 : 98 tya -13aa : 49c3 eor #$c3 -13ac : a8 tay -13ad : 28 plp -13ae : 8c0602 sty abst+3 -13b1 : 08 php ;flags after load/store sequence -13b2 : 49c3 eor #$c3 -13b4 : a8 tay -13b5 : c000 cpy #0 ;test result +1419 : a416 ldy zp1+3 +141b : 08 php ;test stores do not alter flags +141c : 98 tya +141d : 49c3 eor #$c3 +141f : a8 tay +1420 : 28 plp +1421 : 8c0602 sty abst+3 +1424 : 08 php ;flags after load/store sequence +1425 : 49c3 eor #$c3 +1427 : a8 tay +1428 : c000 cpy #0 ;test result trap_ne -13b7 : d0fe > bne * ;failed not equal (non zero) +142a : d0fe > bne * ;failed not equal (non zero) -13b9 : 68 pla ;load status +142c : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -13ba : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +142d : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -13bc : cd1002 cmp fLDx+3 ;test flags +142f : cd1f02 cmp fLDx+3 ;test flags trap_ne -13bf : d0fe > bne * ;failed not equal (non zero) +1432 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -13c1 : a900 > lda #0 ;allow test to change I-flag (no mask) +1434 : a900 > lda #0 ;allow test to change I-flag (no mask) > -13c3 : 48 > pha ;use stack to load status -13c4 : 28 > plp +1436 : 48 > pha ;use stack to load status +1437 : 28 > plp -13c5 : ac0802 ldy abs1 -13c8 : 08 php ;test stores do not alter flags -13c9 : 98 tya -13ca : 49c3 eor #$c3 -13cc : a8 tay -13cd : 28 plp -13ce : 840c sty zpt -13d0 : 08 php ;flags after load/store sequence -13d1 : 49c3 eor #$c3 -13d3 : a8 tay -13d4 : c413 cpy zp1 ;test result +1438 : ac1702 ldy abs1 +143b : 08 php ;test stores do not alter flags +143c : 98 tya +143d : 49c3 eor #$c3 +143f : a8 tay +1440 : 28 plp +1441 : 840c sty zpt +1443 : 08 php ;flags after load/store sequence +1444 : 49c3 eor #$c3 +1446 : a8 tay +1447 : c413 cpy zp1 ;test result trap_ne -13d6 : d0fe > bne * ;failed not equal (non zero) +1449 : d0fe > bne * ;failed not equal (non zero) -13d8 : 68 pla ;load status +144b : 68 pla ;load status eor_flag 0 -13d9 : 4930 > eor #0|fao ;invert expected flags + always on bits +144c : 4930 > eor #0|fao ;invert expected flags + always on bits -13db : cd0d02 cmp fLDx ;test flags +144e : cd1c02 cmp fLDx ;test flags trap_ne -13de : d0fe > bne * ;failed not equal (non zero) +1451 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -13e0 : a900 > lda #0 ;allow test to change I-flag (no mask) +1453 : a900 > lda #0 ;allow test to change I-flag (no mask) > -13e2 : 48 > pha ;use stack to load status -13e3 : 28 > plp +1455 : 48 > pha ;use stack to load status +1456 : 28 > plp -13e4 : ac0902 ldy abs1+1 -13e7 : 08 php ;test stores do not alter flags -13e8 : 98 tya -13e9 : 49c3 eor #$c3 -13eb : a8 tay -13ec : 28 plp -13ed : 840d sty zpt+1 -13ef : 08 php ;flags after load/store sequence -13f0 : 49c3 eor #$c3 -13f2 : a8 tay -13f3 : c414 cpy zp1+1 ;test result +1457 : ac1802 ldy abs1+1 +145a : 08 php ;test stores do not alter flags +145b : 98 tya +145c : 49c3 eor #$c3 +145e : a8 tay +145f : 28 plp +1460 : 840d sty zpt+1 +1462 : 08 php ;flags after load/store sequence +1463 : 49c3 eor #$c3 +1465 : a8 tay +1466 : c414 cpy zp1+1 ;test result trap_ne -13f5 : d0fe > bne * ;failed not equal (non zero) +1468 : d0fe > bne * ;failed not equal (non zero) -13f7 : 68 pla ;load status +146a : 68 pla ;load status eor_flag 0 -13f8 : 4930 > eor #0|fao ;invert expected flags + always on bits +146b : 4930 > eor #0|fao ;invert expected flags + always on bits -13fa : cd0e02 cmp fLDx+1 ;test flags +146d : cd1d02 cmp fLDx+1 ;test flags trap_ne -13fd : d0fe > bne * ;failed not equal (non zero) +1470 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -13ff : a900 > lda #0 ;allow test to change I-flag (no mask) +1472 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1401 : 48 > pha ;use stack to load status -1402 : 28 > plp +1474 : 48 > pha ;use stack to load status +1475 : 28 > plp -1403 : ac0a02 ldy abs1+2 -1406 : 08 php ;test stores do not alter flags -1407 : 98 tya -1408 : 49c3 eor #$c3 -140a : a8 tay -140b : 28 plp -140c : 840e sty zpt+2 -140e : 08 php ;flags after load/store sequence -140f : 49c3 eor #$c3 -1411 : a8 tay -1412 : c415 cpy zp1+2 ;test result +1476 : ac1902 ldy abs1+2 +1479 : 08 php ;test stores do not alter flags +147a : 98 tya +147b : 49c3 eor #$c3 +147d : a8 tay +147e : 28 plp +147f : 840e sty zpt+2 +1481 : 08 php ;flags after load/store sequence +1482 : 49c3 eor #$c3 +1484 : a8 tay +1485 : c415 cpy zp1+2 ;test result trap_ne -1414 : d0fe > bne * ;failed not equal (non zero) +1487 : d0fe > bne * ;failed not equal (non zero) -1416 : 68 pla ;load status +1489 : 68 pla ;load status eor_flag 0 -1417 : 4930 > eor #0|fao ;invert expected flags + always on bits +148a : 4930 > eor #0|fao ;invert expected flags + always on bits -1419 : cd0f02 cmp fLDx+2 ;test flags +148c : cd1e02 cmp fLDx+2 ;test flags trap_ne -141c : d0fe > bne * ;failed not equal (non zero) +148f : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -141e : a900 > lda #0 ;allow test to change I-flag (no mask) +1491 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1420 : 48 > pha ;use stack to load status -1421 : 28 > plp +1493 : 48 > pha ;use stack to load status +1494 : 28 > plp -1422 : ac0b02 ldy abs1+3 -1425 : 08 php ;test stores do not alter flags -1426 : 98 tya -1427 : 49c3 eor #$c3 -1429 : a8 tay -142a : 28 plp -142b : 840f sty zpt+3 -142d : 08 php ;flags after load/store sequence -142e : 49c3 eor #$c3 -1430 : a8 tay -1431 : c416 cpy zp1+3 ;test result +1495 : ac1a02 ldy abs1+3 +1498 : 08 php ;test stores do not alter flags +1499 : 98 tya +149a : 49c3 eor #$c3 +149c : a8 tay +149d : 28 plp +149e : 840f sty zpt+3 +14a0 : 08 php ;flags after load/store sequence +14a1 : 49c3 eor #$c3 +14a3 : a8 tay +14a4 : c416 cpy zp1+3 ;test result trap_ne -1433 : d0fe > bne * ;failed not equal (non zero) +14a6 : d0fe > bne * ;failed not equal (non zero) -1435 : 68 pla ;load status +14a8 : 68 pla ;load status eor_flag 0 -1436 : 4930 > eor #0|fao ;invert expected flags + always on bits +14a9 : 4930 > eor #0|fao ;invert expected flags + always on bits -1438 : cd1002 cmp fLDx+3 ;test flags +14ab : cd1f02 cmp fLDx+3 ;test flags trap_ne -143b : d0fe > bne * ;failed not equal (non zero) +14ae : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -143d : a9ff > lda #$ff ;allow test to change I-flag (no mask) +14b0 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -143f : 48 > pha ;use stack to load status -1440 : 28 > plp +14b2 : 48 > pha ;use stack to load status +14b3 : 28 > plp -1441 : ac0802 ldy abs1 -1444 : 08 php ;test stores do not alter flags -1445 : 98 tya -1446 : 49c3 eor #$c3 -1448 : a8 tay -1449 : 28 plp -144a : 840c sty zpt -144c : 08 php ;flags after load/store sequence -144d : 49c3 eor #$c3 -144f : a8 tay -1450 : c513 cmp zp1 ;test result +14b4 : ac1702 ldy abs1 +14b7 : 08 php ;test stores do not alter flags +14b8 : 98 tya +14b9 : 49c3 eor #$c3 +14bb : a8 tay +14bc : 28 plp +14bd : 840c sty zpt +14bf : 08 php ;flags after load/store sequence +14c0 : 49c3 eor #$c3 +14c2 : a8 tay +14c3 : c513 cmp zp1 ;test result trap_ne -1452 : d0fe > bne * ;failed not equal (non zero) +14c5 : d0fe > bne * ;failed not equal (non zero) -1454 : 68 pla ;load status +14c7 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -1455 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +14c8 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -1457 : cd0d02 cmp fLDx ;test flags +14ca : cd1c02 cmp fLDx ;test flags trap_ne -145a : d0fe > bne * ;failed not equal (non zero) +14cd : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -145c : a9ff > lda #$ff ;allow test to change I-flag (no mask) +14cf : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -145e : 48 > pha ;use stack to load status -145f : 28 > plp +14d1 : 48 > pha ;use stack to load status +14d2 : 28 > plp -1460 : ac0902 ldy abs1+1 -1463 : 08 php ;test stores do not alter flags -1464 : 98 tya -1465 : 49c3 eor #$c3 -1467 : a8 tay -1468 : 28 plp -1469 : 840d sty zpt+1 -146b : 08 php ;flags after load/store sequence -146c : 49c3 eor #$c3 -146e : a8 tay -146f : c514 cmp zp1+1 ;test result +14d3 : ac1802 ldy abs1+1 +14d6 : 08 php ;test stores do not alter flags +14d7 : 98 tya +14d8 : 49c3 eor #$c3 +14da : a8 tay +14db : 28 plp +14dc : 840d sty zpt+1 +14de : 08 php ;flags after load/store sequence +14df : 49c3 eor #$c3 +14e1 : a8 tay +14e2 : c514 cmp zp1+1 ;test result trap_ne -1471 : d0fe > bne * ;failed not equal (non zero) +14e4 : d0fe > bne * ;failed not equal (non zero) -1473 : 68 pla ;load status +14e6 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -1474 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +14e7 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -1476 : cd0e02 cmp fLDx+1 ;test flags +14e9 : cd1d02 cmp fLDx+1 ;test flags trap_ne -1479 : d0fe > bne * ;failed not equal (non zero) +14ec : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -147b : a9ff > lda #$ff ;allow test to change I-flag (no mask) +14ee : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -147d : 48 > pha ;use stack to load status -147e : 28 > plp +14f0 : 48 > pha ;use stack to load status +14f1 : 28 > plp -147f : ac0a02 ldy abs1+2 -1482 : 08 php ;test stores do not alter flags -1483 : 98 tya -1484 : 49c3 eor #$c3 -1486 : a8 tay -1487 : 28 plp -1488 : 840e sty zpt+2 -148a : 08 php ;flags after load/store sequence -148b : 49c3 eor #$c3 -148d : a8 tay -148e : c515 cmp zp1+2 ;test result +14f2 : ac1902 ldy abs1+2 +14f5 : 08 php ;test stores do not alter flags +14f6 : 98 tya +14f7 : 49c3 eor #$c3 +14f9 : a8 tay +14fa : 28 plp +14fb : 840e sty zpt+2 +14fd : 08 php ;flags after load/store sequence +14fe : 49c3 eor #$c3 +1500 : a8 tay +1501 : c515 cmp zp1+2 ;test result trap_ne -1490 : d0fe > bne * ;failed not equal (non zero) +1503 : d0fe > bne * ;failed not equal (non zero) -1492 : 68 pla ;load status +1505 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -1493 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +1506 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -1495 : cd0f02 cmp fLDx+2 ;test flags +1508 : cd1e02 cmp fLDx+2 ;test flags trap_ne -1498 : d0fe > bne * ;failed not equal (non zero) +150b : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -149a : a9ff > lda #$ff ;allow test to change I-flag (no mask) +150d : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -149c : 48 > pha ;use stack to load status -149d : 28 > plp +150f : 48 > pha ;use stack to load status +1510 : 28 > plp -149e : ac0b02 ldy abs1+3 -14a1 : 08 php ;test stores do not alter flags -14a2 : 98 tya -14a3 : 49c3 eor #$c3 -14a5 : a8 tay -14a6 : 28 plp -14a7 : 840f sty zpt+3 -14a9 : 08 php ;flags after load/store sequence -14aa : 49c3 eor #$c3 -14ac : a8 tay -14ad : c516 cmp zp1+3 ;test result +1511 : ac1a02 ldy abs1+3 +1514 : 08 php ;test stores do not alter flags +1515 : 98 tya +1516 : 49c3 eor #$c3 +1518 : a8 tay +1519 : 28 plp +151a : 840f sty zpt+3 +151c : 08 php ;flags after load/store sequence +151d : 49c3 eor #$c3 +151f : a8 tay +1520 : c516 cmp zp1+3 ;test result trap_ne -14af : d0fe > bne * ;failed not equal (non zero) +1522 : d0fe > bne * ;failed not equal (non zero) -14b1 : 68 pla ;load status +1524 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -14b2 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +1525 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -14b4 : cd1002 cmp fLDx+3 ;test flags +1527 : cd1f02 cmp fLDx+3 ;test flags trap_ne -14b7 : d0fe > bne * ;failed not equal (non zero) +152a : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -14b9 : a900 > lda #0 ;allow test to change I-flag (no mask) +152c : a900 > lda #0 ;allow test to change I-flag (no mask) > -14bb : 48 > pha ;use stack to load status -14bc : 28 > plp +152e : 48 > pha ;use stack to load status +152f : 28 > plp -14bd : a0c3 ldy #$c3 -14bf : 08 php -14c0 : cc0802 cpy abs1 ;test result +1530 : a0c3 ldy #$c3 +1532 : 08 php +1533 : cc1702 cpy abs1 ;test result trap_ne -14c3 : d0fe > bne * ;failed not equal (non zero) +1536 : d0fe > bne * ;failed not equal (non zero) -14c5 : 68 pla ;load status +1538 : 68 pla ;load status eor_flag 0 -14c6 : 4930 > eor #0|fao ;invert expected flags + always on bits +1539 : 4930 > eor #0|fao ;invert expected flags + always on bits -14c8 : cd0d02 cmp fLDx ;test flags +153b : cd1c02 cmp fLDx ;test flags trap_ne -14cb : d0fe > bne * ;failed not equal (non zero) +153e : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -14cd : a900 > lda #0 ;allow test to change I-flag (no mask) +1540 : a900 > lda #0 ;allow test to change I-flag (no mask) > -14cf : 48 > pha ;use stack to load status -14d0 : 28 > plp +1542 : 48 > pha ;use stack to load status +1543 : 28 > plp -14d1 : a082 ldy #$82 -14d3 : 08 php -14d4 : cc0902 cpy abs1+1 ;test result +1544 : a082 ldy #$82 +1546 : 08 php +1547 : cc1802 cpy abs1+1 ;test result trap_ne -14d7 : d0fe > bne * ;failed not equal (non zero) +154a : d0fe > bne * ;failed not equal (non zero) -14d9 : 68 pla ;load status +154c : 68 pla ;load status eor_flag 0 -14da : 4930 > eor #0|fao ;invert expected flags + always on bits +154d : 4930 > eor #0|fao ;invert expected flags + always on bits -14dc : cd0e02 cmp fLDx+1 ;test flags +154f : cd1d02 cmp fLDx+1 ;test flags trap_ne -14df : d0fe > bne * ;failed not equal (non zero) +1552 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -14e1 : a900 > lda #0 ;allow test to change I-flag (no mask) +1554 : a900 > lda #0 ;allow test to change I-flag (no mask) > -14e3 : 48 > pha ;use stack to load status -14e4 : 28 > plp +1556 : 48 > pha ;use stack to load status +1557 : 28 > plp -14e5 : a041 ldy #$41 -14e7 : 08 php -14e8 : cc0a02 cpy abs1+2 ;test result +1558 : a041 ldy #$41 +155a : 08 php +155b : cc1902 cpy abs1+2 ;test result trap_ne -14eb : d0fe > bne * ;failed not equal (non zero) +155e : d0fe > bne * ;failed not equal (non zero) -14ed : 68 pla ;load status +1560 : 68 pla ;load status eor_flag 0 -14ee : 4930 > eor #0|fao ;invert expected flags + always on bits +1561 : 4930 > eor #0|fao ;invert expected flags + always on bits -14f0 : cd0f02 cmp fLDx+2 ;test flags +1563 : cd1e02 cmp fLDx+2 ;test flags trap_ne -14f3 : d0fe > bne * ;failed not equal (non zero) +1566 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -14f5 : a900 > lda #0 ;allow test to change I-flag (no mask) +1568 : a900 > lda #0 ;allow test to change I-flag (no mask) > -14f7 : 48 > pha ;use stack to load status -14f8 : 28 > plp +156a : 48 > pha ;use stack to load status +156b : 28 > plp -14f9 : a000 ldy #0 -14fb : 08 php -14fc : cc0b02 cpy abs1+3 ;test result +156c : a000 ldy #0 +156e : 08 php +156f : cc1a02 cpy abs1+3 ;test result trap_ne -14ff : d0fe > bne * ;failed not equal (non zero) +1572 : d0fe > bne * ;failed not equal (non zero) -1501 : 68 pla ;load status +1574 : 68 pla ;load status eor_flag 0 -1502 : 4930 > eor #0|fao ;invert expected flags + always on bits +1575 : 4930 > eor #0|fao ;invert expected flags + always on bits -1504 : cd1002 cmp fLDx+3 ;test flags +1577 : cd1f02 cmp fLDx+3 ;test flags trap_ne -1507 : d0fe > bne * ;failed not equal (non zero) +157a : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -1509 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +157c : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -150b : 48 > pha ;use stack to load status -150c : 28 > plp +157e : 48 > pha ;use stack to load status +157f : 28 > plp -150d : a0c3 ldy #$c3 -150f : 08 php -1510 : cc0802 cpy abs1 ;test result +1580 : a0c3 ldy #$c3 +1582 : 08 php +1583 : cc1702 cpy abs1 ;test result trap_ne -1513 : d0fe > bne * ;failed not equal (non zero) +1586 : d0fe > bne * ;failed not equal (non zero) -1515 : 68 pla ;load status +1588 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -1516 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +1589 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -1518 : cd0d02 cmp fLDx ;test flags +158b : cd1c02 cmp fLDx ;test flags trap_ne -151b : d0fe > bne * ;failed not equal (non zero) +158e : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -151d : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1590 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -151f : 48 > pha ;use stack to load status -1520 : 28 > plp +1592 : 48 > pha ;use stack to load status +1593 : 28 > plp -1521 : a082 ldy #$82 -1523 : 08 php -1524 : cc0902 cpy abs1+1 ;test result +1594 : a082 ldy #$82 +1596 : 08 php +1597 : cc1802 cpy abs1+1 ;test result trap_ne -1527 : d0fe > bne * ;failed not equal (non zero) +159a : d0fe > bne * ;failed not equal (non zero) -1529 : 68 pla ;load status +159c : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -152a : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +159d : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -152c : cd0e02 cmp fLDx+1 ;test flags +159f : cd1d02 cmp fLDx+1 ;test flags trap_ne -152f : d0fe > bne * ;failed not equal (non zero) +15a2 : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -1531 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +15a4 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1533 : 48 > pha ;use stack to load status -1534 : 28 > plp +15a6 : 48 > pha ;use stack to load status +15a7 : 28 > plp -1535 : a041 ldy #$41 -1537 : 08 php -1538 : cc0a02 cpy abs1+2 ;test result +15a8 : a041 ldy #$41 +15aa : 08 php +15ab : cc1902 cpy abs1+2 ;test result trap_ne -153b : d0fe > bne * ;failed not equal (non zero) +15ae : d0fe > bne * ;failed not equal (non zero) -153d : 68 pla ;load status +15b0 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -153e : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +15b1 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -1540 : cd0f02 cmp fLDx+2 ;test flags +15b3 : cd1e02 cmp fLDx+2 ;test flags trap_ne -1543 : d0fe > bne * ;failed not equal (non zero) +15b6 : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -1545 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +15b8 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1547 : 48 > pha ;use stack to load status -1548 : 28 > plp +15ba : 48 > pha ;use stack to load status +15bb : 28 > plp -1549 : a000 ldy #0 -154b : 08 php -154c : cc0b02 cpy abs1+3 ;test result +15bc : a000 ldy #0 +15be : 08 php +15bf : cc1a02 cpy abs1+3 ;test result trap_ne -154f : d0fe > bne * ;failed not equal (non zero) +15c2 : d0fe > bne * ;failed not equal (non zero) -1551 : 68 pla ;load status +15c4 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -1552 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +15c5 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -1554 : cd1002 cmp fLDx+3 ;test flags +15c7 : cd1f02 cmp fLDx+3 ;test flags trap_ne -1557 : d0fe > bne * ;failed not equal (non zero) +15ca : d0fe > bne * ;failed not equal (non zero) -1559 : a000 ldy #0 -155b : a50c lda zpt -155d : 49c3 eor #$c3 -155f : c513 cmp zp1 +15cc : a000 ldy #0 +15ce : a50c lda zpt +15d0 : 49c3 eor #$c3 +15d2 : c513 cmp zp1 trap_ne ;store to zp data -1561 : d0fe > bne * ;failed not equal (non zero) +15d4 : d0fe > bne * ;failed not equal (non zero) -1563 : 840c sty zpt ;clear -1565 : ad0302 lda abst -1568 : 49c3 eor #$c3 -156a : cd0802 cmp abs1 +15d6 : 840c sty zpt ;clear +15d8 : ad0302 lda abst +15db : 49c3 eor #$c3 +15dd : cd1702 cmp abs1 trap_ne ;store to abs data -156d : d0fe > bne * ;failed not equal (non zero) +15e0 : d0fe > bne * ;failed not equal (non zero) -156f : 8c0302 sty abst ;clear -1572 : a50d lda zpt+1 -1574 : 49c3 eor #$c3 -1576 : c514 cmp zp1+1 +15e2 : 8c0302 sty abst ;clear +15e5 : a50d lda zpt+1 +15e7 : 49c3 eor #$c3 +15e9 : c514 cmp zp1+1 trap_ne ;store to zp+1 data -1578 : d0fe > bne * ;failed not equal (non zero) +15eb : d0fe > bne * ;failed not equal (non zero) -157a : 840d sty zpt+1 ;clear -157c : ad0402 lda abst+1 -157f : 49c3 eor #$c3 -1581 : cd0902 cmp abs1+1 +15ed : 840d sty zpt+1 ;clear +15ef : ad0402 lda abst+1 +15f2 : 49c3 eor #$c3 +15f4 : cd1802 cmp abs1+1 trap_ne ;store to abs+1 data -1584 : d0fe > bne * ;failed not equal (non zero) +15f7 : d0fe > bne * ;failed not equal (non zero) -1586 : 8c0402 sty abst+1 ;clear -1589 : a50e lda zpt+2 -158b : 49c3 eor #$c3 -158d : c515 cmp zp1+2 +15f9 : 8c0402 sty abst+1 ;clear +15fc : a50e lda zpt+2 +15fe : 49c3 eor #$c3 +1600 : c515 cmp zp1+2 trap_ne ;store to zp+2 data -158f : d0fe > bne * ;failed not equal (non zero) +1602 : d0fe > bne * ;failed not equal (non zero) -1591 : 840e sty zpt+2 ;clear -1593 : ad0502 lda abst+2 -1596 : 49c3 eor #$c3 -1598 : cd0a02 cmp abs1+2 +1604 : 840e sty zpt+2 ;clear +1606 : ad0502 lda abst+2 +1609 : 49c3 eor #$c3 +160b : cd1902 cmp abs1+2 trap_ne ;store to abs+2 data -159b : d0fe > bne * ;failed not equal (non zero) +160e : d0fe > bne * ;failed not equal (non zero) -159d : 8c0502 sty abst+2 ;clear -15a0 : a50f lda zpt+3 -15a2 : 49c3 eor #$c3 -15a4 : c516 cmp zp1+3 +1610 : 8c0502 sty abst+2 ;clear +1613 : a50f lda zpt+3 +1615 : 49c3 eor #$c3 +1617 : c516 cmp zp1+3 trap_ne ;store to zp+3 data -15a6 : d0fe > bne * ;failed not equal (non zero) +1619 : d0fe > bne * ;failed not equal (non zero) -15a8 : 840f sty zpt+3 ;clear -15aa : ad0602 lda abst+3 -15ad : 49c3 eor #$c3 -15af : cd0b02 cmp abs1+3 +161b : 840f sty zpt+3 ;clear +161d : ad0602 lda abst+3 +1620 : 49c3 eor #$c3 +1622 : cd1a02 cmp abs1+3 trap_ne ;store to abs+3 data -15b2 : d0fe > bne * ;failed not equal (non zero) +1625 : d0fe > bne * ;failed not equal (non zero) -15b4 : 8c0602 sty abst+3 ;clear +1627 : 8c0602 sty abst+3 ;clear next_test -15b7 : ad0002 > lda test_case ;previous test -15ba : c914 > cmp #test_num +162a : ad0002 > lda test_case ;previous test +162d : c914 > cmp #test_num > trap_ne ;test is out of sequence -15bc : d0fe > bne * ;failed not equal (non zero) +162f : d0fe > bne * ;failed not equal (non zero) > 0015 = >test_num = test_num + 1 -15be : a915 > lda #test_num ;*** next tests' number -15c0 : 8d0002 > sta test_case +1631 : a915 > lda #test_num ;*** next tests' number +1633 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; testing load / store accumulator LDA / STA all addressing modes ; LDA / STA - zp,x / abs,x -15c3 : a203 ldx #3 -15c5 : tldax +1636 : a203 ldx #3 +1638 : tldax set_stat 0 > load_flag 0 -15c5 : a900 > lda #0 ;allow test to change I-flag (no mask) +1638 : a900 > lda #0 ;allow test to change I-flag (no mask) > -15c7 : 48 > pha ;use stack to load status -15c8 : 28 > plp +163a : 48 > pha ;use stack to load status +163b : 28 > plp -15c9 : b513 lda zp1,x -15cb : 08 php ;test stores do not alter flags -15cc : 49c3 eor #$c3 -15ce : 28 plp -15cf : 9d0302 sta abst,x -15d2 : 08 php ;flags after load/store sequence -15d3 : 49c3 eor #$c3 -15d5 : dd0802 cmp abs1,x ;test result +163c : b513 lda zp1,x +163e : 08 php ;test stores do not alter flags +163f : 49c3 eor #$c3 +1641 : 28 plp +1642 : 9d0302 sta abst,x +1645 : 08 php ;flags after load/store sequence +1646 : 49c3 eor #$c3 +1648 : dd1702 cmp abs1,x ;test result trap_ne -15d8 : d0fe > bne * ;failed not equal (non zero) +164b : d0fe > bne * ;failed not equal (non zero) -15da : 68 pla ;load status +164d : 68 pla ;load status eor_flag 0 -15db : 4930 > eor #0|fao ;invert expected flags + always on bits +164e : 4930 > eor #0|fao ;invert expected flags + always on bits -15dd : dd0d02 cmp fLDx,x ;test flags +1650 : dd1c02 cmp fLDx,x ;test flags trap_ne -15e0 : d0fe > bne * ;failed not equal (non zero) - -15e2 : ca dex -15e3 : 10e0 bpl tldax - -15e5 : a203 ldx #3 -15e7 : tldax1 - set_stat $ff - > load_flag $ff -15e7 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -15e9 : 48 > pha ;use stack to load status -15ea : 28 > plp - -15eb : b513 lda zp1,x -15ed : 08 php ;test stores do not alter flags -15ee : 49c3 eor #$c3 -15f0 : 28 plp -15f1 : 9d0302 sta abst,x -15f4 : 08 php ;flags after load/store sequence -15f5 : 49c3 eor #$c3 -15f7 : dd0802 cmp abs1,x ;test result - trap_ne -15fa : d0fe > bne * ;failed not equal (non zero) - -15fc : 68 pla ;load status - eor_flag lo~fnz ;mask bits not altered -15fd : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits - -15ff : dd0d02 cmp fLDx,x ;test flags - trap_ne -1602 : d0fe > bne * ;failed not equal (non zero) - -1604 : ca dex -1605 : 10e0 bpl tldax1 - -1607 : a203 ldx #3 -1609 : tldax2 - set_stat 0 - > load_flag 0 -1609 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -160b : 48 > pha ;use stack to load status -160c : 28 > plp - -160d : bd0802 lda abs1,x -1610 : 08 php ;test stores do not alter flags -1611 : 49c3 eor #$c3 -1613 : 28 plp -1614 : 950c sta zpt,x -1616 : 08 php ;flags after load/store sequence -1617 : 49c3 eor #$c3 -1619 : d513 cmp zp1,x ;test result - trap_ne -161b : d0fe > bne * ;failed not equal (non zero) - -161d : 68 pla ;load status - eor_flag 0 -161e : 4930 > eor #0|fao ;invert expected flags + always on bits - -1620 : dd0d02 cmp fLDx,x ;test flags - trap_ne -1623 : d0fe > bne * ;failed not equal (non zero) - -1625 : ca dex -1626 : 10e1 bpl tldax2 - -1628 : a203 ldx #3 -162a : tldax3 - set_stat $ff - > load_flag $ff -162a : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -162c : 48 > pha ;use stack to load status -162d : 28 > plp - -162e : bd0802 lda abs1,x -1631 : 08 php ;test stores do not alter flags -1632 : 49c3 eor #$c3 -1634 : 28 plp -1635 : 950c sta zpt,x -1637 : 08 php ;flags after load/store sequence -1638 : 49c3 eor #$c3 -163a : d513 cmp zp1,x ;test result - trap_ne -163c : d0fe > bne * ;failed not equal (non zero) - -163e : 68 pla ;load status - eor_flag lo~fnz ;mask bits not altered -163f : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits - -1641 : dd0d02 cmp fLDx,x ;test flags - trap_ne -1644 : d0fe > bne * ;failed not equal (non zero) - -1646 : ca dex -1647 : 10e1 bpl tldax3 - -1649 : a203 ldx #3 ;testing store result -164b : a000 ldy #0 -164d : b50c tstax lda zpt,x -164f : 49c3 eor #$c3 -1651 : d513 cmp zp1,x - trap_ne ;store to zp,x data 1653 : d0fe > bne * ;failed not equal (non zero) -1655 : 940c sty zpt,x ;clear -1657 : bd0302 lda abst,x -165a : 49c3 eor #$c3 -165c : dd0802 cmp abs1,x - trap_ne ;store to abs,x data -165f : d0fe > bne * ;failed not equal (non zero) +1655 : ca dex +1656 : 10e0 bpl tldax -1661 : 8a txa -1662 : 9d0302 sta abst,x ;clear -1665 : ca dex -1666 : 10e5 bpl tstax - next_test -1668 : ad0002 > lda test_case ;previous test -166b : c915 > cmp #test_num - > trap_ne ;test is out of sequence +1658 : a203 ldx #3 +165a : tldax1 + set_stat $ff + > load_flag $ff +165a : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +165c : 48 > pha ;use stack to load status +165d : 28 > plp + +165e : b513 lda zp1,x +1660 : 08 php ;test stores do not alter flags +1661 : 49c3 eor #$c3 +1663 : 28 plp +1664 : 9d0302 sta abst,x +1667 : 08 php ;flags after load/store sequence +1668 : 49c3 eor #$c3 +166a : dd1702 cmp abs1,x ;test result + trap_ne 166d : d0fe > bne * ;failed not equal (non zero) + +166f : 68 pla ;load status + eor_flag lo~fnz ;mask bits not altered +1670 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits + +1672 : dd1c02 cmp fLDx,x ;test flags + trap_ne +1675 : d0fe > bne * ;failed not equal (non zero) + +1677 : ca dex +1678 : 10e0 bpl tldax1 + +167a : a203 ldx #3 +167c : tldax2 + set_stat 0 + > load_flag 0 +167c : a900 > lda #0 ;allow test to change I-flag (no mask) + > +167e : 48 > pha ;use stack to load status +167f : 28 > plp + +1680 : bd1702 lda abs1,x +1683 : 08 php ;test stores do not alter flags +1684 : 49c3 eor #$c3 +1686 : 28 plp +1687 : 950c sta zpt,x +1689 : 08 php ;flags after load/store sequence +168a : 49c3 eor #$c3 +168c : d513 cmp zp1,x ;test result + trap_ne +168e : d0fe > bne * ;failed not equal (non zero) + +1690 : 68 pla ;load status + eor_flag 0 +1691 : 4930 > eor #0|fao ;invert expected flags + always on bits + +1693 : dd1c02 cmp fLDx,x ;test flags + trap_ne +1696 : d0fe > bne * ;failed not equal (non zero) + +1698 : ca dex +1699 : 10e1 bpl tldax2 + +169b : a203 ldx #3 +169d : tldax3 + set_stat $ff + > load_flag $ff +169d : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +169f : 48 > pha ;use stack to load status +16a0 : 28 > plp + +16a1 : bd1702 lda abs1,x +16a4 : 08 php ;test stores do not alter flags +16a5 : 49c3 eor #$c3 +16a7 : 28 plp +16a8 : 950c sta zpt,x +16aa : 08 php ;flags after load/store sequence +16ab : 49c3 eor #$c3 +16ad : d513 cmp zp1,x ;test result + trap_ne +16af : d0fe > bne * ;failed not equal (non zero) + +16b1 : 68 pla ;load status + eor_flag lo~fnz ;mask bits not altered +16b2 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits + +16b4 : dd1c02 cmp fLDx,x ;test flags + trap_ne +16b7 : d0fe > bne * ;failed not equal (non zero) + +16b9 : ca dex +16ba : 10e1 bpl tldax3 + +16bc : a203 ldx #3 ;testing store result +16be : a000 ldy #0 +16c0 : b50c tstax lda zpt,x +16c2 : 49c3 eor #$c3 +16c4 : d513 cmp zp1,x + trap_ne ;store to zp,x data +16c6 : d0fe > bne * ;failed not equal (non zero) + +16c8 : 940c sty zpt,x ;clear +16ca : bd0302 lda abst,x +16cd : 49c3 eor #$c3 +16cf : dd1702 cmp abs1,x + trap_ne ;store to abs,x data +16d2 : d0fe > bne * ;failed not equal (non zero) + +16d4 : 8a txa +16d5 : 9d0302 sta abst,x ;clear +16d8 : ca dex +16d9 : 10e5 bpl tstax + next_test +16db : ad0002 > lda test_case ;previous test +16de : c915 > cmp #test_num + > trap_ne ;test is out of sequence +16e0 : d0fe > bne * ;failed not equal (non zero) > 0016 = >test_num = test_num + 1 -166f : a916 > lda #test_num ;*** next tests' number -1671 : 8d0002 > sta test_case +16e2 : a916 > lda #test_num ;*** next tests' number +16e4 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; LDA / STA - (zp),y / abs,y / (zp,x) -1674 : a003 ldy #3 -1676 : tlday +16e7 : a003 ldy #3 +16e9 : tlday set_stat 0 > load_flag 0 -1676 : a900 > lda #0 ;allow test to change I-flag (no mask) +16e9 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1678 : 48 > pha ;use stack to load status -1679 : 28 > plp +16eb : 48 > pha ;use stack to load status +16ec : 28 > plp -167a : b124 lda (ind1),y -167c : 08 php ;test stores do not alter flags -167d : 49c3 eor #$c3 -167f : 28 plp -1680 : 990302 sta abst,y -1683 : 08 php ;flags after load/store sequence -1684 : 49c3 eor #$c3 -1686 : d90802 cmp abs1,y ;test result +16ed : b124 lda (ind1),y +16ef : 08 php ;test stores do not alter flags +16f0 : 49c3 eor #$c3 +16f2 : 28 plp +16f3 : 990302 sta abst,y +16f6 : 08 php ;flags after load/store sequence +16f7 : 49c3 eor #$c3 +16f9 : d91702 cmp abs1,y ;test result trap_ne -1689 : d0fe > bne * ;failed not equal (non zero) +16fc : d0fe > bne * ;failed not equal (non zero) -168b : 68 pla ;load status +16fe : 68 pla ;load status eor_flag 0 -168c : 4930 > eor #0|fao ;invert expected flags + always on bits +16ff : 4930 > eor #0|fao ;invert expected flags + always on bits -168e : d90d02 cmp fLDx,y ;test flags +1701 : d91c02 cmp fLDx,y ;test flags trap_ne -1691 : d0fe > bne * ;failed not equal (non zero) +1704 : d0fe > bne * ;failed not equal (non zero) -1693 : 88 dey -1694 : 10e0 bpl tlday +1706 : 88 dey +1707 : 10e0 bpl tlday -1696 : a003 ldy #3 -1698 : tlday1 +1709 : a003 ldy #3 +170b : tlday1 set_stat $ff > load_flag $ff -1698 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +170b : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -169a : 48 > pha ;use stack to load status -169b : 28 > plp +170d : 48 > pha ;use stack to load status +170e : 28 > plp -169c : b124 lda (ind1),y -169e : 08 php ;test stores do not alter flags -169f : 49c3 eor #$c3 -16a1 : 28 plp -16a2 : 990302 sta abst,y -16a5 : 08 php ;flags after load/store sequence -16a6 : 49c3 eor #$c3 -16a8 : d90802 cmp abs1,y ;test result +170f : b124 lda (ind1),y +1711 : 08 php ;test stores do not alter flags +1712 : 49c3 eor #$c3 +1714 : 28 plp +1715 : 990302 sta abst,y +1718 : 08 php ;flags after load/store sequence +1719 : 49c3 eor #$c3 +171b : d91702 cmp abs1,y ;test result trap_ne -16ab : d0fe > bne * ;failed not equal (non zero) +171e : d0fe > bne * ;failed not equal (non zero) -16ad : 68 pla ;load status +1720 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -16ae : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +1721 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -16b0 : d90d02 cmp fLDx,y ;test flags +1723 : d91c02 cmp fLDx,y ;test flags trap_ne -16b3 : d0fe > bne * ;failed not equal (non zero) +1726 : d0fe > bne * ;failed not equal (non zero) -16b5 : 88 dey -16b6 : 10e0 bpl tlday1 +1728 : 88 dey +1729 : 10e0 bpl tlday1 -16b8 : a003 ldy #3 ;testing store result -16ba : a200 ldx #0 -16bc : b90302 tstay lda abst,y -16bf : 49c3 eor #$c3 -16c1 : d90802 cmp abs1,y +172b : a003 ldy #3 ;testing store result +172d : a200 ldx #0 +172f : b90302 tstay lda abst,y +1732 : 49c3 eor #$c3 +1734 : d91702 cmp abs1,y trap_ne ;store to abs data -16c4 : d0fe > bne * ;failed not equal (non zero) +1737 : d0fe > bne * ;failed not equal (non zero) -16c6 : 8a txa -16c7 : 990302 sta abst,y ;clear -16ca : 88 dey -16cb : 10ef bpl tstay +1739 : 8a txa +173a : 990302 sta abst,y ;clear +173d : 88 dey +173e : 10ef bpl tstay -16cd : a003 ldy #3 -16cf : tlday2 +1740 : a003 ldy #3 +1742 : tlday2 set_stat 0 > load_flag 0 -16cf : a900 > lda #0 ;allow test to change I-flag (no mask) +1742 : a900 > lda #0 ;allow test to change I-flag (no mask) > -16d1 : 48 > pha ;use stack to load status -16d2 : 28 > plp +1744 : 48 > pha ;use stack to load status +1745 : 28 > plp -16d3 : b90802 lda abs1,y -16d6 : 08 php ;test stores do not alter flags -16d7 : 49c3 eor #$c3 -16d9 : 28 plp -16da : 9130 sta (indt),y -16dc : 08 php ;flags after load/store sequence -16dd : 49c3 eor #$c3 -16df : d124 cmp (ind1),y ;test result +1746 : b91702 lda abs1,y +1749 : 08 php ;test stores do not alter flags +174a : 49c3 eor #$c3 +174c : 28 plp +174d : 9130 sta (indt),y +174f : 08 php ;flags after load/store sequence +1750 : 49c3 eor #$c3 +1752 : d124 cmp (ind1),y ;test result trap_ne -16e1 : d0fe > bne * ;failed not equal (non zero) +1754 : d0fe > bne * ;failed not equal (non zero) -16e3 : 68 pla ;load status +1756 : 68 pla ;load status eor_flag 0 -16e4 : 4930 > eor #0|fao ;invert expected flags + always on bits +1757 : 4930 > eor #0|fao ;invert expected flags + always on bits -16e6 : d90d02 cmp fLDx,y ;test flags +1759 : d91c02 cmp fLDx,y ;test flags trap_ne -16e9 : d0fe > bne * ;failed not equal (non zero) +175c : d0fe > bne * ;failed not equal (non zero) -16eb : 88 dey -16ec : 10e1 bpl tlday2 +175e : 88 dey +175f : 10e1 bpl tlday2 -16ee : a003 ldy #3 -16f0 : tlday3 +1761 : a003 ldy #3 +1763 : tlday3 set_stat $ff > load_flag $ff -16f0 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1763 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -16f2 : 48 > pha ;use stack to load status -16f3 : 28 > plp +1765 : 48 > pha ;use stack to load status +1766 : 28 > plp -16f4 : b90802 lda abs1,y -16f7 : 08 php ;test stores do not alter flags -16f8 : 49c3 eor #$c3 -16fa : 28 plp -16fb : 9130 sta (indt),y -16fd : 08 php ;flags after load/store sequence -16fe : 49c3 eor #$c3 -1700 : d124 cmp (ind1),y ;test result +1767 : b91702 lda abs1,y +176a : 08 php ;test stores do not alter flags +176b : 49c3 eor #$c3 +176d : 28 plp +176e : 9130 sta (indt),y +1770 : 08 php ;flags after load/store sequence +1771 : 49c3 eor #$c3 +1773 : d124 cmp (ind1),y ;test result trap_ne -1702 : d0fe > bne * ;failed not equal (non zero) +1775 : d0fe > bne * ;failed not equal (non zero) -1704 : 68 pla ;load status +1777 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -1705 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +1778 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -1707 : d90d02 cmp fLDx,y ;test flags +177a : d91c02 cmp fLDx,y ;test flags trap_ne -170a : d0fe > bne * ;failed not equal (non zero) +177d : d0fe > bne * ;failed not equal (non zero) -170c : 88 dey -170d : 10e1 bpl tlday3 +177f : 88 dey +1780 : 10e1 bpl tlday3 -170f : a003 ldy #3 ;testing store result -1711 : a200 ldx #0 -1713 : b90302 tstay1 lda abst,y -1716 : 49c3 eor #$c3 -1718 : d90802 cmp abs1,y +1782 : a003 ldy #3 ;testing store result +1784 : a200 ldx #0 +1786 : b90302 tstay1 lda abst,y +1789 : 49c3 eor #$c3 +178b : d91702 cmp abs1,y trap_ne ;store to abs data -171b : d0fe > bne * ;failed not equal (non zero) +178e : d0fe > bne * ;failed not equal (non zero) -171d : 8a txa -171e : 990302 sta abst,y ;clear -1721 : 88 dey -1722 : 10ef bpl tstay1 +1790 : 8a txa +1791 : 990302 sta abst,y ;clear +1794 : 88 dey +1795 : 10ef bpl tstay1 -1724 : a206 ldx #6 -1726 : a003 ldy #3 -1728 : tldax4 +1797 : a206 ldx #6 +1799 : a003 ldy #3 +179b : tldax4 set_stat 0 > load_flag 0 -1728 : a900 > lda #0 ;allow test to change I-flag (no mask) +179b : a900 > lda #0 ;allow test to change I-flag (no mask) > -172a : 48 > pha ;use stack to load status -172b : 28 > plp +179d : 48 > pha ;use stack to load status +179e : 28 > plp -172c : a124 lda (ind1,x) -172e : 08 php ;test stores do not alter flags -172f : 49c3 eor #$c3 -1731 : 28 plp -1732 : 8130 sta (indt,x) -1734 : 08 php ;flags after load/store sequence -1735 : 49c3 eor #$c3 -1737 : d90802 cmp abs1,y ;test result +179f : a124 lda (ind1,x) +17a1 : 08 php ;test stores do not alter flags +17a2 : 49c3 eor #$c3 +17a4 : 28 plp +17a5 : 8130 sta (indt,x) +17a7 : 08 php ;flags after load/store sequence +17a8 : 49c3 eor #$c3 +17aa : d91702 cmp abs1,y ;test result trap_ne -173a : d0fe > bne * ;failed not equal (non zero) +17ad : d0fe > bne * ;failed not equal (non zero) -173c : 68 pla ;load status +17af : 68 pla ;load status eor_flag 0 -173d : 4930 > eor #0|fao ;invert expected flags + always on bits +17b0 : 4930 > eor #0|fao ;invert expected flags + always on bits -173f : d90d02 cmp fLDx,y ;test flags +17b2 : d91c02 cmp fLDx,y ;test flags trap_ne -1742 : d0fe > bne * ;failed not equal (non zero) +17b5 : d0fe > bne * ;failed not equal (non zero) -1744 : ca dex -1745 : ca dex -1746 : 88 dey -1747 : 10df bpl tldax4 +17b7 : ca dex +17b8 : ca dex +17b9 : 88 dey +17ba : 10df bpl tldax4 -1749 : a206 ldx #6 -174b : a003 ldy #3 -174d : tldax5 +17bc : a206 ldx #6 +17be : a003 ldy #3 +17c0 : tldax5 set_stat $ff > load_flag $ff -174d : a9ff > lda #$ff ;allow test to change I-flag (no mask) +17c0 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -174f : 48 > pha ;use stack to load status -1750 : 28 > plp +17c2 : 48 > pha ;use stack to load status +17c3 : 28 > plp -1751 : a124 lda (ind1,x) -1753 : 08 php ;test stores do not alter flags -1754 : 49c3 eor #$c3 -1756 : 28 plp -1757 : 8130 sta (indt,x) -1759 : 08 php ;flags after load/store sequence -175a : 49c3 eor #$c3 -175c : d90802 cmp abs1,y ;test result +17c4 : a124 lda (ind1,x) +17c6 : 08 php ;test stores do not alter flags +17c7 : 49c3 eor #$c3 +17c9 : 28 plp +17ca : 8130 sta (indt,x) +17cc : 08 php ;flags after load/store sequence +17cd : 49c3 eor #$c3 +17cf : d91702 cmp abs1,y ;test result trap_ne -175f : d0fe > bne * ;failed not equal (non zero) +17d2 : d0fe > bne * ;failed not equal (non zero) -1761 : 68 pla ;load status +17d4 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -1762 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +17d5 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -1764 : d90d02 cmp fLDx,y ;test flags +17d7 : d91c02 cmp fLDx,y ;test flags trap_ne -1767 : d0fe > bne * ;failed not equal (non zero) +17da : d0fe > bne * ;failed not equal (non zero) -1769 : ca dex -176a : ca dex -176b : 88 dey -176c : 10df bpl tldax5 +17dc : ca dex +17dd : ca dex +17de : 88 dey +17df : 10df bpl tldax5 -176e : a003 ldy #3 ;testing store result -1770 : a200 ldx #0 -1772 : b90302 tstay2 lda abst,y -1775 : 49c3 eor #$c3 -1777 : d90802 cmp abs1,y +17e1 : a003 ldy #3 ;testing store result +17e3 : a200 ldx #0 +17e5 : b90302 tstay2 lda abst,y +17e8 : 49c3 eor #$c3 +17ea : d91702 cmp abs1,y trap_ne ;store to abs data -177a : d0fe > bne * ;failed not equal (non zero) +17ed : d0fe > bne * ;failed not equal (non zero) -177c : 8a txa -177d : 990302 sta abst,y ;clear -1780 : 88 dey -1781 : 10ef bpl tstay2 +17ef : 8a txa +17f0 : 990302 sta abst,y ;clear +17f3 : 88 dey +17f4 : 10ef bpl tstay2 next_test -1783 : ad0002 > lda test_case ;previous test -1786 : c916 > cmp #test_num +17f6 : ad0002 > lda test_case ;previous test +17f9 : c916 > cmp #test_num > trap_ne ;test is out of sequence -1788 : d0fe > bne * ;failed not equal (non zero) +17fb : d0fe > bne * ;failed not equal (non zero) > 0017 = >test_num = test_num + 1 -178a : a917 > lda #test_num ;*** next tests' number -178c : 8d0002 > sta test_case +17fd : a917 > lda #test_num ;*** next tests' number +17ff : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; indexed wraparound test (only zp should wrap) -178f : a2fd ldx #3+$fa -1791 : b519 tldax6 lda zp1-$fa&$ff,x ;wrap on indexed zp -1793 : 9d0901 sta abst-$fa,x ;no STX abs,x! -1796 : ca dex -1797 : e0fa cpx #$fa -1799 : b0f6 bcs tldax6 -179b : a2fd ldx #3+$fa -179d : bd0e01 tldax7 lda abs1-$fa,x ;no wrap on indexed abs -17a0 : 9512 sta zpt-$fa&$ff,x -17a2 : ca dex -17a3 : e0fa cpx #$fa -17a5 : b0f6 bcs tldax7 +1802 : a2fd ldx #3+$fa +1804 : b519 tldax6 lda zp1-$fa&$ff,x ;wrap on indexed zp +1806 : 9d0901 sta abst-$fa,x ;no STX abs,x! +1809 : ca dex +180a : e0fa cpx #$fa +180c : b0f6 bcs tldax6 +180e : a2fd ldx #3+$fa +1810 : bd1d01 tldax7 lda abs1-$fa,x ;no wrap on indexed abs +1813 : 9512 sta zpt-$fa&$ff,x +1815 : ca dex +1816 : e0fa cpx #$fa +1818 : b0f6 bcs tldax7 -17a7 : a203 ldx #3 ;testing wraparound result -17a9 : a000 ldy #0 -17ab : b50c tstax1 lda zpt,x -17ad : d513 cmp zp1,x +181a : a203 ldx #3 ;testing wraparound result +181c : a000 ldy #0 +181e : b50c tstax1 lda zpt,x +1820 : d513 cmp zp1,x trap_ne ;store to zp,x data -17af : d0fe > bne * ;failed not equal (non zero) +1822 : d0fe > bne * ;failed not equal (non zero) -17b1 : 940c sty zpt,x ;clear -17b3 : bd0302 lda abst,x -17b6 : dd0802 cmp abs1,x +1824 : 940c sty zpt,x ;clear +1826 : bd0302 lda abst,x +1829 : dd1702 cmp abs1,x trap_ne ;store to abs,x data -17b9 : d0fe > bne * ;failed not equal (non zero) +182c : d0fe > bne * ;failed not equal (non zero) -17bb : 8a txa -17bc : 9d0302 sta abst,x ;clear -17bf : ca dex -17c0 : 10e9 bpl tstax1 +182e : 8a txa +182f : 9d0302 sta abst,x ;clear +1832 : ca dex +1833 : 10e9 bpl tstax1 -17c2 : a0fb ldy #3+$f8 -17c4 : a2fe ldx #6+$f8 -17c6 : a12c tlday4 lda (ind1-$f8&$ff,x) ;wrap on indexed zp indirect -17c8 : 990b01 sta abst-$f8,y -17cb : ca dex -17cc : ca dex -17cd : 88 dey -17ce : c0f8 cpy #$f8 -17d0 : b0f4 bcs tlday4 -17d2 : a003 ldy #3 ;testing wraparound result -17d4 : a200 ldx #0 -17d6 : b90302 tstay4 lda abst,y -17d9 : d90802 cmp abs1,y +1835 : a0fb ldy #3+$f8 +1837 : a2fe ldx #6+$f8 +1839 : a12c tlday4 lda (ind1-$f8&$ff,x) ;wrap on indexed zp indirect +183b : 990b01 sta abst-$f8,y +183e : ca dex +183f : ca dex +1840 : 88 dey +1841 : c0f8 cpy #$f8 +1843 : b0f4 bcs tlday4 +1845 : a003 ldy #3 ;testing wraparound result +1847 : a200 ldx #0 +1849 : b90302 tstay4 lda abst,y +184c : d91702 cmp abs1,y trap_ne ;store to abs data -17dc : d0fe > bne * ;failed not equal (non zero) +184f : d0fe > bne * ;failed not equal (non zero) -17de : 8a txa -17df : 990302 sta abst,y ;clear -17e2 : 88 dey -17e3 : 10f1 bpl tstay4 +1851 : 8a txa +1852 : 990302 sta abst,y ;clear +1855 : 88 dey +1856 : 10f1 bpl tstay4 -17e5 : a0fb ldy #3+$f8 -17e7 : b91001 tlday5 lda abs1-$f8,y ;no wrap on indexed abs -17ea : 9138 sta (inwt),y -17ec : 88 dey -17ed : c0f8 cpy #$f8 -17ef : b0f6 bcs tlday5 -17f1 : a003 ldy #3 ;testing wraparound result -17f3 : a200 ldx #0 -17f5 : b90302 tstay5 lda abst,y -17f8 : d90802 cmp abs1,y +1858 : a0fb ldy #3+$f8 +185a : b91f01 tlday5 lda abs1-$f8,y ;no wrap on indexed abs +185d : 9138 sta (inwt),y +185f : 88 dey +1860 : c0f8 cpy #$f8 +1862 : b0f6 bcs tlday5 +1864 : a003 ldy #3 ;testing wraparound result +1866 : a200 ldx #0 +1868 : b90302 tstay5 lda abst,y +186b : d91702 cmp abs1,y trap_ne ;store to abs data -17fb : d0fe > bne * ;failed not equal (non zero) +186e : d0fe > bne * ;failed not equal (non zero) -17fd : 8a txa -17fe : 990302 sta abst,y ;clear -1801 : 88 dey -1802 : 10f1 bpl tstay5 +1870 : 8a txa +1871 : 990302 sta abst,y ;clear +1874 : 88 dey +1875 : 10f1 bpl tstay5 -1804 : a0fb ldy #3+$f8 -1806 : a2fe ldx #6+$f8 -1808 : b12e tlday6 lda (inw1),y ;no wrap on zp indirect indexed -180a : 8138 sta (indt-$f8&$ff,x) -180c : ca dex -180d : ca dex -180e : 88 dey -180f : c0f8 cpy #$f8 -1811 : b0f5 bcs tlday6 -1813 : a003 ldy #3 ;testing wraparound result -1815 : a200 ldx #0 -1817 : b90302 tstay6 lda abst,y -181a : d90802 cmp abs1,y +1877 : a0fb ldy #3+$f8 +1879 : a2fe ldx #6+$f8 +187b : b12e tlday6 lda (inw1),y ;no wrap on zp indirect indexed +187d : 8138 sta (indt-$f8&$ff,x) +187f : ca dex +1880 : ca dex +1881 : 88 dey +1882 : c0f8 cpy #$f8 +1884 : b0f5 bcs tlday6 +1886 : a003 ldy #3 ;testing wraparound result +1888 : a200 ldx #0 +188a : b90302 tstay6 lda abst,y +188d : d91702 cmp abs1,y trap_ne ;store to abs data -181d : d0fe > bne * ;failed not equal (non zero) +1890 : d0fe > bne * ;failed not equal (non zero) -181f : 8a txa -1820 : 990302 sta abst,y ;clear -1823 : 88 dey -1824 : 10f1 bpl tstay6 +1892 : 8a txa +1893 : 990302 sta abst,y ;clear +1896 : 88 dey +1897 : 10f1 bpl tstay6 next_test -1826 : ad0002 > lda test_case ;previous test -1829 : c917 > cmp #test_num +1899 : ad0002 > lda test_case ;previous test +189c : c917 > cmp #test_num > trap_ne ;test is out of sequence -182b : d0fe > bne * ;failed not equal (non zero) +189e : d0fe > bne * ;failed not equal (non zero) > 0018 = >test_num = test_num + 1 -182d : a918 > lda #test_num ;*** next tests' number -182f : 8d0002 > sta test_case +18a0 : a918 > lda #test_num ;*** next tests' number +18a2 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; LDA / STA - zp / abs / # set_stat 0 > load_flag 0 -1832 : a900 > lda #0 ;allow test to change I-flag (no mask) +18a5 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1834 : 48 > pha ;use stack to load status -1835 : 28 > plp +18a7 : 48 > pha ;use stack to load status +18a8 : 28 > plp -1836 : a513 lda zp1 -1838 : 08 php ;test stores do not alter flags -1839 : 49c3 eor #$c3 -183b : 28 plp -183c : 8d0302 sta abst -183f : 08 php ;flags after load/store sequence -1840 : 49c3 eor #$c3 -1842 : c9c3 cmp #$c3 ;test result +18a9 : a513 lda zp1 +18ab : 08 php ;test stores do not alter flags +18ac : 49c3 eor #$c3 +18ae : 28 plp +18af : 8d0302 sta abst +18b2 : 08 php ;flags after load/store sequence +18b3 : 49c3 eor #$c3 +18b5 : c9c3 cmp #$c3 ;test result trap_ne -1844 : d0fe > bne * ;failed not equal (non zero) +18b7 : d0fe > bne * ;failed not equal (non zero) -1846 : 68 pla ;load status +18b9 : 68 pla ;load status eor_flag 0 -1847 : 4930 > eor #0|fao ;invert expected flags + always on bits +18ba : 4930 > eor #0|fao ;invert expected flags + always on bits -1849 : cd0d02 cmp fLDx ;test flags +18bc : cd1c02 cmp fLDx ;test flags trap_ne -184c : d0fe > bne * ;failed not equal (non zero) +18bf : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -184e : a900 > lda #0 ;allow test to change I-flag (no mask) +18c1 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1850 : 48 > pha ;use stack to load status -1851 : 28 > plp +18c3 : 48 > pha ;use stack to load status +18c4 : 28 > plp -1852 : a514 lda zp1+1 -1854 : 08 php ;test stores do not alter flags -1855 : 49c3 eor #$c3 -1857 : 28 plp -1858 : 8d0402 sta abst+1 -185b : 08 php ;flags after load/store sequence -185c : 49c3 eor #$c3 -185e : c982 cmp #$82 ;test result +18c5 : a514 lda zp1+1 +18c7 : 08 php ;test stores do not alter flags +18c8 : 49c3 eor #$c3 +18ca : 28 plp +18cb : 8d0402 sta abst+1 +18ce : 08 php ;flags after load/store sequence +18cf : 49c3 eor #$c3 +18d1 : c982 cmp #$82 ;test result trap_ne -1860 : d0fe > bne * ;failed not equal (non zero) +18d3 : d0fe > bne * ;failed not equal (non zero) -1862 : 68 pla ;load status +18d5 : 68 pla ;load status eor_flag 0 -1863 : 4930 > eor #0|fao ;invert expected flags + always on bits +18d6 : 4930 > eor #0|fao ;invert expected flags + always on bits -1865 : cd0e02 cmp fLDx+1 ;test flags +18d8 : cd1d02 cmp fLDx+1 ;test flags trap_ne -1868 : d0fe > bne * ;failed not equal (non zero) +18db : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -186a : a900 > lda #0 ;allow test to change I-flag (no mask) +18dd : a900 > lda #0 ;allow test to change I-flag (no mask) > -186c : 48 > pha ;use stack to load status -186d : 28 > plp +18df : 48 > pha ;use stack to load status +18e0 : 28 > plp -186e : a515 lda zp1+2 -1870 : 08 php ;test stores do not alter flags -1871 : 49c3 eor #$c3 -1873 : 28 plp -1874 : 8d0502 sta abst+2 -1877 : 08 php ;flags after load/store sequence -1878 : 49c3 eor #$c3 -187a : c941 cmp #$41 ;test result +18e1 : a515 lda zp1+2 +18e3 : 08 php ;test stores do not alter flags +18e4 : 49c3 eor #$c3 +18e6 : 28 plp +18e7 : 8d0502 sta abst+2 +18ea : 08 php ;flags after load/store sequence +18eb : 49c3 eor #$c3 +18ed : c941 cmp #$41 ;test result trap_ne -187c : d0fe > bne * ;failed not equal (non zero) +18ef : d0fe > bne * ;failed not equal (non zero) -187e : 68 pla ;load status +18f1 : 68 pla ;load status eor_flag 0 -187f : 4930 > eor #0|fao ;invert expected flags + always on bits +18f2 : 4930 > eor #0|fao ;invert expected flags + always on bits -1881 : cd0f02 cmp fLDx+2 ;test flags +18f4 : cd1e02 cmp fLDx+2 ;test flags trap_ne -1884 : d0fe > bne * ;failed not equal (non zero) +18f7 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -1886 : a900 > lda #0 ;allow test to change I-flag (no mask) +18f9 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1888 : 48 > pha ;use stack to load status -1889 : 28 > plp +18fb : 48 > pha ;use stack to load status +18fc : 28 > plp -188a : a516 lda zp1+3 -188c : 08 php ;test stores do not alter flags -188d : 49c3 eor #$c3 -188f : 28 plp -1890 : 8d0602 sta abst+3 -1893 : 08 php ;flags after load/store sequence -1894 : 49c3 eor #$c3 -1896 : c900 cmp #0 ;test result +18fd : a516 lda zp1+3 +18ff : 08 php ;test stores do not alter flags +1900 : 49c3 eor #$c3 +1902 : 28 plp +1903 : 8d0602 sta abst+3 +1906 : 08 php ;flags after load/store sequence +1907 : 49c3 eor #$c3 +1909 : c900 cmp #0 ;test result trap_ne -1898 : d0fe > bne * ;failed not equal (non zero) +190b : d0fe > bne * ;failed not equal (non zero) -189a : 68 pla ;load status +190d : 68 pla ;load status eor_flag 0 -189b : 4930 > eor #0|fao ;invert expected flags + always on bits +190e : 4930 > eor #0|fao ;invert expected flags + always on bits -189d : cd1002 cmp fLDx+3 ;test flags +1910 : cd1f02 cmp fLDx+3 ;test flags trap_ne -18a0 : d0fe > bne * ;failed not equal (non zero) +1913 : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -18a2 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1915 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -18a4 : 48 > pha ;use stack to load status -18a5 : 28 > plp +1917 : 48 > pha ;use stack to load status +1918 : 28 > plp -18a6 : a513 lda zp1 -18a8 : 08 php ;test stores do not alter flags -18a9 : 49c3 eor #$c3 -18ab : 28 plp -18ac : 8d0302 sta abst -18af : 08 php ;flags after load/store sequence -18b0 : 49c3 eor #$c3 -18b2 : c9c3 cmp #$c3 ;test result +1919 : a513 lda zp1 +191b : 08 php ;test stores do not alter flags +191c : 49c3 eor #$c3 +191e : 28 plp +191f : 8d0302 sta abst +1922 : 08 php ;flags after load/store sequence +1923 : 49c3 eor #$c3 +1925 : c9c3 cmp #$c3 ;test result trap_ne -18b4 : d0fe > bne * ;failed not equal (non zero) +1927 : d0fe > bne * ;failed not equal (non zero) -18b6 : 68 pla ;load status +1929 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -18b7 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +192a : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -18b9 : cd0d02 cmp fLDx ;test flags +192c : cd1c02 cmp fLDx ;test flags trap_ne -18bc : d0fe > bne * ;failed not equal (non zero) +192f : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -18be : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1931 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -18c0 : 48 > pha ;use stack to load status -18c1 : 28 > plp +1933 : 48 > pha ;use stack to load status +1934 : 28 > plp -18c2 : a514 lda zp1+1 -18c4 : 08 php ;test stores do not alter flags -18c5 : 49c3 eor #$c3 -18c7 : 28 plp -18c8 : 8d0402 sta abst+1 -18cb : 08 php ;flags after load/store sequence -18cc : 49c3 eor #$c3 -18ce : c982 cmp #$82 ;test result +1935 : a514 lda zp1+1 +1937 : 08 php ;test stores do not alter flags +1938 : 49c3 eor #$c3 +193a : 28 plp +193b : 8d0402 sta abst+1 +193e : 08 php ;flags after load/store sequence +193f : 49c3 eor #$c3 +1941 : c982 cmp #$82 ;test result trap_ne -18d0 : d0fe > bne * ;failed not equal (non zero) +1943 : d0fe > bne * ;failed not equal (non zero) -18d2 : 68 pla ;load status +1945 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -18d3 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +1946 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -18d5 : cd0e02 cmp fLDx+1 ;test flags +1948 : cd1d02 cmp fLDx+1 ;test flags trap_ne -18d8 : d0fe > bne * ;failed not equal (non zero) +194b : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -18da : a9ff > lda #$ff ;allow test to change I-flag (no mask) +194d : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -18dc : 48 > pha ;use stack to load status -18dd : 28 > plp +194f : 48 > pha ;use stack to load status +1950 : 28 > plp -18de : a515 lda zp1+2 -18e0 : 08 php ;test stores do not alter flags -18e1 : 49c3 eor #$c3 -18e3 : 28 plp -18e4 : 8d0502 sta abst+2 -18e7 : 08 php ;flags after load/store sequence -18e8 : 49c3 eor #$c3 -18ea : c941 cmp #$41 ;test result +1951 : a515 lda zp1+2 +1953 : 08 php ;test stores do not alter flags +1954 : 49c3 eor #$c3 +1956 : 28 plp +1957 : 8d0502 sta abst+2 +195a : 08 php ;flags after load/store sequence +195b : 49c3 eor #$c3 +195d : c941 cmp #$41 ;test result trap_ne -18ec : d0fe > bne * ;failed not equal (non zero) +195f : d0fe > bne * ;failed not equal (non zero) -18ee : 68 pla ;load status +1961 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -18ef : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +1962 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -18f1 : cd0f02 cmp fLDx+2 ;test flags +1964 : cd1e02 cmp fLDx+2 ;test flags trap_ne -18f4 : d0fe > bne * ;failed not equal (non zero) +1967 : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -18f6 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1969 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -18f8 : 48 > pha ;use stack to load status -18f9 : 28 > plp +196b : 48 > pha ;use stack to load status +196c : 28 > plp -18fa : a516 lda zp1+3 -18fc : 08 php ;test stores do not alter flags -18fd : 49c3 eor #$c3 -18ff : 28 plp -1900 : 8d0602 sta abst+3 -1903 : 08 php ;flags after load/store sequence -1904 : 49c3 eor #$c3 -1906 : c900 cmp #0 ;test result +196d : a516 lda zp1+3 +196f : 08 php ;test stores do not alter flags +1970 : 49c3 eor #$c3 +1972 : 28 plp +1973 : 8d0602 sta abst+3 +1976 : 08 php ;flags after load/store sequence +1977 : 49c3 eor #$c3 +1979 : c900 cmp #0 ;test result trap_ne -1908 : d0fe > bne * ;failed not equal (non zero) +197b : d0fe > bne * ;failed not equal (non zero) -190a : 68 pla ;load status +197d : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -190b : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +197e : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -190d : cd1002 cmp fLDx+3 ;test flags +1980 : cd1f02 cmp fLDx+3 ;test flags trap_ne -1910 : d0fe > bne * ;failed not equal (non zero) +1983 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -1912 : a900 > lda #0 ;allow test to change I-flag (no mask) +1985 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1914 : 48 > pha ;use stack to load status -1915 : 28 > plp +1987 : 48 > pha ;use stack to load status +1988 : 28 > plp -1916 : ad0802 lda abs1 -1919 : 08 php ;test stores do not alter flags -191a : 49c3 eor #$c3 -191c : 28 plp -191d : 850c sta zpt -191f : 08 php ;flags after load/store sequence -1920 : 49c3 eor #$c3 -1922 : c513 cmp zp1 ;test result +1989 : ad1702 lda abs1 +198c : 08 php ;test stores do not alter flags +198d : 49c3 eor #$c3 +198f : 28 plp +1990 : 850c sta zpt +1992 : 08 php ;flags after load/store sequence +1993 : 49c3 eor #$c3 +1995 : c513 cmp zp1 ;test result trap_ne -1924 : d0fe > bne * ;failed not equal (non zero) +1997 : d0fe > bne * ;failed not equal (non zero) -1926 : 68 pla ;load status +1999 : 68 pla ;load status eor_flag 0 -1927 : 4930 > eor #0|fao ;invert expected flags + always on bits +199a : 4930 > eor #0|fao ;invert expected flags + always on bits -1929 : cd0d02 cmp fLDx ;test flags +199c : cd1c02 cmp fLDx ;test flags trap_ne -192c : d0fe > bne * ;failed not equal (non zero) +199f : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -192e : a900 > lda #0 ;allow test to change I-flag (no mask) +19a1 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1930 : 48 > pha ;use stack to load status -1931 : 28 > plp +19a3 : 48 > pha ;use stack to load status +19a4 : 28 > plp -1932 : ad0902 lda abs1+1 -1935 : 08 php ;test stores do not alter flags -1936 : 49c3 eor #$c3 -1938 : 28 plp -1939 : 850d sta zpt+1 -193b : 08 php ;flags after load/store sequence -193c : 49c3 eor #$c3 -193e : c514 cmp zp1+1 ;test result +19a5 : ad1802 lda abs1+1 +19a8 : 08 php ;test stores do not alter flags +19a9 : 49c3 eor #$c3 +19ab : 28 plp +19ac : 850d sta zpt+1 +19ae : 08 php ;flags after load/store sequence +19af : 49c3 eor #$c3 +19b1 : c514 cmp zp1+1 ;test result trap_ne -1940 : d0fe > bne * ;failed not equal (non zero) +19b3 : d0fe > bne * ;failed not equal (non zero) -1942 : 68 pla ;load status +19b5 : 68 pla ;load status eor_flag 0 -1943 : 4930 > eor #0|fao ;invert expected flags + always on bits +19b6 : 4930 > eor #0|fao ;invert expected flags + always on bits -1945 : cd0e02 cmp fLDx+1 ;test flags +19b8 : cd1d02 cmp fLDx+1 ;test flags trap_ne -1948 : d0fe > bne * ;failed not equal (non zero) +19bb : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -194a : a900 > lda #0 ;allow test to change I-flag (no mask) +19bd : a900 > lda #0 ;allow test to change I-flag (no mask) > -194c : 48 > pha ;use stack to load status -194d : 28 > plp +19bf : 48 > pha ;use stack to load status +19c0 : 28 > plp -194e : ad0a02 lda abs1+2 -1951 : 08 php ;test stores do not alter flags -1952 : 49c3 eor #$c3 -1954 : 28 plp -1955 : 850e sta zpt+2 -1957 : 08 php ;flags after load/store sequence -1958 : 49c3 eor #$c3 -195a : c515 cmp zp1+2 ;test result +19c1 : ad1902 lda abs1+2 +19c4 : 08 php ;test stores do not alter flags +19c5 : 49c3 eor #$c3 +19c7 : 28 plp +19c8 : 850e sta zpt+2 +19ca : 08 php ;flags after load/store sequence +19cb : 49c3 eor #$c3 +19cd : c515 cmp zp1+2 ;test result trap_ne -195c : d0fe > bne * ;failed not equal (non zero) +19cf : d0fe > bne * ;failed not equal (non zero) -195e : 68 pla ;load status +19d1 : 68 pla ;load status eor_flag 0 -195f : 4930 > eor #0|fao ;invert expected flags + always on bits +19d2 : 4930 > eor #0|fao ;invert expected flags + always on bits -1961 : cd0f02 cmp fLDx+2 ;test flags +19d4 : cd1e02 cmp fLDx+2 ;test flags trap_ne -1964 : d0fe > bne * ;failed not equal (non zero) +19d7 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -1966 : a900 > lda #0 ;allow test to change I-flag (no mask) +19d9 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1968 : 48 > pha ;use stack to load status -1969 : 28 > plp +19db : 48 > pha ;use stack to load status +19dc : 28 > plp -196a : ad0b02 lda abs1+3 -196d : 08 php ;test stores do not alter flags -196e : 49c3 eor #$c3 -1970 : 28 plp -1971 : 850f sta zpt+3 -1973 : 08 php ;flags after load/store sequence -1974 : 49c3 eor #$c3 -1976 : c516 cmp zp1+3 ;test result +19dd : ad1a02 lda abs1+3 +19e0 : 08 php ;test stores do not alter flags +19e1 : 49c3 eor #$c3 +19e3 : 28 plp +19e4 : 850f sta zpt+3 +19e6 : 08 php ;flags after load/store sequence +19e7 : 49c3 eor #$c3 +19e9 : c516 cmp zp1+3 ;test result trap_ne -1978 : d0fe > bne * ;failed not equal (non zero) +19eb : d0fe > bne * ;failed not equal (non zero) -197a : 68 pla ;load status +19ed : 68 pla ;load status eor_flag 0 -197b : 4930 > eor #0|fao ;invert expected flags + always on bits +19ee : 4930 > eor #0|fao ;invert expected flags + always on bits -197d : cd1002 cmp fLDx+3 ;test flags +19f0 : cd1f02 cmp fLDx+3 ;test flags trap_ne -1980 : d0fe > bne * ;failed not equal (non zero) +19f3 : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -1982 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +19f5 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1984 : 48 > pha ;use stack to load status -1985 : 28 > plp +19f7 : 48 > pha ;use stack to load status +19f8 : 28 > plp -1986 : ad0802 lda abs1 -1989 : 08 php ;test stores do not alter flags -198a : 49c3 eor #$c3 -198c : 28 plp -198d : 850c sta zpt -198f : 08 php ;flags after load/store sequence -1990 : 49c3 eor #$c3 -1992 : c513 cmp zp1 ;test result +19f9 : ad1702 lda abs1 +19fc : 08 php ;test stores do not alter flags +19fd : 49c3 eor #$c3 +19ff : 28 plp +1a00 : 850c sta zpt +1a02 : 08 php ;flags after load/store sequence +1a03 : 49c3 eor #$c3 +1a05 : c513 cmp zp1 ;test result trap_ne -1994 : d0fe > bne * ;failed not equal (non zero) +1a07 : d0fe > bne * ;failed not equal (non zero) -1996 : 68 pla ;load status +1a09 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -1997 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +1a0a : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -1999 : cd0d02 cmp fLDx ;test flags +1a0c : cd1c02 cmp fLDx ;test flags trap_ne -199c : d0fe > bne * ;failed not equal (non zero) +1a0f : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -199e : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1a11 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -19a0 : 48 > pha ;use stack to load status -19a1 : 28 > plp +1a13 : 48 > pha ;use stack to load status +1a14 : 28 > plp -19a2 : ad0902 lda abs1+1 -19a5 : 08 php ;test stores do not alter flags -19a6 : 49c3 eor #$c3 -19a8 : 28 plp -19a9 : 850d sta zpt+1 -19ab : 08 php ;flags after load/store sequence -19ac : 49c3 eor #$c3 -19ae : c514 cmp zp1+1 ;test result +1a15 : ad1802 lda abs1+1 +1a18 : 08 php ;test stores do not alter flags +1a19 : 49c3 eor #$c3 +1a1b : 28 plp +1a1c : 850d sta zpt+1 +1a1e : 08 php ;flags after load/store sequence +1a1f : 49c3 eor #$c3 +1a21 : c514 cmp zp1+1 ;test result trap_ne -19b0 : d0fe > bne * ;failed not equal (non zero) +1a23 : d0fe > bne * ;failed not equal (non zero) -19b2 : 68 pla ;load status +1a25 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -19b3 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +1a26 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -19b5 : cd0e02 cmp fLDx+1 ;test flags +1a28 : cd1d02 cmp fLDx+1 ;test flags trap_ne -19b8 : d0fe > bne * ;failed not equal (non zero) +1a2b : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -19ba : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1a2d : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -19bc : 48 > pha ;use stack to load status -19bd : 28 > plp +1a2f : 48 > pha ;use stack to load status +1a30 : 28 > plp -19be : ad0a02 lda abs1+2 -19c1 : 08 php ;test stores do not alter flags -19c2 : 49c3 eor #$c3 -19c4 : 28 plp -19c5 : 850e sta zpt+2 -19c7 : 08 php ;flags after load/store sequence -19c8 : 49c3 eor #$c3 -19ca : c515 cmp zp1+2 ;test result +1a31 : ad1902 lda abs1+2 +1a34 : 08 php ;test stores do not alter flags +1a35 : 49c3 eor #$c3 +1a37 : 28 plp +1a38 : 850e sta zpt+2 +1a3a : 08 php ;flags after load/store sequence +1a3b : 49c3 eor #$c3 +1a3d : c515 cmp zp1+2 ;test result trap_ne -19cc : d0fe > bne * ;failed not equal (non zero) +1a3f : d0fe > bne * ;failed not equal (non zero) -19ce : 68 pla ;load status +1a41 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -19cf : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +1a42 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -19d1 : cd0f02 cmp fLDx+2 ;test flags +1a44 : cd1e02 cmp fLDx+2 ;test flags trap_ne -19d4 : d0fe > bne * ;failed not equal (non zero) +1a47 : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -19d6 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1a49 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -19d8 : 48 > pha ;use stack to load status -19d9 : 28 > plp +1a4b : 48 > pha ;use stack to load status +1a4c : 28 > plp -19da : ad0b02 lda abs1+3 -19dd : 08 php ;test stores do not alter flags -19de : 49c3 eor #$c3 -19e0 : 28 plp -19e1 : 850f sta zpt+3 -19e3 : 08 php ;flags after load/store sequence -19e4 : 49c3 eor #$c3 -19e6 : c516 cmp zp1+3 ;test result +1a4d : ad1a02 lda abs1+3 +1a50 : 08 php ;test stores do not alter flags +1a51 : 49c3 eor #$c3 +1a53 : 28 plp +1a54 : 850f sta zpt+3 +1a56 : 08 php ;flags after load/store sequence +1a57 : 49c3 eor #$c3 +1a59 : c516 cmp zp1+3 ;test result trap_ne -19e8 : d0fe > bne * ;failed not equal (non zero) +1a5b : d0fe > bne * ;failed not equal (non zero) -19ea : 68 pla ;load status +1a5d : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -19eb : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +1a5e : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -19ed : cd1002 cmp fLDx+3 ;test flags +1a60 : cd1f02 cmp fLDx+3 ;test flags trap_ne -19f0 : d0fe > bne * ;failed not equal (non zero) +1a63 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -19f2 : a900 > lda #0 ;allow test to change I-flag (no mask) +1a65 : a900 > lda #0 ;allow test to change I-flag (no mask) > -19f4 : 48 > pha ;use stack to load status -19f5 : 28 > plp +1a67 : 48 > pha ;use stack to load status +1a68 : 28 > plp -19f6 : a9c3 lda #$c3 -19f8 : 08 php -19f9 : cd0802 cmp abs1 ;test result +1a69 : a9c3 lda #$c3 +1a6b : 08 php +1a6c : cd1702 cmp abs1 ;test result trap_ne -19fc : d0fe > bne * ;failed not equal (non zero) +1a6f : d0fe > bne * ;failed not equal (non zero) -19fe : 68 pla ;load status +1a71 : 68 pla ;load status eor_flag 0 -19ff : 4930 > eor #0|fao ;invert expected flags + always on bits +1a72 : 4930 > eor #0|fao ;invert expected flags + always on bits -1a01 : cd0d02 cmp fLDx ;test flags +1a74 : cd1c02 cmp fLDx ;test flags trap_ne -1a04 : d0fe > bne * ;failed not equal (non zero) +1a77 : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -1a06 : a900 > lda #0 ;allow test to change I-flag (no mask) +1a79 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1a08 : 48 > pha ;use stack to load status -1a09 : 28 > plp +1a7b : 48 > pha ;use stack to load status +1a7c : 28 > plp -1a0a : a982 lda #$82 -1a0c : 08 php -1a0d : cd0902 cmp abs1+1 ;test result +1a7d : a982 lda #$82 +1a7f : 08 php +1a80 : cd1802 cmp abs1+1 ;test result trap_ne -1a10 : d0fe > bne * ;failed not equal (non zero) +1a83 : d0fe > bne * ;failed not equal (non zero) -1a12 : 68 pla ;load status +1a85 : 68 pla ;load status eor_flag 0 -1a13 : 4930 > eor #0|fao ;invert expected flags + always on bits +1a86 : 4930 > eor #0|fao ;invert expected flags + always on bits -1a15 : cd0e02 cmp fLDx+1 ;test flags +1a88 : cd1d02 cmp fLDx+1 ;test flags trap_ne -1a18 : d0fe > bne * ;failed not equal (non zero) +1a8b : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -1a1a : a900 > lda #0 ;allow test to change I-flag (no mask) +1a8d : a900 > lda #0 ;allow test to change I-flag (no mask) > -1a1c : 48 > pha ;use stack to load status -1a1d : 28 > plp +1a8f : 48 > pha ;use stack to load status +1a90 : 28 > plp -1a1e : a941 lda #$41 -1a20 : 08 php -1a21 : cd0a02 cmp abs1+2 ;test result +1a91 : a941 lda #$41 +1a93 : 08 php +1a94 : cd1902 cmp abs1+2 ;test result trap_ne -1a24 : d0fe > bne * ;failed not equal (non zero) +1a97 : d0fe > bne * ;failed not equal (non zero) -1a26 : 68 pla ;load status +1a99 : 68 pla ;load status eor_flag 0 -1a27 : 4930 > eor #0|fao ;invert expected flags + always on bits +1a9a : 4930 > eor #0|fao ;invert expected flags + always on bits -1a29 : cd0f02 cmp fLDx+2 ;test flags +1a9c : cd1e02 cmp fLDx+2 ;test flags trap_ne -1a2c : d0fe > bne * ;failed not equal (non zero) +1a9f : d0fe > bne * ;failed not equal (non zero) set_stat 0 > load_flag 0 -1a2e : a900 > lda #0 ;allow test to change I-flag (no mask) +1aa1 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1a30 : 48 > pha ;use stack to load status -1a31 : 28 > plp +1aa3 : 48 > pha ;use stack to load status +1aa4 : 28 > plp -1a32 : a900 lda #0 -1a34 : 08 php -1a35 : cd0b02 cmp abs1+3 ;test result +1aa5 : a900 lda #0 +1aa7 : 08 php +1aa8 : cd1a02 cmp abs1+3 ;test result trap_ne -1a38 : d0fe > bne * ;failed not equal (non zero) +1aab : d0fe > bne * ;failed not equal (non zero) -1a3a : 68 pla ;load status +1aad : 68 pla ;load status eor_flag 0 -1a3b : 4930 > eor #0|fao ;invert expected flags + always on bits +1aae : 4930 > eor #0|fao ;invert expected flags + always on bits -1a3d : cd1002 cmp fLDx+3 ;test flags +1ab0 : cd1f02 cmp fLDx+3 ;test flags trap_ne -1a40 : d0fe > bne * ;failed not equal (non zero) +1ab3 : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -1a42 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1ab5 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1a44 : 48 > pha ;use stack to load status -1a45 : 28 > plp +1ab7 : 48 > pha ;use stack to load status +1ab8 : 28 > plp -1a46 : a9c3 lda #$c3 -1a48 : 08 php -1a49 : cd0802 cmp abs1 ;test result +1ab9 : a9c3 lda #$c3 +1abb : 08 php +1abc : cd1702 cmp abs1 ;test result trap_ne -1a4c : d0fe > bne * ;failed not equal (non zero) +1abf : d0fe > bne * ;failed not equal (non zero) -1a4e : 68 pla ;load status +1ac1 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -1a4f : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +1ac2 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -1a51 : cd0d02 cmp fLDx ;test flags +1ac4 : cd1c02 cmp fLDx ;test flags trap_ne -1a54 : d0fe > bne * ;failed not equal (non zero) +1ac7 : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -1a56 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1ac9 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1a58 : 48 > pha ;use stack to load status -1a59 : 28 > plp +1acb : 48 > pha ;use stack to load status +1acc : 28 > plp -1a5a : a982 lda #$82 -1a5c : 08 php -1a5d : cd0902 cmp abs1+1 ;test result +1acd : a982 lda #$82 +1acf : 08 php +1ad0 : cd1802 cmp abs1+1 ;test result trap_ne -1a60 : d0fe > bne * ;failed not equal (non zero) +1ad3 : d0fe > bne * ;failed not equal (non zero) -1a62 : 68 pla ;load status +1ad5 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -1a63 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +1ad6 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -1a65 : cd0e02 cmp fLDx+1 ;test flags +1ad8 : cd1d02 cmp fLDx+1 ;test flags trap_ne -1a68 : d0fe > bne * ;failed not equal (non zero) +1adb : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -1a6a : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1add : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1a6c : 48 > pha ;use stack to load status -1a6d : 28 > plp +1adf : 48 > pha ;use stack to load status +1ae0 : 28 > plp -1a6e : a941 lda #$41 -1a70 : 08 php -1a71 : cd0a02 cmp abs1+2 ;test result +1ae1 : a941 lda #$41 +1ae3 : 08 php +1ae4 : cd1902 cmp abs1+2 ;test result trap_ne -1a74 : d0fe > bne * ;failed not equal (non zero) +1ae7 : d0fe > bne * ;failed not equal (non zero) -1a76 : 68 pla ;load status +1ae9 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -1a77 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +1aea : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -1a79 : cd0f02 cmp fLDx+2 ;test flags +1aec : cd1e02 cmp fLDx+2 ;test flags trap_ne -1a7c : d0fe > bne * ;failed not equal (non zero) +1aef : d0fe > bne * ;failed not equal (non zero) set_stat $ff > load_flag $ff -1a7e : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1af1 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1a80 : 48 > pha ;use stack to load status -1a81 : 28 > plp +1af3 : 48 > pha ;use stack to load status +1af4 : 28 > plp -1a82 : a900 lda #0 -1a84 : 08 php -1a85 : cd0b02 cmp abs1+3 ;test result +1af5 : a900 lda #0 +1af7 : 08 php +1af8 : cd1a02 cmp abs1+3 ;test result trap_ne -1a88 : d0fe > bne * ;failed not equal (non zero) +1afb : d0fe > bne * ;failed not equal (non zero) -1a8a : 68 pla ;load status +1afd : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -1a8b : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +1afe : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -1a8d : cd1002 cmp fLDx+3 ;test flags +1b00 : cd1f02 cmp fLDx+3 ;test flags trap_ne -1a90 : d0fe > bne * ;failed not equal (non zero) +1b03 : d0fe > bne * ;failed not equal (non zero) -1a92 : a200 ldx #0 -1a94 : a50c lda zpt -1a96 : 49c3 eor #$c3 -1a98 : c513 cmp zp1 +1b05 : a200 ldx #0 +1b07 : a50c lda zpt +1b09 : 49c3 eor #$c3 +1b0b : c513 cmp zp1 trap_ne ;store to zp data -1a9a : d0fe > bne * ;failed not equal (non zero) +1b0d : d0fe > bne * ;failed not equal (non zero) -1a9c : 860c stx zpt ;clear -1a9e : ad0302 lda abst -1aa1 : 49c3 eor #$c3 -1aa3 : cd0802 cmp abs1 +1b0f : 860c stx zpt ;clear +1b11 : ad0302 lda abst +1b14 : 49c3 eor #$c3 +1b16 : cd1702 cmp abs1 trap_ne ;store to abs data -1aa6 : d0fe > bne * ;failed not equal (non zero) +1b19 : d0fe > bne * ;failed not equal (non zero) -1aa8 : 8e0302 stx abst ;clear -1aab : a50d lda zpt+1 -1aad : 49c3 eor #$c3 -1aaf : c514 cmp zp1+1 +1b1b : 8e0302 stx abst ;clear +1b1e : a50d lda zpt+1 +1b20 : 49c3 eor #$c3 +1b22 : c514 cmp zp1+1 trap_ne ;store to zp data -1ab1 : d0fe > bne * ;failed not equal (non zero) +1b24 : d0fe > bne * ;failed not equal (non zero) -1ab3 : 860d stx zpt+1 ;clear -1ab5 : ad0402 lda abst+1 -1ab8 : 49c3 eor #$c3 -1aba : cd0902 cmp abs1+1 +1b26 : 860d stx zpt+1 ;clear +1b28 : ad0402 lda abst+1 +1b2b : 49c3 eor #$c3 +1b2d : cd1802 cmp abs1+1 trap_ne ;store to abs data -1abd : d0fe > bne * ;failed not equal (non zero) +1b30 : d0fe > bne * ;failed not equal (non zero) -1abf : 8e0402 stx abst+1 ;clear -1ac2 : a50e lda zpt+2 -1ac4 : 49c3 eor #$c3 -1ac6 : c515 cmp zp1+2 +1b32 : 8e0402 stx abst+1 ;clear +1b35 : a50e lda zpt+2 +1b37 : 49c3 eor #$c3 +1b39 : c515 cmp zp1+2 trap_ne ;store to zp data -1ac8 : d0fe > bne * ;failed not equal (non zero) +1b3b : d0fe > bne * ;failed not equal (non zero) -1aca : 860e stx zpt+2 ;clear -1acc : ad0502 lda abst+2 -1acf : 49c3 eor #$c3 -1ad1 : cd0a02 cmp abs1+2 +1b3d : 860e stx zpt+2 ;clear +1b3f : ad0502 lda abst+2 +1b42 : 49c3 eor #$c3 +1b44 : cd1902 cmp abs1+2 trap_ne ;store to abs data -1ad4 : d0fe > bne * ;failed not equal (non zero) +1b47 : d0fe > bne * ;failed not equal (non zero) -1ad6 : 8e0502 stx abst+2 ;clear -1ad9 : a50f lda zpt+3 -1adb : 49c3 eor #$c3 -1add : c516 cmp zp1+3 +1b49 : 8e0502 stx abst+2 ;clear +1b4c : a50f lda zpt+3 +1b4e : 49c3 eor #$c3 +1b50 : c516 cmp zp1+3 trap_ne ;store to zp data -1adf : d0fe > bne * ;failed not equal (non zero) +1b52 : d0fe > bne * ;failed not equal (non zero) -1ae1 : 860f stx zpt+3 ;clear -1ae3 : ad0602 lda abst+3 -1ae6 : 49c3 eor #$c3 -1ae8 : cd0b02 cmp abs1+3 +1b54 : 860f stx zpt+3 ;clear +1b56 : ad0602 lda abst+3 +1b59 : 49c3 eor #$c3 +1b5b : cd1a02 cmp abs1+3 trap_ne ;store to abs data -1aeb : d0fe > bne * ;failed not equal (non zero) +1b5e : d0fe > bne * ;failed not equal (non zero) -1aed : 8e0602 stx abst+3 ;clear +1b60 : 8e0602 stx abst+3 ;clear next_test -1af0 : ad0002 > lda test_case ;previous test -1af3 : c918 > cmp #test_num +1b63 : ad0002 > lda test_case ;previous test +1b66 : c918 > cmp #test_num > trap_ne ;test is out of sequence -1af5 : d0fe > bne * ;failed not equal (non zero) +1b68 : d0fe > bne * ;failed not equal (non zero) > 0019 = >test_num = test_num + 1 -1af7 : a919 > lda #test_num ;*** next tests' number -1af9 : 8d0002 > sta test_case +1b6a : a919 > lda #test_num ;*** next tests' number +1b6c : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test @@ -6690,4227 +6906,4119 @@ ffff = ram_top = -1 ; BIT - zp / abs set_a $ff,0 > load_flag 0 -1afc : a900 > lda #0 ;allow test to change I-flag (no mask) +1b6f : a900 > lda #0 ;allow test to change I-flag (no mask) > -1afe : 48 > pha ;use stack to load status -1aff : a9ff > lda #$ff ;precharge accu -1b01 : 28 > plp +1b71 : 48 > pha ;use stack to load status +1b72 : a9ff > lda #$ff ;precharge accu +1b74 : 28 > plp -1b02 : 2416 bit zp1+3 ;00 - should set Z / clear NV +1b75 : 2416 bit zp1+3 ;00 - should set Z / clear NV tst_a $ff,fz -1b04 : 08 > php ;save flags -1b05 : c9ff > cmp #$ff ;test result +1b77 : 08 > php ;save flags +1b78 : c9ff > cmp #$ff ;test result > trap_ne -1b07 : d0fe > bne * ;failed not equal (non zero) +1b7a : d0fe > bne * ;failed not equal (non zero) > -1b09 : 68 > pla ;load status -1b0a : 48 > pha +1b7c : 68 > pla ;load status +1b7d : 48 > pha > cmp_flag fz -1b0b : c932 > cmp #(fz |fao)&m8 ;expected flags + always on bits +1b7e : c932 > cmp #(fz |fao)&m8 ;expected flags + always on bits > > trap_ne -1b0d : d0fe > bne * ;failed not equal (non zero) +1b80 : d0fe > bne * ;failed not equal (non zero) > -1b0f : 28 > plp ;restore status +1b82 : 28 > plp ;restore status set_a 1,0 > load_flag 0 -1b10 : a900 > lda #0 ;allow test to change I-flag (no mask) +1b83 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1b12 : 48 > pha ;use stack to load status -1b13 : a901 > lda #1 ;precharge accu -1b15 : 28 > plp +1b85 : 48 > pha ;use stack to load status +1b86 : a901 > lda #1 ;precharge accu +1b88 : 28 > plp -1b16 : 2415 bit zp1+2 ;41 - should set V (M6) / clear NZ +1b89 : 2415 bit zp1+2 ;41 - should set V (M6) / clear NZ tst_a 1,fv -1b18 : 08 > php ;save flags -1b19 : c901 > cmp #1 ;test result +1b8b : 08 > php ;save flags +1b8c : c901 > cmp #1 ;test result > trap_ne -1b1b : d0fe > bne * ;failed not equal (non zero) +1b8e : d0fe > bne * ;failed not equal (non zero) > -1b1d : 68 > pla ;load status -1b1e : 48 > pha +1b90 : 68 > pla ;load status +1b91 : 48 > pha > cmp_flag fv -1b1f : c970 > cmp #(fv|fao)&m8 ;expected flags + always on bits +1b92 : c970 > cmp #(fv|fao)&m8 ;expected flags + always on bits > > trap_ne -1b21 : d0fe > bne * ;failed not equal (non zero) +1b94 : d0fe > bne * ;failed not equal (non zero) > -1b23 : 28 > plp ;restore status +1b96 : 28 > plp ;restore status set_a 1,0 > load_flag 0 -1b24 : a900 > lda #0 ;allow test to change I-flag (no mask) +1b97 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1b26 : 48 > pha ;use stack to load status -1b27 : a901 > lda #1 ;precharge accu -1b29 : 28 > plp +1b99 : 48 > pha ;use stack to load status +1b9a : a901 > lda #1 ;precharge accu +1b9c : 28 > plp -1b2a : 2414 bit zp1+1 ;82 - should set N (M7) & Z / clear V +1b9d : 2414 bit zp1+1 ;82 - should set N (M7) & Z / clear V tst_a 1,fnz -1b2c : 08 > php ;save flags -1b2d : c901 > cmp #1 ;test result +1b9f : 08 > php ;save flags +1ba0 : c901 > cmp #1 ;test result > trap_ne -1b2f : d0fe > bne * ;failed not equal (non zero) +1ba2 : d0fe > bne * ;failed not equal (non zero) > -1b31 : 68 > pla ;load status -1b32 : 48 > pha +1ba4 : 68 > pla ;load status +1ba5 : 48 > pha > cmp_flag fnz -1b33 : c9b2 > cmp #(fnz|fao)&m8 ;expected flags + always on bits +1ba6 : c9b2 > cmp #(fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -1b35 : d0fe > bne * ;failed not equal (non zero) +1ba8 : d0fe > bne * ;failed not equal (non zero) > -1b37 : 28 > plp ;restore status +1baa : 28 > plp ;restore status set_a 1,0 > load_flag 0 -1b38 : a900 > lda #0 ;allow test to change I-flag (no mask) +1bab : a900 > lda #0 ;allow test to change I-flag (no mask) > -1b3a : 48 > pha ;use stack to load status -1b3b : a901 > lda #1 ;precharge accu -1b3d : 28 > plp +1bad : 48 > pha ;use stack to load status +1bae : a901 > lda #1 ;precharge accu +1bb0 : 28 > plp -1b3e : 2413 bit zp1 ;c3 - should set N (M7) & V (M6) / clear Z +1bb1 : 2413 bit zp1 ;c3 - should set N (M7) & V (M6) / clear Z tst_a 1,fnv -1b40 : 08 > php ;save flags -1b41 : c901 > cmp #1 ;test result +1bb3 : 08 > php ;save flags +1bb4 : c901 > cmp #1 ;test result > trap_ne -1b43 : d0fe > bne * ;failed not equal (non zero) +1bb6 : d0fe > bne * ;failed not equal (non zero) > -1b45 : 68 > pla ;load status -1b46 : 48 > pha +1bb8 : 68 > pla ;load status +1bb9 : 48 > pha > cmp_flag fnv -1b47 : c9f0 > cmp #(fnv|fao)&m8 ;expected flags + always on bits +1bba : c9f0 > cmp #(fnv|fao)&m8 ;expected flags + always on bits > > trap_ne -1b49 : d0fe > bne * ;failed not equal (non zero) +1bbc : d0fe > bne * ;failed not equal (non zero) > -1b4b : 28 > plp ;restore status +1bbe : 28 > plp ;restore status set_a $ff,$ff > load_flag $ff -1b4c : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1bbf : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1b4e : 48 > pha ;use stack to load status -1b4f : a9ff > lda #$ff ;precharge accu -1b51 : 28 > plp +1bc1 : 48 > pha ;use stack to load status +1bc2 : a9ff > lda #$ff ;precharge accu +1bc4 : 28 > plp -1b52 : 2416 bit zp1+3 ;00 - should set Z / clear NV +1bc5 : 2416 bit zp1+3 ;00 - should set Z / clear NV tst_a $ff,~fnv -1b54 : 08 > php ;save flags -1b55 : c9ff > cmp #$ff ;test result +1bc7 : 08 > php ;save flags +1bc8 : c9ff > cmp #$ff ;test result > trap_ne -1b57 : d0fe > bne * ;failed not equal (non zero) +1bca : d0fe > bne * ;failed not equal (non zero) > -1b59 : 68 > pla ;load status -1b5a : 48 > pha +1bcc : 68 > pla ;load status +1bcd : 48 > pha > cmp_flag ~fnv -1b5b : c93f > cmp #(~fnv |fao)&m8 ;expected flags + always on bits +1bce : c93f > cmp #(~fnv |fao)&m8 ;expected flags + always on bits > > trap_ne -1b5d : d0fe > bne * ;failed not equal (non zero) +1bd0 : d0fe > bne * ;failed not equal (non zero) > -1b5f : 28 > plp ;restore status +1bd2 : 28 > plp ;restore status set_a 1,$ff > load_flag $ff -1b60 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1bd3 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1b62 : 48 > pha ;use stack to load status -1b63 : a901 > lda #1 ;precharge accu -1b65 : 28 > plp +1bd5 : 48 > pha ;use stack to load status +1bd6 : a901 > lda #1 ;precharge accu +1bd8 : 28 > plp -1b66 : 2415 bit zp1+2 ;41 - should set V (M6) / clear NZ +1bd9 : 2415 bit zp1+2 ;41 - should set V (M6) / clear NZ tst_a 1,~fnz -1b68 : 08 > php ;save flags -1b69 : c901 > cmp #1 ;test result +1bdb : 08 > php ;save flags +1bdc : c901 > cmp #1 ;test result > trap_ne -1b6b : d0fe > bne * ;failed not equal (non zero) +1bde : d0fe > bne * ;failed not equal (non zero) > -1b6d : 68 > pla ;load status -1b6e : 48 > pha +1be0 : 68 > pla ;load status +1be1 : 48 > pha > cmp_flag ~fnz -1b6f : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits +1be2 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -1b71 : d0fe > bne * ;failed not equal (non zero) +1be4 : d0fe > bne * ;failed not equal (non zero) > -1b73 : 28 > plp ;restore status +1be6 : 28 > plp ;restore status set_a 1,$ff > load_flag $ff -1b74 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1be7 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1b76 : 48 > pha ;use stack to load status -1b77 : a901 > lda #1 ;precharge accu -1b79 : 28 > plp +1be9 : 48 > pha ;use stack to load status +1bea : a901 > lda #1 ;precharge accu +1bec : 28 > plp -1b7a : 2414 bit zp1+1 ;82 - should set N (M7) & Z / clear V +1bed : 2414 bit zp1+1 ;82 - should set N (M7) & Z / clear V tst_a 1,~fv -1b7c : 08 > php ;save flags -1b7d : c901 > cmp #1 ;test result +1bef : 08 > php ;save flags +1bf0 : c901 > cmp #1 ;test result > trap_ne -1b7f : d0fe > bne * ;failed not equal (non zero) +1bf2 : d0fe > bne * ;failed not equal (non zero) > -1b81 : 68 > pla ;load status -1b82 : 48 > pha +1bf4 : 68 > pla ;load status +1bf5 : 48 > pha > cmp_flag ~fv -1b83 : c9bf > cmp #(~fv|fao)&m8 ;expected flags + always on bits +1bf6 : c9bf > cmp #(~fv|fao)&m8 ;expected flags + always on bits > > trap_ne -1b85 : d0fe > bne * ;failed not equal (non zero) +1bf8 : d0fe > bne * ;failed not equal (non zero) > -1b87 : 28 > plp ;restore status +1bfa : 28 > plp ;restore status set_a 1,$ff > load_flag $ff -1b88 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1bfb : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1b8a : 48 > pha ;use stack to load status -1b8b : a901 > lda #1 ;precharge accu -1b8d : 28 > plp +1bfd : 48 > pha ;use stack to load status +1bfe : a901 > lda #1 ;precharge accu +1c00 : 28 > plp -1b8e : 2413 bit zp1 ;c3 - should set N (M7) & V (M6) / clear Z +1c01 : 2413 bit zp1 ;c3 - should set N (M7) & V (M6) / clear Z tst_a 1,~fz -1b90 : 08 > php ;save flags -1b91 : c901 > cmp #1 ;test result +1c03 : 08 > php ;save flags +1c04 : c901 > cmp #1 ;test result > trap_ne -1b93 : d0fe > bne * ;failed not equal (non zero) +1c06 : d0fe > bne * ;failed not equal (non zero) > -1b95 : 68 > pla ;load status -1b96 : 48 > pha +1c08 : 68 > pla ;load status +1c09 : 48 > pha > cmp_flag ~fz -1b97 : c9fd > cmp #(~fz|fao)&m8 ;expected flags + always on bits +1c0a : c9fd > cmp #(~fz|fao)&m8 ;expected flags + always on bits > > trap_ne -1b99 : d0fe > bne * ;failed not equal (non zero) +1c0c : d0fe > bne * ;failed not equal (non zero) > -1b9b : 28 > plp ;restore status +1c0e : 28 > plp ;restore status set_a $ff,0 > load_flag 0 -1b9c : a900 > lda #0 ;allow test to change I-flag (no mask) +1c0f : a900 > lda #0 ;allow test to change I-flag (no mask) > -1b9e : 48 > pha ;use stack to load status -1b9f : a9ff > lda #$ff ;precharge accu -1ba1 : 28 > plp +1c11 : 48 > pha ;use stack to load status +1c12 : a9ff > lda #$ff ;precharge accu +1c14 : 28 > plp -1ba2 : 2c0b02 bit abs1+3 ;00 - should set Z / clear NV +1c15 : 2c1a02 bit abs1+3 ;00 - should set Z / clear NV tst_a $ff,fz -1ba5 : 08 > php ;save flags -1ba6 : c9ff > cmp #$ff ;test result +1c18 : 08 > php ;save flags +1c19 : c9ff > cmp #$ff ;test result > trap_ne -1ba8 : d0fe > bne * ;failed not equal (non zero) +1c1b : d0fe > bne * ;failed not equal (non zero) > -1baa : 68 > pla ;load status -1bab : 48 > pha +1c1d : 68 > pla ;load status +1c1e : 48 > pha > cmp_flag fz -1bac : c932 > cmp #(fz |fao)&m8 ;expected flags + always on bits +1c1f : c932 > cmp #(fz |fao)&m8 ;expected flags + always on bits > > trap_ne -1bae : d0fe > bne * ;failed not equal (non zero) +1c21 : d0fe > bne * ;failed not equal (non zero) > -1bb0 : 28 > plp ;restore status +1c23 : 28 > plp ;restore status set_a 1,0 > load_flag 0 -1bb1 : a900 > lda #0 ;allow test to change I-flag (no mask) +1c24 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1bb3 : 48 > pha ;use stack to load status -1bb4 : a901 > lda #1 ;precharge accu -1bb6 : 28 > plp +1c26 : 48 > pha ;use stack to load status +1c27 : a901 > lda #1 ;precharge accu +1c29 : 28 > plp -1bb7 : 2c0a02 bit abs1+2 ;41 - should set V (M6) / clear NZ +1c2a : 2c1902 bit abs1+2 ;41 - should set V (M6) / clear NZ tst_a 1,fv -1bba : 08 > php ;save flags -1bbb : c901 > cmp #1 ;test result +1c2d : 08 > php ;save flags +1c2e : c901 > cmp #1 ;test result > trap_ne -1bbd : d0fe > bne * ;failed not equal (non zero) +1c30 : d0fe > bne * ;failed not equal (non zero) > -1bbf : 68 > pla ;load status -1bc0 : 48 > pha +1c32 : 68 > pla ;load status +1c33 : 48 > pha > cmp_flag fv -1bc1 : c970 > cmp #(fv|fao)&m8 ;expected flags + always on bits +1c34 : c970 > cmp #(fv|fao)&m8 ;expected flags + always on bits > > trap_ne -1bc3 : d0fe > bne * ;failed not equal (non zero) +1c36 : d0fe > bne * ;failed not equal (non zero) > -1bc5 : 28 > plp ;restore status +1c38 : 28 > plp ;restore status set_a 1,0 > load_flag 0 -1bc6 : a900 > lda #0 ;allow test to change I-flag (no mask) +1c39 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1bc8 : 48 > pha ;use stack to load status -1bc9 : a901 > lda #1 ;precharge accu -1bcb : 28 > plp +1c3b : 48 > pha ;use stack to load status +1c3c : a901 > lda #1 ;precharge accu +1c3e : 28 > plp -1bcc : 2c0902 bit abs1+1 ;82 - should set N (M7) & Z / clear V +1c3f : 2c1802 bit abs1+1 ;82 - should set N (M7) & Z / clear V tst_a 1,fnz -1bcf : 08 > php ;save flags -1bd0 : c901 > cmp #1 ;test result +1c42 : 08 > php ;save flags +1c43 : c901 > cmp #1 ;test result > trap_ne -1bd2 : d0fe > bne * ;failed not equal (non zero) +1c45 : d0fe > bne * ;failed not equal (non zero) > -1bd4 : 68 > pla ;load status -1bd5 : 48 > pha +1c47 : 68 > pla ;load status +1c48 : 48 > pha > cmp_flag fnz -1bd6 : c9b2 > cmp #(fnz|fao)&m8 ;expected flags + always on bits +1c49 : c9b2 > cmp #(fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -1bd8 : d0fe > bne * ;failed not equal (non zero) +1c4b : d0fe > bne * ;failed not equal (non zero) > -1bda : 28 > plp ;restore status +1c4d : 28 > plp ;restore status set_a 1,0 > load_flag 0 -1bdb : a900 > lda #0 ;allow test to change I-flag (no mask) +1c4e : a900 > lda #0 ;allow test to change I-flag (no mask) > -1bdd : 48 > pha ;use stack to load status -1bde : a901 > lda #1 ;precharge accu -1be0 : 28 > plp +1c50 : 48 > pha ;use stack to load status +1c51 : a901 > lda #1 ;precharge accu +1c53 : 28 > plp -1be1 : 2c0802 bit abs1 ;c3 - should set N (M7) & V (M6) / clear Z +1c54 : 2c1702 bit abs1 ;c3 - should set N (M7) & V (M6) / clear Z tst_a 1,fnv -1be4 : 08 > php ;save flags -1be5 : c901 > cmp #1 ;test result +1c57 : 08 > php ;save flags +1c58 : c901 > cmp #1 ;test result > trap_ne -1be7 : d0fe > bne * ;failed not equal (non zero) +1c5a : d0fe > bne * ;failed not equal (non zero) > -1be9 : 68 > pla ;load status -1bea : 48 > pha +1c5c : 68 > pla ;load status +1c5d : 48 > pha > cmp_flag fnv -1beb : c9f0 > cmp #(fnv|fao)&m8 ;expected flags + always on bits +1c5e : c9f0 > cmp #(fnv|fao)&m8 ;expected flags + always on bits > > trap_ne -1bed : d0fe > bne * ;failed not equal (non zero) +1c60 : d0fe > bne * ;failed not equal (non zero) > -1bef : 28 > plp ;restore status +1c62 : 28 > plp ;restore status set_a $ff,$ff > load_flag $ff -1bf0 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1c63 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1bf2 : 48 > pha ;use stack to load status -1bf3 : a9ff > lda #$ff ;precharge accu -1bf5 : 28 > plp +1c65 : 48 > pha ;use stack to load status +1c66 : a9ff > lda #$ff ;precharge accu +1c68 : 28 > plp -1bf6 : 2c0b02 bit abs1+3 ;00 - should set Z / clear NV +1c69 : 2c1a02 bit abs1+3 ;00 - should set Z / clear NV tst_a $ff,~fnv -1bf9 : 08 > php ;save flags -1bfa : c9ff > cmp #$ff ;test result +1c6c : 08 > php ;save flags +1c6d : c9ff > cmp #$ff ;test result > trap_ne -1bfc : d0fe > bne * ;failed not equal (non zero) +1c6f : d0fe > bne * ;failed not equal (non zero) > -1bfe : 68 > pla ;load status -1bff : 48 > pha +1c71 : 68 > pla ;load status +1c72 : 48 > pha > cmp_flag ~fnv -1c00 : c93f > cmp #(~fnv |fao)&m8 ;expected flags + always on bits +1c73 : c93f > cmp #(~fnv |fao)&m8 ;expected flags + always on bits > > trap_ne -1c02 : d0fe > bne * ;failed not equal (non zero) +1c75 : d0fe > bne * ;failed not equal (non zero) > -1c04 : 28 > plp ;restore status +1c77 : 28 > plp ;restore status set_a 1,$ff > load_flag $ff -1c05 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1c78 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1c07 : 48 > pha ;use stack to load status -1c08 : a901 > lda #1 ;precharge accu -1c0a : 28 > plp +1c7a : 48 > pha ;use stack to load status +1c7b : a901 > lda #1 ;precharge accu +1c7d : 28 > plp -1c0b : 2c0a02 bit abs1+2 ;41 - should set V (M6) / clear NZ +1c7e : 2c1902 bit abs1+2 ;41 - should set V (M6) / clear NZ tst_a 1,~fnz -1c0e : 08 > php ;save flags -1c0f : c901 > cmp #1 ;test result +1c81 : 08 > php ;save flags +1c82 : c901 > cmp #1 ;test result > trap_ne -1c11 : d0fe > bne * ;failed not equal (non zero) +1c84 : d0fe > bne * ;failed not equal (non zero) > -1c13 : 68 > pla ;load status -1c14 : 48 > pha +1c86 : 68 > pla ;load status +1c87 : 48 > pha > cmp_flag ~fnz -1c15 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits +1c88 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -1c17 : d0fe > bne * ;failed not equal (non zero) +1c8a : d0fe > bne * ;failed not equal (non zero) > -1c19 : 28 > plp ;restore status +1c8c : 28 > plp ;restore status set_a 1,$ff > load_flag $ff -1c1a : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1c8d : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1c1c : 48 > pha ;use stack to load status -1c1d : a901 > lda #1 ;precharge accu -1c1f : 28 > plp +1c8f : 48 > pha ;use stack to load status +1c90 : a901 > lda #1 ;precharge accu +1c92 : 28 > plp -1c20 : 2c0902 bit abs1+1 ;82 - should set N (M7) & Z / clear V +1c93 : 2c1802 bit abs1+1 ;82 - should set N (M7) & Z / clear V tst_a 1,~fv -1c23 : 08 > php ;save flags -1c24 : c901 > cmp #1 ;test result +1c96 : 08 > php ;save flags +1c97 : c901 > cmp #1 ;test result > trap_ne -1c26 : d0fe > bne * ;failed not equal (non zero) +1c99 : d0fe > bne * ;failed not equal (non zero) > -1c28 : 68 > pla ;load status -1c29 : 48 > pha +1c9b : 68 > pla ;load status +1c9c : 48 > pha > cmp_flag ~fv -1c2a : c9bf > cmp #(~fv|fao)&m8 ;expected flags + always on bits +1c9d : c9bf > cmp #(~fv|fao)&m8 ;expected flags + always on bits > > trap_ne -1c2c : d0fe > bne * ;failed not equal (non zero) +1c9f : d0fe > bne * ;failed not equal (non zero) > -1c2e : 28 > plp ;restore status +1ca1 : 28 > plp ;restore status set_a 1,$ff > load_flag $ff -1c2f : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1ca2 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1c31 : 48 > pha ;use stack to load status -1c32 : a901 > lda #1 ;precharge accu -1c34 : 28 > plp +1ca4 : 48 > pha ;use stack to load status +1ca5 : a901 > lda #1 ;precharge accu +1ca7 : 28 > plp -1c35 : 2c0802 bit abs1 ;c3 - should set N (M7) & V (M6) / clear Z +1ca8 : 2c1702 bit abs1 ;c3 - should set N (M7) & V (M6) / clear Z tst_a 1,~fz -1c38 : 08 > php ;save flags -1c39 : c901 > cmp #1 ;test result +1cab : 08 > php ;save flags +1cac : c901 > cmp #1 ;test result > trap_ne -1c3b : d0fe > bne * ;failed not equal (non zero) +1cae : d0fe > bne * ;failed not equal (non zero) > -1c3d : 68 > pla ;load status -1c3e : 48 > pha +1cb0 : 68 > pla ;load status +1cb1 : 48 > pha > cmp_flag ~fz -1c3f : c9fd > cmp #(~fz|fao)&m8 ;expected flags + always on bits +1cb2 : c9fd > cmp #(~fz|fao)&m8 ;expected flags + always on bits > > trap_ne -1c41 : d0fe > bne * ;failed not equal (non zero) +1cb4 : d0fe > bne * ;failed not equal (non zero) > -1c43 : 28 > plp ;restore status +1cb6 : 28 > plp ;restore status next_test -1c44 : ad0002 > lda test_case ;previous test -1c47 : c919 > cmp #test_num +1cb7 : ad0002 > lda test_case ;previous test +1cba : c919 > cmp #test_num > trap_ne ;test is out of sequence -1c49 : d0fe > bne * ;failed not equal (non zero) +1cbc : d0fe > bne * ;failed not equal (non zero) > 001a = >test_num = test_num + 1 -1c4b : a91a > lda #test_num ;*** next tests' number -1c4d : 8d0002 > sta test_case +1cbe : a91a > lda #test_num ;*** next tests' number +1cc0 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; CPX - zp / abs / # set_x $80,0 > load_flag 0 -1c50 : a900 > lda #0 ;allow test to change I-flag (no mask) +1cc3 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1c52 : 48 > pha ;use stack to load status -1c53 : a280 > ldx #$80 ;precharge index x -1c55 : 28 > plp +1cc5 : 48 > pha ;use stack to load status +1cc6 : a280 > ldx #$80 ;precharge index x +1cc8 : 28 > plp -1c56 : e417 cpx zp7f +1cc9 : e417 cpx zp7f tst_stat fc -1c58 : 08 > php ;save status -1c59 : 68 > pla ;use stack to retrieve status -1c5a : 48 > pha +1ccb : 08 > php ;save status +1ccc : 68 > pla ;use stack to retrieve status +1ccd : 48 > pha > cmp_flag fc -1c5b : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits +1cce : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits > > trap_ne -1c5d : d0fe > bne * ;failed not equal (non zero) +1cd0 : d0fe > bne * ;failed not equal (non zero) > -1c5f : 28 > plp ;restore status +1cd2 : 28 > plp ;restore status -1c60 : ca dex -1c61 : e417 cpx zp7f +1cd3 : ca dex +1cd4 : e417 cpx zp7f tst_stat fzc -1c63 : 08 > php ;save status -1c64 : 68 > pla ;use stack to retrieve status -1c65 : 48 > pha +1cd6 : 08 > php ;save status +1cd7 : 68 > pla ;use stack to retrieve status +1cd8 : 48 > pha > cmp_flag fzc -1c66 : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits +1cd9 : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -1c68 : d0fe > bne * ;failed not equal (non zero) +1cdb : d0fe > bne * ;failed not equal (non zero) > -1c6a : 28 > plp ;restore status +1cdd : 28 > plp ;restore status -1c6b : ca dex -1c6c : e417 cpx zp7f +1cde : ca dex +1cdf : e417 cpx zp7f tst_x $7e,fn -1c6e : 08 > php ;save flags -1c6f : e07e > cpx #$7e ;test result +1ce1 : 08 > php ;save flags +1ce2 : e07e > cpx #$7e ;test result > trap_ne -1c71 : d0fe > bne * ;failed not equal (non zero) +1ce4 : d0fe > bne * ;failed not equal (non zero) > -1c73 : 68 > pla ;load status -1c74 : 48 > pha +1ce6 : 68 > pla ;load status +1ce7 : 48 > pha > cmp_flag fn -1c75 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits +1ce8 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits > > trap_ne -1c77 : d0fe > bne * ;failed not equal (non zero) +1cea : d0fe > bne * ;failed not equal (non zero) > -1c79 : 28 > plp ;restore status +1cec : 28 > plp ;restore status set_x $80,$ff > load_flag $ff -1c7a : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1ced : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1c7c : 48 > pha ;use stack to load status -1c7d : a280 > ldx #$80 ;precharge index x -1c7f : 28 > plp +1cef : 48 > pha ;use stack to load status +1cf0 : a280 > ldx #$80 ;precharge index x +1cf2 : 28 > plp -1c80 : e417 cpx zp7f +1cf3 : e417 cpx zp7f tst_stat ~fnz -1c82 : 08 > php ;save status -1c83 : 68 > pla ;use stack to retrieve status -1c84 : 48 > pha +1cf5 : 08 > php ;save status +1cf6 : 68 > pla ;use stack to retrieve status +1cf7 : 48 > pha > cmp_flag ~fnz -1c85 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits +1cf8 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -1c87 : d0fe > bne * ;failed not equal (non zero) +1cfa : d0fe > bne * ;failed not equal (non zero) > -1c89 : 28 > plp ;restore status +1cfc : 28 > plp ;restore status -1c8a : ca dex -1c8b : e417 cpx zp7f +1cfd : ca dex +1cfe : e417 cpx zp7f tst_stat ~fn -1c8d : 08 > php ;save status -1c8e : 68 > pla ;use stack to retrieve status -1c8f : 48 > pha +1d00 : 08 > php ;save status +1d01 : 68 > pla ;use stack to retrieve status +1d02 : 48 > pha > cmp_flag ~fn -1c90 : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits +1d03 : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits > > trap_ne -1c92 : d0fe > bne * ;failed not equal (non zero) +1d05 : d0fe > bne * ;failed not equal (non zero) > -1c94 : 28 > plp ;restore status +1d07 : 28 > plp ;restore status -1c95 : ca dex -1c96 : e417 cpx zp7f +1d08 : ca dex +1d09 : e417 cpx zp7f tst_x $7e,~fzc -1c98 : 08 > php ;save flags -1c99 : e07e > cpx #$7e ;test result +1d0b : 08 > php ;save flags +1d0c : e07e > cpx #$7e ;test result > trap_ne -1c9b : d0fe > bne * ;failed not equal (non zero) +1d0e : d0fe > bne * ;failed not equal (non zero) > -1c9d : 68 > pla ;load status -1c9e : 48 > pha +1d10 : 68 > pla ;load status +1d11 : 48 > pha > cmp_flag ~fzc -1c9f : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits +1d12 : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -1ca1 : d0fe > bne * ;failed not equal (non zero) +1d14 : d0fe > bne * ;failed not equal (non zero) > -1ca3 : 28 > plp ;restore status +1d16 : 28 > plp ;restore status set_x $80,0 > load_flag 0 -1ca4 : a900 > lda #0 ;allow test to change I-flag (no mask) +1d17 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1ca6 : 48 > pha ;use stack to load status -1ca7 : a280 > ldx #$80 ;precharge index x -1ca9 : 28 > plp +1d19 : 48 > pha ;use stack to load status +1d1a : a280 > ldx #$80 ;precharge index x +1d1c : 28 > plp -1caa : ec0c02 cpx abs7f +1d1d : ec1b02 cpx abs7f tst_stat fc -1cad : 08 > php ;save status -1cae : 68 > pla ;use stack to retrieve status -1caf : 48 > pha - > cmp_flag fc -1cb0 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1cb2 : d0fe > bne * ;failed not equal (non zero) - > -1cb4 : 28 > plp ;restore status - -1cb5 : ca dex -1cb6 : ec0c02 cpx abs7f - tst_stat fzc -1cb9 : 08 > php ;save status -1cba : 68 > pla ;use stack to retrieve status -1cbb : 48 > pha - > cmp_flag fzc -1cbc : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1cbe : d0fe > bne * ;failed not equal (non zero) - > -1cc0 : 28 > plp ;restore status - -1cc1 : ca dex -1cc2 : ec0c02 cpx abs7f - tst_x $7e,fn -1cc5 : 08 > php ;save flags -1cc6 : e07e > cpx #$7e ;test result - > trap_ne -1cc8 : d0fe > bne * ;failed not equal (non zero) - > -1cca : 68 > pla ;load status -1ccb : 48 > pha - > cmp_flag fn -1ccc : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1cce : d0fe > bne * ;failed not equal (non zero) - > -1cd0 : 28 > plp ;restore status - - set_x $80,$ff - > load_flag $ff -1cd1 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -1cd3 : 48 > pha ;use stack to load status -1cd4 : a280 > ldx #$80 ;precharge index x -1cd6 : 28 > plp - -1cd7 : ec0c02 cpx abs7f - tst_stat ~fnz -1cda : 08 > php ;save status -1cdb : 68 > pla ;use stack to retrieve status -1cdc : 48 > pha - > cmp_flag ~fnz -1cdd : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1cdf : d0fe > bne * ;failed not equal (non zero) - > -1ce1 : 28 > plp ;restore status - -1ce2 : ca dex -1ce3 : ec0c02 cpx abs7f - tst_stat ~fn -1ce6 : 08 > php ;save status -1ce7 : 68 > pla ;use stack to retrieve status -1ce8 : 48 > pha - > cmp_flag ~fn -1ce9 : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1ceb : d0fe > bne * ;failed not equal (non zero) - > -1ced : 28 > plp ;restore status - -1cee : ca dex -1cef : ec0c02 cpx abs7f - tst_x $7e,~fzc -1cf2 : 08 > php ;save flags -1cf3 : e07e > cpx #$7e ;test result - > trap_ne -1cf5 : d0fe > bne * ;failed not equal (non zero) - > -1cf7 : 68 > pla ;load status -1cf8 : 48 > pha - > cmp_flag ~fzc -1cf9 : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1cfb : d0fe > bne * ;failed not equal (non zero) - > -1cfd : 28 > plp ;restore status - - - set_x $80,0 - > load_flag 0 -1cfe : a900 > lda #0 ;allow test to change I-flag (no mask) - > -1d00 : 48 > pha ;use stack to load status -1d01 : a280 > ldx #$80 ;precharge index x -1d03 : 28 > plp - -1d04 : e07f cpx #$7f - tst_stat fc -1d06 : 08 > php ;save status -1d07 : 68 > pla ;use stack to retrieve status -1d08 : 48 > pha - > cmp_flag fc -1d09 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1d0b : d0fe > bne * ;failed not equal (non zero) - > -1d0d : 28 > plp ;restore status - -1d0e : ca dex -1d0f : e07f cpx #$7f - tst_stat fzc -1d11 : 08 > php ;save status -1d12 : 68 > pla ;use stack to retrieve status -1d13 : 48 > pha - > cmp_flag fzc -1d14 : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1d16 : d0fe > bne * ;failed not equal (non zero) - > -1d18 : 28 > plp ;restore status - -1d19 : ca dex -1d1a : e07f cpx #$7f - tst_x $7e,fn -1d1c : 08 > php ;save flags -1d1d : e07e > cpx #$7e ;test result - > trap_ne -1d1f : d0fe > bne * ;failed not equal (non zero) - > -1d21 : 68 > pla ;load status +1d20 : 08 > php ;save status +1d21 : 68 > pla ;use stack to retrieve status 1d22 : 48 > pha - > cmp_flag fn -1d23 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits + > cmp_flag fc +1d23 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits > > trap_ne 1d25 : d0fe > bne * ;failed not equal (non zero) > 1d27 : 28 > plp ;restore status +1d28 : ca dex +1d29 : ec1b02 cpx abs7f + tst_stat fzc +1d2c : 08 > php ;save status +1d2d : 68 > pla ;use stack to retrieve status +1d2e : 48 > pha + > cmp_flag fzc +1d2f : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1d31 : d0fe > bne * ;failed not equal (non zero) + > +1d33 : 28 > plp ;restore status + +1d34 : ca dex +1d35 : ec1b02 cpx abs7f + tst_x $7e,fn +1d38 : 08 > php ;save flags +1d39 : e07e > cpx #$7e ;test result + > trap_ne +1d3b : d0fe > bne * ;failed not equal (non zero) + > +1d3d : 68 > pla ;load status +1d3e : 48 > pha + > cmp_flag fn +1d3f : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1d41 : d0fe > bne * ;failed not equal (non zero) + > +1d43 : 28 > plp ;restore status + set_x $80,$ff > load_flag $ff -1d28 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1d44 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1d2a : 48 > pha ;use stack to load status -1d2b : a280 > ldx #$80 ;precharge index x -1d2d : 28 > plp +1d46 : 48 > pha ;use stack to load status +1d47 : a280 > ldx #$80 ;precharge index x +1d49 : 28 > plp -1d2e : e07f cpx #$7f +1d4a : ec1b02 cpx abs7f tst_stat ~fnz -1d30 : 08 > php ;save status -1d31 : 68 > pla ;use stack to retrieve status -1d32 : 48 > pha +1d4d : 08 > php ;save status +1d4e : 68 > pla ;use stack to retrieve status +1d4f : 48 > pha > cmp_flag ~fnz -1d33 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits +1d50 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -1d35 : d0fe > bne * ;failed not equal (non zero) +1d52 : d0fe > bne * ;failed not equal (non zero) > -1d37 : 28 > plp ;restore status +1d54 : 28 > plp ;restore status -1d38 : ca dex -1d39 : e07f cpx #$7f +1d55 : ca dex +1d56 : ec1b02 cpx abs7f tst_stat ~fn -1d3b : 08 > php ;save status -1d3c : 68 > pla ;use stack to retrieve status -1d3d : 48 > pha +1d59 : 08 > php ;save status +1d5a : 68 > pla ;use stack to retrieve status +1d5b : 48 > pha > cmp_flag ~fn -1d3e : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits +1d5c : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits > > trap_ne -1d40 : d0fe > bne * ;failed not equal (non zero) +1d5e : d0fe > bne * ;failed not equal (non zero) > -1d42 : 28 > plp ;restore status +1d60 : 28 > plp ;restore status -1d43 : ca dex -1d44 : e07f cpx #$7f +1d61 : ca dex +1d62 : ec1b02 cpx abs7f tst_x $7e,~fzc -1d46 : 08 > php ;save flags -1d47 : e07e > cpx #$7e ;test result +1d65 : 08 > php ;save flags +1d66 : e07e > cpx #$7e ;test result > trap_ne -1d49 : d0fe > bne * ;failed not equal (non zero) +1d68 : d0fe > bne * ;failed not equal (non zero) > -1d4b : 68 > pla ;load status -1d4c : 48 > pha +1d6a : 68 > pla ;load status +1d6b : 48 > pha > cmp_flag ~fzc -1d4d : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits +1d6c : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -1d4f : d0fe > bne * ;failed not equal (non zero) +1d6e : d0fe > bne * ;failed not equal (non zero) > -1d51 : 28 > plp ;restore status +1d70 : 28 > plp ;restore status + + + set_x $80,0 + > load_flag 0 +1d71 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +1d73 : 48 > pha ;use stack to load status +1d74 : a280 > ldx #$80 ;precharge index x +1d76 : 28 > plp + +1d77 : e07f cpx #$7f + tst_stat fc +1d79 : 08 > php ;save status +1d7a : 68 > pla ;use stack to retrieve status +1d7b : 48 > pha + > cmp_flag fc +1d7c : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1d7e : d0fe > bne * ;failed not equal (non zero) + > +1d80 : 28 > plp ;restore status + +1d81 : ca dex +1d82 : e07f cpx #$7f + tst_stat fzc +1d84 : 08 > php ;save status +1d85 : 68 > pla ;use stack to retrieve status +1d86 : 48 > pha + > cmp_flag fzc +1d87 : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1d89 : d0fe > bne * ;failed not equal (non zero) + > +1d8b : 28 > plp ;restore status + +1d8c : ca dex +1d8d : e07f cpx #$7f + tst_x $7e,fn +1d8f : 08 > php ;save flags +1d90 : e07e > cpx #$7e ;test result + > trap_ne +1d92 : d0fe > bne * ;failed not equal (non zero) + > +1d94 : 68 > pla ;load status +1d95 : 48 > pha + > cmp_flag fn +1d96 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1d98 : d0fe > bne * ;failed not equal (non zero) + > +1d9a : 28 > plp ;restore status + + set_x $80,$ff + > load_flag $ff +1d9b : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +1d9d : 48 > pha ;use stack to load status +1d9e : a280 > ldx #$80 ;precharge index x +1da0 : 28 > plp + +1da1 : e07f cpx #$7f + tst_stat ~fnz +1da3 : 08 > php ;save status +1da4 : 68 > pla ;use stack to retrieve status +1da5 : 48 > pha + > cmp_flag ~fnz +1da6 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1da8 : d0fe > bne * ;failed not equal (non zero) + > +1daa : 28 > plp ;restore status + +1dab : ca dex +1dac : e07f cpx #$7f + tst_stat ~fn +1dae : 08 > php ;save status +1daf : 68 > pla ;use stack to retrieve status +1db0 : 48 > pha + > cmp_flag ~fn +1db1 : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1db3 : d0fe > bne * ;failed not equal (non zero) + > +1db5 : 28 > plp ;restore status + +1db6 : ca dex +1db7 : e07f cpx #$7f + tst_x $7e,~fzc +1db9 : 08 > php ;save flags +1dba : e07e > cpx #$7e ;test result + > trap_ne +1dbc : d0fe > bne * ;failed not equal (non zero) + > +1dbe : 68 > pla ;load status +1dbf : 48 > pha + > cmp_flag ~fzc +1dc0 : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1dc2 : d0fe > bne * ;failed not equal (non zero) + > +1dc4 : 28 > plp ;restore status next_test -1d52 : ad0002 > lda test_case ;previous test -1d55 : c91a > cmp #test_num +1dc5 : ad0002 > lda test_case ;previous test +1dc8 : c91a > cmp #test_num > trap_ne ;test is out of sequence -1d57 : d0fe > bne * ;failed not equal (non zero) +1dca : d0fe > bne * ;failed not equal (non zero) > 001b = >test_num = test_num + 1 -1d59 : a91b > lda #test_num ;*** next tests' number -1d5b : 8d0002 > sta test_case +1dcc : a91b > lda #test_num ;*** next tests' number +1dce : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; CPY - zp / abs / # set_y $80,0 > load_flag 0 -1d5e : a900 > lda #0 ;allow test to change I-flag (no mask) +1dd1 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1d60 : 48 > pha ;use stack to load status -1d61 : a080 > ldy #$80 ;precharge index y -1d63 : 28 > plp +1dd3 : 48 > pha ;use stack to load status +1dd4 : a080 > ldy #$80 ;precharge index y +1dd6 : 28 > plp -1d64 : c417 cpy zp7f +1dd7 : c417 cpy zp7f tst_stat fc -1d66 : 08 > php ;save status -1d67 : 68 > pla ;use stack to retrieve status -1d68 : 48 > pha +1dd9 : 08 > php ;save status +1dda : 68 > pla ;use stack to retrieve status +1ddb : 48 > pha > cmp_flag fc -1d69 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits +1ddc : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits > > trap_ne -1d6b : d0fe > bne * ;failed not equal (non zero) +1dde : d0fe > bne * ;failed not equal (non zero) > -1d6d : 28 > plp ;restore status +1de0 : 28 > plp ;restore status -1d6e : 88 dey -1d6f : c417 cpy zp7f +1de1 : 88 dey +1de2 : c417 cpy zp7f tst_stat fzc -1d71 : 08 > php ;save status -1d72 : 68 > pla ;use stack to retrieve status -1d73 : 48 > pha +1de4 : 08 > php ;save status +1de5 : 68 > pla ;use stack to retrieve status +1de6 : 48 > pha > cmp_flag fzc -1d74 : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits +1de7 : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -1d76 : d0fe > bne * ;failed not equal (non zero) +1de9 : d0fe > bne * ;failed not equal (non zero) > -1d78 : 28 > plp ;restore status +1deb : 28 > plp ;restore status -1d79 : 88 dey -1d7a : c417 cpy zp7f +1dec : 88 dey +1ded : c417 cpy zp7f tst_y $7e,fn -1d7c : 08 > php ;save flags -1d7d : c07e > cpy #$7e ;test result +1def : 08 > php ;save flags +1df0 : c07e > cpy #$7e ;test result > trap_ne -1d7f : d0fe > bne * ;failed not equal (non zero) +1df2 : d0fe > bne * ;failed not equal (non zero) > -1d81 : 68 > pla ;load status -1d82 : 48 > pha +1df4 : 68 > pla ;load status +1df5 : 48 > pha > cmp_flag fn -1d83 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits +1df6 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits > > trap_ne -1d85 : d0fe > bne * ;failed not equal (non zero) +1df8 : d0fe > bne * ;failed not equal (non zero) > -1d87 : 28 > plp ;restore status +1dfa : 28 > plp ;restore status set_y $80,$ff > load_flag $ff -1d88 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1dfb : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1d8a : 48 > pha ;use stack to load status -1d8b : a080 > ldy #$80 ;precharge index y -1d8d : 28 > plp +1dfd : 48 > pha ;use stack to load status +1dfe : a080 > ldy #$80 ;precharge index y +1e00 : 28 > plp -1d8e : c417 cpy zp7f +1e01 : c417 cpy zp7f tst_stat ~fnz -1d90 : 08 > php ;save status -1d91 : 68 > pla ;use stack to retrieve status -1d92 : 48 > pha +1e03 : 08 > php ;save status +1e04 : 68 > pla ;use stack to retrieve status +1e05 : 48 > pha > cmp_flag ~fnz -1d93 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits +1e06 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -1d95 : d0fe > bne * ;failed not equal (non zero) +1e08 : d0fe > bne * ;failed not equal (non zero) > -1d97 : 28 > plp ;restore status +1e0a : 28 > plp ;restore status -1d98 : 88 dey -1d99 : c417 cpy zp7f +1e0b : 88 dey +1e0c : c417 cpy zp7f tst_stat ~fn -1d9b : 08 > php ;save status -1d9c : 68 > pla ;use stack to retrieve status -1d9d : 48 > pha +1e0e : 08 > php ;save status +1e0f : 68 > pla ;use stack to retrieve status +1e10 : 48 > pha > cmp_flag ~fn -1d9e : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits +1e11 : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits > > trap_ne -1da0 : d0fe > bne * ;failed not equal (non zero) +1e13 : d0fe > bne * ;failed not equal (non zero) > -1da2 : 28 > plp ;restore status +1e15 : 28 > plp ;restore status -1da3 : 88 dey -1da4 : c417 cpy zp7f +1e16 : 88 dey +1e17 : c417 cpy zp7f tst_y $7e,~fzc -1da6 : 08 > php ;save flags -1da7 : c07e > cpy #$7e ;test result +1e19 : 08 > php ;save flags +1e1a : c07e > cpy #$7e ;test result > trap_ne -1da9 : d0fe > bne * ;failed not equal (non zero) +1e1c : d0fe > bne * ;failed not equal (non zero) > -1dab : 68 > pla ;load status -1dac : 48 > pha +1e1e : 68 > pla ;load status +1e1f : 48 > pha > cmp_flag ~fzc -1dad : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits +1e20 : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -1daf : d0fe > bne * ;failed not equal (non zero) +1e22 : d0fe > bne * ;failed not equal (non zero) > -1db1 : 28 > plp ;restore status +1e24 : 28 > plp ;restore status set_y $80,0 > load_flag 0 -1db2 : a900 > lda #0 ;allow test to change I-flag (no mask) +1e25 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1db4 : 48 > pha ;use stack to load status -1db5 : a080 > ldy #$80 ;precharge index y -1db7 : 28 > plp +1e27 : 48 > pha ;use stack to load status +1e28 : a080 > ldy #$80 ;precharge index y +1e2a : 28 > plp -1db8 : cc0c02 cpy abs7f +1e2b : cc1b02 cpy abs7f tst_stat fc -1dbb : 08 > php ;save status -1dbc : 68 > pla ;use stack to retrieve status -1dbd : 48 > pha - > cmp_flag fc -1dbe : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1dc0 : d0fe > bne * ;failed not equal (non zero) - > -1dc2 : 28 > plp ;restore status - -1dc3 : 88 dey -1dc4 : cc0c02 cpy abs7f - tst_stat fzc -1dc7 : 08 > php ;save status -1dc8 : 68 > pla ;use stack to retrieve status -1dc9 : 48 > pha - > cmp_flag fzc -1dca : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1dcc : d0fe > bne * ;failed not equal (non zero) - > -1dce : 28 > plp ;restore status - -1dcf : 88 dey -1dd0 : cc0c02 cpy abs7f - tst_y $7e,fn -1dd3 : 08 > php ;save flags -1dd4 : c07e > cpy #$7e ;test result - > trap_ne -1dd6 : d0fe > bne * ;failed not equal (non zero) - > -1dd8 : 68 > pla ;load status -1dd9 : 48 > pha - > cmp_flag fn -1dda : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1ddc : d0fe > bne * ;failed not equal (non zero) - > -1dde : 28 > plp ;restore status - - set_y $80,$ff - > load_flag $ff -1ddf : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -1de1 : 48 > pha ;use stack to load status -1de2 : a080 > ldy #$80 ;precharge index y -1de4 : 28 > plp - -1de5 : cc0c02 cpy abs7f - tst_stat ~fnz -1de8 : 08 > php ;save status -1de9 : 68 > pla ;use stack to retrieve status -1dea : 48 > pha - > cmp_flag ~fnz -1deb : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1ded : d0fe > bne * ;failed not equal (non zero) - > -1def : 28 > plp ;restore status - -1df0 : 88 dey -1df1 : cc0c02 cpy abs7f - tst_stat ~fn -1df4 : 08 > php ;save status -1df5 : 68 > pla ;use stack to retrieve status -1df6 : 48 > pha - > cmp_flag ~fn -1df7 : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1df9 : d0fe > bne * ;failed not equal (non zero) - > -1dfb : 28 > plp ;restore status - -1dfc : 88 dey -1dfd : cc0c02 cpy abs7f - tst_y $7e,~fzc -1e00 : 08 > php ;save flags -1e01 : c07e > cpy #$7e ;test result - > trap_ne -1e03 : d0fe > bne * ;failed not equal (non zero) - > -1e05 : 68 > pla ;load status -1e06 : 48 > pha - > cmp_flag ~fzc -1e07 : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1e09 : d0fe > bne * ;failed not equal (non zero) - > -1e0b : 28 > plp ;restore status - - - set_y $80,0 - > load_flag 0 -1e0c : a900 > lda #0 ;allow test to change I-flag (no mask) - > -1e0e : 48 > pha ;use stack to load status -1e0f : a080 > ldy #$80 ;precharge index y -1e11 : 28 > plp - -1e12 : c07f cpy #$7f - tst_stat fc -1e14 : 08 > php ;save status -1e15 : 68 > pla ;use stack to retrieve status -1e16 : 48 > pha - > cmp_flag fc -1e17 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1e19 : d0fe > bne * ;failed not equal (non zero) - > -1e1b : 28 > plp ;restore status - -1e1c : 88 dey -1e1d : c07f cpy #$7f - tst_stat fzc -1e1f : 08 > php ;save status -1e20 : 68 > pla ;use stack to retrieve status -1e21 : 48 > pha - > cmp_flag fzc -1e22 : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1e24 : d0fe > bne * ;failed not equal (non zero) - > -1e26 : 28 > plp ;restore status - -1e27 : 88 dey -1e28 : c07f cpy #$7f - tst_y $7e,fn -1e2a : 08 > php ;save flags -1e2b : c07e > cpy #$7e ;test result - > trap_ne -1e2d : d0fe > bne * ;failed not equal (non zero) - > -1e2f : 68 > pla ;load status +1e2e : 08 > php ;save status +1e2f : 68 > pla ;use stack to retrieve status 1e30 : 48 > pha - > cmp_flag fn -1e31 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits + > cmp_flag fc +1e31 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits > > trap_ne 1e33 : d0fe > bne * ;failed not equal (non zero) > 1e35 : 28 > plp ;restore status +1e36 : 88 dey +1e37 : cc1b02 cpy abs7f + tst_stat fzc +1e3a : 08 > php ;save status +1e3b : 68 > pla ;use stack to retrieve status +1e3c : 48 > pha + > cmp_flag fzc +1e3d : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1e3f : d0fe > bne * ;failed not equal (non zero) + > +1e41 : 28 > plp ;restore status + +1e42 : 88 dey +1e43 : cc1b02 cpy abs7f + tst_y $7e,fn +1e46 : 08 > php ;save flags +1e47 : c07e > cpy #$7e ;test result + > trap_ne +1e49 : d0fe > bne * ;failed not equal (non zero) + > +1e4b : 68 > pla ;load status +1e4c : 48 > pha + > cmp_flag fn +1e4d : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1e4f : d0fe > bne * ;failed not equal (non zero) + > +1e51 : 28 > plp ;restore status + set_y $80,$ff > load_flag $ff -1e36 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1e52 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1e38 : 48 > pha ;use stack to load status -1e39 : a080 > ldy #$80 ;precharge index y -1e3b : 28 > plp +1e54 : 48 > pha ;use stack to load status +1e55 : a080 > ldy #$80 ;precharge index y +1e57 : 28 > plp -1e3c : c07f cpy #$7f +1e58 : cc1b02 cpy abs7f tst_stat ~fnz -1e3e : 08 > php ;save status -1e3f : 68 > pla ;use stack to retrieve status -1e40 : 48 > pha +1e5b : 08 > php ;save status +1e5c : 68 > pla ;use stack to retrieve status +1e5d : 48 > pha > cmp_flag ~fnz -1e41 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits +1e5e : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -1e43 : d0fe > bne * ;failed not equal (non zero) +1e60 : d0fe > bne * ;failed not equal (non zero) > -1e45 : 28 > plp ;restore status +1e62 : 28 > plp ;restore status -1e46 : 88 dey -1e47 : c07f cpy #$7f +1e63 : 88 dey +1e64 : cc1b02 cpy abs7f tst_stat ~fn -1e49 : 08 > php ;save status -1e4a : 68 > pla ;use stack to retrieve status -1e4b : 48 > pha +1e67 : 08 > php ;save status +1e68 : 68 > pla ;use stack to retrieve status +1e69 : 48 > pha > cmp_flag ~fn -1e4c : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits +1e6a : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits > > trap_ne -1e4e : d0fe > bne * ;failed not equal (non zero) +1e6c : d0fe > bne * ;failed not equal (non zero) > -1e50 : 28 > plp ;restore status +1e6e : 28 > plp ;restore status -1e51 : 88 dey -1e52 : c07f cpy #$7f +1e6f : 88 dey +1e70 : cc1b02 cpy abs7f tst_y $7e,~fzc -1e54 : 08 > php ;save flags -1e55 : c07e > cpy #$7e ;test result +1e73 : 08 > php ;save flags +1e74 : c07e > cpy #$7e ;test result > trap_ne -1e57 : d0fe > bne * ;failed not equal (non zero) +1e76 : d0fe > bne * ;failed not equal (non zero) > -1e59 : 68 > pla ;load status -1e5a : 48 > pha +1e78 : 68 > pla ;load status +1e79 : 48 > pha > cmp_flag ~fzc -1e5b : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits +1e7a : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -1e5d : d0fe > bne * ;failed not equal (non zero) +1e7c : d0fe > bne * ;failed not equal (non zero) > -1e5f : 28 > plp ;restore status +1e7e : 28 > plp ;restore status + + + set_y $80,0 + > load_flag 0 +1e7f : a900 > lda #0 ;allow test to change I-flag (no mask) + > +1e81 : 48 > pha ;use stack to load status +1e82 : a080 > ldy #$80 ;precharge index y +1e84 : 28 > plp + +1e85 : c07f cpy #$7f + tst_stat fc +1e87 : 08 > php ;save status +1e88 : 68 > pla ;use stack to retrieve status +1e89 : 48 > pha + > cmp_flag fc +1e8a : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1e8c : d0fe > bne * ;failed not equal (non zero) + > +1e8e : 28 > plp ;restore status + +1e8f : 88 dey +1e90 : c07f cpy #$7f + tst_stat fzc +1e92 : 08 > php ;save status +1e93 : 68 > pla ;use stack to retrieve status +1e94 : 48 > pha + > cmp_flag fzc +1e95 : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1e97 : d0fe > bne * ;failed not equal (non zero) + > +1e99 : 28 > plp ;restore status + +1e9a : 88 dey +1e9b : c07f cpy #$7f + tst_y $7e,fn +1e9d : 08 > php ;save flags +1e9e : c07e > cpy #$7e ;test result + > trap_ne +1ea0 : d0fe > bne * ;failed not equal (non zero) + > +1ea2 : 68 > pla ;load status +1ea3 : 48 > pha + > cmp_flag fn +1ea4 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1ea6 : d0fe > bne * ;failed not equal (non zero) + > +1ea8 : 28 > plp ;restore status + + set_y $80,$ff + > load_flag $ff +1ea9 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +1eab : 48 > pha ;use stack to load status +1eac : a080 > ldy #$80 ;precharge index y +1eae : 28 > plp + +1eaf : c07f cpy #$7f + tst_stat ~fnz +1eb1 : 08 > php ;save status +1eb2 : 68 > pla ;use stack to retrieve status +1eb3 : 48 > pha + > cmp_flag ~fnz +1eb4 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1eb6 : d0fe > bne * ;failed not equal (non zero) + > +1eb8 : 28 > plp ;restore status + +1eb9 : 88 dey +1eba : c07f cpy #$7f + tst_stat ~fn +1ebc : 08 > php ;save status +1ebd : 68 > pla ;use stack to retrieve status +1ebe : 48 > pha + > cmp_flag ~fn +1ebf : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1ec1 : d0fe > bne * ;failed not equal (non zero) + > +1ec3 : 28 > plp ;restore status + +1ec4 : 88 dey +1ec5 : c07f cpy #$7f + tst_y $7e,~fzc +1ec7 : 08 > php ;save flags +1ec8 : c07e > cpy #$7e ;test result + > trap_ne +1eca : d0fe > bne * ;failed not equal (non zero) + > +1ecc : 68 > pla ;load status +1ecd : 48 > pha + > cmp_flag ~fzc +1ece : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1ed0 : d0fe > bne * ;failed not equal (non zero) + > +1ed2 : 28 > plp ;restore status next_test -1e60 : ad0002 > lda test_case ;previous test -1e63 : c91b > cmp #test_num +1ed3 : ad0002 > lda test_case ;previous test +1ed6 : c91b > cmp #test_num > trap_ne ;test is out of sequence -1e65 : d0fe > bne * ;failed not equal (non zero) +1ed8 : d0fe > bne * ;failed not equal (non zero) > 001c = >test_num = test_num + 1 -1e67 : a91c > lda #test_num ;*** next tests' number -1e69 : 8d0002 > sta test_case +1eda : a91c > lda #test_num ;*** next tests' number +1edc : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; CMP - zp / abs / # set_a $80,0 > load_flag 0 -1e6c : a900 > lda #0 ;allow test to change I-flag (no mask) +1edf : a900 > lda #0 ;allow test to change I-flag (no mask) > -1e6e : 48 > pha ;use stack to load status -1e6f : a980 > lda #$80 ;precharge accu -1e71 : 28 > plp +1ee1 : 48 > pha ;use stack to load status +1ee2 : a980 > lda #$80 ;precharge accu +1ee4 : 28 > plp -1e72 : c517 cmp zp7f +1ee5 : c517 cmp zp7f tst_a $80,fc -1e74 : 08 > php ;save flags -1e75 : c980 > cmp #$80 ;test result +1ee7 : 08 > php ;save flags +1ee8 : c980 > cmp #$80 ;test result > trap_ne -1e77 : d0fe > bne * ;failed not equal (non zero) +1eea : d0fe > bne * ;failed not equal (non zero) > -1e79 : 68 > pla ;load status -1e7a : 48 > pha +1eec : 68 > pla ;load status +1eed : 48 > pha > cmp_flag fc -1e7b : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits +1eee : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits > > trap_ne -1e7d : d0fe > bne * ;failed not equal (non zero) - > -1e7f : 28 > plp ;restore status - - set_a $7f,0 - > load_flag 0 -1e80 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -1e82 : 48 > pha ;use stack to load status -1e83 : a97f > lda #$7f ;precharge accu -1e85 : 28 > plp - -1e86 : c517 cmp zp7f - tst_a $7f,fzc -1e88 : 08 > php ;save flags -1e89 : c97f > cmp #$7f ;test result - > trap_ne -1e8b : d0fe > bne * ;failed not equal (non zero) - > -1e8d : 68 > pla ;load status -1e8e : 48 > pha - > cmp_flag fzc -1e8f : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1e91 : d0fe > bne * ;failed not equal (non zero) - > -1e93 : 28 > plp ;restore status - - set_a $7e,0 - > load_flag 0 -1e94 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -1e96 : 48 > pha ;use stack to load status -1e97 : a97e > lda #$7e ;precharge accu -1e99 : 28 > plp - -1e9a : c517 cmp zp7f - tst_a $7e,fn -1e9c : 08 > php ;save flags -1e9d : c97e > cmp #$7e ;test result - > trap_ne -1e9f : d0fe > bne * ;failed not equal (non zero) - > -1ea1 : 68 > pla ;load status -1ea2 : 48 > pha - > cmp_flag fn -1ea3 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1ea5 : d0fe > bne * ;failed not equal (non zero) - > -1ea7 : 28 > plp ;restore status - - set_a $80,$ff - > load_flag $ff -1ea8 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -1eaa : 48 > pha ;use stack to load status -1eab : a980 > lda #$80 ;precharge accu -1ead : 28 > plp - -1eae : c517 cmp zp7f - tst_a $80,~fnz -1eb0 : 08 > php ;save flags -1eb1 : c980 > cmp #$80 ;test result - > trap_ne -1eb3 : d0fe > bne * ;failed not equal (non zero) - > -1eb5 : 68 > pla ;load status -1eb6 : 48 > pha - > cmp_flag ~fnz -1eb7 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1eb9 : d0fe > bne * ;failed not equal (non zero) - > -1ebb : 28 > plp ;restore status - - set_a $7f,$ff - > load_flag $ff -1ebc : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -1ebe : 48 > pha ;use stack to load status -1ebf : a97f > lda #$7f ;precharge accu -1ec1 : 28 > plp - -1ec2 : c517 cmp zp7f - tst_a $7f,~fn -1ec4 : 08 > php ;save flags -1ec5 : c97f > cmp #$7f ;test result - > trap_ne -1ec7 : d0fe > bne * ;failed not equal (non zero) - > -1ec9 : 68 > pla ;load status -1eca : 48 > pha - > cmp_flag ~fn -1ecb : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1ecd : d0fe > bne * ;failed not equal (non zero) - > -1ecf : 28 > plp ;restore status - - set_a $7e,$ff - > load_flag $ff -1ed0 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -1ed2 : 48 > pha ;use stack to load status -1ed3 : a97e > lda #$7e ;precharge accu -1ed5 : 28 > plp - -1ed6 : c517 cmp zp7f - tst_a $7e,~fzc -1ed8 : 08 > php ;save flags -1ed9 : c97e > cmp #$7e ;test result - > trap_ne -1edb : d0fe > bne * ;failed not equal (non zero) - > -1edd : 68 > pla ;load status -1ede : 48 > pha - > cmp_flag ~fzc -1edf : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1ee1 : d0fe > bne * ;failed not equal (non zero) - > -1ee3 : 28 > plp ;restore status - - - set_a $80,0 - > load_flag 0 -1ee4 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -1ee6 : 48 > pha ;use stack to load status -1ee7 : a980 > lda #$80 ;precharge accu -1ee9 : 28 > plp - -1eea : cd0c02 cmp abs7f - tst_a $80,fc -1eed : 08 > php ;save flags -1eee : c980 > cmp #$80 ;test result - > trap_ne 1ef0 : d0fe > bne * ;failed not equal (non zero) > -1ef2 : 68 > pla ;load status -1ef3 : 48 > pha - > cmp_flag fc -1ef4 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1ef6 : d0fe > bne * ;failed not equal (non zero) - > -1ef8 : 28 > plp ;restore status +1ef2 : 28 > plp ;restore status set_a $7f,0 > load_flag 0 -1ef9 : a900 > lda #0 ;allow test to change I-flag (no mask) +1ef3 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1efb : 48 > pha ;use stack to load status -1efc : a97f > lda #$7f ;precharge accu -1efe : 28 > plp +1ef5 : 48 > pha ;use stack to load status +1ef6 : a97f > lda #$7f ;precharge accu +1ef8 : 28 > plp -1eff : cd0c02 cmp abs7f +1ef9 : c517 cmp zp7f tst_a $7f,fzc -1f02 : 08 > php ;save flags -1f03 : c97f > cmp #$7f ;test result +1efb : 08 > php ;save flags +1efc : c97f > cmp #$7f ;test result > trap_ne -1f05 : d0fe > bne * ;failed not equal (non zero) +1efe : d0fe > bne * ;failed not equal (non zero) > -1f07 : 68 > pla ;load status -1f08 : 48 > pha +1f00 : 68 > pla ;load status +1f01 : 48 > pha > cmp_flag fzc -1f09 : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits +1f02 : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -1f0b : d0fe > bne * ;failed not equal (non zero) +1f04 : d0fe > bne * ;failed not equal (non zero) > -1f0d : 28 > plp ;restore status +1f06 : 28 > plp ;restore status set_a $7e,0 > load_flag 0 -1f0e : a900 > lda #0 ;allow test to change I-flag (no mask) +1f07 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1f10 : 48 > pha ;use stack to load status -1f11 : a97e > lda #$7e ;precharge accu -1f13 : 28 > plp +1f09 : 48 > pha ;use stack to load status +1f0a : a97e > lda #$7e ;precharge accu +1f0c : 28 > plp -1f14 : cd0c02 cmp abs7f +1f0d : c517 cmp zp7f tst_a $7e,fn -1f17 : 08 > php ;save flags -1f18 : c97e > cmp #$7e ;test result +1f0f : 08 > php ;save flags +1f10 : c97e > cmp #$7e ;test result > trap_ne -1f1a : d0fe > bne * ;failed not equal (non zero) +1f12 : d0fe > bne * ;failed not equal (non zero) > -1f1c : 68 > pla ;load status -1f1d : 48 > pha +1f14 : 68 > pla ;load status +1f15 : 48 > pha > cmp_flag fn -1f1e : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits +1f16 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits > > trap_ne -1f20 : d0fe > bne * ;failed not equal (non zero) +1f18 : d0fe > bne * ;failed not equal (non zero) > -1f22 : 28 > plp ;restore status +1f1a : 28 > plp ;restore status set_a $80,$ff > load_flag $ff -1f23 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1f1b : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1f25 : 48 > pha ;use stack to load status -1f26 : a980 > lda #$80 ;precharge accu -1f28 : 28 > plp +1f1d : 48 > pha ;use stack to load status +1f1e : a980 > lda #$80 ;precharge accu +1f20 : 28 > plp -1f29 : cd0c02 cmp abs7f +1f21 : c517 cmp zp7f tst_a $80,~fnz -1f2c : 08 > php ;save flags -1f2d : c980 > cmp #$80 ;test result +1f23 : 08 > php ;save flags +1f24 : c980 > cmp #$80 ;test result > trap_ne -1f2f : d0fe > bne * ;failed not equal (non zero) +1f26 : d0fe > bne * ;failed not equal (non zero) > -1f31 : 68 > pla ;load status -1f32 : 48 > pha +1f28 : 68 > pla ;load status +1f29 : 48 > pha > cmp_flag ~fnz -1f33 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits +1f2a : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -1f35 : d0fe > bne * ;failed not equal (non zero) +1f2c : d0fe > bne * ;failed not equal (non zero) > -1f37 : 28 > plp ;restore status +1f2e : 28 > plp ;restore status set_a $7f,$ff > load_flag $ff -1f38 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1f2f : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1f3a : 48 > pha ;use stack to load status -1f3b : a97f > lda #$7f ;precharge accu -1f3d : 28 > plp +1f31 : 48 > pha ;use stack to load status +1f32 : a97f > lda #$7f ;precharge accu +1f34 : 28 > plp -1f3e : cd0c02 cmp abs7f +1f35 : c517 cmp zp7f tst_a $7f,~fn -1f41 : 08 > php ;save flags -1f42 : c97f > cmp #$7f ;test result +1f37 : 08 > php ;save flags +1f38 : c97f > cmp #$7f ;test result > trap_ne -1f44 : d0fe > bne * ;failed not equal (non zero) +1f3a : d0fe > bne * ;failed not equal (non zero) > -1f46 : 68 > pla ;load status -1f47 : 48 > pha +1f3c : 68 > pla ;load status +1f3d : 48 > pha > cmp_flag ~fn -1f48 : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits +1f3e : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits > > trap_ne -1f4a : d0fe > bne * ;failed not equal (non zero) +1f40 : d0fe > bne * ;failed not equal (non zero) > -1f4c : 28 > plp ;restore status +1f42 : 28 > plp ;restore status set_a $7e,$ff > load_flag $ff -1f4d : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1f43 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1f4f : 48 > pha ;use stack to load status -1f50 : a97e > lda #$7e ;precharge accu -1f52 : 28 > plp +1f45 : 48 > pha ;use stack to load status +1f46 : a97e > lda #$7e ;precharge accu +1f48 : 28 > plp -1f53 : cd0c02 cmp abs7f +1f49 : c517 cmp zp7f tst_a $7e,~fzc -1f56 : 08 > php ;save flags -1f57 : c97e > cmp #$7e ;test result +1f4b : 08 > php ;save flags +1f4c : c97e > cmp #$7e ;test result > trap_ne -1f59 : d0fe > bne * ;failed not equal (non zero) +1f4e : d0fe > bne * ;failed not equal (non zero) > -1f5b : 68 > pla ;load status -1f5c : 48 > pha +1f50 : 68 > pla ;load status +1f51 : 48 > pha > cmp_flag ~fzc -1f5d : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits +1f52 : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -1f5f : d0fe > bne * ;failed not equal (non zero) +1f54 : d0fe > bne * ;failed not equal (non zero) > -1f61 : 28 > plp ;restore status +1f56 : 28 > plp ;restore status set_a $80,0 > load_flag 0 -1f62 : a900 > lda #0 ;allow test to change I-flag (no mask) +1f57 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1f64 : 48 > pha ;use stack to load status -1f65 : a980 > lda #$80 ;precharge accu -1f67 : 28 > plp +1f59 : 48 > pha ;use stack to load status +1f5a : a980 > lda #$80 ;precharge accu +1f5c : 28 > plp -1f68 : c97f cmp #$7f +1f5d : cd1b02 cmp abs7f tst_a $80,fc -1f6a : 08 > php ;save flags -1f6b : c980 > cmp #$80 ;test result +1f60 : 08 > php ;save flags +1f61 : c980 > cmp #$80 ;test result > trap_ne -1f6d : d0fe > bne * ;failed not equal (non zero) +1f63 : d0fe > bne * ;failed not equal (non zero) > -1f6f : 68 > pla ;load status -1f70 : 48 > pha +1f65 : 68 > pla ;load status +1f66 : 48 > pha > cmp_flag fc -1f71 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits +1f67 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits > > trap_ne -1f73 : d0fe > bne * ;failed not equal (non zero) +1f69 : d0fe > bne * ;failed not equal (non zero) > -1f75 : 28 > plp ;restore status +1f6b : 28 > plp ;restore status set_a $7f,0 > load_flag 0 -1f76 : a900 > lda #0 ;allow test to change I-flag (no mask) +1f6c : a900 > lda #0 ;allow test to change I-flag (no mask) > -1f78 : 48 > pha ;use stack to load status -1f79 : a97f > lda #$7f ;precharge accu -1f7b : 28 > plp +1f6e : 48 > pha ;use stack to load status +1f6f : a97f > lda #$7f ;precharge accu +1f71 : 28 > plp -1f7c : c97f cmp #$7f +1f72 : cd1b02 cmp abs7f tst_a $7f,fzc -1f7e : 08 > php ;save flags -1f7f : c97f > cmp #$7f ;test result +1f75 : 08 > php ;save flags +1f76 : c97f > cmp #$7f ;test result > trap_ne -1f81 : d0fe > bne * ;failed not equal (non zero) +1f78 : d0fe > bne * ;failed not equal (non zero) > -1f83 : 68 > pla ;load status -1f84 : 48 > pha +1f7a : 68 > pla ;load status +1f7b : 48 > pha > cmp_flag fzc -1f85 : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits +1f7c : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -1f87 : d0fe > bne * ;failed not equal (non zero) +1f7e : d0fe > bne * ;failed not equal (non zero) > -1f89 : 28 > plp ;restore status +1f80 : 28 > plp ;restore status set_a $7e,0 > load_flag 0 -1f8a : a900 > lda #0 ;allow test to change I-flag (no mask) +1f81 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1f8c : 48 > pha ;use stack to load status -1f8d : a97e > lda #$7e ;precharge accu -1f8f : 28 > plp +1f83 : 48 > pha ;use stack to load status +1f84 : a97e > lda #$7e ;precharge accu +1f86 : 28 > plp -1f90 : c97f cmp #$7f +1f87 : cd1b02 cmp abs7f tst_a $7e,fn -1f92 : 08 > php ;save flags -1f93 : c97e > cmp #$7e ;test result +1f8a : 08 > php ;save flags +1f8b : c97e > cmp #$7e ;test result > trap_ne -1f95 : d0fe > bne * ;failed not equal (non zero) +1f8d : d0fe > bne * ;failed not equal (non zero) > -1f97 : 68 > pla ;load status -1f98 : 48 > pha +1f8f : 68 > pla ;load status +1f90 : 48 > pha > cmp_flag fn -1f99 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits +1f91 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits > > trap_ne -1f9b : d0fe > bne * ;failed not equal (non zero) +1f93 : d0fe > bne * ;failed not equal (non zero) > -1f9d : 28 > plp ;restore status +1f95 : 28 > plp ;restore status set_a $80,$ff > load_flag $ff -1f9e : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1f96 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1fa0 : 48 > pha ;use stack to load status -1fa1 : a980 > lda #$80 ;precharge accu -1fa3 : 28 > plp +1f98 : 48 > pha ;use stack to load status +1f99 : a980 > lda #$80 ;precharge accu +1f9b : 28 > plp -1fa4 : c97f cmp #$7f +1f9c : cd1b02 cmp abs7f tst_a $80,~fnz -1fa6 : 08 > php ;save flags -1fa7 : c980 > cmp #$80 ;test result +1f9f : 08 > php ;save flags +1fa0 : c980 > cmp #$80 ;test result > trap_ne -1fa9 : d0fe > bne * ;failed not equal (non zero) +1fa2 : d0fe > bne * ;failed not equal (non zero) > -1fab : 68 > pla ;load status -1fac : 48 > pha +1fa4 : 68 > pla ;load status +1fa5 : 48 > pha > cmp_flag ~fnz -1fad : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits +1fa6 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -1faf : d0fe > bne * ;failed not equal (non zero) +1fa8 : d0fe > bne * ;failed not equal (non zero) > -1fb1 : 28 > plp ;restore status +1faa : 28 > plp ;restore status set_a $7f,$ff > load_flag $ff -1fb2 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1fab : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1fb4 : 48 > pha ;use stack to load status -1fb5 : a97f > lda #$7f ;precharge accu -1fb7 : 28 > plp +1fad : 48 > pha ;use stack to load status +1fae : a97f > lda #$7f ;precharge accu +1fb0 : 28 > plp -1fb8 : c97f cmp #$7f +1fb1 : cd1b02 cmp abs7f tst_a $7f,~fn -1fba : 08 > php ;save flags -1fbb : c97f > cmp #$7f ;test result +1fb4 : 08 > php ;save flags +1fb5 : c97f > cmp #$7f ;test result + > trap_ne +1fb7 : d0fe > bne * ;failed not equal (non zero) + > +1fb9 : 68 > pla ;load status +1fba : 48 > pha + > cmp_flag ~fn +1fbb : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits + > > trap_ne 1fbd : d0fe > bne * ;failed not equal (non zero) > -1fbf : 68 > pla ;load status -1fc0 : 48 > pha - > cmp_flag ~fn -1fc1 : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1fc3 : d0fe > bne * ;failed not equal (non zero) - > -1fc5 : 28 > plp ;restore status +1fbf : 28 > plp ;restore status set_a $7e,$ff > load_flag $ff -1fc6 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1fc0 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1fc8 : 48 > pha ;use stack to load status -1fc9 : a97e > lda #$7e ;precharge accu -1fcb : 28 > plp +1fc2 : 48 > pha ;use stack to load status +1fc3 : a97e > lda #$7e ;precharge accu +1fc5 : 28 > plp -1fcc : c97f cmp #$7f +1fc6 : cd1b02 cmp abs7f tst_a $7e,~fzc -1fce : 08 > php ;save flags -1fcf : c97e > cmp #$7e ;test result +1fc9 : 08 > php ;save flags +1fca : c97e > cmp #$7e ;test result > trap_ne -1fd1 : d0fe > bne * ;failed not equal (non zero) +1fcc : d0fe > bne * ;failed not equal (non zero) > -1fd3 : 68 > pla ;load status -1fd4 : 48 > pha +1fce : 68 > pla ;load status +1fcf : 48 > pha > cmp_flag ~fzc -1fd5 : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits +1fd0 : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -1fd7 : d0fe > bne * ;failed not equal (non zero) +1fd2 : d0fe > bne * ;failed not equal (non zero) > -1fd9 : 28 > plp ;restore status +1fd4 : 28 > plp ;restore status -1fda : a204 ldx #4 ;with indexing by X set_a $80,0 > load_flag 0 -1fdc : a900 > lda #0 ;allow test to change I-flag (no mask) +1fd5 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1fde : 48 > pha ;use stack to load status -1fdf : a980 > lda #$80 ;precharge accu -1fe1 : 28 > plp +1fd7 : 48 > pha ;use stack to load status +1fd8 : a980 > lda #$80 ;precharge accu +1fda : 28 > plp -1fe2 : d513 cmp zp1,x +1fdb : c97f cmp #$7f tst_a $80,fc -1fe4 : 08 > php ;save flags -1fe5 : c980 > cmp #$80 ;test result +1fdd : 08 > php ;save flags +1fde : c980 > cmp #$80 ;test result > trap_ne -1fe7 : d0fe > bne * ;failed not equal (non zero) +1fe0 : d0fe > bne * ;failed not equal (non zero) > -1fe9 : 68 > pla ;load status -1fea : 48 > pha +1fe2 : 68 > pla ;load status +1fe3 : 48 > pha > cmp_flag fc -1feb : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits +1fe4 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits > > trap_ne -1fed : d0fe > bne * ;failed not equal (non zero) +1fe6 : d0fe > bne * ;failed not equal (non zero) > -1fef : 28 > plp ;restore status +1fe8 : 28 > plp ;restore status set_a $7f,0 > load_flag 0 -1ff0 : a900 > lda #0 ;allow test to change I-flag (no mask) +1fe9 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1ff2 : 48 > pha ;use stack to load status -1ff3 : a97f > lda #$7f ;precharge accu -1ff5 : 28 > plp +1feb : 48 > pha ;use stack to load status +1fec : a97f > lda #$7f ;precharge accu +1fee : 28 > plp -1ff6 : d513 cmp zp1,x +1fef : c97f cmp #$7f tst_a $7f,fzc -1ff8 : 08 > php ;save flags -1ff9 : c97f > cmp #$7f ;test result +1ff1 : 08 > php ;save flags +1ff2 : c97f > cmp #$7f ;test result > trap_ne -1ffb : d0fe > bne * ;failed not equal (non zero) +1ff4 : d0fe > bne * ;failed not equal (non zero) > -1ffd : 68 > pla ;load status -1ffe : 48 > pha +1ff6 : 68 > pla ;load status +1ff7 : 48 > pha > cmp_flag fzc -1fff : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits +1ff8 : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -2001 : d0fe > bne * ;failed not equal (non zero) +1ffa : d0fe > bne * ;failed not equal (non zero) > -2003 : 28 > plp ;restore status +1ffc : 28 > plp ;restore status set_a $7e,0 > load_flag 0 -2004 : a900 > lda #0 ;allow test to change I-flag (no mask) +1ffd : a900 > lda #0 ;allow test to change I-flag (no mask) > -2006 : 48 > pha ;use stack to load status -2007 : a97e > lda #$7e ;precharge accu -2009 : 28 > plp +1fff : 48 > pha ;use stack to load status +2000 : a97e > lda #$7e ;precharge accu +2002 : 28 > plp -200a : d513 cmp zp1,x +2003 : c97f cmp #$7f tst_a $7e,fn -200c : 08 > php ;save flags -200d : c97e > cmp #$7e ;test result +2005 : 08 > php ;save flags +2006 : c97e > cmp #$7e ;test result > trap_ne -200f : d0fe > bne * ;failed not equal (non zero) +2008 : d0fe > bne * ;failed not equal (non zero) > -2011 : 68 > pla ;load status -2012 : 48 > pha +200a : 68 > pla ;load status +200b : 48 > pha > cmp_flag fn -2013 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits +200c : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits > > trap_ne -2015 : d0fe > bne * ;failed not equal (non zero) +200e : d0fe > bne * ;failed not equal (non zero) > -2017 : 28 > plp ;restore status +2010 : 28 > plp ;restore status set_a $80,$ff > load_flag $ff -2018 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2011 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -201a : 48 > pha ;use stack to load status -201b : a980 > lda #$80 ;precharge accu -201d : 28 > plp +2013 : 48 > pha ;use stack to load status +2014 : a980 > lda #$80 ;precharge accu +2016 : 28 > plp -201e : d513 cmp zp1,x +2017 : c97f cmp #$7f tst_a $80,~fnz -2020 : 08 > php ;save flags -2021 : c980 > cmp #$80 ;test result +2019 : 08 > php ;save flags +201a : c980 > cmp #$80 ;test result > trap_ne -2023 : d0fe > bne * ;failed not equal (non zero) +201c : d0fe > bne * ;failed not equal (non zero) > -2025 : 68 > pla ;load status -2026 : 48 > pha +201e : 68 > pla ;load status +201f : 48 > pha > cmp_flag ~fnz -2027 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits +2020 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -2029 : d0fe > bne * ;failed not equal (non zero) +2022 : d0fe > bne * ;failed not equal (non zero) > -202b : 28 > plp ;restore status +2024 : 28 > plp ;restore status set_a $7f,$ff > load_flag $ff -202c : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2025 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -202e : 48 > pha ;use stack to load status -202f : a97f > lda #$7f ;precharge accu -2031 : 28 > plp +2027 : 48 > pha ;use stack to load status +2028 : a97f > lda #$7f ;precharge accu +202a : 28 > plp -2032 : d513 cmp zp1,x +202b : c97f cmp #$7f tst_a $7f,~fn -2034 : 08 > php ;save flags -2035 : c97f > cmp #$7f ;test result +202d : 08 > php ;save flags +202e : c97f > cmp #$7f ;test result > trap_ne -2037 : d0fe > bne * ;failed not equal (non zero) +2030 : d0fe > bne * ;failed not equal (non zero) > -2039 : 68 > pla ;load status -203a : 48 > pha +2032 : 68 > pla ;load status +2033 : 48 > pha > cmp_flag ~fn -203b : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits +2034 : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits > > trap_ne -203d : d0fe > bne * ;failed not equal (non zero) +2036 : d0fe > bne * ;failed not equal (non zero) > -203f : 28 > plp ;restore status +2038 : 28 > plp ;restore status set_a $7e,$ff > load_flag $ff -2040 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2039 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2042 : 48 > pha ;use stack to load status -2043 : a97e > lda #$7e ;precharge accu -2045 : 28 > plp +203b : 48 > pha ;use stack to load status +203c : a97e > lda #$7e ;precharge accu +203e : 28 > plp -2046 : d513 cmp zp1,x +203f : c97f cmp #$7f tst_a $7e,~fzc -2048 : 08 > php ;save flags -2049 : c97e > cmp #$7e ;test result +2041 : 08 > php ;save flags +2042 : c97e > cmp #$7e ;test result > trap_ne -204b : d0fe > bne * ;failed not equal (non zero) +2044 : d0fe > bne * ;failed not equal (non zero) > -204d : 68 > pla ;load status -204e : 48 > pha +2046 : 68 > pla ;load status +2047 : 48 > pha > cmp_flag ~fzc -204f : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits +2048 : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -2051 : d0fe > bne * ;failed not equal (non zero) +204a : d0fe > bne * ;failed not equal (non zero) > -2053 : 28 > plp ;restore status +204c : 28 > plp ;restore status +204d : a204 ldx #4 ;with indexing by X set_a $80,0 > load_flag 0 -2054 : a900 > lda #0 ;allow test to change I-flag (no mask) +204f : a900 > lda #0 ;allow test to change I-flag (no mask) > -2056 : 48 > pha ;use stack to load status -2057 : a980 > lda #$80 ;precharge accu -2059 : 28 > plp +2051 : 48 > pha ;use stack to load status +2052 : a980 > lda #$80 ;precharge accu +2054 : 28 > plp -205a : dd0802 cmp abs1,x +2055 : d513 cmp zp1,x tst_a $80,fc -205d : 08 > php ;save flags -205e : c980 > cmp #$80 ;test result +2057 : 08 > php ;save flags +2058 : c980 > cmp #$80 ;test result + > trap_ne +205a : d0fe > bne * ;failed not equal (non zero) + > +205c : 68 > pla ;load status +205d : 48 > pha + > cmp_flag fc +205e : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits + > > trap_ne 2060 : d0fe > bne * ;failed not equal (non zero) > -2062 : 68 > pla ;load status -2063 : 48 > pha - > cmp_flag fc -2064 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits - > - > trap_ne -2066 : d0fe > bne * ;failed not equal (non zero) - > -2068 : 28 > plp ;restore status +2062 : 28 > plp ;restore status set_a $7f,0 > load_flag 0 -2069 : a900 > lda #0 ;allow test to change I-flag (no mask) +2063 : a900 > lda #0 ;allow test to change I-flag (no mask) > -206b : 48 > pha ;use stack to load status -206c : a97f > lda #$7f ;precharge accu -206e : 28 > plp +2065 : 48 > pha ;use stack to load status +2066 : a97f > lda #$7f ;precharge accu +2068 : 28 > plp -206f : dd0802 cmp abs1,x +2069 : d513 cmp zp1,x tst_a $7f,fzc -2072 : 08 > php ;save flags -2073 : c97f > cmp #$7f ;test result +206b : 08 > php ;save flags +206c : c97f > cmp #$7f ;test result > trap_ne -2075 : d0fe > bne * ;failed not equal (non zero) +206e : d0fe > bne * ;failed not equal (non zero) > -2077 : 68 > pla ;load status -2078 : 48 > pha +2070 : 68 > pla ;load status +2071 : 48 > pha > cmp_flag fzc -2079 : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits +2072 : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -207b : d0fe > bne * ;failed not equal (non zero) +2074 : d0fe > bne * ;failed not equal (non zero) > -207d : 28 > plp ;restore status +2076 : 28 > plp ;restore status set_a $7e,0 > load_flag 0 -207e : a900 > lda #0 ;allow test to change I-flag (no mask) +2077 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2080 : 48 > pha ;use stack to load status -2081 : a97e > lda #$7e ;precharge accu -2083 : 28 > plp +2079 : 48 > pha ;use stack to load status +207a : a97e > lda #$7e ;precharge accu +207c : 28 > plp -2084 : dd0802 cmp abs1,x +207d : d513 cmp zp1,x tst_a $7e,fn -2087 : 08 > php ;save flags -2088 : c97e > cmp #$7e ;test result +207f : 08 > php ;save flags +2080 : c97e > cmp #$7e ;test result > trap_ne -208a : d0fe > bne * ;failed not equal (non zero) +2082 : d0fe > bne * ;failed not equal (non zero) > -208c : 68 > pla ;load status -208d : 48 > pha +2084 : 68 > pla ;load status +2085 : 48 > pha > cmp_flag fn -208e : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits +2086 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits > > trap_ne -2090 : d0fe > bne * ;failed not equal (non zero) +2088 : d0fe > bne * ;failed not equal (non zero) > -2092 : 28 > plp ;restore status +208a : 28 > plp ;restore status set_a $80,$ff > load_flag $ff -2093 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +208b : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2095 : 48 > pha ;use stack to load status -2096 : a980 > lda #$80 ;precharge accu -2098 : 28 > plp +208d : 48 > pha ;use stack to load status +208e : a980 > lda #$80 ;precharge accu +2090 : 28 > plp -2099 : dd0802 cmp abs1,x +2091 : d513 cmp zp1,x tst_a $80,~fnz -209c : 08 > php ;save flags -209d : c980 > cmp #$80 ;test result +2093 : 08 > php ;save flags +2094 : c980 > cmp #$80 ;test result > trap_ne -209f : d0fe > bne * ;failed not equal (non zero) +2096 : d0fe > bne * ;failed not equal (non zero) > -20a1 : 68 > pla ;load status -20a2 : 48 > pha +2098 : 68 > pla ;load status +2099 : 48 > pha > cmp_flag ~fnz -20a3 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits +209a : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -20a5 : d0fe > bne * ;failed not equal (non zero) +209c : d0fe > bne * ;failed not equal (non zero) > -20a7 : 28 > plp ;restore status +209e : 28 > plp ;restore status set_a $7f,$ff > load_flag $ff -20a8 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +209f : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -20aa : 48 > pha ;use stack to load status -20ab : a97f > lda #$7f ;precharge accu -20ad : 28 > plp +20a1 : 48 > pha ;use stack to load status +20a2 : a97f > lda #$7f ;precharge accu +20a4 : 28 > plp -20ae : dd0802 cmp abs1,x +20a5 : d513 cmp zp1,x tst_a $7f,~fn -20b1 : 08 > php ;save flags -20b2 : c97f > cmp #$7f ;test result +20a7 : 08 > php ;save flags +20a8 : c97f > cmp #$7f ;test result > trap_ne -20b4 : d0fe > bne * ;failed not equal (non zero) +20aa : d0fe > bne * ;failed not equal (non zero) > -20b6 : 68 > pla ;load status -20b7 : 48 > pha +20ac : 68 > pla ;load status +20ad : 48 > pha > cmp_flag ~fn -20b8 : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits +20ae : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits > > trap_ne -20ba : d0fe > bne * ;failed not equal (non zero) +20b0 : d0fe > bne * ;failed not equal (non zero) > -20bc : 28 > plp ;restore status +20b2 : 28 > plp ;restore status set_a $7e,$ff > load_flag $ff -20bd : a9ff > lda #$ff ;allow test to change I-flag (no mask) +20b3 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -20bf : 48 > pha ;use stack to load status -20c0 : a97e > lda #$7e ;precharge accu -20c2 : 28 > plp +20b5 : 48 > pha ;use stack to load status +20b6 : a97e > lda #$7e ;precharge accu +20b8 : 28 > plp -20c3 : dd0802 cmp abs1,x +20b9 : d513 cmp zp1,x tst_a $7e,~fzc -20c6 : 08 > php ;save flags -20c7 : c97e > cmp #$7e ;test result +20bb : 08 > php ;save flags +20bc : c97e > cmp #$7e ;test result > trap_ne -20c9 : d0fe > bne * ;failed not equal (non zero) +20be : d0fe > bne * ;failed not equal (non zero) > -20cb : 68 > pla ;load status -20cc : 48 > pha +20c0 : 68 > pla ;load status +20c1 : 48 > pha > cmp_flag ~fzc -20cd : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits +20c2 : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -20cf : d0fe > bne * ;failed not equal (non zero) +20c4 : d0fe > bne * ;failed not equal (non zero) > -20d1 : 28 > plp ;restore status +20c6 : 28 > plp ;restore status -20d2 : a004 ldy #4 ;with indexing by Y -20d4 : a208 ldx #8 ;with indexed indirect set_a $80,0 > load_flag 0 -20d6 : a900 > lda #0 ;allow test to change I-flag (no mask) +20c7 : a900 > lda #0 ;allow test to change I-flag (no mask) > -20d8 : 48 > pha ;use stack to load status -20d9 : a980 > lda #$80 ;precharge accu -20db : 28 > plp +20c9 : 48 > pha ;use stack to load status +20ca : a980 > lda #$80 ;precharge accu +20cc : 28 > plp -20dc : d90802 cmp abs1,y +20cd : dd1702 cmp abs1,x tst_a $80,fc -20df : 08 > php ;save flags -20e0 : c980 > cmp #$80 ;test result +20d0 : 08 > php ;save flags +20d1 : c980 > cmp #$80 ;test result > trap_ne -20e2 : d0fe > bne * ;failed not equal (non zero) +20d3 : d0fe > bne * ;failed not equal (non zero) > -20e4 : 68 > pla ;load status -20e5 : 48 > pha +20d5 : 68 > pla ;load status +20d6 : 48 > pha > cmp_flag fc -20e6 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits +20d7 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits > > trap_ne +20d9 : d0fe > bne * ;failed not equal (non zero) + > +20db : 28 > plp ;restore status + + set_a $7f,0 + > load_flag 0 +20dc : a900 > lda #0 ;allow test to change I-flag (no mask) + > +20de : 48 > pha ;use stack to load status +20df : a97f > lda #$7f ;precharge accu +20e1 : 28 > plp + +20e2 : dd1702 cmp abs1,x + tst_a $7f,fzc +20e5 : 08 > php ;save flags +20e6 : c97f > cmp #$7f ;test result + > trap_ne 20e8 : d0fe > bne * ;failed not equal (non zero) > -20ea : 28 > plp ;restore status - - set_a $7f,0 - > load_flag 0 -20eb : a900 > lda #0 ;allow test to change I-flag (no mask) - > -20ed : 48 > pha ;use stack to load status -20ee : a97f > lda #$7f ;precharge accu -20f0 : 28 > plp - -20f1 : d90802 cmp abs1,y - tst_a $7f,fzc -20f4 : 08 > php ;save flags -20f5 : c97f > cmp #$7f ;test result - > trap_ne -20f7 : d0fe > bne * ;failed not equal (non zero) - > -20f9 : 68 > pla ;load status -20fa : 48 > pha +20ea : 68 > pla ;load status +20eb : 48 > pha > cmp_flag fzc -20fb : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits +20ec : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits > > trap_ne +20ee : d0fe > bne * ;failed not equal (non zero) + > +20f0 : 28 > plp ;restore status + + set_a $7e,0 + > load_flag 0 +20f1 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +20f3 : 48 > pha ;use stack to load status +20f4 : a97e > lda #$7e ;precharge accu +20f6 : 28 > plp + +20f7 : dd1702 cmp abs1,x + tst_a $7e,fn +20fa : 08 > php ;save flags +20fb : c97e > cmp #$7e ;test result + > trap_ne 20fd : d0fe > bne * ;failed not equal (non zero) > -20ff : 28 > plp ;restore status - - set_a $7e,0 - > load_flag 0 -2100 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -2102 : 48 > pha ;use stack to load status -2103 : a97e > lda #$7e ;precharge accu -2105 : 28 > plp - -2106 : d90802 cmp abs1,y - tst_a $7e,fn -2109 : 08 > php ;save flags -210a : c97e > cmp #$7e ;test result - > trap_ne -210c : d0fe > bne * ;failed not equal (non zero) - > -210e : 68 > pla ;load status -210f : 48 > pha +20ff : 68 > pla ;load status +2100 : 48 > pha > cmp_flag fn -2110 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits +2101 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits > > trap_ne +2103 : d0fe > bne * ;failed not equal (non zero) + > +2105 : 28 > plp ;restore status + + set_a $80,$ff + > load_flag $ff +2106 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +2108 : 48 > pha ;use stack to load status +2109 : a980 > lda #$80 ;precharge accu +210b : 28 > plp + +210c : dd1702 cmp abs1,x + tst_a $80,~fnz +210f : 08 > php ;save flags +2110 : c980 > cmp #$80 ;test result + > trap_ne 2112 : d0fe > bne * ;failed not equal (non zero) > -2114 : 28 > plp ;restore status - - set_a $80,$ff - > load_flag $ff -2115 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -2117 : 48 > pha ;use stack to load status -2118 : a980 > lda #$80 ;precharge accu -211a : 28 > plp - -211b : d90802 cmp abs1,y - tst_a $80,~fnz -211e : 08 > php ;save flags -211f : c980 > cmp #$80 ;test result - > trap_ne -2121 : d0fe > bne * ;failed not equal (non zero) - > -2123 : 68 > pla ;load status -2124 : 48 > pha +2114 : 68 > pla ;load status +2115 : 48 > pha > cmp_flag ~fnz -2125 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits +2116 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits > > trap_ne +2118 : d0fe > bne * ;failed not equal (non zero) + > +211a : 28 > plp ;restore status + + set_a $7f,$ff + > load_flag $ff +211b : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +211d : 48 > pha ;use stack to load status +211e : a97f > lda #$7f ;precharge accu +2120 : 28 > plp + +2121 : dd1702 cmp abs1,x + tst_a $7f,~fn +2124 : 08 > php ;save flags +2125 : c97f > cmp #$7f ;test result + > trap_ne 2127 : d0fe > bne * ;failed not equal (non zero) > -2129 : 28 > plp ;restore status - - set_a $7f,$ff - > load_flag $ff -212a : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -212c : 48 > pha ;use stack to load status -212d : a97f > lda #$7f ;precharge accu -212f : 28 > plp - -2130 : d90802 cmp abs1,y - tst_a $7f,~fn -2133 : 08 > php ;save flags -2134 : c97f > cmp #$7f ;test result - > trap_ne -2136 : d0fe > bne * ;failed not equal (non zero) - > -2138 : 68 > pla ;load status -2139 : 48 > pha +2129 : 68 > pla ;load status +212a : 48 > pha > cmp_flag ~fn -213a : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits +212b : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits > > trap_ne +212d : d0fe > bne * ;failed not equal (non zero) + > +212f : 28 > plp ;restore status + + set_a $7e,$ff + > load_flag $ff +2130 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +2132 : 48 > pha ;use stack to load status +2133 : a97e > lda #$7e ;precharge accu +2135 : 28 > plp + +2136 : dd1702 cmp abs1,x + tst_a $7e,~fzc +2139 : 08 > php ;save flags +213a : c97e > cmp #$7e ;test result + > trap_ne 213c : d0fe > bne * ;failed not equal (non zero) > -213e : 28 > plp ;restore status - - set_a $7e,$ff - > load_flag $ff -213f : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -2141 : 48 > pha ;use stack to load status -2142 : a97e > lda #$7e ;precharge accu -2144 : 28 > plp - -2145 : d90802 cmp abs1,y - tst_a $7e,~fzc -2148 : 08 > php ;save flags -2149 : c97e > cmp #$7e ;test result - > trap_ne -214b : d0fe > bne * ;failed not equal (non zero) - > -214d : 68 > pla ;load status -214e : 48 > pha +213e : 68 > pla ;load status +213f : 48 > pha > cmp_flag ~fzc -214f : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits +2140 : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -2151 : d0fe > bne * ;failed not equal (non zero) +2142 : d0fe > bne * ;failed not equal (non zero) > -2153 : 28 > plp ;restore status +2144 : 28 > plp ;restore status +2145 : a004 ldy #4 ;with indexing by Y +2147 : a208 ldx #8 ;with indexed indirect set_a $80,0 > load_flag 0 -2154 : a900 > lda #0 ;allow test to change I-flag (no mask) +2149 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2156 : 48 > pha ;use stack to load status -2157 : a980 > lda #$80 ;precharge accu -2159 : 28 > plp +214b : 48 > pha ;use stack to load status +214c : a980 > lda #$80 ;precharge accu +214e : 28 > plp -215a : c124 cmp (ind1,x) +214f : d91702 cmp abs1,y tst_a $80,fc -215c : 08 > php ;save flags -215d : c980 > cmp #$80 ;test result +2152 : 08 > php ;save flags +2153 : c980 > cmp #$80 ;test result > trap_ne -215f : d0fe > bne * ;failed not equal (non zero) +2155 : d0fe > bne * ;failed not equal (non zero) > -2161 : 68 > pla ;load status -2162 : 48 > pha +2157 : 68 > pla ;load status +2158 : 48 > pha > cmp_flag fc -2163 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits +2159 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits > > trap_ne -2165 : d0fe > bne * ;failed not equal (non zero) +215b : d0fe > bne * ;failed not equal (non zero) > -2167 : 28 > plp ;restore status +215d : 28 > plp ;restore status set_a $7f,0 > load_flag 0 -2168 : a900 > lda #0 ;allow test to change I-flag (no mask) +215e : a900 > lda #0 ;allow test to change I-flag (no mask) > -216a : 48 > pha ;use stack to load status -216b : a97f > lda #$7f ;precharge accu -216d : 28 > plp +2160 : 48 > pha ;use stack to load status +2161 : a97f > lda #$7f ;precharge accu +2163 : 28 > plp -216e : c124 cmp (ind1,x) +2164 : d91702 cmp abs1,y tst_a $7f,fzc -2170 : 08 > php ;save flags -2171 : c97f > cmp #$7f ;test result +2167 : 08 > php ;save flags +2168 : c97f > cmp #$7f ;test result > trap_ne -2173 : d0fe > bne * ;failed not equal (non zero) +216a : d0fe > bne * ;failed not equal (non zero) > -2175 : 68 > pla ;load status -2176 : 48 > pha +216c : 68 > pla ;load status +216d : 48 > pha > cmp_flag fzc -2177 : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits +216e : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -2179 : d0fe > bne * ;failed not equal (non zero) +2170 : d0fe > bne * ;failed not equal (non zero) > -217b : 28 > plp ;restore status +2172 : 28 > plp ;restore status set_a $7e,0 > load_flag 0 -217c : a900 > lda #0 ;allow test to change I-flag (no mask) +2173 : a900 > lda #0 ;allow test to change I-flag (no mask) > -217e : 48 > pha ;use stack to load status -217f : a97e > lda #$7e ;precharge accu -2181 : 28 > plp +2175 : 48 > pha ;use stack to load status +2176 : a97e > lda #$7e ;precharge accu +2178 : 28 > plp -2182 : c124 cmp (ind1,x) +2179 : d91702 cmp abs1,y tst_a $7e,fn -2184 : 08 > php ;save flags -2185 : c97e > cmp #$7e ;test result +217c : 08 > php ;save flags +217d : c97e > cmp #$7e ;test result > trap_ne -2187 : d0fe > bne * ;failed not equal (non zero) +217f : d0fe > bne * ;failed not equal (non zero) > -2189 : 68 > pla ;load status -218a : 48 > pha +2181 : 68 > pla ;load status +2182 : 48 > pha > cmp_flag fn -218b : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits +2183 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits > > trap_ne -218d : d0fe > bne * ;failed not equal (non zero) +2185 : d0fe > bne * ;failed not equal (non zero) > -218f : 28 > plp ;restore status +2187 : 28 > plp ;restore status set_a $80,$ff > load_flag $ff -2190 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2188 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2192 : 48 > pha ;use stack to load status -2193 : a980 > lda #$80 ;precharge accu -2195 : 28 > plp +218a : 48 > pha ;use stack to load status +218b : a980 > lda #$80 ;precharge accu +218d : 28 > plp -2196 : c124 cmp (ind1,x) +218e : d91702 cmp abs1,y tst_a $80,~fnz -2198 : 08 > php ;save flags -2199 : c980 > cmp #$80 ;test result +2191 : 08 > php ;save flags +2192 : c980 > cmp #$80 ;test result > trap_ne -219b : d0fe > bne * ;failed not equal (non zero) +2194 : d0fe > bne * ;failed not equal (non zero) > -219d : 68 > pla ;load status -219e : 48 > pha +2196 : 68 > pla ;load status +2197 : 48 > pha > cmp_flag ~fnz -219f : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits +2198 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -21a1 : d0fe > bne * ;failed not equal (non zero) +219a : d0fe > bne * ;failed not equal (non zero) > -21a3 : 28 > plp ;restore status +219c : 28 > plp ;restore status set_a $7f,$ff > load_flag $ff -21a4 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +219d : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -21a6 : 48 > pha ;use stack to load status -21a7 : a97f > lda #$7f ;precharge accu -21a9 : 28 > plp +219f : 48 > pha ;use stack to load status +21a0 : a97f > lda #$7f ;precharge accu +21a2 : 28 > plp -21aa : c124 cmp (ind1,x) +21a3 : d91702 cmp abs1,y tst_a $7f,~fn -21ac : 08 > php ;save flags -21ad : c97f > cmp #$7f ;test result +21a6 : 08 > php ;save flags +21a7 : c97f > cmp #$7f ;test result + > trap_ne +21a9 : d0fe > bne * ;failed not equal (non zero) + > +21ab : 68 > pla ;load status +21ac : 48 > pha + > cmp_flag ~fn +21ad : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits + > > trap_ne 21af : d0fe > bne * ;failed not equal (non zero) > -21b1 : 68 > pla ;load status -21b2 : 48 > pha - > cmp_flag ~fn -21b3 : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits - > - > trap_ne -21b5 : d0fe > bne * ;failed not equal (non zero) - > -21b7 : 28 > plp ;restore status +21b1 : 28 > plp ;restore status set_a $7e,$ff > load_flag $ff -21b8 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +21b2 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -21ba : 48 > pha ;use stack to load status -21bb : a97e > lda #$7e ;precharge accu -21bd : 28 > plp +21b4 : 48 > pha ;use stack to load status +21b5 : a97e > lda #$7e ;precharge accu +21b7 : 28 > plp -21be : c124 cmp (ind1,x) +21b8 : d91702 cmp abs1,y tst_a $7e,~fzc -21c0 : 08 > php ;save flags -21c1 : c97e > cmp #$7e ;test result +21bb : 08 > php ;save flags +21bc : c97e > cmp #$7e ;test result > trap_ne -21c3 : d0fe > bne * ;failed not equal (non zero) +21be : d0fe > bne * ;failed not equal (non zero) > -21c5 : 68 > pla ;load status -21c6 : 48 > pha +21c0 : 68 > pla ;load status +21c1 : 48 > pha > cmp_flag ~fzc -21c7 : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits +21c2 : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -21c9 : d0fe > bne * ;failed not equal (non zero) +21c4 : d0fe > bne * ;failed not equal (non zero) > -21cb : 28 > plp ;restore status +21c6 : 28 > plp ;restore status set_a $80,0 > load_flag 0 -21cc : a900 > lda #0 ;allow test to change I-flag (no mask) +21c7 : a900 > lda #0 ;allow test to change I-flag (no mask) > -21ce : 48 > pha ;use stack to load status -21cf : a980 > lda #$80 ;precharge accu -21d1 : 28 > plp +21c9 : 48 > pha ;use stack to load status +21ca : a980 > lda #$80 ;precharge accu +21cc : 28 > plp -21d2 : d124 cmp (ind1),y +21cd : c124 cmp (ind1,x) tst_a $80,fc -21d4 : 08 > php ;save flags -21d5 : c980 > cmp #$80 ;test result +21cf : 08 > php ;save flags +21d0 : c980 > cmp #$80 ;test result > trap_ne -21d7 : d0fe > bne * ;failed not equal (non zero) +21d2 : d0fe > bne * ;failed not equal (non zero) > -21d9 : 68 > pla ;load status -21da : 48 > pha +21d4 : 68 > pla ;load status +21d5 : 48 > pha > cmp_flag fc -21db : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits +21d6 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits > > trap_ne -21dd : d0fe > bne * ;failed not equal (non zero) +21d8 : d0fe > bne * ;failed not equal (non zero) > -21df : 28 > plp ;restore status +21da : 28 > plp ;restore status set_a $7f,0 > load_flag 0 -21e0 : a900 > lda #0 ;allow test to change I-flag (no mask) +21db : a900 > lda #0 ;allow test to change I-flag (no mask) > -21e2 : 48 > pha ;use stack to load status -21e3 : a97f > lda #$7f ;precharge accu -21e5 : 28 > plp +21dd : 48 > pha ;use stack to load status +21de : a97f > lda #$7f ;precharge accu +21e0 : 28 > plp -21e6 : d124 cmp (ind1),y +21e1 : c124 cmp (ind1,x) tst_a $7f,fzc -21e8 : 08 > php ;save flags -21e9 : c97f > cmp #$7f ;test result +21e3 : 08 > php ;save flags +21e4 : c97f > cmp #$7f ;test result > trap_ne -21eb : d0fe > bne * ;failed not equal (non zero) +21e6 : d0fe > bne * ;failed not equal (non zero) > -21ed : 68 > pla ;load status -21ee : 48 > pha +21e8 : 68 > pla ;load status +21e9 : 48 > pha > cmp_flag fzc -21ef : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits +21ea : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -21f1 : d0fe > bne * ;failed not equal (non zero) +21ec : d0fe > bne * ;failed not equal (non zero) > -21f3 : 28 > plp ;restore status +21ee : 28 > plp ;restore status set_a $7e,0 > load_flag 0 -21f4 : a900 > lda #0 ;allow test to change I-flag (no mask) +21ef : a900 > lda #0 ;allow test to change I-flag (no mask) > -21f6 : 48 > pha ;use stack to load status -21f7 : a97e > lda #$7e ;precharge accu -21f9 : 28 > plp +21f1 : 48 > pha ;use stack to load status +21f2 : a97e > lda #$7e ;precharge accu +21f4 : 28 > plp -21fa : d124 cmp (ind1),y +21f5 : c124 cmp (ind1,x) tst_a $7e,fn -21fc : 08 > php ;save flags -21fd : c97e > cmp #$7e ;test result +21f7 : 08 > php ;save flags +21f8 : c97e > cmp #$7e ;test result > trap_ne -21ff : d0fe > bne * ;failed not equal (non zero) +21fa : d0fe > bne * ;failed not equal (non zero) > -2201 : 68 > pla ;load status -2202 : 48 > pha +21fc : 68 > pla ;load status +21fd : 48 > pha > cmp_flag fn -2203 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits +21fe : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits > > trap_ne -2205 : d0fe > bne * ;failed not equal (non zero) +2200 : d0fe > bne * ;failed not equal (non zero) > -2207 : 28 > plp ;restore status +2202 : 28 > plp ;restore status set_a $80,$ff > load_flag $ff -2208 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2203 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -220a : 48 > pha ;use stack to load status -220b : a980 > lda #$80 ;precharge accu -220d : 28 > plp +2205 : 48 > pha ;use stack to load status +2206 : a980 > lda #$80 ;precharge accu +2208 : 28 > plp -220e : d124 cmp (ind1),y +2209 : c124 cmp (ind1,x) tst_a $80,~fnz -2210 : 08 > php ;save flags -2211 : c980 > cmp #$80 ;test result +220b : 08 > php ;save flags +220c : c980 > cmp #$80 ;test result > trap_ne -2213 : d0fe > bne * ;failed not equal (non zero) +220e : d0fe > bne * ;failed not equal (non zero) > -2215 : 68 > pla ;load status -2216 : 48 > pha +2210 : 68 > pla ;load status +2211 : 48 > pha > cmp_flag ~fnz -2217 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits +2212 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -2219 : d0fe > bne * ;failed not equal (non zero) +2214 : d0fe > bne * ;failed not equal (non zero) > -221b : 28 > plp ;restore status +2216 : 28 > plp ;restore status set_a $7f,$ff > load_flag $ff -221c : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2217 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -221e : 48 > pha ;use stack to load status -221f : a97f > lda #$7f ;precharge accu -2221 : 28 > plp +2219 : 48 > pha ;use stack to load status +221a : a97f > lda #$7f ;precharge accu +221c : 28 > plp -2222 : d124 cmp (ind1),y +221d : c124 cmp (ind1,x) tst_a $7f,~fn -2224 : 08 > php ;save flags -2225 : c97f > cmp #$7f ;test result +221f : 08 > php ;save flags +2220 : c97f > cmp #$7f ;test result > trap_ne -2227 : d0fe > bne * ;failed not equal (non zero) +2222 : d0fe > bne * ;failed not equal (non zero) > -2229 : 68 > pla ;load status -222a : 48 > pha +2224 : 68 > pla ;load status +2225 : 48 > pha > cmp_flag ~fn -222b : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits +2226 : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits > > trap_ne -222d : d0fe > bne * ;failed not equal (non zero) +2228 : d0fe > bne * ;failed not equal (non zero) > -222f : 28 > plp ;restore status +222a : 28 > plp ;restore status set_a $7e,$ff > load_flag $ff -2230 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +222b : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2232 : 48 > pha ;use stack to load status -2233 : a97e > lda #$7e ;precharge accu -2235 : 28 > plp +222d : 48 > pha ;use stack to load status +222e : a97e > lda #$7e ;precharge accu +2230 : 28 > plp -2236 : d124 cmp (ind1),y +2231 : c124 cmp (ind1,x) tst_a $7e,~fzc -2238 : 08 > php ;save flags -2239 : c97e > cmp #$7e ;test result +2233 : 08 > php ;save flags +2234 : c97e > cmp #$7e ;test result > trap_ne -223b : d0fe > bne * ;failed not equal (non zero) +2236 : d0fe > bne * ;failed not equal (non zero) > -223d : 68 > pla ;load status -223e : 48 > pha +2238 : 68 > pla ;load status +2239 : 48 > pha > cmp_flag ~fzc -223f : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits +223a : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -2241 : d0fe > bne * ;failed not equal (non zero) +223c : d0fe > bne * ;failed not equal (non zero) > -2243 : 28 > plp ;restore status +223e : 28 > plp ;restore status + + + set_a $80,0 + > load_flag 0 +223f : a900 > lda #0 ;allow test to change I-flag (no mask) + > +2241 : 48 > pha ;use stack to load status +2242 : a980 > lda #$80 ;precharge accu +2244 : 28 > plp + +2245 : d124 cmp (ind1),y + tst_a $80,fc +2247 : 08 > php ;save flags +2248 : c980 > cmp #$80 ;test result + > trap_ne +224a : d0fe > bne * ;failed not equal (non zero) + > +224c : 68 > pla ;load status +224d : 48 > pha + > cmp_flag fc +224e : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits + > + > trap_ne +2250 : d0fe > bne * ;failed not equal (non zero) + > +2252 : 28 > plp ;restore status + + set_a $7f,0 + > load_flag 0 +2253 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +2255 : 48 > pha ;use stack to load status +2256 : a97f > lda #$7f ;precharge accu +2258 : 28 > plp + +2259 : d124 cmp (ind1),y + tst_a $7f,fzc +225b : 08 > php ;save flags +225c : c97f > cmp #$7f ;test result + > trap_ne +225e : d0fe > bne * ;failed not equal (non zero) + > +2260 : 68 > pla ;load status +2261 : 48 > pha + > cmp_flag fzc +2262 : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits + > + > trap_ne +2264 : d0fe > bne * ;failed not equal (non zero) + > +2266 : 28 > plp ;restore status + + set_a $7e,0 + > load_flag 0 +2267 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +2269 : 48 > pha ;use stack to load status +226a : a97e > lda #$7e ;precharge accu +226c : 28 > plp + +226d : d124 cmp (ind1),y + tst_a $7e,fn +226f : 08 > php ;save flags +2270 : c97e > cmp #$7e ;test result + > trap_ne +2272 : d0fe > bne * ;failed not equal (non zero) + > +2274 : 68 > pla ;load status +2275 : 48 > pha + > cmp_flag fn +2276 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits + > + > trap_ne +2278 : d0fe > bne * ;failed not equal (non zero) + > +227a : 28 > plp ;restore status + + set_a $80,$ff + > load_flag $ff +227b : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +227d : 48 > pha ;use stack to load status +227e : a980 > lda #$80 ;precharge accu +2280 : 28 > plp + +2281 : d124 cmp (ind1),y + tst_a $80,~fnz +2283 : 08 > php ;save flags +2284 : c980 > cmp #$80 ;test result + > trap_ne +2286 : d0fe > bne * ;failed not equal (non zero) + > +2288 : 68 > pla ;load status +2289 : 48 > pha + > cmp_flag ~fnz +228a : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits + > + > trap_ne +228c : d0fe > bne * ;failed not equal (non zero) + > +228e : 28 > plp ;restore status + + set_a $7f,$ff + > load_flag $ff +228f : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +2291 : 48 > pha ;use stack to load status +2292 : a97f > lda #$7f ;precharge accu +2294 : 28 > plp + +2295 : d124 cmp (ind1),y + tst_a $7f,~fn +2297 : 08 > php ;save flags +2298 : c97f > cmp #$7f ;test result + > trap_ne +229a : d0fe > bne * ;failed not equal (non zero) + > +229c : 68 > pla ;load status +229d : 48 > pha + > cmp_flag ~fn +229e : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits + > + > trap_ne +22a0 : d0fe > bne * ;failed not equal (non zero) + > +22a2 : 28 > plp ;restore status + + set_a $7e,$ff + > load_flag $ff +22a3 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +22a5 : 48 > pha ;use stack to load status +22a6 : a97e > lda #$7e ;precharge accu +22a8 : 28 > plp + +22a9 : d124 cmp (ind1),y + tst_a $7e,~fzc +22ab : 08 > php ;save flags +22ac : c97e > cmp #$7e ;test result + > trap_ne +22ae : d0fe > bne * ;failed not equal (non zero) + > +22b0 : 68 > pla ;load status +22b1 : 48 > pha + > cmp_flag ~fzc +22b2 : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits + > + > trap_ne +22b4 : d0fe > bne * ;failed not equal (non zero) + > +22b6 : 28 > plp ;restore status next_test -2244 : ad0002 > lda test_case ;previous test -2247 : c91c > cmp #test_num +22b7 : ad0002 > lda test_case ;previous test +22ba : c91c > cmp #test_num > trap_ne ;test is out of sequence -2249 : d0fe > bne * ;failed not equal (non zero) +22bc : d0fe > bne * ;failed not equal (non zero) > 001d = >test_num = test_num + 1 -224b : a91d > lda #test_num ;*** next tests' number -224d : 8d0002 > sta test_case +22be : a91d > lda #test_num ;*** next tests' number +22c0 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; testing shifts - ASL LSR ROL ROR all addressing modes ; shifts - accumulator -2250 : a203 ldx #3 -2252 : tasl +22c3 : a203 ldx #3 +22c5 : tasl set_ax zp1,0 > load_flag 0 -2252 : a900 > lda #0 ;allow test to change I-flag (no mask) +22c5 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2254 : 48 > pha ;use stack to load status -2255 : b513 > lda zp1,x ;precharge accu -2257 : 28 > plp +22c7 : 48 > pha ;use stack to load status +22c8 : b513 > lda zp1,x ;precharge accu +22ca : 28 > plp -2258 : 0a asl a +22cb : 0a asl a tst_ax rASL,fASL,0 -2259 : 08 > php ;save flags -225a : dd1102 > cmp rASL,x ;test result +22cc : 08 > php ;save flags +22cd : dd2002 > cmp rASL,x ;test result > trap_ne -225d : d0fe > bne * ;failed not equal (non zero) +22d0 : d0fe > bne * ;failed not equal (non zero) > -225f : 68 > pla ;load status +22d2 : 68 > pla ;load status > eor_flag 0 -2260 : 4930 > eor #0|fao ;invert expected flags + always on bits +22d3 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2262 : dd2102 > cmp fASL,x ;test flags +22d5 : dd3002 > cmp fASL,x ;test flags > trap_ne ; -2265 : d0fe > bne * ;failed not equal (non zero) +22d8 : d0fe > bne * ;failed not equal (non zero) > -2267 : ca dex -2268 : 10e8 bpl tasl -226a : a203 ldx #3 -226c : tasl1 +22da : ca dex +22db : 10e8 bpl tasl +22dd : a203 ldx #3 +22df : tasl1 set_ax zp1,$ff > load_flag $ff -226c : a9ff > lda #$ff ;allow test to change I-flag (no mask) +22df : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -226e : 48 > pha ;use stack to load status -226f : b513 > lda zp1,x ;precharge accu -2271 : 28 > plp +22e1 : 48 > pha ;use stack to load status +22e2 : b513 > lda zp1,x ;precharge accu +22e4 : 28 > plp -2272 : 0a asl a +22e5 : 0a asl a tst_ax rASL,fASL,$ff-fnzc -2273 : 08 > php ;save flags -2274 : dd1102 > cmp rASL,x ;test result +22e6 : 08 > php ;save flags +22e7 : dd2002 > cmp rASL,x ;test result > trap_ne -2277 : d0fe > bne * ;failed not equal (non zero) +22ea : d0fe > bne * ;failed not equal (non zero) > -2279 : 68 > pla ;load status +22ec : 68 > pla ;load status > eor_flag $ff-fnzc -227a : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +22ed : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -227c : dd2102 > cmp fASL,x ;test flags +22ef : dd3002 > cmp fASL,x ;test flags > trap_ne ; -227f : d0fe > bne * ;failed not equal (non zero) +22f2 : d0fe > bne * ;failed not equal (non zero) > -2281 : ca dex -2282 : 10e8 bpl tasl1 +22f4 : ca dex +22f5 : 10e8 bpl tasl1 -2284 : a203 ldx #3 -2286 : tlsr +22f7 : a203 ldx #3 +22f9 : tlsr set_ax zp1,0 > load_flag 0 -2286 : a900 > lda #0 ;allow test to change I-flag (no mask) +22f9 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2288 : 48 > pha ;use stack to load status -2289 : b513 > lda zp1,x ;precharge accu -228b : 28 > plp +22fb : 48 > pha ;use stack to load status +22fc : b513 > lda zp1,x ;precharge accu +22fe : 28 > plp -228c : 4a lsr a +22ff : 4a lsr a tst_ax rLSR,fLSR,0 -228d : 08 > php ;save flags -228e : dd1902 > cmp rLSR,x ;test result +2300 : 08 > php ;save flags +2301 : dd2802 > cmp rLSR,x ;test result > trap_ne -2291 : d0fe > bne * ;failed not equal (non zero) +2304 : d0fe > bne * ;failed not equal (non zero) > -2293 : 68 > pla ;load status +2306 : 68 > pla ;load status > eor_flag 0 -2294 : 4930 > eor #0|fao ;invert expected flags + always on bits +2307 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2296 : dd2902 > cmp fLSR,x ;test flags +2309 : dd3802 > cmp fLSR,x ;test flags > trap_ne ; -2299 : d0fe > bne * ;failed not equal (non zero) +230c : d0fe > bne * ;failed not equal (non zero) > -229b : ca dex -229c : 10e8 bpl tlsr -229e : a203 ldx #3 -22a0 : tlsr1 +230e : ca dex +230f : 10e8 bpl tlsr +2311 : a203 ldx #3 +2313 : tlsr1 set_ax zp1,$ff > load_flag $ff -22a0 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2313 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -22a2 : 48 > pha ;use stack to load status -22a3 : b513 > lda zp1,x ;precharge accu -22a5 : 28 > plp +2315 : 48 > pha ;use stack to load status +2316 : b513 > lda zp1,x ;precharge accu +2318 : 28 > plp -22a6 : 4a lsr a +2319 : 4a lsr a tst_ax rLSR,fLSR,$ff-fnzc -22a7 : 08 > php ;save flags -22a8 : dd1902 > cmp rLSR,x ;test result +231a : 08 > php ;save flags +231b : dd2802 > cmp rLSR,x ;test result > trap_ne -22ab : d0fe > bne * ;failed not equal (non zero) +231e : d0fe > bne * ;failed not equal (non zero) > -22ad : 68 > pla ;load status +2320 : 68 > pla ;load status > eor_flag $ff-fnzc -22ae : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +2321 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -22b0 : dd2902 > cmp fLSR,x ;test flags +2323 : dd3802 > cmp fLSR,x ;test flags > trap_ne ; -22b3 : d0fe > bne * ;failed not equal (non zero) +2326 : d0fe > bne * ;failed not equal (non zero) > -22b5 : ca dex -22b6 : 10e8 bpl tlsr1 +2328 : ca dex +2329 : 10e8 bpl tlsr1 -22b8 : a203 ldx #3 -22ba : trol +232b : a203 ldx #3 +232d : trol set_ax zp1,0 > load_flag 0 -22ba : a900 > lda #0 ;allow test to change I-flag (no mask) +232d : a900 > lda #0 ;allow test to change I-flag (no mask) > -22bc : 48 > pha ;use stack to load status -22bd : b513 > lda zp1,x ;precharge accu -22bf : 28 > plp +232f : 48 > pha ;use stack to load status +2330 : b513 > lda zp1,x ;precharge accu +2332 : 28 > plp -22c0 : 2a rol a +2333 : 2a rol a tst_ax rROL,fROL,0 -22c1 : 08 > php ;save flags -22c2 : dd1102 > cmp rROL,x ;test result +2334 : 08 > php ;save flags +2335 : dd2002 > cmp rROL,x ;test result > trap_ne -22c5 : d0fe > bne * ;failed not equal (non zero) +2338 : d0fe > bne * ;failed not equal (non zero) > -22c7 : 68 > pla ;load status +233a : 68 > pla ;load status > eor_flag 0 -22c8 : 4930 > eor #0|fao ;invert expected flags + always on bits +233b : 4930 > eor #0|fao ;invert expected flags + always on bits > -22ca : dd2102 > cmp fROL,x ;test flags +233d : dd3002 > cmp fROL,x ;test flags > trap_ne ; -22cd : d0fe > bne * ;failed not equal (non zero) +2340 : d0fe > bne * ;failed not equal (non zero) > -22cf : ca dex -22d0 : 10e8 bpl trol -22d2 : a203 ldx #3 -22d4 : trol1 +2342 : ca dex +2343 : 10e8 bpl trol +2345 : a203 ldx #3 +2347 : trol1 set_ax zp1,$ff-fc > load_flag $ff-fc -22d4 : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) +2347 : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) > -22d6 : 48 > pha ;use stack to load status -22d7 : b513 > lda zp1,x ;precharge accu -22d9 : 28 > plp +2349 : 48 > pha ;use stack to load status +234a : b513 > lda zp1,x ;precharge accu +234c : 28 > plp -22da : 2a rol a +234d : 2a rol a tst_ax rROL,fROL,$ff-fnzc -22db : 08 > php ;save flags -22dc : dd1102 > cmp rROL,x ;test result +234e : 08 > php ;save flags +234f : dd2002 > cmp rROL,x ;test result > trap_ne -22df : d0fe > bne * ;failed not equal (non zero) +2352 : d0fe > bne * ;failed not equal (non zero) > -22e1 : 68 > pla ;load status +2354 : 68 > pla ;load status > eor_flag $ff-fnzc -22e2 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +2355 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -22e4 : dd2102 > cmp fROL,x ;test flags +2357 : dd3002 > cmp fROL,x ;test flags > trap_ne ; -22e7 : d0fe > bne * ;failed not equal (non zero) +235a : d0fe > bne * ;failed not equal (non zero) > -22e9 : ca dex -22ea : 10e8 bpl trol1 +235c : ca dex +235d : 10e8 bpl trol1 -22ec : a203 ldx #3 -22ee : trolc +235f : a203 ldx #3 +2361 : trolc set_ax zp1,fc > load_flag fc -22ee : a901 > lda #fc ;allow test to change I-flag (no mask) +2361 : a901 > lda #fc ;allow test to change I-flag (no mask) > -22f0 : 48 > pha ;use stack to load status -22f1 : b513 > lda zp1,x ;precharge accu -22f3 : 28 > plp +2363 : 48 > pha ;use stack to load status +2364 : b513 > lda zp1,x ;precharge accu +2366 : 28 > plp -22f4 : 2a rol a +2367 : 2a rol a tst_ax rROLc,fROLc,0 -22f5 : 08 > php ;save flags -22f6 : dd1502 > cmp rROLc,x ;test result +2368 : 08 > php ;save flags +2369 : dd2402 > cmp rROLc,x ;test result > trap_ne -22f9 : d0fe > bne * ;failed not equal (non zero) +236c : d0fe > bne * ;failed not equal (non zero) > -22fb : 68 > pla ;load status +236e : 68 > pla ;load status > eor_flag 0 -22fc : 4930 > eor #0|fao ;invert expected flags + always on bits +236f : 4930 > eor #0|fao ;invert expected flags + always on bits > -22fe : dd2502 > cmp fROLc,x ;test flags +2371 : dd3402 > cmp fROLc,x ;test flags > trap_ne ; -2301 : d0fe > bne * ;failed not equal (non zero) +2374 : d0fe > bne * ;failed not equal (non zero) > -2303 : ca dex -2304 : 10e8 bpl trolc -2306 : a203 ldx #3 -2308 : trolc1 +2376 : ca dex +2377 : 10e8 bpl trolc +2379 : a203 ldx #3 +237b : trolc1 set_ax zp1,$ff > load_flag $ff -2308 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +237b : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -230a : 48 > pha ;use stack to load status -230b : b513 > lda zp1,x ;precharge accu -230d : 28 > plp +237d : 48 > pha ;use stack to load status +237e : b513 > lda zp1,x ;precharge accu +2380 : 28 > plp -230e : 2a rol a +2381 : 2a rol a tst_ax rROLc,fROLc,$ff-fnzc -230f : 08 > php ;save flags -2310 : dd1502 > cmp rROLc,x ;test result +2382 : 08 > php ;save flags +2383 : dd2402 > cmp rROLc,x ;test result > trap_ne -2313 : d0fe > bne * ;failed not equal (non zero) +2386 : d0fe > bne * ;failed not equal (non zero) > -2315 : 68 > pla ;load status +2388 : 68 > pla ;load status > eor_flag $ff-fnzc -2316 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +2389 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -2318 : dd2502 > cmp fROLc,x ;test flags +238b : dd3402 > cmp fROLc,x ;test flags > trap_ne ; -231b : d0fe > bne * ;failed not equal (non zero) +238e : d0fe > bne * ;failed not equal (non zero) > -231d : ca dex -231e : 10e8 bpl trolc1 +2390 : ca dex +2391 : 10e8 bpl trolc1 -2320 : a203 ldx #3 -2322 : tror +2393 : a203 ldx #3 +2395 : tror set_ax zp1,0 > load_flag 0 -2322 : a900 > lda #0 ;allow test to change I-flag (no mask) +2395 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2324 : 48 > pha ;use stack to load status -2325 : b513 > lda zp1,x ;precharge accu -2327 : 28 > plp +2397 : 48 > pha ;use stack to load status +2398 : b513 > lda zp1,x ;precharge accu +239a : 28 > plp -2328 : 6a ror a +239b : 6a ror a tst_ax rROR,fROR,0 -2329 : 08 > php ;save flags -232a : dd1902 > cmp rROR,x ;test result +239c : 08 > php ;save flags +239d : dd2802 > cmp rROR,x ;test result > trap_ne -232d : d0fe > bne * ;failed not equal (non zero) +23a0 : d0fe > bne * ;failed not equal (non zero) > -232f : 68 > pla ;load status +23a2 : 68 > pla ;load status > eor_flag 0 -2330 : 4930 > eor #0|fao ;invert expected flags + always on bits +23a3 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2332 : dd2902 > cmp fROR,x ;test flags +23a5 : dd3802 > cmp fROR,x ;test flags > trap_ne ; -2335 : d0fe > bne * ;failed not equal (non zero) +23a8 : d0fe > bne * ;failed not equal (non zero) > -2337 : ca dex -2338 : 10e8 bpl tror -233a : a203 ldx #3 -233c : tror1 +23aa : ca dex +23ab : 10e8 bpl tror +23ad : a203 ldx #3 +23af : tror1 set_ax zp1,$ff-fc > load_flag $ff-fc -233c : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) +23af : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) > -233e : 48 > pha ;use stack to load status -233f : b513 > lda zp1,x ;precharge accu -2341 : 28 > plp +23b1 : 48 > pha ;use stack to load status +23b2 : b513 > lda zp1,x ;precharge accu +23b4 : 28 > plp -2342 : 6a ror a +23b5 : 6a ror a tst_ax rROR,fROR,$ff-fnzc -2343 : 08 > php ;save flags -2344 : dd1902 > cmp rROR,x ;test result +23b6 : 08 > php ;save flags +23b7 : dd2802 > cmp rROR,x ;test result > trap_ne -2347 : d0fe > bne * ;failed not equal (non zero) +23ba : d0fe > bne * ;failed not equal (non zero) > -2349 : 68 > pla ;load status +23bc : 68 > pla ;load status > eor_flag $ff-fnzc -234a : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +23bd : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -234c : dd2902 > cmp fROR,x ;test flags +23bf : dd3802 > cmp fROR,x ;test flags > trap_ne ; -234f : d0fe > bne * ;failed not equal (non zero) +23c2 : d0fe > bne * ;failed not equal (non zero) > -2351 : ca dex -2352 : 10e8 bpl tror1 +23c4 : ca dex +23c5 : 10e8 bpl tror1 -2354 : a203 ldx #3 -2356 : trorc +23c7 : a203 ldx #3 +23c9 : trorc set_ax zp1,fc > load_flag fc -2356 : a901 > lda #fc ;allow test to change I-flag (no mask) +23c9 : a901 > lda #fc ;allow test to change I-flag (no mask) > -2358 : 48 > pha ;use stack to load status -2359 : b513 > lda zp1,x ;precharge accu -235b : 28 > plp +23cb : 48 > pha ;use stack to load status +23cc : b513 > lda zp1,x ;precharge accu +23ce : 28 > plp -235c : 6a ror a +23cf : 6a ror a tst_ax rRORc,fRORc,0 -235d : 08 > php ;save flags -235e : dd1d02 > cmp rRORc,x ;test result +23d0 : 08 > php ;save flags +23d1 : dd2c02 > cmp rRORc,x ;test result > trap_ne -2361 : d0fe > bne * ;failed not equal (non zero) +23d4 : d0fe > bne * ;failed not equal (non zero) > -2363 : 68 > pla ;load status +23d6 : 68 > pla ;load status > eor_flag 0 -2364 : 4930 > eor #0|fao ;invert expected flags + always on bits +23d7 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2366 : dd2d02 > cmp fRORc,x ;test flags +23d9 : dd3c02 > cmp fRORc,x ;test flags > trap_ne ; -2369 : d0fe > bne * ;failed not equal (non zero) +23dc : d0fe > bne * ;failed not equal (non zero) > -236b : ca dex -236c : 10e8 bpl trorc -236e : a203 ldx #3 -2370 : trorc1 +23de : ca dex +23df : 10e8 bpl trorc +23e1 : a203 ldx #3 +23e3 : trorc1 set_ax zp1,$ff > load_flag $ff -2370 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +23e3 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2372 : 48 > pha ;use stack to load status -2373 : b513 > lda zp1,x ;precharge accu -2375 : 28 > plp +23e5 : 48 > pha ;use stack to load status +23e6 : b513 > lda zp1,x ;precharge accu +23e8 : 28 > plp -2376 : 6a ror a +23e9 : 6a ror a tst_ax rRORc,fRORc,$ff-fnzc -2377 : 08 > php ;save flags -2378 : dd1d02 > cmp rRORc,x ;test result +23ea : 08 > php ;save flags +23eb : dd2c02 > cmp rRORc,x ;test result > trap_ne -237b : d0fe > bne * ;failed not equal (non zero) +23ee : d0fe > bne * ;failed not equal (non zero) > -237d : 68 > pla ;load status +23f0 : 68 > pla ;load status > eor_flag $ff-fnzc -237e : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +23f1 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -2380 : dd2d02 > cmp fRORc,x ;test flags +23f3 : dd3c02 > cmp fRORc,x ;test flags > trap_ne ; -2383 : d0fe > bne * ;failed not equal (non zero) +23f6 : d0fe > bne * ;failed not equal (non zero) > -2385 : ca dex -2386 : 10e8 bpl trorc1 +23f8 : ca dex +23f9 : 10e8 bpl trorc1 next_test -2388 : ad0002 > lda test_case ;previous test -238b : c91d > cmp #test_num +23fb : ad0002 > lda test_case ;previous test +23fe : c91d > cmp #test_num > trap_ne ;test is out of sequence -238d : d0fe > bne * ;failed not equal (non zero) +2400 : d0fe > bne * ;failed not equal (non zero) > 001e = >test_num = test_num + 1 -238f : a91e > lda #test_num ;*** next tests' number -2391 : 8d0002 > sta test_case +2402 : a91e > lda #test_num ;*** next tests' number +2404 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; shifts - zeropage -2394 : a203 ldx #3 -2396 : tasl2 +2407 : a203 ldx #3 +2409 : tasl2 set_z zp1,0 > load_flag 0 -2396 : a900 > lda #0 ;allow test to change I-flag (no mask) +2409 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2398 : 48 > pha ;use stack to load status -2399 : b513 > lda zp1,x ;load to zeropage -239b : 850c > sta zpt -239d : 28 > plp +240b : 48 > pha ;use stack to load status +240c : b513 > lda zp1,x ;load to zeropage +240e : 850c > sta zpt +2410 : 28 > plp -239e : 060c asl zpt +2411 : 060c asl zpt tst_z rASL,fASL,0 -23a0 : 08 > php ;save flags -23a1 : a50c > lda zpt -23a3 : dd1102 > cmp rASL,x ;test result +2413 : 08 > php ;save flags +2414 : a50c > lda zpt +2416 : dd2002 > cmp rASL,x ;test result > trap_ne -23a6 : d0fe > bne * ;failed not equal (non zero) +2419 : d0fe > bne * ;failed not equal (non zero) > -23a8 : 68 > pla ;load status +241b : 68 > pla ;load status > eor_flag 0 -23a9 : 4930 > eor #0|fao ;invert expected flags + always on bits +241c : 4930 > eor #0|fao ;invert expected flags + always on bits > -23ab : dd2102 > cmp fASL,x ;test flags +241e : dd3002 > cmp fASL,x ;test flags > trap_ne -23ae : d0fe > bne * ;failed not equal (non zero) +2421 : d0fe > bne * ;failed not equal (non zero) > -23b0 : ca dex -23b1 : 10e3 bpl tasl2 -23b3 : a203 ldx #3 -23b5 : tasl3 +2423 : ca dex +2424 : 10e3 bpl tasl2 +2426 : a203 ldx #3 +2428 : tasl3 set_z zp1,$ff > load_flag $ff -23b5 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2428 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -23b7 : 48 > pha ;use stack to load status -23b8 : b513 > lda zp1,x ;load to zeropage -23ba : 850c > sta zpt -23bc : 28 > plp +242a : 48 > pha ;use stack to load status +242b : b513 > lda zp1,x ;load to zeropage +242d : 850c > sta zpt +242f : 28 > plp -23bd : 060c asl zpt +2430 : 060c asl zpt tst_z rASL,fASL,$ff-fnzc -23bf : 08 > php ;save flags -23c0 : a50c > lda zpt -23c2 : dd1102 > cmp rASL,x ;test result +2432 : 08 > php ;save flags +2433 : a50c > lda zpt +2435 : dd2002 > cmp rASL,x ;test result > trap_ne -23c5 : d0fe > bne * ;failed not equal (non zero) +2438 : d0fe > bne * ;failed not equal (non zero) > -23c7 : 68 > pla ;load status +243a : 68 > pla ;load status > eor_flag $ff-fnzc -23c8 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +243b : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -23ca : dd2102 > cmp fASL,x ;test flags +243d : dd3002 > cmp fASL,x ;test flags > trap_ne -23cd : d0fe > bne * ;failed not equal (non zero) +2440 : d0fe > bne * ;failed not equal (non zero) > -23cf : ca dex -23d0 : 10e3 bpl tasl3 +2442 : ca dex +2443 : 10e3 bpl tasl3 -23d2 : a203 ldx #3 -23d4 : tlsr2 +2445 : a203 ldx #3 +2447 : tlsr2 set_z zp1,0 > load_flag 0 -23d4 : a900 > lda #0 ;allow test to change I-flag (no mask) +2447 : a900 > lda #0 ;allow test to change I-flag (no mask) > -23d6 : 48 > pha ;use stack to load status -23d7 : b513 > lda zp1,x ;load to zeropage -23d9 : 850c > sta zpt -23db : 28 > plp +2449 : 48 > pha ;use stack to load status +244a : b513 > lda zp1,x ;load to zeropage +244c : 850c > sta zpt +244e : 28 > plp -23dc : 460c lsr zpt +244f : 460c lsr zpt tst_z rLSR,fLSR,0 -23de : 08 > php ;save flags -23df : a50c > lda zpt -23e1 : dd1902 > cmp rLSR,x ;test result +2451 : 08 > php ;save flags +2452 : a50c > lda zpt +2454 : dd2802 > cmp rLSR,x ;test result > trap_ne -23e4 : d0fe > bne * ;failed not equal (non zero) +2457 : d0fe > bne * ;failed not equal (non zero) > -23e6 : 68 > pla ;load status +2459 : 68 > pla ;load status > eor_flag 0 -23e7 : 4930 > eor #0|fao ;invert expected flags + always on bits +245a : 4930 > eor #0|fao ;invert expected flags + always on bits > -23e9 : dd2902 > cmp fLSR,x ;test flags +245c : dd3802 > cmp fLSR,x ;test flags > trap_ne -23ec : d0fe > bne * ;failed not equal (non zero) +245f : d0fe > bne * ;failed not equal (non zero) > -23ee : ca dex -23ef : 10e3 bpl tlsr2 -23f1 : a203 ldx #3 -23f3 : tlsr3 +2461 : ca dex +2462 : 10e3 bpl tlsr2 +2464 : a203 ldx #3 +2466 : tlsr3 set_z zp1,$ff > load_flag $ff -23f3 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2466 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -23f5 : 48 > pha ;use stack to load status -23f6 : b513 > lda zp1,x ;load to zeropage -23f8 : 850c > sta zpt -23fa : 28 > plp +2468 : 48 > pha ;use stack to load status +2469 : b513 > lda zp1,x ;load to zeropage +246b : 850c > sta zpt +246d : 28 > plp -23fb : 460c lsr zpt +246e : 460c lsr zpt tst_z rLSR,fLSR,$ff-fnzc -23fd : 08 > php ;save flags -23fe : a50c > lda zpt -2400 : dd1902 > cmp rLSR,x ;test result +2470 : 08 > php ;save flags +2471 : a50c > lda zpt +2473 : dd2802 > cmp rLSR,x ;test result > trap_ne -2403 : d0fe > bne * ;failed not equal (non zero) +2476 : d0fe > bne * ;failed not equal (non zero) > -2405 : 68 > pla ;load status +2478 : 68 > pla ;load status > eor_flag $ff-fnzc -2406 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +2479 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -2408 : dd2902 > cmp fLSR,x ;test flags +247b : dd3802 > cmp fLSR,x ;test flags > trap_ne -240b : d0fe > bne * ;failed not equal (non zero) +247e : d0fe > bne * ;failed not equal (non zero) > -240d : ca dex -240e : 10e3 bpl tlsr3 +2480 : ca dex +2481 : 10e3 bpl tlsr3 -2410 : a203 ldx #3 -2412 : trol2 +2483 : a203 ldx #3 +2485 : trol2 set_z zp1,0 > load_flag 0 -2412 : a900 > lda #0 ;allow test to change I-flag (no mask) +2485 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2414 : 48 > pha ;use stack to load status -2415 : b513 > lda zp1,x ;load to zeropage -2417 : 850c > sta zpt -2419 : 28 > plp +2487 : 48 > pha ;use stack to load status +2488 : b513 > lda zp1,x ;load to zeropage +248a : 850c > sta zpt +248c : 28 > plp -241a : 260c rol zpt +248d : 260c rol zpt tst_z rROL,fROL,0 -241c : 08 > php ;save flags -241d : a50c > lda zpt -241f : dd1102 > cmp rROL,x ;test result +248f : 08 > php ;save flags +2490 : a50c > lda zpt +2492 : dd2002 > cmp rROL,x ;test result > trap_ne -2422 : d0fe > bne * ;failed not equal (non zero) +2495 : d0fe > bne * ;failed not equal (non zero) > -2424 : 68 > pla ;load status +2497 : 68 > pla ;load status > eor_flag 0 -2425 : 4930 > eor #0|fao ;invert expected flags + always on bits +2498 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2427 : dd2102 > cmp fROL,x ;test flags +249a : dd3002 > cmp fROL,x ;test flags > trap_ne -242a : d0fe > bne * ;failed not equal (non zero) +249d : d0fe > bne * ;failed not equal (non zero) > -242c : ca dex -242d : 10e3 bpl trol2 -242f : a203 ldx #3 -2431 : trol3 +249f : ca dex +24a0 : 10e3 bpl trol2 +24a2 : a203 ldx #3 +24a4 : trol3 set_z zp1,$ff-fc > load_flag $ff-fc -2431 : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) +24a4 : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) > -2433 : 48 > pha ;use stack to load status -2434 : b513 > lda zp1,x ;load to zeropage -2436 : 850c > sta zpt -2438 : 28 > plp +24a6 : 48 > pha ;use stack to load status +24a7 : b513 > lda zp1,x ;load to zeropage +24a9 : 850c > sta zpt +24ab : 28 > plp -2439 : 260c rol zpt +24ac : 260c rol zpt tst_z rROL,fROL,$ff-fnzc -243b : 08 > php ;save flags -243c : a50c > lda zpt -243e : dd1102 > cmp rROL,x ;test result +24ae : 08 > php ;save flags +24af : a50c > lda zpt +24b1 : dd2002 > cmp rROL,x ;test result > trap_ne -2441 : d0fe > bne * ;failed not equal (non zero) +24b4 : d0fe > bne * ;failed not equal (non zero) > -2443 : 68 > pla ;load status +24b6 : 68 > pla ;load status > eor_flag $ff-fnzc -2444 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +24b7 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -2446 : dd2102 > cmp fROL,x ;test flags +24b9 : dd3002 > cmp fROL,x ;test flags > trap_ne -2449 : d0fe > bne * ;failed not equal (non zero) +24bc : d0fe > bne * ;failed not equal (non zero) > -244b : ca dex -244c : 10e3 bpl trol3 +24be : ca dex +24bf : 10e3 bpl trol3 -244e : a203 ldx #3 -2450 : trolc2 +24c1 : a203 ldx #3 +24c3 : trolc2 set_z zp1,fc > load_flag fc -2450 : a901 > lda #fc ;allow test to change I-flag (no mask) +24c3 : a901 > lda #fc ;allow test to change I-flag (no mask) > -2452 : 48 > pha ;use stack to load status -2453 : b513 > lda zp1,x ;load to zeropage -2455 : 850c > sta zpt -2457 : 28 > plp +24c5 : 48 > pha ;use stack to load status +24c6 : b513 > lda zp1,x ;load to zeropage +24c8 : 850c > sta zpt +24ca : 28 > plp -2458 : 260c rol zpt +24cb : 260c rol zpt tst_z rROLc,fROLc,0 -245a : 08 > php ;save flags -245b : a50c > lda zpt -245d : dd1502 > cmp rROLc,x ;test result +24cd : 08 > php ;save flags +24ce : a50c > lda zpt +24d0 : dd2402 > cmp rROLc,x ;test result > trap_ne -2460 : d0fe > bne * ;failed not equal (non zero) +24d3 : d0fe > bne * ;failed not equal (non zero) > -2462 : 68 > pla ;load status +24d5 : 68 > pla ;load status > eor_flag 0 -2463 : 4930 > eor #0|fao ;invert expected flags + always on bits +24d6 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2465 : dd2502 > cmp fROLc,x ;test flags +24d8 : dd3402 > cmp fROLc,x ;test flags > trap_ne -2468 : d0fe > bne * ;failed not equal (non zero) +24db : d0fe > bne * ;failed not equal (non zero) > -246a : ca dex -246b : 10e3 bpl trolc2 -246d : a203 ldx #3 -246f : trolc3 +24dd : ca dex +24de : 10e3 bpl trolc2 +24e0 : a203 ldx #3 +24e2 : trolc3 set_z zp1,$ff > load_flag $ff -246f : a9ff > lda #$ff ;allow test to change I-flag (no mask) +24e2 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2471 : 48 > pha ;use stack to load status -2472 : b513 > lda zp1,x ;load to zeropage -2474 : 850c > sta zpt -2476 : 28 > plp +24e4 : 48 > pha ;use stack to load status +24e5 : b513 > lda zp1,x ;load to zeropage +24e7 : 850c > sta zpt +24e9 : 28 > plp -2477 : 260c rol zpt +24ea : 260c rol zpt tst_z rROLc,fROLc,$ff-fnzc -2479 : 08 > php ;save flags -247a : a50c > lda zpt -247c : dd1502 > cmp rROLc,x ;test result +24ec : 08 > php ;save flags +24ed : a50c > lda zpt +24ef : dd2402 > cmp rROLc,x ;test result > trap_ne -247f : d0fe > bne * ;failed not equal (non zero) +24f2 : d0fe > bne * ;failed not equal (non zero) > -2481 : 68 > pla ;load status +24f4 : 68 > pla ;load status > eor_flag $ff-fnzc -2482 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +24f5 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -2484 : dd2502 > cmp fROLc,x ;test flags +24f7 : dd3402 > cmp fROLc,x ;test flags > trap_ne -2487 : d0fe > bne * ;failed not equal (non zero) +24fa : d0fe > bne * ;failed not equal (non zero) > -2489 : ca dex -248a : 10e3 bpl trolc3 +24fc : ca dex +24fd : 10e3 bpl trolc3 -248c : a203 ldx #3 -248e : tror2 +24ff : a203 ldx #3 +2501 : tror2 set_z zp1,0 > load_flag 0 -248e : a900 > lda #0 ;allow test to change I-flag (no mask) +2501 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2490 : 48 > pha ;use stack to load status -2491 : b513 > lda zp1,x ;load to zeropage -2493 : 850c > sta zpt -2495 : 28 > plp +2503 : 48 > pha ;use stack to load status +2504 : b513 > lda zp1,x ;load to zeropage +2506 : 850c > sta zpt +2508 : 28 > plp -2496 : 660c ror zpt +2509 : 660c ror zpt tst_z rROR,fROR,0 -2498 : 08 > php ;save flags -2499 : a50c > lda zpt -249b : dd1902 > cmp rROR,x ;test result +250b : 08 > php ;save flags +250c : a50c > lda zpt +250e : dd2802 > cmp rROR,x ;test result > trap_ne -249e : d0fe > bne * ;failed not equal (non zero) +2511 : d0fe > bne * ;failed not equal (non zero) > -24a0 : 68 > pla ;load status +2513 : 68 > pla ;load status > eor_flag 0 -24a1 : 4930 > eor #0|fao ;invert expected flags + always on bits +2514 : 4930 > eor #0|fao ;invert expected flags + always on bits > -24a3 : dd2902 > cmp fROR,x ;test flags +2516 : dd3802 > cmp fROR,x ;test flags > trap_ne -24a6 : d0fe > bne * ;failed not equal (non zero) +2519 : d0fe > bne * ;failed not equal (non zero) > -24a8 : ca dex -24a9 : 10e3 bpl tror2 -24ab : a203 ldx #3 -24ad : tror3 +251b : ca dex +251c : 10e3 bpl tror2 +251e : a203 ldx #3 +2520 : tror3 set_z zp1,$ff-fc > load_flag $ff-fc -24ad : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) +2520 : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) > -24af : 48 > pha ;use stack to load status -24b0 : b513 > lda zp1,x ;load to zeropage -24b2 : 850c > sta zpt -24b4 : 28 > plp +2522 : 48 > pha ;use stack to load status +2523 : b513 > lda zp1,x ;load to zeropage +2525 : 850c > sta zpt +2527 : 28 > plp -24b5 : 660c ror zpt +2528 : 660c ror zpt tst_z rROR,fROR,$ff-fnzc -24b7 : 08 > php ;save flags -24b8 : a50c > lda zpt -24ba : dd1902 > cmp rROR,x ;test result +252a : 08 > php ;save flags +252b : a50c > lda zpt +252d : dd2802 > cmp rROR,x ;test result > trap_ne -24bd : d0fe > bne * ;failed not equal (non zero) +2530 : d0fe > bne * ;failed not equal (non zero) > -24bf : 68 > pla ;load status +2532 : 68 > pla ;load status > eor_flag $ff-fnzc -24c0 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +2533 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -24c2 : dd2902 > cmp fROR,x ;test flags +2535 : dd3802 > cmp fROR,x ;test flags > trap_ne -24c5 : d0fe > bne * ;failed not equal (non zero) +2538 : d0fe > bne * ;failed not equal (non zero) > -24c7 : ca dex -24c8 : 10e3 bpl tror3 +253a : ca dex +253b : 10e3 bpl tror3 -24ca : a203 ldx #3 -24cc : trorc2 +253d : a203 ldx #3 +253f : trorc2 set_z zp1,fc > load_flag fc -24cc : a901 > lda #fc ;allow test to change I-flag (no mask) +253f : a901 > lda #fc ;allow test to change I-flag (no mask) > -24ce : 48 > pha ;use stack to load status -24cf : b513 > lda zp1,x ;load to zeropage -24d1 : 850c > sta zpt -24d3 : 28 > plp +2541 : 48 > pha ;use stack to load status +2542 : b513 > lda zp1,x ;load to zeropage +2544 : 850c > sta zpt +2546 : 28 > plp -24d4 : 660c ror zpt +2547 : 660c ror zpt tst_z rRORc,fRORc,0 -24d6 : 08 > php ;save flags -24d7 : a50c > lda zpt -24d9 : dd1d02 > cmp rRORc,x ;test result +2549 : 08 > php ;save flags +254a : a50c > lda zpt +254c : dd2c02 > cmp rRORc,x ;test result > trap_ne -24dc : d0fe > bne * ;failed not equal (non zero) +254f : d0fe > bne * ;failed not equal (non zero) > -24de : 68 > pla ;load status +2551 : 68 > pla ;load status > eor_flag 0 -24df : 4930 > eor #0|fao ;invert expected flags + always on bits +2552 : 4930 > eor #0|fao ;invert expected flags + always on bits > -24e1 : dd2d02 > cmp fRORc,x ;test flags +2554 : dd3c02 > cmp fRORc,x ;test flags > trap_ne -24e4 : d0fe > bne * ;failed not equal (non zero) +2557 : d0fe > bne * ;failed not equal (non zero) > -24e6 : ca dex -24e7 : 10e3 bpl trorc2 -24e9 : a203 ldx #3 -24eb : trorc3 +2559 : ca dex +255a : 10e3 bpl trorc2 +255c : a203 ldx #3 +255e : trorc3 set_z zp1,$ff > load_flag $ff -24eb : a9ff > lda #$ff ;allow test to change I-flag (no mask) +255e : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -24ed : 48 > pha ;use stack to load status -24ee : b513 > lda zp1,x ;load to zeropage -24f0 : 850c > sta zpt -24f2 : 28 > plp +2560 : 48 > pha ;use stack to load status +2561 : b513 > lda zp1,x ;load to zeropage +2563 : 850c > sta zpt +2565 : 28 > plp -24f3 : 660c ror zpt +2566 : 660c ror zpt tst_z rRORc,fRORc,$ff-fnzc -24f5 : 08 > php ;save flags -24f6 : a50c > lda zpt -24f8 : dd1d02 > cmp rRORc,x ;test result +2568 : 08 > php ;save flags +2569 : a50c > lda zpt +256b : dd2c02 > cmp rRORc,x ;test result > trap_ne -24fb : d0fe > bne * ;failed not equal (non zero) +256e : d0fe > bne * ;failed not equal (non zero) > -24fd : 68 > pla ;load status +2570 : 68 > pla ;load status > eor_flag $ff-fnzc -24fe : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +2571 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -2500 : dd2d02 > cmp fRORc,x ;test flags +2573 : dd3c02 > cmp fRORc,x ;test flags > trap_ne -2503 : d0fe > bne * ;failed not equal (non zero) +2576 : d0fe > bne * ;failed not equal (non zero) > -2505 : ca dex -2506 : 10e3 bpl trorc3 +2578 : ca dex +2579 : 10e3 bpl trorc3 next_test -2508 : ad0002 > lda test_case ;previous test -250b : c91e > cmp #test_num +257b : ad0002 > lda test_case ;previous test +257e : c91e > cmp #test_num > trap_ne ;test is out of sequence -250d : d0fe > bne * ;failed not equal (non zero) +2580 : d0fe > bne * ;failed not equal (non zero) > 001f = >test_num = test_num + 1 -250f : a91f > lda #test_num ;*** next tests' number -2511 : 8d0002 > sta test_case +2582 : a91f > lda #test_num ;*** next tests' number +2584 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; shifts - absolute -2514 : a203 ldx #3 -2516 : tasl4 +2587 : a203 ldx #3 +2589 : tasl4 set_abs zp1,0 > load_flag 0 -2516 : a900 > lda #0 ;allow test to change I-flag (no mask) +2589 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2518 : 48 > pha ;use stack to load status -2519 : b513 > lda zp1,x ;load to memory -251b : 8d0302 > sta abst -251e : 28 > plp +258b : 48 > pha ;use stack to load status +258c : b513 > lda zp1,x ;load to memory +258e : 8d0302 > sta abst +2591 : 28 > plp -251f : 0e0302 asl abst +2592 : 0e0302 asl abst tst_abs rASL,fASL,0 -2522 : 08 > php ;save flags -2523 : ad0302 > lda abst -2526 : dd1102 > cmp rASL,x ;test result +2595 : 08 > php ;save flags +2596 : ad0302 > lda abst +2599 : dd2002 > cmp rASL,x ;test result > trap_ne -2529 : d0fe > bne * ;failed not equal (non zero) +259c : d0fe > bne * ;failed not equal (non zero) > -252b : 68 > pla ;load status +259e : 68 > pla ;load status > eor_flag 0 -252c : 4930 > eor #0|fao ;invert expected flags + always on bits +259f : 4930 > eor #0|fao ;invert expected flags + always on bits > -252e : dd2102 > cmp fASL,x ;test flags +25a1 : dd3002 > cmp fASL,x ;test flags > trap_ne -2531 : d0fe > bne * ;failed not equal (non zero) +25a4 : d0fe > bne * ;failed not equal (non zero) > -2533 : ca dex -2534 : 10e0 bpl tasl4 -2536 : a203 ldx #3 -2538 : tasl5 +25a6 : ca dex +25a7 : 10e0 bpl tasl4 +25a9 : a203 ldx #3 +25ab : tasl5 set_abs zp1,$ff > load_flag $ff -2538 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +25ab : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -253a : 48 > pha ;use stack to load status -253b : b513 > lda zp1,x ;load to memory -253d : 8d0302 > sta abst -2540 : 28 > plp +25ad : 48 > pha ;use stack to load status +25ae : b513 > lda zp1,x ;load to memory +25b0 : 8d0302 > sta abst +25b3 : 28 > plp -2541 : 0e0302 asl abst +25b4 : 0e0302 asl abst tst_abs rASL,fASL,$ff-fnzc -2544 : 08 > php ;save flags -2545 : ad0302 > lda abst -2548 : dd1102 > cmp rASL,x ;test result +25b7 : 08 > php ;save flags +25b8 : ad0302 > lda abst +25bb : dd2002 > cmp rASL,x ;test result > trap_ne -254b : d0fe > bne * ;failed not equal (non zero) +25be : d0fe > bne * ;failed not equal (non zero) > -254d : 68 > pla ;load status +25c0 : 68 > pla ;load status > eor_flag $ff-fnzc -254e : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +25c1 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -2550 : dd2102 > cmp fASL,x ;test flags +25c3 : dd3002 > cmp fASL,x ;test flags > trap_ne -2553 : d0fe > bne * ;failed not equal (non zero) +25c6 : d0fe > bne * ;failed not equal (non zero) > -2555 : ca dex -2556 : 10e0 bpl tasl5 +25c8 : ca dex +25c9 : 10e0 bpl tasl5 -2558 : a203 ldx #3 -255a : tlsr4 +25cb : a203 ldx #3 +25cd : tlsr4 set_abs zp1,0 > load_flag 0 -255a : a900 > lda #0 ;allow test to change I-flag (no mask) +25cd : a900 > lda #0 ;allow test to change I-flag (no mask) > -255c : 48 > pha ;use stack to load status -255d : b513 > lda zp1,x ;load to memory -255f : 8d0302 > sta abst -2562 : 28 > plp +25cf : 48 > pha ;use stack to load status +25d0 : b513 > lda zp1,x ;load to memory +25d2 : 8d0302 > sta abst +25d5 : 28 > plp -2563 : 4e0302 lsr abst +25d6 : 4e0302 lsr abst tst_abs rLSR,fLSR,0 -2566 : 08 > php ;save flags -2567 : ad0302 > lda abst -256a : dd1902 > cmp rLSR,x ;test result +25d9 : 08 > php ;save flags +25da : ad0302 > lda abst +25dd : dd2802 > cmp rLSR,x ;test result > trap_ne -256d : d0fe > bne * ;failed not equal (non zero) +25e0 : d0fe > bne * ;failed not equal (non zero) > -256f : 68 > pla ;load status +25e2 : 68 > pla ;load status > eor_flag 0 -2570 : 4930 > eor #0|fao ;invert expected flags + always on bits +25e3 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2572 : dd2902 > cmp fLSR,x ;test flags +25e5 : dd3802 > cmp fLSR,x ;test flags > trap_ne -2575 : d0fe > bne * ;failed not equal (non zero) +25e8 : d0fe > bne * ;failed not equal (non zero) > -2577 : ca dex -2578 : 10e0 bpl tlsr4 -257a : a203 ldx #3 -257c : tlsr5 +25ea : ca dex +25eb : 10e0 bpl tlsr4 +25ed : a203 ldx #3 +25ef : tlsr5 set_abs zp1,$ff > load_flag $ff -257c : a9ff > lda #$ff ;allow test to change I-flag (no mask) +25ef : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -257e : 48 > pha ;use stack to load status -257f : b513 > lda zp1,x ;load to memory -2581 : 8d0302 > sta abst -2584 : 28 > plp +25f1 : 48 > pha ;use stack to load status +25f2 : b513 > lda zp1,x ;load to memory +25f4 : 8d0302 > sta abst +25f7 : 28 > plp -2585 : 4e0302 lsr abst +25f8 : 4e0302 lsr abst tst_abs rLSR,fLSR,$ff-fnzc -2588 : 08 > php ;save flags -2589 : ad0302 > lda abst -258c : dd1902 > cmp rLSR,x ;test result +25fb : 08 > php ;save flags +25fc : ad0302 > lda abst +25ff : dd2802 > cmp rLSR,x ;test result > trap_ne -258f : d0fe > bne * ;failed not equal (non zero) +2602 : d0fe > bne * ;failed not equal (non zero) > -2591 : 68 > pla ;load status +2604 : 68 > pla ;load status > eor_flag $ff-fnzc -2592 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +2605 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -2594 : dd2902 > cmp fLSR,x ;test flags +2607 : dd3802 > cmp fLSR,x ;test flags > trap_ne -2597 : d0fe > bne * ;failed not equal (non zero) +260a : d0fe > bne * ;failed not equal (non zero) > -2599 : ca dex -259a : 10e0 bpl tlsr5 +260c : ca dex +260d : 10e0 bpl tlsr5 -259c : a203 ldx #3 -259e : trol4 +260f : a203 ldx #3 +2611 : trol4 set_abs zp1,0 > load_flag 0 -259e : a900 > lda #0 ;allow test to change I-flag (no mask) +2611 : a900 > lda #0 ;allow test to change I-flag (no mask) > -25a0 : 48 > pha ;use stack to load status -25a1 : b513 > lda zp1,x ;load to memory -25a3 : 8d0302 > sta abst -25a6 : 28 > plp +2613 : 48 > pha ;use stack to load status +2614 : b513 > lda zp1,x ;load to memory +2616 : 8d0302 > sta abst +2619 : 28 > plp -25a7 : 2e0302 rol abst +261a : 2e0302 rol abst tst_abs rROL,fROL,0 -25aa : 08 > php ;save flags -25ab : ad0302 > lda abst -25ae : dd1102 > cmp rROL,x ;test result +261d : 08 > php ;save flags +261e : ad0302 > lda abst +2621 : dd2002 > cmp rROL,x ;test result > trap_ne -25b1 : d0fe > bne * ;failed not equal (non zero) +2624 : d0fe > bne * ;failed not equal (non zero) > -25b3 : 68 > pla ;load status +2626 : 68 > pla ;load status > eor_flag 0 -25b4 : 4930 > eor #0|fao ;invert expected flags + always on bits +2627 : 4930 > eor #0|fao ;invert expected flags + always on bits > -25b6 : dd2102 > cmp fROL,x ;test flags +2629 : dd3002 > cmp fROL,x ;test flags > trap_ne -25b9 : d0fe > bne * ;failed not equal (non zero) +262c : d0fe > bne * ;failed not equal (non zero) > -25bb : ca dex -25bc : 10e0 bpl trol4 -25be : a203 ldx #3 -25c0 : trol5 +262e : ca dex +262f : 10e0 bpl trol4 +2631 : a203 ldx #3 +2633 : trol5 set_abs zp1,$ff-fc > load_flag $ff-fc -25c0 : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) +2633 : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) > -25c2 : 48 > pha ;use stack to load status -25c3 : b513 > lda zp1,x ;load to memory -25c5 : 8d0302 > sta abst -25c8 : 28 > plp +2635 : 48 > pha ;use stack to load status +2636 : b513 > lda zp1,x ;load to memory +2638 : 8d0302 > sta abst +263b : 28 > plp -25c9 : 2e0302 rol abst +263c : 2e0302 rol abst tst_abs rROL,fROL,$ff-fnzc -25cc : 08 > php ;save flags -25cd : ad0302 > lda abst -25d0 : dd1102 > cmp rROL,x ;test result +263f : 08 > php ;save flags +2640 : ad0302 > lda abst +2643 : dd2002 > cmp rROL,x ;test result > trap_ne -25d3 : d0fe > bne * ;failed not equal (non zero) +2646 : d0fe > bne * ;failed not equal (non zero) > -25d5 : 68 > pla ;load status +2648 : 68 > pla ;load status > eor_flag $ff-fnzc -25d6 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +2649 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -25d8 : dd2102 > cmp fROL,x ;test flags +264b : dd3002 > cmp fROL,x ;test flags > trap_ne -25db : d0fe > bne * ;failed not equal (non zero) +264e : d0fe > bne * ;failed not equal (non zero) > -25dd : ca dex -25de : 10e0 bpl trol5 +2650 : ca dex +2651 : 10e0 bpl trol5 -25e0 : a203 ldx #3 -25e2 : trolc4 +2653 : a203 ldx #3 +2655 : trolc4 set_abs zp1,fc > load_flag fc -25e2 : a901 > lda #fc ;allow test to change I-flag (no mask) +2655 : a901 > lda #fc ;allow test to change I-flag (no mask) > -25e4 : 48 > pha ;use stack to load status -25e5 : b513 > lda zp1,x ;load to memory -25e7 : 8d0302 > sta abst -25ea : 28 > plp +2657 : 48 > pha ;use stack to load status +2658 : b513 > lda zp1,x ;load to memory +265a : 8d0302 > sta abst +265d : 28 > plp -25eb : 2e0302 rol abst +265e : 2e0302 rol abst tst_abs rROLc,fROLc,0 -25ee : 08 > php ;save flags -25ef : ad0302 > lda abst -25f2 : dd1502 > cmp rROLc,x ;test result +2661 : 08 > php ;save flags +2662 : ad0302 > lda abst +2665 : dd2402 > cmp rROLc,x ;test result > trap_ne -25f5 : d0fe > bne * ;failed not equal (non zero) +2668 : d0fe > bne * ;failed not equal (non zero) > -25f7 : 68 > pla ;load status +266a : 68 > pla ;load status > eor_flag 0 -25f8 : 4930 > eor #0|fao ;invert expected flags + always on bits +266b : 4930 > eor #0|fao ;invert expected flags + always on bits > -25fa : dd2502 > cmp fROLc,x ;test flags +266d : dd3402 > cmp fROLc,x ;test flags > trap_ne -25fd : d0fe > bne * ;failed not equal (non zero) +2670 : d0fe > bne * ;failed not equal (non zero) > -25ff : ca dex -2600 : 10e0 bpl trolc4 -2602 : a203 ldx #3 -2604 : trolc5 +2672 : ca dex +2673 : 10e0 bpl trolc4 +2675 : a203 ldx #3 +2677 : trolc5 set_abs zp1,$ff > load_flag $ff -2604 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2677 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2606 : 48 > pha ;use stack to load status -2607 : b513 > lda zp1,x ;load to memory -2609 : 8d0302 > sta abst -260c : 28 > plp +2679 : 48 > pha ;use stack to load status +267a : b513 > lda zp1,x ;load to memory +267c : 8d0302 > sta abst +267f : 28 > plp -260d : 2e0302 rol abst +2680 : 2e0302 rol abst tst_abs rROLc,fROLc,$ff-fnzc -2610 : 08 > php ;save flags -2611 : ad0302 > lda abst -2614 : dd1502 > cmp rROLc,x ;test result +2683 : 08 > php ;save flags +2684 : ad0302 > lda abst +2687 : dd2402 > cmp rROLc,x ;test result > trap_ne -2617 : d0fe > bne * ;failed not equal (non zero) +268a : d0fe > bne * ;failed not equal (non zero) > -2619 : 68 > pla ;load status +268c : 68 > pla ;load status > eor_flag $ff-fnzc -261a : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +268d : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -261c : dd2502 > cmp fROLc,x ;test flags +268f : dd3402 > cmp fROLc,x ;test flags > trap_ne -261f : d0fe > bne * ;failed not equal (non zero) +2692 : d0fe > bne * ;failed not equal (non zero) > -2621 : ca dex -2622 : 10e0 bpl trolc5 +2694 : ca dex +2695 : 10e0 bpl trolc5 -2624 : a203 ldx #3 -2626 : tror4 +2697 : a203 ldx #3 +2699 : tror4 set_abs zp1,0 > load_flag 0 -2626 : a900 > lda #0 ;allow test to change I-flag (no mask) +2699 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2628 : 48 > pha ;use stack to load status -2629 : b513 > lda zp1,x ;load to memory -262b : 8d0302 > sta abst -262e : 28 > plp +269b : 48 > pha ;use stack to load status +269c : b513 > lda zp1,x ;load to memory +269e : 8d0302 > sta abst +26a1 : 28 > plp -262f : 6e0302 ror abst +26a2 : 6e0302 ror abst tst_abs rROR,fROR,0 -2632 : 08 > php ;save flags -2633 : ad0302 > lda abst -2636 : dd1902 > cmp rROR,x ;test result +26a5 : 08 > php ;save flags +26a6 : ad0302 > lda abst +26a9 : dd2802 > cmp rROR,x ;test result > trap_ne -2639 : d0fe > bne * ;failed not equal (non zero) +26ac : d0fe > bne * ;failed not equal (non zero) > -263b : 68 > pla ;load status +26ae : 68 > pla ;load status > eor_flag 0 -263c : 4930 > eor #0|fao ;invert expected flags + always on bits +26af : 4930 > eor #0|fao ;invert expected flags + always on bits > -263e : dd2902 > cmp fROR,x ;test flags +26b1 : dd3802 > cmp fROR,x ;test flags > trap_ne -2641 : d0fe > bne * ;failed not equal (non zero) +26b4 : d0fe > bne * ;failed not equal (non zero) > -2643 : ca dex -2644 : 10e0 bpl tror4 -2646 : a203 ldx #3 -2648 : tror5 +26b6 : ca dex +26b7 : 10e0 bpl tror4 +26b9 : a203 ldx #3 +26bb : tror5 set_abs zp1,$ff-fc > load_flag $ff-fc -2648 : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) +26bb : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) > -264a : 48 > pha ;use stack to load status -264b : b513 > lda zp1,x ;load to memory -264d : 8d0302 > sta abst -2650 : 28 > plp +26bd : 48 > pha ;use stack to load status +26be : b513 > lda zp1,x ;load to memory +26c0 : 8d0302 > sta abst +26c3 : 28 > plp -2651 : 6e0302 ror abst +26c4 : 6e0302 ror abst tst_abs rROR,fROR,$ff-fnzc -2654 : 08 > php ;save flags -2655 : ad0302 > lda abst -2658 : dd1902 > cmp rROR,x ;test result +26c7 : 08 > php ;save flags +26c8 : ad0302 > lda abst +26cb : dd2802 > cmp rROR,x ;test result > trap_ne -265b : d0fe > bne * ;failed not equal (non zero) +26ce : d0fe > bne * ;failed not equal (non zero) > -265d : 68 > pla ;load status +26d0 : 68 > pla ;load status > eor_flag $ff-fnzc -265e : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +26d1 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -2660 : dd2902 > cmp fROR,x ;test flags +26d3 : dd3802 > cmp fROR,x ;test flags > trap_ne -2663 : d0fe > bne * ;failed not equal (non zero) +26d6 : d0fe > bne * ;failed not equal (non zero) > -2665 : ca dex -2666 : 10e0 bpl tror5 +26d8 : ca dex +26d9 : 10e0 bpl tror5 -2668 : a203 ldx #3 -266a : trorc4 +26db : a203 ldx #3 +26dd : trorc4 set_abs zp1,fc > load_flag fc -266a : a901 > lda #fc ;allow test to change I-flag (no mask) +26dd : a901 > lda #fc ;allow test to change I-flag (no mask) > -266c : 48 > pha ;use stack to load status -266d : b513 > lda zp1,x ;load to memory -266f : 8d0302 > sta abst -2672 : 28 > plp +26df : 48 > pha ;use stack to load status +26e0 : b513 > lda zp1,x ;load to memory +26e2 : 8d0302 > sta abst +26e5 : 28 > plp -2673 : 6e0302 ror abst +26e6 : 6e0302 ror abst tst_abs rRORc,fRORc,0 -2676 : 08 > php ;save flags -2677 : ad0302 > lda abst -267a : dd1d02 > cmp rRORc,x ;test result +26e9 : 08 > php ;save flags +26ea : ad0302 > lda abst +26ed : dd2c02 > cmp rRORc,x ;test result > trap_ne -267d : d0fe > bne * ;failed not equal (non zero) +26f0 : d0fe > bne * ;failed not equal (non zero) > -267f : 68 > pla ;load status +26f2 : 68 > pla ;load status > eor_flag 0 -2680 : 4930 > eor #0|fao ;invert expected flags + always on bits +26f3 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2682 : dd2d02 > cmp fRORc,x ;test flags +26f5 : dd3c02 > cmp fRORc,x ;test flags > trap_ne -2685 : d0fe > bne * ;failed not equal (non zero) +26f8 : d0fe > bne * ;failed not equal (non zero) > -2687 : ca dex -2688 : 10e0 bpl trorc4 -268a : a203 ldx #3 -268c : trorc5 +26fa : ca dex +26fb : 10e0 bpl trorc4 +26fd : a203 ldx #3 +26ff : trorc5 set_abs zp1,$ff > load_flag $ff -268c : a9ff > lda #$ff ;allow test to change I-flag (no mask) +26ff : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -268e : 48 > pha ;use stack to load status -268f : b513 > lda zp1,x ;load to memory -2691 : 8d0302 > sta abst -2694 : 28 > plp +2701 : 48 > pha ;use stack to load status +2702 : b513 > lda zp1,x ;load to memory +2704 : 8d0302 > sta abst +2707 : 28 > plp -2695 : 6e0302 ror abst +2708 : 6e0302 ror abst tst_abs rRORc,fRORc,$ff-fnzc -2698 : 08 > php ;save flags -2699 : ad0302 > lda abst -269c : dd1d02 > cmp rRORc,x ;test result +270b : 08 > php ;save flags +270c : ad0302 > lda abst +270f : dd2c02 > cmp rRORc,x ;test result > trap_ne -269f : d0fe > bne * ;failed not equal (non zero) +2712 : d0fe > bne * ;failed not equal (non zero) > -26a1 : 68 > pla ;load status +2714 : 68 > pla ;load status > eor_flag $ff-fnzc -26a2 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +2715 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -26a4 : dd2d02 > cmp fRORc,x ;test flags +2717 : dd3c02 > cmp fRORc,x ;test flags > trap_ne -26a7 : d0fe > bne * ;failed not equal (non zero) +271a : d0fe > bne * ;failed not equal (non zero) > -26a9 : ca dex -26aa : 10e0 bpl trorc5 +271c : ca dex +271d : 10e0 bpl trorc5 next_test -26ac : ad0002 > lda test_case ;previous test -26af : c91f > cmp #test_num +271f : ad0002 > lda test_case ;previous test +2722 : c91f > cmp #test_num > trap_ne ;test is out of sequence -26b1 : d0fe > bne * ;failed not equal (non zero) +2724 : d0fe > bne * ;failed not equal (non zero) > 0020 = >test_num = test_num + 1 -26b3 : a920 > lda #test_num ;*** next tests' number -26b5 : 8d0002 > sta test_case +2726 : a920 > lda #test_num ;*** next tests' number +2728 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; shifts - zp indexed -26b8 : a203 ldx #3 -26ba : tasl6 +272b : a203 ldx #3 +272d : tasl6 set_zx zp1,0 > load_flag 0 -26ba : a900 > lda #0 ;allow test to change I-flag (no mask) +272d : a900 > lda #0 ;allow test to change I-flag (no mask) > -26bc : 48 > pha ;use stack to load status -26bd : b513 > lda zp1,x ;load to indexed zeropage -26bf : 950c > sta zpt,x -26c1 : 28 > plp +272f : 48 > pha ;use stack to load status +2730 : b513 > lda zp1,x ;load to indexed zeropage +2732 : 950c > sta zpt,x +2734 : 28 > plp -26c2 : 160c asl zpt,x +2735 : 160c asl zpt,x tst_zx rASL,fASL,0 -26c4 : 08 > php ;save flags -26c5 : b50c > lda zpt,x -26c7 : dd1102 > cmp rASL,x ;test result +2737 : 08 > php ;save flags +2738 : b50c > lda zpt,x +273a : dd2002 > cmp rASL,x ;test result > trap_ne -26ca : d0fe > bne * ;failed not equal (non zero) +273d : d0fe > bne * ;failed not equal (non zero) > -26cc : 68 > pla ;load status +273f : 68 > pla ;load status > eor_flag 0 -26cd : 4930 > eor #0|fao ;invert expected flags + always on bits +2740 : 4930 > eor #0|fao ;invert expected flags + always on bits > -26cf : dd2102 > cmp fASL,x ;test flags +2742 : dd3002 > cmp fASL,x ;test flags > trap_ne -26d2 : d0fe > bne * ;failed not equal (non zero) +2745 : d0fe > bne * ;failed not equal (non zero) > -26d4 : ca dex -26d5 : 10e3 bpl tasl6 -26d7 : a203 ldx #3 -26d9 : tasl7 +2747 : ca dex +2748 : 10e3 bpl tasl6 +274a : a203 ldx #3 +274c : tasl7 set_zx zp1,$ff > load_flag $ff -26d9 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +274c : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -26db : 48 > pha ;use stack to load status -26dc : b513 > lda zp1,x ;load to indexed zeropage -26de : 950c > sta zpt,x -26e0 : 28 > plp +274e : 48 > pha ;use stack to load status +274f : b513 > lda zp1,x ;load to indexed zeropage +2751 : 950c > sta zpt,x +2753 : 28 > plp -26e1 : 160c asl zpt,x +2754 : 160c asl zpt,x tst_zx rASL,fASL,$ff-fnzc -26e3 : 08 > php ;save flags -26e4 : b50c > lda zpt,x -26e6 : dd1102 > cmp rASL,x ;test result +2756 : 08 > php ;save flags +2757 : b50c > lda zpt,x +2759 : dd2002 > cmp rASL,x ;test result > trap_ne -26e9 : d0fe > bne * ;failed not equal (non zero) +275c : d0fe > bne * ;failed not equal (non zero) > -26eb : 68 > pla ;load status +275e : 68 > pla ;load status > eor_flag $ff-fnzc -26ec : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +275f : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -26ee : dd2102 > cmp fASL,x ;test flags +2761 : dd3002 > cmp fASL,x ;test flags > trap_ne -26f1 : d0fe > bne * ;failed not equal (non zero) +2764 : d0fe > bne * ;failed not equal (non zero) > -26f3 : ca dex -26f4 : 10e3 bpl tasl7 +2766 : ca dex +2767 : 10e3 bpl tasl7 -26f6 : a203 ldx #3 -26f8 : tlsr6 +2769 : a203 ldx #3 +276b : tlsr6 set_zx zp1,0 > load_flag 0 -26f8 : a900 > lda #0 ;allow test to change I-flag (no mask) +276b : a900 > lda #0 ;allow test to change I-flag (no mask) > -26fa : 48 > pha ;use stack to load status -26fb : b513 > lda zp1,x ;load to indexed zeropage -26fd : 950c > sta zpt,x -26ff : 28 > plp +276d : 48 > pha ;use stack to load status +276e : b513 > lda zp1,x ;load to indexed zeropage +2770 : 950c > sta zpt,x +2772 : 28 > plp -2700 : 560c lsr zpt,x +2773 : 560c lsr zpt,x tst_zx rLSR,fLSR,0 -2702 : 08 > php ;save flags -2703 : b50c > lda zpt,x -2705 : dd1902 > cmp rLSR,x ;test result +2775 : 08 > php ;save flags +2776 : b50c > lda zpt,x +2778 : dd2802 > cmp rLSR,x ;test result > trap_ne -2708 : d0fe > bne * ;failed not equal (non zero) +277b : d0fe > bne * ;failed not equal (non zero) > -270a : 68 > pla ;load status +277d : 68 > pla ;load status > eor_flag 0 -270b : 4930 > eor #0|fao ;invert expected flags + always on bits +277e : 4930 > eor #0|fao ;invert expected flags + always on bits > -270d : dd2902 > cmp fLSR,x ;test flags +2780 : dd3802 > cmp fLSR,x ;test flags > trap_ne -2710 : d0fe > bne * ;failed not equal (non zero) +2783 : d0fe > bne * ;failed not equal (non zero) > -2712 : ca dex -2713 : 10e3 bpl tlsr6 -2715 : a203 ldx #3 -2717 : tlsr7 +2785 : ca dex +2786 : 10e3 bpl tlsr6 +2788 : a203 ldx #3 +278a : tlsr7 set_zx zp1,$ff > load_flag $ff -2717 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +278a : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2719 : 48 > pha ;use stack to load status -271a : b513 > lda zp1,x ;load to indexed zeropage -271c : 950c > sta zpt,x -271e : 28 > plp +278c : 48 > pha ;use stack to load status +278d : b513 > lda zp1,x ;load to indexed zeropage +278f : 950c > sta zpt,x +2791 : 28 > plp -271f : 560c lsr zpt,x +2792 : 560c lsr zpt,x tst_zx rLSR,fLSR,$ff-fnzc -2721 : 08 > php ;save flags -2722 : b50c > lda zpt,x -2724 : dd1902 > cmp rLSR,x ;test result +2794 : 08 > php ;save flags +2795 : b50c > lda zpt,x +2797 : dd2802 > cmp rLSR,x ;test result > trap_ne -2727 : d0fe > bne * ;failed not equal (non zero) +279a : d0fe > bne * ;failed not equal (non zero) > -2729 : 68 > pla ;load status +279c : 68 > pla ;load status > eor_flag $ff-fnzc -272a : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +279d : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -272c : dd2902 > cmp fLSR,x ;test flags +279f : dd3802 > cmp fLSR,x ;test flags > trap_ne -272f : d0fe > bne * ;failed not equal (non zero) +27a2 : d0fe > bne * ;failed not equal (non zero) > -2731 : ca dex -2732 : 10e3 bpl tlsr7 +27a4 : ca dex +27a5 : 10e3 bpl tlsr7 -2734 : a203 ldx #3 -2736 : trol6 +27a7 : a203 ldx #3 +27a9 : trol6 set_zx zp1,0 > load_flag 0 -2736 : a900 > lda #0 ;allow test to change I-flag (no mask) +27a9 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2738 : 48 > pha ;use stack to load status -2739 : b513 > lda zp1,x ;load to indexed zeropage -273b : 950c > sta zpt,x -273d : 28 > plp +27ab : 48 > pha ;use stack to load status +27ac : b513 > lda zp1,x ;load to indexed zeropage +27ae : 950c > sta zpt,x +27b0 : 28 > plp -273e : 360c rol zpt,x +27b1 : 360c rol zpt,x tst_zx rROL,fROL,0 -2740 : 08 > php ;save flags -2741 : b50c > lda zpt,x -2743 : dd1102 > cmp rROL,x ;test result +27b3 : 08 > php ;save flags +27b4 : b50c > lda zpt,x +27b6 : dd2002 > cmp rROL,x ;test result > trap_ne -2746 : d0fe > bne * ;failed not equal (non zero) +27b9 : d0fe > bne * ;failed not equal (non zero) > -2748 : 68 > pla ;load status +27bb : 68 > pla ;load status > eor_flag 0 -2749 : 4930 > eor #0|fao ;invert expected flags + always on bits +27bc : 4930 > eor #0|fao ;invert expected flags + always on bits > -274b : dd2102 > cmp fROL,x ;test flags +27be : dd3002 > cmp fROL,x ;test flags > trap_ne -274e : d0fe > bne * ;failed not equal (non zero) +27c1 : d0fe > bne * ;failed not equal (non zero) > -2750 : ca dex -2751 : 10e3 bpl trol6 -2753 : a203 ldx #3 -2755 : trol7 +27c3 : ca dex +27c4 : 10e3 bpl trol6 +27c6 : a203 ldx #3 +27c8 : trol7 set_zx zp1,$ff-fc > load_flag $ff-fc -2755 : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) +27c8 : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) > -2757 : 48 > pha ;use stack to load status -2758 : b513 > lda zp1,x ;load to indexed zeropage -275a : 950c > sta zpt,x -275c : 28 > plp +27ca : 48 > pha ;use stack to load status +27cb : b513 > lda zp1,x ;load to indexed zeropage +27cd : 950c > sta zpt,x +27cf : 28 > plp -275d : 360c rol zpt,x +27d0 : 360c rol zpt,x tst_zx rROL,fROL,$ff-fnzc -275f : 08 > php ;save flags -2760 : b50c > lda zpt,x -2762 : dd1102 > cmp rROL,x ;test result +27d2 : 08 > php ;save flags +27d3 : b50c > lda zpt,x +27d5 : dd2002 > cmp rROL,x ;test result > trap_ne -2765 : d0fe > bne * ;failed not equal (non zero) +27d8 : d0fe > bne * ;failed not equal (non zero) > -2767 : 68 > pla ;load status +27da : 68 > pla ;load status > eor_flag $ff-fnzc -2768 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +27db : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -276a : dd2102 > cmp fROL,x ;test flags +27dd : dd3002 > cmp fROL,x ;test flags > trap_ne -276d : d0fe > bne * ;failed not equal (non zero) +27e0 : d0fe > bne * ;failed not equal (non zero) > -276f : ca dex -2770 : 10e3 bpl trol7 +27e2 : ca dex +27e3 : 10e3 bpl trol7 -2772 : a203 ldx #3 -2774 : trolc6 +27e5 : a203 ldx #3 +27e7 : trolc6 set_zx zp1,fc > load_flag fc -2774 : a901 > lda #fc ;allow test to change I-flag (no mask) +27e7 : a901 > lda #fc ;allow test to change I-flag (no mask) > -2776 : 48 > pha ;use stack to load status -2777 : b513 > lda zp1,x ;load to indexed zeropage -2779 : 950c > sta zpt,x -277b : 28 > plp +27e9 : 48 > pha ;use stack to load status +27ea : b513 > lda zp1,x ;load to indexed zeropage +27ec : 950c > sta zpt,x +27ee : 28 > plp -277c : 360c rol zpt,x +27ef : 360c rol zpt,x tst_zx rROLc,fROLc,0 -277e : 08 > php ;save flags -277f : b50c > lda zpt,x -2781 : dd1502 > cmp rROLc,x ;test result +27f1 : 08 > php ;save flags +27f2 : b50c > lda zpt,x +27f4 : dd2402 > cmp rROLc,x ;test result > trap_ne -2784 : d0fe > bne * ;failed not equal (non zero) +27f7 : d0fe > bne * ;failed not equal (non zero) > -2786 : 68 > pla ;load status +27f9 : 68 > pla ;load status > eor_flag 0 -2787 : 4930 > eor #0|fao ;invert expected flags + always on bits +27fa : 4930 > eor #0|fao ;invert expected flags + always on bits > -2789 : dd2502 > cmp fROLc,x ;test flags +27fc : dd3402 > cmp fROLc,x ;test flags > trap_ne -278c : d0fe > bne * ;failed not equal (non zero) +27ff : d0fe > bne * ;failed not equal (non zero) > -278e : ca dex -278f : 10e3 bpl trolc6 -2791 : a203 ldx #3 -2793 : trolc7 +2801 : ca dex +2802 : 10e3 bpl trolc6 +2804 : a203 ldx #3 +2806 : trolc7 set_zx zp1,$ff > load_flag $ff -2793 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2806 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2795 : 48 > pha ;use stack to load status -2796 : b513 > lda zp1,x ;load to indexed zeropage -2798 : 950c > sta zpt,x -279a : 28 > plp +2808 : 48 > pha ;use stack to load status +2809 : b513 > lda zp1,x ;load to indexed zeropage +280b : 950c > sta zpt,x +280d : 28 > plp -279b : 360c rol zpt,x +280e : 360c rol zpt,x tst_zx rROLc,fROLc,$ff-fnzc -279d : 08 > php ;save flags -279e : b50c > lda zpt,x -27a0 : dd1502 > cmp rROLc,x ;test result +2810 : 08 > php ;save flags +2811 : b50c > lda zpt,x +2813 : dd2402 > cmp rROLc,x ;test result > trap_ne -27a3 : d0fe > bne * ;failed not equal (non zero) +2816 : d0fe > bne * ;failed not equal (non zero) > -27a5 : 68 > pla ;load status +2818 : 68 > pla ;load status > eor_flag $ff-fnzc -27a6 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +2819 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -27a8 : dd2502 > cmp fROLc,x ;test flags +281b : dd3402 > cmp fROLc,x ;test flags > trap_ne -27ab : d0fe > bne * ;failed not equal (non zero) +281e : d0fe > bne * ;failed not equal (non zero) > -27ad : ca dex -27ae : 10e3 bpl trolc7 +2820 : ca dex +2821 : 10e3 bpl trolc7 -27b0 : a203 ldx #3 -27b2 : tror6 +2823 : a203 ldx #3 +2825 : tror6 set_zx zp1,0 > load_flag 0 -27b2 : a900 > lda #0 ;allow test to change I-flag (no mask) +2825 : a900 > lda #0 ;allow test to change I-flag (no mask) > -27b4 : 48 > pha ;use stack to load status -27b5 : b513 > lda zp1,x ;load to indexed zeropage -27b7 : 950c > sta zpt,x -27b9 : 28 > plp +2827 : 48 > pha ;use stack to load status +2828 : b513 > lda zp1,x ;load to indexed zeropage +282a : 950c > sta zpt,x +282c : 28 > plp -27ba : 760c ror zpt,x +282d : 760c ror zpt,x tst_zx rROR,fROR,0 -27bc : 08 > php ;save flags -27bd : b50c > lda zpt,x -27bf : dd1902 > cmp rROR,x ;test result +282f : 08 > php ;save flags +2830 : b50c > lda zpt,x +2832 : dd2802 > cmp rROR,x ;test result > trap_ne -27c2 : d0fe > bne * ;failed not equal (non zero) +2835 : d0fe > bne * ;failed not equal (non zero) > -27c4 : 68 > pla ;load status +2837 : 68 > pla ;load status > eor_flag 0 -27c5 : 4930 > eor #0|fao ;invert expected flags + always on bits +2838 : 4930 > eor #0|fao ;invert expected flags + always on bits > -27c7 : dd2902 > cmp fROR,x ;test flags +283a : dd3802 > cmp fROR,x ;test flags > trap_ne -27ca : d0fe > bne * ;failed not equal (non zero) +283d : d0fe > bne * ;failed not equal (non zero) > -27cc : ca dex -27cd : 10e3 bpl tror6 -27cf : a203 ldx #3 -27d1 : tror7 +283f : ca dex +2840 : 10e3 bpl tror6 +2842 : a203 ldx #3 +2844 : tror7 set_zx zp1,$ff-fc > load_flag $ff-fc -27d1 : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) +2844 : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) > -27d3 : 48 > pha ;use stack to load status -27d4 : b513 > lda zp1,x ;load to indexed zeropage -27d6 : 950c > sta zpt,x -27d8 : 28 > plp +2846 : 48 > pha ;use stack to load status +2847 : b513 > lda zp1,x ;load to indexed zeropage +2849 : 950c > sta zpt,x +284b : 28 > plp -27d9 : 760c ror zpt,x +284c : 760c ror zpt,x tst_zx rROR,fROR,$ff-fnzc -27db : 08 > php ;save flags -27dc : b50c > lda zpt,x -27de : dd1902 > cmp rROR,x ;test result +284e : 08 > php ;save flags +284f : b50c > lda zpt,x +2851 : dd2802 > cmp rROR,x ;test result > trap_ne -27e1 : d0fe > bne * ;failed not equal (non zero) +2854 : d0fe > bne * ;failed not equal (non zero) > -27e3 : 68 > pla ;load status +2856 : 68 > pla ;load status > eor_flag $ff-fnzc -27e4 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +2857 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -27e6 : dd2902 > cmp fROR,x ;test flags +2859 : dd3802 > cmp fROR,x ;test flags > trap_ne -27e9 : d0fe > bne * ;failed not equal (non zero) +285c : d0fe > bne * ;failed not equal (non zero) > -27eb : ca dex -27ec : 10e3 bpl tror7 +285e : ca dex +285f : 10e3 bpl tror7 -27ee : a203 ldx #3 -27f0 : trorc6 +2861 : a203 ldx #3 +2863 : trorc6 set_zx zp1,fc > load_flag fc -27f0 : a901 > lda #fc ;allow test to change I-flag (no mask) +2863 : a901 > lda #fc ;allow test to change I-flag (no mask) > -27f2 : 48 > pha ;use stack to load status -27f3 : b513 > lda zp1,x ;load to indexed zeropage -27f5 : 950c > sta zpt,x -27f7 : 28 > plp +2865 : 48 > pha ;use stack to load status +2866 : b513 > lda zp1,x ;load to indexed zeropage +2868 : 950c > sta zpt,x +286a : 28 > plp -27f8 : 760c ror zpt,x +286b : 760c ror zpt,x tst_zx rRORc,fRORc,0 -27fa : 08 > php ;save flags -27fb : b50c > lda zpt,x -27fd : dd1d02 > cmp rRORc,x ;test result +286d : 08 > php ;save flags +286e : b50c > lda zpt,x +2870 : dd2c02 > cmp rRORc,x ;test result > trap_ne -2800 : d0fe > bne * ;failed not equal (non zero) +2873 : d0fe > bne * ;failed not equal (non zero) > -2802 : 68 > pla ;load status +2875 : 68 > pla ;load status > eor_flag 0 -2803 : 4930 > eor #0|fao ;invert expected flags + always on bits +2876 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2805 : dd2d02 > cmp fRORc,x ;test flags +2878 : dd3c02 > cmp fRORc,x ;test flags > trap_ne -2808 : d0fe > bne * ;failed not equal (non zero) +287b : d0fe > bne * ;failed not equal (non zero) > -280a : ca dex -280b : 10e3 bpl trorc6 -280d : a203 ldx #3 -280f : trorc7 +287d : ca dex +287e : 10e3 bpl trorc6 +2880 : a203 ldx #3 +2882 : trorc7 set_zx zp1,$ff > load_flag $ff -280f : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2882 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2811 : 48 > pha ;use stack to load status -2812 : b513 > lda zp1,x ;load to indexed zeropage -2814 : 950c > sta zpt,x -2816 : 28 > plp +2884 : 48 > pha ;use stack to load status +2885 : b513 > lda zp1,x ;load to indexed zeropage +2887 : 950c > sta zpt,x +2889 : 28 > plp -2817 : 760c ror zpt,x +288a : 760c ror zpt,x tst_zx rRORc,fRORc,$ff-fnzc -2819 : 08 > php ;save flags -281a : b50c > lda zpt,x -281c : dd1d02 > cmp rRORc,x ;test result +288c : 08 > php ;save flags +288d : b50c > lda zpt,x +288f : dd2c02 > cmp rRORc,x ;test result > trap_ne -281f : d0fe > bne * ;failed not equal (non zero) +2892 : d0fe > bne * ;failed not equal (non zero) > -2821 : 68 > pla ;load status +2894 : 68 > pla ;load status > eor_flag $ff-fnzc -2822 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +2895 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -2824 : dd2d02 > cmp fRORc,x ;test flags +2897 : dd3c02 > cmp fRORc,x ;test flags > trap_ne -2827 : d0fe > bne * ;failed not equal (non zero) +289a : d0fe > bne * ;failed not equal (non zero) > -2829 : ca dex -282a : 10e3 bpl trorc7 +289c : ca dex +289d : 10e3 bpl trorc7 next_test -282c : ad0002 > lda test_case ;previous test -282f : c920 > cmp #test_num +289f : ad0002 > lda test_case ;previous test +28a2 : c920 > cmp #test_num > trap_ne ;test is out of sequence -2831 : d0fe > bne * ;failed not equal (non zero) +28a4 : d0fe > bne * ;failed not equal (non zero) > 0021 = >test_num = test_num + 1 -2833 : a921 > lda #test_num ;*** next tests' number -2835 : 8d0002 > sta test_case +28a6 : a921 > lda #test_num ;*** next tests' number +28a8 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; shifts - abs indexed -2838 : a203 ldx #3 -283a : tasl8 +28ab : a203 ldx #3 +28ad : tasl8 set_absx zp1,0 > load_flag 0 -283a : a900 > lda #0 ;allow test to change I-flag (no mask) +28ad : a900 > lda #0 ;allow test to change I-flag (no mask) > -283c : 48 > pha ;use stack to load status -283d : b513 > lda zp1,x ;load to indexed memory -283f : 9d0302 > sta abst,x -2842 : 28 > plp +28af : 48 > pha ;use stack to load status +28b0 : b513 > lda zp1,x ;load to indexed memory +28b2 : 9d0302 > sta abst,x +28b5 : 28 > plp -2843 : 1e0302 asl abst,x +28b6 : 1e0302 asl abst,x tst_absx rASL,fASL,0 -2846 : 08 > php ;save flags -2847 : bd0302 > lda abst,x -284a : dd1102 > cmp rASL,x ;test result +28b9 : 08 > php ;save flags +28ba : bd0302 > lda abst,x +28bd : dd2002 > cmp rASL,x ;test result > trap_ne -284d : d0fe > bne * ;failed not equal (non zero) +28c0 : d0fe > bne * ;failed not equal (non zero) > -284f : 68 > pla ;load status +28c2 : 68 > pla ;load status > eor_flag 0 -2850 : 4930 > eor #0|fao ;invert expected flags + always on bits +28c3 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2852 : dd2102 > cmp fASL,x ;test flags +28c5 : dd3002 > cmp fASL,x ;test flags > trap_ne -2855 : d0fe > bne * ;failed not equal (non zero) +28c8 : d0fe > bne * ;failed not equal (non zero) > -2857 : ca dex -2858 : 10e0 bpl tasl8 -285a : a203 ldx #3 -285c : tasl9 +28ca : ca dex +28cb : 10e0 bpl tasl8 +28cd : a203 ldx #3 +28cf : tasl9 set_absx zp1,$ff > load_flag $ff -285c : a9ff > lda #$ff ;allow test to change I-flag (no mask) +28cf : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -285e : 48 > pha ;use stack to load status -285f : b513 > lda zp1,x ;load to indexed memory -2861 : 9d0302 > sta abst,x -2864 : 28 > plp +28d1 : 48 > pha ;use stack to load status +28d2 : b513 > lda zp1,x ;load to indexed memory +28d4 : 9d0302 > sta abst,x +28d7 : 28 > plp -2865 : 1e0302 asl abst,x +28d8 : 1e0302 asl abst,x tst_absx rASL,fASL,$ff-fnzc -2868 : 08 > php ;save flags -2869 : bd0302 > lda abst,x -286c : dd1102 > cmp rASL,x ;test result +28db : 08 > php ;save flags +28dc : bd0302 > lda abst,x +28df : dd2002 > cmp rASL,x ;test result > trap_ne -286f : d0fe > bne * ;failed not equal (non zero) +28e2 : d0fe > bne * ;failed not equal (non zero) > -2871 : 68 > pla ;load status +28e4 : 68 > pla ;load status > eor_flag $ff-fnzc -2872 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +28e5 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -2874 : dd2102 > cmp fASL,x ;test flags +28e7 : dd3002 > cmp fASL,x ;test flags > trap_ne -2877 : d0fe > bne * ;failed not equal (non zero) +28ea : d0fe > bne * ;failed not equal (non zero) > -2879 : ca dex -287a : 10e0 bpl tasl9 +28ec : ca dex +28ed : 10e0 bpl tasl9 -287c : a203 ldx #3 -287e : tlsr8 +28ef : a203 ldx #3 +28f1 : tlsr8 set_absx zp1,0 > load_flag 0 -287e : a900 > lda #0 ;allow test to change I-flag (no mask) +28f1 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2880 : 48 > pha ;use stack to load status -2881 : b513 > lda zp1,x ;load to indexed memory -2883 : 9d0302 > sta abst,x -2886 : 28 > plp +28f3 : 48 > pha ;use stack to load status +28f4 : b513 > lda zp1,x ;load to indexed memory +28f6 : 9d0302 > sta abst,x +28f9 : 28 > plp -2887 : 5e0302 lsr abst,x +28fa : 5e0302 lsr abst,x tst_absx rLSR,fLSR,0 -288a : 08 > php ;save flags -288b : bd0302 > lda abst,x -288e : dd1902 > cmp rLSR,x ;test result +28fd : 08 > php ;save flags +28fe : bd0302 > lda abst,x +2901 : dd2802 > cmp rLSR,x ;test result > trap_ne -2891 : d0fe > bne * ;failed not equal (non zero) +2904 : d0fe > bne * ;failed not equal (non zero) > -2893 : 68 > pla ;load status +2906 : 68 > pla ;load status > eor_flag 0 -2894 : 4930 > eor #0|fao ;invert expected flags + always on bits +2907 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2896 : dd2902 > cmp fLSR,x ;test flags +2909 : dd3802 > cmp fLSR,x ;test flags > trap_ne -2899 : d0fe > bne * ;failed not equal (non zero) +290c : d0fe > bne * ;failed not equal (non zero) > -289b : ca dex -289c : 10e0 bpl tlsr8 -289e : a203 ldx #3 -28a0 : tlsr9 +290e : ca dex +290f : 10e0 bpl tlsr8 +2911 : a203 ldx #3 +2913 : tlsr9 set_absx zp1,$ff > load_flag $ff -28a0 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2913 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -28a2 : 48 > pha ;use stack to load status -28a3 : b513 > lda zp1,x ;load to indexed memory -28a5 : 9d0302 > sta abst,x -28a8 : 28 > plp +2915 : 48 > pha ;use stack to load status +2916 : b513 > lda zp1,x ;load to indexed memory +2918 : 9d0302 > sta abst,x +291b : 28 > plp -28a9 : 5e0302 lsr abst,x +291c : 5e0302 lsr abst,x tst_absx rLSR,fLSR,$ff-fnzc -28ac : 08 > php ;save flags -28ad : bd0302 > lda abst,x -28b0 : dd1902 > cmp rLSR,x ;test result +291f : 08 > php ;save flags +2920 : bd0302 > lda abst,x +2923 : dd2802 > cmp rLSR,x ;test result > trap_ne -28b3 : d0fe > bne * ;failed not equal (non zero) +2926 : d0fe > bne * ;failed not equal (non zero) > -28b5 : 68 > pla ;load status +2928 : 68 > pla ;load status > eor_flag $ff-fnzc -28b6 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +2929 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -28b8 : dd2902 > cmp fLSR,x ;test flags +292b : dd3802 > cmp fLSR,x ;test flags > trap_ne -28bb : d0fe > bne * ;failed not equal (non zero) +292e : d0fe > bne * ;failed not equal (non zero) > -28bd : ca dex -28be : 10e0 bpl tlsr9 +2930 : ca dex +2931 : 10e0 bpl tlsr9 -28c0 : a203 ldx #3 -28c2 : trol8 +2933 : a203 ldx #3 +2935 : trol8 set_absx zp1,0 > load_flag 0 -28c2 : a900 > lda #0 ;allow test to change I-flag (no mask) +2935 : a900 > lda #0 ;allow test to change I-flag (no mask) > -28c4 : 48 > pha ;use stack to load status -28c5 : b513 > lda zp1,x ;load to indexed memory -28c7 : 9d0302 > sta abst,x -28ca : 28 > plp +2937 : 48 > pha ;use stack to load status +2938 : b513 > lda zp1,x ;load to indexed memory +293a : 9d0302 > sta abst,x +293d : 28 > plp -28cb : 3e0302 rol abst,x +293e : 3e0302 rol abst,x tst_absx rROL,fROL,0 -28ce : 08 > php ;save flags -28cf : bd0302 > lda abst,x -28d2 : dd1102 > cmp rROL,x ;test result +2941 : 08 > php ;save flags +2942 : bd0302 > lda abst,x +2945 : dd2002 > cmp rROL,x ;test result > trap_ne -28d5 : d0fe > bne * ;failed not equal (non zero) +2948 : d0fe > bne * ;failed not equal (non zero) > -28d7 : 68 > pla ;load status +294a : 68 > pla ;load status > eor_flag 0 -28d8 : 4930 > eor #0|fao ;invert expected flags + always on bits +294b : 4930 > eor #0|fao ;invert expected flags + always on bits > -28da : dd2102 > cmp fROL,x ;test flags +294d : dd3002 > cmp fROL,x ;test flags > trap_ne -28dd : d0fe > bne * ;failed not equal (non zero) +2950 : d0fe > bne * ;failed not equal (non zero) > -28df : ca dex -28e0 : 10e0 bpl trol8 -28e2 : a203 ldx #3 -28e4 : trol9 +2952 : ca dex +2953 : 10e0 bpl trol8 +2955 : a203 ldx #3 +2957 : trol9 set_absx zp1,$ff-fc > load_flag $ff-fc -28e4 : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) +2957 : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) > -28e6 : 48 > pha ;use stack to load status -28e7 : b513 > lda zp1,x ;load to indexed memory -28e9 : 9d0302 > sta abst,x -28ec : 28 > plp +2959 : 48 > pha ;use stack to load status +295a : b513 > lda zp1,x ;load to indexed memory +295c : 9d0302 > sta abst,x +295f : 28 > plp -28ed : 3e0302 rol abst,x +2960 : 3e0302 rol abst,x tst_absx rROL,fROL,$ff-fnzc -28f0 : 08 > php ;save flags -28f1 : bd0302 > lda abst,x -28f4 : dd1102 > cmp rROL,x ;test result +2963 : 08 > php ;save flags +2964 : bd0302 > lda abst,x +2967 : dd2002 > cmp rROL,x ;test result > trap_ne -28f7 : d0fe > bne * ;failed not equal (non zero) +296a : d0fe > bne * ;failed not equal (non zero) > -28f9 : 68 > pla ;load status +296c : 68 > pla ;load status > eor_flag $ff-fnzc -28fa : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +296d : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -28fc : dd2102 > cmp fROL,x ;test flags +296f : dd3002 > cmp fROL,x ;test flags > trap_ne -28ff : d0fe > bne * ;failed not equal (non zero) +2972 : d0fe > bne * ;failed not equal (non zero) > -2901 : ca dex -2902 : 10e0 bpl trol9 +2974 : ca dex +2975 : 10e0 bpl trol9 -2904 : a203 ldx #3 -2906 : trolc8 +2977 : a203 ldx #3 +2979 : trolc8 set_absx zp1,fc > load_flag fc -2906 : a901 > lda #fc ;allow test to change I-flag (no mask) +2979 : a901 > lda #fc ;allow test to change I-flag (no mask) > -2908 : 48 > pha ;use stack to load status -2909 : b513 > lda zp1,x ;load to indexed memory -290b : 9d0302 > sta abst,x -290e : 28 > plp +297b : 48 > pha ;use stack to load status +297c : b513 > lda zp1,x ;load to indexed memory +297e : 9d0302 > sta abst,x +2981 : 28 > plp -290f : 3e0302 rol abst,x +2982 : 3e0302 rol abst,x tst_absx rROLc,fROLc,0 -2912 : 08 > php ;save flags -2913 : bd0302 > lda abst,x -2916 : dd1502 > cmp rROLc,x ;test result +2985 : 08 > php ;save flags +2986 : bd0302 > lda abst,x +2989 : dd2402 > cmp rROLc,x ;test result > trap_ne -2919 : d0fe > bne * ;failed not equal (non zero) +298c : d0fe > bne * ;failed not equal (non zero) > -291b : 68 > pla ;load status +298e : 68 > pla ;load status > eor_flag 0 -291c : 4930 > eor #0|fao ;invert expected flags + always on bits +298f : 4930 > eor #0|fao ;invert expected flags + always on bits > -291e : dd2502 > cmp fROLc,x ;test flags +2991 : dd3402 > cmp fROLc,x ;test flags > trap_ne -2921 : d0fe > bne * ;failed not equal (non zero) +2994 : d0fe > bne * ;failed not equal (non zero) > -2923 : ca dex -2924 : 10e0 bpl trolc8 -2926 : a203 ldx #3 -2928 : trolc9 +2996 : ca dex +2997 : 10e0 bpl trolc8 +2999 : a203 ldx #3 +299b : trolc9 set_absx zp1,$ff > load_flag $ff -2928 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +299b : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -292a : 48 > pha ;use stack to load status -292b : b513 > lda zp1,x ;load to indexed memory -292d : 9d0302 > sta abst,x -2930 : 28 > plp +299d : 48 > pha ;use stack to load status +299e : b513 > lda zp1,x ;load to indexed memory +29a0 : 9d0302 > sta abst,x +29a3 : 28 > plp -2931 : 3e0302 rol abst,x +29a4 : 3e0302 rol abst,x tst_absx rROLc,fROLc,$ff-fnzc -2934 : 08 > php ;save flags -2935 : bd0302 > lda abst,x -2938 : dd1502 > cmp rROLc,x ;test result +29a7 : 08 > php ;save flags +29a8 : bd0302 > lda abst,x +29ab : dd2402 > cmp rROLc,x ;test result > trap_ne -293b : d0fe > bne * ;failed not equal (non zero) +29ae : d0fe > bne * ;failed not equal (non zero) > -293d : 68 > pla ;load status +29b0 : 68 > pla ;load status > eor_flag $ff-fnzc -293e : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +29b1 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -2940 : dd2502 > cmp fROLc,x ;test flags +29b3 : dd3402 > cmp fROLc,x ;test flags > trap_ne -2943 : d0fe > bne * ;failed not equal (non zero) +29b6 : d0fe > bne * ;failed not equal (non zero) > -2945 : ca dex -2946 : 10e0 bpl trolc9 +29b8 : ca dex +29b9 : 10e0 bpl trolc9 -2948 : a203 ldx #3 -294a : tror8 +29bb : a203 ldx #3 +29bd : tror8 set_absx zp1,0 > load_flag 0 -294a : a900 > lda #0 ;allow test to change I-flag (no mask) +29bd : a900 > lda #0 ;allow test to change I-flag (no mask) > -294c : 48 > pha ;use stack to load status -294d : b513 > lda zp1,x ;load to indexed memory -294f : 9d0302 > sta abst,x -2952 : 28 > plp +29bf : 48 > pha ;use stack to load status +29c0 : b513 > lda zp1,x ;load to indexed memory +29c2 : 9d0302 > sta abst,x +29c5 : 28 > plp -2953 : 7e0302 ror abst,x +29c6 : 7e0302 ror abst,x tst_absx rROR,fROR,0 -2956 : 08 > php ;save flags -2957 : bd0302 > lda abst,x -295a : dd1902 > cmp rROR,x ;test result +29c9 : 08 > php ;save flags +29ca : bd0302 > lda abst,x +29cd : dd2802 > cmp rROR,x ;test result > trap_ne -295d : d0fe > bne * ;failed not equal (non zero) +29d0 : d0fe > bne * ;failed not equal (non zero) > -295f : 68 > pla ;load status +29d2 : 68 > pla ;load status > eor_flag 0 -2960 : 4930 > eor #0|fao ;invert expected flags + always on bits +29d3 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2962 : dd2902 > cmp fROR,x ;test flags +29d5 : dd3802 > cmp fROR,x ;test flags > trap_ne -2965 : d0fe > bne * ;failed not equal (non zero) +29d8 : d0fe > bne * ;failed not equal (non zero) > -2967 : ca dex -2968 : 10e0 bpl tror8 -296a : a203 ldx #3 -296c : tror9 +29da : ca dex +29db : 10e0 bpl tror8 +29dd : a203 ldx #3 +29df : tror9 set_absx zp1,$ff-fc > load_flag $ff-fc -296c : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) +29df : a9fe > lda #$ff-fc ;allow test to change I-flag (no mask) > -296e : 48 > pha ;use stack to load status -296f : b513 > lda zp1,x ;load to indexed memory -2971 : 9d0302 > sta abst,x -2974 : 28 > plp +29e1 : 48 > pha ;use stack to load status +29e2 : b513 > lda zp1,x ;load to indexed memory +29e4 : 9d0302 > sta abst,x +29e7 : 28 > plp -2975 : 7e0302 ror abst,x +29e8 : 7e0302 ror abst,x tst_absx rROR,fROR,$ff-fnzc -2978 : 08 > php ;save flags -2979 : bd0302 > lda abst,x -297c : dd1902 > cmp rROR,x ;test result +29eb : 08 > php ;save flags +29ec : bd0302 > lda abst,x +29ef : dd2802 > cmp rROR,x ;test result > trap_ne -297f : d0fe > bne * ;failed not equal (non zero) +29f2 : d0fe > bne * ;failed not equal (non zero) > -2981 : 68 > pla ;load status +29f4 : 68 > pla ;load status > eor_flag $ff-fnzc -2982 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits +29f5 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -2984 : dd2902 > cmp fROR,x ;test flags +29f7 : dd3802 > cmp fROR,x ;test flags > trap_ne -2987 : d0fe > bne * ;failed not equal (non zero) +29fa : d0fe > bne * ;failed not equal (non zero) > -2989 : ca dex -298a : 10e0 bpl tror9 +29fc : ca dex +29fd : 10e0 bpl tror9 -298c : a203 ldx #3 -298e : trorc8 +29ff : a203 ldx #3 +2a01 : trorc8 set_absx zp1,fc > load_flag fc -298e : a901 > lda #fc ;allow test to change I-flag (no mask) +2a01 : a901 > lda #fc ;allow test to change I-flag (no mask) > -2990 : 48 > pha ;use stack to load status -2991 : b513 > lda zp1,x ;load to indexed memory -2993 : 9d0302 > sta abst,x -2996 : 28 > plp +2a03 : 48 > pha ;use stack to load status +2a04 : b513 > lda zp1,x ;load to indexed memory +2a06 : 9d0302 > sta abst,x +2a09 : 28 > plp -2997 : 7e0302 ror abst,x +2a0a : 7e0302 ror abst,x tst_absx rRORc,fRORc,0 -299a : 08 > php ;save flags -299b : bd0302 > lda abst,x -299e : dd1d02 > cmp rRORc,x ;test result - > trap_ne -29a1 : d0fe > bne * ;failed not equal (non zero) - > -29a3 : 68 > pla ;load status - > eor_flag 0 -29a4 : 4930 > eor #0|fao ;invert expected flags + always on bits - > -29a6 : dd2d02 > cmp fRORc,x ;test flags - > trap_ne -29a9 : d0fe > bne * ;failed not equal (non zero) - > - -29ab : ca dex -29ac : 10e0 bpl trorc8 -29ae : a203 ldx #3 -29b0 : trorc9 - set_absx zp1,$ff - > load_flag $ff -29b0 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -29b2 : 48 > pha ;use stack to load status -29b3 : b513 > lda zp1,x ;load to indexed memory -29b5 : 9d0302 > sta abst,x -29b8 : 28 > plp - -29b9 : 7e0302 ror abst,x - tst_absx rRORc,fRORc,$ff-fnzc -29bc : 08 > php ;save flags -29bd : bd0302 > lda abst,x -29c0 : dd1d02 > cmp rRORc,x ;test result - > trap_ne -29c3 : d0fe > bne * ;failed not equal (non zero) - > -29c5 : 68 > pla ;load status - > eor_flag $ff-fnzc -29c6 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits - > -29c8 : dd2d02 > cmp fRORc,x ;test flags - > trap_ne -29cb : d0fe > bne * ;failed not equal (non zero) - > - -29cd : ca dex -29ce : 10e0 bpl trorc9 - next_test -29d0 : ad0002 > lda test_case ;previous test -29d3 : c921 > cmp #test_num - > trap_ne ;test is out of sequence -29d5 : d0fe > bne * ;failed not equal (non zero) - > -0022 = >test_num = test_num + 1 -29d7 : a922 > lda #test_num ;*** next tests' number -29d9 : 8d0002 > sta test_case - > ;check_ram ;uncomment to find altered RAM after each test - - - ; testing memory increment/decrement - INC DEC all addressing modes - ; zeropage -29dc : a200 ldx #0 -29de : a97e lda #$7e -29e0 : 850c sta zpt -29e2 : tinc - set_stat 0 - > load_flag 0 -29e2 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -29e4 : 48 > pha ;use stack to load status -29e5 : 28 > plp - -29e6 : e60c inc zpt - tst_z rINC,fINC,0 -29e8 : 08 > php ;save flags -29e9 : a50c > lda zpt -29eb : dd3102 > cmp rINC,x ;test result - > trap_ne -29ee : d0fe > bne * ;failed not equal (non zero) - > -29f0 : 68 > pla ;load status - > eor_flag 0 -29f1 : 4930 > eor #0|fao ;invert expected flags + always on bits - > -29f3 : dd3602 > cmp fINC,x ;test flags - > trap_ne -29f6 : d0fe > bne * ;failed not equal (non zero) - > - -29f8 : e8 inx -29f9 : e002 cpx #2 -29fb : d004 bne tinc1 -29fd : a9fe lda #$fe -29ff : 850c sta zpt -2a01 : e005 tinc1 cpx #5 -2a03 : d0dd bne tinc -2a05 : ca dex -2a06 : e60c inc zpt -2a08 : tdec - set_stat 0 - > load_flag 0 -2a08 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -2a0a : 48 > pha ;use stack to load status -2a0b : 28 > plp - -2a0c : c60c dec zpt - tst_z rINC,fINC,0 -2a0e : 08 > php ;save flags -2a0f : a50c > lda zpt -2a11 : dd3102 > cmp rINC,x ;test result +2a0d : 08 > php ;save flags +2a0e : bd0302 > lda abst,x +2a11 : dd2c02 > cmp rRORc,x ;test result > trap_ne 2a14 : d0fe > bne * ;failed not equal (non zero) > @@ -10918,1290 +11026,1279 @@ ffff = ram_top = -1 > eor_flag 0 2a17 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2a19 : dd3602 > cmp fINC,x ;test flags +2a19 : dd3c02 > cmp fRORc,x ;test flags > trap_ne 2a1c : d0fe > bne * ;failed not equal (non zero) > 2a1e : ca dex -2a1f : 300a bmi tdec1 -2a21 : e001 cpx #1 -2a23 : d0e3 bne tdec -2a25 : a981 lda #$81 -2a27 : 850c sta zpt -2a29 : d0dd bne tdec -2a2b : tdec1 -2a2b : a200 ldx #0 -2a2d : a97e lda #$7e -2a2f : 850c sta zpt -2a31 : tinc10 - set_stat $ff +2a1f : 10e0 bpl trorc8 +2a21 : a203 ldx #3 +2a23 : trorc9 + set_absx zp1,$ff > load_flag $ff -2a31 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2a23 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2a33 : 48 > pha ;use stack to load status -2a34 : 28 > plp +2a25 : 48 > pha ;use stack to load status +2a26 : b513 > lda zp1,x ;load to indexed memory +2a28 : 9d0302 > sta abst,x +2a2b : 28 > plp -2a35 : e60c inc zpt - tst_z rINC,fINC,$ff-fnz -2a37 : 08 > php ;save flags -2a38 : a50c > lda zpt -2a3a : dd3102 > cmp rINC,x ;test result +2a2c : 7e0302 ror abst,x + tst_absx rRORc,fRORc,$ff-fnzc +2a2f : 08 > php ;save flags +2a30 : bd0302 > lda abst,x +2a33 : dd2c02 > cmp rRORc,x ;test result > trap_ne -2a3d : d0fe > bne * ;failed not equal (non zero) +2a36 : d0fe > bne * ;failed not equal (non zero) > -2a3f : 68 > pla ;load status - > eor_flag $ff-fnz -2a40 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +2a38 : 68 > pla ;load status + > eor_flag $ff-fnzc +2a39 : 497c > eor #$ff-fnzc|fao ;invert expected flags + always on bits > -2a42 : dd3602 > cmp fINC,x ;test flags +2a3b : dd3c02 > cmp fRORc,x ;test flags > trap_ne -2a45 : d0fe > bne * ;failed not equal (non zero) +2a3e : d0fe > bne * ;failed not equal (non zero) > -2a47 : e8 inx -2a48 : e002 cpx #2 -2a4a : d004 bne tinc11 -2a4c : a9fe lda #$fe -2a4e : 850c sta zpt -2a50 : e005 tinc11 cpx #5 -2a52 : d0dd bne tinc10 -2a54 : ca dex -2a55 : e60c inc zpt -2a57 : tdec10 - set_stat $ff - > load_flag $ff -2a57 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -2a59 : 48 > pha ;use stack to load status -2a5a : 28 > plp - -2a5b : c60c dec zpt - tst_z rINC,fINC,$ff-fnz -2a5d : 08 > php ;save flags -2a5e : a50c > lda zpt -2a60 : dd3102 > cmp rINC,x ;test result - > trap_ne -2a63 : d0fe > bne * ;failed not equal (non zero) - > -2a65 : 68 > pla ;load status - > eor_flag $ff-fnz -2a66 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits - > -2a68 : dd3602 > cmp fINC,x ;test flags - > trap_ne -2a6b : d0fe > bne * ;failed not equal (non zero) - > - -2a6d : ca dex -2a6e : 300a bmi tdec11 -2a70 : e001 cpx #1 -2a72 : d0e3 bne tdec10 -2a74 : a981 lda #$81 -2a76 : 850c sta zpt -2a78 : d0dd bne tdec10 -2a7a : tdec11 +2a40 : ca dex +2a41 : 10e0 bpl trorc9 next_test -2a7a : ad0002 > lda test_case ;previous test -2a7d : c922 > cmp #test_num +2a43 : ad0002 > lda test_case ;previous test +2a46 : c921 > cmp #test_num > trap_ne ;test is out of sequence -2a7f : d0fe > bne * ;failed not equal (non zero) +2a48 : d0fe > bne * ;failed not equal (non zero) + > +0022 = >test_num = test_num + 1 +2a4a : a922 > lda #test_num ;*** next tests' number +2a4c : 8d0002 > sta test_case + > ;check_ram ;uncomment to find altered RAM after each test + + + ; testing memory increment/decrement - INC DEC all addressing modes + ; zeropage +2a4f : a200 ldx #0 +2a51 : a97e lda #$7e +2a53 : 850c sta zpt +2a55 : tinc + set_stat 0 + > load_flag 0 +2a55 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +2a57 : 48 > pha ;use stack to load status +2a58 : 28 > plp + +2a59 : e60c inc zpt + tst_z rINC,fINC,0 +2a5b : 08 > php ;save flags +2a5c : a50c > lda zpt +2a5e : dd4002 > cmp rINC,x ;test result + > trap_ne +2a61 : d0fe > bne * ;failed not equal (non zero) + > +2a63 : 68 > pla ;load status + > eor_flag 0 +2a64 : 4930 > eor #0|fao ;invert expected flags + always on bits + > +2a66 : dd4502 > cmp fINC,x ;test flags + > trap_ne +2a69 : d0fe > bne * ;failed not equal (non zero) + > + +2a6b : e8 inx +2a6c : e002 cpx #2 +2a6e : d004 bne tinc1 +2a70 : a9fe lda #$fe +2a72 : 850c sta zpt +2a74 : e005 tinc1 cpx #5 +2a76 : d0dd bne tinc +2a78 : ca dex +2a79 : e60c inc zpt +2a7b : tdec + set_stat 0 + > load_flag 0 +2a7b : a900 > lda #0 ;allow test to change I-flag (no mask) + > +2a7d : 48 > pha ;use stack to load status +2a7e : 28 > plp + +2a7f : c60c dec zpt + tst_z rINC,fINC,0 +2a81 : 08 > php ;save flags +2a82 : a50c > lda zpt +2a84 : dd4002 > cmp rINC,x ;test result + > trap_ne +2a87 : d0fe > bne * ;failed not equal (non zero) + > +2a89 : 68 > pla ;load status + > eor_flag 0 +2a8a : 4930 > eor #0|fao ;invert expected flags + always on bits + > +2a8c : dd4502 > cmp fINC,x ;test flags + > trap_ne +2a8f : d0fe > bne * ;failed not equal (non zero) + > + +2a91 : ca dex +2a92 : 300a bmi tdec1 +2a94 : e001 cpx #1 +2a96 : d0e3 bne tdec +2a98 : a981 lda #$81 +2a9a : 850c sta zpt +2a9c : d0dd bne tdec +2a9e : tdec1 +2a9e : a200 ldx #0 +2aa0 : a97e lda #$7e +2aa2 : 850c sta zpt +2aa4 : tinc10 + set_stat $ff + > load_flag $ff +2aa4 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +2aa6 : 48 > pha ;use stack to load status +2aa7 : 28 > plp + +2aa8 : e60c inc zpt + tst_z rINC,fINC,$ff-fnz +2aaa : 08 > php ;save flags +2aab : a50c > lda zpt +2aad : dd4002 > cmp rINC,x ;test result + > trap_ne +2ab0 : d0fe > bne * ;failed not equal (non zero) + > +2ab2 : 68 > pla ;load status + > eor_flag $ff-fnz +2ab3 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits + > +2ab5 : dd4502 > cmp fINC,x ;test flags + > trap_ne +2ab8 : d0fe > bne * ;failed not equal (non zero) + > + +2aba : e8 inx +2abb : e002 cpx #2 +2abd : d004 bne tinc11 +2abf : a9fe lda #$fe +2ac1 : 850c sta zpt +2ac3 : e005 tinc11 cpx #5 +2ac5 : d0dd bne tinc10 +2ac7 : ca dex +2ac8 : e60c inc zpt +2aca : tdec10 + set_stat $ff + > load_flag $ff +2aca : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +2acc : 48 > pha ;use stack to load status +2acd : 28 > plp + +2ace : c60c dec zpt + tst_z rINC,fINC,$ff-fnz +2ad0 : 08 > php ;save flags +2ad1 : a50c > lda zpt +2ad3 : dd4002 > cmp rINC,x ;test result + > trap_ne +2ad6 : d0fe > bne * ;failed not equal (non zero) + > +2ad8 : 68 > pla ;load status + > eor_flag $ff-fnz +2ad9 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits + > +2adb : dd4502 > cmp fINC,x ;test flags + > trap_ne +2ade : d0fe > bne * ;failed not equal (non zero) + > + +2ae0 : ca dex +2ae1 : 300a bmi tdec11 +2ae3 : e001 cpx #1 +2ae5 : d0e3 bne tdec10 +2ae7 : a981 lda #$81 +2ae9 : 850c sta zpt +2aeb : d0dd bne tdec10 +2aed : tdec11 + next_test +2aed : ad0002 > lda test_case ;previous test +2af0 : c922 > cmp #test_num + > trap_ne ;test is out of sequence +2af2 : d0fe > bne * ;failed not equal (non zero) > 0023 = >test_num = test_num + 1 -2a81 : a923 > lda #test_num ;*** next tests' number -2a83 : 8d0002 > sta test_case +2af4 : a923 > lda #test_num ;*** next tests' number +2af6 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; absolute memory -2a86 : a200 ldx #0 -2a88 : a97e lda #$7e -2a8a : 8d0302 sta abst -2a8d : tinc2 +2af9 : a200 ldx #0 +2afb : a97e lda #$7e +2afd : 8d0302 sta abst +2b00 : tinc2 set_stat 0 > load_flag 0 -2a8d : a900 > lda #0 ;allow test to change I-flag (no mask) +2b00 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2a8f : 48 > pha ;use stack to load status -2a90 : 28 > plp +2b02 : 48 > pha ;use stack to load status +2b03 : 28 > plp -2a91 : ee0302 inc abst +2b04 : ee0302 inc abst tst_abs rINC,fINC,0 -2a94 : 08 > php ;save flags -2a95 : ad0302 > lda abst -2a98 : dd3102 > cmp rINC,x ;test result +2b07 : 08 > php ;save flags +2b08 : ad0302 > lda abst +2b0b : dd4002 > cmp rINC,x ;test result > trap_ne -2a9b : d0fe > bne * ;failed not equal (non zero) +2b0e : d0fe > bne * ;failed not equal (non zero) > -2a9d : 68 > pla ;load status +2b10 : 68 > pla ;load status > eor_flag 0 -2a9e : 4930 > eor #0|fao ;invert expected flags + always on bits +2b11 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2aa0 : dd3602 > cmp fINC,x ;test flags +2b13 : dd4502 > cmp fINC,x ;test flags > trap_ne -2aa3 : d0fe > bne * ;failed not equal (non zero) - > - -2aa5 : e8 inx -2aa6 : e002 cpx #2 -2aa8 : d005 bne tinc3 -2aaa : a9fe lda #$fe -2aac : 8d0302 sta abst -2aaf : e005 tinc3 cpx #5 -2ab1 : d0da bne tinc2 -2ab3 : ca dex -2ab4 : ee0302 inc abst -2ab7 : tdec2 - set_stat 0 - > load_flag 0 -2ab7 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -2ab9 : 48 > pha ;use stack to load status -2aba : 28 > plp - -2abb : ce0302 dec abst - tst_abs rINC,fINC,0 -2abe : 08 > php ;save flags -2abf : ad0302 > lda abst -2ac2 : dd3102 > cmp rINC,x ;test result - > trap_ne -2ac5 : d0fe > bne * ;failed not equal (non zero) - > -2ac7 : 68 > pla ;load status - > eor_flag 0 -2ac8 : 4930 > eor #0|fao ;invert expected flags + always on bits - > -2aca : dd3602 > cmp fINC,x ;test flags - > trap_ne -2acd : d0fe > bne * ;failed not equal (non zero) - > - -2acf : ca dex -2ad0 : 300b bmi tdec3 -2ad2 : e001 cpx #1 -2ad4 : d0e1 bne tdec2 -2ad6 : a981 lda #$81 -2ad8 : 8d0302 sta abst -2adb : d0da bne tdec2 -2add : tdec3 -2add : a200 ldx #0 -2adf : a97e lda #$7e -2ae1 : 8d0302 sta abst -2ae4 : tinc12 - set_stat $ff - > load_flag $ff -2ae4 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -2ae6 : 48 > pha ;use stack to load status -2ae7 : 28 > plp - -2ae8 : ee0302 inc abst - tst_abs rINC,fINC,$ff-fnz -2aeb : 08 > php ;save flags -2aec : ad0302 > lda abst -2aef : dd3102 > cmp rINC,x ;test result - > trap_ne -2af2 : d0fe > bne * ;failed not equal (non zero) - > -2af4 : 68 > pla ;load status - > eor_flag $ff-fnz -2af5 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits - > -2af7 : dd3602 > cmp fINC,x ;test flags - > trap_ne -2afa : d0fe > bne * ;failed not equal (non zero) - > - -2afc : e8 inx -2afd : e002 cpx #2 -2aff : d005 bne tinc13 -2b01 : a9fe lda #$fe -2b03 : 8d0302 sta abst -2b06 : e005 tinc13 cpx #5 -2b08 : d0da bne tinc12 -2b0a : ca dex -2b0b : ee0302 inc abst -2b0e : tdec12 - set_stat $ff - > load_flag $ff -2b0e : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -2b10 : 48 > pha ;use stack to load status -2b11 : 28 > plp - -2b12 : ce0302 dec abst - tst_abs rINC,fINC,$ff-fnz -2b15 : 08 > php ;save flags -2b16 : ad0302 > lda abst -2b19 : dd3102 > cmp rINC,x ;test result - > trap_ne -2b1c : d0fe > bne * ;failed not equal (non zero) - > -2b1e : 68 > pla ;load status - > eor_flag $ff-fnz -2b1f : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits - > -2b21 : dd3602 > cmp fINC,x ;test flags - > trap_ne -2b24 : d0fe > bne * ;failed not equal (non zero) +2b16 : d0fe > bne * ;failed not equal (non zero) > +2b18 : e8 inx +2b19 : e002 cpx #2 +2b1b : d005 bne tinc3 +2b1d : a9fe lda #$fe +2b1f : 8d0302 sta abst +2b22 : e005 tinc3 cpx #5 +2b24 : d0da bne tinc2 2b26 : ca dex -2b27 : 300b bmi tdec13 -2b29 : e001 cpx #1 -2b2b : d0e1 bne tdec12 -2b2d : a981 lda #$81 -2b2f : 8d0302 sta abst -2b32 : d0da bne tdec12 -2b34 : tdec13 +2b27 : ee0302 inc abst +2b2a : tdec2 + set_stat 0 + > load_flag 0 +2b2a : a900 > lda #0 ;allow test to change I-flag (no mask) + > +2b2c : 48 > pha ;use stack to load status +2b2d : 28 > plp + +2b2e : ce0302 dec abst + tst_abs rINC,fINC,0 +2b31 : 08 > php ;save flags +2b32 : ad0302 > lda abst +2b35 : dd4002 > cmp rINC,x ;test result + > trap_ne +2b38 : d0fe > bne * ;failed not equal (non zero) + > +2b3a : 68 > pla ;load status + > eor_flag 0 +2b3b : 4930 > eor #0|fao ;invert expected flags + always on bits + > +2b3d : dd4502 > cmp fINC,x ;test flags + > trap_ne +2b40 : d0fe > bne * ;failed not equal (non zero) + > + +2b42 : ca dex +2b43 : 300b bmi tdec3 +2b45 : e001 cpx #1 +2b47 : d0e1 bne tdec2 +2b49 : a981 lda #$81 +2b4b : 8d0302 sta abst +2b4e : d0da bne tdec2 +2b50 : tdec3 +2b50 : a200 ldx #0 +2b52 : a97e lda #$7e +2b54 : 8d0302 sta abst +2b57 : tinc12 + set_stat $ff + > load_flag $ff +2b57 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +2b59 : 48 > pha ;use stack to load status +2b5a : 28 > plp + +2b5b : ee0302 inc abst + tst_abs rINC,fINC,$ff-fnz +2b5e : 08 > php ;save flags +2b5f : ad0302 > lda abst +2b62 : dd4002 > cmp rINC,x ;test result + > trap_ne +2b65 : d0fe > bne * ;failed not equal (non zero) + > +2b67 : 68 > pla ;load status + > eor_flag $ff-fnz +2b68 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits + > +2b6a : dd4502 > cmp fINC,x ;test flags + > trap_ne +2b6d : d0fe > bne * ;failed not equal (non zero) + > + +2b6f : e8 inx +2b70 : e002 cpx #2 +2b72 : d005 bne tinc13 +2b74 : a9fe lda #$fe +2b76 : 8d0302 sta abst +2b79 : e005 tinc13 cpx #5 +2b7b : d0da bne tinc12 +2b7d : ca dex +2b7e : ee0302 inc abst +2b81 : tdec12 + set_stat $ff + > load_flag $ff +2b81 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +2b83 : 48 > pha ;use stack to load status +2b84 : 28 > plp + +2b85 : ce0302 dec abst + tst_abs rINC,fINC,$ff-fnz +2b88 : 08 > php ;save flags +2b89 : ad0302 > lda abst +2b8c : dd4002 > cmp rINC,x ;test result + > trap_ne +2b8f : d0fe > bne * ;failed not equal (non zero) + > +2b91 : 68 > pla ;load status + > eor_flag $ff-fnz +2b92 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits + > +2b94 : dd4502 > cmp fINC,x ;test flags + > trap_ne +2b97 : d0fe > bne * ;failed not equal (non zero) + > + +2b99 : ca dex +2b9a : 300b bmi tdec13 +2b9c : e001 cpx #1 +2b9e : d0e1 bne tdec12 +2ba0 : a981 lda #$81 +2ba2 : 8d0302 sta abst +2ba5 : d0da bne tdec12 +2ba7 : tdec13 next_test -2b34 : ad0002 > lda test_case ;previous test -2b37 : c923 > cmp #test_num +2ba7 : ad0002 > lda test_case ;previous test +2baa : c923 > cmp #test_num > trap_ne ;test is out of sequence -2b39 : d0fe > bne * ;failed not equal (non zero) +2bac : d0fe > bne * ;failed not equal (non zero) > 0024 = >test_num = test_num + 1 -2b3b : a924 > lda #test_num ;*** next tests' number -2b3d : 8d0002 > sta test_case +2bae : a924 > lda #test_num ;*** next tests' number +2bb0 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; zeropage indexed -2b40 : a200 ldx #0 -2b42 : a97e lda #$7e -2b44 : 950c tinc4 sta zpt,x +2bb3 : a200 ldx #0 +2bb5 : a97e lda #$7e +2bb7 : 950c tinc4 sta zpt,x set_stat 0 > load_flag 0 -2b46 : a900 > lda #0 ;allow test to change I-flag (no mask) +2bb9 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2b48 : 48 > pha ;use stack to load status -2b49 : 28 > plp +2bbb : 48 > pha ;use stack to load status +2bbc : 28 > plp -2b4a : f60c inc zpt,x +2bbd : f60c inc zpt,x tst_zx rINC,fINC,0 -2b4c : 08 > php ;save flags -2b4d : b50c > lda zpt,x -2b4f : dd3102 > cmp rINC,x ;test result +2bbf : 08 > php ;save flags +2bc0 : b50c > lda zpt,x +2bc2 : dd4002 > cmp rINC,x ;test result > trap_ne -2b52 : d0fe > bne * ;failed not equal (non zero) +2bc5 : d0fe > bne * ;failed not equal (non zero) > -2b54 : 68 > pla ;load status +2bc7 : 68 > pla ;load status > eor_flag 0 -2b55 : 4930 > eor #0|fao ;invert expected flags + always on bits +2bc8 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2b57 : dd3602 > cmp fINC,x ;test flags +2bca : dd4502 > cmp fINC,x ;test flags > trap_ne -2b5a : d0fe > bne * ;failed not equal (non zero) +2bcd : d0fe > bne * ;failed not equal (non zero) > -2b5c : b50c lda zpt,x -2b5e : e8 inx -2b5f : e002 cpx #2 -2b61 : d002 bne tinc5 -2b63 : a9fe lda #$fe -2b65 : e005 tinc5 cpx #5 -2b67 : d0db bne tinc4 -2b69 : ca dex -2b6a : a902 lda #2 -2b6c : 950c tdec4 sta zpt,x +2bcf : b50c lda zpt,x +2bd1 : e8 inx +2bd2 : e002 cpx #2 +2bd4 : d002 bne tinc5 +2bd6 : a9fe lda #$fe +2bd8 : e005 tinc5 cpx #5 +2bda : d0db bne tinc4 +2bdc : ca dex +2bdd : a902 lda #2 +2bdf : 950c tdec4 sta zpt,x set_stat 0 > load_flag 0 -2b6e : a900 > lda #0 ;allow test to change I-flag (no mask) +2be1 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2b70 : 48 > pha ;use stack to load status -2b71 : 28 > plp +2be3 : 48 > pha ;use stack to load status +2be4 : 28 > plp -2b72 : d60c dec zpt,x +2be5 : d60c dec zpt,x tst_zx rINC,fINC,0 -2b74 : 08 > php ;save flags -2b75 : b50c > lda zpt,x -2b77 : dd3102 > cmp rINC,x ;test result +2be7 : 08 > php ;save flags +2be8 : b50c > lda zpt,x +2bea : dd4002 > cmp rINC,x ;test result > trap_ne -2b7a : d0fe > bne * ;failed not equal (non zero) +2bed : d0fe > bne * ;failed not equal (non zero) > -2b7c : 68 > pla ;load status +2bef : 68 > pla ;load status > eor_flag 0 -2b7d : 4930 > eor #0|fao ;invert expected flags + always on bits +2bf0 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2b7f : dd3602 > cmp fINC,x ;test flags +2bf2 : dd4502 > cmp fINC,x ;test flags > trap_ne -2b82 : d0fe > bne * ;failed not equal (non zero) +2bf5 : d0fe > bne * ;failed not equal (non zero) > -2b84 : b50c lda zpt,x -2b86 : ca dex -2b87 : 3008 bmi tdec5 -2b89 : e001 cpx #1 -2b8b : d0df bne tdec4 -2b8d : a981 lda #$81 -2b8f : d0db bne tdec4 -2b91 : tdec5 -2b91 : a200 ldx #0 -2b93 : a97e lda #$7e -2b95 : 950c tinc14 sta zpt,x +2bf7 : b50c lda zpt,x +2bf9 : ca dex +2bfa : 3008 bmi tdec5 +2bfc : e001 cpx #1 +2bfe : d0df bne tdec4 +2c00 : a981 lda #$81 +2c02 : d0db bne tdec4 +2c04 : tdec5 +2c04 : a200 ldx #0 +2c06 : a97e lda #$7e +2c08 : 950c tinc14 sta zpt,x set_stat $ff > load_flag $ff -2b97 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2c0a : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2b99 : 48 > pha ;use stack to load status -2b9a : 28 > plp +2c0c : 48 > pha ;use stack to load status +2c0d : 28 > plp -2b9b : f60c inc zpt,x +2c0e : f60c inc zpt,x tst_zx rINC,fINC,$ff-fnz -2b9d : 08 > php ;save flags -2b9e : b50c > lda zpt,x -2ba0 : dd3102 > cmp rINC,x ;test result +2c10 : 08 > php ;save flags +2c11 : b50c > lda zpt,x +2c13 : dd4002 > cmp rINC,x ;test result > trap_ne -2ba3 : d0fe > bne * ;failed not equal (non zero) +2c16 : d0fe > bne * ;failed not equal (non zero) > -2ba5 : 68 > pla ;load status +2c18 : 68 > pla ;load status > eor_flag $ff-fnz -2ba6 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +2c19 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -2ba8 : dd3602 > cmp fINC,x ;test flags +2c1b : dd4502 > cmp fINC,x ;test flags > trap_ne -2bab : d0fe > bne * ;failed not equal (non zero) +2c1e : d0fe > bne * ;failed not equal (non zero) > -2bad : b50c lda zpt,x -2baf : e8 inx -2bb0 : e002 cpx #2 -2bb2 : d002 bne tinc15 -2bb4 : a9fe lda #$fe -2bb6 : e005 tinc15 cpx #5 -2bb8 : d0db bne tinc14 -2bba : ca dex -2bbb : a902 lda #2 -2bbd : 950c tdec14 sta zpt,x +2c20 : b50c lda zpt,x +2c22 : e8 inx +2c23 : e002 cpx #2 +2c25 : d002 bne tinc15 +2c27 : a9fe lda #$fe +2c29 : e005 tinc15 cpx #5 +2c2b : d0db bne tinc14 +2c2d : ca dex +2c2e : a902 lda #2 +2c30 : 950c tdec14 sta zpt,x set_stat $ff > load_flag $ff -2bbf : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2c32 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2bc1 : 48 > pha ;use stack to load status -2bc2 : 28 > plp +2c34 : 48 > pha ;use stack to load status +2c35 : 28 > plp -2bc3 : d60c dec zpt,x +2c36 : d60c dec zpt,x tst_zx rINC,fINC,$ff-fnz -2bc5 : 08 > php ;save flags -2bc6 : b50c > lda zpt,x -2bc8 : dd3102 > cmp rINC,x ;test result +2c38 : 08 > php ;save flags +2c39 : b50c > lda zpt,x +2c3b : dd4002 > cmp rINC,x ;test result > trap_ne -2bcb : d0fe > bne * ;failed not equal (non zero) +2c3e : d0fe > bne * ;failed not equal (non zero) > -2bcd : 68 > pla ;load status +2c40 : 68 > pla ;load status > eor_flag $ff-fnz -2bce : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +2c41 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -2bd0 : dd3602 > cmp fINC,x ;test flags +2c43 : dd4502 > cmp fINC,x ;test flags > trap_ne -2bd3 : d0fe > bne * ;failed not equal (non zero) +2c46 : d0fe > bne * ;failed not equal (non zero) > -2bd5 : b50c lda zpt,x -2bd7 : ca dex -2bd8 : 3008 bmi tdec15 -2bda : e001 cpx #1 -2bdc : d0df bne tdec14 -2bde : a981 lda #$81 -2be0 : d0db bne tdec14 -2be2 : tdec15 +2c48 : b50c lda zpt,x +2c4a : ca dex +2c4b : 3008 bmi tdec15 +2c4d : e001 cpx #1 +2c4f : d0df bne tdec14 +2c51 : a981 lda #$81 +2c53 : d0db bne tdec14 +2c55 : tdec15 next_test -2be2 : ad0002 > lda test_case ;previous test -2be5 : c924 > cmp #test_num +2c55 : ad0002 > lda test_case ;previous test +2c58 : c924 > cmp #test_num > trap_ne ;test is out of sequence -2be7 : d0fe > bne * ;failed not equal (non zero) +2c5a : d0fe > bne * ;failed not equal (non zero) > 0025 = >test_num = test_num + 1 -2be9 : a925 > lda #test_num ;*** next tests' number -2beb : 8d0002 > sta test_case +2c5c : a925 > lda #test_num ;*** next tests' number +2c5e : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; memory indexed -2bee : a200 ldx #0 -2bf0 : a97e lda #$7e -2bf2 : 9d0302 tinc6 sta abst,x +2c61 : a200 ldx #0 +2c63 : a97e lda #$7e +2c65 : 9d0302 tinc6 sta abst,x set_stat 0 > load_flag 0 -2bf5 : a900 > lda #0 ;allow test to change I-flag (no mask) +2c68 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2bf7 : 48 > pha ;use stack to load status -2bf8 : 28 > plp +2c6a : 48 > pha ;use stack to load status +2c6b : 28 > plp -2bf9 : fe0302 inc abst,x +2c6c : fe0302 inc abst,x tst_absx rINC,fINC,0 -2bfc : 08 > php ;save flags -2bfd : bd0302 > lda abst,x -2c00 : dd3102 > cmp rINC,x ;test result +2c6f : 08 > php ;save flags +2c70 : bd0302 > lda abst,x +2c73 : dd4002 > cmp rINC,x ;test result > trap_ne -2c03 : d0fe > bne * ;failed not equal (non zero) +2c76 : d0fe > bne * ;failed not equal (non zero) > -2c05 : 68 > pla ;load status +2c78 : 68 > pla ;load status > eor_flag 0 -2c06 : 4930 > eor #0|fao ;invert expected flags + always on bits +2c79 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2c08 : dd3602 > cmp fINC,x ;test flags +2c7b : dd4502 > cmp fINC,x ;test flags > trap_ne -2c0b : d0fe > bne * ;failed not equal (non zero) +2c7e : d0fe > bne * ;failed not equal (non zero) > -2c0d : bd0302 lda abst,x -2c10 : e8 inx -2c11 : e002 cpx #2 -2c13 : d002 bne tinc7 -2c15 : a9fe lda #$fe -2c17 : e005 tinc7 cpx #5 -2c19 : d0d7 bne tinc6 -2c1b : ca dex -2c1c : a902 lda #2 -2c1e : 9d0302 tdec6 sta abst,x +2c80 : bd0302 lda abst,x +2c83 : e8 inx +2c84 : e002 cpx #2 +2c86 : d002 bne tinc7 +2c88 : a9fe lda #$fe +2c8a : e005 tinc7 cpx #5 +2c8c : d0d7 bne tinc6 +2c8e : ca dex +2c8f : a902 lda #2 +2c91 : 9d0302 tdec6 sta abst,x set_stat 0 > load_flag 0 -2c21 : a900 > lda #0 ;allow test to change I-flag (no mask) +2c94 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2c23 : 48 > pha ;use stack to load status -2c24 : 28 > plp +2c96 : 48 > pha ;use stack to load status +2c97 : 28 > plp -2c25 : de0302 dec abst,x +2c98 : de0302 dec abst,x tst_absx rINC,fINC,0 -2c28 : 08 > php ;save flags -2c29 : bd0302 > lda abst,x -2c2c : dd3102 > cmp rINC,x ;test result +2c9b : 08 > php ;save flags +2c9c : bd0302 > lda abst,x +2c9f : dd4002 > cmp rINC,x ;test result > trap_ne -2c2f : d0fe > bne * ;failed not equal (non zero) +2ca2 : d0fe > bne * ;failed not equal (non zero) > -2c31 : 68 > pla ;load status +2ca4 : 68 > pla ;load status > eor_flag 0 -2c32 : 4930 > eor #0|fao ;invert expected flags + always on bits +2ca5 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2c34 : dd3602 > cmp fINC,x ;test flags +2ca7 : dd4502 > cmp fINC,x ;test flags > trap_ne -2c37 : d0fe > bne * ;failed not equal (non zero) +2caa : d0fe > bne * ;failed not equal (non zero) > -2c39 : bd0302 lda abst,x -2c3c : ca dex -2c3d : 3008 bmi tdec7 -2c3f : e001 cpx #1 -2c41 : d0db bne tdec6 -2c43 : a981 lda #$81 -2c45 : d0d7 bne tdec6 -2c47 : tdec7 -2c47 : a200 ldx #0 -2c49 : a97e lda #$7e -2c4b : 9d0302 tinc16 sta abst,x +2cac : bd0302 lda abst,x +2caf : ca dex +2cb0 : 3008 bmi tdec7 +2cb2 : e001 cpx #1 +2cb4 : d0db bne tdec6 +2cb6 : a981 lda #$81 +2cb8 : d0d7 bne tdec6 +2cba : tdec7 +2cba : a200 ldx #0 +2cbc : a97e lda #$7e +2cbe : 9d0302 tinc16 sta abst,x set_stat $ff > load_flag $ff -2c4e : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2cc1 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2c50 : 48 > pha ;use stack to load status -2c51 : 28 > plp +2cc3 : 48 > pha ;use stack to load status +2cc4 : 28 > plp -2c52 : fe0302 inc abst,x +2cc5 : fe0302 inc abst,x tst_absx rINC,fINC,$ff-fnz -2c55 : 08 > php ;save flags -2c56 : bd0302 > lda abst,x -2c59 : dd3102 > cmp rINC,x ;test result +2cc8 : 08 > php ;save flags +2cc9 : bd0302 > lda abst,x +2ccc : dd4002 > cmp rINC,x ;test result > trap_ne -2c5c : d0fe > bne * ;failed not equal (non zero) +2ccf : d0fe > bne * ;failed not equal (non zero) > -2c5e : 68 > pla ;load status +2cd1 : 68 > pla ;load status > eor_flag $ff-fnz -2c5f : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +2cd2 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -2c61 : dd3602 > cmp fINC,x ;test flags +2cd4 : dd4502 > cmp fINC,x ;test flags > trap_ne -2c64 : d0fe > bne * ;failed not equal (non zero) +2cd7 : d0fe > bne * ;failed not equal (non zero) > -2c66 : bd0302 lda abst,x -2c69 : e8 inx -2c6a : e002 cpx #2 -2c6c : d002 bne tinc17 -2c6e : a9fe lda #$fe -2c70 : e005 tinc17 cpx #5 -2c72 : d0d7 bne tinc16 -2c74 : ca dex -2c75 : a902 lda #2 -2c77 : 9d0302 tdec16 sta abst,x +2cd9 : bd0302 lda abst,x +2cdc : e8 inx +2cdd : e002 cpx #2 +2cdf : d002 bne tinc17 +2ce1 : a9fe lda #$fe +2ce3 : e005 tinc17 cpx #5 +2ce5 : d0d7 bne tinc16 +2ce7 : ca dex +2ce8 : a902 lda #2 +2cea : 9d0302 tdec16 sta abst,x set_stat $ff > load_flag $ff -2c7a : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2ced : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2c7c : 48 > pha ;use stack to load status -2c7d : 28 > plp +2cef : 48 > pha ;use stack to load status +2cf0 : 28 > plp -2c7e : de0302 dec abst,x +2cf1 : de0302 dec abst,x tst_absx rINC,fINC,$ff-fnz -2c81 : 08 > php ;save flags -2c82 : bd0302 > lda abst,x -2c85 : dd3102 > cmp rINC,x ;test result +2cf4 : 08 > php ;save flags +2cf5 : bd0302 > lda abst,x +2cf8 : dd4002 > cmp rINC,x ;test result > trap_ne -2c88 : d0fe > bne * ;failed not equal (non zero) +2cfb : d0fe > bne * ;failed not equal (non zero) > -2c8a : 68 > pla ;load status +2cfd : 68 > pla ;load status > eor_flag $ff-fnz -2c8b : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +2cfe : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -2c8d : dd3602 > cmp fINC,x ;test flags +2d00 : dd4502 > cmp fINC,x ;test flags > trap_ne -2c90 : d0fe > bne * ;failed not equal (non zero) +2d03 : d0fe > bne * ;failed not equal (non zero) > -2c92 : bd0302 lda abst,x -2c95 : ca dex -2c96 : 3008 bmi tdec17 -2c98 : e001 cpx #1 -2c9a : d0db bne tdec16 -2c9c : a981 lda #$81 -2c9e : d0d7 bne tdec16 -2ca0 : tdec17 +2d05 : bd0302 lda abst,x +2d08 : ca dex +2d09 : 3008 bmi tdec17 +2d0b : e001 cpx #1 +2d0d : d0db bne tdec16 +2d0f : a981 lda #$81 +2d11 : d0d7 bne tdec16 +2d13 : tdec17 next_test -2ca0 : ad0002 > lda test_case ;previous test -2ca3 : c925 > cmp #test_num +2d13 : ad0002 > lda test_case ;previous test +2d16 : c925 > cmp #test_num > trap_ne ;test is out of sequence -2ca5 : d0fe > bne * ;failed not equal (non zero) +2d18 : d0fe > bne * ;failed not equal (non zero) > 0026 = >test_num = test_num + 1 -2ca7 : a926 > lda #test_num ;*** next tests' number -2ca9 : 8d0002 > sta test_case +2d1a : a926 > lda #test_num ;*** next tests' number +2d1c : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; testing logical instructions - AND EOR ORA all addressing modes ; AND -2cac : a203 ldx #3 ;immediate - self modifying code -2cae : b51c tand lda zpAN,x -2cb0 : 8dbb2c sta tandi1 +2d1f : a203 ldx #3 ;immediate +2d21 : b51c tand lda zpAN,x +2d23 : 8d0902 sta ex_andi+1 ;set AND # operand set_ax absANa,0 > load_flag 0 -2cb3 : a900 > lda #0 ;allow test to change I-flag (no mask) +2d26 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2cb5 : 48 > pha ;use stack to load status -2cb6 : bd4b02 > lda absANa,x ;precharge accu -2cb9 : 28 > plp +2d28 : 48 > pha ;use stack to load status +2d29 : bd5a02 > lda absANa,x ;precharge accu +2d2c : 28 > plp -2cbb = tandi1 equ *+1 ;target for immediate operand -2cba : 2963 and #99 +2d2d : 200802 jsr ex_andi ;execute AND # in RAM tst_ax absrlo,absflo,0 -2cbc : 08 > php ;save flags -2cbd : dd5302 > cmp absrlo,x ;test result +2d30 : 08 > php ;save flags +2d31 : dd6202 > cmp absrlo,x ;test result > trap_ne -2cc0 : d0fe > bne * ;failed not equal (non zero) +2d34 : d0fe > bne * ;failed not equal (non zero) > -2cc2 : 68 > pla ;load status +2d36 : 68 > pla ;load status > eor_flag 0 -2cc3 : 4930 > eor #0|fao ;invert expected flags + always on bits +2d37 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2cc5 : dd5702 > cmp absflo,x ;test flags +2d39 : dd6602 > cmp absflo,x ;test flags > trap_ne ; -2cc8 : d0fe > bne * ;failed not equal (non zero) +2d3c : d0fe > bne * ;failed not equal (non zero) > -2cca : ca dex -2ccb : 10e1 bpl tand -2ccd : a203 ldx #3 -2ccf : b51c tand1 lda zpAN,x -2cd1 : 8ddc2c sta tandi2 +2d3e : ca dex +2d3f : 10e0 bpl tand +2d41 : a203 ldx #3 +2d43 : b51c tand1 lda zpAN,x +2d45 : 8d0902 sta ex_andi+1 ;set AND # operand set_ax absANa,$ff > load_flag $ff -2cd4 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2d48 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2cd6 : 48 > pha ;use stack to load status -2cd7 : bd4b02 > lda absANa,x ;precharge accu -2cda : 28 > plp +2d4a : 48 > pha ;use stack to load status +2d4b : bd5a02 > lda absANa,x ;precharge accu +2d4e : 28 > plp -2cdc = tandi2 equ *+1 ;target for immediate operand -2cdb : 2963 and #99 +2d4f : 200802 jsr ex_andi ;execute AND # in RAM tst_ax absrlo,absflo,$ff-fnz -2cdd : 08 > php ;save flags -2cde : dd5302 > cmp absrlo,x ;test result +2d52 : 08 > php ;save flags +2d53 : dd6202 > cmp absrlo,x ;test result > trap_ne -2ce1 : d0fe > bne * ;failed not equal (non zero) +2d56 : d0fe > bne * ;failed not equal (non zero) > -2ce3 : 68 > pla ;load status +2d58 : 68 > pla ;load status > eor_flag $ff-fnz -2ce4 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +2d59 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -2ce6 : dd5702 > cmp absflo,x ;test flags +2d5b : dd6602 > cmp absflo,x ;test flags > trap_ne ; -2ce9 : d0fe > bne * ;failed not equal (non zero) +2d5e : d0fe > bne * ;failed not equal (non zero) > -2ceb : ca dex -2cec : 10e1 bpl tand1 - -2cee : a203 ldx #3 ;zp -2cf0 : b51c tand2 lda zpAN,x -2cf2 : 850c sta zpt +2d60 : ca dex +2d61 : 10e0 bpl tand1 + +2d63 : a203 ldx #3 ;zp +2d65 : b51c tand2 lda zpAN,x +2d67 : 850c sta zpt set_ax absANa,0 > load_flag 0 -2cf4 : a900 > lda #0 ;allow test to change I-flag (no mask) +2d69 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2cf6 : 48 > pha ;use stack to load status -2cf7 : bd4b02 > lda absANa,x ;precharge accu -2cfa : 28 > plp +2d6b : 48 > pha ;use stack to load status +2d6c : bd5a02 > lda absANa,x ;precharge accu +2d6f : 28 > plp -2cfb : 250c and zpt +2d70 : 250c and zpt tst_ax absrlo,absflo,0 -2cfd : 08 > php ;save flags -2cfe : dd5302 > cmp absrlo,x ;test result +2d72 : 08 > php ;save flags +2d73 : dd6202 > cmp absrlo,x ;test result > trap_ne -2d01 : d0fe > bne * ;failed not equal (non zero) +2d76 : d0fe > bne * ;failed not equal (non zero) > -2d03 : 68 > pla ;load status +2d78 : 68 > pla ;load status > eor_flag 0 -2d04 : 4930 > eor #0|fao ;invert expected flags + always on bits +2d79 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2d06 : dd5702 > cmp absflo,x ;test flags +2d7b : dd6602 > cmp absflo,x ;test flags > trap_ne ; -2d09 : d0fe > bne * ;failed not equal (non zero) +2d7e : d0fe > bne * ;failed not equal (non zero) > -2d0b : ca dex -2d0c : 10e2 bpl tand2 -2d0e : a203 ldx #3 -2d10 : b51c tand3 lda zpAN,x -2d12 : 850c sta zpt +2d80 : ca dex +2d81 : 10e2 bpl tand2 +2d83 : a203 ldx #3 +2d85 : b51c tand3 lda zpAN,x +2d87 : 850c sta zpt set_ax absANa,$ff > load_flag $ff -2d14 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2d89 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2d16 : 48 > pha ;use stack to load status -2d17 : bd4b02 > lda absANa,x ;precharge accu -2d1a : 28 > plp +2d8b : 48 > pha ;use stack to load status +2d8c : bd5a02 > lda absANa,x ;precharge accu +2d8f : 28 > plp -2d1b : 250c and zpt +2d90 : 250c and zpt tst_ax absrlo,absflo,$ff-fnz -2d1d : 08 > php ;save flags -2d1e : dd5302 > cmp absrlo,x ;test result +2d92 : 08 > php ;save flags +2d93 : dd6202 > cmp absrlo,x ;test result > trap_ne -2d21 : d0fe > bne * ;failed not equal (non zero) +2d96 : d0fe > bne * ;failed not equal (non zero) > -2d23 : 68 > pla ;load status +2d98 : 68 > pla ;load status > eor_flag $ff-fnz -2d24 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +2d99 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -2d26 : dd5702 > cmp absflo,x ;test flags +2d9b : dd6602 > cmp absflo,x ;test flags > trap_ne ; -2d29 : d0fe > bne * ;failed not equal (non zero) +2d9e : d0fe > bne * ;failed not equal (non zero) > -2d2b : ca dex -2d2c : 10e2 bpl tand3 +2da0 : ca dex +2da1 : 10e2 bpl tand3 -2d2e : a203 ldx #3 ;abs -2d30 : b51c tand4 lda zpAN,x -2d32 : 8d0302 sta abst +2da3 : a203 ldx #3 ;abs +2da5 : b51c tand4 lda zpAN,x +2da7 : 8d0302 sta abst set_ax absANa,0 > load_flag 0 -2d35 : a900 > lda #0 ;allow test to change I-flag (no mask) +2daa : a900 > lda #0 ;allow test to change I-flag (no mask) > -2d37 : 48 > pha ;use stack to load status -2d38 : bd4b02 > lda absANa,x ;precharge accu -2d3b : 28 > plp +2dac : 48 > pha ;use stack to load status +2dad : bd5a02 > lda absANa,x ;precharge accu +2db0 : 28 > plp -2d3c : 2d0302 and abst +2db1 : 2d0302 and abst tst_ax absrlo,absflo,0 -2d3f : 08 > php ;save flags -2d40 : dd5302 > cmp absrlo,x ;test result +2db4 : 08 > php ;save flags +2db5 : dd6202 > cmp absrlo,x ;test result > trap_ne -2d43 : d0fe > bne * ;failed not equal (non zero) +2db8 : d0fe > bne * ;failed not equal (non zero) > -2d45 : 68 > pla ;load status +2dba : 68 > pla ;load status > eor_flag 0 -2d46 : 4930 > eor #0|fao ;invert expected flags + always on bits +2dbb : 4930 > eor #0|fao ;invert expected flags + always on bits > -2d48 : dd5702 > cmp absflo,x ;test flags +2dbd : dd6602 > cmp absflo,x ;test flags > trap_ne ; -2d4b : d0fe > bne * ;failed not equal (non zero) +2dc0 : d0fe > bne * ;failed not equal (non zero) > -2d4d : ca dex -2d4e : 10e0 bpl tand4 -2d50 : a203 ldx #3 -2d52 : b51c tand5 lda zpAN,x -2d54 : 8d0302 sta abst +2dc2 : ca dex +2dc3 : 10e0 bpl tand4 +2dc5 : a203 ldx #3 +2dc7 : b51c tand5 lda zpAN,x +2dc9 : 8d0302 sta abst set_ax absANa,$ff > load_flag $ff -2d57 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2dcc : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2d59 : 48 > pha ;use stack to load status -2d5a : bd4b02 > lda absANa,x ;precharge accu -2d5d : 28 > plp +2dce : 48 > pha ;use stack to load status +2dcf : bd5a02 > lda absANa,x ;precharge accu +2dd2 : 28 > plp -2d5e : 2d0302 and abst +2dd3 : 2d0302 and abst tst_ax absrlo,absflo,$ff-fnz -2d61 : 08 > php ;save flags -2d62 : dd5302 > cmp absrlo,x ;test result +2dd6 : 08 > php ;save flags +2dd7 : dd6202 > cmp absrlo,x ;test result > trap_ne -2d65 : d0fe > bne * ;failed not equal (non zero) +2dda : d0fe > bne * ;failed not equal (non zero) > -2d67 : 68 > pla ;load status +2ddc : 68 > pla ;load status > eor_flag $ff-fnz -2d68 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +2ddd : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -2d6a : dd5702 > cmp absflo,x ;test flags +2ddf : dd6602 > cmp absflo,x ;test flags > trap_ne ; -2d6d : d0fe > bne * ;failed not equal (non zero) +2de2 : d0fe > bne * ;failed not equal (non zero) > -2d6f : ca dex -2d70 : 1002 bpl tand6 +2de4 : ca dex +2de5 : 1002 bpl tand6 -2d72 : a203 ldx #3 ;zp,x -2d74 : tand6 +2de7 : a203 ldx #3 ;zp,x +2de9 : tand6 set_ax absANa,0 > load_flag 0 -2d74 : a900 > lda #0 ;allow test to change I-flag (no mask) +2de9 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2d76 : 48 > pha ;use stack to load status -2d77 : bd4b02 > lda absANa,x ;precharge accu -2d7a : 28 > plp +2deb : 48 > pha ;use stack to load status +2dec : bd5a02 > lda absANa,x ;precharge accu +2def : 28 > plp -2d7b : 351c and zpAN,x +2df0 : 351c and zpAN,x tst_ax absrlo,absflo,0 -2d7d : 08 > php ;save flags -2d7e : dd5302 > cmp absrlo,x ;test result +2df2 : 08 > php ;save flags +2df3 : dd6202 > cmp absrlo,x ;test result > trap_ne -2d81 : d0fe > bne * ;failed not equal (non zero) +2df6 : d0fe > bne * ;failed not equal (non zero) > -2d83 : 68 > pla ;load status +2df8 : 68 > pla ;load status > eor_flag 0 -2d84 : 4930 > eor #0|fao ;invert expected flags + always on bits +2df9 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2d86 : dd5702 > cmp absflo,x ;test flags +2dfb : dd6602 > cmp absflo,x ;test flags > trap_ne ; -2d89 : d0fe > bne * ;failed not equal (non zero) +2dfe : d0fe > bne * ;failed not equal (non zero) > -2d8b : ca dex -2d8c : 10e6 bpl tand6 -2d8e : a203 ldx #3 -2d90 : tand7 +2e00 : ca dex +2e01 : 10e6 bpl tand6 +2e03 : a203 ldx #3 +2e05 : tand7 set_ax absANa,$ff > load_flag $ff -2d90 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2e05 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2d92 : 48 > pha ;use stack to load status -2d93 : bd4b02 > lda absANa,x ;precharge accu -2d96 : 28 > plp +2e07 : 48 > pha ;use stack to load status +2e08 : bd5a02 > lda absANa,x ;precharge accu +2e0b : 28 > plp -2d97 : 351c and zpAN,x +2e0c : 351c and zpAN,x tst_ax absrlo,absflo,$ff-fnz -2d99 : 08 > php ;save flags -2d9a : dd5302 > cmp absrlo,x ;test result +2e0e : 08 > php ;save flags +2e0f : dd6202 > cmp absrlo,x ;test result > trap_ne -2d9d : d0fe > bne * ;failed not equal (non zero) +2e12 : d0fe > bne * ;failed not equal (non zero) > -2d9f : 68 > pla ;load status +2e14 : 68 > pla ;load status > eor_flag $ff-fnz -2da0 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +2e15 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -2da2 : dd5702 > cmp absflo,x ;test flags +2e17 : dd6602 > cmp absflo,x ;test flags > trap_ne ; -2da5 : d0fe > bne * ;failed not equal (non zero) +2e1a : d0fe > bne * ;failed not equal (non zero) > -2da7 : ca dex -2da8 : 10e6 bpl tand7 +2e1c : ca dex +2e1d : 10e6 bpl tand7 -2daa : a203 ldx #3 ;abs,x -2dac : tand8 +2e1f : a203 ldx #3 ;abs,x +2e21 : tand8 set_ax absANa,0 > load_flag 0 -2dac : a900 > lda #0 ;allow test to change I-flag (no mask) +2e21 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2dae : 48 > pha ;use stack to load status -2daf : bd4b02 > lda absANa,x ;precharge accu -2db2 : 28 > plp +2e23 : 48 > pha ;use stack to load status +2e24 : bd5a02 > lda absANa,x ;precharge accu +2e27 : 28 > plp -2db3 : 3d3f02 and absAN,x +2e28 : 3d4e02 and absAN,x tst_ax absrlo,absflo,0 -2db6 : 08 > php ;save flags -2db7 : dd5302 > cmp absrlo,x ;test result - > trap_ne -2dba : d0fe > bne * ;failed not equal (non zero) - > -2dbc : 68 > pla ;load status - > eor_flag 0 -2dbd : 4930 > eor #0|fao ;invert expected flags + always on bits - > -2dbf : dd5702 > cmp absflo,x ;test flags - > trap_ne ; -2dc2 : d0fe > bne * ;failed not equal (non zero) - > - -2dc4 : ca dex -2dc5 : 10e5 bpl tand8 -2dc7 : a203 ldx #3 -2dc9 : tand9 - set_ax absANa,$ff - > load_flag $ff -2dc9 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -2dcb : 48 > pha ;use stack to load status -2dcc : bd4b02 > lda absANa,x ;precharge accu -2dcf : 28 > plp - -2dd0 : 3d3f02 and absAN,x - tst_ax absrlo,absflo,$ff-fnz -2dd3 : 08 > php ;save flags -2dd4 : dd5302 > cmp absrlo,x ;test result - > trap_ne -2dd7 : d0fe > bne * ;failed not equal (non zero) - > -2dd9 : 68 > pla ;load status - > eor_flag $ff-fnz -2dda : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits - > -2ddc : dd5702 > cmp absflo,x ;test flags - > trap_ne ; -2ddf : d0fe > bne * ;failed not equal (non zero) - > - -2de1 : ca dex -2de2 : 10e5 bpl tand9 - -2de4 : a003 ldy #3 ;abs,y -2de6 : tand10 - set_ay absANa,0 - > load_flag 0 -2de6 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -2de8 : 48 > pha ;use stack to load status -2de9 : b94b02 > lda absANa,y ;precharge accu -2dec : 28 > plp - -2ded : 393f02 and absAN,y - tst_ay absrlo,absflo,0 -2df0 : 08 > php ;save flags -2df1 : d95302 > cmp absrlo,y ;test result - > trap_ne ; -2df4 : d0fe > bne * ;failed not equal (non zero) - > -2df6 : 68 > pla ;load status - > eor_flag 0 -2df7 : 4930 > eor #0|fao ;invert expected flags + always on bits - > -2df9 : d95702 > cmp absflo,y ;test flags - > trap_ne -2dfc : d0fe > bne * ;failed not equal (non zero) - > - -2dfe : 88 dey -2dff : 10e5 bpl tand10 -2e01 : a003 ldy #3 -2e03 : tand11 - set_ay absANa,$ff - > load_flag $ff -2e03 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -2e05 : 48 > pha ;use stack to load status -2e06 : b94b02 > lda absANa,y ;precharge accu -2e09 : 28 > plp - -2e0a : 393f02 and absAN,y - tst_ay absrlo,absflo,$ff-fnz -2e0d : 08 > php ;save flags -2e0e : d95302 > cmp absrlo,y ;test result - > trap_ne ; -2e11 : d0fe > bne * ;failed not equal (non zero) - > -2e13 : 68 > pla ;load status - > eor_flag $ff-fnz -2e14 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits - > -2e16 : d95702 > cmp absflo,y ;test flags - > trap_ne -2e19 : d0fe > bne * ;failed not equal (non zero) - > - -2e1b : 88 dey -2e1c : 10e5 bpl tand11 - -2e1e : a206 ldx #6 ;(zp,x) -2e20 : a003 ldy #3 -2e22 : tand12 - set_ay absANa,0 - > load_flag 0 -2e22 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -2e24 : 48 > pha ;use stack to load status -2e25 : b94b02 > lda absANa,y ;precharge accu -2e28 : 28 > plp - -2e29 : 213a and (indAN,x) - tst_ay absrlo,absflo,0 2e2b : 08 > php ;save flags -2e2c : d95302 > cmp absrlo,y ;test result - > trap_ne ; +2e2c : dd6202 > cmp absrlo,x ;test result + > trap_ne 2e2f : d0fe > bne * ;failed not equal (non zero) > 2e31 : 68 > pla ;load status > eor_flag 0 2e32 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2e34 : d95702 > cmp absflo,y ;test flags - > trap_ne +2e34 : dd6602 > cmp absflo,x ;test flags + > trap_ne ; 2e37 : d0fe > bne * ;failed not equal (non zero) > 2e39 : ca dex -2e3a : ca dex -2e3b : 88 dey -2e3c : 10e4 bpl tand12 -2e3e : a206 ldx #6 -2e40 : a003 ldy #3 -2e42 : tand13 - set_ay absANa,$ff +2e3a : 10e5 bpl tand8 +2e3c : a203 ldx #3 +2e3e : tand9 + set_ax absANa,$ff > load_flag $ff -2e42 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2e3e : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2e44 : 48 > pha ;use stack to load status -2e45 : b94b02 > lda absANa,y ;precharge accu -2e48 : 28 > plp +2e40 : 48 > pha ;use stack to load status +2e41 : bd5a02 > lda absANa,x ;precharge accu +2e44 : 28 > plp -2e49 : 213a and (indAN,x) - tst_ay absrlo,absflo,$ff-fnz -2e4b : 08 > php ;save flags -2e4c : d95302 > cmp absrlo,y ;test result - > trap_ne ; -2e4f : d0fe > bne * ;failed not equal (non zero) - > -2e51 : 68 > pla ;load status - > eor_flag $ff-fnz -2e52 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits - > -2e54 : d95702 > cmp absflo,y ;test flags +2e45 : 3d4e02 and absAN,x + tst_ax absrlo,absflo,$ff-fnz +2e48 : 08 > php ;save flags +2e49 : dd6202 > cmp absrlo,x ;test result > trap_ne -2e57 : d0fe > bne * ;failed not equal (non zero) +2e4c : d0fe > bne * ;failed not equal (non zero) + > +2e4e : 68 > pla ;load status + > eor_flag $ff-fnz +2e4f : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits + > +2e51 : dd6602 > cmp absflo,x ;test flags + > trap_ne ; +2e54 : d0fe > bne * ;failed not equal (non zero) > -2e59 : ca dex -2e5a : ca dex -2e5b : 88 dey -2e5c : 10e4 bpl tand13 +2e56 : ca dex +2e57 : 10e5 bpl tand9 -2e5e : a003 ldy #3 ;(zp),y -2e60 : tand14 +2e59 : a003 ldy #3 ;abs,y +2e5b : tand10 set_ay absANa,0 > load_flag 0 -2e60 : a900 > lda #0 ;allow test to change I-flag (no mask) +2e5b : a900 > lda #0 ;allow test to change I-flag (no mask) > -2e62 : 48 > pha ;use stack to load status -2e63 : b94b02 > lda absANa,y ;precharge accu -2e66 : 28 > plp +2e5d : 48 > pha ;use stack to load status +2e5e : b95a02 > lda absANa,y ;precharge accu +2e61 : 28 > plp -2e67 : 313a and (indAN),y +2e62 : 394e02 and absAN,y tst_ay absrlo,absflo,0 -2e69 : 08 > php ;save flags -2e6a : d95302 > cmp absrlo,y ;test result +2e65 : 08 > php ;save flags +2e66 : d96202 > cmp absrlo,y ;test result > trap_ne ; -2e6d : d0fe > bne * ;failed not equal (non zero) +2e69 : d0fe > bne * ;failed not equal (non zero) > -2e6f : 68 > pla ;load status +2e6b : 68 > pla ;load status > eor_flag 0 -2e70 : 4930 > eor #0|fao ;invert expected flags + always on bits +2e6c : 4930 > eor #0|fao ;invert expected flags + always on bits > -2e72 : d95702 > cmp absflo,y ;test flags +2e6e : d96602 > cmp absflo,y ;test flags > trap_ne -2e75 : d0fe > bne * ;failed not equal (non zero) +2e71 : d0fe > bne * ;failed not equal (non zero) > -2e77 : 88 dey -2e78 : 10e6 bpl tand14 -2e7a : a003 ldy #3 -2e7c : tand15 +2e73 : 88 dey +2e74 : 10e5 bpl tand10 +2e76 : a003 ldy #3 +2e78 : tand11 set_ay absANa,$ff > load_flag $ff -2e7c : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2e78 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2e7e : 48 > pha ;use stack to load status -2e7f : b94b02 > lda absANa,y ;precharge accu -2e82 : 28 > plp +2e7a : 48 > pha ;use stack to load status +2e7b : b95a02 > lda absANa,y ;precharge accu +2e7e : 28 > plp -2e83 : 313a and (indAN),y +2e7f : 394e02 and absAN,y tst_ay absrlo,absflo,$ff-fnz -2e85 : 08 > php ;save flags -2e86 : d95302 > cmp absrlo,y ;test result +2e82 : 08 > php ;save flags +2e83 : d96202 > cmp absrlo,y ;test result > trap_ne ; -2e89 : d0fe > bne * ;failed not equal (non zero) +2e86 : d0fe > bne * ;failed not equal (non zero) > -2e8b : 68 > pla ;load status +2e88 : 68 > pla ;load status > eor_flag $ff-fnz -2e8c : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +2e89 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -2e8e : d95702 > cmp absflo,y ;test flags +2e8b : d96602 > cmp absflo,y ;test flags > trap_ne -2e91 : d0fe > bne * ;failed not equal (non zero) +2e8e : d0fe > bne * ;failed not equal (non zero) > -2e93 : 88 dey -2e94 : 10e6 bpl tand15 +2e90 : 88 dey +2e91 : 10e5 bpl tand11 + +2e93 : a206 ldx #6 ;(zp,x) +2e95 : a003 ldy #3 +2e97 : tand12 + set_ay absANa,0 + > load_flag 0 +2e97 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +2e99 : 48 > pha ;use stack to load status +2e9a : b95a02 > lda absANa,y ;precharge accu +2e9d : 28 > plp + +2e9e : 213a and (indAN,x) + tst_ay absrlo,absflo,0 +2ea0 : 08 > php ;save flags +2ea1 : d96202 > cmp absrlo,y ;test result + > trap_ne ; +2ea4 : d0fe > bne * ;failed not equal (non zero) + > +2ea6 : 68 > pla ;load status + > eor_flag 0 +2ea7 : 4930 > eor #0|fao ;invert expected flags + always on bits + > +2ea9 : d96602 > cmp absflo,y ;test flags + > trap_ne +2eac : d0fe > bne * ;failed not equal (non zero) + > + +2eae : ca dex +2eaf : ca dex +2eb0 : 88 dey +2eb1 : 10e4 bpl tand12 +2eb3 : a206 ldx #6 +2eb5 : a003 ldy #3 +2eb7 : tand13 + set_ay absANa,$ff + > load_flag $ff +2eb7 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +2eb9 : 48 > pha ;use stack to load status +2eba : b95a02 > lda absANa,y ;precharge accu +2ebd : 28 > plp + +2ebe : 213a and (indAN,x) + tst_ay absrlo,absflo,$ff-fnz +2ec0 : 08 > php ;save flags +2ec1 : d96202 > cmp absrlo,y ;test result + > trap_ne ; +2ec4 : d0fe > bne * ;failed not equal (non zero) + > +2ec6 : 68 > pla ;load status + > eor_flag $ff-fnz +2ec7 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits + > +2ec9 : d96602 > cmp absflo,y ;test flags + > trap_ne +2ecc : d0fe > bne * ;failed not equal (non zero) + > + +2ece : ca dex +2ecf : ca dex +2ed0 : 88 dey +2ed1 : 10e4 bpl tand13 + +2ed3 : a003 ldy #3 ;(zp),y +2ed5 : tand14 + set_ay absANa,0 + > load_flag 0 +2ed5 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +2ed7 : 48 > pha ;use stack to load status +2ed8 : b95a02 > lda absANa,y ;precharge accu +2edb : 28 > plp + +2edc : 313a and (indAN),y + tst_ay absrlo,absflo,0 +2ede : 08 > php ;save flags +2edf : d96202 > cmp absrlo,y ;test result + > trap_ne ; +2ee2 : d0fe > bne * ;failed not equal (non zero) + > +2ee4 : 68 > pla ;load status + > eor_flag 0 +2ee5 : 4930 > eor #0|fao ;invert expected flags + always on bits + > +2ee7 : d96602 > cmp absflo,y ;test flags + > trap_ne +2eea : d0fe > bne * ;failed not equal (non zero) + > + +2eec : 88 dey +2eed : 10e6 bpl tand14 +2eef : a003 ldy #3 +2ef1 : tand15 + set_ay absANa,$ff + > load_flag $ff +2ef1 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +2ef3 : 48 > pha ;use stack to load status +2ef4 : b95a02 > lda absANa,y ;precharge accu +2ef7 : 28 > plp + +2ef8 : 313a and (indAN),y + tst_ay absrlo,absflo,$ff-fnz +2efa : 08 > php ;save flags +2efb : d96202 > cmp absrlo,y ;test result + > trap_ne ; +2efe : d0fe > bne * ;failed not equal (non zero) + > +2f00 : 68 > pla ;load status + > eor_flag $ff-fnz +2f01 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits + > +2f03 : d96602 > cmp absflo,y ;test flags + > trap_ne +2f06 : d0fe > bne * ;failed not equal (non zero) + > + +2f08 : 88 dey +2f09 : 10e6 bpl tand15 next_test -2e96 : ad0002 > lda test_case ;previous test -2e99 : c926 > cmp #test_num +2f0b : ad0002 > lda test_case ;previous test +2f0e : c926 > cmp #test_num > trap_ne ;test is out of sequence -2e9b : d0fe > bne * ;failed not equal (non zero) +2f10 : d0fe > bne * ;failed not equal (non zero) > 0027 = >test_num = test_num + 1 -2e9d : a927 > lda #test_num ;*** next tests' number -2e9f : 8d0002 > sta test_case +2f12 : a927 > lda #test_num ;*** next tests' number +2f14 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; EOR -2ea2 : a203 ldx #3 ;immediate - self modifying code -2ea4 : b520 teor lda zpEO,x -2ea6 : 8db12e sta teori1 +2f17 : a203 ldx #3 ;immediate - self modifying code +2f19 : b520 teor lda zpEO,x +2f1b : 8d0c02 sta ex_eori+1 ;set EOR # operand set_ax absEOa,0 > load_flag 0 -2ea9 : a900 > lda #0 ;allow test to change I-flag (no mask) +2f1e : a900 > lda #0 ;allow test to change I-flag (no mask) > -2eab : 48 > pha ;use stack to load status -2eac : bd4f02 > lda absEOa,x ;precharge accu -2eaf : 28 > plp +2f20 : 48 > pha ;use stack to load status +2f21 : bd5e02 > lda absEOa,x ;precharge accu +2f24 : 28 > plp -2eb1 = teori1 equ *+1 ;target for immediate operand -2eb0 : 4963 eor #99 +2f25 : 200b02 jsr ex_eori ;execute EOR # in RAM tst_ax absrlo,absflo,0 -2eb2 : 08 > php ;save flags -2eb3 : dd5302 > cmp absrlo,x ;test result +2f28 : 08 > php ;save flags +2f29 : dd6202 > cmp absrlo,x ;test result > trap_ne -2eb6 : d0fe > bne * ;failed not equal (non zero) +2f2c : d0fe > bne * ;failed not equal (non zero) > -2eb8 : 68 > pla ;load status +2f2e : 68 > pla ;load status > eor_flag 0 -2eb9 : 4930 > eor #0|fao ;invert expected flags + always on bits +2f2f : 4930 > eor #0|fao ;invert expected flags + always on bits > -2ebb : dd5702 > cmp absflo,x ;test flags +2f31 : dd6602 > cmp absflo,x ;test flags > trap_ne ; -2ebe : d0fe > bne * ;failed not equal (non zero) +2f34 : d0fe > bne * ;failed not equal (non zero) > -2ec0 : ca dex -2ec1 : 10e1 bpl teor -2ec3 : a203 ldx #3 -2ec5 : b520 teor1 lda zpEO,x -2ec7 : 8dd22e sta teori2 +2f36 : ca dex +2f37 : 10e0 bpl teor +2f39 : a203 ldx #3 +2f3b : b520 teor1 lda zpEO,x +2f3d : 8d0c02 sta ex_eori+1 ;set EOR # operand set_ax absEOa,$ff > load_flag $ff -2eca : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2f40 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2ecc : 48 > pha ;use stack to load status -2ecd : bd4f02 > lda absEOa,x ;precharge accu -2ed0 : 28 > plp +2f42 : 48 > pha ;use stack to load status +2f43 : bd5e02 > lda absEOa,x ;precharge accu +2f46 : 28 > plp -2ed2 = teori2 equ *+1 ;target for immediate operand -2ed1 : 4963 eor #99 +2f47 : 200b02 jsr ex_eori ;execute EOR # in RAM tst_ax absrlo,absflo,$ff-fnz -2ed3 : 08 > php ;save flags -2ed4 : dd5302 > cmp absrlo,x ;test result +2f4a : 08 > php ;save flags +2f4b : dd6202 > cmp absrlo,x ;test result > trap_ne -2ed7 : d0fe > bne * ;failed not equal (non zero) +2f4e : d0fe > bne * ;failed not equal (non zero) > -2ed9 : 68 > pla ;load status +2f50 : 68 > pla ;load status > eor_flag $ff-fnz -2eda : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +2f51 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -2edc : dd5702 > cmp absflo,x ;test flags +2f53 : dd6602 > cmp absflo,x ;test flags > trap_ne ; -2edf : d0fe > bne * ;failed not equal (non zero) +2f56 : d0fe > bne * ;failed not equal (non zero) > -2ee1 : ca dex -2ee2 : 10e1 bpl teor1 - -2ee4 : a203 ldx #3 ;zp -2ee6 : b520 teor2 lda zpEO,x -2ee8 : 850c sta zpt +2f58 : ca dex +2f59 : 10e0 bpl teor1 + +2f5b : a203 ldx #3 ;zp +2f5d : b520 teor2 lda zpEO,x +2f5f : 850c sta zpt set_ax absEOa,0 > load_flag 0 -2eea : a900 > lda #0 ;allow test to change I-flag (no mask) +2f61 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2eec : 48 > pha ;use stack to load status -2eed : bd4f02 > lda absEOa,x ;precharge accu -2ef0 : 28 > plp +2f63 : 48 > pha ;use stack to load status +2f64 : bd5e02 > lda absEOa,x ;precharge accu +2f67 : 28 > plp -2ef1 : 450c eor zpt +2f68 : 450c eor zpt tst_ax absrlo,absflo,0 -2ef3 : 08 > php ;save flags -2ef4 : dd5302 > cmp absrlo,x ;test result +2f6a : 08 > php ;save flags +2f6b : dd6202 > cmp absrlo,x ;test result > trap_ne -2ef7 : d0fe > bne * ;failed not equal (non zero) +2f6e : d0fe > bne * ;failed not equal (non zero) > -2ef9 : 68 > pla ;load status +2f70 : 68 > pla ;load status > eor_flag 0 -2efa : 4930 > eor #0|fao ;invert expected flags + always on bits +2f71 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2efc : dd5702 > cmp absflo,x ;test flags +2f73 : dd6602 > cmp absflo,x ;test flags > trap_ne ; -2eff : d0fe > bne * ;failed not equal (non zero) +2f76 : d0fe > bne * ;failed not equal (non zero) > -2f01 : ca dex -2f02 : 10e2 bpl teor2 -2f04 : a203 ldx #3 -2f06 : b520 teor3 lda zpEO,x -2f08 : 850c sta zpt +2f78 : ca dex +2f79 : 10e2 bpl teor2 +2f7b : a203 ldx #3 +2f7d : b520 teor3 lda zpEO,x +2f7f : 850c sta zpt set_ax absEOa,$ff > load_flag $ff -2f0a : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2f81 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2f0c : 48 > pha ;use stack to load status -2f0d : bd4f02 > lda absEOa,x ;precharge accu -2f10 : 28 > plp +2f83 : 48 > pha ;use stack to load status +2f84 : bd5e02 > lda absEOa,x ;precharge accu +2f87 : 28 > plp -2f11 : 450c eor zpt +2f88 : 450c eor zpt tst_ax absrlo,absflo,$ff-fnz -2f13 : 08 > php ;save flags -2f14 : dd5302 > cmp absrlo,x ;test result +2f8a : 08 > php ;save flags +2f8b : dd6202 > cmp absrlo,x ;test result > trap_ne -2f17 : d0fe > bne * ;failed not equal (non zero) +2f8e : d0fe > bne * ;failed not equal (non zero) > -2f19 : 68 > pla ;load status +2f90 : 68 > pla ;load status > eor_flag $ff-fnz -2f1a : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +2f91 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -2f1c : dd5702 > cmp absflo,x ;test flags +2f93 : dd6602 > cmp absflo,x ;test flags > trap_ne ; -2f1f : d0fe > bne * ;failed not equal (non zero) +2f96 : d0fe > bne * ;failed not equal (non zero) > -2f21 : ca dex -2f22 : 10e2 bpl teor3 +2f98 : ca dex +2f99 : 10e2 bpl teor3 -2f24 : a203 ldx #3 ;abs -2f26 : b520 teor4 lda zpEO,x -2f28 : 8d0302 sta abst - set_ax absEOa,0 - > load_flag 0 -2f2b : a900 > lda #0 ;allow test to change I-flag (no mask) - > -2f2d : 48 > pha ;use stack to load status -2f2e : bd4f02 > lda absEOa,x ;precharge accu -2f31 : 28 > plp - -2f32 : 4d0302 eor abst - tst_ax absrlo,absflo,0 -2f35 : 08 > php ;save flags -2f36 : dd5302 > cmp absrlo,x ;test result - > trap_ne -2f39 : d0fe > bne * ;failed not equal (non zero) - > -2f3b : 68 > pla ;load status - > eor_flag 0 -2f3c : 4930 > eor #0|fao ;invert expected flags + always on bits - > -2f3e : dd5702 > cmp absflo,x ;test flags - > trap_ne ; -2f41 : d0fe > bne * ;failed not equal (non zero) - > - -2f43 : ca dex -2f44 : 10e0 bpl teor4 -2f46 : a203 ldx #3 -2f48 : b520 teor5 lda zpEO,x -2f4a : 8d0302 sta abst - set_ax absEOa,$ff - > load_flag $ff -2f4d : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -2f4f : 48 > pha ;use stack to load status -2f50 : bd4f02 > lda absEOa,x ;precharge accu -2f53 : 28 > plp - -2f54 : 4d0302 eor abst - tst_ax absrlo,absflo,$ff-fnz -2f57 : 08 > php ;save flags -2f58 : dd5302 > cmp absrlo,x ;test result - > trap_ne -2f5b : d0fe > bne * ;failed not equal (non zero) - > -2f5d : 68 > pla ;load status - > eor_flag $ff-fnz -2f5e : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits - > -2f60 : dd5702 > cmp absflo,x ;test flags - > trap_ne ; -2f63 : d0fe > bne * ;failed not equal (non zero) - > - -2f65 : ca dex -2f66 : 1002 bpl teor6 - -2f68 : a203 ldx #3 ;zp,x -2f6a : teor6 - set_ax absEOa,0 - > load_flag 0 -2f6a : a900 > lda #0 ;allow test to change I-flag (no mask) - > -2f6c : 48 > pha ;use stack to load status -2f6d : bd4f02 > lda absEOa,x ;precharge accu -2f70 : 28 > plp - -2f71 : 5520 eor zpEO,x - tst_ax absrlo,absflo,0 -2f73 : 08 > php ;save flags -2f74 : dd5302 > cmp absrlo,x ;test result - > trap_ne -2f77 : d0fe > bne * ;failed not equal (non zero) - > -2f79 : 68 > pla ;load status - > eor_flag 0 -2f7a : 4930 > eor #0|fao ;invert expected flags + always on bits - > -2f7c : dd5702 > cmp absflo,x ;test flags - > trap_ne ; -2f7f : d0fe > bne * ;failed not equal (non zero) - > - -2f81 : ca dex -2f82 : 10e6 bpl teor6 -2f84 : a203 ldx #3 -2f86 : teor7 - set_ax absEOa,$ff - > load_flag $ff -2f86 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -2f88 : 48 > pha ;use stack to load status -2f89 : bd4f02 > lda absEOa,x ;precharge accu -2f8c : 28 > plp - -2f8d : 5520 eor zpEO,x - tst_ax absrlo,absflo,$ff-fnz -2f8f : 08 > php ;save flags -2f90 : dd5302 > cmp absrlo,x ;test result - > trap_ne -2f93 : d0fe > bne * ;failed not equal (non zero) - > -2f95 : 68 > pla ;load status - > eor_flag $ff-fnz -2f96 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits - > -2f98 : dd5702 > cmp absflo,x ;test flags - > trap_ne ; -2f9b : d0fe > bne * ;failed not equal (non zero) - > - -2f9d : ca dex -2f9e : 10e6 bpl teor7 - -2fa0 : a203 ldx #3 ;abs,x -2fa2 : teor8 +2f9b : a203 ldx #3 ;abs +2f9d : b520 teor4 lda zpEO,x +2f9f : 8d0302 sta abst set_ax absEOa,0 > load_flag 0 2fa2 : a900 > lda #0 ;allow test to change I-flag (no mask) > 2fa4 : 48 > pha ;use stack to load status -2fa5 : bd4f02 > lda absEOa,x ;precharge accu +2fa5 : bd5e02 > lda absEOa,x ;precharge accu 2fa8 : 28 > plp -2fa9 : 5d4302 eor absEO,x +2fa9 : 4d0302 eor abst tst_ax absrlo,absflo,0 2fac : 08 > php ;save flags -2fad : dd5302 > cmp absrlo,x ;test result +2fad : dd6202 > cmp absrlo,x ;test result > trap_ne 2fb0 : d0fe > bne * ;failed not equal (non zero) > @@ -12209,658 +12306,651 @@ ffff = ram_top = -1 > eor_flag 0 2fb3 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2fb5 : dd5702 > cmp absflo,x ;test flags +2fb5 : dd6602 > cmp absflo,x ;test flags > trap_ne ; 2fb8 : d0fe > bne * ;failed not equal (non zero) > 2fba : ca dex -2fbb : 10e5 bpl teor8 +2fbb : 10e0 bpl teor4 2fbd : a203 ldx #3 -2fbf : teor9 +2fbf : b520 teor5 lda zpEO,x +2fc1 : 8d0302 sta abst set_ax absEOa,$ff > load_flag $ff -2fbf : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2fc4 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2fc1 : 48 > pha ;use stack to load status -2fc2 : bd4f02 > lda absEOa,x ;precharge accu -2fc5 : 28 > plp +2fc6 : 48 > pha ;use stack to load status +2fc7 : bd5e02 > lda absEOa,x ;precharge accu +2fca : 28 > plp -2fc6 : 5d4302 eor absEO,x +2fcb : 4d0302 eor abst tst_ax absrlo,absflo,$ff-fnz -2fc9 : 08 > php ;save flags -2fca : dd5302 > cmp absrlo,x ;test result +2fce : 08 > php ;save flags +2fcf : dd6202 > cmp absrlo,x ;test result > trap_ne -2fcd : d0fe > bne * ;failed not equal (non zero) +2fd2 : d0fe > bne * ;failed not equal (non zero) > -2fcf : 68 > pla ;load status +2fd4 : 68 > pla ;load status > eor_flag $ff-fnz -2fd0 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +2fd5 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -2fd2 : dd5702 > cmp absflo,x ;test flags +2fd7 : dd6602 > cmp absflo,x ;test flags > trap_ne ; -2fd5 : d0fe > bne * ;failed not equal (non zero) +2fda : d0fe > bne * ;failed not equal (non zero) > -2fd7 : ca dex -2fd8 : 10e5 bpl teor9 +2fdc : ca dex +2fdd : 1002 bpl teor6 -2fda : a003 ldy #3 ;abs,y -2fdc : teor10 +2fdf : a203 ldx #3 ;zp,x +2fe1 : teor6 + set_ax absEOa,0 + > load_flag 0 +2fe1 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +2fe3 : 48 > pha ;use stack to load status +2fe4 : bd5e02 > lda absEOa,x ;precharge accu +2fe7 : 28 > plp + +2fe8 : 5520 eor zpEO,x + tst_ax absrlo,absflo,0 +2fea : 08 > php ;save flags +2feb : dd6202 > cmp absrlo,x ;test result + > trap_ne +2fee : d0fe > bne * ;failed not equal (non zero) + > +2ff0 : 68 > pla ;load status + > eor_flag 0 +2ff1 : 4930 > eor #0|fao ;invert expected flags + always on bits + > +2ff3 : dd6602 > cmp absflo,x ;test flags + > trap_ne ; +2ff6 : d0fe > bne * ;failed not equal (non zero) + > + +2ff8 : ca dex +2ff9 : 10e6 bpl teor6 +2ffb : a203 ldx #3 +2ffd : teor7 + set_ax absEOa,$ff + > load_flag $ff +2ffd : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +2fff : 48 > pha ;use stack to load status +3000 : bd5e02 > lda absEOa,x ;precharge accu +3003 : 28 > plp + +3004 : 5520 eor zpEO,x + tst_ax absrlo,absflo,$ff-fnz +3006 : 08 > php ;save flags +3007 : dd6202 > cmp absrlo,x ;test result + > trap_ne +300a : d0fe > bne * ;failed not equal (non zero) + > +300c : 68 > pla ;load status + > eor_flag $ff-fnz +300d : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits + > +300f : dd6602 > cmp absflo,x ;test flags + > trap_ne ; +3012 : d0fe > bne * ;failed not equal (non zero) + > + +3014 : ca dex +3015 : 10e6 bpl teor7 + +3017 : a203 ldx #3 ;abs,x +3019 : teor8 + set_ax absEOa,0 + > load_flag 0 +3019 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +301b : 48 > pha ;use stack to load status +301c : bd5e02 > lda absEOa,x ;precharge accu +301f : 28 > plp + +3020 : 5d5202 eor absEO,x + tst_ax absrlo,absflo,0 +3023 : 08 > php ;save flags +3024 : dd6202 > cmp absrlo,x ;test result + > trap_ne +3027 : d0fe > bne * ;failed not equal (non zero) + > +3029 : 68 > pla ;load status + > eor_flag 0 +302a : 4930 > eor #0|fao ;invert expected flags + always on bits + > +302c : dd6602 > cmp absflo,x ;test flags + > trap_ne ; +302f : d0fe > bne * ;failed not equal (non zero) + > + +3031 : ca dex +3032 : 10e5 bpl teor8 +3034 : a203 ldx #3 +3036 : teor9 + set_ax absEOa,$ff + > load_flag $ff +3036 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +3038 : 48 > pha ;use stack to load status +3039 : bd5e02 > lda absEOa,x ;precharge accu +303c : 28 > plp + +303d : 5d5202 eor absEO,x + tst_ax absrlo,absflo,$ff-fnz +3040 : 08 > php ;save flags +3041 : dd6202 > cmp absrlo,x ;test result + > trap_ne +3044 : d0fe > bne * ;failed not equal (non zero) + > +3046 : 68 > pla ;load status + > eor_flag $ff-fnz +3047 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits + > +3049 : dd6602 > cmp absflo,x ;test flags + > trap_ne ; +304c : d0fe > bne * ;failed not equal (non zero) + > + +304e : ca dex +304f : 10e5 bpl teor9 + +3051 : a003 ldy #3 ;abs,y +3053 : teor10 set_ay absEOa,0 > load_flag 0 -2fdc : a900 > lda #0 ;allow test to change I-flag (no mask) +3053 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2fde : 48 > pha ;use stack to load status -2fdf : b94f02 > lda absEOa,y ;precharge accu -2fe2 : 28 > plp +3055 : 48 > pha ;use stack to load status +3056 : b95e02 > lda absEOa,y ;precharge accu +3059 : 28 > plp -2fe3 : 594302 eor absEO,y +305a : 595202 eor absEO,y tst_ay absrlo,absflo,0 -2fe6 : 08 > php ;save flags -2fe7 : d95302 > cmp absrlo,y ;test result +305d : 08 > php ;save flags +305e : d96202 > cmp absrlo,y ;test result > trap_ne ; -2fea : d0fe > bne * ;failed not equal (non zero) +3061 : d0fe > bne * ;failed not equal (non zero) > -2fec : 68 > pla ;load status +3063 : 68 > pla ;load status > eor_flag 0 -2fed : 4930 > eor #0|fao ;invert expected flags + always on bits +3064 : 4930 > eor #0|fao ;invert expected flags + always on bits > -2fef : d95702 > cmp absflo,y ;test flags +3066 : d96602 > cmp absflo,y ;test flags > trap_ne -2ff2 : d0fe > bne * ;failed not equal (non zero) +3069 : d0fe > bne * ;failed not equal (non zero) > -2ff4 : 88 dey -2ff5 : 10e5 bpl teor10 -2ff7 : a003 ldy #3 -2ff9 : teor11 +306b : 88 dey +306c : 10e5 bpl teor10 +306e : a003 ldy #3 +3070 : teor11 set_ay absEOa,$ff > load_flag $ff -2ff9 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +3070 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2ffb : 48 > pha ;use stack to load status -2ffc : b94f02 > lda absEOa,y ;precharge accu -2fff : 28 > plp +3072 : 48 > pha ;use stack to load status +3073 : b95e02 > lda absEOa,y ;precharge accu +3076 : 28 > plp -3000 : 594302 eor absEO,y +3077 : 595202 eor absEO,y tst_ay absrlo,absflo,$ff-fnz -3003 : 08 > php ;save flags -3004 : d95302 > cmp absrlo,y ;test result +307a : 08 > php ;save flags +307b : d96202 > cmp absrlo,y ;test result > trap_ne ; -3007 : d0fe > bne * ;failed not equal (non zero) +307e : d0fe > bne * ;failed not equal (non zero) > -3009 : 68 > pla ;load status +3080 : 68 > pla ;load status > eor_flag $ff-fnz -300a : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +3081 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -300c : d95702 > cmp absflo,y ;test flags +3083 : d96602 > cmp absflo,y ;test flags > trap_ne -300f : d0fe > bne * ;failed not equal (non zero) +3086 : d0fe > bne * ;failed not equal (non zero) > -3011 : 88 dey -3012 : 10e5 bpl teor11 +3088 : 88 dey +3089 : 10e5 bpl teor11 -3014 : a206 ldx #6 ;(zp,x) -3016 : a003 ldy #3 -3018 : teor12 +308b : a206 ldx #6 ;(zp,x) +308d : a003 ldy #3 +308f : teor12 set_ay absEOa,0 > load_flag 0 -3018 : a900 > lda #0 ;allow test to change I-flag (no mask) +308f : a900 > lda #0 ;allow test to change I-flag (no mask) > -301a : 48 > pha ;use stack to load status -301b : b94f02 > lda absEOa,y ;precharge accu -301e : 28 > plp +3091 : 48 > pha ;use stack to load status +3092 : b95e02 > lda absEOa,y ;precharge accu +3095 : 28 > plp -301f : 4142 eor (indEO,x) +3096 : 4142 eor (indEO,x) tst_ay absrlo,absflo,0 -3021 : 08 > php ;save flags -3022 : d95302 > cmp absrlo,y ;test result +3098 : 08 > php ;save flags +3099 : d96202 > cmp absrlo,y ;test result > trap_ne ; -3025 : d0fe > bne * ;failed not equal (non zero) +309c : d0fe > bne * ;failed not equal (non zero) > -3027 : 68 > pla ;load status +309e : 68 > pla ;load status > eor_flag 0 -3028 : 4930 > eor #0|fao ;invert expected flags + always on bits +309f : 4930 > eor #0|fao ;invert expected flags + always on bits > -302a : d95702 > cmp absflo,y ;test flags +30a1 : d96602 > cmp absflo,y ;test flags > trap_ne -302d : d0fe > bne * ;failed not equal (non zero) +30a4 : d0fe > bne * ;failed not equal (non zero) > -302f : ca dex -3030 : ca dex -3031 : 88 dey -3032 : 10e4 bpl teor12 -3034 : a206 ldx #6 -3036 : a003 ldy #3 -3038 : teor13 +30a6 : ca dex +30a7 : ca dex +30a8 : 88 dey +30a9 : 10e4 bpl teor12 +30ab : a206 ldx #6 +30ad : a003 ldy #3 +30af : teor13 set_ay absEOa,$ff > load_flag $ff -3038 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +30af : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -303a : 48 > pha ;use stack to load status -303b : b94f02 > lda absEOa,y ;precharge accu -303e : 28 > plp +30b1 : 48 > pha ;use stack to load status +30b2 : b95e02 > lda absEOa,y ;precharge accu +30b5 : 28 > plp -303f : 4142 eor (indEO,x) +30b6 : 4142 eor (indEO,x) tst_ay absrlo,absflo,$ff-fnz -3041 : 08 > php ;save flags -3042 : d95302 > cmp absrlo,y ;test result +30b8 : 08 > php ;save flags +30b9 : d96202 > cmp absrlo,y ;test result > trap_ne ; -3045 : d0fe > bne * ;failed not equal (non zero) +30bc : d0fe > bne * ;failed not equal (non zero) > -3047 : 68 > pla ;load status +30be : 68 > pla ;load status > eor_flag $ff-fnz -3048 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +30bf : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -304a : d95702 > cmp absflo,y ;test flags +30c1 : d96602 > cmp absflo,y ;test flags > trap_ne -304d : d0fe > bne * ;failed not equal (non zero) +30c4 : d0fe > bne * ;failed not equal (non zero) > -304f : ca dex -3050 : ca dex -3051 : 88 dey -3052 : 10e4 bpl teor13 +30c6 : ca dex +30c7 : ca dex +30c8 : 88 dey +30c9 : 10e4 bpl teor13 -3054 : a003 ldy #3 ;(zp),y -3056 : teor14 +30cb : a003 ldy #3 ;(zp),y +30cd : teor14 set_ay absEOa,0 > load_flag 0 -3056 : a900 > lda #0 ;allow test to change I-flag (no mask) +30cd : a900 > lda #0 ;allow test to change I-flag (no mask) > -3058 : 48 > pha ;use stack to load status -3059 : b94f02 > lda absEOa,y ;precharge accu -305c : 28 > plp +30cf : 48 > pha ;use stack to load status +30d0 : b95e02 > lda absEOa,y ;precharge accu +30d3 : 28 > plp -305d : 5142 eor (indEO),y +30d4 : 5142 eor (indEO),y tst_ay absrlo,absflo,0 -305f : 08 > php ;save flags -3060 : d95302 > cmp absrlo,y ;test result +30d6 : 08 > php ;save flags +30d7 : d96202 > cmp absrlo,y ;test result > trap_ne ; -3063 : d0fe > bne * ;failed not equal (non zero) +30da : d0fe > bne * ;failed not equal (non zero) > -3065 : 68 > pla ;load status +30dc : 68 > pla ;load status > eor_flag 0 -3066 : 4930 > eor #0|fao ;invert expected flags + always on bits +30dd : 4930 > eor #0|fao ;invert expected flags + always on bits > -3068 : d95702 > cmp absflo,y ;test flags +30df : d96602 > cmp absflo,y ;test flags > trap_ne -306b : d0fe > bne * ;failed not equal (non zero) +30e2 : d0fe > bne * ;failed not equal (non zero) > -306d : 88 dey -306e : 10e6 bpl teor14 -3070 : a003 ldy #3 -3072 : teor15 +30e4 : 88 dey +30e5 : 10e6 bpl teor14 +30e7 : a003 ldy #3 +30e9 : teor15 set_ay absEOa,$ff > load_flag $ff -3072 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +30e9 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -3074 : 48 > pha ;use stack to load status -3075 : b94f02 > lda absEOa,y ;precharge accu -3078 : 28 > plp +30eb : 48 > pha ;use stack to load status +30ec : b95e02 > lda absEOa,y ;precharge accu +30ef : 28 > plp -3079 : 5142 eor (indEO),y +30f0 : 5142 eor (indEO),y tst_ay absrlo,absflo,$ff-fnz -307b : 08 > php ;save flags -307c : d95302 > cmp absrlo,y ;test result +30f2 : 08 > php ;save flags +30f3 : d96202 > cmp absrlo,y ;test result > trap_ne ; -307f : d0fe > bne * ;failed not equal (non zero) +30f6 : d0fe > bne * ;failed not equal (non zero) > -3081 : 68 > pla ;load status +30f8 : 68 > pla ;load status > eor_flag $ff-fnz -3082 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +30f9 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -3084 : d95702 > cmp absflo,y ;test flags +30fb : d96602 > cmp absflo,y ;test flags > trap_ne -3087 : d0fe > bne * ;failed not equal (non zero) +30fe : d0fe > bne * ;failed not equal (non zero) > -3089 : 88 dey -308a : 10e6 bpl teor15 +3100 : 88 dey +3101 : 10e6 bpl teor15 next_test -308c : ad0002 > lda test_case ;previous test -308f : c927 > cmp #test_num +3103 : ad0002 > lda test_case ;previous test +3106 : c927 > cmp #test_num > trap_ne ;test is out of sequence -3091 : d0fe > bne * ;failed not equal (non zero) +3108 : d0fe > bne * ;failed not equal (non zero) > 0028 = >test_num = test_num + 1 -3093 : a928 > lda #test_num ;*** next tests' number -3095 : 8d0002 > sta test_case +310a : a928 > lda #test_num ;*** next tests' number +310c : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; OR -3098 : a203 ldx #3 ;immediate - self modifying code -309a : b518 tora lda zpOR,x -309c : 8da730 sta torai1 +310f : a203 ldx #3 ;immediate - self modifying code +3111 : b518 tora lda zpOR,x +3113 : 8d0f02 sta ex_orai+1 ;set ORA # operand set_ax absORa,0 > load_flag 0 -309f : a900 > lda #0 ;allow test to change I-flag (no mask) +3116 : a900 > lda #0 ;allow test to change I-flag (no mask) > -30a1 : 48 > pha ;use stack to load status -30a2 : bd4702 > lda absORa,x ;precharge accu -30a5 : 28 > plp +3118 : 48 > pha ;use stack to load status +3119 : bd5602 > lda absORa,x ;precharge accu +311c : 28 > plp -30a7 = torai1 equ *+1 ;target for immediate operand -30a6 : 0963 ora #99 +311d : 200e02 jsr ex_orai ;execute ORA # in RAM tst_ax absrlo,absflo,0 -30a8 : 08 > php ;save flags -30a9 : dd5302 > cmp absrlo,x ;test result +3120 : 08 > php ;save flags +3121 : dd6202 > cmp absrlo,x ;test result > trap_ne -30ac : d0fe > bne * ;failed not equal (non zero) +3124 : d0fe > bne * ;failed not equal (non zero) > -30ae : 68 > pla ;load status +3126 : 68 > pla ;load status > eor_flag 0 -30af : 4930 > eor #0|fao ;invert expected flags + always on bits +3127 : 4930 > eor #0|fao ;invert expected flags + always on bits > -30b1 : dd5702 > cmp absflo,x ;test flags +3129 : dd6602 > cmp absflo,x ;test flags > trap_ne ; -30b4 : d0fe > bne * ;failed not equal (non zero) +312c : d0fe > bne * ;failed not equal (non zero) > -30b6 : ca dex -30b7 : 10e1 bpl tora -30b9 : a203 ldx #3 -30bb : b518 tora1 lda zpOR,x -30bd : 8dc830 sta torai2 +312e : ca dex +312f : 10e0 bpl tora +3131 : a203 ldx #3 +3133 : b518 tora1 lda zpOR,x +3135 : 8d0f02 sta ex_orai+1 ;set ORA # operand set_ax absORa,$ff > load_flag $ff -30c0 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +3138 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -30c2 : 48 > pha ;use stack to load status -30c3 : bd4702 > lda absORa,x ;precharge accu -30c6 : 28 > plp +313a : 48 > pha ;use stack to load status +313b : bd5602 > lda absORa,x ;precharge accu +313e : 28 > plp -30c8 = torai2 equ *+1 ;target for immediate operand -30c7 : 0963 ora #99 +313f : 200e02 jsr ex_orai ;execute ORA # in RAM tst_ax absrlo,absflo,$ff-fnz -30c9 : 08 > php ;save flags -30ca : dd5302 > cmp absrlo,x ;test result +3142 : 08 > php ;save flags +3143 : dd6202 > cmp absrlo,x ;test result > trap_ne -30cd : d0fe > bne * ;failed not equal (non zero) +3146 : d0fe > bne * ;failed not equal (non zero) > -30cf : 68 > pla ;load status +3148 : 68 > pla ;load status > eor_flag $ff-fnz -30d0 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +3149 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -30d2 : dd5702 > cmp absflo,x ;test flags +314b : dd6602 > cmp absflo,x ;test flags > trap_ne ; -30d5 : d0fe > bne * ;failed not equal (non zero) +314e : d0fe > bne * ;failed not equal (non zero) > -30d7 : ca dex -30d8 : 10e1 bpl tora1 - -30da : a203 ldx #3 ;zp -30dc : b518 tora2 lda zpOR,x -30de : 850c sta zpt +3150 : ca dex +3151 : 10e0 bpl tora1 + +3153 : a203 ldx #3 ;zp +3155 : b518 tora2 lda zpOR,x +3157 : 850c sta zpt set_ax absORa,0 > load_flag 0 -30e0 : a900 > lda #0 ;allow test to change I-flag (no mask) +3159 : a900 > lda #0 ;allow test to change I-flag (no mask) > -30e2 : 48 > pha ;use stack to load status -30e3 : bd4702 > lda absORa,x ;precharge accu -30e6 : 28 > plp +315b : 48 > pha ;use stack to load status +315c : bd5602 > lda absORa,x ;precharge accu +315f : 28 > plp -30e7 : 050c ora zpt +3160 : 050c ora zpt tst_ax absrlo,absflo,0 -30e9 : 08 > php ;save flags -30ea : dd5302 > cmp absrlo,x ;test result +3162 : 08 > php ;save flags +3163 : dd6202 > cmp absrlo,x ;test result > trap_ne -30ed : d0fe > bne * ;failed not equal (non zero) +3166 : d0fe > bne * ;failed not equal (non zero) > -30ef : 68 > pla ;load status +3168 : 68 > pla ;load status > eor_flag 0 -30f0 : 4930 > eor #0|fao ;invert expected flags + always on bits +3169 : 4930 > eor #0|fao ;invert expected flags + always on bits > -30f2 : dd5702 > cmp absflo,x ;test flags +316b : dd6602 > cmp absflo,x ;test flags > trap_ne ; -30f5 : d0fe > bne * ;failed not equal (non zero) +316e : d0fe > bne * ;failed not equal (non zero) > -30f7 : ca dex -30f8 : 10e2 bpl tora2 -30fa : a203 ldx #3 -30fc : b518 tora3 lda zpOR,x -30fe : 850c sta zpt +3170 : ca dex +3171 : 10e2 bpl tora2 +3173 : a203 ldx #3 +3175 : b518 tora3 lda zpOR,x +3177 : 850c sta zpt set_ax absORa,$ff > load_flag $ff -3100 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +3179 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -3102 : 48 > pha ;use stack to load status -3103 : bd4702 > lda absORa,x ;precharge accu -3106 : 28 > plp +317b : 48 > pha ;use stack to load status +317c : bd5602 > lda absORa,x ;precharge accu +317f : 28 > plp -3107 : 050c ora zpt +3180 : 050c ora zpt tst_ax absrlo,absflo,$ff-fnz -3109 : 08 > php ;save flags -310a : dd5302 > cmp absrlo,x ;test result +3182 : 08 > php ;save flags +3183 : dd6202 > cmp absrlo,x ;test result > trap_ne -310d : d0fe > bne * ;failed not equal (non zero) +3186 : d0fe > bne * ;failed not equal (non zero) > -310f : 68 > pla ;load status +3188 : 68 > pla ;load status > eor_flag $ff-fnz -3110 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +3189 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -3112 : dd5702 > cmp absflo,x ;test flags +318b : dd6602 > cmp absflo,x ;test flags > trap_ne ; -3115 : d0fe > bne * ;failed not equal (non zero) +318e : d0fe > bne * ;failed not equal (non zero) > -3117 : ca dex -3118 : 10e2 bpl tora3 +3190 : ca dex +3191 : 10e2 bpl tora3 -311a : a203 ldx #3 ;abs -311c : b518 tora4 lda zpOR,x -311e : 8d0302 sta abst +3193 : a203 ldx #3 ;abs +3195 : b518 tora4 lda zpOR,x +3197 : 8d0302 sta abst set_ax absORa,0 > load_flag 0 -3121 : a900 > lda #0 ;allow test to change I-flag (no mask) +319a : a900 > lda #0 ;allow test to change I-flag (no mask) > -3123 : 48 > pha ;use stack to load status -3124 : bd4702 > lda absORa,x ;precharge accu -3127 : 28 > plp +319c : 48 > pha ;use stack to load status +319d : bd5602 > lda absORa,x ;precharge accu +31a0 : 28 > plp -3128 : 0d0302 ora abst +31a1 : 0d0302 ora abst tst_ax absrlo,absflo,0 -312b : 08 > php ;save flags -312c : dd5302 > cmp absrlo,x ;test result +31a4 : 08 > php ;save flags +31a5 : dd6202 > cmp absrlo,x ;test result > trap_ne -312f : d0fe > bne * ;failed not equal (non zero) +31a8 : d0fe > bne * ;failed not equal (non zero) > -3131 : 68 > pla ;load status +31aa : 68 > pla ;load status > eor_flag 0 -3132 : 4930 > eor #0|fao ;invert expected flags + always on bits +31ab : 4930 > eor #0|fao ;invert expected flags + always on bits > -3134 : dd5702 > cmp absflo,x ;test flags +31ad : dd6602 > cmp absflo,x ;test flags > trap_ne ; -3137 : d0fe > bne * ;failed not equal (non zero) +31b0 : d0fe > bne * ;failed not equal (non zero) > -3139 : ca dex -313a : 10e0 bpl tora4 -313c : a203 ldx #3 -313e : b518 tora5 lda zpOR,x -3140 : 8d0302 sta abst +31b2 : ca dex +31b3 : 10e0 bpl tora4 +31b5 : a203 ldx #3 +31b7 : b518 tora5 lda zpOR,x +31b9 : 8d0302 sta abst set_ax absORa,$ff > load_flag $ff -3143 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +31bc : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -3145 : 48 > pha ;use stack to load status -3146 : bd4702 > lda absORa,x ;precharge accu -3149 : 28 > plp +31be : 48 > pha ;use stack to load status +31bf : bd5602 > lda absORa,x ;precharge accu +31c2 : 28 > plp -314a : 0d0302 ora abst +31c3 : 0d0302 ora abst tst_ax absrlo,absflo,$ff-fnz -314d : 08 > php ;save flags -314e : dd5302 > cmp absrlo,x ;test result +31c6 : 08 > php ;save flags +31c7 : dd6202 > cmp absrlo,x ;test result > trap_ne -3151 : d0fe > bne * ;failed not equal (non zero) +31ca : d0fe > bne * ;failed not equal (non zero) > -3153 : 68 > pla ;load status +31cc : 68 > pla ;load status > eor_flag $ff-fnz -3154 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +31cd : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -3156 : dd5702 > cmp absflo,x ;test flags +31cf : dd6602 > cmp absflo,x ;test flags > trap_ne ; -3159 : d0fe > bne * ;failed not equal (non zero) +31d2 : d0fe > bne * ;failed not equal (non zero) > -315b : ca dex -315c : 1002 bpl tora6 +31d4 : ca dex +31d5 : 1002 bpl tora6 -315e : a203 ldx #3 ;zp,x -3160 : tora6 +31d7 : a203 ldx #3 ;zp,x +31d9 : tora6 set_ax absORa,0 > load_flag 0 -3160 : a900 > lda #0 ;allow test to change I-flag (no mask) +31d9 : a900 > lda #0 ;allow test to change I-flag (no mask) > -3162 : 48 > pha ;use stack to load status -3163 : bd4702 > lda absORa,x ;precharge accu -3166 : 28 > plp +31db : 48 > pha ;use stack to load status +31dc : bd5602 > lda absORa,x ;precharge accu +31df : 28 > plp -3167 : 1518 ora zpOR,x +31e0 : 1518 ora zpOR,x tst_ax absrlo,absflo,0 -3169 : 08 > php ;save flags -316a : dd5302 > cmp absrlo,x ;test result +31e2 : 08 > php ;save flags +31e3 : dd6202 > cmp absrlo,x ;test result > trap_ne -316d : d0fe > bne * ;failed not equal (non zero) +31e6 : d0fe > bne * ;failed not equal (non zero) > -316f : 68 > pla ;load status +31e8 : 68 > pla ;load status > eor_flag 0 -3170 : 4930 > eor #0|fao ;invert expected flags + always on bits +31e9 : 4930 > eor #0|fao ;invert expected flags + always on bits > -3172 : dd5702 > cmp absflo,x ;test flags +31eb : dd6602 > cmp absflo,x ;test flags > trap_ne ; -3175 : d0fe > bne * ;failed not equal (non zero) +31ee : d0fe > bne * ;failed not equal (non zero) > -3177 : ca dex -3178 : 10e6 bpl tora6 -317a : a203 ldx #3 -317c : tora7 +31f0 : ca dex +31f1 : 10e6 bpl tora6 +31f3 : a203 ldx #3 +31f5 : tora7 set_ax absORa,$ff > load_flag $ff -317c : a9ff > lda #$ff ;allow test to change I-flag (no mask) +31f5 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -317e : 48 > pha ;use stack to load status -317f : bd4702 > lda absORa,x ;precharge accu -3182 : 28 > plp +31f7 : 48 > pha ;use stack to load status +31f8 : bd5602 > lda absORa,x ;precharge accu +31fb : 28 > plp -3183 : 1518 ora zpOR,x +31fc : 1518 ora zpOR,x tst_ax absrlo,absflo,$ff-fnz -3185 : 08 > php ;save flags -3186 : dd5302 > cmp absrlo,x ;test result +31fe : 08 > php ;save flags +31ff : dd6202 > cmp absrlo,x ;test result > trap_ne -3189 : d0fe > bne * ;failed not equal (non zero) +3202 : d0fe > bne * ;failed not equal (non zero) > -318b : 68 > pla ;load status +3204 : 68 > pla ;load status > eor_flag $ff-fnz -318c : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +3205 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -318e : dd5702 > cmp absflo,x ;test flags +3207 : dd6602 > cmp absflo,x ;test flags > trap_ne ; -3191 : d0fe > bne * ;failed not equal (non zero) +320a : d0fe > bne * ;failed not equal (non zero) > -3193 : ca dex -3194 : 10e6 bpl tora7 +320c : ca dex +320d : 10e6 bpl tora7 -3196 : a203 ldx #3 ;abs,x -3198 : tora8 +320f : a203 ldx #3 ;abs,x +3211 : tora8 set_ax absORa,0 > load_flag 0 -3198 : a900 > lda #0 ;allow test to change I-flag (no mask) +3211 : a900 > lda #0 ;allow test to change I-flag (no mask) > -319a : 48 > pha ;use stack to load status -319b : bd4702 > lda absORa,x ;precharge accu -319e : 28 > plp +3213 : 48 > pha ;use stack to load status +3214 : bd5602 > lda absORa,x ;precharge accu +3217 : 28 > plp -319f : 1d3b02 ora absOR,x +3218 : 1d4a02 ora absOR,x tst_ax absrlo,absflo,0 -31a2 : 08 > php ;save flags -31a3 : dd5302 > cmp absrlo,x ;test result +321b : 08 > php ;save flags +321c : dd6202 > cmp absrlo,x ;test result > trap_ne -31a6 : d0fe > bne * ;failed not equal (non zero) +321f : d0fe > bne * ;failed not equal (non zero) > -31a8 : 68 > pla ;load status +3221 : 68 > pla ;load status > eor_flag 0 -31a9 : 4930 > eor #0|fao ;invert expected flags + always on bits +3222 : 4930 > eor #0|fao ;invert expected flags + always on bits > -31ab : dd5702 > cmp absflo,x ;test flags +3224 : dd6602 > cmp absflo,x ;test flags > trap_ne ; -31ae : d0fe > bne * ;failed not equal (non zero) +3227 : d0fe > bne * ;failed not equal (non zero) > -31b0 : ca dex -31b1 : 10e5 bpl tora8 -31b3 : a203 ldx #3 -31b5 : tora9 +3229 : ca dex +322a : 10e5 bpl tora8 +322c : a203 ldx #3 +322e : tora9 set_ax absORa,$ff > load_flag $ff -31b5 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -31b7 : 48 > pha ;use stack to load status -31b8 : bd4702 > lda absORa,x ;precharge accu -31bb : 28 > plp - -31bc : 1d3b02 ora absOR,x - tst_ax absrlo,absflo,$ff-fnz -31bf : 08 > php ;save flags -31c0 : dd5302 > cmp absrlo,x ;test result - > trap_ne -31c3 : d0fe > bne * ;failed not equal (non zero) - > -31c5 : 68 > pla ;load status - > eor_flag $ff-fnz -31c6 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits - > -31c8 : dd5702 > cmp absflo,x ;test flags - > trap_ne ; -31cb : d0fe > bne * ;failed not equal (non zero) - > - -31cd : ca dex -31ce : 10e5 bpl tora9 - -31d0 : a003 ldy #3 ;abs,y -31d2 : tora10 - set_ay absORa,0 - > load_flag 0 -31d2 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -31d4 : 48 > pha ;use stack to load status -31d5 : b94702 > lda absORa,y ;precharge accu -31d8 : 28 > plp - -31d9 : 193b02 ora absOR,y - tst_ay absrlo,absflo,0 -31dc : 08 > php ;save flags -31dd : d95302 > cmp absrlo,y ;test result - > trap_ne ; -31e0 : d0fe > bne * ;failed not equal (non zero) - > -31e2 : 68 > pla ;load status - > eor_flag 0 -31e3 : 4930 > eor #0|fao ;invert expected flags + always on bits - > -31e5 : d95702 > cmp absflo,y ;test flags - > trap_ne -31e8 : d0fe > bne * ;failed not equal (non zero) - > - -31ea : 88 dey -31eb : 10e5 bpl tora10 -31ed : a003 ldy #3 -31ef : tora11 - set_ay absORa,$ff - > load_flag $ff -31ef : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -31f1 : 48 > pha ;use stack to load status -31f2 : b94702 > lda absORa,y ;precharge accu -31f5 : 28 > plp - -31f6 : 193b02 ora absOR,y - tst_ay absrlo,absflo,$ff-fnz -31f9 : 08 > php ;save flags -31fa : d95302 > cmp absrlo,y ;test result - > trap_ne ; -31fd : d0fe > bne * ;failed not equal (non zero) - > -31ff : 68 > pla ;load status - > eor_flag $ff-fnz -3200 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits - > -3202 : d95702 > cmp absflo,y ;test flags - > trap_ne -3205 : d0fe > bne * ;failed not equal (non zero) - > - -3207 : 88 dey -3208 : 10e5 bpl tora11 - -320a : a206 ldx #6 ;(zp,x) -320c : a003 ldy #3 -320e : tora12 - set_ay absORa,0 - > load_flag 0 -320e : a900 > lda #0 ;allow test to change I-flag (no mask) - > -3210 : 48 > pha ;use stack to load status -3211 : b94702 > lda absORa,y ;precharge accu -3214 : 28 > plp - -3215 : 014a ora (indOR,x) - tst_ay absrlo,absflo,0 -3217 : 08 > php ;save flags -3218 : d95302 > cmp absrlo,y ;test result - > trap_ne ; -321b : d0fe > bne * ;failed not equal (non zero) - > -321d : 68 > pla ;load status - > eor_flag 0 -321e : 4930 > eor #0|fao ;invert expected flags + always on bits - > -3220 : d95702 > cmp absflo,y ;test flags - > trap_ne -3223 : d0fe > bne * ;failed not equal (non zero) - > - -3225 : ca dex -3226 : ca dex -3227 : 88 dey -3228 : 10e4 bpl tora12 -322a : a206 ldx #6 -322c : a003 ldy #3 -322e : tora13 - set_ay absORa,$ff - > load_flag $ff 322e : a9ff > lda #$ff ;allow test to change I-flag (no mask) > 3230 : 48 > pha ;use stack to load status -3231 : b94702 > lda absORa,y ;precharge accu +3231 : bd5602 > lda absORa,x ;precharge accu 3234 : 28 > plp -3235 : 014a ora (indOR,x) - tst_ay absrlo,absflo,$ff-fnz -3237 : 08 > php ;save flags -3238 : d95302 > cmp absrlo,y ;test result - > trap_ne ; -323b : d0fe > bne * ;failed not equal (non zero) - > -323d : 68 > pla ;load status - > eor_flag $ff-fnz -323e : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits - > -3240 : d95702 > cmp absflo,y ;test flags +3235 : 1d4a02 ora absOR,x + tst_ax absrlo,absflo,$ff-fnz +3238 : 08 > php ;save flags +3239 : dd6202 > cmp absrlo,x ;test result > trap_ne -3243 : d0fe > bne * ;failed not equal (non zero) +323c : d0fe > bne * ;failed not equal (non zero) + > +323e : 68 > pla ;load status + > eor_flag $ff-fnz +323f : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits + > +3241 : dd6602 > cmp absflo,x ;test flags + > trap_ne ; +3244 : d0fe > bne * ;failed not equal (non zero) > -3245 : ca dex 3246 : ca dex -3247 : 88 dey -3248 : 10e4 bpl tora13 +3247 : 10e5 bpl tora9 -324a : a003 ldy #3 ;(zp),y -324c : tora14 +3249 : a003 ldy #3 ;abs,y +324b : tora10 set_ay absORa,0 > load_flag 0 -324c : a900 > lda #0 ;allow test to change I-flag (no mask) +324b : a900 > lda #0 ;allow test to change I-flag (no mask) > -324e : 48 > pha ;use stack to load status -324f : b94702 > lda absORa,y ;precharge accu -3252 : 28 > plp +324d : 48 > pha ;use stack to load status +324e : b95602 > lda absORa,y ;precharge accu +3251 : 28 > plp -3253 : 114a ora (indOR),y +3252 : 194a02 ora absOR,y tst_ay absrlo,absflo,0 3255 : 08 > php ;save flags -3256 : d95302 > cmp absrlo,y ;test result +3256 : d96202 > cmp absrlo,y ;test result > trap_ne ; 3259 : d0fe > bne * ;failed not equal (non zero) > @@ -12868,114 +12958,235 @@ ffff = ram_top = -1 > eor_flag 0 325c : 4930 > eor #0|fao ;invert expected flags + always on bits > -325e : d95702 > cmp absflo,y ;test flags +325e : d96602 > cmp absflo,y ;test flags > trap_ne 3261 : d0fe > bne * ;failed not equal (non zero) > 3263 : 88 dey -3264 : 10e6 bpl tora14 +3264 : 10e5 bpl tora10 3266 : a003 ldy #3 -3268 : tora15 +3268 : tora11 set_ay absORa,$ff > load_flag $ff 3268 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > 326a : 48 > pha ;use stack to load status -326b : b94702 > lda absORa,y ;precharge accu +326b : b95602 > lda absORa,y ;precharge accu 326e : 28 > plp -326f : 114a ora (indOR),y +326f : 194a02 ora absOR,y tst_ay absrlo,absflo,$ff-fnz -3271 : 08 > php ;save flags -3272 : d95302 > cmp absrlo,y ;test result +3272 : 08 > php ;save flags +3273 : d96202 > cmp absrlo,y ;test result > trap_ne ; -3275 : d0fe > bne * ;failed not equal (non zero) +3276 : d0fe > bne * ;failed not equal (non zero) > -3277 : 68 > pla ;load status +3278 : 68 > pla ;load status > eor_flag $ff-fnz -3278 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +3279 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -327a : d95702 > cmp absflo,y ;test flags +327b : d96602 > cmp absflo,y ;test flags > trap_ne -327d : d0fe > bne * ;failed not equal (non zero) +327e : d0fe > bne * ;failed not equal (non zero) > -327f : 88 dey -3280 : 10e6 bpl tora15 +3280 : 88 dey +3281 : 10e5 bpl tora11 + +3283 : a206 ldx #6 ;(zp,x) +3285 : a003 ldy #3 +3287 : tora12 + set_ay absORa,0 + > load_flag 0 +3287 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +3289 : 48 > pha ;use stack to load status +328a : b95602 > lda absORa,y ;precharge accu +328d : 28 > plp + +328e : 014a ora (indOR,x) + tst_ay absrlo,absflo,0 +3290 : 08 > php ;save flags +3291 : d96202 > cmp absrlo,y ;test result + > trap_ne ; +3294 : d0fe > bne * ;failed not equal (non zero) + > +3296 : 68 > pla ;load status + > eor_flag 0 +3297 : 4930 > eor #0|fao ;invert expected flags + always on bits + > +3299 : d96602 > cmp absflo,y ;test flags + > trap_ne +329c : d0fe > bne * ;failed not equal (non zero) + > + +329e : ca dex +329f : ca dex +32a0 : 88 dey +32a1 : 10e4 bpl tora12 +32a3 : a206 ldx #6 +32a5 : a003 ldy #3 +32a7 : tora13 + set_ay absORa,$ff + > load_flag $ff +32a7 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +32a9 : 48 > pha ;use stack to load status +32aa : b95602 > lda absORa,y ;precharge accu +32ad : 28 > plp + +32ae : 014a ora (indOR,x) + tst_ay absrlo,absflo,$ff-fnz +32b0 : 08 > php ;save flags +32b1 : d96202 > cmp absrlo,y ;test result + > trap_ne ; +32b4 : d0fe > bne * ;failed not equal (non zero) + > +32b6 : 68 > pla ;load status + > eor_flag $ff-fnz +32b7 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits + > +32b9 : d96602 > cmp absflo,y ;test flags + > trap_ne +32bc : d0fe > bne * ;failed not equal (non zero) + > + +32be : ca dex +32bf : ca dex +32c0 : 88 dey +32c1 : 10e4 bpl tora13 + +32c3 : a003 ldy #3 ;(zp),y +32c5 : tora14 + set_ay absORa,0 + > load_flag 0 +32c5 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +32c7 : 48 > pha ;use stack to load status +32c8 : b95602 > lda absORa,y ;precharge accu +32cb : 28 > plp + +32cc : 114a ora (indOR),y + tst_ay absrlo,absflo,0 +32ce : 08 > php ;save flags +32cf : d96202 > cmp absrlo,y ;test result + > trap_ne ; +32d2 : d0fe > bne * ;failed not equal (non zero) + > +32d4 : 68 > pla ;load status + > eor_flag 0 +32d5 : 4930 > eor #0|fao ;invert expected flags + always on bits + > +32d7 : d96602 > cmp absflo,y ;test flags + > trap_ne +32da : d0fe > bne * ;failed not equal (non zero) + > + +32dc : 88 dey +32dd : 10e6 bpl tora14 +32df : a003 ldy #3 +32e1 : tora15 + set_ay absORa,$ff + > load_flag $ff +32e1 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +32e3 : 48 > pha ;use stack to load status +32e4 : b95602 > lda absORa,y ;precharge accu +32e7 : 28 > plp + +32e8 : 114a ora (indOR),y + tst_ay absrlo,absflo,$ff-fnz +32ea : 08 > php ;save flags +32eb : d96202 > cmp absrlo,y ;test result + > trap_ne ; +32ee : d0fe > bne * ;failed not equal (non zero) + > +32f0 : 68 > pla ;load status + > eor_flag $ff-fnz +32f1 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits + > +32f3 : d96602 > cmp absflo,y ;test flags + > trap_ne +32f6 : d0fe > bne * ;failed not equal (non zero) + > + +32f8 : 88 dey +32f9 : 10e6 bpl tora15 if I_flag = 3 -3282 : 58 cli +32fb : 58 cli endif next_test -3283 : ad0002 > lda test_case ;previous test -3286 : c928 > cmp #test_num +32fc : ad0002 > lda test_case ;previous test +32ff : c928 > cmp #test_num > trap_ne ;test is out of sequence -3288 : d0fe > bne * ;failed not equal (non zero) +3301 : d0fe > bne * ;failed not equal (non zero) > 0029 = >test_num = test_num + 1 -328a : a929 > lda #test_num ;*** next tests' number -328c : 8d0002 > sta test_case +3303 : a929 > lda #test_num ;*** next tests' number +3305 : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; full binary add/subtract test ; iterates through all combinations of operands and carry input ; uses increments/decrements to predict result & result flags -328f : d8 cld -3290 : a20e ldx #ad2 ;for indexed test -3292 : a0ff ldy #$ff ;max range -3294 : a900 lda #0 ;start with adding zeroes & no carry -3296 : 850c sta adfc ;carry in - for diag -3298 : 850d sta ad1 ;operand 1 - accumulator -329a : 850e sta ad2 ;operand 2 - memory or immediate -329c : 8d0302 sta ada2 ;non zp -329f : 850f sta adrl ;expected result bits 0-7 -32a1 : 8510 sta adrh ;expected result bit 8 (carry out) -32a3 : a9ff lda #$ff ;complemented operand 2 for subtract -32a5 : 8512 sta sb2 -32a7 : 8d0402 sta sba2 ;non zp -32aa : a902 lda #2 ;expected Z-flag -32ac : 8511 sta adrf -32ae : 18 tadd clc ;test with carry clear -32af : 20d034 jsr chkadd -32b2 : e60c inc adfc ;now with carry -32b4 : e60f inc adrl ;result +1 -32b6 : 08 php ;save N & Z from low result -32b7 : 08 php -32b8 : 68 pla ;accu holds expected flags -32b9 : 2982 and #$82 ;mask N & Z -32bb : 28 plp -32bc : d002 bne tadd1 -32be : e610 inc adrh ;result bit 8 - carry -32c0 : 0510 tadd1 ora adrh ;merge C to expected flags -32c2 : 8511 sta adrf ;save expected flags except overflow -32c4 : 38 sec ;test with carry set -32c5 : 20d034 jsr chkadd -32c8 : c60c dec adfc ;same for operand +1 but no carry -32ca : e60d inc ad1 -32cc : d0e0 bne tadd ;iterate op1 -32ce : a900 lda #0 ;preset result to op2 when op1 = 0 -32d0 : 8510 sta adrh -32d2 : ee0302 inc ada2 -32d5 : e60e inc ad2 -32d7 : 08 php ;save NZ as operand 2 becomes the new result -32d8 : 68 pla -32d9 : 2982 and #$82 ;mask N00000Z0 -32db : 8511 sta adrf ;no need to check carry as we are adding to 0 -32dd : c612 dec sb2 ;complement subtract operand 2 -32df : ce0402 dec sba2 -32e2 : a50e lda ad2 -32e4 : 850f sta adrl -32e6 : d0c6 bne tadd ;iterate op2 +3308 : d8 cld +3309 : a20e ldx #ad2 ;for indexed test +330b : a0ff ldy #$ff ;max range +330d : a900 lda #0 ;start with adding zeroes & no carry +330f : 850c sta adfc ;carry in - for diag +3311 : 850d sta ad1 ;operand 1 - accumulator +3313 : 850e sta ad2 ;operand 2 - memory or immediate +3315 : 8d0302 sta ada2 ;non zp +3318 : 850f sta adrl ;expected result bits 0-7 +331a : 8510 sta adrh ;expected result bit 8 (carry out) +331c : a9ff lda #$ff ;complemented operand 2 for subtract +331e : 8512 sta sb2 +3320 : 8d0402 sta sba2 ;non zp +3323 : a902 lda #2 ;expected Z-flag +3325 : 8511 sta adrf +3327 : 18 tadd clc ;test with carry clear +3328 : 20a235 jsr chkadd +332b : e60c inc adfc ;now with carry +332d : e60f inc adrl ;result +1 +332f : 08 php ;save N & Z from low result +3330 : 08 php +3331 : 68 pla ;accu holds expected flags +3332 : 2982 and #$82 ;mask N & Z +3334 : 28 plp +3335 : d002 bne tadd1 +3337 : e610 inc adrh ;result bit 8 - carry +3339 : 0510 tadd1 ora adrh ;merge C to expected flags +333b : 8511 sta adrf ;save expected flags except overflow +333d : 38 sec ;test with carry set +333e : 20a235 jsr chkadd +3341 : c60c dec adfc ;same for operand +1 but no carry +3343 : e60d inc ad1 +3345 : d0e0 bne tadd ;iterate op1 +3347 : a900 lda #0 ;preset result to op2 when op1 = 0 +3349 : 8510 sta adrh +334b : ee0302 inc ada2 +334e : e60e inc ad2 +3350 : 08 php ;save NZ as operand 2 becomes the new result +3351 : 68 pla +3352 : 2982 and #$82 ;mask N00000Z0 +3354 : 8511 sta adrf ;no need to check carry as we are adding to 0 +3356 : c612 dec sb2 ;complement subtract operand 2 +3358 : ce0402 dec sba2 +335b : a50e lda ad2 +335d : 850f sta adrl +335f : d0c6 bne tadd ;iterate op2 + if disable_decimal < 1 next_test -32e8 : ad0002 > lda test_case ;previous test -32eb : c929 > cmp #test_num +3361 : ad0002 > lda test_case ;previous test +3364 : c929 > cmp #test_num > trap_ne ;test is out of sequence -32ed : d0fe > bne * ;failed not equal (non zero) +3366 : d0fe > bne * ;failed not equal (non zero) > 002a = >test_num = test_num + 1 -32ef : a92a > lda #test_num ;*** next tests' number -32f1 : 8d0002 > sta test_case +3368 : a92a > lda #test_num ;*** next tests' number +336a : 8d0002 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test @@ -12984,90 +13195,168 @@ ffff = ram_top = -1 ; only valid BCD operands are tested, N V Z flags are ignored ; iterates through all valid combinations of operands and carry input ; uses increments/decrements to predict result & carry flag -32f4 : f8 sed -32f5 : a20e ldx #ad2 ;for indexed test -32f7 : a0ff ldy #$ff ;max range -32f9 : a999 lda #$99 ;start with adding 99 to 99 with carry -32fb : 850d sta ad1 ;operand 1 - accumulator -32fd : 850e sta ad2 ;operand 2 - memory or immediate -32ff : 8d0302 sta ada2 ;non zp -3302 : 850f sta adrl ;expected result bits 0-7 -3304 : a901 lda #1 ;set carry in & out -3306 : 850c sta adfc ;carry in - for diag -3308 : 8510 sta adrh ;expected result bit 8 (carry out) -330a : a900 lda #0 ;complemented operand 2 for subtract -330c : 8512 sta sb2 -330e : 8d0402 sta sba2 ;non zp -3311 : 38 tdad sec ;test with carry set -3312 : 209f33 jsr chkdad -3315 : c60c dec adfc ;now with carry clear -3317 : a50f lda adrl ;decimal adjust result -3319 : d008 bne tdad1 ;skip clear carry & preset result 99 (9A-1) -331b : c610 dec adrh -331d : a999 lda #$99 -331f : 850f sta adrl -3321 : d012 bne tdad3 -3323 : 290f tdad1 and #$f ;lower nibble mask -3325 : d00c bne tdad2 ;no decimal adjust needed -3327 : c60f dec adrl ;decimal adjust (?0-6) -3329 : c60f dec adrl -332b : c60f dec adrl -332d : c60f dec adrl -332f : c60f dec adrl -3331 : c60f dec adrl -3333 : c60f tdad2 dec adrl ;result -1 -3335 : 18 tdad3 clc ;test with carry clear -3336 : 209f33 jsr chkdad -3339 : e60c inc adfc ;same for operand -1 but with carry -333b : a50d lda ad1 ;decimal adjust operand 1 -333d : f015 beq tdad5 ;iterate operand 2 -333f : 290f and #$f ;lower nibble mask -3341 : d00c bne tdad4 ;skip decimal adjust -3343 : c60d dec ad1 ;decimal adjust (?0-6) -3345 : c60d dec ad1 -3347 : c60d dec ad1 -3349 : c60d dec ad1 -334b : c60d dec ad1 -334d : c60d dec ad1 -334f : c60d tdad4 dec ad1 ;operand 1 -1 -3351 : 4c1133 jmp tdad ;iterate op1 +336d : f8 sed +336e : a20e ldx #ad2 ;for indexed test +3370 : a0ff ldy #$ff ;max range +3372 : a999 lda #$99 ;start with adding 99 to 99 with carry +3374 : 850d sta ad1 ;operand 1 - accumulator +3376 : 850e sta ad2 ;operand 2 - memory or immediate +3378 : 8d0302 sta ada2 ;non zp +337b : 850f sta adrl ;expected result bits 0-7 +337d : a901 lda #1 ;set carry in & out +337f : 850c sta adfc ;carry in - for diag +3381 : 8510 sta adrh ;expected result bit 8 (carry out) +3383 : a900 lda #0 ;complemented operand 2 for subtract +3385 : 8512 sta sb2 +3387 : 8d0402 sta sba2 ;non zp +338a : 38 tdad sec ;test with carry set +338b : 206f34 jsr chkdad +338e : c60c dec adfc ;now with carry clear +3390 : a50f lda adrl ;decimal adjust result +3392 : d008 bne tdad1 ;skip clear carry & preset result 99 (9A-1) +3394 : c610 dec adrh +3396 : a999 lda #$99 +3398 : 850f sta adrl +339a : d012 bne tdad3 +339c : 290f tdad1 and #$f ;lower nibble mask +339e : d00c bne tdad2 ;no decimal adjust needed +33a0 : c60f dec adrl ;decimal adjust (?0-6) +33a2 : c60f dec adrl +33a4 : c60f dec adrl +33a6 : c60f dec adrl +33a8 : c60f dec adrl +33aa : c60f dec adrl +33ac : c60f tdad2 dec adrl ;result -1 +33ae : 18 tdad3 clc ;test with carry clear +33af : 206f34 jsr chkdad +33b2 : e60c inc adfc ;same for operand -1 but with carry +33b4 : a50d lda ad1 ;decimal adjust operand 1 +33b6 : f015 beq tdad5 ;iterate operand 2 +33b8 : 290f and #$f ;lower nibble mask +33ba : d00c bne tdad4 ;skip decimal adjust +33bc : c60d dec ad1 ;decimal adjust (?0-6) +33be : c60d dec ad1 +33c0 : c60d dec ad1 +33c2 : c60d dec ad1 +33c4 : c60d dec ad1 +33c6 : c60d dec ad1 +33c8 : c60d tdad4 dec ad1 ;operand 1 -1 +33ca : 4c8a33 jmp tdad ;iterate op1 -3354 : a999 tdad5 lda #$99 ;precharge op1 max -3356 : 850d sta ad1 -3358 : a50e lda ad2 ;decimal adjust operand 2 -335a : f030 beq tdad7 ;end of iteration -335c : 290f and #$f ;lower nibble mask -335e : d018 bne tdad6 ;skip decimal adjust -3360 : c60e dec ad2 ;decimal adjust (?0-6) -3362 : c60e dec ad2 -3364 : c60e dec ad2 -3366 : c60e dec ad2 -3368 : c60e dec ad2 -336a : c60e dec ad2 -336c : e612 inc sb2 ;complemented decimal adjust for subtract (?9+6) -336e : e612 inc sb2 -3370 : e612 inc sb2 -3372 : e612 inc sb2 -3374 : e612 inc sb2 -3376 : e612 inc sb2 -3378 : c60e tdad6 dec ad2 ;operand 2 -1 -337a : e612 inc sb2 ;complemented operand for subtract -337c : a512 lda sb2 -337e : 8d0402 sta sba2 ;copy as non zp operand -3381 : a50e lda ad2 -3383 : 8d0302 sta ada2 ;copy as non zp operand -3386 : 850f sta adrl ;new result since op1+carry=00+carry +op2=op2 -3388 : e610 inc adrh ;result carry -338a : d085 bne tdad ;iterate op2 -338c : d8 tdad7 cld +33cd : a999 tdad5 lda #$99 ;precharge op1 max +33cf : 850d sta ad1 +33d1 : a50e lda ad2 ;decimal adjust operand 2 +33d3 : f030 beq tdad7 ;end of iteration +33d5 : 290f and #$f ;lower nibble mask +33d7 : d018 bne tdad6 ;skip decimal adjust +33d9 : c60e dec ad2 ;decimal adjust (?0-6) +33db : c60e dec ad2 +33dd : c60e dec ad2 +33df : c60e dec ad2 +33e1 : c60e dec ad2 +33e3 : c60e dec ad2 +33e5 : e612 inc sb2 ;complemented decimal adjust for subtract (?9+6) +33e7 : e612 inc sb2 +33e9 : e612 inc sb2 +33eb : e612 inc sb2 +33ed : e612 inc sb2 +33ef : e612 inc sb2 +33f1 : c60e tdad6 dec ad2 ;operand 2 -1 +33f3 : e612 inc sb2 ;complemented operand for subtract +33f5 : a512 lda sb2 +33f7 : 8d0402 sta sba2 ;copy as non zp operand +33fa : a50e lda ad2 +33fc : 8d0302 sta ada2 ;copy as non zp operand +33ff : 850f sta adrl ;new result since op1+carry=00+carry +op2=op2 +3401 : e610 inc adrh ;result carry +3403 : d085 bne tdad ;iterate op2 +3405 : tdad7 + next_test +3405 : ad0002 > lda test_case ;previous test +3408 : c92a > cmp #test_num + > trap_ne ;test is out of sequence +340a : d0fe > bne * ;failed not equal (non zero) + > +002b = >test_num = test_num + 1 +340c : a92b > lda #test_num ;*** next tests' number +340e : 8d0002 > sta test_case + > ;check_ram ;uncomment to find altered RAM after each test -338d : ad0002 lda test_case -3390 : c92a cmp #test_num + + ; decimal/binary switch test + ; tests CLD, SED, PLP, RTI to properly switch between decimal & binary opcode + ; tables +3411 : 18 clc +3412 : d8 cld +3413 : 08 php +3414 : a955 lda #$55 +3416 : 6955 adc #$55 +3418 : c9aa cmp #$aa + trap_ne ;expected binary result after cld +341a : d0fe > bne * ;failed not equal (non zero) + +341c : 18 clc +341d : f8 sed +341e : 08 php +341f : a955 lda #$55 +3421 : 6955 adc #$55 +3423 : c910 cmp #$10 + trap_ne ;expected decimal result after sed +3425 : d0fe > bne * ;failed not equal (non zero) + +3427 : d8 cld +3428 : 28 plp +3429 : a955 lda #$55 +342b : 6955 adc #$55 +342d : c910 cmp #$10 + trap_ne ;expected decimal result after plp D=1 +342f : d0fe > bne * ;failed not equal (non zero) + +3431 : 28 plp +3432 : a955 lda #$55 +3434 : 6955 adc #$55 +3436 : c9aa cmp #$aa + trap_ne ;expected binary result after plp D=0 +3438 : d0fe > bne * ;failed not equal (non zero) + +343a : 18 clc +343b : a934 lda #hi bin_rti_ret ;emulated interrupt for rti +343d : 48 pha +343e : a955 lda #lo bin_rti_ret +3440 : 48 pha +3441 : 08 php +3442 : f8 sed +3443 : a934 lda #hi dec_rti_ret ;emulated interrupt for rti +3445 : 48 pha +3446 : a94c lda #lo dec_rti_ret +3448 : 48 pha +3449 : 08 php +344a : d8 cld +344b : 40 rti +344c : dec_rti_ret +344c : a955 lda #$55 +344e : 6955 adc #$55 +3450 : c910 cmp #$10 + trap_ne ;expected decimal result after rti D=1 +3452 : d0fe > bne * ;failed not equal (non zero) + +3454 : 40 rti +3455 : bin_rti_ret +3455 : a955 lda #$55 +3457 : 6955 adc #$55 +3459 : c9aa cmp #$aa + trap_ne ;expected binary result after rti D=0 +345b : d0fe > bne * ;failed not equal (non zero) + + endif + +345d : ad0002 lda test_case +3460 : c92b cmp #test_num trap_ne ;previous test is out of sequence -3392 : d0fe > bne * ;failed not equal (non zero) +3462 : d0fe > bne * ;failed not equal (non zero) -3394 : a9f0 lda #$f0 ;mark opcode testing complete -3396 : 8d0002 sta test_case +3464 : a9f0 lda #$f0 ;mark opcode testing complete +3466 : 8d0002 sta test_case ; final RAM integrity test ; verifies that none of the previous tests has altered RAM outside of the @@ -13076,821 +13365,883 @@ ffff = ram_top = -1 > ;RAM check disabled - RAM size not set ; *** DEBUG INFO *** - ; to debug checksum errors uncomment check_ram in the next_test macro to + ; 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 ************************************************ + ; S U C C E S S ************************************************ ; ------------- success ;if you get here everything went well -3399 : 4c9933 > jmp * ;test passed, no errors +3469 : 4c6934 > jmp * ;test passed, no errors ; ------------- - ; S U C C E S S ************************************************ -339c : 4c0004 jmp start ;run again + ; S U C C E S S ************************************************ +346c : 4c0004 jmp start ;run again + if disable_decimal < 1 ; core subroutine of the decimal add/subtract test ; *** WARNING - tests documented behavior only! *** ; only valid BCD operands are tested, N V Z flags are ignored ; iterates through all valid combinations of operands and carry input ; uses increments/decrements to predict result & carry flag -339f : chkdad +346f : chkdad ; decimal ADC / SBC zp -339f : 08 php ;save carry for subtract -33a0 : a50d lda ad1 -33a2 : 650e adc ad2 ;perform add -33a4 : 08 php -33a5 : c50f cmp adrl ;check result +346f : 08 php ;save carry for subtract +3470 : a50d lda ad1 +3472 : 650e adc ad2 ;perform add +3474 : 08 php +3475 : c50f cmp adrl ;check result trap_ne ;bad result -33a7 : d0fe > bne * ;failed not equal (non zero) +3477 : d0fe > bne * ;failed not equal (non zero) -33a9 : 68 pla ;check flags -33aa : 2901 and #1 ;mask carry -33ac : c510 cmp adrh +3479 : 68 pla ;check flags +347a : 2901 and #1 ;mask carry +347c : c510 cmp adrh trap_ne ;bad carry -33ae : d0fe > bne * ;failed not equal (non zero) +347e : d0fe > bne * ;failed not equal (non zero) -33b0 : 28 plp -33b1 : 08 php ;save carry for next add -33b2 : a50d lda ad1 -33b4 : e512 sbc sb2 ;perform subtract -33b6 : 08 php -33b7 : c50f cmp adrl ;check result +3480 : 28 plp +3481 : 08 php ;save carry for next add +3482 : a50d lda ad1 +3484 : e512 sbc sb2 ;perform subtract +3486 : 08 php +3487 : c50f cmp adrl ;check result trap_ne ;bad result -33b9 : d0fe > bne * ;failed not equal (non zero) +3489 : d0fe > bne * ;failed not equal (non zero) -33bb : 68 pla ;check flags -33bc : 2901 and #1 ;mask carry -33be : c510 cmp adrh +348b : 68 pla ;check flags +348c : 2901 and #1 ;mask carry +348e : c510 cmp adrh trap_ne ;bad flags -33c0 : d0fe > bne * ;failed not equal (non zero) +3490 : d0fe > bne * ;failed not equal (non zero) -33c2 : 28 plp +3492 : 28 plp ; decimal ADC / SBC abs -33c3 : 08 php ;save carry for subtract -33c4 : a50d lda ad1 -33c6 : 6d0302 adc ada2 ;perform add -33c9 : 08 php -33ca : c50f cmp adrl ;check result +3493 : 08 php ;save carry for subtract +3494 : a50d lda ad1 +3496 : 6d0302 adc ada2 ;perform add +3499 : 08 php +349a : c50f cmp adrl ;check result trap_ne ;bad result -33cc : d0fe > bne * ;failed not equal (non zero) +349c : d0fe > bne * ;failed not equal (non zero) -33ce : 68 pla ;check flags -33cf : 2901 and #1 ;mask carry -33d1 : c510 cmp adrh +349e : 68 pla ;check flags +349f : 2901 and #1 ;mask carry +34a1 : c510 cmp adrh trap_ne ;bad carry -33d3 : d0fe > bne * ;failed not equal (non zero) +34a3 : d0fe > bne * ;failed not equal (non zero) -33d5 : 28 plp -33d6 : 08 php ;save carry for next add -33d7 : a50d lda ad1 -33d9 : ed0402 sbc sba2 ;perform subtract -33dc : 08 php -33dd : c50f cmp adrl ;check result +34a5 : 28 plp +34a6 : 08 php ;save carry for next add +34a7 : a50d lda ad1 +34a9 : ed0402 sbc sba2 ;perform subtract +34ac : 08 php +34ad : c50f cmp adrl ;check result trap_ne ;bad result -33df : d0fe > bne * ;failed not equal (non zero) +34af : d0fe > bne * ;failed not equal (non zero) -33e1 : 68 pla ;check flags -33e2 : 2901 and #1 ;mask carry -33e4 : c510 cmp adrh +34b1 : 68 pla ;check flags +34b2 : 2901 and #1 ;mask carry +34b4 : c510 cmp adrh trap_ne ;bad carry -33e6 : d0fe > bne * ;failed not equal (non zero) +34b6 : d0fe > bne * ;failed not equal (non zero) -33e8 : 28 plp +34b8 : 28 plp ; decimal ADC / SBC # -33e9 : 08 php ;save carry for subtract -33ea : a50e lda ad2 -33ec : 8df233 sta chkdadi ;self modify immediate -33ef : a50d lda ad1 -33f2 = chkdadi = * + 1 ;operand of the immediate ADC -33f1 : 6900 adc #0 ;perform add -33f3 : 08 php -33f4 : c50f cmp adrl ;check result +34b9 : 08 php ;save carry for subtract +34ba : a50e lda ad2 +34bc : 8d1202 sta ex_adci+1 ;set ADC # operand +34bf : a50d lda ad1 +34c1 : 201102 jsr ex_adci ;execute ADC # in RAM +34c4 : 08 php +34c5 : c50f cmp adrl ;check result trap_ne ;bad result -33f6 : d0fe > bne * ;failed not equal (non zero) +34c7 : d0fe > bne * ;failed not equal (non zero) -33f8 : 68 pla ;check flags -33f9 : 2901 and #1 ;mask carry -33fb : c510 cmp adrh +34c9 : 68 pla ;check flags +34ca : 2901 and #1 ;mask carry +34cc : c510 cmp adrh trap_ne ;bad carry -33fd : d0fe > bne * ;failed not equal (non zero) +34ce : d0fe > bne * ;failed not equal (non zero) -33ff : 28 plp -3400 : 08 php ;save carry for next add -3401 : a512 lda sb2 -3403 : 8d0934 sta chkdsbi ;self modify immediate -3406 : a50d lda ad1 -3409 = chkdsbi = * + 1 ;operand of the immediate SBC -3408 : e900 sbc #0 ;perform subtract -340a : 08 php -340b : c50f cmp adrl ;check result +34d0 : 28 plp +34d1 : 08 php ;save carry for next add +34d2 : a512 lda sb2 +34d4 : 8d1502 sta ex_sbci+1 ;set SBC # operand +34d7 : a50d lda ad1 +34d9 : 201402 jsr ex_sbci ;execute SBC # in RAM +34dc : 08 php +34dd : c50f cmp adrl ;check result trap_ne ;bad result -340d : d0fe > bne * ;failed not equal (non zero) +34df : d0fe > bne * ;failed not equal (non zero) -340f : 68 pla ;check flags -3410 : 2901 and #1 ;mask carry -3412 : c510 cmp adrh +34e1 : 68 pla ;check flags +34e2 : 2901 and #1 ;mask carry +34e4 : c510 cmp adrh trap_ne ;bad carry -3414 : d0fe > bne * ;failed not equal (non zero) +34e6 : d0fe > bne * ;failed not equal (non zero) -3416 : 28 plp +34e8 : 28 plp ; decimal ADC / SBC zp,x -3417 : 08 php ;save carry for subtract -3418 : a50d lda ad1 -341a : 7500 adc 0,x ;perform add -341c : 08 php -341d : c50f cmp adrl ;check result +34e9 : 08 php ;save carry for subtract +34ea : a50d lda ad1 +34ec : 7500 adc 0,x ;perform add +34ee : 08 php +34ef : c50f cmp adrl ;check result trap_ne ;bad result -341f : d0fe > bne * ;failed not equal (non zero) +34f1 : d0fe > bne * ;failed not equal (non zero) -3421 : 68 pla ;check flags -3422 : 2901 and #1 ;mask carry -3424 : c510 cmp adrh +34f3 : 68 pla ;check flags +34f4 : 2901 and #1 ;mask carry +34f6 : c510 cmp adrh trap_ne ;bad carry -3426 : d0fe > bne * ;failed not equal (non zero) +34f8 : d0fe > bne * ;failed not equal (non zero) -3428 : 28 plp -3429 : 08 php ;save carry for next add -342a : a50d lda ad1 -342c : f504 sbc sb2-ad2,x ;perform subtract -342e : 08 php -342f : c50f cmp adrl ;check result +34fa : 28 plp +34fb : 08 php ;save carry for next add +34fc : a50d lda ad1 +34fe : f504 sbc sb2-ad2,x ;perform subtract +3500 : 08 php +3501 : c50f cmp adrl ;check result trap_ne ;bad result -3431 : d0fe > bne * ;failed not equal (non zero) +3503 : d0fe > bne * ;failed not equal (non zero) -3433 : 68 pla ;check flags -3434 : 2901 and #1 ;mask carry -3436 : c510 cmp adrh +3505 : 68 pla ;check flags +3506 : 2901 and #1 ;mask carry +3508 : c510 cmp adrh trap_ne ;bad carry -3438 : d0fe > bne * ;failed not equal (non zero) +350a : d0fe > bne * ;failed not equal (non zero) -343a : 28 plp +350c : 28 plp ; decimal ADC / SBC abs,x -343b : 08 php ;save carry for subtract -343c : a50d lda ad1 -343e : 7df501 adc ada2-ad2,x ;perform add -3441 : 08 php -3442 : c50f cmp adrl ;check result +350d : 08 php ;save carry for subtract +350e : a50d lda ad1 +3510 : 7df501 adc ada2-ad2,x ;perform add +3513 : 08 php +3514 : c50f cmp adrl ;check result trap_ne ;bad result -3444 : d0fe > bne * ;failed not equal (non zero) +3516 : d0fe > bne * ;failed not equal (non zero) -3446 : 68 pla ;check flags -3447 : 2901 and #1 ;mask carry -3449 : c510 cmp adrh +3518 : 68 pla ;check flags +3519 : 2901 and #1 ;mask carry +351b : c510 cmp adrh trap_ne ;bad carry -344b : d0fe > bne * ;failed not equal (non zero) +351d : d0fe > bne * ;failed not equal (non zero) -344d : 28 plp -344e : 08 php ;save carry for next add -344f : a50d lda ad1 -3451 : fdf601 sbc sba2-ad2,x ;perform subtract -3454 : 08 php -3455 : c50f cmp adrl ;check result +351f : 28 plp +3520 : 08 php ;save carry for next add +3521 : a50d lda ad1 +3523 : fdf601 sbc sba2-ad2,x ;perform subtract +3526 : 08 php +3527 : c50f cmp adrl ;check result trap_ne ;bad result -3457 : d0fe > bne * ;failed not equal (non zero) +3529 : d0fe > bne * ;failed not equal (non zero) -3459 : 68 pla ;check flags -345a : 2901 and #1 ;mask carry -345c : c510 cmp adrh +352b : 68 pla ;check flags +352c : 2901 and #1 ;mask carry +352e : c510 cmp adrh trap_ne ;bad carry -345e : d0fe > bne * ;failed not equal (non zero) +3530 : d0fe > bne * ;failed not equal (non zero) -3460 : 28 plp +3532 : 28 plp ; decimal ADC / SBC abs,y -3461 : 08 php ;save carry for subtract -3462 : a50d lda ad1 -3464 : 790401 adc ada2-$ff,y ;perform add -3467 : 08 php -3468 : c50f cmp adrl ;check result +3533 : 08 php ;save carry for subtract +3534 : a50d lda ad1 +3536 : 790401 adc ada2-$ff,y ;perform add +3539 : 08 php +353a : c50f cmp adrl ;check result trap_ne ;bad result -346a : d0fe > bne * ;failed not equal (non zero) +353c : d0fe > bne * ;failed not equal (non zero) -346c : 68 pla ;check flags -346d : 2901 and #1 ;mask carry -346f : c510 cmp adrh +353e : 68 pla ;check flags +353f : 2901 and #1 ;mask carry +3541 : c510 cmp adrh trap_ne ;bad carry -3471 : d0fe > bne * ;failed not equal (non zero) +3543 : d0fe > bne * ;failed not equal (non zero) -3473 : 28 plp -3474 : 08 php ;save carry for next add -3475 : a50d lda ad1 -3477 : f90501 sbc sba2-$ff,y ;perform subtract -347a : 08 php -347b : c50f cmp adrl ;check result +3545 : 28 plp +3546 : 08 php ;save carry for next add +3547 : a50d lda ad1 +3549 : f90501 sbc sba2-$ff,y ;perform subtract +354c : 08 php +354d : c50f cmp adrl ;check result trap_ne ;bad result -347d : d0fe > bne * ;failed not equal (non zero) +354f : d0fe > bne * ;failed not equal (non zero) -347f : 68 pla ;check flags -3480 : 2901 and #1 ;mask carry -3482 : c510 cmp adrh +3551 : 68 pla ;check flags +3552 : 2901 and #1 ;mask carry +3554 : c510 cmp adrh trap_ne ;bad carry -3484 : d0fe > bne * ;failed not equal (non zero) +3556 : d0fe > bne * ;failed not equal (non zero) -3486 : 28 plp +3558 : 28 plp ; decimal ADC / SBC (zp,x) -3487 : 08 php ;save carry for subtract -3488 : a50d lda ad1 -348a : 6144 adc (lo adi2-ad2,x) ;perform add -348c : 08 php -348d : c50f cmp adrl ;check result +3559 : 08 php ;save carry for subtract +355a : a50d lda ad1 +355c : 6144 adc (lo adi2-ad2,x) ;perform add +355e : 08 php +355f : c50f cmp adrl ;check result trap_ne ;bad result -348f : d0fe > bne * ;failed not equal (non zero) +3561 : d0fe > bne * ;failed not equal (non zero) -3491 : 68 pla ;check flags -3492 : 2901 and #1 ;mask carry -3494 : c510 cmp adrh +3563 : 68 pla ;check flags +3564 : 2901 and #1 ;mask carry +3566 : c510 cmp adrh trap_ne ;bad carry -3496 : d0fe > bne * ;failed not equal (non zero) +3568 : d0fe > bne * ;failed not equal (non zero) -3498 : 28 plp -3499 : 08 php ;save carry for next add -349a : a50d lda ad1 -349c : e146 sbc (lo sbi2-ad2,x) ;perform subtract -349e : 08 php -349f : c50f cmp adrl ;check result +356a : 28 plp +356b : 08 php ;save carry for next add +356c : a50d lda ad1 +356e : e146 sbc (lo sbi2-ad2,x) ;perform subtract +3570 : 08 php +3571 : c50f cmp adrl ;check result trap_ne ;bad result -34a1 : d0fe > bne * ;failed not equal (non zero) +3573 : d0fe > bne * ;failed not equal (non zero) -34a3 : 68 pla ;check flags -34a4 : 2901 and #1 ;mask carry -34a6 : c510 cmp adrh +3575 : 68 pla ;check flags +3576 : 2901 and #1 ;mask carry +3578 : c510 cmp adrh trap_ne ;bad carry -34a8 : d0fe > bne * ;failed not equal (non zero) +357a : d0fe > bne * ;failed not equal (non zero) -34aa : 28 plp +357c : 28 plp ; decimal ADC / SBC (abs),y -34ab : 08 php ;save carry for subtract -34ac : a50d lda ad1 -34ae : 7156 adc (adiy2),y ;perform add -34b0 : 08 php -34b1 : c50f cmp adrl ;check result +357d : 08 php ;save carry for subtract +357e : a50d lda ad1 +3580 : 7156 adc (adiy2),y ;perform add +3582 : 08 php +3583 : c50f cmp adrl ;check result trap_ne ;bad result -34b3 : d0fe > bne * ;failed not equal (non zero) +3585 : d0fe > bne * ;failed not equal (non zero) -34b5 : 68 pla ;check flags -34b6 : 2901 and #1 ;mask carry -34b8 : c510 cmp adrh +3587 : 68 pla ;check flags +3588 : 2901 and #1 ;mask carry +358a : c510 cmp adrh trap_ne ;bad carry -34ba : d0fe > bne * ;failed not equal (non zero) +358c : d0fe > bne * ;failed not equal (non zero) -34bc : 28 plp -34bd : 08 php ;save carry for next add -34be : a50d lda ad1 -34c0 : f158 sbc (sbiy2),y ;perform subtract -34c2 : 08 php -34c3 : c50f cmp adrl ;check result +358e : 28 plp +358f : 08 php ;save carry for next add +3590 : a50d lda ad1 +3592 : f158 sbc (sbiy2),y ;perform subtract +3594 : 08 php +3595 : c50f cmp adrl ;check result trap_ne ;bad result -34c5 : d0fe > bne * ;failed not equal (non zero) +3597 : d0fe > bne * ;failed not equal (non zero) -34c7 : 68 pla ;check flags -34c8 : 2901 and #1 ;mask carry -34ca : c510 cmp adrh +3599 : 68 pla ;check flags +359a : 2901 and #1 ;mask carry +359c : c510 cmp adrh trap_ne ;bad carry -34cc : d0fe > bne * ;failed not equal (non zero) +359e : d0fe > bne * ;failed not equal (non zero) -34ce : 28 plp -34cf : 60 rts +35a0 : 28 plp +35a1 : 60 rts + endif ; 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 -34d0 : a511 chkadd lda adrf ;add V-flag if overflow -34d2 : 2983 and #$83 ;keep N-----ZC / clear V -34d4 : 48 pha -34d5 : a50d lda ad1 ;test sign unequal between operands -34d7 : 450e eor ad2 -34d9 : 300a bmi ckad1 ;no overflow possible - operands have different sign -34db : a50d lda ad1 ;test sign equal between operands and result -34dd : 450f eor adrl -34df : 1004 bpl ckad1 ;no overflow occured - operand and result have same sign -34e1 : 68 pla -34e2 : 0940 ora #$40 ;set V -34e4 : 48 pha -34e5 : 68 ckad1 pla -34e6 : 8511 sta adrf ;save expected flags +35a2 : a511 chkadd lda adrf ;add V-flag if overflow +35a4 : 2983 and #$83 ;keep N-----ZC / clear V +35a6 : 48 pha +35a7 : a50d lda ad1 ;test sign unequal between operands +35a9 : 450e eor ad2 +35ab : 300a bmi ckad1 ;no overflow possible - operands have different sign +35ad : a50d lda ad1 ;test sign equal between operands and result +35af : 450f eor adrl +35b1 : 1004 bpl ckad1 ;no overflow occured - operand and result have same sign +35b3 : 68 pla +35b4 : 0940 ora #$40 ;set V +35b6 : 48 pha +35b7 : 68 ckad1 pla +35b8 : 8511 sta adrf ;save expected flags ; binary ADC / SBC zp -34e8 : 08 php ;save carry for subtract -34e9 : a50d lda ad1 -34eb : 650e adc ad2 ;perform add -34ed : 08 php -34ee : c50f cmp adrl ;check result +35ba : 08 php ;save carry for subtract +35bb : a50d lda ad1 +35bd : 650e adc ad2 ;perform add +35bf : 08 php +35c0 : c50f cmp adrl ;check result trap_ne ;bad result -34f0 : d0fe > bne * ;failed not equal (non zero) +35c2 : d0fe > bne * ;failed not equal (non zero) -34f2 : 68 pla ;check flags -34f3 : 29c3 and #$c3 ;mask NV----ZC -34f5 : c511 cmp adrf +35c4 : 68 pla ;check flags +35c5 : 29c3 and #$c3 ;mask NV----ZC +35c7 : c511 cmp adrf trap_ne ;bad flags -34f7 : d0fe > bne * ;failed not equal (non zero) +35c9 : d0fe > bne * ;failed not equal (non zero) -34f9 : 28 plp -34fa : 08 php ;save carry for next add -34fb : a50d lda ad1 -34fd : e512 sbc sb2 ;perform subtract -34ff : 08 php -3500 : c50f cmp adrl ;check result +35cb : 28 plp +35cc : 08 php ;save carry for next add +35cd : a50d lda ad1 +35cf : e512 sbc sb2 ;perform subtract +35d1 : 08 php +35d2 : c50f cmp adrl ;check result trap_ne ;bad result -3502 : d0fe > bne * ;failed not equal (non zero) +35d4 : d0fe > bne * ;failed not equal (non zero) -3504 : 68 pla ;check flags -3505 : 29c3 and #$c3 ;mask NV----ZC -3507 : c511 cmp adrf +35d6 : 68 pla ;check flags +35d7 : 29c3 and #$c3 ;mask NV----ZC +35d9 : c511 cmp adrf trap_ne ;bad flags -3509 : d0fe > bne * ;failed not equal (non zero) +35db : d0fe > bne * ;failed not equal (non zero) -350b : 28 plp +35dd : 28 plp ; binary ADC / SBC abs -350c : 08 php ;save carry for subtract -350d : a50d lda ad1 -350f : 6d0302 adc ada2 ;perform add -3512 : 08 php -3513 : c50f cmp adrl ;check result +35de : 08 php ;save carry for subtract +35df : a50d lda ad1 +35e1 : 6d0302 adc ada2 ;perform add +35e4 : 08 php +35e5 : c50f cmp adrl ;check result trap_ne ;bad result -3515 : d0fe > bne * ;failed not equal (non zero) +35e7 : d0fe > bne * ;failed not equal (non zero) -3517 : 68 pla ;check flags -3518 : 29c3 and #$c3 ;mask NV----ZC -351a : c511 cmp adrf +35e9 : 68 pla ;check flags +35ea : 29c3 and #$c3 ;mask NV----ZC +35ec : c511 cmp adrf trap_ne ;bad flags -351c : d0fe > bne * ;failed not equal (non zero) +35ee : d0fe > bne * ;failed not equal (non zero) -351e : 28 plp -351f : 08 php ;save carry for next add -3520 : a50d lda ad1 -3522 : ed0402 sbc sba2 ;perform subtract -3525 : 08 php -3526 : c50f cmp adrl ;check result +35f0 : 28 plp +35f1 : 08 php ;save carry for next add +35f2 : a50d lda ad1 +35f4 : ed0402 sbc sba2 ;perform subtract +35f7 : 08 php +35f8 : c50f cmp adrl ;check result trap_ne ;bad result -3528 : d0fe > bne * ;failed not equal (non zero) +35fa : d0fe > bne * ;failed not equal (non zero) -352a : 68 pla ;check flags -352b : 29c3 and #$c3 ;mask NV----ZC -352d : c511 cmp adrf +35fc : 68 pla ;check flags +35fd : 29c3 and #$c3 ;mask NV----ZC +35ff : c511 cmp adrf trap_ne ;bad flags -352f : d0fe > bne * ;failed not equal (non zero) +3601 : d0fe > bne * ;failed not equal (non zero) -3531 : 28 plp +3603 : 28 plp ; binary ADC / SBC # -3532 : 08 php ;save carry for subtract -3533 : a50e lda ad2 -3535 : 8d3b35 sta chkadi ;self modify immediate -3538 : a50d lda ad1 -353b = chkadi = * + 1 ;operand of the immediate ADC -353a : 6900 adc #0 ;perform add -353c : 08 php -353d : c50f cmp adrl ;check result +3604 : 08 php ;save carry for subtract +3605 : a50e lda ad2 +3607 : 8d1202 sta ex_adci+1 ;set ADC # operand +360a : a50d lda ad1 +360c : 201102 jsr ex_adci ;execute ADC # in RAM +360f : 08 php +3610 : c50f cmp adrl ;check result trap_ne ;bad result -353f : d0fe > bne * ;failed not equal (non zero) +3612 : d0fe > bne * ;failed not equal (non zero) -3541 : 68 pla ;check flags -3542 : 29c3 and #$c3 ;mask NV----ZC -3544 : c511 cmp adrf +3614 : 68 pla ;check flags +3615 : 29c3 and #$c3 ;mask NV----ZC +3617 : c511 cmp adrf trap_ne ;bad flags -3546 : d0fe > bne * ;failed not equal (non zero) +3619 : d0fe > bne * ;failed not equal (non zero) -3548 : 28 plp -3549 : 08 php ;save carry for next add -354a : a512 lda sb2 -354c : 8d5235 sta chksbi ;self modify immediate -354f : a50d lda ad1 -3552 = chksbi = * + 1 ;operand of the immediate SBC -3551 : e900 sbc #0 ;perform subtract -3553 : 08 php -3554 : c50f cmp adrl ;check result +361b : 28 plp +361c : 08 php ;save carry for next add +361d : a512 lda sb2 +361f : 8d1502 sta ex_sbci+1 ;set SBC # operand +3622 : a50d lda ad1 +3624 : 201402 jsr ex_sbci ;execute SBC # in RAM +3627 : 08 php +3628 : c50f cmp adrl ;check result trap_ne ;bad result -3556 : d0fe > bne * ;failed not equal (non zero) - -3558 : 68 pla ;check flags -3559 : 29c3 and #$c3 ;mask NV----ZC -355b : c511 cmp adrf - trap_ne ;bad flags -355d : d0fe > bne * ;failed not equal (non zero) - -355f : 28 plp - ; binary ADC / SBC zp,x -3560 : 08 php ;save carry for subtract -3561 : a50d lda ad1 -3563 : 7500 adc 0,x ;perform add -3565 : 08 php -3566 : c50f cmp adrl ;check result - trap_ne ;bad result -3568 : d0fe > bne * ;failed not equal (non zero) - -356a : 68 pla ;check flags -356b : 29c3 and #$c3 ;mask NV----ZC -356d : c511 cmp adrf - trap_ne ;bad flags -356f : d0fe > bne * ;failed not equal (non zero) - -3571 : 28 plp -3572 : 08 php ;save carry for next add -3573 : a50d lda ad1 -3575 : f504 sbc sb2-ad2,x ;perform subtract -3577 : 08 php -3578 : c50f cmp adrl ;check result - trap_ne ;bad result -357a : d0fe > bne * ;failed not equal (non zero) - -357c : 68 pla ;check flags -357d : 29c3 and #$c3 ;mask NV----ZC -357f : c511 cmp adrf - trap_ne ;bad flags -3581 : d0fe > bne * ;failed not equal (non zero) - -3583 : 28 plp - ; binary ADC / SBC abs,x -3584 : 08 php ;save carry for subtract -3585 : a50d lda ad1 -3587 : 7df501 adc ada2-ad2,x ;perform add -358a : 08 php -358b : c50f cmp adrl ;check result - trap_ne ;bad result -358d : d0fe > bne * ;failed not equal (non zero) - -358f : 68 pla ;check flags -3590 : 29c3 and #$c3 ;mask NV----ZC -3592 : c511 cmp adrf - trap_ne ;bad flags -3594 : d0fe > bne * ;failed not equal (non zero) - -3596 : 28 plp -3597 : 08 php ;save carry for next add -3598 : a50d lda ad1 -359a : fdf601 sbc sba2-ad2,x ;perform subtract -359d : 08 php -359e : c50f cmp adrl ;check result - trap_ne ;bad result -35a0 : d0fe > bne * ;failed not equal (non zero) - -35a2 : 68 pla ;check flags -35a3 : 29c3 and #$c3 ;mask NV----ZC -35a5 : c511 cmp adrf - trap_ne ;bad flags -35a7 : d0fe > bne * ;failed not equal (non zero) - -35a9 : 28 plp - ; binary ADC / SBC abs,y -35aa : 08 php ;save carry for subtract -35ab : a50d lda ad1 -35ad : 790401 adc ada2-$ff,y ;perform add -35b0 : 08 php -35b1 : c50f cmp adrl ;check result - trap_ne ;bad result -35b3 : d0fe > bne * ;failed not equal (non zero) - -35b5 : 68 pla ;check flags -35b6 : 29c3 and #$c3 ;mask NV----ZC -35b8 : c511 cmp adrf - trap_ne ;bad flags -35ba : d0fe > bne * ;failed not equal (non zero) - -35bc : 28 plp -35bd : 08 php ;save carry for next add -35be : a50d lda ad1 -35c0 : f90501 sbc sba2-$ff,y ;perform subtract -35c3 : 08 php -35c4 : c50f cmp adrl ;check result - trap_ne ;bad result -35c6 : d0fe > bne * ;failed not equal (non zero) - -35c8 : 68 pla ;check flags -35c9 : 29c3 and #$c3 ;mask NV----ZC -35cb : c511 cmp adrf - trap_ne ;bad flags -35cd : d0fe > bne * ;failed not equal (non zero) - -35cf : 28 plp - ; binary ADC / SBC (zp,x) -35d0 : 08 php ;save carry for subtract -35d1 : a50d lda ad1 -35d3 : 6144 adc (lo adi2-ad2,x) ;perform add -35d5 : 08 php -35d6 : c50f cmp adrl ;check result - trap_ne ;bad result -35d8 : d0fe > bne * ;failed not equal (non zero) - -35da : 68 pla ;check flags -35db : 29c3 and #$c3 ;mask NV----ZC -35dd : c511 cmp adrf - trap_ne ;bad flags -35df : d0fe > bne * ;failed not equal (non zero) - -35e1 : 28 plp -35e2 : 08 php ;save carry for next add -35e3 : a50d lda ad1 -35e5 : e146 sbc (lo sbi2-ad2,x) ;perform subtract -35e7 : 08 php -35e8 : c50f cmp adrl ;check result - trap_ne ;bad result -35ea : d0fe > bne * ;failed not equal (non zero) - -35ec : 68 pla ;check flags -35ed : 29c3 and #$c3 ;mask NV----ZC -35ef : c511 cmp adrf - trap_ne ;bad flags -35f1 : d0fe > bne * ;failed not equal (non zero) - -35f3 : 28 plp - ; binary ADC / SBC (abs),y -35f4 : 08 php ;save carry for subtract -35f5 : a50d lda ad1 -35f7 : 7156 adc (adiy2),y ;perform add -35f9 : 08 php -35fa : c50f cmp adrl ;check result - trap_ne ;bad result -35fc : d0fe > bne * ;failed not equal (non zero) - -35fe : 68 pla ;check flags -35ff : 29c3 and #$c3 ;mask NV----ZC -3601 : c511 cmp adrf - trap_ne ;bad flags -3603 : d0fe > bne * ;failed not equal (non zero) - -3605 : 28 plp -3606 : 08 php ;save carry for next add -3607 : a50d lda ad1 -3609 : f158 sbc (sbiy2),y ;perform subtract -360b : 08 php -360c : c50f cmp adrl ;check result - trap_ne ;bad result -360e : d0fe > bne * ;failed not equal (non zero) - -3610 : 68 pla ;check flags -3611 : 29c3 and #$c3 ;mask NV----ZC -3613 : c511 cmp adrf - trap_ne ;bad flags -3615 : d0fe > bne * ;failed not equal (non zero) - -3617 : 28 plp -3618 : 60 rts - - ; target for the jump absolute test -3619 : 88 dey -361a : 88 dey -361b : test_far -361b : 08 php ;either SP or Y count will fail, if we do not hit -361c : 88 dey -361d : 88 dey -361e : 88 dey -361f : 28 plp - trap_cs ;flags loaded? -3620 : b0fe > bcs * ;failed carry set - - trap_vs -3622 : 70fe > bvs * ;failed overflow set - - trap_mi -3624 : 30fe > bmi * ;failed minus (bit 7 set) - - trap_eq -3626 : f0fe > beq * ;failed equal (zero) - -3628 : c946 cmp #'F' ;registers loaded? - trap_ne 362a : d0fe > bne * ;failed not equal (non zero) -362c : e041 cpx #'A' - trap_ne -362e : d0fe > bne * ;failed not equal (non zero) +362c : 68 pla ;check flags +362d : 29c3 and #$c3 ;mask NV----ZC +362f : c511 cmp adrf + trap_ne ;bad flags +3631 : d0fe > bne * ;failed not equal (non zero) -3630 : c04f cpy #('R'-3) - trap_ne -3632 : d0fe > bne * ;failed not equal (non zero) +3633 : 28 plp + ; binary ADC / SBC zp,x +3634 : 08 php ;save carry for subtract +3635 : a50d lda ad1 +3637 : 7500 adc 0,x ;perform add +3639 : 08 php +363a : c50f cmp adrl ;check result + trap_ne ;bad result +363c : d0fe > bne * ;failed not equal (non zero) -3634 : 48 pha ;save a,x -3635 : 8a txa -3636 : 48 pha -3637 : ba tsx -3638 : e0fd cpx #$fd ;check SP - trap_ne -363a : d0fe > bne * ;failed not equal (non zero) +363e : 68 pla ;check flags +363f : 29c3 and #$c3 ;mask NV----ZC +3641 : c511 cmp adrf + trap_ne ;bad flags +3643 : d0fe > bne * ;failed not equal (non zero) -363c : 68 pla ;restore x -363d : aa tax - set_stat $ff - > load_flag $ff -363e : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -3640 : 48 > pha ;use stack to load status -3641 : 28 > plp +3645 : 28 plp +3646 : 08 php ;save carry for next add +3647 : a50d lda ad1 +3649 : f504 sbc sb2-ad2,x ;perform subtract +364b : 08 php +364c : c50f cmp adrl ;check result + trap_ne ;bad result +364e : d0fe > bne * ;failed not equal (non zero) -3642 : 68 pla ;restore a -3643 : e8 inx ;return registers with modifications -3644 : 49aa eor #$aa ;N=1, V=1, Z=0, C=1 -3646 : 4cc208 jmp far_ret - - ; target for the jump indirect test -3649 : 00 align -364a : 5336 ptr_tst_ind dw test_ind -364c : 1709 ptr_ind_ret dw ind_ret - trap ;runover protection -364e : 4c4e36 > jmp * ;failed anyway +3650 : 68 pla ;check flags +3651 : 29c3 and #$c3 ;mask NV----ZC +3653 : c511 cmp adrf + trap_ne ;bad flags +3655 : d0fe > bne * ;failed not equal (non zero) -3651 : 88 dey -3652 : 88 dey -3653 : test_ind -3653 : 08 php ;either SP or Y count will fail, if we do not hit -3654 : 88 dey -3655 : 88 dey -3656 : 88 dey 3657 : 28 plp - trap_cs ;flags loaded? -3658 : b0fe > bcs * ;failed carry set + ; binary ADC / SBC abs,x +3658 : 08 php ;save carry for subtract +3659 : a50d lda ad1 +365b : 7df501 adc ada2-ad2,x ;perform add +365e : 08 php +365f : c50f cmp adrl ;check result + trap_ne ;bad result +3661 : d0fe > bne * ;failed not equal (non zero) - trap_vs -365a : 70fe > bvs * ;failed overflow set +3663 : 68 pla ;check flags +3664 : 29c3 and #$c3 ;mask NV----ZC +3666 : c511 cmp adrf + trap_ne ;bad flags +3668 : d0fe > bne * ;failed not equal (non zero) - trap_mi -365c : 30fe > bmi * ;failed minus (bit 7 set) +366a : 28 plp +366b : 08 php ;save carry for next add +366c : a50d lda ad1 +366e : fdf601 sbc sba2-ad2,x ;perform subtract +3671 : 08 php +3672 : c50f cmp adrl ;check result + trap_ne ;bad result +3674 : d0fe > bne * ;failed not equal (non zero) - trap_eq -365e : f0fe > beq * ;failed equal (zero) +3676 : 68 pla ;check flags +3677 : 29c3 and #$c3 ;mask NV----ZC +3679 : c511 cmp adrf + trap_ne ;bad flags +367b : d0fe > bne * ;failed not equal (non zero) -3660 : c949 cmp #'I' ;registers loaded? - trap_ne -3662 : d0fe > bne * ;failed not equal (non zero) +367d : 28 plp + ; binary ADC / SBC abs,y +367e : 08 php ;save carry for subtract +367f : a50d lda ad1 +3681 : 790401 adc ada2-$ff,y ;perform add +3684 : 08 php +3685 : c50f cmp adrl ;check result + trap_ne ;bad result +3687 : d0fe > bne * ;failed not equal (non zero) -3664 : e04e cpx #'N' - trap_ne -3666 : d0fe > bne * ;failed not equal (non zero) +3689 : 68 pla ;check flags +368a : 29c3 and #$c3 ;mask NV----ZC +368c : c511 cmp adrf + trap_ne ;bad flags +368e : d0fe > bne * ;failed not equal (non zero) -3668 : c041 cpy #('D'-3) - trap_ne -366a : d0fe > bne * ;failed not equal (non zero) +3690 : 28 plp +3691 : 08 php ;save carry for next add +3692 : a50d lda ad1 +3694 : f90501 sbc sba2-$ff,y ;perform subtract +3697 : 08 php +3698 : c50f cmp adrl ;check result + trap_ne ;bad result +369a : d0fe > bne * ;failed not equal (non zero) -366c : 48 pha ;save a,x -366d : 8a txa -366e : 48 pha -366f : ba tsx -3670 : e0fd cpx #$fd ;check SP - trap_ne -3672 : d0fe > bne * ;failed not equal (non zero) +369c : 68 pla ;check flags +369d : 29c3 and #$c3 ;mask NV----ZC +369f : c511 cmp adrf + trap_ne ;bad flags +36a1 : d0fe > bne * ;failed not equal (non zero) -3674 : 68 pla ;restore x -3675 : aa tax - set_stat $ff - > load_flag $ff -3676 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -3678 : 48 > pha ;use stack to load status -3679 : 28 > plp - -367a : 68 pla ;restore a -367b : e8 inx ;return registers with modifications -367c : 49aa eor #$aa ;N=1, V=1, Z=0, C=1 -367e : 6c4c36 jmp (ptr_ind_ret) - trap ;runover protection -3681 : 4c8136 > jmp * ;failed anyway - - - ; target for the jump subroutine test -3684 : 88 dey -3685 : 88 dey -3686 : test_jsr -3686 : 08 php ;either SP or Y count will fail, if we do not hit -3687 : 88 dey -3688 : 88 dey -3689 : 88 dey -368a : 28 plp - trap_cs ;flags loaded? -368b : b0fe > bcs * ;failed carry set - - trap_vs -368d : 70fe > bvs * ;failed overflow set - - trap_mi -368f : 30fe > bmi * ;failed minus (bit 7 set) - - trap_eq -3691 : f0fe > beq * ;failed equal (zero) - -3693 : c94a cmp #'J' ;registers loaded? - trap_ne -3695 : d0fe > bne * ;failed not equal (non zero) - -3697 : e053 cpx #'S' - trap_ne -3699 : d0fe > bne * ;failed not equal (non zero) - -369b : c04f cpy #('R'-3) - trap_ne -369d : d0fe > bne * ;failed not equal (non zero) - -369f : 48 pha ;save a,x -36a0 : 8a txa -36a1 : 48 pha -36a2 : ba tsx ;sp -4? (return addr,a,x) -36a3 : e0fb cpx #$fb - trap_ne -36a5 : d0fe > bne * ;failed not equal (non zero) - -36a7 : adff01 lda $1ff ;propper return on stack -36aa : c909 cmp #hi(jsr_ret) - trap_ne +36a3 : 28 plp + ; binary ADC / SBC (zp,x) +36a4 : 08 php ;save carry for subtract +36a5 : a50d lda ad1 +36a7 : 6144 adc (lo adi2-ad2,x) ;perform add +36a9 : 08 php +36aa : c50f cmp adrl ;check result + trap_ne ;bad result 36ac : d0fe > bne * ;failed not equal (non zero) -36ae : adfe01 lda $1fe -36b1 : c94d cmp #lo(jsr_ret) - trap_ne +36ae : 68 pla ;check flags +36af : 29c3 and #$c3 ;mask NV----ZC +36b1 : c511 cmp adrf + trap_ne ;bad flags 36b3 : d0fe > bne * ;failed not equal (non zero) +36b5 : 28 plp +36b6 : 08 php ;save carry for next add +36b7 : a50d lda ad1 +36b9 : e146 sbc (lo sbi2-ad2,x) ;perform subtract +36bb : 08 php +36bc : c50f cmp adrl ;check result + trap_ne ;bad result +36be : d0fe > bne * ;failed not equal (non zero) + +36c0 : 68 pla ;check flags +36c1 : 29c3 and #$c3 ;mask NV----ZC +36c3 : c511 cmp adrf + trap_ne ;bad flags +36c5 : d0fe > bne * ;failed not equal (non zero) + +36c7 : 28 plp + ; binary ADC / SBC (abs),y +36c8 : 08 php ;save carry for subtract +36c9 : a50d lda ad1 +36cb : 7156 adc (adiy2),y ;perform add +36cd : 08 php +36ce : c50f cmp adrl ;check result + trap_ne ;bad result +36d0 : d0fe > bne * ;failed not equal (non zero) + +36d2 : 68 pla ;check flags +36d3 : 29c3 and #$c3 ;mask NV----ZC +36d5 : c511 cmp adrf + trap_ne ;bad flags +36d7 : d0fe > bne * ;failed not equal (non zero) + +36d9 : 28 plp +36da : 08 php ;save carry for next add +36db : a50d lda ad1 +36dd : f158 sbc (sbiy2),y ;perform subtract +36df : 08 php +36e0 : c50f cmp adrl ;check result + trap_ne ;bad result +36e2 : d0fe > bne * ;failed not equal (non zero) + +36e4 : 68 pla ;check flags +36e5 : 29c3 and #$c3 ;mask NV----ZC +36e7 : c511 cmp adrf + trap_ne ;bad flags +36e9 : d0fe > bne * ;failed not equal (non zero) + +36eb : 28 plp +36ec : 60 rts + + ; target for the jump absolute test +36ed : 88 dey +36ee : 88 dey +36ef : test_far +36ef : 08 php ;either SP or Y count will fail, if we do not hit +36f0 : 88 dey +36f1 : 88 dey +36f2 : 88 dey +36f3 : 28 plp + trap_cs ;flags loaded? +36f4 : b0fe > bcs * ;failed carry set + + trap_vs +36f6 : 70fe > bvs * ;failed overflow set + + trap_mi +36f8 : 30fe > bmi * ;failed minus (bit 7 set) + + trap_eq +36fa : f0fe > beq * ;failed equal (zero) + +36fc : c946 cmp #'F' ;registers loaded? + trap_ne +36fe : d0fe > bne * ;failed not equal (non zero) + +3700 : e041 cpx #'A' + trap_ne +3702 : d0fe > bne * ;failed not equal (non zero) + +3704 : c04f cpy #('R'-3) + trap_ne +3706 : d0fe > bne * ;failed not equal (non zero) + +3708 : 48 pha ;save a,x +3709 : 8a txa +370a : 48 pha +370b : ba tsx +370c : e0fd cpx #$fd ;check SP + trap_ne +370e : d0fe > bne * ;failed not equal (non zero) + +3710 : 68 pla ;restore x +3711 : aa tax set_stat $ff > load_flag $ff -36b5 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +3712 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -36b7 : 48 > pha ;use stack to load status -36b8 : 28 > plp +3714 : 48 > pha ;use stack to load status +3715 : 28 > plp -36b9 : 68 pla ;pull x,a -36ba : aa tax -36bb : 68 pla -36bc : e8 inx ;return registers with modifications -36bd : 49aa eor #$aa ;N=1, V=1, Z=0, C=1 -36bf : 60 rts +3716 : 68 pla ;restore a +3717 : e8 inx ;return registers with modifications +3718 : 49aa eor #$aa ;N=1, V=1, Z=0, C=1 +371a : 4c0f09 jmp far_ret + + ; target for the jump indirect test +371d : 00 align +371e : 2737 ptr_tst_ind dw test_ind +3720 : 6409 ptr_ind_ret dw ind_ret trap ;runover protection -36c0 : 4cc036 > jmp * ;failed anyway +3722 : 4c2237 > jmp * ;failed anyway +3725 : 88 dey +3726 : 88 dey +3727 : test_ind +3727 : 08 php ;either SP or Y count will fail, if we do not hit +3728 : 88 dey +3729 : 88 dey +372a : 88 dey +372b : 28 plp + trap_cs ;flags loaded? +372c : b0fe > bcs * ;failed carry set + + trap_vs +372e : 70fe > bvs * ;failed overflow set + + trap_mi +3730 : 30fe > bmi * ;failed minus (bit 7 set) + + trap_eq +3732 : f0fe > beq * ;failed equal (zero) + +3734 : c949 cmp #'I' ;registers loaded? + trap_ne +3736 : d0fe > bne * ;failed not equal (non zero) + +3738 : e04e cpx #'N' + trap_ne +373a : d0fe > bne * ;failed not equal (non zero) + +373c : c041 cpy #('D'-3) + trap_ne +373e : d0fe > bne * ;failed not equal (non zero) + +3740 : 48 pha ;save a,x +3741 : 8a txa +3742 : 48 pha +3743 : ba tsx +3744 : e0fd cpx #$fd ;check SP + trap_ne +3746 : d0fe > bne * ;failed not equal (non zero) + +3748 : 68 pla ;restore x +3749 : aa tax + set_stat $ff + > load_flag $ff +374a : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +374c : 48 > pha ;use stack to load status +374d : 28 > plp + +374e : 68 pla ;restore a +374f : e8 inx ;return registers with modifications +3750 : 49aa eor #$aa ;N=1, V=1, Z=0, C=1 +3752 : 6c2037 jmp (ptr_ind_ret) + trap ;runover protection +3755 : 4c5537 > jmp * ;failed anyway + +3758 : 4c0004 jmp start ;catastrophic error - cannot continue + + ; target for the jump subroutine test +375b : 88 dey +375c : 88 dey +375d : test_jsr +375d : 08 php ;either SP or Y count will fail, if we do not hit +375e : 88 dey +375f : 88 dey +3760 : 88 dey +3761 : 28 plp + trap_cs ;flags loaded? +3762 : b0fe > bcs * ;failed carry set + + trap_vs +3764 : 70fe > bvs * ;failed overflow set + + trap_mi +3766 : 30fe > bmi * ;failed minus (bit 7 set) + + trap_eq +3768 : f0fe > beq * ;failed equal (zero) + +376a : c94a cmp #'J' ;registers loaded? + trap_ne +376c : d0fe > bne * ;failed not equal (non zero) + +376e : e053 cpx #'S' + trap_ne +3770 : d0fe > bne * ;failed not equal (non zero) + +3772 : c04f cpy #('R'-3) + trap_ne +3774 : d0fe > bne * ;failed not equal (non zero) + +3776 : 48 pha ;save a,x +3777 : 8a txa +3778 : 48 pha +3779 : ba tsx ;sp -4? (return addr,a,x) +377a : e0fb cpx #$fb + trap_ne +377c : d0fe > bne * ;failed not equal (non zero) + +377e : adff01 lda $1ff ;propper return on stack +3781 : c909 cmp #hi(jsr_ret) + trap_ne +3783 : d0fe > bne * ;failed not equal (non zero) + +3785 : adfe01 lda $1fe +3788 : c99a cmp #lo(jsr_ret) + trap_ne +378a : d0fe > bne * ;failed not equal (non zero) + + set_stat $ff + > load_flag $ff +378c : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +378e : 48 > pha ;use stack to load status +378f : 28 > plp + +3790 : 68 pla ;pull x,a +3791 : aa tax +3792 : 68 pla +3793 : e8 inx ;return registers with modifications +3794 : 49aa eor #$aa ;N=1, V=1, Z=0, C=1 +3796 : 60 rts + trap ;runover protection +3797 : 4c9737 > jmp * ;failed anyway + +379a : 4c0004 jmp start ;catastrophic error - cannot continue ;trap in case of unexpected IRQ, NMI, BRK, RESET - BRK test target -36c3 : nmi_trap +379d : nmi_trap trap ;check stack for conditions at NMI -36c3 : 4cc336 > jmp * ;failed anyway +379d : 4c9d37 > jmp * ;failed anyway -36c6 : res_trap +37a0 : 4c0004 jmp start ;catastrophic error - cannot continue +37a3 : res_trap trap ;unexpected RESET -36c6 : 4cc636 > jmp * ;failed anyway +37a3 : 4ca337 > jmp * ;failed anyway +37a6 : 4c0004 jmp start ;catastrophic error - cannot continue -36c9 : 88 dey -36ca : 88 dey -36cb : irq_trap ;BRK test or unextpected BRK or IRQ -36cb : 08 php ;either SP or Y count will fail, if we do not hit -36cc : 88 dey -36cd : 88 dey -36ce : 88 dey - ;next 4 traps could be caused by unexpected BRK or IRQ +37a9 : 88 dey +37aa : 88 dey +37ab : irq_trap ;BRK test or unextpected BRK or IRQ +37ab : 08 php ;either SP or Y count will fail, if we do not hit +37ac : 88 dey +37ad : 88 dey +37ae : 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) -36cf : c942 cmp #'B' ;registers loaded? +37af : c9bd cmp #$ff-'B' ;BRK pass 2 registers loaded? +37b1 : f042 beq break2 +37b3 : c942 cmp #'B' ;BRK pass 1 registers loaded? trap_ne -36d1 : d0fe > bne * ;failed not equal (non zero) +37b5 : d0fe > bne * ;failed not equal (non zero) -36d3 : e052 cpx #'R' +37b7 : e052 cpx #'R' trap_ne -36d5 : d0fe > bne * ;failed not equal (non zero) +37b9 : d0fe > bne * ;failed not equal (non zero) -36d7 : c048 cpy #('K'-3) +37bb : c048 cpy #'K'-3 trap_ne -36d9 : d0fe > bne * ;failed not equal (non zero) +37bd : d0fe > bne * ;failed not equal (non zero) -36db : 850a sta irq_a ;save registers during break test -36dd : 860b stx irq_x -36df : ba tsx ;test break on stack -36e0 : bd0201 lda $102,x - cmp_flag 0 ;break test should have B=1 -36e3 : c930 > cmp #(0 |fao)&m8 ;expected flags + always on bits +37bf : 850a sta irq_a ;save registers during break test +37c1 : 860b stx irq_x +37c3 : ba tsx ;test break on stack +37c4 : bd0201 lda $102,x + cmp_flag 0 ;break test should have B=1 & unused=1 on stack +37c7 : c930 > cmp #(0 |fao)&m8 ;expected flags + always on bits trap_ne ; - no break flag on stack -36e5 : d0fe > bne * ;failed not equal (non zero) +37c9 : d0fe > bne * ;failed not equal (non zero) + +37cb : 68 pla + cmp_flag intdis ;should have added interrupt disable +37cc : c934 > cmp #(intdis |fao)&m8 ;expected flags + always on bits -36e7 : 68 pla -36e8 : c934 cmp #fai ;should have added interrupt disable trap_ne -36ea : d0fe > bne * ;failed not equal (non zero) +37ce : d0fe > bne * ;failed not equal (non zero) -36ec : ba tsx -36ed : e0fc cpx #$fc ;sp -3? (return addr, flags) +37d0 : ba tsx +37d1 : e0fc cpx #$fc ;sp -3? (return addr, flags) trap_ne -36ef : d0fe > bne * ;failed not equal (non zero) +37d3 : d0fe > bne * ;failed not equal (non zero) -36f1 : adff01 lda $1ff ;propper return on stack -36f4 : c909 cmp #hi(brk_ret) +37d5 : adff01 lda $1ff ;propper return on stack +37d8 : c909 cmp #hi(brk_ret0) trap_ne -36f6 : d0fe > bne * ;failed not equal (non zero) +37da : d0fe > bne * ;failed not equal (non zero) -36f8 : adfe01 lda $1fe -36fb : c984 cmp #lo(brk_ret) +37dc : adfe01 lda $1fe +37df : c9d1 cmp #lo(brk_ret0) trap_ne -36fd : d0fe > bne * ;failed not equal (non zero) +37e1 : d0fe > bne * ;failed not equal (non zero) - set_stat $ff - > load_flag $ff -36ff : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -3701 : 48 > pha ;use stack to load status -3702 : 28 > plp + load_flag $ff +37e3 : a9ff > lda #$ff ;allow test to change I-flag (no mask) -3703 : a60b ldx irq_x -3705 : e8 inx ;return registers with modifications -3706 : a50a lda irq_a -3708 : 49aa eor #$aa ;N=1, V=1, Z=0, C=1 but original flags should be restored -370a : 40 rti +37e5 : 48 pha +37e6 : a60b ldx irq_x +37e8 : e8 inx ;return registers with modifications +37e9 : a50a lda irq_a +37eb : 49aa eor #$aa +37ed : 28 plp ;N=1, V=1, Z=1, C=1 but original flags should be restored +37ee : 40 rti trap ;runover protection -370b : 4c0b37 > jmp * ;failed anyway +37ef : 4cef37 > jmp * ;failed anyway +37f2 : 4c0004 jmp start ;catastrophic error - cannot continue +37f5 : break2 ;BRK pass 2 +37f5 : e0ad cpx #$ff-'R' + trap_ne +37f7 : d0fe > bne * ;failed not equal (non zero) + +37f9 : c0b1 cpy #$ff-'K'-3 + trap_ne +37fb : d0fe > bne * ;failed not equal (non zero) + +37fd : 850a sta irq_a ;save registers during break test +37ff : 860b stx irq_x +3801 : ba tsx ;test break on stack +3802 : bd0201 lda $102,x + cmp_flag $ff ;break test should have B=1 +3805 : c9ff > cmp #($ff |fao)&m8 ;expected flags + always on bits + + trap_ne ; - no break flag on stack +3807 : d0fe > bne * ;failed not equal (non zero) + +3809 : 68 pla +380a : 0908 ora #decmode ;ignore decmode cleared if 65c02 + cmp_flag $ff ;actual passed flags +380c : c9ff > cmp #($ff |fao)&m8 ;expected flags + always on bits + + trap_ne +380e : d0fe > bne * ;failed not equal (non zero) + +3810 : ba tsx +3811 : e0fc cpx #$fc ;sp -3? (return addr, flags) + trap_ne +3813 : d0fe > bne * ;failed not equal (non zero) + +3815 : adff01 lda $1ff ;propper return on stack +3818 : c909 cmp #hi(brk_ret1) + trap_ne +381a : d0fe > bne * ;failed not equal (non zero) + +381c : adfe01 lda $1fe +381f : c9f7 cmp #lo(brk_ret1) + trap_ne +3821 : d0fe > bne * ;failed not equal (non zero) + + load_flag intdis +3823 : a904 > lda #intdis ;allow test to change I-flag (no mask) + +3825 : 48 pha +3826 : a60b ldx irq_x +3828 : e8 inx ;return registers with modifications +3829 : a50a lda irq_a +382b : 49aa eor #$aa +382d : 28 plp ;N=0, V=0, Z=0, C=0 but original flags should be restored +382e : 40 rti + trap ;runover protection +382f : 4c2f38 > jmp * ;failed anyway + +3832 : 4c0004 jmp start ;catastrophic error - cannot continue + if report = 1 include "report.i65" endif @@ -13899,7 +14250,7 @@ ffff = ram_top = -1 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 + 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 @@ -13939,12 +14290,22 @@ ffff = ram_top = -1 ERROR ERROR ERROR ;mismatch between bss and zeropage data endif data_init + ex_and_ and #0 ;execute immediate opcodes + rts + ex_eor_ eor #0 ;execute immediate opcodes + rts + ex_ora_ ora #0 ;execute immediate opcodes + rts + 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 + 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 @@ -13985,9 +14346,9 @@ ffff = ram_top = -1 if (load_data_direct = 1) & (ROM_vectors = 1) fffa = org $fffa ;vectors -fffa : c336 dw nmi_trap -fffc : c636 dw res_trap -fffe : cb36 dw irq_trap +fffa : 9d37 dw nmi_trap +fffc : a337 dw res_trap +fffe : ab37 dw irq_trap endif fffa = end start diff --git a/bin_files/65C02_extended_opcodes_test.bin b/bin_files/65C02_extended_opcodes_test.bin index de99bc47273d0d03a0e3bf10bfe717ebdcf07abe..b1ea946a1767f9b453325cf02df0bbbaba0cbf1e 100644 GIT binary patch literal 65536 zcmeI2dvH|M9mnsU?BgccSHg1?hYTP&6lb7dtMySJfFyDS%R?As22_e`rGr*ms~EF9 zw!{aeR$HJ#*;!n4c?eaiBS^D~glqxvDQrBOz$UV5820eGe69k0eG3efj{a@R{7;nm`oWJz74{qVGG(P_ zx$CBJHOl)h$D>PKQ3n4Mm*Qeeqf4W3YQWFYC{wJbit^b&r4y&!*%?yc^kGpY`Yo{V z-5uiFiNc>!$|}aTGnP@Z`IHNOPOXD#V&;*=mLn(gu55mH?p!v1UwR8}W@hsT3wo`P z&Bv2-;&bL4H2Zv$o0H9dlS^jvC(S;Yb=f?I1CwG99^aBG)F)j0h?;{^q&@>VJf+kp z6fD6IpfnOo(5rwYXt(sTfJQG1Xk=NyQm=1}ESQbH#{!3v*yE_;9`jfd<7za=Wr91+ zahYIKv6ltJJ)$g}HG^4~!K@QAVLovepQEOwS;rMDNwba@uq4ge3Kr*M1&gz`f~8*f z8Ck_yLoX;vvySJnB+VM)O|Up?D_ESh6~sN};OxLzm%*&vIP0bH2VmYQg-6S@pLtb0 z!%D|8RlxF6D2vJJ2}`s2^aCQr4JjT-i7U~YaCB|a>1jxAi%v{?;6Et4+u$o&rf-?P zb?I9Lx9N&(K3d%jU(q0LzJh;U&C%1*GdTNbpETsRMR%p)5Vb`&W34T^7Do@^DKCz` zDn2OXiuvK>OpWFtzjw9YtBv$&qkU>-wDmkq9W+{}__Uuu>p^pxNxy#L=ZzGIfFSKx zKJ8wIlw#}SK5dOXB@csQM#@0HcO#^{JA6g(Zz87U9}T{Wg^9<}?7 zimf%OHW*r^8Nr#9avLcl{N5dqQm<;09a4&|3svnldkP-jGe!zTKv(Uzs`jWuO0jjD zs_n3+oPiY8NEzezwm`~ZReQ@JrP%tps(ocoQ6Z(vNP!6Gs$Ed7T~yxPOR@Fxa_vfJ zmArI8O4vx5>i515Df7#HvHkWHDhm>OLtL54Od&((D zsWDRK`Mt*=z-6zpl`hIHVL?|5%}|v!{%OlolfeBA~1Gw+iiLhm>OL(F*ODJ*5RwqDD%S z-&=qbcctd5>^`Gn>!3>QVrZ3)bQDsWj1-7~uG+Pg+I0>o#nworcDp?V?xMLWxZe#D z_d73y`ry8kQZPB>XAQ1_uwf%$;~oPWbt-Ja^I%i67&c>@U=y9_2duCfespbw4ch@5 zcMELP*I^Sr2Ai5wuo+u`jo!P%pN->v&Ih0h`-|5l7;9^9hhO1NcaF0YC)5mF;}P?P zIQ6tBK5gFD(seL)xMdCvRnBKWVcG}4Wf91BYW6nhx5b84wu+BMe$8X_DhqkBw%A*jb`D z%aOgsWY_askXk~zvBm11mYWz85HHqyK#V$v7pUGau_aS?g#C|M_ zA3L&dnCvC|4P-Bo*tbOSEl2i4lO4c6M0SA09uUO?j_emE>*rq}>zCLUMDYbjw$fz3 z6=Q*-Bn(UMOMr5Cq*r}p8)sem3WFP0ZBm20- zjuFK%j_eYXUBQr3@6CB< zKAitu{`!38LwKy53XjA;##JZKfm!8{Re@QRdk+lVa9Yo*HL_+W-0_C{PdjCO4q5O_ zogQDzf`?tDEY)w7s|=PEU?}htOBC*RG0oEt_XFz%sY=)nJ_Xk$ro|_7MIT)T9_4b= zA!s5@71yTpk>N|@-o*C!E~6LRxO4DOkj4iCT+uMc505-4KaPJ}{3ud+enGvl=5Y>Q zWFz=1JWEIFGfl>?rNx-Y6>=;73hB^UXRpA~S`&8~5h4*6w)7o{M0`=VB+H3asDrW~vsrr~imUY1Z^^st6~?}VZH&^ixm4xiEoQ*ane zqZkY}*$313nm!n8vJa;5HGMGHWFJi9e;s67H1m5B`ew@Hg-i9Q2ud zfqy|@L2yB6L0HYeIvE^5IE?(SV7EPdTIvo*bc@t|i{2fNou&H*4}*9l_4xH3w%*Iu z``CJwtuJTReeCssxAySYxRVm4@1+}6+Le`(XL7gSn%*A%B;mG<%j~P~0Q;6Q?R`t5 z(dY1Ik2LP~@bQG(I*d|xJzMW?4YzbpFR`4#K{zZSJS=sIGQ3_2{L)^=RfLy7I~HAf zQCuc>I2E6DDt1B<4}g`%3-h?W*y2=dG>X;{jloELlvjnphq%}+!_=$Y#%ZZq25PC6 zMrtWqhH9x=#%ifr2CG-az)GWiP;nUSgX2_O0fn<2Pv4^G2bUQ|%d{TcXB4rg&{wKi z23n$F1cvC+e$1W)UK$bh%)$FOd~PzYR(PpSh4IFgjw=fSYcCF{kzp(rT-#9a1R4sl z&{|I*7GB|pp(F#mw_n{4mv^MToau*T7~2o0RWh_6F5pKzOmrFmC-8ZDL6Txmg89Qf z-or9JBdrjxQwln*m^$lGCK+HmGnhtoy6Ajk(2BsJf-PN#5#$s=Obs?$zwp`g04-orA?PLp(xcsV<*m^$l9y{3tBrcZfB(~bf;>Q|EzS2&@^`Lj*WN&O>{;>Qq4 zzNSYOTO}4=%8ZW+n8)nvWF~eeYsv0lm_u|`e zGEx5bOVkYXgiH1Nc+-YjlU{=}2Ws#cfnIw+uffN9P}_+$I4!I!zOrD=%0hx(v$AKQ zmU|BdwcRqPY8X^698_IgNnR22C$EeJU?49}XMB`jedk6vVc?1Koq6zohrbOz_4}Z? z6;EloL!;iI)!!Wc2x96WX1s`*#rU)yW26pp%(W0RS;S0byt>C2se>gZXMM%$1#|5U zbDjNmA{Z~=6&4G`f~!0%7K(-8CRx48%iwNU)xT!S&<=k`NQGClWjxC|!k%!f>T;;I z`a1&I9FXCEdss&h+hbL&)rY(+8H|OptvPs6!w;X$7fE=-nCb(&{951RI&*(`yM}!( zja5My?)UPVt|6`dWGJh)hEwYxt9n={>u(KNzj1dslK#-Q!=DUv_R;$US}ot&9ns~>81(xsQ0h2SMI#QUioacz4D7`_R8loq{{qc)v)F8 zgflTXvI4fDusc#dwmuT80=Xu<&(LkcqB8%{q09Ofmjia@@5qnLcjhw|Ulny}L_)|A^qZ$`TGw_46W z>EqAVIye50R`oHj;NRUpz@nLx0Wv@a$N(8217v^fDDiUGC&5%02v?yWPl8i0Wv@a$N(8217v^fDDiUGC&5%02v?yWPl8i0Wv@a$N(8217v^fDDiUGC&5%02v?yWPl8i0Wv@a$N(8217v^fDDiUGC&5%02v?yWPl8i0Wv@a$N(8217v^fDDiUGC&5%02v?yWPl8i0Wv@a$N(8217v^fDDiUGC&5%02v?yWPl8i0Wv@a$N(8217v^7dnW6+)Ir zN>C|nwFN4aoyAp`hcIfjf;5pxNHT~!l@Vo7;-e9fmZ&($Yq!7OJ@?+d=jJB;r!%e7 zUozYzzjHp{d(P)R_U>5}#r4&=WSml?47fiL&DSLI(N(K77G@Dv!b(|BUw{Q!h^ef^ zH;#>G6WByHiA`oxSOvR=UCYL>u?%|zeIZ|-zP=L%3P;~K@QH-Ne&t`HEDtR8-7&6A z`RI*gVzDp5;Gg1Cd~9)IaRN>Y_&t$eit{v4z8s)*;FLQ$q6(ZkETJU669)dj2l-wq z|Hq87lCiCfwJ6zK#s|M=)k@E3FY8#Z|6)lj%GfG8D!4eDs zN+YlYz4BOsc1JGge3CvsOKp&5om8+S%{rOKk~C{4XwJt8nzMF-g~*v z7nGz~Cv#YmW)1N+XwKRRnzMF-xW_g)J8;%TFl#@~dU0|Q%sZp-M3Mf}po(W$;aFz! zSY8ZeFbmNTm27B>*W&C21Iqqp_(~KRTV`y1##X^? zgO<%Dde*^Lq7*mZz`s*Gd8dX6vDl{((CMPsj6C3PeCxovC_2?K~s1wM^9q zL8~+)IFmAdD`mJA+y*HXs(zhEirG3>)$ehq;Nd-Mr9cF9)qkz(zx7BlTeqnCHh0Qd zNKvhnF*!+rDrl9woPv~? zl`>5Wz6~k27wdOoby6Vps>lu#}v-QnleXl#^1f-N%DRZ>o z5lA^+te@~mFHve-zfQ_ee2Y<6-??cM9A^+j_wLZlJi|1tBy9_nnM_ z$x)3}`Ub#;4Tp_?3~bbCu!+rqP1$_djIDu9ViMfuGWk{Tt8W8r*f!Ys>tUn54V%~z z*p!`s&DcC_jNa{9Hi`GS5P&M|FF8KNSaWMD{0Vou^PC+!rnbN}9=BhJGtZ0S^Y(qM zVLXf-ZkfmqwAl~%Kx99V*g8?H^JK@{>@GeY*KepM6`Nzm!EV0d^*zCzpwAr0}BC}Ea#+07Drvnbx|$sVxTVf+BH!zA`yQGC~vJ!!LHeiGTR#J(bmuXwS( z+0D)7Ik}O~Ms}mbP8G$ep6p?p9mEeKJ4j;pi{gGy_MFWY@pH(+Lr1)DExaI#FL<#< zMXlC#bdDDxdro4X6UFB|*q4vw}(aXVNZ5~&A!ejAp5$s-@8TeZclc)&2Hh-k=-J(w}|2`p6p#VyN=(5 z>^g~^B8pQy*#~U)3H|`GPe|OK9%4Xl>S0VeR#LgGR z`JU``Hv2Na4%wF_c8(~{@nmna*=P7|$UY;n(?oHaCws5WKE>}v_9=-SBZ^}@*#$Pc zj4wcTnZynk#o?ap<2L&se;nBdC3b))4)A23w%IEFG_q9^8x_T??iT@#GVkv6Q1lBHrtzjfoyMytrx|5Pxh?M`uSO8{Sv!P6t{I^@!3*^ zhsk1iwoDc68e6{pJZp`e$_!blz_V=y&s3(SCMV82&yHntb#*GdH|HI>SnfBu8*(k5 zz+>e!cqG0SSDioyW)(x0hFRfVkCd-JEoa@D@+T`7p7zT63bNptx?zHu1rNJQQKs)o zUlA-Tz);{fmdY>mF+I>1_k$18Vc5^N$}#*Co>Vds-0ha+VSF9T@e3=grHb?L+8D<_ z;So4q(NbgmSy)4fUn#fZpW^Tu?3MVa?M&QmMTkUPk1}>367jXzk!Z9Q5)HO(3rzK} zLmS-nG9@_vwaK}t{l$T5Wh4LH_hH-82*a)%@m3Vq1F&hZ(KG^^mWZa9)l_aYjl`yL zqN#_~#EquQun9*EfjyzA4HoJ7i8-~Y@N#1 z6*K2Pb_Kv&YwTOxNr5u<(upeU%1OyHc~Envx5hqC`5oi3`x-mIzJ*M8-@<5&Is7Rg zjk`5=H05^=qtM;RHo7~*9o-uiIL_cwI4n^-EaOu}c)jHLWj(B`2rq$FEc%S1xJ>Tz zD!%Ad?0_O304I$X=23UC-m6$`6`dm*gOSE4uhzhaxY!-TG^(A(>8Lse>Zle*>L@yf z>Zm%#>Zm#fYgEO+3Zq@2cno&MI29Kz;cUm#*A%^CiB)t=Yel0~#GXQ5q2?H9frb%S zq6_=6d**pzMA)+p-hScZj(xSlD{Ll)H@1ePQWahUi!K@}gXE8Gl$xyZjZj9-YJz6&RM1YA-{ow@evKJ&N?j)E$>{CuMI!Q_H zUe=iW-eW42#uVvdOhzwjOwJ_7-s~h}Oj44&S98|i9_}d8clU2=a5#>E;~waEM>3nq zi8Rn-4X}-E!7F#72 zUdpW1{xpBCTNYa-7M?q;)%i4kwObZjB^Dn<&DHcY-`g#VtrCkDfw}sf<_EiFu~lNr zfHhaE)BLk;S!|WqvA~+E%V~b9TNYa-HUSS{JK%Pi7xRb7t@sL+;D7s` z+5$b}6)iu&n>N&Hj2fIdP=lp?qqfMX!KZOh+m1CjEu1XAvS7{0LV{6qvge@I_8|;v zt7A|-VNktrP~($IdUUOpzM?h^19|Ow#z$)E`!nH$fhWrMe+)m{wPyIR?&G>9Jf-Ch z)kcRVtuFQ{#K7f}9w%aMWc;RXW26ppOa;VLikM2qdv+Tmb#TPAIbX4Q!CZU8TyK3Z z6-nmt3abs*Mpgz`ZAon@+$3WwgADG5(SBt`smM+PvO{JN&kkxZ&G#hCuaem|Oa3uYpZ@ZQbcl0s(gqs}SIvWglI34M@ z0vh`@MGD{TvBGy#q&=3#{ienIF}m1S8*MLz0BIKQZG|^seP9|LFb)0r!MfsC)8U^) z)IIRH9v`}N4?G8OsQf+VuKWyNI^|CP2)av=mA*^T;d>NU&)CX-Q2yLq4*#N4{L1(>QuU8qC4uN$?nSiGu)LgZ+2IHeuKO6)lE|6_H=aUQh2_Z z6d3_Wc2Y^qA1@wT5wDGcS{rV(WZST)+&;N{$pz+n`0cs-awBpbxt2<}1;MI(1H4_V zc&x(s&m-|oaOLv&(aKHp^6c0#{h{(*@V&fz{{{Hd9dIiIz&*cVa_0a@z&HEH^uLrJ zgD<_lT;E-;?|(y5u?{#f;EvDZEq&n}!HwRxZ{hzq{qOx|Ok&xP|H#0Mtn85g z@Bh$5vnK;&fDDiUGC&5%02v?yWPl8i0Wv@a$N(8217v^fDDiUGC&5%02v?yWPl8i0Wv@a$N(8217v^fDDiUGC&5%02v?yWPl8i0Wv@a$N(8217v^fDDiUGC&5%02v?yWPl8i0Wv@a$N(8217v^fDDiUGC&5%02v?yWPl8i0Wv@a$N(8217v^fDDiUGC&5%02v?yWPl8i0Wv@a$N(8217v^fDDiUGC&5%02v?yWPl8i0Wv@a$N(8217v^0=no test) @@ -108,6 +114,10 @@ AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood ;(0=test as NOPs, 1=full test, >1=no test) 0001 = rkwl_wdc_op = 1 + ;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 @@ -504,8 +514,6 @@ ffff = ram_top = -1 ccs1\? sta jxi_tab,x ;JMP indirect page cross area dex bpl ccs1\? - sta chkdadi ;self modifying code - sta chkdsbi clc ldx #zp_bss-zero_page ;zeropage - write test area ccs3\? adc zero_page,x @@ -514,9 +522,9 @@ ffff = ram_top = -1 clc ccs2\? inx bne ccs3\? - ldx #hi(data_segment) ;set high byte of indirect pointer + ldx #hi(abs1) ;set high byte of indirect pointer stx zpt+1 - ldy #lo(data_bss) ;data after write test area + ldy #lo(abs1) ;data after write & execute test area ccs5\? adc (zpt),y bcc ccs4\? inc zpt+3 ;carry to high byte @@ -558,57 +566,60 @@ ffff = ram_top = -1 ; org zero_page 0000 = org 0 ;edited to provide binaries loading from 0 0000 : 00000000000000.. ds 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 -000a : zpt ;5 bytes store/modify test area +000c : zpt ;5 bytes store/modify test area ;add/subtract operand generation and result/flag prediction -000a : 00 adfc ds 1 ;carry flag before op -000b : 00 ad1 ds 1 ;operand 1 - accumulator -000c : 00 ad2 ds 1 ;operand 2 - memory / immediate -000d : 00 adrl ds 1 ;expected result bits 0-7 -000e : 00 adrh ds 1 ;expected result bit 8 (carry) -000f : 00 adrf ds 1 ;expected flags NV0000ZC (-V in decimal mode) -0010 : 00 sb2 ds 1 ;operand 2 complemented for subtract -0011 : zp_bss -0011 : c3824100 zp1 db $c3,$82,$41,0 ;test patterns for LDx BIT ROL ROR ASL LSR -0015 : 7f zp7f db $7f ;test pattern for compare +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 -0016 : 001f7180 zpOR db 0,$1f,$71,$80 ;test pattern for OR -001a : 0fff7f80 zpAN db $0f,$ff,$7f,$80 ;test pattern for AND -001e : ff0f8f8f zpEO db $ff,$0f,$8f,$8f ;test pattern for EOR +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 -0022 : 0a02 ind1 dw abs1 ;indirect pointer to pattern in absolute memory -0024 : 0b02 dw abs1+1 -0026 : 0c02 dw abs1+2 -0028 : 0d02 dw abs1+3 -002a : 0e02 dw abs7f -002c : 1201 inw1 dw abs1-$f8 ;indirect pointer for wrap-test pattern -002e : 0502 indt dw abst ;indirect pointer to store area in absolute memory -0030 : 0602 dw abst+1 -0032 : 0702 dw abst+2 -0034 : 0802 dw abst+3 -0036 : 0d01 inwt dw abst-$f8 ;indirect pointer for wrap-test store -0038 : 4102 indAN dw absAN ;indirect pointer to AND pattern in absolute memory -003a : 4202 dw absAN+1 -003c : 4302 dw absAN+2 -003e : 4402 dw absAN+3 -0040 : 4502 indEO dw absEO ;indirect pointer to EOR pattern in absolute memory -0042 : 4602 dw absEO+1 -0044 : 4702 dw absEO+2 -0046 : 4802 dw absEO+3 -0048 : 3d02 indOR dw absOR ;indirect pointer to OR pattern in absolute memory -004a : 3e02 dw absOR+1 -004c : 3f02 dw absOR+2 -004e : 4002 dw absOR+3 +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 -0050 : 0502 adi2 dw ada2 ;indirect pointer to operand 2 in absolute memory -0052 : 0602 sbi2 dw sba2 ;indirect pointer to complemented operand 2 (SBC) -0054 : 0601 adiy2 dw ada2-$ff ;with offset for indirect indexed -0056 : 0701 sbiy2 dw sba2-$ff -0058 : zp_bss_end +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 @@ -620,38 +631,47 @@ ffff = ram_top = -1 0206 : 00 sba2 ds 1 ;operand 2 complemented for subtract 0207 : 000000 ds 3 ;fill remaining bytes 020a : data_bss -020a : c3824100 abs1 db $c3,$82,$41,0 ;test patterns for LDx BIT ROL ROR ASL LSR -020e : 7f abs7f db $7f ;test pattern for compare + 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 -020f : 80800002 fLDx db fn,fn,0,fz ;expected flags for load +0215 : 80800002 fLDx db fn,fn,0,fz ;expected flags for load ;shifts -0213 : rASL ;expected result ASL & ROL -carry -0213 : 86048200 rROL db $86,$04,$82,0 ; " -0217 : 87058301 rROLc db $87,$05,$83,1 ;expected result ROL +carry -021b : rLSR ;expected result LSR & ROR -carry -021b : 61412000 rROR db $61,$41,$20,0 ; " -021f : e1c1a080 rRORc db $e1,$c1,$a0,$80 ;expected result ROR +carry -0223 : fASL ;expected flags for shifts -0223 : 81018002 fROL db fnc,fc,fn,fz ;no carry in -0227 : 81018000 fROLc db fnc,fc,fn,0 ;carry in -022b : fLSR -022b : 01000102 fROR db fc,0,fc,fz ;no carry in -022f : 81808180 fRORc db fnc,fn,fnc,fn ;carry in +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) -0233 : 7f80ff0001 rINC db $7f,$80,$ff,0,1 ;expected result for INC/DEC -0238 : 0080800200 fINC db 0,fn,fn,fz,0 ;expected flags for INC/DEC +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 -023d : 001f7180 absOR db 0,$1f,$71,$80 ;test pattern for OR -0241 : 0fff7f80 absAN db $0f,$ff,$7f,$80 ;test pattern for AND -0245 : ff0f8f8f absEO db $ff,$0f,$8f,$8f ;test pattern for EOR +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 -0249 : 00f11f00 absORa db 0,$f1,$1f,0 ;test pattern for OR -024d : f0ffffff absANa db $f0,$ff,$ff,$ff ;test pattern for AND -0251 : fff0f00f absEOa db $ff,$f0,$f0,$0f ;test pattern for EOR +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 -0255 : 00ff7f80 absrlo db 0,$ff,$7f,$80 -0259 : 02800080 absflo db fz,fn,0,fn -025d : data_bss_end +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) @@ -717,8 +737,6 @@ ffff = ram_top = -1 gcs1 sta jxi_tab,x ;JMP indirect page cross area dex bpl gcs1 - sta chkdadi ;self modifying code - sta chkdsbi clc ldx #zp_bss-zero_page ;zeropage - write test area gcs3 adc zero_page,x @@ -727,9 +745,9 @@ ffff = ram_top = -1 clc gcs2 inx bne gcs3 - ldx #hi(data_segment) ;set high byte of indirect pointer + ldx #hi(abs1) ;set high byte of indirect pointer stx zpt+1 - ldy #lo(data_bss) ;data after write test area + ldy #lo(abs1) ;data after write & execute test area gcs5 adc (zpt),y bcc gcs4 inc ram_chksm+1 ;carry to high byte @@ -1729,7 +1747,7 @@ ffff = ram_top = -1 071e : a022 ldy #$22 bbt 0 0720 : a901 > lda #(1<<0) ;testing 1 bit on -0722 : 850a > sta zpt +0722 : 850c > sta zpt > set_a $33,0 ;with flags off > load_flag 0 0724 : a900 > lda #0 ;allow test to change I-flag (no mask) @@ -1738,8 +1756,8 @@ ffff = ram_top = -1 0727 : a933 > lda #$33 ;precharge accu 0729 : 28 > plp > -072a : 0f0a06 > bbr 0,zpt,fail10196 -072d : 8f0a06 > bbs 0,zpt,ok10196 +072a : 0f0c06 > bbr 0,zpt,fail10196 +072d : 8f0c06 > bbs 0,zpt,ok10196 > trap ;bbs branch not taken 0730 : 4c3007 > jmp * ;failed anyway > @@ -1772,8 +1790,8 @@ ffff = ram_top = -1 0745 : a9cc > lda #$cc ;precharge accu 0747 : 28 > plp > -0748 : 0f0a06 > bbr 0,zpt,fail20196 -074b : 8f0a06 > bbs 0,zpt,ok20196 +0748 : 0f0c06 > bbr 0,zpt,fail20196 +074b : 8f0c06 > bbs 0,zpt,ok20196 > trap ;bbs branch not taken 074e : 4c4e07 > jmp * ;failed anyway > @@ -1798,13 +1816,13 @@ ffff = ram_top = -1 > 075f : 28 > plp ;restore status > -0760 : a50a > lda zpt +0760 : a50c > lda zpt 0762 : c901 > cmp #(1<<0) > trap_ne ;zp altered 0764 : d0fe > bne * ;failed not equal (non zero) > 0766 : a9fe > lda #$ff-(1<<0) ;testing 1 bit off -0768 : 850a > sta zpt +0768 : 850c > sta zpt > set_a $33,0 ;with flags off > load_flag 0 076a : a900 > lda #0 ;allow test to change I-flag (no mask) @@ -1813,8 +1831,8 @@ ffff = ram_top = -1 076d : a933 > lda #$33 ;precharge accu 076f : 28 > plp > -0770 : 8f0a06 > bbs 0,zpt,fail30196 -0773 : 0f0a06 > bbr 0,zpt,ok30196 +0770 : 8f0c06 > bbs 0,zpt,fail30196 +0773 : 0f0c06 > bbr 0,zpt,ok30196 > trap ;bbr branch not taken 0776 : 4c7607 > jmp * ;failed anyway > @@ -1847,8 +1865,8 @@ ffff = ram_top = -1 078b : a9cc > lda #$cc ;precharge accu 078d : 28 > plp > -078e : 8f0a06 > bbs 0,zpt,fail40196 -0791 : 0f0a06 > bbr 0,zpt,ok40196 +078e : 8f0c06 > bbs 0,zpt,fail40196 +0791 : 0f0c06 > bbr 0,zpt,ok40196 > trap ;bbr branch not taken 0794 : 4c9407 > jmp * ;failed anyway > @@ -1873,7 +1891,7 @@ ffff = ram_top = -1 > 07a5 : 28 > plp ;restore status > -07a6 : a50a > lda zpt +07a6 : a50c > lda zpt 07a8 : c9fe > cmp #$ff-(1<<0) > trap_ne ;zp altered 07aa : d0fe > bne * ;failed not equal (non zero) @@ -1881,7 +1899,7 @@ ffff = ram_top = -1 bbt 1 07ac : a902 > lda #(1<<1) ;testing 1 bit on -07ae : 850a > sta zpt +07ae : 850c > sta zpt > set_a $33,0 ;with flags off > load_flag 0 07b0 : a900 > lda #0 ;allow test to change I-flag (no mask) @@ -1890,8 +1908,8 @@ ffff = ram_top = -1 07b3 : a933 > lda #$33 ;precharge accu 07b5 : 28 > plp > -07b6 : 1f0a06 > bbr 1,zpt,fail10231 -07b9 : 9f0a06 > bbs 1,zpt,ok10231 +07b6 : 1f0c06 > bbr 1,zpt,fail10231 +07b9 : 9f0c06 > bbs 1,zpt,ok10231 > trap ;bbs branch not taken 07bc : 4cbc07 > jmp * ;failed anyway > @@ -1924,8 +1942,8 @@ ffff = ram_top = -1 07d1 : a9cc > lda #$cc ;precharge accu 07d3 : 28 > plp > -07d4 : 1f0a06 > bbr 1,zpt,fail20231 -07d7 : 9f0a06 > bbs 1,zpt,ok20231 +07d4 : 1f0c06 > bbr 1,zpt,fail20231 +07d7 : 9f0c06 > bbs 1,zpt,ok20231 > trap ;bbs branch not taken 07da : 4cda07 > jmp * ;failed anyway > @@ -1950,13 +1968,13 @@ ffff = ram_top = -1 > 07eb : 28 > plp ;restore status > -07ec : a50a > lda zpt +07ec : a50c > lda zpt 07ee : c902 > cmp #(1<<1) > trap_ne ;zp altered 07f0 : d0fe > bne * ;failed not equal (non zero) > 07f2 : a9fd > lda #$ff-(1<<1) ;testing 1 bit off -07f4 : 850a > sta zpt +07f4 : 850c > sta zpt > set_a $33,0 ;with flags off > load_flag 0 07f6 : a900 > lda #0 ;allow test to change I-flag (no mask) @@ -1965,8 +1983,8 @@ ffff = ram_top = -1 07f9 : a933 > lda #$33 ;precharge accu 07fb : 28 > plp > -07fc : 9f0a06 > bbs 1,zpt,fail30231 -07ff : 1f0a06 > bbr 1,zpt,ok30231 +07fc : 9f0c06 > bbs 1,zpt,fail30231 +07ff : 1f0c06 > bbr 1,zpt,ok30231 > trap ;bbr branch not taken 0802 : 4c0208 > jmp * ;failed anyway > @@ -1999,8 +2017,8 @@ ffff = ram_top = -1 0817 : a9cc > lda #$cc ;precharge accu 0819 : 28 > plp > -081a : 9f0a06 > bbs 1,zpt,fail40231 -081d : 1f0a06 > bbr 1,zpt,ok40231 +081a : 9f0c06 > bbs 1,zpt,fail40231 +081d : 1f0c06 > bbr 1,zpt,ok40231 > trap ;bbr branch not taken 0820 : 4c2008 > jmp * ;failed anyway > @@ -2025,7 +2043,7 @@ ffff = ram_top = -1 > 0831 : 28 > plp ;restore status > -0832 : a50a > lda zpt +0832 : a50c > lda zpt 0834 : c9fd > cmp #$ff-(1<<1) > trap_ne ;zp altered 0836 : d0fe > bne * ;failed not equal (non zero) @@ -2033,7 +2051,7 @@ ffff = ram_top = -1 bbt 2 0838 : a904 > lda #(1<<2) ;testing 1 bit on -083a : 850a > sta zpt +083a : 850c > sta zpt > set_a $33,0 ;with flags off > load_flag 0 083c : a900 > lda #0 ;allow test to change I-flag (no mask) @@ -2042,8 +2060,8 @@ ffff = ram_top = -1 083f : a933 > lda #$33 ;precharge accu 0841 : 28 > plp > -0842 : 2f0a06 > bbr 2,zpt,fail10266 -0845 : af0a06 > bbs 2,zpt,ok10266 +0842 : 2f0c06 > bbr 2,zpt,fail10266 +0845 : af0c06 > bbs 2,zpt,ok10266 > trap ;bbs branch not taken 0848 : 4c4808 > jmp * ;failed anyway > @@ -2076,8 +2094,8 @@ ffff = ram_top = -1 085d : a9cc > lda #$cc ;precharge accu 085f : 28 > plp > -0860 : 2f0a06 > bbr 2,zpt,fail20266 -0863 : af0a06 > bbs 2,zpt,ok20266 +0860 : 2f0c06 > bbr 2,zpt,fail20266 +0863 : af0c06 > bbs 2,zpt,ok20266 > trap ;bbs branch not taken 0866 : 4c6608 > jmp * ;failed anyway > @@ -2102,13 +2120,13 @@ ffff = ram_top = -1 > 0877 : 28 > plp ;restore status > -0878 : a50a > lda zpt +0878 : a50c > lda zpt 087a : c904 > cmp #(1<<2) > trap_ne ;zp altered 087c : d0fe > bne * ;failed not equal (non zero) > 087e : a9fb > lda #$ff-(1<<2) ;testing 1 bit off -0880 : 850a > sta zpt +0880 : 850c > sta zpt > set_a $33,0 ;with flags off > load_flag 0 0882 : a900 > lda #0 ;allow test to change I-flag (no mask) @@ -2117,8 +2135,8 @@ ffff = ram_top = -1 0885 : a933 > lda #$33 ;precharge accu 0887 : 28 > plp > -0888 : af0a06 > bbs 2,zpt,fail30266 -088b : 2f0a06 > bbr 2,zpt,ok30266 +0888 : af0c06 > bbs 2,zpt,fail30266 +088b : 2f0c06 > bbr 2,zpt,ok30266 > trap ;bbr branch not taken 088e : 4c8e08 > jmp * ;failed anyway > @@ -2151,8 +2169,8 @@ ffff = ram_top = -1 08a3 : a9cc > lda #$cc ;precharge accu 08a5 : 28 > plp > -08a6 : af0a06 > bbs 2,zpt,fail40266 -08a9 : 2f0a06 > bbr 2,zpt,ok40266 +08a6 : af0c06 > bbs 2,zpt,fail40266 +08a9 : 2f0c06 > bbr 2,zpt,ok40266 > trap ;bbr branch not taken 08ac : 4cac08 > jmp * ;failed anyway > @@ -2177,7 +2195,7 @@ ffff = ram_top = -1 > 08bd : 28 > plp ;restore status > -08be : a50a > lda zpt +08be : a50c > lda zpt 08c0 : c9fb > cmp #$ff-(1<<2) > trap_ne ;zp altered 08c2 : d0fe > bne * ;failed not equal (non zero) @@ -2185,7 +2203,7 @@ ffff = ram_top = -1 bbt 3 08c4 : a908 > lda #(1<<3) ;testing 1 bit on -08c6 : 850a > sta zpt +08c6 : 850c > sta zpt > set_a $33,0 ;with flags off > load_flag 0 08c8 : a900 > lda #0 ;allow test to change I-flag (no mask) @@ -2194,8 +2212,8 @@ ffff = ram_top = -1 08cb : a933 > lda #$33 ;precharge accu 08cd : 28 > plp > -08ce : 3f0a06 > bbr 3,zpt,fail10301 -08d1 : bf0a06 > bbs 3,zpt,ok10301 +08ce : 3f0c06 > bbr 3,zpt,fail10301 +08d1 : bf0c06 > bbs 3,zpt,ok10301 > trap ;bbs branch not taken 08d4 : 4cd408 > jmp * ;failed anyway > @@ -2228,8 +2246,8 @@ ffff = ram_top = -1 08e9 : a9cc > lda #$cc ;precharge accu 08eb : 28 > plp > -08ec : 3f0a06 > bbr 3,zpt,fail20301 -08ef : bf0a06 > bbs 3,zpt,ok20301 +08ec : 3f0c06 > bbr 3,zpt,fail20301 +08ef : bf0c06 > bbs 3,zpt,ok20301 > trap ;bbs branch not taken 08f2 : 4cf208 > jmp * ;failed anyway > @@ -2254,13 +2272,13 @@ ffff = ram_top = -1 > 0903 : 28 > plp ;restore status > -0904 : a50a > lda zpt +0904 : a50c > lda zpt 0906 : c908 > cmp #(1<<3) > trap_ne ;zp altered 0908 : d0fe > bne * ;failed not equal (non zero) > 090a : a9f7 > lda #$ff-(1<<3) ;testing 1 bit off -090c : 850a > sta zpt +090c : 850c > sta zpt > set_a $33,0 ;with flags off > load_flag 0 090e : a900 > lda #0 ;allow test to change I-flag (no mask) @@ -2269,8 +2287,8 @@ ffff = ram_top = -1 0911 : a933 > lda #$33 ;precharge accu 0913 : 28 > plp > -0914 : bf0a06 > bbs 3,zpt,fail30301 -0917 : 3f0a06 > bbr 3,zpt,ok30301 +0914 : bf0c06 > bbs 3,zpt,fail30301 +0917 : 3f0c06 > bbr 3,zpt,ok30301 > trap ;bbr branch not taken 091a : 4c1a09 > jmp * ;failed anyway > @@ -2303,8 +2321,8 @@ ffff = ram_top = -1 092f : a9cc > lda #$cc ;precharge accu 0931 : 28 > plp > -0932 : bf0a06 > bbs 3,zpt,fail40301 -0935 : 3f0a06 > bbr 3,zpt,ok40301 +0932 : bf0c06 > bbs 3,zpt,fail40301 +0935 : 3f0c06 > bbr 3,zpt,ok40301 > trap ;bbr branch not taken 0938 : 4c3809 > jmp * ;failed anyway > @@ -2329,7 +2347,7 @@ ffff = ram_top = -1 > 0949 : 28 > plp ;restore status > -094a : a50a > lda zpt +094a : a50c > lda zpt 094c : c9f7 > cmp #$ff-(1<<3) > trap_ne ;zp altered 094e : d0fe > bne * ;failed not equal (non zero) @@ -2337,7 +2355,7 @@ ffff = ram_top = -1 bbt 4 0950 : a910 > lda #(1<<4) ;testing 1 bit on -0952 : 850a > sta zpt +0952 : 850c > sta zpt > set_a $33,0 ;with flags off > load_flag 0 0954 : a900 > lda #0 ;allow test to change I-flag (no mask) @@ -2346,8 +2364,8 @@ ffff = ram_top = -1 0957 : a933 > lda #$33 ;precharge accu 0959 : 28 > plp > -095a : 4f0a06 > bbr 4,zpt,fail10336 -095d : cf0a06 > bbs 4,zpt,ok10336 +095a : 4f0c06 > bbr 4,zpt,fail10336 +095d : cf0c06 > bbs 4,zpt,ok10336 > trap ;bbs branch not taken 0960 : 4c6009 > jmp * ;failed anyway > @@ -2380,8 +2398,8 @@ ffff = ram_top = -1 0975 : a9cc > lda #$cc ;precharge accu 0977 : 28 > plp > -0978 : 4f0a06 > bbr 4,zpt,fail20336 -097b : cf0a06 > bbs 4,zpt,ok20336 +0978 : 4f0c06 > bbr 4,zpt,fail20336 +097b : cf0c06 > bbs 4,zpt,ok20336 > trap ;bbs branch not taken 097e : 4c7e09 > jmp * ;failed anyway > @@ -2406,13 +2424,13 @@ ffff = ram_top = -1 > 098f : 28 > plp ;restore status > -0990 : a50a > lda zpt +0990 : a50c > lda zpt 0992 : c910 > cmp #(1<<4) > trap_ne ;zp altered 0994 : d0fe > bne * ;failed not equal (non zero) > 0996 : a9ef > lda #$ff-(1<<4) ;testing 1 bit off -0998 : 850a > sta zpt +0998 : 850c > sta zpt > set_a $33,0 ;with flags off > load_flag 0 099a : a900 > lda #0 ;allow test to change I-flag (no mask) @@ -2421,8 +2439,8 @@ ffff = ram_top = -1 099d : a933 > lda #$33 ;precharge accu 099f : 28 > plp > -09a0 : cf0a06 > bbs 4,zpt,fail30336 -09a3 : 4f0a06 > bbr 4,zpt,ok30336 +09a0 : cf0c06 > bbs 4,zpt,fail30336 +09a3 : 4f0c06 > bbr 4,zpt,ok30336 > trap ;bbr branch not taken 09a6 : 4ca609 > jmp * ;failed anyway > @@ -2455,8 +2473,8 @@ ffff = ram_top = -1 09bb : a9cc > lda #$cc ;precharge accu 09bd : 28 > plp > -09be : cf0a06 > bbs 4,zpt,fail40336 -09c1 : 4f0a06 > bbr 4,zpt,ok40336 +09be : cf0c06 > bbs 4,zpt,fail40336 +09c1 : 4f0c06 > bbr 4,zpt,ok40336 > trap ;bbr branch not taken 09c4 : 4cc409 > jmp * ;failed anyway > @@ -2481,7 +2499,7 @@ ffff = ram_top = -1 > 09d5 : 28 > plp ;restore status > -09d6 : a50a > lda zpt +09d6 : a50c > lda zpt 09d8 : c9ef > cmp #$ff-(1<<4) > trap_ne ;zp altered 09da : d0fe > bne * ;failed not equal (non zero) @@ -2489,7 +2507,7 @@ ffff = ram_top = -1 bbt 5 09dc : a920 > lda #(1<<5) ;testing 1 bit on -09de : 850a > sta zpt +09de : 850c > sta zpt > set_a $33,0 ;with flags off > load_flag 0 09e0 : a900 > lda #0 ;allow test to change I-flag (no mask) @@ -2498,8 +2516,8 @@ ffff = ram_top = -1 09e3 : a933 > lda #$33 ;precharge accu 09e5 : 28 > plp > -09e6 : 5f0a06 > bbr 5,zpt,fail10371 -09e9 : df0a06 > bbs 5,zpt,ok10371 +09e6 : 5f0c06 > bbr 5,zpt,fail10371 +09e9 : df0c06 > bbs 5,zpt,ok10371 > trap ;bbs branch not taken 09ec : 4cec09 > jmp * ;failed anyway > @@ -2532,8 +2550,8 @@ ffff = ram_top = -1 0a01 : a9cc > lda #$cc ;precharge accu 0a03 : 28 > plp > -0a04 : 5f0a06 > bbr 5,zpt,fail20371 -0a07 : df0a06 > bbs 5,zpt,ok20371 +0a04 : 5f0c06 > bbr 5,zpt,fail20371 +0a07 : df0c06 > bbs 5,zpt,ok20371 > trap ;bbs branch not taken 0a0a : 4c0a0a > jmp * ;failed anyway > @@ -2558,13 +2576,13 @@ ffff = ram_top = -1 > 0a1b : 28 > plp ;restore status > -0a1c : a50a > lda zpt +0a1c : a50c > lda zpt 0a1e : c920 > cmp #(1<<5) > trap_ne ;zp altered 0a20 : d0fe > bne * ;failed not equal (non zero) > 0a22 : a9df > lda #$ff-(1<<5) ;testing 1 bit off -0a24 : 850a > sta zpt +0a24 : 850c > sta zpt > set_a $33,0 ;with flags off > load_flag 0 0a26 : a900 > lda #0 ;allow test to change I-flag (no mask) @@ -2573,8 +2591,8 @@ ffff = ram_top = -1 0a29 : a933 > lda #$33 ;precharge accu 0a2b : 28 > plp > -0a2c : df0a06 > bbs 5,zpt,fail30371 -0a2f : 5f0a06 > bbr 5,zpt,ok30371 +0a2c : df0c06 > bbs 5,zpt,fail30371 +0a2f : 5f0c06 > bbr 5,zpt,ok30371 > trap ;bbr branch not taken 0a32 : 4c320a > jmp * ;failed anyway > @@ -2607,8 +2625,8 @@ ffff = ram_top = -1 0a47 : a9cc > lda #$cc ;precharge accu 0a49 : 28 > plp > -0a4a : df0a06 > bbs 5,zpt,fail40371 -0a4d : 5f0a06 > bbr 5,zpt,ok40371 +0a4a : df0c06 > bbs 5,zpt,fail40371 +0a4d : 5f0c06 > bbr 5,zpt,ok40371 > trap ;bbr branch not taken 0a50 : 4c500a > jmp * ;failed anyway > @@ -2633,7 +2651,7 @@ ffff = ram_top = -1 > 0a61 : 28 > plp ;restore status > -0a62 : a50a > lda zpt +0a62 : a50c > lda zpt 0a64 : c9df > cmp #$ff-(1<<5) > trap_ne ;zp altered 0a66 : d0fe > bne * ;failed not equal (non zero) @@ -2641,7 +2659,7 @@ ffff = ram_top = -1 bbt 6 0a68 : a940 > lda #(1<<6) ;testing 1 bit on -0a6a : 850a > sta zpt +0a6a : 850c > sta zpt > set_a $33,0 ;with flags off > load_flag 0 0a6c : a900 > lda #0 ;allow test to change I-flag (no mask) @@ -2650,8 +2668,8 @@ ffff = ram_top = -1 0a6f : a933 > lda #$33 ;precharge accu 0a71 : 28 > plp > -0a72 : 6f0a06 > bbr 6,zpt,fail10406 -0a75 : ef0a06 > bbs 6,zpt,ok10406 +0a72 : 6f0c06 > bbr 6,zpt,fail10406 +0a75 : ef0c06 > bbs 6,zpt,ok10406 > trap ;bbs branch not taken 0a78 : 4c780a > jmp * ;failed anyway > @@ -2684,8 +2702,8 @@ ffff = ram_top = -1 0a8d : a9cc > lda #$cc ;precharge accu 0a8f : 28 > plp > -0a90 : 6f0a06 > bbr 6,zpt,fail20406 -0a93 : ef0a06 > bbs 6,zpt,ok20406 +0a90 : 6f0c06 > bbr 6,zpt,fail20406 +0a93 : ef0c06 > bbs 6,zpt,ok20406 > trap ;bbs branch not taken 0a96 : 4c960a > jmp * ;failed anyway > @@ -2710,13 +2728,13 @@ ffff = ram_top = -1 > 0aa7 : 28 > plp ;restore status > -0aa8 : a50a > lda zpt +0aa8 : a50c > lda zpt 0aaa : c940 > cmp #(1<<6) > trap_ne ;zp altered 0aac : d0fe > bne * ;failed not equal (non zero) > 0aae : a9bf > lda #$ff-(1<<6) ;testing 1 bit off -0ab0 : 850a > sta zpt +0ab0 : 850c > sta zpt > set_a $33,0 ;with flags off > load_flag 0 0ab2 : a900 > lda #0 ;allow test to change I-flag (no mask) @@ -2725,8 +2743,8 @@ ffff = ram_top = -1 0ab5 : a933 > lda #$33 ;precharge accu 0ab7 : 28 > plp > -0ab8 : ef0a06 > bbs 6,zpt,fail30406 -0abb : 6f0a06 > bbr 6,zpt,ok30406 +0ab8 : ef0c06 > bbs 6,zpt,fail30406 +0abb : 6f0c06 > bbr 6,zpt,ok30406 > trap ;bbr branch not taken 0abe : 4cbe0a > jmp * ;failed anyway > @@ -2759,8 +2777,8 @@ ffff = ram_top = -1 0ad3 : a9cc > lda #$cc ;precharge accu 0ad5 : 28 > plp > -0ad6 : ef0a06 > bbs 6,zpt,fail40406 -0ad9 : 6f0a06 > bbr 6,zpt,ok40406 +0ad6 : ef0c06 > bbs 6,zpt,fail40406 +0ad9 : 6f0c06 > bbr 6,zpt,ok40406 > trap ;bbr branch not taken 0adc : 4cdc0a > jmp * ;failed anyway > @@ -2785,7 +2803,7 @@ ffff = ram_top = -1 > 0aed : 28 > plp ;restore status > -0aee : a50a > lda zpt +0aee : a50c > lda zpt 0af0 : c9bf > cmp #$ff-(1<<6) > trap_ne ;zp altered 0af2 : d0fe > bne * ;failed not equal (non zero) @@ -2793,7 +2811,7 @@ ffff = ram_top = -1 bbt 7 0af4 : a980 > lda #(1<<7) ;testing 1 bit on -0af6 : 850a > sta zpt +0af6 : 850c > sta zpt > set_a $33,0 ;with flags off > load_flag 0 0af8 : a900 > lda #0 ;allow test to change I-flag (no mask) @@ -2802,8 +2820,8 @@ ffff = ram_top = -1 0afb : a933 > lda #$33 ;precharge accu 0afd : 28 > plp > -0afe : 7f0a06 > bbr 7,zpt,fail10441 -0b01 : ff0a06 > bbs 7,zpt,ok10441 +0afe : 7f0c06 > bbr 7,zpt,fail10441 +0b01 : ff0c06 > bbs 7,zpt,ok10441 > trap ;bbs branch not taken 0b04 : 4c040b > jmp * ;failed anyway > @@ -2836,8 +2854,8 @@ ffff = ram_top = -1 0b19 : a9cc > lda #$cc ;precharge accu 0b1b : 28 > plp > -0b1c : 7f0a06 > bbr 7,zpt,fail20441 -0b1f : ff0a06 > bbs 7,zpt,ok20441 +0b1c : 7f0c06 > bbr 7,zpt,fail20441 +0b1f : ff0c06 > bbs 7,zpt,ok20441 > trap ;bbs branch not taken 0b22 : 4c220b > jmp * ;failed anyway > @@ -2862,13 +2880,13 @@ ffff = ram_top = -1 > 0b33 : 28 > plp ;restore status > -0b34 : a50a > lda zpt +0b34 : a50c > lda zpt 0b36 : c980 > cmp #(1<<7) > trap_ne ;zp altered 0b38 : d0fe > bne * ;failed not equal (non zero) > 0b3a : a97f > lda #$ff-(1<<7) ;testing 1 bit off -0b3c : 850a > sta zpt +0b3c : 850c > sta zpt > set_a $33,0 ;with flags off > load_flag 0 0b3e : a900 > lda #0 ;allow test to change I-flag (no mask) @@ -2877,8 +2895,8 @@ ffff = ram_top = -1 0b41 : a933 > lda #$33 ;precharge accu 0b43 : 28 > plp > -0b44 : ff0a06 > bbs 7,zpt,fail30441 -0b47 : 7f0a06 > bbr 7,zpt,ok30441 +0b44 : ff0c06 > bbs 7,zpt,fail30441 +0b47 : 7f0c06 > bbr 7,zpt,ok30441 > trap ;bbr branch not taken 0b4a : 4c4a0b > jmp * ;failed anyway > @@ -2911,8 +2929,8 @@ ffff = ram_top = -1 0b5f : a9cc > lda #$cc ;precharge accu 0b61 : 28 > plp > -0b62 : ff0a06 > bbs 7,zpt,fail40441 -0b65 : 7f0a06 > bbr 7,zpt,ok40441 +0b62 : ff0c06 > bbs 7,zpt,fail40441 +0b65 : 7f0c06 > bbr 7,zpt,ok40441 > trap ;bbr branch not taken 0b68 : 4c680b > jmp * ;failed anyway > @@ -2937,7 +2955,7 @@ ffff = ram_top = -1 > 0b79 : 28 > plp ;restore status > -0b7a : a50a > lda zpt +0b7a : a50c > lda zpt 0b7c : c97f > cmp #$ff-(1<<7) > trap_ne ;zp altered 0b7e : d0fe > bne * ;failed not equal (non zero) @@ -2975,98 +2993,98 @@ ffff = ram_top = -1 endm 0b94 : a900 lda #0 ;combined bit test -0b96 : 850a sta zpt +0b96 : 850c sta zpt 0b98 : a900 bbcl lda #0 bbrc 0 -0b9a : 0f0a02 > bbr 0,zpt,skip0480 +0b9a : 0f0c02 > bbr 0,zpt,skip0480 0b9d : 4901 > eor #(1<<0) 0b9f : >skip0480 bbrc 1 -0b9f : 1f0a02 > bbr 1,zpt,skip0481 +0b9f : 1f0c02 > bbr 1,zpt,skip0481 0ba2 : 4902 > eor #(1<<1) 0ba4 : >skip0481 bbrc 2 -0ba4 : 2f0a02 > bbr 2,zpt,skip0482 +0ba4 : 2f0c02 > bbr 2,zpt,skip0482 0ba7 : 4904 > eor #(1<<2) 0ba9 : >skip0482 bbrc 3 -0ba9 : 3f0a02 > bbr 3,zpt,skip0483 +0ba9 : 3f0c02 > bbr 3,zpt,skip0483 0bac : 4908 > eor #(1<<3) 0bae : >skip0483 bbrc 4 -0bae : 4f0a02 > bbr 4,zpt,skip0484 +0bae : 4f0c02 > bbr 4,zpt,skip0484 0bb1 : 4910 > eor #(1<<4) 0bb3 : >skip0484 bbrc 5 -0bb3 : 5f0a02 > bbr 5,zpt,skip0485 +0bb3 : 5f0c02 > bbr 5,zpt,skip0485 0bb6 : 4920 > eor #(1<<5) 0bb8 : >skip0485 bbrc 6 -0bb8 : 6f0a02 > bbr 6,zpt,skip0486 +0bb8 : 6f0c02 > bbr 6,zpt,skip0486 0bbb : 4940 > eor #(1<<6) 0bbd : >skip0486 bbrc 7 -0bbd : 7f0a02 > bbr 7,zpt,skip0487 +0bbd : 7f0c02 > bbr 7,zpt,skip0487 0bc0 : 4980 > eor #(1<<7) 0bc2 : >skip0487 -0bc2 : 450a eor zpt +0bc2 : 450c eor zpt trap_ne ;failed bbr bitnum in accu 0bc4 : d0fe > bne * ;failed not equal (non zero) 0bc6 : a9ff lda #$ff bbsc 0 -0bc8 : 8f0a02 > bbs 0,zpt,skip0489 +0bc8 : 8f0c02 > bbs 0,zpt,skip0489 0bcb : 4901 > eor #(1<<0) 0bcd : >skip0489 bbsc 1 -0bcd : 9f0a02 > bbs 1,zpt,skip0490 +0bcd : 9f0c02 > bbs 1,zpt,skip0490 0bd0 : 4902 > eor #(1<<1) 0bd2 : >skip0490 bbsc 2 -0bd2 : af0a02 > bbs 2,zpt,skip0491 +0bd2 : af0c02 > bbs 2,zpt,skip0491 0bd5 : 4904 > eor #(1<<2) 0bd7 : >skip0491 bbsc 3 -0bd7 : bf0a02 > bbs 3,zpt,skip0492 +0bd7 : bf0c02 > bbs 3,zpt,skip0492 0bda : 4908 > eor #(1<<3) 0bdc : >skip0492 bbsc 4 -0bdc : cf0a02 > bbs 4,zpt,skip0493 +0bdc : cf0c02 > bbs 4,zpt,skip0493 0bdf : 4910 > eor #(1<<4) 0be1 : >skip0493 bbsc 5 -0be1 : df0a02 > bbs 5,zpt,skip0494 +0be1 : df0c02 > bbs 5,zpt,skip0494 0be4 : 4920 > eor #(1<<5) 0be6 : >skip0494 bbsc 6 -0be6 : ef0a02 > bbs 6,zpt,skip0495 +0be6 : ef0c02 > bbs 6,zpt,skip0495 0be9 : 4940 > eor #(1<<6) 0beb : >skip0495 bbsc 7 -0beb : ff0a02 > bbs 7,zpt,skip0496 +0beb : ff0c02 > bbs 7,zpt,skip0496 0bee : 4980 > eor #(1<<7) 0bf0 : >skip0496 -0bf0 : 450a eor zpt +0bf0 : 450c eor zpt trap_ne ;failed bbs bitnum in accu 0bf2 : d0fe > bne * ;failed not equal (non zero) -0bf4 : e60a inc zpt +0bf4 : e60c inc zpt 0bf6 : d0a0 bne bbcl next_test 0bf8 : ad0202 > lda test_case ;previous test @@ -3116,7 +3134,8 @@ ffff = ram_top = -1 cpx #0 trap_ne ;x changed endm - + + if skip_nop = 0 nop_test $02,2 0c04 : a042 > ldy #$42 0c06 : a202 > ldx #4-2 @@ -6818,14 +6837,15 @@ ffff = ram_top = -1 165d : 8d0202 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test + endif ; jump indirect (test page cross bug is fixed) 1660 : a203 ldx #3 ;prepare table -1662 : bd4026 ji1 lda ji_adr,x +1662 : bd8b26 ji1 lda ji_adr,x 1665 : 9dfd02 sta ji_tab,x 1668 : ca dex 1669 : 10f7 bpl ji1 -166b : a927 lda #hi(ji_px) ;high address if page cross bug +166b : a928 lda #hi(ji_px) ;high address if page cross bug 166d : 8d0002 sta pg_x set_stat 0 > load_flag 0 @@ -6893,7 +6913,7 @@ ffff = ram_top = -1 ; jump indexed indirect 16ac : a20b ldx #11 ;prepare table -16ae : bd7926 jxi1 lda jxi_adr,x +16ae : bdc726 jxi1 lda jxi_adr,x 16b1 : 9df902 sta jxi_tab,x 16b4 : ca dex 16b5 : 10f7 bpl jxi1 @@ -6983,1547 +7003,1624 @@ ffff = ram_top = -1 if ROM_vectors = 1 ; test BRK clears decimal mode -1714 : f8 sed -1715 : 00 brk -1716 : ea nop -1717 : brk_ret + load_flag 0 ;with interrupts enabled if allowed! +1714 : a900 > lda #0 ;allow test to change I-flag (no mask) + +1716 : 48 pha +1717 : a942 lda #'B' +1719 : a252 ldx #'R' +171b : a04b ldy #'K' +171d : 28 plp ;N=0, V=0, Z=0, C=0 +171e : 00 brk +171f : 88 dey ;should not be executed +1720 : brk_ret0 ;address of break return +1720 : 08 php ;either SP or Y count will fail, if we do not hit +1721 : 88 dey +1722 : 88 dey +1723 : 88 dey +1724 : c9e8 cmp #'B'^$aa ;returned registers OK? + ;the IRQ vector was never executed if A & X stay unmodified + trap_ne +1726 : d0fe > bne * ;failed not equal (non zero) + +1728 : e053 cpx #'R'+1 + trap_ne +172a : d0fe > bne * ;failed not equal (non zero) + +172c : c045 cpy #'K'-6 + trap_ne +172e : d0fe > bne * ;failed not equal (non zero) + +1730 : 68 pla ;returned flags OK (unchanged)? + cmp_flag 0 +1731 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits + + trap_ne +1733 : d0fe > bne * ;failed not equal (non zero) + +1735 : ba tsx ;sp? +1736 : e0ff cpx #$ff + trap_ne +1738 : d0fe > bne * ;failed not equal (non zero) + + ;pass 2 + load_flag $ff ;with interrupts disabled if allowed! +173a : a9ff > lda #$ff ;allow test to change I-flag (no mask) + +173c : 48 pha +173d : a9bd lda #$ff-'B' +173f : a2ad ldx #$ff-'R' +1741 : a0b4 ldy #$ff-'K' +1743 : 28 plp ;N=1, V=1, Z=1, C=1 +1744 : 00 brk +1745 : 88 dey ;should not be executed +1746 : brk_ret1 ;address of break return +1746 : 08 php ;either SP or Y count will fail, if we do not hit +1747 : 88 dey +1748 : 88 dey +1749 : 88 dey +174a : c917 cmp #($ff-'B')^$aa ;returned registers OK? + ;the IRQ vector was never executed if A & X stay unmodified + trap_ne +174c : d0fe > bne * ;failed not equal (non zero) + +174e : e0ae cpx #$ff-'R'+1 + trap_ne +1750 : d0fe > bne * ;failed not equal (non zero) + +1752 : c0ae cpy #$ff-'K'-6 + trap_ne +1754 : d0fe > bne * ;failed not equal (non zero) + +1756 : 68 pla ;returned flags OK (unchanged)? + cmp_flag $ff +1757 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits + + trap_ne +1759 : d0fe > bne * ;failed not equal (non zero) + +175b : ba tsx ;sp? +175c : e0ff cpx #$ff + trap_ne +175e : d0fe > bne * ;failed not equal (non zero) + next_test -1717 : ad0202 > lda test_case ;previous test -171a : c90b > cmp #test_num +1760 : ad0202 > lda test_case ;previous test +1763 : c90b > cmp #test_num > trap_ne ;test is out of sequence -171c : d0fe > bne * ;failed not equal (non zero) +1765 : d0fe > bne * ;failed not equal (non zero) > 000c = >test_num = test_num + 1 -171e : a90c > lda #test_num ;*** next tests' number -1720 : 8d0202 > sta test_case +1767 : a90c > lda #test_num ;*** next tests' number +1769 : 8d0202 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test endif ; testing accumulator increment/decrement INC A & DEC A -1723 : a2ac ldx #$ac ;protect x & y -1725 : a0dc ldy #$dc +176c : a2ac ldx #$ac ;protect x & y +176e : a0dc ldy #$dc set_a $fe,$ff > load_flag $ff -1727 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1770 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1729 : 48 > pha ;use stack to load status -172a : a9fe > lda #$fe ;precharge accu -172c : 28 > plp +1772 : 48 > pha ;use stack to load status +1773 : a9fe > lda #$fe ;precharge accu +1775 : 28 > plp -172d : 1a inc a ;ff +1776 : 1a inc a ;ff tst_as $ff,$ff-zero -172e : 48 > pha -172f : 08 > php ;save flags -1730 : c9ff > cmp #$ff ;test result +1777 : 48 > pha +1778 : 08 > php ;save flags +1779 : c9ff > cmp #$ff ;test result > trap_ne -1732 : d0fe > bne * ;failed not equal (non zero) +177b : d0fe > bne * ;failed not equal (non zero) > -1734 : 68 > pla ;load status -1735 : 48 > pha +177d : 68 > pla ;load status +177e : 48 > pha > cmp_flag $ff-zero -1736 : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits +177f : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits > > trap_ne -1738 : d0fe > bne * ;failed not equal (non zero) +1781 : d0fe > bne * ;failed not equal (non zero) > -173a : 28 > plp ;restore status -173b : 68 > pla +1783 : 28 > plp ;restore status +1784 : 68 > pla -173c : 1a inc a ;00 +1785 : 1a inc a ;00 tst_as 0,$ff-minus -173d : 48 > pha -173e : 08 > php ;save flags -173f : c900 > cmp #0 ;test result - > trap_ne -1741 : d0fe > bne * ;failed not equal (non zero) - > -1743 : 68 > pla ;load status -1744 : 48 > pha - > cmp_flag $ff-minus -1745 : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1747 : d0fe > bne * ;failed not equal (non zero) - > -1749 : 28 > plp ;restore status -174a : 68 > pla - -174b : 1a inc a ;01 - tst_as 1,$ff-minus-zero -174c : 48 > pha -174d : 08 > php ;save flags -174e : c901 > cmp #1 ;test result - > trap_ne -1750 : d0fe > bne * ;failed not equal (non zero) - > -1752 : 68 > pla ;load status -1753 : 48 > pha - > cmp_flag $ff-minus-zero -1754 : c97d > cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1756 : d0fe > bne * ;failed not equal (non zero) - > -1758 : 28 > plp ;restore status -1759 : 68 > pla - -175a : 3a dec a ;00 - tst_as 0,$ff-minus -175b : 48 > pha -175c : 08 > php ;save flags -175d : c900 > cmp #0 ;test result - > trap_ne -175f : d0fe > bne * ;failed not equal (non zero) - > -1761 : 68 > pla ;load status -1762 : 48 > pha - > cmp_flag $ff-minus -1763 : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1765 : d0fe > bne * ;failed not equal (non zero) - > -1767 : 28 > plp ;restore status -1768 : 68 > pla - -1769 : 3a dec a ;ff - tst_as $ff,$ff-zero -176a : 48 > pha -176b : 08 > php ;save flags -176c : c9ff > cmp #$ff ;test result - > trap_ne -176e : d0fe > bne * ;failed not equal (non zero) - > -1770 : 68 > pla ;load status -1771 : 48 > pha - > cmp_flag $ff-zero -1772 : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1774 : d0fe > bne * ;failed not equal (non zero) - > -1776 : 28 > plp ;restore status -1777 : 68 > pla - -1778 : 3a dec a ;fe - set_a $fe,0 - > load_flag 0 -1779 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -177b : 48 > pha ;use stack to load status -177c : a9fe > lda #$fe ;precharge accu -177e : 28 > plp - -177f : 1a inc a ;ff - tst_as $ff,minus -1780 : 48 > pha -1781 : 08 > php ;save flags -1782 : c9ff > cmp #$ff ;test result - > trap_ne -1784 : d0fe > bne * ;failed not equal (non zero) - > -1786 : 68 > pla ;load status -1787 : 48 > pha - > cmp_flag minus -1788 : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits - > +1786 : 48 > pha +1787 : 08 > php ;save flags +1788 : c900 > cmp #0 ;test result > trap_ne 178a : d0fe > bne * ;failed not equal (non zero) > -178c : 28 > plp ;restore status -178d : 68 > pla - -178e : 1a inc a ;00 - tst_as 0,zero -178f : 48 > pha -1790 : 08 > php ;save flags -1791 : c900 > cmp #0 ;test result +178c : 68 > pla ;load status +178d : 48 > pha + > cmp_flag $ff-minus +178e : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits + > > trap_ne -1793 : d0fe > bne * ;failed not equal (non zero) - > -1795 : 68 > pla ;load status -1796 : 48 > pha - > cmp_flag zero -1797 : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits +1790 : d0fe > bne * ;failed not equal (non zero) > +1792 : 28 > plp ;restore status +1793 : 68 > pla + +1794 : 1a inc a ;01 + tst_as 1,$ff-minus-zero +1795 : 48 > pha +1796 : 08 > php ;save flags +1797 : c901 > cmp #1 ;test result > trap_ne 1799 : d0fe > bne * ;failed not equal (non zero) > -179b : 28 > plp ;restore status -179c : 68 > pla - -179d : 1a inc a ;01 - tst_as 1,0 -179e : 48 > pha -179f : 08 > php ;save flags -17a0 : c901 > cmp #1 ;test result +179b : 68 > pla ;load status +179c : 48 > pha + > cmp_flag $ff-minus-zero +179d : c97d > cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits + > > trap_ne -17a2 : d0fe > bne * ;failed not equal (non zero) - > -17a4 : 68 > pla ;load status -17a5 : 48 > pha - > cmp_flag 0 -17a6 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +179f : d0fe > bne * ;failed not equal (non zero) > +17a1 : 28 > plp ;restore status +17a2 : 68 > pla + +17a3 : 3a dec a ;00 + tst_as 0,$ff-minus +17a4 : 48 > pha +17a5 : 08 > php ;save flags +17a6 : c900 > cmp #0 ;test result > trap_ne 17a8 : d0fe > bne * ;failed not equal (non zero) > -17aa : 28 > plp ;restore status -17ab : 68 > pla - -17ac : 3a dec a ;00 - tst_as 0,zero -17ad : 48 > pha -17ae : 08 > php ;save flags -17af : c900 > cmp #0 ;test result +17aa : 68 > pla ;load status +17ab : 48 > pha + > cmp_flag $ff-minus +17ac : c97f > cmp #($ff-minus|fao)&m8 ;expected flags + always on bits + > > trap_ne -17b1 : d0fe > bne * ;failed not equal (non zero) - > -17b3 : 68 > pla ;load status -17b4 : 48 > pha - > cmp_flag zero -17b5 : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits +17ae : d0fe > bne * ;failed not equal (non zero) > +17b0 : 28 > plp ;restore status +17b1 : 68 > pla + +17b2 : 3a dec a ;ff + tst_as $ff,$ff-zero +17b3 : 48 > pha +17b4 : 08 > php ;save flags +17b5 : c9ff > cmp #$ff ;test result > trap_ne 17b7 : d0fe > bne * ;failed not equal (non zero) > -17b9 : 28 > plp ;restore status -17ba : 68 > pla +17b9 : 68 > pla ;load status +17ba : 48 > pha + > cmp_flag $ff-zero +17bb : c9fd > cmp #($ff-zero|fao)&m8 ;expected flags + always on bits + > + > trap_ne +17bd : d0fe > bne * ;failed not equal (non zero) + > +17bf : 28 > plp ;restore status +17c0 : 68 > pla -17bb : 3a dec a ;ff +17c1 : 3a dec a ;fe + set_a $fe,0 + > load_flag 0 +17c2 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +17c4 : 48 > pha ;use stack to load status +17c5 : a9fe > lda #$fe ;precharge accu +17c7 : 28 > plp + +17c8 : 1a inc a ;ff tst_as $ff,minus -17bc : 48 > pha -17bd : 08 > php ;save flags -17be : c9ff > cmp #$ff ;test result +17c9 : 48 > pha +17ca : 08 > php ;save flags +17cb : c9ff > cmp #$ff ;test result > trap_ne -17c0 : d0fe > bne * ;failed not equal (non zero) +17cd : d0fe > bne * ;failed not equal (non zero) > -17c2 : 68 > pla ;load status -17c3 : 48 > pha +17cf : 68 > pla ;load status +17d0 : 48 > pha > cmp_flag minus -17c4 : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits +17d1 : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits > > trap_ne -17c6 : d0fe > bne * ;failed not equal (non zero) +17d3 : d0fe > bne * ;failed not equal (non zero) > -17c8 : 28 > plp ;restore status -17c9 : 68 > pla +17d5 : 28 > plp ;restore status +17d6 : 68 > pla -17ca : e0ac cpx #$ac - trap_ne ;x altered during test -17cc : d0fe > bne * ;failed not equal (non zero) - -17ce : c0dc cpy #$dc - trap_ne ;y altered during test -17d0 : d0fe > bne * ;failed not equal (non zero) - -17d2 : ba tsx -17d3 : e0ff cpx #$ff - trap_ne ;sp push/pop mismatch -17d5 : d0fe > bne * ;failed not equal (non zero) - - next_test -17d7 : ad0202 > lda test_case ;previous test -17da : c90c > cmp #test_num - > trap_ne ;test is out of sequence +17d7 : 1a inc a ;00 + tst_as 0,zero +17d8 : 48 > pha +17d9 : 08 > php ;save flags +17da : c900 > cmp #0 ;test result + > trap_ne 17dc : d0fe > bne * ;failed not equal (non zero) > +17de : 68 > pla ;load status +17df : 48 > pha + > cmp_flag zero +17e0 : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits + > + > trap_ne +17e2 : d0fe > bne * ;failed not equal (non zero) + > +17e4 : 28 > plp ;restore status +17e5 : 68 > pla + +17e6 : 1a inc a ;01 + tst_as 1,0 +17e7 : 48 > pha +17e8 : 08 > php ;save flags +17e9 : c901 > cmp #1 ;test result + > trap_ne +17eb : d0fe > bne * ;failed not equal (non zero) + > +17ed : 68 > pla ;load status +17ee : 48 > pha + > cmp_flag 0 +17ef : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits + > + > trap_ne +17f1 : d0fe > bne * ;failed not equal (non zero) + > +17f3 : 28 > plp ;restore status +17f4 : 68 > pla + +17f5 : 3a dec a ;00 + tst_as 0,zero +17f6 : 48 > pha +17f7 : 08 > php ;save flags +17f8 : c900 > cmp #0 ;test result + > trap_ne +17fa : d0fe > bne * ;failed not equal (non zero) + > +17fc : 68 > pla ;load status +17fd : 48 > pha + > cmp_flag zero +17fe : c932 > cmp #(zero|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1800 : d0fe > bne * ;failed not equal (non zero) + > +1802 : 28 > plp ;restore status +1803 : 68 > pla + +1804 : 3a dec a ;ff + tst_as $ff,minus +1805 : 48 > pha +1806 : 08 > php ;save flags +1807 : c9ff > cmp #$ff ;test result + > trap_ne +1809 : d0fe > bne * ;failed not equal (non zero) + > +180b : 68 > pla ;load status +180c : 48 > pha + > cmp_flag minus +180d : c9b0 > cmp #(minus|fao)&m8 ;expected flags + always on bits + > + > trap_ne +180f : d0fe > bne * ;failed not equal (non zero) + > +1811 : 28 > plp ;restore status +1812 : 68 > pla + +1813 : e0ac cpx #$ac + trap_ne ;x altered during test +1815 : d0fe > bne * ;failed not equal (non zero) + +1817 : c0dc cpy #$dc + trap_ne ;y altered during test +1819 : d0fe > bne * ;failed not equal (non zero) + +181b : ba tsx +181c : e0ff cpx #$ff + trap_ne ;sp push/pop mismatch +181e : d0fe > bne * ;failed not equal (non zero) + + next_test +1820 : ad0202 > lda test_case ;previous test +1823 : c90c > cmp #test_num + > trap_ne ;test is out of sequence +1825 : d0fe > bne * ;failed not equal (non zero) + > 000d = >test_num = test_num + 1 -17de : a90d > lda #test_num ;*** next tests' number -17e0 : 8d0202 > sta test_case +1827 : a90d > lda #test_num ;*** next tests' number +1829 : 8d0202 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; testing load / store accumulator LDA / STA (zp) -17e3 : a299 ldx #$99 ;protect x & y -17e5 : a066 ldy #$66 +182c : a299 ldx #$99 ;protect x & y +182e : a066 ldy #$66 set_stat 0 > load_flag 0 -17e7 : a900 > lda #0 ;allow test to change I-flag (no mask) +1830 : a900 > lda #0 ;allow test to change I-flag (no mask) > -17e9 : 48 > pha ;use stack to load status -17ea : 28 > plp +1832 : 48 > pha ;use stack to load status +1833 : 28 > plp -17eb : b222 lda (ind1) -17ed : 08 php ;test stores do not alter flags -17ee : 49c3 eor #$c3 -17f0 : 28 plp -17f1 : 922e sta (indt) -17f3 : 08 php ;flags after load/store sequence -17f4 : 49c3 eor #$c3 -17f6 : c9c3 cmp #$c3 ;test result +1834 : b224 lda (ind1) +1836 : 08 php ;test stores do not alter flags +1837 : 49c3 eor #$c3 +1839 : 28 plp +183a : 9230 sta (indt) +183c : 08 php ;flags after load/store sequence +183d : 49c3 eor #$c3 +183f : c9c3 cmp #$c3 ;test result trap_ne -17f8 : d0fe > bne * ;failed not equal (non zero) +1841 : d0fe > bne * ;failed not equal (non zero) -17fa : 68 pla ;load status +1843 : 68 pla ;load status eor_flag 0 -17fb : 4930 > eor #0|fao ;invert expected flags + always on bits +1844 : 4930 > eor #0|fao ;invert expected flags + always on bits -17fd : cd0f02 cmp fLDx ;test flags - trap_ne -1800 : d0fe > bne * ;failed not equal (non zero) - - set_stat 0 - > load_flag 0 -1802 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -1804 : 48 > pha ;use stack to load status -1805 : 28 > plp - -1806 : b224 lda (ind1+2) -1808 : 08 php ;test stores do not alter flags -1809 : 49c3 eor #$c3 -180b : 28 plp -180c : 9230 sta (indt+2) -180e : 08 php ;flags after load/store sequence -180f : 49c3 eor #$c3 -1811 : c982 cmp #$82 ;test result - trap_ne -1813 : d0fe > bne * ;failed not equal (non zero) - -1815 : 68 pla ;load status - eor_flag 0 -1816 : 4930 > eor #0|fao ;invert expected flags + always on bits - -1818 : cd1002 cmp fLDx+1 ;test flags - trap_ne -181b : d0fe > bne * ;failed not equal (non zero) - - set_stat 0 - > load_flag 0 -181d : a900 > lda #0 ;allow test to change I-flag (no mask) - > -181f : 48 > pha ;use stack to load status -1820 : 28 > plp - -1821 : b226 lda (ind1+4) -1823 : 08 php ;test stores do not alter flags -1824 : 49c3 eor #$c3 -1826 : 28 plp -1827 : 9232 sta (indt+4) -1829 : 08 php ;flags after load/store sequence -182a : 49c3 eor #$c3 -182c : c941 cmp #$41 ;test result - trap_ne -182e : d0fe > bne * ;failed not equal (non zero) - -1830 : 68 pla ;load status - eor_flag 0 -1831 : 4930 > eor #0|fao ;invert expected flags + always on bits - -1833 : cd1102 cmp fLDx+2 ;test flags - trap_ne -1836 : d0fe > bne * ;failed not equal (non zero) - - set_stat 0 - > load_flag 0 -1838 : a900 > lda #0 ;allow test to change I-flag (no mask) - > -183a : 48 > pha ;use stack to load status -183b : 28 > plp - -183c : b228 lda (ind1+6) -183e : 08 php ;test stores do not alter flags -183f : 49c3 eor #$c3 -1841 : 28 plp -1842 : 9234 sta (indt+6) -1844 : 08 php ;flags after load/store sequence -1845 : 49c3 eor #$c3 -1847 : c900 cmp #0 ;test result +1846 : cd1502 cmp fLDx ;test flags trap_ne 1849 : d0fe > bne * ;failed not equal (non zero) -184b : 68 pla ;load status - eor_flag 0 -184c : 4930 > eor #0|fao ;invert expected flags + always on bits + set_stat 0 + > load_flag 0 +184b : a900 > lda #0 ;allow test to change I-flag (no mask) + > +184d : 48 > pha ;use stack to load status +184e : 28 > plp -184e : cd1202 cmp fLDx+3 ;test flags +184f : b226 lda (ind1+2) +1851 : 08 php ;test stores do not alter flags +1852 : 49c3 eor #$c3 +1854 : 28 plp +1855 : 9232 sta (indt+2) +1857 : 08 php ;flags after load/store sequence +1858 : 49c3 eor #$c3 +185a : c982 cmp #$82 ;test result trap_ne -1851 : d0fe > bne * ;failed not equal (non zero) +185c : d0fe > bne * ;failed not equal (non zero) -1853 : e099 cpx #$99 +185e : 68 pla ;load status + eor_flag 0 +185f : 4930 > eor #0|fao ;invert expected flags + always on bits + +1861 : cd1602 cmp fLDx+1 ;test flags + trap_ne +1864 : d0fe > bne * ;failed not equal (non zero) + + set_stat 0 + > load_flag 0 +1866 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +1868 : 48 > pha ;use stack to load status +1869 : 28 > plp + +186a : b228 lda (ind1+4) +186c : 08 php ;test stores do not alter flags +186d : 49c3 eor #$c3 +186f : 28 plp +1870 : 9234 sta (indt+4) +1872 : 08 php ;flags after load/store sequence +1873 : 49c3 eor #$c3 +1875 : c941 cmp #$41 ;test result + trap_ne +1877 : d0fe > bne * ;failed not equal (non zero) + +1879 : 68 pla ;load status + eor_flag 0 +187a : 4930 > eor #0|fao ;invert expected flags + always on bits + +187c : cd1702 cmp fLDx+2 ;test flags + trap_ne +187f : d0fe > bne * ;failed not equal (non zero) + + set_stat 0 + > load_flag 0 +1881 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +1883 : 48 > pha ;use stack to load status +1884 : 28 > plp + +1885 : b22a lda (ind1+6) +1887 : 08 php ;test stores do not alter flags +1888 : 49c3 eor #$c3 +188a : 28 plp +188b : 9236 sta (indt+6) +188d : 08 php ;flags after load/store sequence +188e : 49c3 eor #$c3 +1890 : c900 cmp #0 ;test result + trap_ne +1892 : d0fe > bne * ;failed not equal (non zero) + +1894 : 68 pla ;load status + eor_flag 0 +1895 : 4930 > eor #0|fao ;invert expected flags + always on bits + +1897 : cd1802 cmp fLDx+3 ;test flags + trap_ne +189a : d0fe > bne * ;failed not equal (non zero) + +189c : e099 cpx #$99 trap_ne ;x altered during test -1855 : d0fe > bne * ;failed not equal (non zero) +189e : d0fe > bne * ;failed not equal (non zero) -1857 : c066 cpy #$66 +18a0 : c066 cpy #$66 trap_ne ;y altered during test -1859 : d0fe > bne * ;failed not equal (non zero) +18a2 : d0fe > bne * ;failed not equal (non zero) -185b : a003 ldy #3 ;testing store result -185d : a200 ldx #0 -185f : b90502 tstai1 lda abst,y -1862 : 49c3 eor #$c3 -1864 : d90a02 cmp abs1,y +18a4 : a003 ldy #3 ;testing store result +18a6 : a200 ldx #0 +18a8 : b90502 tstai1 lda abst,y +18ab : 49c3 eor #$c3 +18ad : d91002 cmp abs1,y trap_ne ;store to indirect data -1867 : d0fe > bne * ;failed not equal (non zero) +18b0 : d0fe > bne * ;failed not equal (non zero) -1869 : 8a txa -186a : 990502 sta abst,y ;clear -186d : 88 dey -186e : 10ef bpl tstai1 +18b2 : 8a txa +18b3 : 990502 sta abst,y ;clear +18b6 : 88 dey +18b7 : 10ef bpl tstai1 -1870 : a299 ldx #$99 ;protect x & y -1872 : a066 ldy #$66 +18b9 : a299 ldx #$99 ;protect x & y +18bb : a066 ldy #$66 set_stat $ff > load_flag $ff -1874 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +18bd : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1876 : 48 > pha ;use stack to load status -1877 : 28 > plp +18bf : 48 > pha ;use stack to load status +18c0 : 28 > plp -1878 : b222 lda (ind1) -187a : 08 php ;test stores do not alter flags -187b : 49c3 eor #$c3 -187d : 28 plp -187e : 922e sta (indt) -1880 : 08 php ;flags after load/store sequence -1881 : 49c3 eor #$c3 -1883 : c9c3 cmp #$c3 ;test result +18c1 : b224 lda (ind1) +18c3 : 08 php ;test stores do not alter flags +18c4 : 49c3 eor #$c3 +18c6 : 28 plp +18c7 : 9230 sta (indt) +18c9 : 08 php ;flags after load/store sequence +18ca : 49c3 eor #$c3 +18cc : c9c3 cmp #$c3 ;test result trap_ne -1885 : d0fe > bne * ;failed not equal (non zero) +18ce : d0fe > bne * ;failed not equal (non zero) -1887 : 68 pla ;load status +18d0 : 68 pla ;load status eor_flag lo~fnz ;mask bits not altered -1888 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits +18d1 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits -188a : cd0f02 cmp fLDx ;test flags - trap_ne -188d : d0fe > bne * ;failed not equal (non zero) - - set_stat $ff - > load_flag $ff -188f : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -1891 : 48 > pha ;use stack to load status -1892 : 28 > plp - -1893 : b224 lda (ind1+2) -1895 : 08 php ;test stores do not alter flags -1896 : 49c3 eor #$c3 -1898 : 28 plp -1899 : 9230 sta (indt+2) -189b : 08 php ;flags after load/store sequence -189c : 49c3 eor #$c3 -189e : c982 cmp #$82 ;test result - trap_ne -18a0 : d0fe > bne * ;failed not equal (non zero) - -18a2 : 68 pla ;load status - eor_flag lo~fnz ;mask bits not altered -18a3 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits - -18a5 : cd1002 cmp fLDx+1 ;test flags - trap_ne -18a8 : d0fe > bne * ;failed not equal (non zero) - - set_stat $ff - > load_flag $ff -18aa : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -18ac : 48 > pha ;use stack to load status -18ad : 28 > plp - -18ae : b226 lda (ind1+4) -18b0 : 08 php ;test stores do not alter flags -18b1 : 49c3 eor #$c3 -18b3 : 28 plp -18b4 : 9232 sta (indt+4) -18b6 : 08 php ;flags after load/store sequence -18b7 : 49c3 eor #$c3 -18b9 : c941 cmp #$41 ;test result - trap_ne -18bb : d0fe > bne * ;failed not equal (non zero) - -18bd : 68 pla ;load status - eor_flag lo~fnz ;mask bits not altered -18be : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits - -18c0 : cd1102 cmp fLDx+2 ;test flags - trap_ne -18c3 : d0fe > bne * ;failed not equal (non zero) - - set_stat $ff - > load_flag $ff -18c5 : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -18c7 : 48 > pha ;use stack to load status -18c8 : 28 > plp - -18c9 : b228 lda (ind1+6) -18cb : 08 php ;test stores do not alter flags -18cc : 49c3 eor #$c3 -18ce : 28 plp -18cf : 9234 sta (indt+6) -18d1 : 08 php ;flags after load/store sequence -18d2 : 49c3 eor #$c3 -18d4 : c900 cmp #0 ;test result +18d3 : cd1502 cmp fLDx ;test flags trap_ne 18d6 : d0fe > bne * ;failed not equal (non zero) -18d8 : 68 pla ;load status - eor_flag lo~fnz ;mask bits not altered -18d9 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits + set_stat $ff + > load_flag $ff +18d8 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +18da : 48 > pha ;use stack to load status +18db : 28 > plp -18db : cd1202 cmp fLDx+3 ;test flags +18dc : b226 lda (ind1+2) +18de : 08 php ;test stores do not alter flags +18df : 49c3 eor #$c3 +18e1 : 28 plp +18e2 : 9232 sta (indt+2) +18e4 : 08 php ;flags after load/store sequence +18e5 : 49c3 eor #$c3 +18e7 : c982 cmp #$82 ;test result trap_ne -18de : d0fe > bne * ;failed not equal (non zero) +18e9 : d0fe > bne * ;failed not equal (non zero) -18e0 : e099 cpx #$99 +18eb : 68 pla ;load status + eor_flag lo~fnz ;mask bits not altered +18ec : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits + +18ee : cd1602 cmp fLDx+1 ;test flags + trap_ne +18f1 : d0fe > bne * ;failed not equal (non zero) + + set_stat $ff + > load_flag $ff +18f3 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +18f5 : 48 > pha ;use stack to load status +18f6 : 28 > plp + +18f7 : b228 lda (ind1+4) +18f9 : 08 php ;test stores do not alter flags +18fa : 49c3 eor #$c3 +18fc : 28 plp +18fd : 9234 sta (indt+4) +18ff : 08 php ;flags after load/store sequence +1900 : 49c3 eor #$c3 +1902 : c941 cmp #$41 ;test result + trap_ne +1904 : d0fe > bne * ;failed not equal (non zero) + +1906 : 68 pla ;load status + eor_flag lo~fnz ;mask bits not altered +1907 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits + +1909 : cd1702 cmp fLDx+2 ;test flags + trap_ne +190c : d0fe > bne * ;failed not equal (non zero) + + set_stat $ff + > load_flag $ff +190e : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +1910 : 48 > pha ;use stack to load status +1911 : 28 > plp + +1912 : b22a lda (ind1+6) +1914 : 08 php ;test stores do not alter flags +1915 : 49c3 eor #$c3 +1917 : 28 plp +1918 : 9236 sta (indt+6) +191a : 08 php ;flags after load/store sequence +191b : 49c3 eor #$c3 +191d : c900 cmp #0 ;test result + trap_ne +191f : d0fe > bne * ;failed not equal (non zero) + +1921 : 68 pla ;load status + eor_flag lo~fnz ;mask bits not altered +1922 : 497d > eor #lo~fnz |fao ;invert expected flags + always on bits + +1924 : cd1802 cmp fLDx+3 ;test flags + trap_ne +1927 : d0fe > bne * ;failed not equal (non zero) + +1929 : e099 cpx #$99 trap_ne ;x altered during test -18e2 : d0fe > bne * ;failed not equal (non zero) +192b : d0fe > bne * ;failed not equal (non zero) -18e4 : c066 cpy #$66 +192d : c066 cpy #$66 trap_ne ;y altered during test -18e6 : d0fe > bne * ;failed not equal (non zero) +192f : d0fe > bne * ;failed not equal (non zero) -18e8 : a003 ldy #3 ;testing store result -18ea : a200 ldx #0 -18ec : b90502 tstai2 lda abst,y -18ef : 49c3 eor #$c3 -18f1 : d90a02 cmp abs1,y +1931 : a003 ldy #3 ;testing store result +1933 : a200 ldx #0 +1935 : b90502 tstai2 lda abst,y +1938 : 49c3 eor #$c3 +193a : d91002 cmp abs1,y trap_ne ;store to indirect data -18f4 : d0fe > bne * ;failed not equal (non zero) +193d : d0fe > bne * ;failed not equal (non zero) -18f6 : 8a txa -18f7 : 990502 sta abst,y ;clear -18fa : 88 dey -18fb : 10ef bpl tstai2 -18fd : ba tsx -18fe : e0ff cpx #$ff +193f : 8a txa +1940 : 990502 sta abst,y ;clear +1943 : 88 dey +1944 : 10ef bpl tstai2 +1946 : ba tsx +1947 : e0ff cpx #$ff trap_ne ;sp push/pop mismatch -1900 : d0fe > bne * ;failed not equal (non zero) +1949 : d0fe > bne * ;failed not equal (non zero) next_test -1902 : ad0202 > lda test_case ;previous test -1905 : c90d > cmp #test_num +194b : ad0202 > lda test_case ;previous test +194e : c90d > cmp #test_num > trap_ne ;test is out of sequence -1907 : d0fe > bne * ;failed not equal (non zero) +1950 : d0fe > bne * ;failed not equal (non zero) > 000e = >test_num = test_num + 1 -1909 : a90e > lda #test_num ;*** next tests' number -190b : 8d0202 > sta test_case +1952 : a90e > lda #test_num ;*** next tests' number +1954 : 8d0202 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; testing STZ - zp / abs / zp,x / abs,x -190e : a07b ldy #123 ;protect y -1910 : a204 ldx #4 ;precharge test area -1912 : a907 lda #7 -1914 : 950a tstz1 sta zpt,x -1916 : 0a asl a -1917 : ca dex -1918 : 10fa bpl tstz1 -191a : a204 ldx #4 +1957 : a07b ldy #123 ;protect y +1959 : a204 ldx #4 ;precharge test area +195b : a907 lda #7 +195d : 950c tstz1 sta zpt,x +195f : 0a asl a +1960 : ca dex +1961 : 10fa bpl tstz1 +1963 : a204 ldx #4 set_a $55,$ff > load_flag $ff -191c : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1965 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -191e : 48 > pha ;use stack to load status -191f : a955 > lda #$55 ;precharge accu -1921 : 28 > plp +1967 : 48 > pha ;use stack to load status +1968 : a955 > lda #$55 ;precharge accu +196a : 28 > plp -1922 : 640a stz zpt -1924 : 640b stz zpt+1 -1926 : 640c stz zpt+2 -1928 : 640d stz zpt+3 -192a : 640e stz zpt+4 +196b : 640c stz zpt +196d : 640d stz zpt+1 +196f : 640e stz zpt+2 +1971 : 640f stz zpt+3 +1973 : 6410 stz zpt+4 tst_a $55,$ff -192c : 08 > php ;save flags -192d : c955 > cmp #$55 ;test result +1975 : 08 > php ;save flags +1976 : c955 > cmp #$55 ;test result > trap_ne -192f : d0fe > bne * ;failed not equal (non zero) +1978 : d0fe > bne * ;failed not equal (non zero) > -1931 : 68 > pla ;load status -1932 : 48 > pha +197a : 68 > pla ;load status +197b : 48 > pha > cmp_flag $ff -1933 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +197c : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -1935 : d0fe > bne * ;failed not equal (non zero) +197e : d0fe > bne * ;failed not equal (non zero) > -1937 : 28 > plp ;restore status +1980 : 28 > plp ;restore status -1938 : b50a tstz2 lda zpt,x ;verify zeros stored +1981 : b50c tstz2 lda zpt,x ;verify zeros stored trap_ne ;non zero after STZ zp -193a : d0fe > bne * ;failed not equal (non zero) +1983 : d0fe > bne * ;failed not equal (non zero) -193c : ca dex -193d : 10f9 bpl tstz2 -193f : a204 ldx #4 ;precharge test area -1941 : a907 lda #7 -1943 : 950a tstz3 sta zpt,x -1945 : 0a asl a -1946 : ca dex -1947 : 10fa bpl tstz3 -1949 : a204 ldx #4 +1985 : ca dex +1986 : 10f9 bpl tstz2 +1988 : a204 ldx #4 ;precharge test area +198a : a907 lda #7 +198c : 950c tstz3 sta zpt,x +198e : 0a asl a +198f : ca dex +1990 : 10fa bpl tstz3 +1992 : a204 ldx #4 set_a $aa,0 > load_flag 0 -194b : a900 > lda #0 ;allow test to change I-flag (no mask) +1994 : a900 > lda #0 ;allow test to change I-flag (no mask) > -194d : 48 > pha ;use stack to load status -194e : a9aa > lda #$aa ;precharge accu -1950 : 28 > plp +1996 : 48 > pha ;use stack to load status +1997 : a9aa > lda #$aa ;precharge accu +1999 : 28 > plp -1951 : 640a stz zpt -1953 : 640b stz zpt+1 -1955 : 640c stz zpt+2 -1957 : 640d stz zpt+3 -1959 : 640e stz zpt+4 +199a : 640c stz zpt +199c : 640d stz zpt+1 +199e : 640e stz zpt+2 +19a0 : 640f stz zpt+3 +19a2 : 6410 stz zpt+4 tst_a $aa,0 -195b : 08 > php ;save flags -195c : c9aa > cmp #$aa ;test result +19a4 : 08 > php ;save flags +19a5 : c9aa > cmp #$aa ;test result > trap_ne -195e : d0fe > bne * ;failed not equal (non zero) +19a7 : d0fe > bne * ;failed not equal (non zero) > -1960 : 68 > pla ;load status -1961 : 48 > pha +19a9 : 68 > pla ;load status +19aa : 48 > pha > cmp_flag 0 -1962 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +19ab : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -1964 : d0fe > bne * ;failed not equal (non zero) +19ad : d0fe > bne * ;failed not equal (non zero) > -1966 : 28 > plp ;restore status +19af : 28 > plp ;restore status -1967 : b50a tstz4 lda zpt,x ;verify zeros stored +19b0 : b50c tstz4 lda zpt,x ;verify zeros stored trap_ne ;non zero after STZ zp -1969 : d0fe > bne * ;failed not equal (non zero) +19b2 : d0fe > bne * ;failed not equal (non zero) -196b : ca dex -196c : 10f9 bpl tstz4 +19b4 : ca dex +19b5 : 10f9 bpl tstz4 -196e : a204 ldx #4 ;precharge test area -1970 : a907 lda #7 -1972 : 9d0502 tstz5 sta abst,x -1975 : 0a asl a -1976 : ca dex -1977 : 10f9 bpl tstz5 -1979 : a204 ldx #4 +19b7 : a204 ldx #4 ;precharge test area +19b9 : a907 lda #7 +19bb : 9d0502 tstz5 sta abst,x +19be : 0a asl a +19bf : ca dex +19c0 : 10f9 bpl tstz5 +19c2 : a204 ldx #4 set_a $55,$ff > load_flag $ff -197b : a9ff > lda #$ff ;allow test to change I-flag (no mask) +19c4 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -197d : 48 > pha ;use stack to load status -197e : a955 > lda #$55 ;precharge accu -1980 : 28 > plp +19c6 : 48 > pha ;use stack to load status +19c7 : a955 > lda #$55 ;precharge accu +19c9 : 28 > plp -1981 : 9c0502 stz abst -1984 : 9c0602 stz abst+1 -1987 : 9c0702 stz abst+2 -198a : 9c0802 stz abst+3 -198d : 9c0902 stz abst+4 +19ca : 9c0502 stz abst +19cd : 9c0602 stz abst+1 +19d0 : 9c0702 stz abst+2 +19d3 : 9c0802 stz abst+3 +19d6 : 9c0902 stz abst+4 tst_a $55,$ff -1990 : 08 > php ;save flags -1991 : c955 > cmp #$55 ;test result +19d9 : 08 > php ;save flags +19da : c955 > cmp #$55 ;test result > trap_ne -1993 : d0fe > bne * ;failed not equal (non zero) +19dc : d0fe > bne * ;failed not equal (non zero) > -1995 : 68 > pla ;load status -1996 : 48 > pha +19de : 68 > pla ;load status +19df : 48 > pha > cmp_flag $ff -1997 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +19e0 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -1999 : d0fe > bne * ;failed not equal (non zero) +19e2 : d0fe > bne * ;failed not equal (non zero) > -199b : 28 > plp ;restore status +19e4 : 28 > plp ;restore status -199c : bd0502 tstz6 lda abst,x ;verify zeros stored +19e5 : bd0502 tstz6 lda abst,x ;verify zeros stored trap_ne ;non zero after STZ abs -199f : d0fe > bne * ;failed not equal (non zero) +19e8 : d0fe > bne * ;failed not equal (non zero) -19a1 : ca dex -19a2 : 10f8 bpl tstz6 -19a4 : a204 ldx #4 ;precharge test area -19a6 : a907 lda #7 -19a8 : 9d0502 tstz7 sta abst,x -19ab : 0a asl a -19ac : ca dex -19ad : 10f9 bpl tstz7 -19af : a204 ldx #4 +19ea : ca dex +19eb : 10f8 bpl tstz6 +19ed : a204 ldx #4 ;precharge test area +19ef : a907 lda #7 +19f1 : 9d0502 tstz7 sta abst,x +19f4 : 0a asl a +19f5 : ca dex +19f6 : 10f9 bpl tstz7 +19f8 : a204 ldx #4 set_a $aa,0 > load_flag 0 -19b1 : a900 > lda #0 ;allow test to change I-flag (no mask) +19fa : a900 > lda #0 ;allow test to change I-flag (no mask) > -19b3 : 48 > pha ;use stack to load status -19b4 : a9aa > lda #$aa ;precharge accu -19b6 : 28 > plp +19fc : 48 > pha ;use stack to load status +19fd : a9aa > lda #$aa ;precharge accu +19ff : 28 > plp -19b7 : 9c0502 stz abst -19ba : 9c0602 stz abst+1 -19bd : 9c0702 stz abst+2 -19c0 : 9c0802 stz abst+3 -19c3 : 9c0902 stz abst+4 +1a00 : 9c0502 stz abst +1a03 : 9c0602 stz abst+1 +1a06 : 9c0702 stz abst+2 +1a09 : 9c0802 stz abst+3 +1a0c : 9c0902 stz abst+4 tst_a $aa,0 -19c6 : 08 > php ;save flags -19c7 : c9aa > cmp #$aa ;test result +1a0f : 08 > php ;save flags +1a10 : c9aa > cmp #$aa ;test result > trap_ne -19c9 : d0fe > bne * ;failed not equal (non zero) +1a12 : d0fe > bne * ;failed not equal (non zero) > -19cb : 68 > pla ;load status -19cc : 48 > pha +1a14 : 68 > pla ;load status +1a15 : 48 > pha > cmp_flag 0 -19cd : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +1a16 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -19cf : d0fe > bne * ;failed not equal (non zero) +1a18 : d0fe > bne * ;failed not equal (non zero) > -19d1 : 28 > plp ;restore status +1a1a : 28 > plp ;restore status -19d2 : bd0502 tstz8 lda abst,x ;verify zeros stored +1a1b : bd0502 tstz8 lda abst,x ;verify zeros stored trap_ne ;non zero after STZ abs -19d5 : d0fe > bne * ;failed not equal (non zero) +1a1e : d0fe > bne * ;failed not equal (non zero) -19d7 : ca dex -19d8 : 10f8 bpl tstz8 +1a20 : ca dex +1a21 : 10f8 bpl tstz8 -19da : a204 ldx #4 ;precharge test area -19dc : a907 lda #7 -19de : 950a tstz11 sta zpt,x -19e0 : 0a asl a -19e1 : ca dex -19e2 : 10fa bpl tstz11 -19e4 : a204 ldx #4 -19e6 : tstz15 +1a23 : a204 ldx #4 ;precharge test area +1a25 : a907 lda #7 +1a27 : 950c tstz11 sta zpt,x +1a29 : 0a asl a +1a2a : ca dex +1a2b : 10fa bpl tstz11 +1a2d : a204 ldx #4 +1a2f : tstz15 set_a $55,$ff > load_flag $ff -19e6 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1a2f : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -19e8 : 48 > pha ;use stack to load status -19e9 : a955 > lda #$55 ;precharge accu -19eb : 28 > plp +1a31 : 48 > pha ;use stack to load status +1a32 : a955 > lda #$55 ;precharge accu +1a34 : 28 > plp -19ec : 740a stz zpt,x +1a35 : 740c stz zpt,x tst_a $55,$ff -19ee : 08 > php ;save flags -19ef : c955 > cmp #$55 ;test result +1a37 : 08 > php ;save flags +1a38 : c955 > cmp #$55 ;test result > trap_ne -19f1 : d0fe > bne * ;failed not equal (non zero) +1a3a : d0fe > bne * ;failed not equal (non zero) > -19f3 : 68 > pla ;load status -19f4 : 48 > pha +1a3c : 68 > pla ;load status +1a3d : 48 > pha > cmp_flag $ff -19f5 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +1a3e : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -19f7 : d0fe > bne * ;failed not equal (non zero) +1a40 : d0fe > bne * ;failed not equal (non zero) > -19f9 : 28 > plp ;restore status +1a42 : 28 > plp ;restore status -19fa : ca dex -19fb : 10e9 bpl tstz15 -19fd : a204 ldx #4 -19ff : b50a tstz12 lda zpt,x ;verify zeros stored +1a43 : ca dex +1a44 : 10e9 bpl tstz15 +1a46 : a204 ldx #4 +1a48 : b50c tstz12 lda zpt,x ;verify zeros stored trap_ne ;non zero after STZ zp -1a01 : d0fe > bne * ;failed not equal (non zero) +1a4a : d0fe > bne * ;failed not equal (non zero) -1a03 : ca dex -1a04 : 10f9 bpl tstz12 -1a06 : a204 ldx #4 ;precharge test area -1a08 : a907 lda #7 -1a0a : 950a tstz13 sta zpt,x -1a0c : 0a asl a -1a0d : ca dex -1a0e : 10fa bpl tstz13 -1a10 : a204 ldx #4 -1a12 : tstz16 +1a4c : ca dex +1a4d : 10f9 bpl tstz12 +1a4f : a204 ldx #4 ;precharge test area +1a51 : a907 lda #7 +1a53 : 950c tstz13 sta zpt,x +1a55 : 0a asl a +1a56 : ca dex +1a57 : 10fa bpl tstz13 +1a59 : a204 ldx #4 +1a5b : tstz16 set_a $aa,0 > load_flag 0 -1a12 : a900 > lda #0 ;allow test to change I-flag (no mask) +1a5b : a900 > lda #0 ;allow test to change I-flag (no mask) > -1a14 : 48 > pha ;use stack to load status -1a15 : a9aa > lda #$aa ;precharge accu -1a17 : 28 > plp +1a5d : 48 > pha ;use stack to load status +1a5e : a9aa > lda #$aa ;precharge accu +1a60 : 28 > plp -1a18 : 740a stz zpt,x +1a61 : 740c stz zpt,x tst_a $aa,0 -1a1a : 08 > php ;save flags -1a1b : c9aa > cmp #$aa ;test result +1a63 : 08 > php ;save flags +1a64 : c9aa > cmp #$aa ;test result > trap_ne -1a1d : d0fe > bne * ;failed not equal (non zero) +1a66 : d0fe > bne * ;failed not equal (non zero) > -1a1f : 68 > pla ;load status -1a20 : 48 > pha +1a68 : 68 > pla ;load status +1a69 : 48 > pha > cmp_flag 0 -1a21 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +1a6a : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -1a23 : d0fe > bne * ;failed not equal (non zero) +1a6c : d0fe > bne * ;failed not equal (non zero) > -1a25 : 28 > plp ;restore status +1a6e : 28 > plp ;restore status -1a26 : ca dex -1a27 : 10e9 bpl tstz16 -1a29 : a204 ldx #4 -1a2b : b50a tstz14 lda zpt,x ;verify zeros stored +1a6f : ca dex +1a70 : 10e9 bpl tstz16 +1a72 : a204 ldx #4 +1a74 : b50c tstz14 lda zpt,x ;verify zeros stored trap_ne ;non zero after STZ zp -1a2d : d0fe > bne * ;failed not equal (non zero) +1a76 : d0fe > bne * ;failed not equal (non zero) -1a2f : ca dex -1a30 : 10f9 bpl tstz14 +1a78 : ca dex +1a79 : 10f9 bpl tstz14 -1a32 : a204 ldx #4 ;precharge test area -1a34 : a907 lda #7 -1a36 : 9d0502 tstz21 sta abst,x -1a39 : 0a asl a -1a3a : ca dex -1a3b : 10f9 bpl tstz21 -1a3d : a204 ldx #4 -1a3f : tstz25 - set_a $55,$ff - > load_flag $ff -1a3f : a9ff > lda #$ff ;allow test to change I-flag (no mask) - > -1a41 : 48 > pha ;use stack to load status -1a42 : a955 > lda #$55 ;precharge accu -1a44 : 28 > plp - -1a45 : 9e0502 stz abst,x - tst_a $55,$ff -1a48 : 08 > php ;save flags -1a49 : c955 > cmp #$55 ;test result - > trap_ne -1a4b : d0fe > bne * ;failed not equal (non zero) - > -1a4d : 68 > pla ;load status -1a4e : 48 > pha - > cmp_flag $ff -1a4f : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1a51 : d0fe > bne * ;failed not equal (non zero) - > -1a53 : 28 > plp ;restore status - -1a54 : ca dex -1a55 : 10e8 bpl tstz25 -1a57 : a204 ldx #4 -1a59 : bd0502 tstz22 lda abst,x ;verify zeros stored - trap_ne ;non zero after STZ zp -1a5c : d0fe > bne * ;failed not equal (non zero) - -1a5e : ca dex -1a5f : 10f8 bpl tstz22 -1a61 : a204 ldx #4 ;precharge test area -1a63 : a907 lda #7 -1a65 : 9d0502 tstz23 sta abst,x -1a68 : 0a asl a -1a69 : ca dex -1a6a : 10f9 bpl tstz23 -1a6c : a204 ldx #4 -1a6e : tstz26 - set_a $aa,0 - > load_flag 0 -1a6e : a900 > lda #0 ;allow test to change I-flag (no mask) - > -1a70 : 48 > pha ;use stack to load status -1a71 : a9aa > lda #$aa ;precharge accu -1a73 : 28 > plp - -1a74 : 9e0502 stz abst,x - tst_a $aa,0 -1a77 : 08 > php ;save flags -1a78 : c9aa > cmp #$aa ;test result - > trap_ne -1a7a : d0fe > bne * ;failed not equal (non zero) - > -1a7c : 68 > pla ;load status -1a7d : 48 > pha - > cmp_flag 0 -1a7e : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits - > - > trap_ne -1a80 : d0fe > bne * ;failed not equal (non zero) - > -1a82 : 28 > plp ;restore status - +1a7b : a204 ldx #4 ;precharge test area +1a7d : a907 lda #7 +1a7f : 9d0502 tstz21 sta abst,x +1a82 : 0a asl a 1a83 : ca dex -1a84 : 10e8 bpl tstz26 +1a84 : 10f9 bpl tstz21 1a86 : a204 ldx #4 -1a88 : bd0502 tstz24 lda abst,x ;verify zeros stored +1a88 : tstz25 + set_a $55,$ff + > load_flag $ff +1a88 : a9ff > lda #$ff ;allow test to change I-flag (no mask) + > +1a8a : 48 > pha ;use stack to load status +1a8b : a955 > lda #$55 ;precharge accu +1a8d : 28 > plp + +1a8e : 9e0502 stz abst,x + tst_a $55,$ff +1a91 : 08 > php ;save flags +1a92 : c955 > cmp #$55 ;test result + > trap_ne +1a94 : d0fe > bne * ;failed not equal (non zero) + > +1a96 : 68 > pla ;load status +1a97 : 48 > pha + > cmp_flag $ff +1a98 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1a9a : d0fe > bne * ;failed not equal (non zero) + > +1a9c : 28 > plp ;restore status + +1a9d : ca dex +1a9e : 10e8 bpl tstz25 +1aa0 : a204 ldx #4 +1aa2 : bd0502 tstz22 lda abst,x ;verify zeros stored trap_ne ;non zero after STZ zp -1a8b : d0fe > bne * ;failed not equal (non zero) +1aa5 : d0fe > bne * ;failed not equal (non zero) -1a8d : ca dex -1a8e : 10f8 bpl tstz24 +1aa7 : ca dex +1aa8 : 10f8 bpl tstz22 +1aaa : a204 ldx #4 ;precharge test area +1aac : a907 lda #7 +1aae : 9d0502 tstz23 sta abst,x +1ab1 : 0a asl a +1ab2 : ca dex +1ab3 : 10f9 bpl tstz23 +1ab5 : a204 ldx #4 +1ab7 : tstz26 + set_a $aa,0 + > load_flag 0 +1ab7 : a900 > lda #0 ;allow test to change I-flag (no mask) + > +1ab9 : 48 > pha ;use stack to load status +1aba : a9aa > lda #$aa ;precharge accu +1abc : 28 > plp + +1abd : 9e0502 stz abst,x + tst_a $aa,0 +1ac0 : 08 > php ;save flags +1ac1 : c9aa > cmp #$aa ;test result + > trap_ne +1ac3 : d0fe > bne * ;failed not equal (non zero) + > +1ac5 : 68 > pla ;load status +1ac6 : 48 > pha + > cmp_flag 0 +1ac7 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits + > + > trap_ne +1ac9 : d0fe > bne * ;failed not equal (non zero) + > +1acb : 28 > plp ;restore status + +1acc : ca dex +1acd : 10e8 bpl tstz26 +1acf : a204 ldx #4 +1ad1 : bd0502 tstz24 lda abst,x ;verify zeros stored + trap_ne ;non zero after STZ zp +1ad4 : d0fe > bne * ;failed not equal (non zero) + +1ad6 : ca dex +1ad7 : 10f8 bpl tstz24 -1a90 : c07b cpy #123 +1ad9 : c07b cpy #123 trap_ne ;y altered during test -1a92 : d0fe > bne * ;failed not equal (non zero) +1adb : d0fe > bne * ;failed not equal (non zero) -1a94 : ba tsx -1a95 : e0ff cpx #$ff +1add : ba tsx +1ade : e0ff cpx #$ff trap_ne ;sp push/pop mismatch -1a97 : d0fe > bne * ;failed not equal (non zero) +1ae0 : d0fe > bne * ;failed not equal (non zero) next_test -1a99 : ad0202 > lda test_case ;previous test -1a9c : c90e > cmp #test_num +1ae2 : ad0202 > lda test_case ;previous test +1ae5 : c90e > cmp #test_num > trap_ne ;test is out of sequence -1a9e : d0fe > bne * ;failed not equal (non zero) +1ae7 : d0fe > bne * ;failed not equal (non zero) > 000f = >test_num = test_num + 1 -1aa0 : a90f > lda #test_num ;*** next tests' number -1aa2 : 8d0202 > sta test_case +1ae9 : a90f > lda #test_num ;*** next tests' number +1aeb : 8d0202 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; testing BIT - zp,x / abs,x / # -1aa5 : a042 ldy #$42 -1aa7 : a203 ldx #3 +1aee : a042 ldy #$42 +1af0 : a203 ldx #3 set_a $ff,0 > load_flag 0 -1aa9 : a900 > lda #0 ;allow test to change I-flag (no mask) +1af2 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1aab : 48 > pha ;use stack to load status -1aac : a9ff > lda #$ff ;precharge accu -1aae : 28 > plp +1af4 : 48 > pha ;use stack to load status +1af5 : a9ff > lda #$ff ;precharge accu +1af7 : 28 > plp -1aaf : 3411 bit zp1,x ;00 - should set Z / clear NV +1af8 : 3413 bit zp1,x ;00 - should set Z / clear NV tst_a $ff,fz -1ab1 : 08 > php ;save flags -1ab2 : c9ff > cmp #$ff ;test result +1afa : 08 > php ;save flags +1afb : c9ff > cmp #$ff ;test result > trap_ne -1ab4 : d0fe > bne * ;failed not equal (non zero) +1afd : d0fe > bne * ;failed not equal (non zero) > -1ab6 : 68 > pla ;load status -1ab7 : 48 > pha +1aff : 68 > pla ;load status +1b00 : 48 > pha > cmp_flag fz -1ab8 : c932 > cmp #(fz |fao)&m8 ;expected flags + always on bits +1b01 : c932 > cmp #(fz |fao)&m8 ;expected flags + always on bits > > trap_ne -1aba : d0fe > bne * ;failed not equal (non zero) +1b03 : d0fe > bne * ;failed not equal (non zero) > -1abc : 28 > plp ;restore status +1b05 : 28 > plp ;restore status -1abd : ca dex +1b06 : ca dex set_a 1,0 > load_flag 0 -1abe : a900 > lda #0 ;allow test to change I-flag (no mask) +1b07 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1ac0 : 48 > pha ;use stack to load status -1ac1 : a901 > lda #1 ;precharge accu -1ac3 : 28 > plp +1b09 : 48 > pha ;use stack to load status +1b0a : a901 > lda #1 ;precharge accu +1b0c : 28 > plp -1ac4 : 3411 bit zp1,x ;41 - should set V (M6) / clear NZ +1b0d : 3413 bit zp1,x ;41 - should set V (M6) / clear NZ tst_a 1,fv -1ac6 : 08 > php ;save flags -1ac7 : c901 > cmp #1 ;test result +1b0f : 08 > php ;save flags +1b10 : c901 > cmp #1 ;test result > trap_ne -1ac9 : d0fe > bne * ;failed not equal (non zero) +1b12 : d0fe > bne * ;failed not equal (non zero) > -1acb : 68 > pla ;load status -1acc : 48 > pha +1b14 : 68 > pla ;load status +1b15 : 48 > pha > cmp_flag fv -1acd : c970 > cmp #(fv|fao)&m8 ;expected flags + always on bits +1b16 : c970 > cmp #(fv|fao)&m8 ;expected flags + always on bits > > trap_ne -1acf : d0fe > bne * ;failed not equal (non zero) +1b18 : d0fe > bne * ;failed not equal (non zero) > -1ad1 : 28 > plp ;restore status +1b1a : 28 > plp ;restore status -1ad2 : ca dex +1b1b : ca dex set_a 1,0 > load_flag 0 -1ad3 : a900 > lda #0 ;allow test to change I-flag (no mask) +1b1c : a900 > lda #0 ;allow test to change I-flag (no mask) > -1ad5 : 48 > pha ;use stack to load status -1ad6 : a901 > lda #1 ;precharge accu -1ad8 : 28 > plp +1b1e : 48 > pha ;use stack to load status +1b1f : a901 > lda #1 ;precharge accu +1b21 : 28 > plp -1ad9 : 3411 bit zp1,x ;82 - should set N (M7) & Z / clear V +1b22 : 3413 bit zp1,x ;82 - should set N (M7) & Z / clear V tst_a 1,fnz -1adb : 08 > php ;save flags -1adc : c901 > cmp #1 ;test result +1b24 : 08 > php ;save flags +1b25 : c901 > cmp #1 ;test result > trap_ne -1ade : d0fe > bne * ;failed not equal (non zero) +1b27 : d0fe > bne * ;failed not equal (non zero) > -1ae0 : 68 > pla ;load status -1ae1 : 48 > pha +1b29 : 68 > pla ;load status +1b2a : 48 > pha > cmp_flag fnz -1ae2 : c9b2 > cmp #(fnz|fao)&m8 ;expected flags + always on bits +1b2b : c9b2 > cmp #(fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -1ae4 : d0fe > bne * ;failed not equal (non zero) +1b2d : d0fe > bne * ;failed not equal (non zero) > -1ae6 : 28 > plp ;restore status +1b2f : 28 > plp ;restore status -1ae7 : ca dex +1b30 : ca dex set_a 1,0 > load_flag 0 -1ae8 : a900 > lda #0 ;allow test to change I-flag (no mask) +1b31 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1aea : 48 > pha ;use stack to load status -1aeb : a901 > lda #1 ;precharge accu -1aed : 28 > plp +1b33 : 48 > pha ;use stack to load status +1b34 : a901 > lda #1 ;precharge accu +1b36 : 28 > plp -1aee : 3411 bit zp1,x ;c3 - should set N (M7) & V (M6) / clear Z +1b37 : 3413 bit zp1,x ;c3 - should set N (M7) & V (M6) / clear Z tst_a 1,fnv -1af0 : 08 > php ;save flags -1af1 : c901 > cmp #1 ;test result +1b39 : 08 > php ;save flags +1b3a : c901 > cmp #1 ;test result > trap_ne -1af3 : d0fe > bne * ;failed not equal (non zero) +1b3c : d0fe > bne * ;failed not equal (non zero) > -1af5 : 68 > pla ;load status -1af6 : 48 > pha +1b3e : 68 > pla ;load status +1b3f : 48 > pha > cmp_flag fnv -1af7 : c9f0 > cmp #(fnv|fao)&m8 ;expected flags + always on bits +1b40 : c9f0 > cmp #(fnv|fao)&m8 ;expected flags + always on bits > > trap_ne -1af9 : d0fe > bne * ;failed not equal (non zero) +1b42 : d0fe > bne * ;failed not equal (non zero) > -1afb : 28 > plp ;restore status +1b44 : 28 > plp ;restore status set_a 1,$ff > load_flag $ff -1afc : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1b45 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1afe : 48 > pha ;use stack to load status -1aff : a901 > lda #1 ;precharge accu -1b01 : 28 > plp +1b47 : 48 > pha ;use stack to load status +1b48 : a901 > lda #1 ;precharge accu +1b4a : 28 > plp -1b02 : 3411 bit zp1,x ;c3 - should set N (M7) & V (M6) / clear Z +1b4b : 3413 bit zp1,x ;c3 - should set N (M7) & V (M6) / clear Z tst_a 1,~fz -1b04 : 08 > php ;save flags -1b05 : c901 > cmp #1 ;test result +1b4d : 08 > php ;save flags +1b4e : c901 > cmp #1 ;test result > trap_ne -1b07 : d0fe > bne * ;failed not equal (non zero) +1b50 : d0fe > bne * ;failed not equal (non zero) > -1b09 : 68 > pla ;load status -1b0a : 48 > pha +1b52 : 68 > pla ;load status +1b53 : 48 > pha > cmp_flag ~fz -1b0b : c9fd > cmp #(~fz|fao)&m8 ;expected flags + always on bits +1b54 : c9fd > cmp #(~fz|fao)&m8 ;expected flags + always on bits > > trap_ne -1b0d : d0fe > bne * ;failed not equal (non zero) +1b56 : d0fe > bne * ;failed not equal (non zero) > -1b0f : 28 > plp ;restore status +1b58 : 28 > plp ;restore status -1b10 : e8 inx +1b59 : e8 inx set_a 1,$ff > load_flag $ff -1b11 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1b5a : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1b13 : 48 > pha ;use stack to load status -1b14 : a901 > lda #1 ;precharge accu -1b16 : 28 > plp +1b5c : 48 > pha ;use stack to load status +1b5d : a901 > lda #1 ;precharge accu +1b5f : 28 > plp -1b17 : 3411 bit zp1,x ;82 - should set N (M7) & Z / clear V +1b60 : 3413 bit zp1,x ;82 - should set N (M7) & Z / clear V tst_a 1,~fv -1b19 : 08 > php ;save flags -1b1a : c901 > cmp #1 ;test result +1b62 : 08 > php ;save flags +1b63 : c901 > cmp #1 ;test result > trap_ne -1b1c : d0fe > bne * ;failed not equal (non zero) +1b65 : d0fe > bne * ;failed not equal (non zero) > -1b1e : 68 > pla ;load status -1b1f : 48 > pha +1b67 : 68 > pla ;load status +1b68 : 48 > pha > cmp_flag ~fv -1b20 : c9bf > cmp #(~fv|fao)&m8 ;expected flags + always on bits +1b69 : c9bf > cmp #(~fv|fao)&m8 ;expected flags + always on bits > > trap_ne -1b22 : d0fe > bne * ;failed not equal (non zero) +1b6b : d0fe > bne * ;failed not equal (non zero) > -1b24 : 28 > plp ;restore status +1b6d : 28 > plp ;restore status -1b25 : e8 inx +1b6e : e8 inx set_a 1,$ff > load_flag $ff -1b26 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1b6f : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1b28 : 48 > pha ;use stack to load status -1b29 : a901 > lda #1 ;precharge accu -1b2b : 28 > plp +1b71 : 48 > pha ;use stack to load status +1b72 : a901 > lda #1 ;precharge accu +1b74 : 28 > plp -1b2c : 3411 bit zp1,x ;41 - should set V (M6) / clear NZ +1b75 : 3413 bit zp1,x ;41 - should set V (M6) / clear NZ tst_a 1,~fnz -1b2e : 08 > php ;save flags -1b2f : c901 > cmp #1 ;test result +1b77 : 08 > php ;save flags +1b78 : c901 > cmp #1 ;test result > trap_ne -1b31 : d0fe > bne * ;failed not equal (non zero) +1b7a : d0fe > bne * ;failed not equal (non zero) > -1b33 : 68 > pla ;load status -1b34 : 48 > pha +1b7c : 68 > pla ;load status +1b7d : 48 > pha > cmp_flag ~fnz -1b35 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits +1b7e : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -1b37 : d0fe > bne * ;failed not equal (non zero) +1b80 : d0fe > bne * ;failed not equal (non zero) > -1b39 : 28 > plp ;restore status +1b82 : 28 > plp ;restore status -1b3a : e8 inx +1b83 : e8 inx set_a $ff,$ff > load_flag $ff -1b3b : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1b84 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1b3d : 48 > pha ;use stack to load status -1b3e : a9ff > lda #$ff ;precharge accu -1b40 : 28 > plp +1b86 : 48 > pha ;use stack to load status +1b87 : a9ff > lda #$ff ;precharge accu +1b89 : 28 > plp -1b41 : 3411 bit zp1,x ;00 - should set Z / clear NV +1b8a : 3413 bit zp1,x ;00 - should set Z / clear NV tst_a $ff,~fnv -1b43 : 08 > php ;save flags -1b44 : c9ff > cmp #$ff ;test result +1b8c : 08 > php ;save flags +1b8d : c9ff > cmp #$ff ;test result > trap_ne -1b46 : d0fe > bne * ;failed not equal (non zero) +1b8f : d0fe > bne * ;failed not equal (non zero) > -1b48 : 68 > pla ;load status -1b49 : 48 > pha +1b91 : 68 > pla ;load status +1b92 : 48 > pha > cmp_flag ~fnv -1b4a : c93f > cmp #(~fnv |fao)&m8 ;expected flags + always on bits +1b93 : c93f > cmp #(~fnv |fao)&m8 ;expected flags + always on bits > > trap_ne -1b4c : d0fe > bne * ;failed not equal (non zero) +1b95 : d0fe > bne * ;failed not equal (non zero) > -1b4e : 28 > plp ;restore status +1b97 : 28 > plp ;restore status set_a $ff,0 > load_flag 0 -1b4f : a900 > lda #0 ;allow test to change I-flag (no mask) +1b98 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1b51 : 48 > pha ;use stack to load status -1b52 : a9ff > lda #$ff ;precharge accu -1b54 : 28 > plp +1b9a : 48 > pha ;use stack to load status +1b9b : a9ff > lda #$ff ;precharge accu +1b9d : 28 > plp -1b55 : 3c0a02 bit abs1,x ;00 - should set Z / clear NV +1b9e : 3c1002 bit abs1,x ;00 - should set Z / clear NV tst_a $ff,fz -1b58 : 08 > php ;save flags -1b59 : c9ff > cmp #$ff ;test result +1ba1 : 08 > php ;save flags +1ba2 : c9ff > cmp #$ff ;test result > trap_ne -1b5b : d0fe > bne * ;failed not equal (non zero) +1ba4 : d0fe > bne * ;failed not equal (non zero) > -1b5d : 68 > pla ;load status -1b5e : 48 > pha +1ba6 : 68 > pla ;load status +1ba7 : 48 > pha > cmp_flag fz -1b5f : c932 > cmp #(fz |fao)&m8 ;expected flags + always on bits +1ba8 : c932 > cmp #(fz |fao)&m8 ;expected flags + always on bits > > trap_ne -1b61 : d0fe > bne * ;failed not equal (non zero) +1baa : d0fe > bne * ;failed not equal (non zero) > -1b63 : 28 > plp ;restore status +1bac : 28 > plp ;restore status -1b64 : ca dex +1bad : ca dex set_a 1,0 > load_flag 0 -1b65 : a900 > lda #0 ;allow test to change I-flag (no mask) +1bae : a900 > lda #0 ;allow test to change I-flag (no mask) > -1b67 : 48 > pha ;use stack to load status -1b68 : a901 > lda #1 ;precharge accu -1b6a : 28 > plp +1bb0 : 48 > pha ;use stack to load status +1bb1 : a901 > lda #1 ;precharge accu +1bb3 : 28 > plp -1b6b : 3c0a02 bit abs1,x ;41 - should set V (M6) / clear NZ +1bb4 : 3c1002 bit abs1,x ;41 - should set V (M6) / clear NZ tst_a 1,fv -1b6e : 08 > php ;save flags -1b6f : c901 > cmp #1 ;test result +1bb7 : 08 > php ;save flags +1bb8 : c901 > cmp #1 ;test result > trap_ne -1b71 : d0fe > bne * ;failed not equal (non zero) +1bba : d0fe > bne * ;failed not equal (non zero) > -1b73 : 68 > pla ;load status -1b74 : 48 > pha +1bbc : 68 > pla ;load status +1bbd : 48 > pha > cmp_flag fv -1b75 : c970 > cmp #(fv|fao)&m8 ;expected flags + always on bits +1bbe : c970 > cmp #(fv|fao)&m8 ;expected flags + always on bits > > trap_ne -1b77 : d0fe > bne * ;failed not equal (non zero) +1bc0 : d0fe > bne * ;failed not equal (non zero) > -1b79 : 28 > plp ;restore status +1bc2 : 28 > plp ;restore status -1b7a : ca dex +1bc3 : ca dex set_a 1,0 > load_flag 0 -1b7b : a900 > lda #0 ;allow test to change I-flag (no mask) +1bc4 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1b7d : 48 > pha ;use stack to load status -1b7e : a901 > lda #1 ;precharge accu -1b80 : 28 > plp +1bc6 : 48 > pha ;use stack to load status +1bc7 : a901 > lda #1 ;precharge accu +1bc9 : 28 > plp -1b81 : 3c0a02 bit abs1,x ;82 - should set N (M7) & Z / clear V +1bca : 3c1002 bit abs1,x ;82 - should set N (M7) & Z / clear V tst_a 1,fnz -1b84 : 08 > php ;save flags -1b85 : c901 > cmp #1 ;test result +1bcd : 08 > php ;save flags +1bce : c901 > cmp #1 ;test result > trap_ne -1b87 : d0fe > bne * ;failed not equal (non zero) +1bd0 : d0fe > bne * ;failed not equal (non zero) > -1b89 : 68 > pla ;load status -1b8a : 48 > pha +1bd2 : 68 > pla ;load status +1bd3 : 48 > pha > cmp_flag fnz -1b8b : c9b2 > cmp #(fnz|fao)&m8 ;expected flags + always on bits +1bd4 : c9b2 > cmp #(fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -1b8d : d0fe > bne * ;failed not equal (non zero) +1bd6 : d0fe > bne * ;failed not equal (non zero) > -1b8f : 28 > plp ;restore status +1bd8 : 28 > plp ;restore status -1b90 : ca dex +1bd9 : ca dex set_a 1,0 > load_flag 0 -1b91 : a900 > lda #0 ;allow test to change I-flag (no mask) +1bda : a900 > lda #0 ;allow test to change I-flag (no mask) > -1b93 : 48 > pha ;use stack to load status -1b94 : a901 > lda #1 ;precharge accu -1b96 : 28 > plp +1bdc : 48 > pha ;use stack to load status +1bdd : a901 > lda #1 ;precharge accu +1bdf : 28 > plp -1b97 : 3c0a02 bit abs1,x ;c3 - should set N (M7) & V (M6) / clear Z +1be0 : 3c1002 bit abs1,x ;c3 - should set N (M7) & V (M6) / clear Z tst_a 1,fnv -1b9a : 08 > php ;save flags -1b9b : c901 > cmp #1 ;test result +1be3 : 08 > php ;save flags +1be4 : c901 > cmp #1 ;test result > trap_ne -1b9d : d0fe > bne * ;failed not equal (non zero) +1be6 : d0fe > bne * ;failed not equal (non zero) > -1b9f : 68 > pla ;load status -1ba0 : 48 > pha +1be8 : 68 > pla ;load status +1be9 : 48 > pha > cmp_flag fnv -1ba1 : c9f0 > cmp #(fnv|fao)&m8 ;expected flags + always on bits +1bea : c9f0 > cmp #(fnv|fao)&m8 ;expected flags + always on bits > > trap_ne -1ba3 : d0fe > bne * ;failed not equal (non zero) +1bec : d0fe > bne * ;failed not equal (non zero) > -1ba5 : 28 > plp ;restore status +1bee : 28 > plp ;restore status set_a 1,$ff > load_flag $ff -1ba6 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1bef : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1ba8 : 48 > pha ;use stack to load status -1ba9 : a901 > lda #1 ;precharge accu -1bab : 28 > plp +1bf1 : 48 > pha ;use stack to load status +1bf2 : a901 > lda #1 ;precharge accu +1bf4 : 28 > plp -1bac : 3c0a02 bit abs1,x ;c3 - should set N (M7) & V (M6) / clear Z +1bf5 : 3c1002 bit abs1,x ;c3 - should set N (M7) & V (M6) / clear Z tst_a 1,~fz -1baf : 08 > php ;save flags -1bb0 : c901 > cmp #1 ;test result +1bf8 : 08 > php ;save flags +1bf9 : c901 > cmp #1 ;test result > trap_ne -1bb2 : d0fe > bne * ;failed not equal (non zero) +1bfb : d0fe > bne * ;failed not equal (non zero) > -1bb4 : 68 > pla ;load status -1bb5 : 48 > pha +1bfd : 68 > pla ;load status +1bfe : 48 > pha > cmp_flag ~fz -1bb6 : c9fd > cmp #(~fz|fao)&m8 ;expected flags + always on bits +1bff : c9fd > cmp #(~fz|fao)&m8 ;expected flags + always on bits > > trap_ne -1bb8 : d0fe > bne * ;failed not equal (non zero) +1c01 : d0fe > bne * ;failed not equal (non zero) > -1bba : 28 > plp ;restore status +1c03 : 28 > plp ;restore status -1bbb : e8 inx +1c04 : e8 inx set_a 1,$ff > load_flag $ff -1bbc : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1c05 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1bbe : 48 > pha ;use stack to load status -1bbf : a901 > lda #1 ;precharge accu -1bc1 : 28 > plp +1c07 : 48 > pha ;use stack to load status +1c08 : a901 > lda #1 ;precharge accu +1c0a : 28 > plp -1bc2 : 3c0a02 bit abs1,x ;82 - should set N (M7) & Z / clear V +1c0b : 3c1002 bit abs1,x ;82 - should set N (M7) & Z / clear V tst_a 1,~fv -1bc5 : 08 > php ;save flags -1bc6 : c901 > cmp #1 ;test result +1c0e : 08 > php ;save flags +1c0f : c901 > cmp #1 ;test result > trap_ne -1bc8 : d0fe > bne * ;failed not equal (non zero) +1c11 : d0fe > bne * ;failed not equal (non zero) > -1bca : 68 > pla ;load status -1bcb : 48 > pha +1c13 : 68 > pla ;load status +1c14 : 48 > pha > cmp_flag ~fv -1bcc : c9bf > cmp #(~fv|fao)&m8 ;expected flags + always on bits +1c15 : c9bf > cmp #(~fv|fao)&m8 ;expected flags + always on bits > > trap_ne -1bce : d0fe > bne * ;failed not equal (non zero) +1c17 : d0fe > bne * ;failed not equal (non zero) > -1bd0 : 28 > plp ;restore status +1c19 : 28 > plp ;restore status -1bd1 : e8 inx +1c1a : e8 inx set_a 1,$ff > load_flag $ff -1bd2 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1c1b : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1bd4 : 48 > pha ;use stack to load status -1bd5 : a901 > lda #1 ;precharge accu -1bd7 : 28 > plp +1c1d : 48 > pha ;use stack to load status +1c1e : a901 > lda #1 ;precharge accu +1c20 : 28 > plp -1bd8 : 3c0a02 bit abs1,x ;41 - should set V (M6) / clear NZ +1c21 : 3c1002 bit abs1,x ;41 - should set V (M6) / clear NZ tst_a 1,~fnz -1bdb : 08 > php ;save flags -1bdc : c901 > cmp #1 ;test result +1c24 : 08 > php ;save flags +1c25 : c901 > cmp #1 ;test result > trap_ne -1bde : d0fe > bne * ;failed not equal (non zero) +1c27 : d0fe > bne * ;failed not equal (non zero) > -1be0 : 68 > pla ;load status -1be1 : 48 > pha +1c29 : 68 > pla ;load status +1c2a : 48 > pha > cmp_flag ~fnz -1be2 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits +1c2b : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -1be4 : d0fe > bne * ;failed not equal (non zero) +1c2d : d0fe > bne * ;failed not equal (non zero) > -1be6 : 28 > plp ;restore status +1c2f : 28 > plp ;restore status -1be7 : e8 inx +1c30 : e8 inx set_a $ff,$ff > load_flag $ff -1be8 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1c31 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1bea : 48 > pha ;use stack to load status -1beb : a9ff > lda #$ff ;precharge accu -1bed : 28 > plp +1c33 : 48 > pha ;use stack to load status +1c34 : a9ff > lda #$ff ;precharge accu +1c36 : 28 > plp -1bee : 3c0a02 bit abs1,x ;00 - should set Z / clear NV +1c37 : 3c1002 bit abs1,x ;00 - should set Z / clear NV tst_a $ff,~fnv -1bf1 : 08 > php ;save flags -1bf2 : c9ff > cmp #$ff ;test result +1c3a : 08 > php ;save flags +1c3b : c9ff > cmp #$ff ;test result > trap_ne -1bf4 : d0fe > bne * ;failed not equal (non zero) +1c3d : d0fe > bne * ;failed not equal (non zero) > -1bf6 : 68 > pla ;load status -1bf7 : 48 > pha +1c3f : 68 > pla ;load status +1c40 : 48 > pha > cmp_flag ~fnv -1bf8 : c93f > cmp #(~fnv |fao)&m8 ;expected flags + always on bits +1c41 : c93f > cmp #(~fnv |fao)&m8 ;expected flags + always on bits > > trap_ne -1bfa : d0fe > bne * ;failed not equal (non zero) +1c43 : d0fe > bne * ;failed not equal (non zero) > -1bfc : 28 > plp ;restore status +1c45 : 28 > plp ;restore status set_a $ff,0 > load_flag 0 -1bfd : a900 > lda #0 ;allow test to change I-flag (no mask) +1c46 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1bff : 48 > pha ;use stack to load status -1c00 : a9ff > lda #$ff ;precharge accu -1c02 : 28 > plp +1c48 : 48 > pha ;use stack to load status +1c49 : a9ff > lda #$ff ;precharge accu +1c4b : 28 > plp -1c03 : 8900 bit #$00 ;00 - should set Z +1c4c : 8900 bit #$00 ;00 - should set Z tst_a $ff,fz -1c05 : 08 > php ;save flags -1c06 : c9ff > cmp #$ff ;test result +1c4e : 08 > php ;save flags +1c4f : c9ff > cmp #$ff ;test result > trap_ne -1c08 : d0fe > bne * ;failed not equal (non zero) +1c51 : d0fe > bne * ;failed not equal (non zero) > -1c0a : 68 > pla ;load status -1c0b : 48 > pha +1c53 : 68 > pla ;load status +1c54 : 48 > pha > cmp_flag fz -1c0c : c932 > cmp #(fz |fao)&m8 ;expected flags + always on bits +1c55 : c932 > cmp #(fz |fao)&m8 ;expected flags + always on bits > > trap_ne -1c0e : d0fe > bne * ;failed not equal (non zero) +1c57 : d0fe > bne * ;failed not equal (non zero) > -1c10 : 28 > plp ;restore status +1c59 : 28 > plp ;restore status -1c11 : ca dex +1c5a : ca dex set_a 1,0 > load_flag 0 -1c12 : a900 > lda #0 ;allow test to change I-flag (no mask) +1c5b : a900 > lda #0 ;allow test to change I-flag (no mask) > -1c14 : 48 > pha ;use stack to load status -1c15 : a901 > lda #1 ;precharge accu -1c17 : 28 > plp +1c5d : 48 > pha ;use stack to load status +1c5e : a901 > lda #1 ;precharge accu +1c60 : 28 > plp -1c18 : 8941 bit #$41 ;41 - should clear Z +1c61 : 8941 bit #$41 ;41 - should clear Z tst_a 1,0 -1c1a : 08 > php ;save flags -1c1b : c901 > cmp #1 ;test result +1c63 : 08 > php ;save flags +1c64 : c901 > cmp #1 ;test result > trap_ne -1c1d : d0fe > bne * ;failed not equal (non zero) +1c66 : d0fe > bne * ;failed not equal (non zero) > -1c1f : 68 > pla ;load status -1c20 : 48 > pha +1c68 : 68 > pla ;load status +1c69 : 48 > pha > cmp_flag 0 -1c21 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +1c6a : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -1c23 : d0fe > bne * ;failed not equal (non zero) +1c6c : d0fe > bne * ;failed not equal (non zero) > -1c25 : 28 > plp ;restore status +1c6e : 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 # -1c26 : ca dex +1c6f : ca dex set_a 1,0 > load_flag 0 -1c27 : a900 > lda #0 ;allow test to change I-flag (no mask) +1c70 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1c29 : 48 > pha ;use stack to load status -1c2a : a901 > lda #1 ;precharge accu -1c2c : 28 > plp +1c72 : 48 > pha ;use stack to load status +1c73 : a901 > lda #1 ;precharge accu +1c75 : 28 > plp -1c2d : 8982 bit #$82 ;82 - should set Z +1c76 : 8982 bit #$82 ;82 - should set Z tst_a 1,fz -1c2f : 08 > php ;save flags -1c30 : c901 > cmp #1 ;test result +1c78 : 08 > php ;save flags +1c79 : c901 > cmp #1 ;test result > trap_ne -1c32 : d0fe > bne * ;failed not equal (non zero) +1c7b : d0fe > bne * ;failed not equal (non zero) > -1c34 : 68 > pla ;load status -1c35 : 48 > pha +1c7d : 68 > pla ;load status +1c7e : 48 > pha > cmp_flag fz -1c36 : c932 > cmp #(fz|fao)&m8 ;expected flags + always on bits +1c7f : c932 > cmp #(fz|fao)&m8 ;expected flags + always on bits > > trap_ne -1c38 : d0fe > bne * ;failed not equal (non zero) +1c81 : d0fe > bne * ;failed not equal (non zero) > -1c3a : 28 > plp ;restore status +1c83 : 28 > plp ;restore status -1c3b : ca dex +1c84 : ca dex set_a 1,0 > load_flag 0 -1c3c : a900 > lda #0 ;allow test to change I-flag (no mask) +1c85 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1c3e : 48 > pha ;use stack to load status -1c3f : a901 > lda #1 ;precharge accu -1c41 : 28 > plp +1c87 : 48 > pha ;use stack to load status +1c88 : a901 > lda #1 ;precharge accu +1c8a : 28 > plp -1c42 : 89c3 bit #$c3 ;c3 - should clear Z +1c8b : 89c3 bit #$c3 ;c3 - should clear Z tst_a 1,0 -1c44 : 08 > php ;save flags -1c45 : c901 > cmp #1 ;test result +1c8d : 08 > php ;save flags +1c8e : c901 > cmp #1 ;test result > trap_ne -1c47 : d0fe > bne * ;failed not equal (non zero) +1c90 : d0fe > bne * ;failed not equal (non zero) > -1c49 : 68 > pla ;load status -1c4a : 48 > pha +1c92 : 68 > pla ;load status +1c93 : 48 > pha > cmp_flag 0 -1c4b : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +1c94 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -1c4d : d0fe > bne * ;failed not equal (non zero) +1c96 : d0fe > bne * ;failed not equal (non zero) > -1c4f : 28 > plp ;restore status +1c98 : 28 > plp ;restore status set_a 1,$ff > load_flag $ff -1c50 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1c99 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1c52 : 48 > pha ;use stack to load status -1c53 : a901 > lda #1 ;precharge accu -1c55 : 28 > plp +1c9b : 48 > pha ;use stack to load status +1c9c : a901 > lda #1 ;precharge accu +1c9e : 28 > plp -1c56 : 89c3 bit #$c3 ;c3 - clear Z +1c9f : 89c3 bit #$c3 ;c3 - clear Z tst_a 1,~fz -1c58 : 08 > php ;save flags -1c59 : c901 > cmp #1 ;test result +1ca1 : 08 > php ;save flags +1ca2 : c901 > cmp #1 ;test result > trap_ne -1c5b : d0fe > bne * ;failed not equal (non zero) +1ca4 : d0fe > bne * ;failed not equal (non zero) > -1c5d : 68 > pla ;load status -1c5e : 48 > pha +1ca6 : 68 > pla ;load status +1ca7 : 48 > pha > cmp_flag ~fz -1c5f : c9fd > cmp #(~fz|fao)&m8 ;expected flags + always on bits +1ca8 : c9fd > cmp #(~fz|fao)&m8 ;expected flags + always on bits > > trap_ne -1c61 : d0fe > bne * ;failed not equal (non zero) +1caa : d0fe > bne * ;failed not equal (non zero) > -1c63 : 28 > plp ;restore status +1cac : 28 > plp ;restore status -1c64 : e8 inx +1cad : e8 inx set_a 1,$ff > load_flag $ff -1c65 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1cae : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1c67 : 48 > pha ;use stack to load status -1c68 : a901 > lda #1 ;precharge accu -1c6a : 28 > plp +1cb0 : 48 > pha ;use stack to load status +1cb1 : a901 > lda #1 ;precharge accu +1cb3 : 28 > plp -1c6b : 8982 bit #$82 ;82 - should set Z +1cb4 : 8982 bit #$82 ;82 - should set Z tst_a 1,$ff -1c6d : 08 > php ;save flags -1c6e : c901 > cmp #1 ;test result +1cb6 : 08 > php ;save flags +1cb7 : c901 > cmp #1 ;test result > trap_ne -1c70 : d0fe > bne * ;failed not equal (non zero) +1cb9 : d0fe > bne * ;failed not equal (non zero) > -1c72 : 68 > pla ;load status -1c73 : 48 > pha +1cbb : 68 > pla ;load status +1cbc : 48 > pha > cmp_flag $ff -1c74 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +1cbd : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -1c76 : d0fe > bne * ;failed not equal (non zero) +1cbf : d0fe > bne * ;failed not equal (non zero) > -1c78 : 28 > plp ;restore status +1cc1 : 28 > plp ;restore status -1c79 : e8 inx +1cc2 : e8 inx set_a 1,$ff > load_flag $ff -1c7a : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1cc3 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1c7c : 48 > pha ;use stack to load status -1c7d : a901 > lda #1 ;precharge accu -1c7f : 28 > plp +1cc5 : 48 > pha ;use stack to load status +1cc6 : a901 > lda #1 ;precharge accu +1cc8 : 28 > plp -1c80 : 8941 bit #$41 ;41 - should clear Z +1cc9 : 8941 bit #$41 ;41 - should clear Z tst_a 1,~fz -1c82 : 08 > php ;save flags -1c83 : c901 > cmp #1 ;test result +1ccb : 08 > php ;save flags +1ccc : c901 > cmp #1 ;test result > trap_ne -1c85 : d0fe > bne * ;failed not equal (non zero) +1cce : d0fe > bne * ;failed not equal (non zero) > -1c87 : 68 > pla ;load status -1c88 : 48 > pha +1cd0 : 68 > pla ;load status +1cd1 : 48 > pha > cmp_flag ~fz -1c89 : c9fd > cmp #(~fz|fao)&m8 ;expected flags + always on bits +1cd2 : c9fd > cmp #(~fz|fao)&m8 ;expected flags + always on bits > > trap_ne -1c8b : d0fe > bne * ;failed not equal (non zero) +1cd4 : d0fe > bne * ;failed not equal (non zero) > -1c8d : 28 > plp ;restore status +1cd6 : 28 > plp ;restore status -1c8e : e8 inx +1cd7 : e8 inx set_a $ff,$ff > load_flag $ff -1c8f : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1cd8 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1c91 : 48 > pha ;use stack to load status -1c92 : a9ff > lda #$ff ;precharge accu -1c94 : 28 > plp +1cda : 48 > pha ;use stack to load status +1cdb : a9ff > lda #$ff ;precharge accu +1cdd : 28 > plp -1c95 : 8900 bit #$00 ;00 - should set Z +1cde : 8900 bit #$00 ;00 - should set Z tst_a $ff,$ff -1c97 : 08 > php ;save flags -1c98 : c9ff > cmp #$ff ;test result +1ce0 : 08 > php ;save flags +1ce1 : c9ff > cmp #$ff ;test result > trap_ne -1c9a : d0fe > bne * ;failed not equal (non zero) +1ce3 : d0fe > bne * ;failed not equal (non zero) > -1c9c : 68 > pla ;load status -1c9d : 48 > pha +1ce5 : 68 > pla ;load status +1ce6 : 48 > pha > cmp_flag $ff -1c9e : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +1ce7 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -1ca0 : d0fe > bne * ;failed not equal (non zero) +1ce9 : d0fe > bne * ;failed not equal (non zero) > -1ca2 : 28 > plp ;restore status +1ceb : 28 > plp ;restore status -1ca3 : e003 cpx #3 +1cec : e003 cpx #3 trap_ne ;x altered during test -1ca5 : d0fe > bne * ;failed not equal (non zero) +1cee : d0fe > bne * ;failed not equal (non zero) -1ca7 : c042 cpy #$42 +1cf0 : c042 cpy #$42 trap_ne ;y altered during test -1ca9 : d0fe > bne * ;failed not equal (non zero) +1cf2 : d0fe > bne * ;failed not equal (non zero) -1cab : ba tsx -1cac : e0ff cpx #$ff +1cf4 : ba tsx +1cf5 : e0ff cpx #$ff trap_ne ;sp push/pop mismatch -1cae : d0fe > bne * ;failed not equal (non zero) +1cf7 : d0fe > bne * ;failed not equal (non zero) next_test -1cb0 : ad0202 > lda test_case ;previous test -1cb3 : c90f > cmp #test_num +1cf9 : ad0202 > lda test_case ;previous test +1cfc : c90f > cmp #test_num > trap_ne ;test is out of sequence -1cb5 : d0fe > bne * ;failed not equal (non zero) +1cfe : d0fe > bne * ;failed not equal (non zero) > 0010 = >test_num = test_num + 1 -1cb7 : a910 > lda #test_num ;*** next tests' number -1cb9 : 8d0202 > sta test_case +1d00 : a910 > lda #test_num ;*** next tests' number +1d02 : 8d0202 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test @@ -8577,338 +8674,338 @@ ffff = ram_top = -1 trap_ne ;altered bits in memory wrong endm -1cbc : a2c0 ldx #$c0 -1cbe : a000 ldy #0 ;op1 - memory save +1d05 : a2c0 ldx #$c0 +1d07 : a000 ldy #0 ;op1 - memory save ; zpt ;op1 - memory modifiable -1cc0 : 640b stz zpt+1 ;op2 - accu +1d09 : 640d stz zpt+1 ;op2 - accu ; zpt+2 ;and flags ; zpt+3 ;memory after reset ; zpt+4 ;memory after set -1cc2 : 98 tbt1 tya -1cc3 : 250b and zpt+1 ;set Z by anding the 2 operands -1cc5 : 08 php -1cc6 : 68 pla -1cc7 : 2902 and #fz ;mask Z -1cc9 : 850c sta zpt+2 -1ccb : 98 tya ;reset op1 bits by op2 -1ccc : 49ff eor #$ff -1cce : 050b ora zpt+1 -1cd0 : 49ff eor #$ff -1cd2 : 850d sta zpt+3 -1cd4 : 98 tya ;set op1 bits by op2 -1cd5 : 050b ora zpt+1 -1cd7 : 850e sta zpt+4 +1d0b : 98 tbt1 tya +1d0c : 250d and zpt+1 ;set Z by anding the 2 operands +1d0e : 08 php +1d0f : 68 pla +1d10 : 2902 and #fz ;mask Z +1d12 : 850e sta zpt+2 +1d14 : 98 tya ;reset op1 bits by op2 +1d15 : 49ff eor #$ff +1d17 : 050d ora zpt+1 +1d19 : 49ff eor #$ff +1d1b : 850f sta zpt+3 +1d1d : 98 tya ;set op1 bits by op2 +1d1e : 050d ora zpt+1 +1d20 : 8510 sta zpt+4 trbt zpt,$ff -1cd9 : 840a > sty zpt +1d22 : 840c > sty zpt > load_flag $ff -1cdb : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1d24 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1cdd : 48 > pha -1cde : a50b > lda zpt+1 -1ce0 : 28 > plp -1ce1 : 140a > trb zpt -1ce3 : 08 > php -1ce4 : c50b > cmp zpt+1 +1d26 : 48 > pha +1d27 : a50d > lda zpt+1 +1d29 : 28 > plp +1d2a : 140c > trb zpt +1d2c : 08 > php +1d2d : c50d > cmp zpt+1 > trap_ne ;accu was changed -1ce6 : d0fe > bne * ;failed not equal (non zero) +1d2f : d0fe > bne * ;failed not equal (non zero) > -1ce8 : 68 > pla -1ce9 : 48 > pha -1cea : 0902 > ora #fz ;mask Z +1d31 : 68 > pla +1d32 : 48 > pha +1d33 : 0902 > ora #fz ;mask Z > cmp_flag $ff|fz -1cec : c9ff > cmp #($ff|fz|fao)&m8 ;expected flags + always on bits +1d35 : c9ff > cmp #($ff|fz|fao)&m8 ;expected flags + always on bits > > trap_ne ;flags changed except Z -1cee : d0fe > bne * ;failed not equal (non zero) +1d37 : d0fe > bne * ;failed not equal (non zero) > -1cf0 : 68 > pla -1cf1 : 2902 > and #fz -1cf3 : c50c > cmp zpt+2 +1d39 : 68 > pla +1d3a : 2902 > and #fz +1d3c : c50e > cmp zpt+2 > trap_ne ;Z flag invalid -1cf5 : d0fe > bne * ;failed not equal (non zero) +1d3e : d0fe > bne * ;failed not equal (non zero) > -1cf7 : a50d > lda zpt+3 -1cf9 : c50a > cmp zpt +1d40 : a50f > lda zpt+3 +1d42 : c50c > cmp zpt > trap_ne ;altered bits in memory wrong -1cfb : d0fe > bne * ;failed not equal (non zero) +1d44 : d0fe > bne * ;failed not equal (non zero) > trbt abst,$ff -1cfd : 8c0502 > sty abst +1d46 : 8c0502 > sty abst > load_flag $ff -1d00 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1d49 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1d02 : 48 > pha -1d03 : a50b > lda zpt+1 -1d05 : 28 > plp -1d06 : 1c0502 > trb abst -1d09 : 08 > php -1d0a : c50b > cmp zpt+1 +1d4b : 48 > pha +1d4c : a50d > lda zpt+1 +1d4e : 28 > plp +1d4f : 1c0502 > trb abst +1d52 : 08 > php +1d53 : c50d > cmp zpt+1 > trap_ne ;accu was changed -1d0c : d0fe > bne * ;failed not equal (non zero) +1d55 : d0fe > bne * ;failed not equal (non zero) > -1d0e : 68 > pla -1d0f : 48 > pha -1d10 : 0902 > ora #fz ;mask Z +1d57 : 68 > pla +1d58 : 48 > pha +1d59 : 0902 > ora #fz ;mask Z > cmp_flag $ff|fz -1d12 : c9ff > cmp #($ff|fz|fao)&m8 ;expected flags + always on bits +1d5b : c9ff > cmp #($ff|fz|fao)&m8 ;expected flags + always on bits > > trap_ne ;flags changed except Z -1d14 : d0fe > bne * ;failed not equal (non zero) +1d5d : d0fe > bne * ;failed not equal (non zero) > -1d16 : 68 > pla -1d17 : 2902 > and #fz -1d19 : c50c > cmp zpt+2 +1d5f : 68 > pla +1d60 : 2902 > and #fz +1d62 : c50e > cmp zpt+2 > trap_ne ;Z flag invalid -1d1b : d0fe > bne * ;failed not equal (non zero) +1d64 : d0fe > bne * ;failed not equal (non zero) > -1d1d : a50d > lda zpt+3 -1d1f : c50a > cmp zpt +1d66 : a50f > lda zpt+3 +1d68 : c50c > cmp zpt > trap_ne ;altered bits in memory wrong -1d21 : d0fe > bne * ;failed not equal (non zero) +1d6a : d0fe > bne * ;failed not equal (non zero) > trbt zpt,0 -1d23 : 840a > sty zpt +1d6c : 840c > sty zpt > load_flag 0 -1d25 : a900 > lda #0 ;allow test to change I-flag (no mask) +1d6e : a900 > lda #0 ;allow test to change I-flag (no mask) > -1d27 : 48 > pha -1d28 : a50b > lda zpt+1 -1d2a : 28 > plp -1d2b : 140a > trb zpt -1d2d : 08 > php -1d2e : c50b > cmp zpt+1 +1d70 : 48 > pha +1d71 : a50d > lda zpt+1 +1d73 : 28 > plp +1d74 : 140c > trb zpt +1d76 : 08 > php +1d77 : c50d > cmp zpt+1 > trap_ne ;accu was changed -1d30 : d0fe > bne * ;failed not equal (non zero) +1d79 : d0fe > bne * ;failed not equal (non zero) > -1d32 : 68 > pla -1d33 : 48 > pha -1d34 : 0902 > ora #fz ;mask Z +1d7b : 68 > pla +1d7c : 48 > pha +1d7d : 0902 > ora #fz ;mask Z > cmp_flag 0|fz -1d36 : c932 > cmp #(0|fz|fao)&m8 ;expected flags + always on bits +1d7f : c932 > cmp #(0|fz|fao)&m8 ;expected flags + always on bits > > trap_ne ;flags changed except Z -1d38 : d0fe > bne * ;failed not equal (non zero) +1d81 : d0fe > bne * ;failed not equal (non zero) > -1d3a : 68 > pla -1d3b : 2902 > and #fz -1d3d : c50c > cmp zpt+2 +1d83 : 68 > pla +1d84 : 2902 > and #fz +1d86 : c50e > cmp zpt+2 > trap_ne ;Z flag invalid -1d3f : d0fe > bne * ;failed not equal (non zero) +1d88 : d0fe > bne * ;failed not equal (non zero) > -1d41 : a50d > lda zpt+3 -1d43 : c50a > cmp zpt +1d8a : a50f > lda zpt+3 +1d8c : c50c > cmp zpt > trap_ne ;altered bits in memory wrong -1d45 : d0fe > bne * ;failed not equal (non zero) +1d8e : d0fe > bne * ;failed not equal (non zero) > trbt abst,0 -1d47 : 8c0502 > sty abst +1d90 : 8c0502 > sty abst > load_flag 0 -1d4a : a900 > lda #0 ;allow test to change I-flag (no mask) +1d93 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1d4c : 48 > pha -1d4d : a50b > lda zpt+1 -1d4f : 28 > plp -1d50 : 1c0502 > trb abst -1d53 : 08 > php -1d54 : c50b > cmp zpt+1 +1d95 : 48 > pha +1d96 : a50d > lda zpt+1 +1d98 : 28 > plp +1d99 : 1c0502 > trb abst +1d9c : 08 > php +1d9d : c50d > cmp zpt+1 > trap_ne ;accu was changed -1d56 : d0fe > bne * ;failed not equal (non zero) +1d9f : d0fe > bne * ;failed not equal (non zero) > -1d58 : 68 > pla -1d59 : 48 > pha -1d5a : 0902 > ora #fz ;mask Z +1da1 : 68 > pla +1da2 : 48 > pha +1da3 : 0902 > ora #fz ;mask Z > cmp_flag 0|fz -1d5c : c932 > cmp #(0|fz|fao)&m8 ;expected flags + always on bits +1da5 : c932 > cmp #(0|fz|fao)&m8 ;expected flags + always on bits > > trap_ne ;flags changed except Z -1d5e : d0fe > bne * ;failed not equal (non zero) +1da7 : d0fe > bne * ;failed not equal (non zero) > -1d60 : 68 > pla -1d61 : 2902 > and #fz -1d63 : c50c > cmp zpt+2 +1da9 : 68 > pla +1daa : 2902 > and #fz +1dac : c50e > cmp zpt+2 > trap_ne ;Z flag invalid -1d65 : d0fe > bne * ;failed not equal (non zero) +1dae : d0fe > bne * ;failed not equal (non zero) > -1d67 : a50d > lda zpt+3 -1d69 : c50a > cmp zpt +1db0 : a50f > lda zpt+3 +1db2 : c50c > cmp zpt > trap_ne ;altered bits in memory wrong -1d6b : d0fe > bne * ;failed not equal (non zero) +1db4 : d0fe > bne * ;failed not equal (non zero) > tsbt zpt,$ff -1d6d : 840a > sty zpt +1db6 : 840c > sty zpt > load_flag $ff -1d6f : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1db8 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1d71 : 48 > pha -1d72 : a50b > lda zpt+1 -1d74 : 28 > plp -1d75 : 040a > tsb zpt -1d77 : 08 > php -1d78 : c50b > cmp zpt+1 +1dba : 48 > pha +1dbb : a50d > lda zpt+1 +1dbd : 28 > plp +1dbe : 040c > tsb zpt +1dc0 : 08 > php +1dc1 : c50d > cmp zpt+1 > trap_ne ;accu was changed -1d7a : d0fe > bne * ;failed not equal (non zero) +1dc3 : d0fe > bne * ;failed not equal (non zero) > -1d7c : 68 > pla -1d7d : 48 > pha -1d7e : 0902 > ora #fz ;mask Z +1dc5 : 68 > pla +1dc6 : 48 > pha +1dc7 : 0902 > ora #fz ;mask Z > cmp_flag $ff|fz -1d80 : c9ff > cmp #($ff|fz|fao)&m8 ;expected flags + always on bits +1dc9 : c9ff > cmp #($ff|fz|fao)&m8 ;expected flags + always on bits > > trap_ne ;flags changed except Z -1d82 : d0fe > bne * ;failed not equal (non zero) +1dcb : d0fe > bne * ;failed not equal (non zero) > -1d84 : 68 > pla -1d85 : 2902 > and #fz -1d87 : c50c > cmp zpt+2 +1dcd : 68 > pla +1dce : 2902 > and #fz +1dd0 : c50e > cmp zpt+2 > trap_ne ;Z flag invalid -1d89 : d0fe > bne * ;failed not equal (non zero) +1dd2 : d0fe > bne * ;failed not equal (non zero) > -1d8b : a50e > lda zpt+4 -1d8d : c50a > cmp zpt +1dd4 : a510 > lda zpt+4 +1dd6 : c50c > cmp zpt > trap_ne ;altered bits in memory wrong -1d8f : d0fe > bne * ;failed not equal (non zero) +1dd8 : d0fe > bne * ;failed not equal (non zero) > tsbt abst,$ff -1d91 : 8c0502 > sty abst +1dda : 8c0502 > sty abst > load_flag $ff -1d94 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1ddd : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1d96 : 48 > pha -1d97 : a50b > lda zpt+1 -1d99 : 28 > plp -1d9a : 0c0502 > tsb abst -1d9d : 08 > php -1d9e : c50b > cmp zpt+1 +1ddf : 48 > pha +1de0 : a50d > lda zpt+1 +1de2 : 28 > plp +1de3 : 0c0502 > tsb abst +1de6 : 08 > php +1de7 : c50d > cmp zpt+1 > trap_ne ;accu was changed -1da0 : d0fe > bne * ;failed not equal (non zero) +1de9 : d0fe > bne * ;failed not equal (non zero) > -1da2 : 68 > pla -1da3 : 48 > pha -1da4 : 0902 > ora #fz ;mask Z +1deb : 68 > pla +1dec : 48 > pha +1ded : 0902 > ora #fz ;mask Z > cmp_flag $ff|fz -1da6 : c9ff > cmp #($ff|fz|fao)&m8 ;expected flags + always on bits +1def : c9ff > cmp #($ff|fz|fao)&m8 ;expected flags + always on bits > > trap_ne ;flags changed except Z -1da8 : d0fe > bne * ;failed not equal (non zero) +1df1 : d0fe > bne * ;failed not equal (non zero) > -1daa : 68 > pla -1dab : 2902 > and #fz -1dad : c50c > cmp zpt+2 +1df3 : 68 > pla +1df4 : 2902 > and #fz +1df6 : c50e > cmp zpt+2 > trap_ne ;Z flag invalid -1daf : d0fe > bne * ;failed not equal (non zero) +1df8 : d0fe > bne * ;failed not equal (non zero) > -1db1 : a50e > lda zpt+4 -1db3 : c50a > cmp zpt +1dfa : a510 > lda zpt+4 +1dfc : c50c > cmp zpt > trap_ne ;altered bits in memory wrong -1db5 : d0fe > bne * ;failed not equal (non zero) +1dfe : d0fe > bne * ;failed not equal (non zero) > tsbt zpt,0 -1db7 : 840a > sty zpt +1e00 : 840c > sty zpt > load_flag 0 -1db9 : a900 > lda #0 ;allow test to change I-flag (no mask) +1e02 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1dbb : 48 > pha -1dbc : a50b > lda zpt+1 -1dbe : 28 > plp -1dbf : 040a > tsb zpt -1dc1 : 08 > php -1dc2 : c50b > cmp zpt+1 +1e04 : 48 > pha +1e05 : a50d > lda zpt+1 +1e07 : 28 > plp +1e08 : 040c > tsb zpt +1e0a : 08 > php +1e0b : c50d > cmp zpt+1 > trap_ne ;accu was changed -1dc4 : d0fe > bne * ;failed not equal (non zero) +1e0d : d0fe > bne * ;failed not equal (non zero) > -1dc6 : 68 > pla -1dc7 : 48 > pha -1dc8 : 0902 > ora #fz ;mask Z +1e0f : 68 > pla +1e10 : 48 > pha +1e11 : 0902 > ora #fz ;mask Z > cmp_flag 0|fz -1dca : c932 > cmp #(0|fz|fao)&m8 ;expected flags + always on bits +1e13 : c932 > cmp #(0|fz|fao)&m8 ;expected flags + always on bits > > trap_ne ;flags changed except Z -1dcc : d0fe > bne * ;failed not equal (non zero) +1e15 : d0fe > bne * ;failed not equal (non zero) > -1dce : 68 > pla -1dcf : 2902 > and #fz -1dd1 : c50c > cmp zpt+2 +1e17 : 68 > pla +1e18 : 2902 > and #fz +1e1a : c50e > cmp zpt+2 > trap_ne ;Z flag invalid -1dd3 : d0fe > bne * ;failed not equal (non zero) +1e1c : d0fe > bne * ;failed not equal (non zero) > -1dd5 : a50e > lda zpt+4 -1dd7 : c50a > cmp zpt +1e1e : a510 > lda zpt+4 +1e20 : c50c > cmp zpt > trap_ne ;altered bits in memory wrong -1dd9 : d0fe > bne * ;failed not equal (non zero) +1e22 : d0fe > bne * ;failed not equal (non zero) > tsbt abst,0 -1ddb : 8c0502 > sty abst +1e24 : 8c0502 > sty abst > load_flag 0 -1dde : a900 > lda #0 ;allow test to change I-flag (no mask) +1e27 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1de0 : 48 > pha -1de1 : a50b > lda zpt+1 -1de3 : 28 > plp -1de4 : 0c0502 > tsb abst -1de7 : 08 > php -1de8 : c50b > cmp zpt+1 +1e29 : 48 > pha +1e2a : a50d > lda zpt+1 +1e2c : 28 > plp +1e2d : 0c0502 > tsb abst +1e30 : 08 > php +1e31 : c50d > cmp zpt+1 > trap_ne ;accu was changed -1dea : d0fe > bne * ;failed not equal (non zero) +1e33 : d0fe > bne * ;failed not equal (non zero) > -1dec : 68 > pla -1ded : 48 > pha -1dee : 0902 > ora #fz ;mask Z +1e35 : 68 > pla +1e36 : 48 > pha +1e37 : 0902 > ora #fz ;mask Z > cmp_flag 0|fz -1df0 : c932 > cmp #(0|fz|fao)&m8 ;expected flags + always on bits +1e39 : c932 > cmp #(0|fz|fao)&m8 ;expected flags + always on bits > > trap_ne ;flags changed except Z -1df2 : d0fe > bne * ;failed not equal (non zero) +1e3b : d0fe > bne * ;failed not equal (non zero) > -1df4 : 68 > pla -1df5 : 2902 > and #fz -1df7 : c50c > cmp zpt+2 +1e3d : 68 > pla +1e3e : 2902 > and #fz +1e40 : c50e > cmp zpt+2 > trap_ne ;Z flag invalid -1df9 : d0fe > bne * ;failed not equal (non zero) +1e42 : d0fe > bne * ;failed not equal (non zero) > -1dfb : a50e > lda zpt+4 -1dfd : c50a > cmp zpt +1e44 : a510 > lda zpt+4 +1e46 : c50c > cmp zpt > trap_ne ;altered bits in memory wrong -1dff : d0fe > bne * ;failed not equal (non zero) +1e48 : d0fe > bne * ;failed not equal (non zero) > -1e01 : c8 iny ;iterate op1 -1e02 : d004 bne tbt3 -1e04 : e60b inc zpt+1 ;iterate op2 -1e06 : f003 beq tbt2 -1e08 : 4cc21c tbt3 jmp tbt1 -1e0b : tbt2 -1e0b : e0c0 cpx #$c0 +1e4a : c8 iny ;iterate op1 +1e4b : d004 bne tbt3 +1e4d : e60d inc zpt+1 ;iterate op2 +1e4f : f003 beq tbt2 +1e51 : 4c0b1d tbt3 jmp tbt1 +1e54 : tbt2 +1e54 : e0c0 cpx #$c0 trap_ne ;x altered during test -1e0d : d0fe > bne * ;failed not equal (non zero) +1e56 : d0fe > bne * ;failed not equal (non zero) -1e0f : ba tsx -1e10 : e0ff cpx #$ff +1e58 : ba tsx +1e59 : e0ff cpx #$ff trap_ne ;sp push/pop mismatch -1e12 : d0fe > bne * ;failed not equal (non zero) +1e5b : d0fe > bne * ;failed not equal (non zero) next_test -1e14 : ad0202 > lda test_case ;previous test -1e17 : c910 > cmp #test_num +1e5d : ad0202 > lda test_case ;previous test +1e60 : c910 > cmp #test_num > trap_ne ;test is out of sequence -1e19 : d0fe > bne * ;failed not equal (non zero) +1e62 : d0fe > bne * ;failed not equal (non zero) > 0011 = >test_num = test_num + 1 -1e1b : a911 > lda #test_num ;*** next tests' number -1e1d : 8d0202 > sta test_case +1e64 : a911 > lda #test_num ;*** next tests' number +1e66 : 8d0202 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test - if rkwl_wdc_op + if rkwl_wdc_op = 1 ; testing RMB, SMB - zp rmbt macro ;\1 = bitnum lda #$ff @@ -8946,1555 +9043,1555 @@ ffff = ram_top = -1 trap_ne ;wrong bits set or cleared endm -1e20 : a2ba ldx #$ba ;protect x & y -1e22 : a0d0 ldy #$d0 +1e69 : a2ba ldx #$ba ;protect x & y +1e6b : a0d0 ldy #$d0 rmbt 0 -1e24 : a9ff > lda #$ff -1e26 : 850a > sta zpt +1e6d : a9ff > lda #$ff +1e6f : 850c > sta zpt > set_a $a5,0 > load_flag 0 -1e28 : a900 > lda #0 ;allow test to change I-flag (no mask) +1e71 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1e2a : 48 > pha ;use stack to load status -1e2b : a9a5 > lda #$a5 ;precharge accu -1e2d : 28 > plp +1e73 : 48 > pha ;use stack to load status +1e74 : a9a5 > lda #$a5 ;precharge accu +1e76 : 28 > plp > -1e2e : 070a > rmb 0,zpt +1e77 : 070c > rmb 0,zpt > tst_a $a5,0 -1e30 : 08 > php ;save flags -1e31 : c9a5 > cmp #$a5 ;test result +1e79 : 08 > php ;save flags +1e7a : c9a5 > cmp #$a5 ;test result > trap_ne -1e33 : d0fe > bne * ;failed not equal (non zero) +1e7c : d0fe > bne * ;failed not equal (non zero) > -1e35 : 68 > pla ;load status -1e36 : 48 > pha +1e7e : 68 > pla ;load status +1e7f : 48 > pha > cmp_flag 0 -1e37 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +1e80 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -1e39 : d0fe > bne * ;failed not equal (non zero) +1e82 : d0fe > bne * ;failed not equal (non zero) > -1e3b : 28 > plp ;restore status +1e84 : 28 > plp ;restore status > -1e3c : a50a > lda zpt -1e3e : c9fe > cmp #$ff-(1<<0) +1e85 : a50c > lda zpt +1e87 : c9fe > cmp #$ff-(1<<0) > trap_ne ;wrong bits set or cleared -1e40 : d0fe > bne * ;failed not equal (non zero) +1e89 : d0fe > bne * ;failed not equal (non zero) > -1e42 : a901 > lda #1<<0 -1e44 : 850a > sta zpt +1e8b : a901 > lda #1<<0 +1e8d : 850c > sta zpt > set_a $5a,$ff > load_flag $ff -1e46 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1e8f : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1e48 : 48 > pha ;use stack to load status -1e49 : a95a > lda #$5a ;precharge accu -1e4b : 28 > plp +1e91 : 48 > pha ;use stack to load status +1e92 : a95a > lda #$5a ;precharge accu +1e94 : 28 > plp > -1e4c : 070a > rmb 0,zpt +1e95 : 070c > rmb 0,zpt > tst_a $5a,$ff -1e4e : 08 > php ;save flags -1e4f : c95a > cmp #$5a ;test result +1e97 : 08 > php ;save flags +1e98 : c95a > cmp #$5a ;test result > trap_ne -1e51 : d0fe > bne * ;failed not equal (non zero) +1e9a : d0fe > bne * ;failed not equal (non zero) > -1e53 : 68 > pla ;load status -1e54 : 48 > pha +1e9c : 68 > pla ;load status +1e9d : 48 > pha > cmp_flag $ff -1e55 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +1e9e : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -1e57 : d0fe > bne * ;failed not equal (non zero) +1ea0 : d0fe > bne * ;failed not equal (non zero) > -1e59 : 28 > plp ;restore status +1ea2 : 28 > plp ;restore status > -1e5a : a50a > lda zpt +1ea3 : a50c > lda zpt > trap_ne ;wrong bits set or cleared -1e5c : d0fe > bne * ;failed not equal (non zero) +1ea5 : d0fe > bne * ;failed not equal (non zero) > rmbt 1 -1e5e : a9ff > lda #$ff -1e60 : 850a > sta zpt +1ea7 : a9ff > lda #$ff +1ea9 : 850c > sta zpt > set_a $a5,0 > load_flag 0 -1e62 : a900 > lda #0 ;allow test to change I-flag (no mask) +1eab : a900 > lda #0 ;allow test to change I-flag (no mask) > -1e64 : 48 > pha ;use stack to load status -1e65 : a9a5 > lda #$a5 ;precharge accu -1e67 : 28 > plp +1ead : 48 > pha ;use stack to load status +1eae : a9a5 > lda #$a5 ;precharge accu +1eb0 : 28 > plp > -1e68 : 170a > rmb 1,zpt +1eb1 : 170c > rmb 1,zpt > tst_a $a5,0 -1e6a : 08 > php ;save flags -1e6b : c9a5 > cmp #$a5 ;test result +1eb3 : 08 > php ;save flags +1eb4 : c9a5 > cmp #$a5 ;test result > trap_ne -1e6d : d0fe > bne * ;failed not equal (non zero) +1eb6 : d0fe > bne * ;failed not equal (non zero) > -1e6f : 68 > pla ;load status -1e70 : 48 > pha +1eb8 : 68 > pla ;load status +1eb9 : 48 > pha > cmp_flag 0 -1e71 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +1eba : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -1e73 : d0fe > bne * ;failed not equal (non zero) +1ebc : d0fe > bne * ;failed not equal (non zero) > -1e75 : 28 > plp ;restore status +1ebe : 28 > plp ;restore status > -1e76 : a50a > lda zpt -1e78 : c9fd > cmp #$ff-(1<<1) +1ebf : a50c > lda zpt +1ec1 : c9fd > cmp #$ff-(1<<1) > trap_ne ;wrong bits set or cleared -1e7a : d0fe > bne * ;failed not equal (non zero) +1ec3 : d0fe > bne * ;failed not equal (non zero) > -1e7c : a902 > lda #1<<1 -1e7e : 850a > sta zpt +1ec5 : a902 > lda #1<<1 +1ec7 : 850c > sta zpt > set_a $5a,$ff > load_flag $ff -1e80 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1ec9 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1e82 : 48 > pha ;use stack to load status -1e83 : a95a > lda #$5a ;precharge accu -1e85 : 28 > plp +1ecb : 48 > pha ;use stack to load status +1ecc : a95a > lda #$5a ;precharge accu +1ece : 28 > plp > -1e86 : 170a > rmb 1,zpt +1ecf : 170c > rmb 1,zpt > tst_a $5a,$ff -1e88 : 08 > php ;save flags -1e89 : c95a > cmp #$5a ;test result +1ed1 : 08 > php ;save flags +1ed2 : c95a > cmp #$5a ;test result > trap_ne -1e8b : d0fe > bne * ;failed not equal (non zero) +1ed4 : d0fe > bne * ;failed not equal (non zero) > -1e8d : 68 > pla ;load status -1e8e : 48 > pha +1ed6 : 68 > pla ;load status +1ed7 : 48 > pha > cmp_flag $ff -1e8f : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +1ed8 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -1e91 : d0fe > bne * ;failed not equal (non zero) +1eda : d0fe > bne * ;failed not equal (non zero) > -1e93 : 28 > plp ;restore status +1edc : 28 > plp ;restore status > -1e94 : a50a > lda zpt +1edd : a50c > lda zpt > trap_ne ;wrong bits set or cleared -1e96 : d0fe > bne * ;failed not equal (non zero) +1edf : d0fe > bne * ;failed not equal (non zero) > rmbt 2 -1e98 : a9ff > lda #$ff -1e9a : 850a > sta zpt +1ee1 : a9ff > lda #$ff +1ee3 : 850c > sta zpt > set_a $a5,0 > load_flag 0 -1e9c : a900 > lda #0 ;allow test to change I-flag (no mask) +1ee5 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1e9e : 48 > pha ;use stack to load status -1e9f : a9a5 > lda #$a5 ;precharge accu -1ea1 : 28 > plp +1ee7 : 48 > pha ;use stack to load status +1ee8 : a9a5 > lda #$a5 ;precharge accu +1eea : 28 > plp > -1ea2 : 270a > rmb 2,zpt +1eeb : 270c > rmb 2,zpt > tst_a $a5,0 -1ea4 : 08 > php ;save flags -1ea5 : c9a5 > cmp #$a5 ;test result +1eed : 08 > php ;save flags +1eee : c9a5 > cmp #$a5 ;test result > trap_ne -1ea7 : d0fe > bne * ;failed not equal (non zero) +1ef0 : d0fe > bne * ;failed not equal (non zero) > -1ea9 : 68 > pla ;load status -1eaa : 48 > pha +1ef2 : 68 > pla ;load status +1ef3 : 48 > pha > cmp_flag 0 -1eab : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +1ef4 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -1ead : d0fe > bne * ;failed not equal (non zero) +1ef6 : d0fe > bne * ;failed not equal (non zero) > -1eaf : 28 > plp ;restore status +1ef8 : 28 > plp ;restore status > -1eb0 : a50a > lda zpt -1eb2 : c9fb > cmp #$ff-(1<<2) +1ef9 : a50c > lda zpt +1efb : c9fb > cmp #$ff-(1<<2) > trap_ne ;wrong bits set or cleared -1eb4 : d0fe > bne * ;failed not equal (non zero) +1efd : d0fe > bne * ;failed not equal (non zero) > -1eb6 : a904 > lda #1<<2 -1eb8 : 850a > sta zpt +1eff : a904 > lda #1<<2 +1f01 : 850c > sta zpt > set_a $5a,$ff > load_flag $ff -1eba : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1f03 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1ebc : 48 > pha ;use stack to load status -1ebd : a95a > lda #$5a ;precharge accu -1ebf : 28 > plp +1f05 : 48 > pha ;use stack to load status +1f06 : a95a > lda #$5a ;precharge accu +1f08 : 28 > plp > -1ec0 : 270a > rmb 2,zpt +1f09 : 270c > rmb 2,zpt > tst_a $5a,$ff -1ec2 : 08 > php ;save flags -1ec3 : c95a > cmp #$5a ;test result +1f0b : 08 > php ;save flags +1f0c : c95a > cmp #$5a ;test result > trap_ne -1ec5 : d0fe > bne * ;failed not equal (non zero) +1f0e : d0fe > bne * ;failed not equal (non zero) > -1ec7 : 68 > pla ;load status -1ec8 : 48 > pha +1f10 : 68 > pla ;load status +1f11 : 48 > pha > cmp_flag $ff -1ec9 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +1f12 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -1ecb : d0fe > bne * ;failed not equal (non zero) +1f14 : d0fe > bne * ;failed not equal (non zero) > -1ecd : 28 > plp ;restore status +1f16 : 28 > plp ;restore status > -1ece : a50a > lda zpt +1f17 : a50c > lda zpt > trap_ne ;wrong bits set or cleared -1ed0 : d0fe > bne * ;failed not equal (non zero) +1f19 : d0fe > bne * ;failed not equal (non zero) > rmbt 3 -1ed2 : a9ff > lda #$ff -1ed4 : 850a > sta zpt +1f1b : a9ff > lda #$ff +1f1d : 850c > sta zpt > set_a $a5,0 > load_flag 0 -1ed6 : a900 > lda #0 ;allow test to change I-flag (no mask) +1f1f : a900 > lda #0 ;allow test to change I-flag (no mask) > -1ed8 : 48 > pha ;use stack to load status -1ed9 : a9a5 > lda #$a5 ;precharge accu -1edb : 28 > plp +1f21 : 48 > pha ;use stack to load status +1f22 : a9a5 > lda #$a5 ;precharge accu +1f24 : 28 > plp > -1edc : 370a > rmb 3,zpt +1f25 : 370c > rmb 3,zpt > tst_a $a5,0 -1ede : 08 > php ;save flags -1edf : c9a5 > cmp #$a5 ;test result +1f27 : 08 > php ;save flags +1f28 : c9a5 > cmp #$a5 ;test result > trap_ne -1ee1 : d0fe > bne * ;failed not equal (non zero) +1f2a : d0fe > bne * ;failed not equal (non zero) > -1ee3 : 68 > pla ;load status -1ee4 : 48 > pha +1f2c : 68 > pla ;load status +1f2d : 48 > pha > cmp_flag 0 -1ee5 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +1f2e : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -1ee7 : d0fe > bne * ;failed not equal (non zero) +1f30 : d0fe > bne * ;failed not equal (non zero) > -1ee9 : 28 > plp ;restore status +1f32 : 28 > plp ;restore status > -1eea : a50a > lda zpt -1eec : c9f7 > cmp #$ff-(1<<3) +1f33 : a50c > lda zpt +1f35 : c9f7 > cmp #$ff-(1<<3) > trap_ne ;wrong bits set or cleared -1eee : d0fe > bne * ;failed not equal (non zero) +1f37 : d0fe > bne * ;failed not equal (non zero) > -1ef0 : a908 > lda #1<<3 -1ef2 : 850a > sta zpt +1f39 : a908 > lda #1<<3 +1f3b : 850c > sta zpt > set_a $5a,$ff > load_flag $ff -1ef4 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1f3d : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1ef6 : 48 > pha ;use stack to load status -1ef7 : a95a > lda #$5a ;precharge accu -1ef9 : 28 > plp +1f3f : 48 > pha ;use stack to load status +1f40 : a95a > lda #$5a ;precharge accu +1f42 : 28 > plp > -1efa : 370a > rmb 3,zpt +1f43 : 370c > rmb 3,zpt > tst_a $5a,$ff -1efc : 08 > php ;save flags -1efd : c95a > cmp #$5a ;test result +1f45 : 08 > php ;save flags +1f46 : c95a > cmp #$5a ;test result > trap_ne -1eff : d0fe > bne * ;failed not equal (non zero) +1f48 : d0fe > bne * ;failed not equal (non zero) > -1f01 : 68 > pla ;load status -1f02 : 48 > pha +1f4a : 68 > pla ;load status +1f4b : 48 > pha > cmp_flag $ff -1f03 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +1f4c : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -1f05 : d0fe > bne * ;failed not equal (non zero) +1f4e : d0fe > bne * ;failed not equal (non zero) > -1f07 : 28 > plp ;restore status +1f50 : 28 > plp ;restore status > -1f08 : a50a > lda zpt +1f51 : a50c > lda zpt > trap_ne ;wrong bits set or cleared -1f0a : d0fe > bne * ;failed not equal (non zero) +1f53 : d0fe > bne * ;failed not equal (non zero) > rmbt 4 -1f0c : a9ff > lda #$ff -1f0e : 850a > sta zpt +1f55 : a9ff > lda #$ff +1f57 : 850c > sta zpt > set_a $a5,0 > load_flag 0 -1f10 : a900 > lda #0 ;allow test to change I-flag (no mask) +1f59 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1f12 : 48 > pha ;use stack to load status -1f13 : a9a5 > lda #$a5 ;precharge accu -1f15 : 28 > plp +1f5b : 48 > pha ;use stack to load status +1f5c : a9a5 > lda #$a5 ;precharge accu +1f5e : 28 > plp > -1f16 : 470a > rmb 4,zpt +1f5f : 470c > rmb 4,zpt > tst_a $a5,0 -1f18 : 08 > php ;save flags -1f19 : c9a5 > cmp #$a5 ;test result +1f61 : 08 > php ;save flags +1f62 : c9a5 > cmp #$a5 ;test result > trap_ne -1f1b : d0fe > bne * ;failed not equal (non zero) +1f64 : d0fe > bne * ;failed not equal (non zero) > -1f1d : 68 > pla ;load status -1f1e : 48 > pha +1f66 : 68 > pla ;load status +1f67 : 48 > pha > cmp_flag 0 -1f1f : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +1f68 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -1f21 : d0fe > bne * ;failed not equal (non zero) +1f6a : d0fe > bne * ;failed not equal (non zero) > -1f23 : 28 > plp ;restore status +1f6c : 28 > plp ;restore status > -1f24 : a50a > lda zpt -1f26 : c9ef > cmp #$ff-(1<<4) +1f6d : a50c > lda zpt +1f6f : c9ef > cmp #$ff-(1<<4) > trap_ne ;wrong bits set or cleared -1f28 : d0fe > bne * ;failed not equal (non zero) +1f71 : d0fe > bne * ;failed not equal (non zero) > -1f2a : a910 > lda #1<<4 -1f2c : 850a > sta zpt +1f73 : a910 > lda #1<<4 +1f75 : 850c > sta zpt > set_a $5a,$ff > load_flag $ff -1f2e : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1f77 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1f30 : 48 > pha ;use stack to load status -1f31 : a95a > lda #$5a ;precharge accu -1f33 : 28 > plp +1f79 : 48 > pha ;use stack to load status +1f7a : a95a > lda #$5a ;precharge accu +1f7c : 28 > plp > -1f34 : 470a > rmb 4,zpt +1f7d : 470c > rmb 4,zpt > tst_a $5a,$ff -1f36 : 08 > php ;save flags -1f37 : c95a > cmp #$5a ;test result +1f7f : 08 > php ;save flags +1f80 : c95a > cmp #$5a ;test result > trap_ne -1f39 : d0fe > bne * ;failed not equal (non zero) +1f82 : d0fe > bne * ;failed not equal (non zero) > -1f3b : 68 > pla ;load status -1f3c : 48 > pha +1f84 : 68 > pla ;load status +1f85 : 48 > pha > cmp_flag $ff -1f3d : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +1f86 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -1f3f : d0fe > bne * ;failed not equal (non zero) +1f88 : d0fe > bne * ;failed not equal (non zero) > -1f41 : 28 > plp ;restore status +1f8a : 28 > plp ;restore status > -1f42 : a50a > lda zpt +1f8b : a50c > lda zpt > trap_ne ;wrong bits set or cleared -1f44 : d0fe > bne * ;failed not equal (non zero) +1f8d : d0fe > bne * ;failed not equal (non zero) > rmbt 5 -1f46 : a9ff > lda #$ff -1f48 : 850a > sta zpt +1f8f : a9ff > lda #$ff +1f91 : 850c > sta zpt > set_a $a5,0 > load_flag 0 -1f4a : a900 > lda #0 ;allow test to change I-flag (no mask) +1f93 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1f4c : 48 > pha ;use stack to load status -1f4d : a9a5 > lda #$a5 ;precharge accu -1f4f : 28 > plp +1f95 : 48 > pha ;use stack to load status +1f96 : a9a5 > lda #$a5 ;precharge accu +1f98 : 28 > plp > -1f50 : 570a > rmb 5,zpt +1f99 : 570c > rmb 5,zpt > tst_a $a5,0 -1f52 : 08 > php ;save flags -1f53 : c9a5 > cmp #$a5 ;test result +1f9b : 08 > php ;save flags +1f9c : c9a5 > cmp #$a5 ;test result > trap_ne -1f55 : d0fe > bne * ;failed not equal (non zero) +1f9e : d0fe > bne * ;failed not equal (non zero) > -1f57 : 68 > pla ;load status -1f58 : 48 > pha +1fa0 : 68 > pla ;load status +1fa1 : 48 > pha > cmp_flag 0 -1f59 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +1fa2 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -1f5b : d0fe > bne * ;failed not equal (non zero) +1fa4 : d0fe > bne * ;failed not equal (non zero) > -1f5d : 28 > plp ;restore status +1fa6 : 28 > plp ;restore status > -1f5e : a50a > lda zpt -1f60 : c9df > cmp #$ff-(1<<5) +1fa7 : a50c > lda zpt +1fa9 : c9df > cmp #$ff-(1<<5) > trap_ne ;wrong bits set or cleared -1f62 : d0fe > bne * ;failed not equal (non zero) +1fab : d0fe > bne * ;failed not equal (non zero) > -1f64 : a920 > lda #1<<5 -1f66 : 850a > sta zpt +1fad : a920 > lda #1<<5 +1faf : 850c > sta zpt > set_a $5a,$ff > load_flag $ff -1f68 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1fb1 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1f6a : 48 > pha ;use stack to load status -1f6b : a95a > lda #$5a ;precharge accu -1f6d : 28 > plp +1fb3 : 48 > pha ;use stack to load status +1fb4 : a95a > lda #$5a ;precharge accu +1fb6 : 28 > plp > -1f6e : 570a > rmb 5,zpt +1fb7 : 570c > rmb 5,zpt > tst_a $5a,$ff -1f70 : 08 > php ;save flags -1f71 : c95a > cmp #$5a ;test result +1fb9 : 08 > php ;save flags +1fba : c95a > cmp #$5a ;test result > trap_ne -1f73 : d0fe > bne * ;failed not equal (non zero) +1fbc : d0fe > bne * ;failed not equal (non zero) > -1f75 : 68 > pla ;load status -1f76 : 48 > pha +1fbe : 68 > pla ;load status +1fbf : 48 > pha > cmp_flag $ff -1f77 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +1fc0 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -1f79 : d0fe > bne * ;failed not equal (non zero) +1fc2 : d0fe > bne * ;failed not equal (non zero) > -1f7b : 28 > plp ;restore status +1fc4 : 28 > plp ;restore status > -1f7c : a50a > lda zpt +1fc5 : a50c > lda zpt > trap_ne ;wrong bits set or cleared -1f7e : d0fe > bne * ;failed not equal (non zero) +1fc7 : d0fe > bne * ;failed not equal (non zero) > rmbt 6 -1f80 : a9ff > lda #$ff -1f82 : 850a > sta zpt +1fc9 : a9ff > lda #$ff +1fcb : 850c > sta zpt > set_a $a5,0 > load_flag 0 -1f84 : a900 > lda #0 ;allow test to change I-flag (no mask) +1fcd : a900 > lda #0 ;allow test to change I-flag (no mask) > -1f86 : 48 > pha ;use stack to load status -1f87 : a9a5 > lda #$a5 ;precharge accu -1f89 : 28 > plp +1fcf : 48 > pha ;use stack to load status +1fd0 : a9a5 > lda #$a5 ;precharge accu +1fd2 : 28 > plp > -1f8a : 670a > rmb 6,zpt +1fd3 : 670c > rmb 6,zpt > tst_a $a5,0 -1f8c : 08 > php ;save flags -1f8d : c9a5 > cmp #$a5 ;test result +1fd5 : 08 > php ;save flags +1fd6 : c9a5 > cmp #$a5 ;test result > trap_ne -1f8f : d0fe > bne * ;failed not equal (non zero) +1fd8 : d0fe > bne * ;failed not equal (non zero) > -1f91 : 68 > pla ;load status -1f92 : 48 > pha +1fda : 68 > pla ;load status +1fdb : 48 > pha > cmp_flag 0 -1f93 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +1fdc : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -1f95 : d0fe > bne * ;failed not equal (non zero) +1fde : d0fe > bne * ;failed not equal (non zero) > -1f97 : 28 > plp ;restore status +1fe0 : 28 > plp ;restore status > -1f98 : a50a > lda zpt -1f9a : c9bf > cmp #$ff-(1<<6) +1fe1 : a50c > lda zpt +1fe3 : c9bf > cmp #$ff-(1<<6) > trap_ne ;wrong bits set or cleared -1f9c : d0fe > bne * ;failed not equal (non zero) +1fe5 : d0fe > bne * ;failed not equal (non zero) > -1f9e : a940 > lda #1<<6 -1fa0 : 850a > sta zpt +1fe7 : a940 > lda #1<<6 +1fe9 : 850c > sta zpt > set_a $5a,$ff > load_flag $ff -1fa2 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +1feb : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1fa4 : 48 > pha ;use stack to load status -1fa5 : a95a > lda #$5a ;precharge accu -1fa7 : 28 > plp +1fed : 48 > pha ;use stack to load status +1fee : a95a > lda #$5a ;precharge accu +1ff0 : 28 > plp > -1fa8 : 670a > rmb 6,zpt +1ff1 : 670c > rmb 6,zpt > tst_a $5a,$ff -1faa : 08 > php ;save flags -1fab : c95a > cmp #$5a ;test result +1ff3 : 08 > php ;save flags +1ff4 : c95a > cmp #$5a ;test result > trap_ne -1fad : d0fe > bne * ;failed not equal (non zero) +1ff6 : d0fe > bne * ;failed not equal (non zero) > -1faf : 68 > pla ;load status -1fb0 : 48 > pha +1ff8 : 68 > pla ;load status +1ff9 : 48 > pha > cmp_flag $ff -1fb1 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +1ffa : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -1fb3 : d0fe > bne * ;failed not equal (non zero) +1ffc : d0fe > bne * ;failed not equal (non zero) > -1fb5 : 28 > plp ;restore status +1ffe : 28 > plp ;restore status > -1fb6 : a50a > lda zpt +1fff : a50c > lda zpt > trap_ne ;wrong bits set or cleared -1fb8 : d0fe > bne * ;failed not equal (non zero) +2001 : d0fe > bne * ;failed not equal (non zero) > rmbt 7 -1fba : a9ff > lda #$ff -1fbc : 850a > sta zpt +2003 : a9ff > lda #$ff +2005 : 850c > sta zpt > set_a $a5,0 > load_flag 0 -1fbe : a900 > lda #0 ;allow test to change I-flag (no mask) +2007 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1fc0 : 48 > pha ;use stack to load status -1fc1 : a9a5 > lda #$a5 ;precharge accu -1fc3 : 28 > plp +2009 : 48 > pha ;use stack to load status +200a : a9a5 > lda #$a5 ;precharge accu +200c : 28 > plp > -1fc4 : 770a > rmb 7,zpt +200d : 770c > rmb 7,zpt > tst_a $a5,0 -1fc6 : 08 > php ;save flags -1fc7 : c9a5 > cmp #$a5 ;test result +200f : 08 > php ;save flags +2010 : c9a5 > cmp #$a5 ;test result > trap_ne -1fc9 : d0fe > bne * ;failed not equal (non zero) +2012 : d0fe > bne * ;failed not equal (non zero) > -1fcb : 68 > pla ;load status -1fcc : 48 > pha +2014 : 68 > pla ;load status +2015 : 48 > pha > cmp_flag 0 -1fcd : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +2016 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -1fcf : d0fe > bne * ;failed not equal (non zero) +2018 : d0fe > bne * ;failed not equal (non zero) > -1fd1 : 28 > plp ;restore status +201a : 28 > plp ;restore status > -1fd2 : a50a > lda zpt -1fd4 : c97f > cmp #$ff-(1<<7) +201b : a50c > lda zpt +201d : c97f > cmp #$ff-(1<<7) > trap_ne ;wrong bits set or cleared -1fd6 : d0fe > bne * ;failed not equal (non zero) +201f : d0fe > bne * ;failed not equal (non zero) > -1fd8 : a980 > lda #1<<7 -1fda : 850a > sta zpt +2021 : a980 > lda #1<<7 +2023 : 850c > sta zpt > set_a $5a,$ff > load_flag $ff -1fdc : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2025 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -1fde : 48 > pha ;use stack to load status -1fdf : a95a > lda #$5a ;precharge accu -1fe1 : 28 > plp +2027 : 48 > pha ;use stack to load status +2028 : a95a > lda #$5a ;precharge accu +202a : 28 > plp > -1fe2 : 770a > rmb 7,zpt +202b : 770c > rmb 7,zpt > tst_a $5a,$ff -1fe4 : 08 > php ;save flags -1fe5 : c95a > cmp #$5a ;test result +202d : 08 > php ;save flags +202e : c95a > cmp #$5a ;test result > trap_ne -1fe7 : d0fe > bne * ;failed not equal (non zero) +2030 : d0fe > bne * ;failed not equal (non zero) > -1fe9 : 68 > pla ;load status -1fea : 48 > pha +2032 : 68 > pla ;load status +2033 : 48 > pha > cmp_flag $ff -1feb : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +2034 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -1fed : d0fe > bne * ;failed not equal (non zero) +2036 : d0fe > bne * ;failed not equal (non zero) > -1fef : 28 > plp ;restore status +2038 : 28 > plp ;restore status > -1ff0 : a50a > lda zpt +2039 : a50c > lda zpt > trap_ne ;wrong bits set or cleared -1ff2 : d0fe > bne * ;failed not equal (non zero) +203b : d0fe > bne * ;failed not equal (non zero) > smbt 0 -1ff4 : a9fe > lda #$ff-(1<<0) -1ff6 : 850a > sta zpt +203d : a9fe > lda #$ff-(1<<0) +203f : 850c > sta zpt > set_a $a5,0 > load_flag 0 -1ff8 : a900 > lda #0 ;allow test to change I-flag (no mask) +2041 : a900 > lda #0 ;allow test to change I-flag (no mask) > -1ffa : 48 > pha ;use stack to load status -1ffb : a9a5 > lda #$a5 ;precharge accu -1ffd : 28 > plp +2043 : 48 > pha ;use stack to load status +2044 : a9a5 > lda #$a5 ;precharge accu +2046 : 28 > plp > -1ffe : 870a > smb 0,zpt +2047 : 870c > smb 0,zpt > tst_a $a5,0 -2000 : 08 > php ;save flags -2001 : c9a5 > cmp #$a5 ;test result +2049 : 08 > php ;save flags +204a : c9a5 > cmp #$a5 ;test result > trap_ne -2003 : d0fe > bne * ;failed not equal (non zero) +204c : d0fe > bne * ;failed not equal (non zero) > -2005 : 68 > pla ;load status -2006 : 48 > pha +204e : 68 > pla ;load status +204f : 48 > pha > cmp_flag 0 -2007 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +2050 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -2009 : d0fe > bne * ;failed not equal (non zero) +2052 : d0fe > bne * ;failed not equal (non zero) > -200b : 28 > plp ;restore status +2054 : 28 > plp ;restore status > -200c : a50a > lda zpt -200e : c9ff > cmp #$ff +2055 : a50c > lda zpt +2057 : c9ff > cmp #$ff > trap_ne ;wrong bits set or cleared -2010 : d0fe > bne * ;failed not equal (non zero) +2059 : d0fe > bne * ;failed not equal (non zero) > -2012 : a900 > lda #0 -2014 : 850a > sta zpt +205b : a900 > lda #0 +205d : 850c > sta zpt > set_a $5a,$ff > load_flag $ff -2016 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +205f : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2018 : 48 > pha ;use stack to load status -2019 : a95a > lda #$5a ;precharge accu -201b : 28 > plp +2061 : 48 > pha ;use stack to load status +2062 : a95a > lda #$5a ;precharge accu +2064 : 28 > plp > -201c : 870a > smb 0,zpt +2065 : 870c > smb 0,zpt > tst_a $5a,$ff -201e : 08 > php ;save flags -201f : c95a > cmp #$5a ;test result +2067 : 08 > php ;save flags +2068 : c95a > cmp #$5a ;test result > trap_ne -2021 : d0fe > bne * ;failed not equal (non zero) +206a : d0fe > bne * ;failed not equal (non zero) > -2023 : 68 > pla ;load status -2024 : 48 > pha +206c : 68 > pla ;load status +206d : 48 > pha > cmp_flag $ff -2025 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +206e : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -2027 : d0fe > bne * ;failed not equal (non zero) +2070 : d0fe > bne * ;failed not equal (non zero) > -2029 : 28 > plp ;restore status +2072 : 28 > plp ;restore status > -202a : a50a > lda zpt -202c : c901 > cmp #1<<0 +2073 : a50c > lda zpt +2075 : c901 > cmp #1<<0 > trap_ne ;wrong bits set or cleared -202e : d0fe > bne * ;failed not equal (non zero) +2077 : d0fe > bne * ;failed not equal (non zero) > smbt 1 -2030 : a9fd > lda #$ff-(1<<1) -2032 : 850a > sta zpt +2079 : a9fd > lda #$ff-(1<<1) +207b : 850c > sta zpt > set_a $a5,0 > load_flag 0 -2034 : a900 > lda #0 ;allow test to change I-flag (no mask) +207d : a900 > lda #0 ;allow test to change I-flag (no mask) > -2036 : 48 > pha ;use stack to load status -2037 : a9a5 > lda #$a5 ;precharge accu -2039 : 28 > plp +207f : 48 > pha ;use stack to load status +2080 : a9a5 > lda #$a5 ;precharge accu +2082 : 28 > plp > -203a : 970a > smb 1,zpt +2083 : 970c > smb 1,zpt > tst_a $a5,0 -203c : 08 > php ;save flags -203d : c9a5 > cmp #$a5 ;test result +2085 : 08 > php ;save flags +2086 : c9a5 > cmp #$a5 ;test result > trap_ne -203f : d0fe > bne * ;failed not equal (non zero) +2088 : d0fe > bne * ;failed not equal (non zero) > -2041 : 68 > pla ;load status -2042 : 48 > pha +208a : 68 > pla ;load status +208b : 48 > pha > cmp_flag 0 -2043 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +208c : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -2045 : d0fe > bne * ;failed not equal (non zero) +208e : d0fe > bne * ;failed not equal (non zero) > -2047 : 28 > plp ;restore status +2090 : 28 > plp ;restore status > -2048 : a50a > lda zpt -204a : c9ff > cmp #$ff +2091 : a50c > lda zpt +2093 : c9ff > cmp #$ff > trap_ne ;wrong bits set or cleared -204c : d0fe > bne * ;failed not equal (non zero) +2095 : d0fe > bne * ;failed not equal (non zero) > -204e : a900 > lda #0 -2050 : 850a > sta zpt +2097 : a900 > lda #0 +2099 : 850c > sta zpt > set_a $5a,$ff > load_flag $ff -2052 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +209b : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2054 : 48 > pha ;use stack to load status -2055 : a95a > lda #$5a ;precharge accu -2057 : 28 > plp +209d : 48 > pha ;use stack to load status +209e : a95a > lda #$5a ;precharge accu +20a0 : 28 > plp > -2058 : 970a > smb 1,zpt +20a1 : 970c > smb 1,zpt > tst_a $5a,$ff -205a : 08 > php ;save flags -205b : c95a > cmp #$5a ;test result +20a3 : 08 > php ;save flags +20a4 : c95a > cmp #$5a ;test result > trap_ne -205d : d0fe > bne * ;failed not equal (non zero) +20a6 : d0fe > bne * ;failed not equal (non zero) > -205f : 68 > pla ;load status -2060 : 48 > pha +20a8 : 68 > pla ;load status +20a9 : 48 > pha > cmp_flag $ff -2061 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +20aa : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -2063 : d0fe > bne * ;failed not equal (non zero) +20ac : d0fe > bne * ;failed not equal (non zero) > -2065 : 28 > plp ;restore status +20ae : 28 > plp ;restore status > -2066 : a50a > lda zpt -2068 : c902 > cmp #1<<1 +20af : a50c > lda zpt +20b1 : c902 > cmp #1<<1 > trap_ne ;wrong bits set or cleared -206a : d0fe > bne * ;failed not equal (non zero) +20b3 : d0fe > bne * ;failed not equal (non zero) > smbt 2 -206c : a9fb > lda #$ff-(1<<2) -206e : 850a > sta zpt +20b5 : a9fb > lda #$ff-(1<<2) +20b7 : 850c > sta zpt > set_a $a5,0 > load_flag 0 -2070 : a900 > lda #0 ;allow test to change I-flag (no mask) +20b9 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2072 : 48 > pha ;use stack to load status -2073 : a9a5 > lda #$a5 ;precharge accu -2075 : 28 > plp +20bb : 48 > pha ;use stack to load status +20bc : a9a5 > lda #$a5 ;precharge accu +20be : 28 > plp > -2076 : a70a > smb 2,zpt +20bf : a70c > smb 2,zpt > tst_a $a5,0 -2078 : 08 > php ;save flags -2079 : c9a5 > cmp #$a5 ;test result +20c1 : 08 > php ;save flags +20c2 : c9a5 > cmp #$a5 ;test result > trap_ne -207b : d0fe > bne * ;failed not equal (non zero) +20c4 : d0fe > bne * ;failed not equal (non zero) > -207d : 68 > pla ;load status -207e : 48 > pha +20c6 : 68 > pla ;load status +20c7 : 48 > pha > cmp_flag 0 -207f : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +20c8 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -2081 : d0fe > bne * ;failed not equal (non zero) +20ca : d0fe > bne * ;failed not equal (non zero) > -2083 : 28 > plp ;restore status +20cc : 28 > plp ;restore status > -2084 : a50a > lda zpt -2086 : c9ff > cmp #$ff +20cd : a50c > lda zpt +20cf : c9ff > cmp #$ff > trap_ne ;wrong bits set or cleared -2088 : d0fe > bne * ;failed not equal (non zero) +20d1 : d0fe > bne * ;failed not equal (non zero) > -208a : a900 > lda #0 -208c : 850a > sta zpt +20d3 : a900 > lda #0 +20d5 : 850c > sta zpt > set_a $5a,$ff > load_flag $ff -208e : a9ff > lda #$ff ;allow test to change I-flag (no mask) +20d7 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2090 : 48 > pha ;use stack to load status -2091 : a95a > lda #$5a ;precharge accu -2093 : 28 > plp +20d9 : 48 > pha ;use stack to load status +20da : a95a > lda #$5a ;precharge accu +20dc : 28 > plp > -2094 : a70a > smb 2,zpt +20dd : a70c > smb 2,zpt > tst_a $5a,$ff -2096 : 08 > php ;save flags -2097 : c95a > cmp #$5a ;test result +20df : 08 > php ;save flags +20e0 : c95a > cmp #$5a ;test result > trap_ne -2099 : d0fe > bne * ;failed not equal (non zero) +20e2 : d0fe > bne * ;failed not equal (non zero) > -209b : 68 > pla ;load status -209c : 48 > pha +20e4 : 68 > pla ;load status +20e5 : 48 > pha > cmp_flag $ff -209d : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +20e6 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -209f : d0fe > bne * ;failed not equal (non zero) +20e8 : d0fe > bne * ;failed not equal (non zero) > -20a1 : 28 > plp ;restore status +20ea : 28 > plp ;restore status > -20a2 : a50a > lda zpt -20a4 : c904 > cmp #1<<2 +20eb : a50c > lda zpt +20ed : c904 > cmp #1<<2 > trap_ne ;wrong bits set or cleared -20a6 : d0fe > bne * ;failed not equal (non zero) +20ef : d0fe > bne * ;failed not equal (non zero) > smbt 3 -20a8 : a9f7 > lda #$ff-(1<<3) -20aa : 850a > sta zpt +20f1 : a9f7 > lda #$ff-(1<<3) +20f3 : 850c > sta zpt > set_a $a5,0 > load_flag 0 -20ac : a900 > lda #0 ;allow test to change I-flag (no mask) +20f5 : a900 > lda #0 ;allow test to change I-flag (no mask) > -20ae : 48 > pha ;use stack to load status -20af : a9a5 > lda #$a5 ;precharge accu -20b1 : 28 > plp +20f7 : 48 > pha ;use stack to load status +20f8 : a9a5 > lda #$a5 ;precharge accu +20fa : 28 > plp > -20b2 : b70a > smb 3,zpt +20fb : b70c > smb 3,zpt > tst_a $a5,0 -20b4 : 08 > php ;save flags -20b5 : c9a5 > cmp #$a5 ;test result +20fd : 08 > php ;save flags +20fe : c9a5 > cmp #$a5 ;test result > trap_ne -20b7 : d0fe > bne * ;failed not equal (non zero) +2100 : d0fe > bne * ;failed not equal (non zero) > -20b9 : 68 > pla ;load status -20ba : 48 > pha +2102 : 68 > pla ;load status +2103 : 48 > pha > cmp_flag 0 -20bb : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +2104 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -20bd : d0fe > bne * ;failed not equal (non zero) +2106 : d0fe > bne * ;failed not equal (non zero) > -20bf : 28 > plp ;restore status +2108 : 28 > plp ;restore status > -20c0 : a50a > lda zpt -20c2 : c9ff > cmp #$ff +2109 : a50c > lda zpt +210b : c9ff > cmp #$ff > trap_ne ;wrong bits set or cleared -20c4 : d0fe > bne * ;failed not equal (non zero) +210d : d0fe > bne * ;failed not equal (non zero) > -20c6 : a900 > lda #0 -20c8 : 850a > sta zpt +210f : a900 > lda #0 +2111 : 850c > sta zpt > set_a $5a,$ff > load_flag $ff -20ca : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2113 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -20cc : 48 > pha ;use stack to load status -20cd : a95a > lda #$5a ;precharge accu -20cf : 28 > plp +2115 : 48 > pha ;use stack to load status +2116 : a95a > lda #$5a ;precharge accu +2118 : 28 > plp > -20d0 : b70a > smb 3,zpt +2119 : b70c > smb 3,zpt > tst_a $5a,$ff -20d2 : 08 > php ;save flags -20d3 : c95a > cmp #$5a ;test result +211b : 08 > php ;save flags +211c : c95a > cmp #$5a ;test result > trap_ne -20d5 : d0fe > bne * ;failed not equal (non zero) +211e : d0fe > bne * ;failed not equal (non zero) > -20d7 : 68 > pla ;load status -20d8 : 48 > pha +2120 : 68 > pla ;load status +2121 : 48 > pha > cmp_flag $ff -20d9 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +2122 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -20db : d0fe > bne * ;failed not equal (non zero) +2124 : d0fe > bne * ;failed not equal (non zero) > -20dd : 28 > plp ;restore status +2126 : 28 > plp ;restore status > -20de : a50a > lda zpt -20e0 : c908 > cmp #1<<3 +2127 : a50c > lda zpt +2129 : c908 > cmp #1<<3 > trap_ne ;wrong bits set or cleared -20e2 : d0fe > bne * ;failed not equal (non zero) +212b : d0fe > bne * ;failed not equal (non zero) > smbt 4 -20e4 : a9ef > lda #$ff-(1<<4) -20e6 : 850a > sta zpt +212d : a9ef > lda #$ff-(1<<4) +212f : 850c > sta zpt > set_a $a5,0 > load_flag 0 -20e8 : a900 > lda #0 ;allow test to change I-flag (no mask) +2131 : a900 > lda #0 ;allow test to change I-flag (no mask) > -20ea : 48 > pha ;use stack to load status -20eb : a9a5 > lda #$a5 ;precharge accu -20ed : 28 > plp +2133 : 48 > pha ;use stack to load status +2134 : a9a5 > lda #$a5 ;precharge accu +2136 : 28 > plp > -20ee : c70a > smb 4,zpt +2137 : c70c > smb 4,zpt > tst_a $a5,0 -20f0 : 08 > php ;save flags -20f1 : c9a5 > cmp #$a5 ;test result +2139 : 08 > php ;save flags +213a : c9a5 > cmp #$a5 ;test result > trap_ne -20f3 : d0fe > bne * ;failed not equal (non zero) +213c : d0fe > bne * ;failed not equal (non zero) > -20f5 : 68 > pla ;load status -20f6 : 48 > pha +213e : 68 > pla ;load status +213f : 48 > pha > cmp_flag 0 -20f7 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +2140 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -20f9 : d0fe > bne * ;failed not equal (non zero) +2142 : d0fe > bne * ;failed not equal (non zero) > -20fb : 28 > plp ;restore status +2144 : 28 > plp ;restore status > -20fc : a50a > lda zpt -20fe : c9ff > cmp #$ff +2145 : a50c > lda zpt +2147 : c9ff > cmp #$ff > trap_ne ;wrong bits set or cleared -2100 : d0fe > bne * ;failed not equal (non zero) +2149 : d0fe > bne * ;failed not equal (non zero) > -2102 : a900 > lda #0 -2104 : 850a > sta zpt +214b : a900 > lda #0 +214d : 850c > sta zpt > set_a $5a,$ff > load_flag $ff -2106 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +214f : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2108 : 48 > pha ;use stack to load status -2109 : a95a > lda #$5a ;precharge accu -210b : 28 > plp +2151 : 48 > pha ;use stack to load status +2152 : a95a > lda #$5a ;precharge accu +2154 : 28 > plp > -210c : c70a > smb 4,zpt +2155 : c70c > smb 4,zpt > tst_a $5a,$ff -210e : 08 > php ;save flags -210f : c95a > cmp #$5a ;test result +2157 : 08 > php ;save flags +2158 : c95a > cmp #$5a ;test result > trap_ne -2111 : d0fe > bne * ;failed not equal (non zero) +215a : d0fe > bne * ;failed not equal (non zero) > -2113 : 68 > pla ;load status -2114 : 48 > pha +215c : 68 > pla ;load status +215d : 48 > pha > cmp_flag $ff -2115 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +215e : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -2117 : d0fe > bne * ;failed not equal (non zero) +2160 : d0fe > bne * ;failed not equal (non zero) > -2119 : 28 > plp ;restore status +2162 : 28 > plp ;restore status > -211a : a50a > lda zpt -211c : c910 > cmp #1<<4 +2163 : a50c > lda zpt +2165 : c910 > cmp #1<<4 > trap_ne ;wrong bits set or cleared -211e : d0fe > bne * ;failed not equal (non zero) +2167 : d0fe > bne * ;failed not equal (non zero) > smbt 5 -2120 : a9df > lda #$ff-(1<<5) -2122 : 850a > sta zpt +2169 : a9df > lda #$ff-(1<<5) +216b : 850c > sta zpt > set_a $a5,0 > load_flag 0 -2124 : a900 > lda #0 ;allow test to change I-flag (no mask) +216d : a900 > lda #0 ;allow test to change I-flag (no mask) > -2126 : 48 > pha ;use stack to load status -2127 : a9a5 > lda #$a5 ;precharge accu -2129 : 28 > plp +216f : 48 > pha ;use stack to load status +2170 : a9a5 > lda #$a5 ;precharge accu +2172 : 28 > plp > -212a : d70a > smb 5,zpt +2173 : d70c > smb 5,zpt > tst_a $a5,0 -212c : 08 > php ;save flags -212d : c9a5 > cmp #$a5 ;test result +2175 : 08 > php ;save flags +2176 : c9a5 > cmp #$a5 ;test result > trap_ne -212f : d0fe > bne * ;failed not equal (non zero) +2178 : d0fe > bne * ;failed not equal (non zero) > -2131 : 68 > pla ;load status -2132 : 48 > pha +217a : 68 > pla ;load status +217b : 48 > pha > cmp_flag 0 -2133 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +217c : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -2135 : d0fe > bne * ;failed not equal (non zero) +217e : d0fe > bne * ;failed not equal (non zero) > -2137 : 28 > plp ;restore status +2180 : 28 > plp ;restore status > -2138 : a50a > lda zpt -213a : c9ff > cmp #$ff +2181 : a50c > lda zpt +2183 : c9ff > cmp #$ff > trap_ne ;wrong bits set or cleared -213c : d0fe > bne * ;failed not equal (non zero) +2185 : d0fe > bne * ;failed not equal (non zero) > -213e : a900 > lda #0 -2140 : 850a > sta zpt +2187 : a900 > lda #0 +2189 : 850c > sta zpt > set_a $5a,$ff > load_flag $ff -2142 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +218b : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2144 : 48 > pha ;use stack to load status -2145 : a95a > lda #$5a ;precharge accu -2147 : 28 > plp +218d : 48 > pha ;use stack to load status +218e : a95a > lda #$5a ;precharge accu +2190 : 28 > plp > -2148 : d70a > smb 5,zpt +2191 : d70c > smb 5,zpt > tst_a $5a,$ff -214a : 08 > php ;save flags -214b : c95a > cmp #$5a ;test result +2193 : 08 > php ;save flags +2194 : c95a > cmp #$5a ;test result > trap_ne -214d : d0fe > bne * ;failed not equal (non zero) +2196 : d0fe > bne * ;failed not equal (non zero) > -214f : 68 > pla ;load status -2150 : 48 > pha +2198 : 68 > pla ;load status +2199 : 48 > pha > cmp_flag $ff -2151 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +219a : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -2153 : d0fe > bne * ;failed not equal (non zero) +219c : d0fe > bne * ;failed not equal (non zero) > -2155 : 28 > plp ;restore status +219e : 28 > plp ;restore status > -2156 : a50a > lda zpt -2158 : c920 > cmp #1<<5 +219f : a50c > lda zpt +21a1 : c920 > cmp #1<<5 > trap_ne ;wrong bits set or cleared -215a : d0fe > bne * ;failed not equal (non zero) +21a3 : d0fe > bne * ;failed not equal (non zero) > smbt 6 -215c : a9bf > lda #$ff-(1<<6) -215e : 850a > sta zpt +21a5 : a9bf > lda #$ff-(1<<6) +21a7 : 850c > sta zpt > set_a $a5,0 > load_flag 0 -2160 : a900 > lda #0 ;allow test to change I-flag (no mask) +21a9 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2162 : 48 > pha ;use stack to load status -2163 : a9a5 > lda #$a5 ;precharge accu -2165 : 28 > plp +21ab : 48 > pha ;use stack to load status +21ac : a9a5 > lda #$a5 ;precharge accu +21ae : 28 > plp > -2166 : e70a > smb 6,zpt +21af : e70c > smb 6,zpt > tst_a $a5,0 -2168 : 08 > php ;save flags -2169 : c9a5 > cmp #$a5 ;test result +21b1 : 08 > php ;save flags +21b2 : c9a5 > cmp #$a5 ;test result > trap_ne -216b : d0fe > bne * ;failed not equal (non zero) +21b4 : d0fe > bne * ;failed not equal (non zero) > -216d : 68 > pla ;load status -216e : 48 > pha +21b6 : 68 > pla ;load status +21b7 : 48 > pha > cmp_flag 0 -216f : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +21b8 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -2171 : d0fe > bne * ;failed not equal (non zero) +21ba : d0fe > bne * ;failed not equal (non zero) > -2173 : 28 > plp ;restore status +21bc : 28 > plp ;restore status > -2174 : a50a > lda zpt -2176 : c9ff > cmp #$ff +21bd : a50c > lda zpt +21bf : c9ff > cmp #$ff > trap_ne ;wrong bits set or cleared -2178 : d0fe > bne * ;failed not equal (non zero) +21c1 : d0fe > bne * ;failed not equal (non zero) > -217a : a900 > lda #0 -217c : 850a > sta zpt +21c3 : a900 > lda #0 +21c5 : 850c > sta zpt > set_a $5a,$ff > load_flag $ff -217e : a9ff > lda #$ff ;allow test to change I-flag (no mask) +21c7 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2180 : 48 > pha ;use stack to load status -2181 : a95a > lda #$5a ;precharge accu -2183 : 28 > plp +21c9 : 48 > pha ;use stack to load status +21ca : a95a > lda #$5a ;precharge accu +21cc : 28 > plp > -2184 : e70a > smb 6,zpt +21cd : e70c > smb 6,zpt > tst_a $5a,$ff -2186 : 08 > php ;save flags -2187 : c95a > cmp #$5a ;test result +21cf : 08 > php ;save flags +21d0 : c95a > cmp #$5a ;test result > trap_ne -2189 : d0fe > bne * ;failed not equal (non zero) +21d2 : d0fe > bne * ;failed not equal (non zero) > -218b : 68 > pla ;load status -218c : 48 > pha +21d4 : 68 > pla ;load status +21d5 : 48 > pha > cmp_flag $ff -218d : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +21d6 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -218f : d0fe > bne * ;failed not equal (non zero) +21d8 : d0fe > bne * ;failed not equal (non zero) > -2191 : 28 > plp ;restore status +21da : 28 > plp ;restore status > -2192 : a50a > lda zpt -2194 : c940 > cmp #1<<6 +21db : a50c > lda zpt +21dd : c940 > cmp #1<<6 > trap_ne ;wrong bits set or cleared -2196 : d0fe > bne * ;failed not equal (non zero) +21df : d0fe > bne * ;failed not equal (non zero) > smbt 7 -2198 : a97f > lda #$ff-(1<<7) -219a : 850a > sta zpt +21e1 : a97f > lda #$ff-(1<<7) +21e3 : 850c > sta zpt > set_a $a5,0 > load_flag 0 -219c : a900 > lda #0 ;allow test to change I-flag (no mask) +21e5 : a900 > lda #0 ;allow test to change I-flag (no mask) > -219e : 48 > pha ;use stack to load status -219f : a9a5 > lda #$a5 ;precharge accu -21a1 : 28 > plp +21e7 : 48 > pha ;use stack to load status +21e8 : a9a5 > lda #$a5 ;precharge accu +21ea : 28 > plp > -21a2 : f70a > smb 7,zpt +21eb : f70c > smb 7,zpt > tst_a $a5,0 -21a4 : 08 > php ;save flags -21a5 : c9a5 > cmp #$a5 ;test result +21ed : 08 > php ;save flags +21ee : c9a5 > cmp #$a5 ;test result > trap_ne -21a7 : d0fe > bne * ;failed not equal (non zero) +21f0 : d0fe > bne * ;failed not equal (non zero) > -21a9 : 68 > pla ;load status -21aa : 48 > pha +21f2 : 68 > pla ;load status +21f3 : 48 > pha > cmp_flag 0 -21ab : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits +21f4 : c930 > cmp #(0|fao)&m8 ;expected flags + always on bits > > trap_ne -21ad : d0fe > bne * ;failed not equal (non zero) +21f6 : d0fe > bne * ;failed not equal (non zero) > -21af : 28 > plp ;restore status +21f8 : 28 > plp ;restore status > -21b0 : a50a > lda zpt -21b2 : c9ff > cmp #$ff +21f9 : a50c > lda zpt +21fb : c9ff > cmp #$ff > trap_ne ;wrong bits set or cleared -21b4 : d0fe > bne * ;failed not equal (non zero) +21fd : d0fe > bne * ;failed not equal (non zero) > -21b6 : a900 > lda #0 -21b8 : 850a > sta zpt +21ff : a900 > lda #0 +2201 : 850c > sta zpt > set_a $5a,$ff > load_flag $ff -21ba : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2203 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -21bc : 48 > pha ;use stack to load status -21bd : a95a > lda #$5a ;precharge accu -21bf : 28 > plp +2205 : 48 > pha ;use stack to load status +2206 : a95a > lda #$5a ;precharge accu +2208 : 28 > plp > -21c0 : f70a > smb 7,zpt +2209 : f70c > smb 7,zpt > tst_a $5a,$ff -21c2 : 08 > php ;save flags -21c3 : c95a > cmp #$5a ;test result +220b : 08 > php ;save flags +220c : c95a > cmp #$5a ;test result > trap_ne -21c5 : d0fe > bne * ;failed not equal (non zero) +220e : d0fe > bne * ;failed not equal (non zero) > -21c7 : 68 > pla ;load status -21c8 : 48 > pha +2210 : 68 > pla ;load status +2211 : 48 > pha > cmp_flag $ff -21c9 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits +2212 : c9ff > cmp #($ff|fao)&m8 ;expected flags + always on bits > > trap_ne -21cb : d0fe > bne * ;failed not equal (non zero) +2214 : d0fe > bne * ;failed not equal (non zero) > -21cd : 28 > plp ;restore status +2216 : 28 > plp ;restore status > -21ce : a50a > lda zpt -21d0 : c980 > cmp #1<<7 +2217 : a50c > lda zpt +2219 : c980 > cmp #1<<7 > trap_ne ;wrong bits set or cleared -21d2 : d0fe > bne * ;failed not equal (non zero) +221b : d0fe > bne * ;failed not equal (non zero) > -21d4 : e0ba cpx #$ba +221d : e0ba cpx #$ba trap_ne ;x altered during test -21d6 : d0fe > bne * ;failed not equal (non zero) +221f : d0fe > bne * ;failed not equal (non zero) -21d8 : c0d0 cpy #$d0 +2221 : c0d0 cpy #$d0 trap_ne ;y altered during test -21da : d0fe > bne * ;failed not equal (non zero) +2223 : d0fe > bne * ;failed not equal (non zero) -21dc : ba tsx -21dd : e0ff cpx #$ff +2225 : ba tsx +2226 : e0ff cpx #$ff trap_ne ;sp push/pop mismatch -21df : d0fe > bne * ;failed not equal (non zero) +2228 : d0fe > bne * ;failed not equal (non zero) next_test -21e1 : ad0202 > lda test_case ;previous test -21e4 : c911 > cmp #test_num +222a : ad0202 > lda test_case ;previous test +222d : c911 > cmp #test_num > trap_ne ;test is out of sequence -21e6 : d0fe > bne * ;failed not equal (non zero) +222f : d0fe > bne * ;failed not equal (non zero) > 0012 = >test_num = test_num + 1 -21e8 : a912 > lda #test_num ;*** next tests' number -21ea : 8d0202 > sta test_case +2231 : a912 > lda #test_num ;*** next tests' number +2233 : 8d0202 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test endif ; testing CMP - (zp) -21ed : a2de ldx #$de ;protect x & y -21ef : a0ad ldy #$ad +2236 : a2de ldx #$de ;protect x & y +2238 : a0ad ldy #$ad set_a $80,0 > load_flag 0 -21f1 : a900 > lda #0 ;allow test to change I-flag (no mask) +223a : a900 > lda #0 ;allow test to change I-flag (no mask) > -21f3 : 48 > pha ;use stack to load status -21f4 : a980 > lda #$80 ;precharge accu -21f6 : 28 > plp +223c : 48 > pha ;use stack to load status +223d : a980 > lda #$80 ;precharge accu +223f : 28 > plp -21f7 : d22a cmp (ind1+8) +2240 : d22c cmp (ind1+8) tst_a $80,fc -21f9 : 08 > php ;save flags -21fa : c980 > cmp #$80 ;test result +2242 : 08 > php ;save flags +2243 : c980 > cmp #$80 ;test result > trap_ne -21fc : d0fe > bne * ;failed not equal (non zero) +2245 : d0fe > bne * ;failed not equal (non zero) > -21fe : 68 > pla ;load status -21ff : 48 > pha +2247 : 68 > pla ;load status +2248 : 48 > pha > cmp_flag fc -2200 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits +2249 : c931 > cmp #(fc|fao)&m8 ;expected flags + always on bits > > trap_ne -2202 : d0fe > bne * ;failed not equal (non zero) +224b : d0fe > bne * ;failed not equal (non zero) > -2204 : 28 > plp ;restore status +224d : 28 > plp ;restore status set_a $7f,0 > load_flag 0 -2205 : a900 > lda #0 ;allow test to change I-flag (no mask) +224e : a900 > lda #0 ;allow test to change I-flag (no mask) > -2207 : 48 > pha ;use stack to load status -2208 : a97f > lda #$7f ;precharge accu -220a : 28 > plp +2250 : 48 > pha ;use stack to load status +2251 : a97f > lda #$7f ;precharge accu +2253 : 28 > plp -220b : d22a cmp (ind1+8) +2254 : d22c cmp (ind1+8) tst_a $7f,fzc -220d : 08 > php ;save flags -220e : c97f > cmp #$7f ;test result +2256 : 08 > php ;save flags +2257 : c97f > cmp #$7f ;test result > trap_ne -2210 : d0fe > bne * ;failed not equal (non zero) +2259 : d0fe > bne * ;failed not equal (non zero) > -2212 : 68 > pla ;load status -2213 : 48 > pha +225b : 68 > pla ;load status +225c : 48 > pha > cmp_flag fzc -2214 : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits +225d : c933 > cmp #(fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -2216 : d0fe > bne * ;failed not equal (non zero) +225f : d0fe > bne * ;failed not equal (non zero) > -2218 : 28 > plp ;restore status +2261 : 28 > plp ;restore status set_a $7e,0 > load_flag 0 -2219 : a900 > lda #0 ;allow test to change I-flag (no mask) +2262 : a900 > lda #0 ;allow test to change I-flag (no mask) > -221b : 48 > pha ;use stack to load status -221c : a97e > lda #$7e ;precharge accu -221e : 28 > plp +2264 : 48 > pha ;use stack to load status +2265 : a97e > lda #$7e ;precharge accu +2267 : 28 > plp -221f : d22a cmp (ind1+8) +2268 : d22c cmp (ind1+8) tst_a $7e,fn -2221 : 08 > php ;save flags -2222 : c97e > cmp #$7e ;test result +226a : 08 > php ;save flags +226b : c97e > cmp #$7e ;test result > trap_ne -2224 : d0fe > bne * ;failed not equal (non zero) +226d : d0fe > bne * ;failed not equal (non zero) > -2226 : 68 > pla ;load status -2227 : 48 > pha +226f : 68 > pla ;load status +2270 : 48 > pha > cmp_flag fn -2228 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits +2271 : c9b0 > cmp #(fn|fao)&m8 ;expected flags + always on bits > > trap_ne -222a : d0fe > bne * ;failed not equal (non zero) +2273 : d0fe > bne * ;failed not equal (non zero) > -222c : 28 > plp ;restore status +2275 : 28 > plp ;restore status set_a $80,$ff > load_flag $ff -222d : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2276 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -222f : 48 > pha ;use stack to load status -2230 : a980 > lda #$80 ;precharge accu -2232 : 28 > plp +2278 : 48 > pha ;use stack to load status +2279 : a980 > lda #$80 ;precharge accu +227b : 28 > plp -2233 : d22a cmp (ind1+8) +227c : d22c cmp (ind1+8) tst_a $80,~fnz -2235 : 08 > php ;save flags -2236 : c980 > cmp #$80 ;test result +227e : 08 > php ;save flags +227f : c980 > cmp #$80 ;test result > trap_ne -2238 : d0fe > bne * ;failed not equal (non zero) +2281 : d0fe > bne * ;failed not equal (non zero) > -223a : 68 > pla ;load status -223b : 48 > pha +2283 : 68 > pla ;load status +2284 : 48 > pha > cmp_flag ~fnz -223c : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits +2285 : c97d > cmp #(~fnz|fao)&m8 ;expected flags + always on bits > > trap_ne -223e : d0fe > bne * ;failed not equal (non zero) +2287 : d0fe > bne * ;failed not equal (non zero) > -2240 : 28 > plp ;restore status +2289 : 28 > plp ;restore status set_a $7f,$ff > load_flag $ff -2241 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +228a : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2243 : 48 > pha ;use stack to load status -2244 : a97f > lda #$7f ;precharge accu -2246 : 28 > plp +228c : 48 > pha ;use stack to load status +228d : a97f > lda #$7f ;precharge accu +228f : 28 > plp -2247 : d22a cmp (ind1+8) +2290 : d22c cmp (ind1+8) tst_a $7f,~fn -2249 : 08 > php ;save flags -224a : c97f > cmp #$7f ;test result +2292 : 08 > php ;save flags +2293 : c97f > cmp #$7f ;test result > trap_ne -224c : d0fe > bne * ;failed not equal (non zero) +2295 : d0fe > bne * ;failed not equal (non zero) > -224e : 68 > pla ;load status -224f : 48 > pha +2297 : 68 > pla ;load status +2298 : 48 > pha > cmp_flag ~fn -2250 : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits +2299 : c97f > cmp #(~fn|fao)&m8 ;expected flags + always on bits > > trap_ne -2252 : d0fe > bne * ;failed not equal (non zero) +229b : d0fe > bne * ;failed not equal (non zero) > -2254 : 28 > plp ;restore status +229d : 28 > plp ;restore status set_a $7e,$ff > load_flag $ff -2255 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +229e : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -2257 : 48 > pha ;use stack to load status -2258 : a97e > lda #$7e ;precharge accu -225a : 28 > plp +22a0 : 48 > pha ;use stack to load status +22a1 : a97e > lda #$7e ;precharge accu +22a3 : 28 > plp -225b : d22a cmp (ind1+8) +22a4 : d22c cmp (ind1+8) tst_a $7e,~fzc -225d : 08 > php ;save flags -225e : c97e > cmp #$7e ;test result +22a6 : 08 > php ;save flags +22a7 : c97e > cmp #$7e ;test result > trap_ne -2260 : d0fe > bne * ;failed not equal (non zero) +22a9 : d0fe > bne * ;failed not equal (non zero) > -2262 : 68 > pla ;load status -2263 : 48 > pha +22ab : 68 > pla ;load status +22ac : 48 > pha > cmp_flag ~fzc -2264 : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits +22ad : c9fc > cmp #(~fzc|fao)&m8 ;expected flags + always on bits > > trap_ne -2266 : d0fe > bne * ;failed not equal (non zero) +22af : d0fe > bne * ;failed not equal (non zero) > -2268 : 28 > plp ;restore status +22b1 : 28 > plp ;restore status -2269 : e0de cpx #$de +22b2 : e0de cpx #$de trap_ne ;x altered during test -226b : d0fe > bne * ;failed not equal (non zero) +22b4 : d0fe > bne * ;failed not equal (non zero) -226d : c0ad cpy #$ad +22b6 : c0ad cpy #$ad trap_ne ;y altered during test -226f : d0fe > bne * ;failed not equal (non zero) +22b8 : d0fe > bne * ;failed not equal (non zero) -2271 : ba tsx -2272 : e0ff cpx #$ff +22ba : ba tsx +22bb : e0ff cpx #$ff trap_ne ;sp push/pop mismatch -2274 : d0fe > bne * ;failed not equal (non zero) +22bd : d0fe > bne * ;failed not equal (non zero) next_test -2276 : ad0202 > lda test_case ;previous test -2279 : c912 > cmp #test_num +22bf : ad0202 > lda test_case ;previous test +22c2 : c912 > cmp #test_num > trap_ne ;test is out of sequence -227b : d0fe > bne * ;failed not equal (non zero) +22c4 : d0fe > bne * ;failed not equal (non zero) > 0013 = >test_num = test_num + 1 -227d : a913 > lda #test_num ;*** next tests' number -227f : 8d0202 > sta test_case +22c6 : a913 > lda #test_num ;*** next tests' number +22c8 : 8d0202 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test ; testing logical instructions - AND EOR ORA (zp) -2282 : a242 ldx #$42 ;protect x & y +22cb : a242 ldx #$42 ;protect x & y -2284 : a000 ldy #0 ;AND -2286 : a538 lda indAN ;set indirect address -2288 : 850a sta zpt -228a : a539 lda indAN+1 -228c : 850b sta zpt+1 -228e : tand1 +22cd : a000 ldy #0 ;AND +22cf : a53a lda indAN ;set indirect address +22d1 : 850c sta zpt +22d3 : a53b lda indAN+1 +22d5 : 850d sta zpt+1 +22d7 : tand1 set_ay absANa,0 > load_flag 0 -228e : a900 > lda #0 ;allow test to change I-flag (no mask) +22d7 : a900 > lda #0 ;allow test to change I-flag (no mask) > -2290 : 48 > pha ;use stack to load status -2291 : b94d02 > lda absANa,y ;precharge accu -2294 : 28 > plp +22d9 : 48 > pha ;use stack to load status +22da : b95302 > lda absANa,y ;precharge accu +22dd : 28 > plp -2295 : 320a and (zpt) +22de : 320c and (zpt) tst_ay absrlo,absflo,0 -2297 : 08 > php ;save flags -2298 : d95502 > cmp absrlo,y ;test result +22e0 : 08 > php ;save flags +22e1 : d95b02 > cmp absrlo,y ;test result > trap_ne ; -229b : d0fe > bne * ;failed not equal (non zero) +22e4 : d0fe > bne * ;failed not equal (non zero) > -229d : 68 > pla ;load status +22e6 : 68 > pla ;load status > eor_flag 0 -229e : 4930 > eor #0|fao ;invert expected flags + always on bits +22e7 : 4930 > eor #0|fao ;invert expected flags + always on bits > -22a0 : d95902 > cmp absflo,y ;test flags +22e9 : d95f02 > cmp absflo,y ;test flags > trap_ne -22a3 : d0fe > bne * ;failed not equal (non zero) +22ec : d0fe > bne * ;failed not equal (non zero) > -22a5 : e60a inc zpt -22a7 : c8 iny -22a8 : c004 cpy #4 -22aa : d0e2 bne tand1 -22ac : 88 dey -22ad : c60a dec zpt -22af : tand2 +22ee : e60c inc zpt +22f0 : c8 iny +22f1 : c004 cpy #4 +22f3 : d0e2 bne tand1 +22f5 : 88 dey +22f6 : c60c dec zpt +22f8 : tand2 set_ay absANa,$ff > load_flag $ff -22af : a9ff > lda #$ff ;allow test to change I-flag (no mask) +22f8 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -22b1 : 48 > pha ;use stack to load status -22b2 : b94d02 > lda absANa,y ;precharge accu -22b5 : 28 > plp +22fa : 48 > pha ;use stack to load status +22fb : b95302 > lda absANa,y ;precharge accu +22fe : 28 > plp -22b6 : 320a and (zpt) +22ff : 320c and (zpt) tst_ay absrlo,absflo,$ff-fnz -22b8 : 08 > php ;save flags -22b9 : d95502 > cmp absrlo,y ;test result +2301 : 08 > php ;save flags +2302 : d95b02 > cmp absrlo,y ;test result > trap_ne ; -22bc : d0fe > bne * ;failed not equal (non zero) +2305 : d0fe > bne * ;failed not equal (non zero) > -22be : 68 > pla ;load status +2307 : 68 > pla ;load status > eor_flag $ff-fnz -22bf : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +2308 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -22c1 : d95902 > cmp absflo,y ;test flags +230a : d95f02 > cmp absflo,y ;test flags > trap_ne -22c4 : d0fe > bne * ;failed not equal (non zero) +230d : d0fe > bne * ;failed not equal (non zero) > -22c6 : c60a dec zpt -22c8 : 88 dey -22c9 : 10e4 bpl tand2 +230f : c60c dec zpt +2311 : 88 dey +2312 : 10e4 bpl tand2 -22cb : a000 ldy #0 ;EOR -22cd : a540 lda indEO ;set indirect address -22cf : 850a sta zpt -22d1 : a541 lda indEO+1 -22d3 : 850b sta zpt+1 -22d5 : teor1 +2314 : a000 ldy #0 ;EOR +2316 : a542 lda indEO ;set indirect address +2318 : 850c sta zpt +231a : a543 lda indEO+1 +231c : 850d sta zpt+1 +231e : teor1 set_ay absEOa,0 > load_flag 0 -22d5 : a900 > lda #0 ;allow test to change I-flag (no mask) +231e : a900 > lda #0 ;allow test to change I-flag (no mask) > -22d7 : 48 > pha ;use stack to load status -22d8 : b95102 > lda absEOa,y ;precharge accu -22db : 28 > plp +2320 : 48 > pha ;use stack to load status +2321 : b95702 > lda absEOa,y ;precharge accu +2324 : 28 > plp -22dc : 520a eor (zpt) +2325 : 520c eor (zpt) tst_ay absrlo,absflo,0 -22de : 08 > php ;save flags -22df : d95502 > cmp absrlo,y ;test result +2327 : 08 > php ;save flags +2328 : d95b02 > cmp absrlo,y ;test result > trap_ne ; -22e2 : d0fe > bne * ;failed not equal (non zero) +232b : d0fe > bne * ;failed not equal (non zero) > -22e4 : 68 > pla ;load status +232d : 68 > pla ;load status > eor_flag 0 -22e5 : 4930 > eor #0|fao ;invert expected flags + always on bits +232e : 4930 > eor #0|fao ;invert expected flags + always on bits > -22e7 : d95902 > cmp absflo,y ;test flags +2330 : d95f02 > cmp absflo,y ;test flags > trap_ne -22ea : d0fe > bne * ;failed not equal (non zero) +2333 : d0fe > bne * ;failed not equal (non zero) > -22ec : e60a inc zpt -22ee : c8 iny -22ef : c004 cpy #4 -22f1 : d0e2 bne teor1 -22f3 : 88 dey -22f4 : c60a dec zpt -22f6 : teor2 +2335 : e60c inc zpt +2337 : c8 iny +2338 : c004 cpy #4 +233a : d0e2 bne teor1 +233c : 88 dey +233d : c60c dec zpt +233f : teor2 set_ay absEOa,$ff > load_flag $ff -22f6 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +233f : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -22f8 : 48 > pha ;use stack to load status -22f9 : b95102 > lda absEOa,y ;precharge accu -22fc : 28 > plp +2341 : 48 > pha ;use stack to load status +2342 : b95702 > lda absEOa,y ;precharge accu +2345 : 28 > plp -22fd : 520a eor (zpt) +2346 : 520c eor (zpt) tst_ay absrlo,absflo,$ff-fnz -22ff : 08 > php ;save flags -2300 : d95502 > cmp absrlo,y ;test result +2348 : 08 > php ;save flags +2349 : d95b02 > cmp absrlo,y ;test result > trap_ne ; -2303 : d0fe > bne * ;failed not equal (non zero) +234c : d0fe > bne * ;failed not equal (non zero) > -2305 : 68 > pla ;load status +234e : 68 > pla ;load status > eor_flag $ff-fnz -2306 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +234f : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -2308 : d95902 > cmp absflo,y ;test flags +2351 : d95f02 > cmp absflo,y ;test flags > trap_ne -230b : d0fe > bne * ;failed not equal (non zero) +2354 : d0fe > bne * ;failed not equal (non zero) > -230d : c60a dec zpt -230f : 88 dey -2310 : 10e4 bpl teor2 +2356 : c60c dec zpt +2358 : 88 dey +2359 : 10e4 bpl teor2 -2312 : a000 ldy #0 ;ORA -2314 : a548 lda indOR ;set indirect address -2316 : 850a sta zpt -2318 : a549 lda indOR+1 -231a : 850b sta zpt+1 -231c : tora1 +235b : a000 ldy #0 ;ORA +235d : a54a lda indOR ;set indirect address +235f : 850c sta zpt +2361 : a54b lda indOR+1 +2363 : 850d sta zpt+1 +2365 : tora1 set_ay absORa,0 > load_flag 0 -231c : a900 > lda #0 ;allow test to change I-flag (no mask) +2365 : a900 > lda #0 ;allow test to change I-flag (no mask) > -231e : 48 > pha ;use stack to load status -231f : b94902 > lda absORa,y ;precharge accu -2322 : 28 > plp +2367 : 48 > pha ;use stack to load status +2368 : b94f02 > lda absORa,y ;precharge accu +236b : 28 > plp -2323 : 120a ora (zpt) +236c : 120c ora (zpt) tst_ay absrlo,absflo,0 -2325 : 08 > php ;save flags -2326 : d95502 > cmp absrlo,y ;test result +236e : 08 > php ;save flags +236f : d95b02 > cmp absrlo,y ;test result > trap_ne ; -2329 : d0fe > bne * ;failed not equal (non zero) +2372 : d0fe > bne * ;failed not equal (non zero) > -232b : 68 > pla ;load status +2374 : 68 > pla ;load status > eor_flag 0 -232c : 4930 > eor #0|fao ;invert expected flags + always on bits +2375 : 4930 > eor #0|fao ;invert expected flags + always on bits > -232e : d95902 > cmp absflo,y ;test flags +2377 : d95f02 > cmp absflo,y ;test flags > trap_ne -2331 : d0fe > bne * ;failed not equal (non zero) +237a : d0fe > bne * ;failed not equal (non zero) > -2333 : e60a inc zpt -2335 : c8 iny -2336 : c004 cpy #4 -2338 : d0e2 bne tora1 -233a : 88 dey -233b : c60a dec zpt -233d : tora2 +237c : e60c inc zpt +237e : c8 iny +237f : c004 cpy #4 +2381 : d0e2 bne tora1 +2383 : 88 dey +2384 : c60c dec zpt +2386 : tora2 set_ay absORa,$ff > load_flag $ff -233d : a9ff > lda #$ff ;allow test to change I-flag (no mask) +2386 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -233f : 48 > pha ;use stack to load status -2340 : b94902 > lda absORa,y ;precharge accu -2343 : 28 > plp +2388 : 48 > pha ;use stack to load status +2389 : b94f02 > lda absORa,y ;precharge accu +238c : 28 > plp -2344 : 120a ora (zpt) +238d : 120c ora (zpt) tst_ay absrlo,absflo,$ff-fnz -2346 : 08 > php ;save flags -2347 : d95502 > cmp absrlo,y ;test result +238f : 08 > php ;save flags +2390 : d95b02 > cmp absrlo,y ;test result > trap_ne ; -234a : d0fe > bne * ;failed not equal (non zero) +2393 : d0fe > bne * ;failed not equal (non zero) > -234c : 68 > pla ;load status +2395 : 68 > pla ;load status > eor_flag $ff-fnz -234d : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits +2396 : 497d > eor #$ff-fnz|fao ;invert expected flags + always on bits > -234f : d95902 > cmp absflo,y ;test flags +2398 : d95f02 > cmp absflo,y ;test flags > trap_ne -2352 : d0fe > bne * ;failed not equal (non zero) +239b : d0fe > bne * ;failed not equal (non zero) > -2354 : c60a dec zpt -2356 : 88 dey -2357 : 10e4 bpl tora2 +239d : c60c dec zpt +239f : 88 dey +23a0 : 10e4 bpl tora2 -2359 : e042 cpx #$42 +23a2 : e042 cpx #$42 trap_ne ;x altered during test -235b : d0fe > bne * ;failed not equal (non zero) +23a4 : d0fe > bne * ;failed not equal (non zero) -235d : ba tsx -235e : e0ff cpx #$ff +23a6 : ba tsx +23a7 : e0ff cpx #$ff trap_ne ;sp push/pop mismatch -2360 : d0fe > bne * ;failed not equal (non zero) +23a9 : d0fe > bne * ;failed not equal (non zero) next_test -2362 : ad0202 > lda test_case ;previous test -2365 : c913 > cmp #test_num +23ab : ad0202 > lda test_case ;previous test +23ae : c913 > cmp #test_num > trap_ne ;test is out of sequence -2367 : d0fe > bne * ;failed not equal (non zero) +23b0 : d0fe > bne * ;failed not equal (non zero) > 0014 = >test_num = test_num + 1 -2369 : a914 > lda #test_num ;*** next tests' number -236b : 8d0202 > sta test_case +23b2 : a914 > lda #test_num ;*** next tests' number +23b4 : 8d0202 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test if I_flag = 3 -236e : 58 cli +23b7 : 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 -236f : d8 cld -2370 : a20c ldx #ad2 ;for indexed test -2372 : a0ff ldy #$ff ;max range -2374 : a900 lda #0 ;start with adding zeroes & no carry -2376 : 850a sta adfc ;carry in - for diag -2378 : 850b sta ad1 ;operand 1 - accumulator -237a : 850c sta ad2 ;operand 2 - memory or immediate -237c : 8d0502 sta ada2 ;non zp -237f : 850d sta adrl ;expected result bits 0-7 -2381 : 850e sta adrh ;expected result bit 8 (carry out) -2383 : a9ff lda #$ff ;complemented operand 2 for subtract -2385 : 8510 sta sb2 -2387 : 8d0602 sta sba2 ;non zp -238a : a902 lda #2 ;expected Z-flag -238c : 850f sta adrf -238e : 18 tadd clc ;test with carry clear -238f : 200326 jsr chkadd -2392 : e60a inc adfc ;now with carry -2394 : e60d inc adrl ;result +1 -2396 : 08 php ;save N & Z from low result -2397 : 08 php -2398 : 68 pla ;accu holds expected flags -2399 : 2982 and #$82 ;mask N & Z -239b : 28 plp -239c : d002 bne tadd1 -239e : e60e inc adrh ;result bit 8 - carry -23a0 : 050e tadd1 ora adrh ;merge C to expected flags -23a2 : 850f sta adrf ;save expected flags except overflow -23a4 : 38 sec ;test with carry set -23a5 : 200326 jsr chkadd -23a8 : c60a dec adfc ;same for operand +1 but no carry -23aa : e60b inc ad1 -23ac : d0e0 bne tadd ;iterate op1 -23ae : a900 lda #0 ;preset result to op2 when op1 = 0 -23b0 : 850e sta adrh -23b2 : ee0502 inc ada2 -23b5 : e60c inc ad2 -23b7 : 08 php ;save NZ as operand 2 becomes the new result -23b8 : 68 pla -23b9 : 2982 and #$82 ;mask N00000Z0 -23bb : 850f sta adrf ;no need to check carry as we are adding to 0 -23bd : c610 dec sb2 ;complement subtract operand 2 -23bf : ce0602 dec sba2 -23c2 : a50c lda ad2 -23c4 : 850d sta adrl -23c6 : d0c6 bne tadd ;iterate op2 +23b8 : d8 cld +23b9 : a20e ldx #ad2 ;for indexed test +23bb : a0ff ldy #$ff ;max range +23bd : a900 lda #0 ;start with adding zeroes & no carry +23bf : 850c sta adfc ;carry in - for diag +23c1 : 850d sta ad1 ;operand 1 - accumulator +23c3 : 850e sta ad2 ;operand 2 - memory or immediate +23c5 : 8d0502 sta ada2 ;non zp +23c8 : 850f sta adrl ;expected result bits 0-7 +23ca : 8510 sta adrh ;expected result bit 8 (carry out) +23cc : a9ff lda #$ff ;complemented operand 2 for subtract +23ce : 8512 sta sb2 +23d0 : 8d0602 sta sba2 ;non zp +23d3 : a902 lda #2 ;expected Z-flag +23d5 : 8511 sta adrf +23d7 : 18 tadd clc ;test with carry clear +23d8 : 204e26 jsr chkadd +23db : e60c inc adfc ;now with carry +23dd : e60f inc adrl ;result +1 +23df : 08 php ;save N & Z from low result +23e0 : 08 php +23e1 : 68 pla ;accu holds expected flags +23e2 : 2982 and #$82 ;mask N & Z +23e4 : 28 plp +23e5 : d002 bne tadd1 +23e7 : e610 inc adrh ;result bit 8 - carry +23e9 : 0510 tadd1 ora adrh ;merge C to expected flags +23eb : 8511 sta adrf ;save expected flags except overflow +23ed : 38 sec ;test with carry set +23ee : 204e26 jsr chkadd +23f1 : c60c dec adfc ;same for operand +1 but no carry +23f3 : e60d inc ad1 +23f5 : d0e0 bne tadd ;iterate op1 +23f7 : a900 lda #0 ;preset result to op2 when op1 = 0 +23f9 : 8510 sta adrh +23fb : ee0502 inc ada2 +23fe : e60e inc ad2 +2400 : 08 php ;save NZ as operand 2 becomes the new result +2401 : 68 pla +2402 : 2982 and #$82 ;mask N00000Z0 +2404 : 8511 sta adrf ;no need to check carry as we are adding to 0 +2406 : c612 dec sb2 ;complement subtract operand 2 +2408 : ce0602 dec sba2 +240b : a50e lda ad2 +240d : 850f sta adrl +240f : d0c6 bne tadd ;iterate op2 -23c8 : e00c cpx #ad2 +2411 : e00e cpx #ad2 trap_ne ;x altered during test -23ca : d0fe > bne * ;failed not equal (non zero) +2413 : d0fe > bne * ;failed not equal (non zero) -23cc : c0ff cpy #$ff +2415 : c0ff cpy #$ff trap_ne ;y altered during test -23ce : d0fe > bne * ;failed not equal (non zero) +2417 : d0fe > bne * ;failed not equal (non zero) -23d0 : ba tsx -23d1 : e0ff cpx #$ff +2419 : ba tsx +241a : e0ff cpx #$ff trap_ne ;sp push/pop mismatch -23d3 : d0fe > bne * ;failed not equal (non zero) +241c : d0fe > bne * ;failed not equal (non zero) next_test -23d5 : ad0202 > lda test_case ;previous test -23d8 : c914 > cmp #test_num +241e : ad0202 > lda test_case ;previous test +2421 : c914 > cmp #test_num > trap_ne ;test is out of sequence -23da : d0fe > bne * ;failed not equal (non zero) +2423 : d0fe > bne * ;failed not equal (non zero) > 0015 = >test_num = test_num + 1 -23dc : a915 > lda #test_num ;*** next tests' number -23de : 8d0202 > sta test_case +2425 : a915 > lda #test_num ;*** next tests' number +2427 : 8d0202 > sta test_case > ;check_ram ;uncomment to find altered RAM after each test @@ -10505,116 +10602,116 @@ ffff = ram_top = -1 ; 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 -23e1 : f8 sed -23e2 : a20c ldx #ad2 ;for indexed test -23e4 : a0ff ldy #$ff ;max range -23e6 : a999 lda #$99 ;start with adding 99 to 99 with carry -23e8 : 850b sta ad1 ;operand 1 - accumulator -23ea : 850c sta ad2 ;operand 2 - memory or immediate -23ec : 8d0502 sta ada2 ;non zp -23ef : 850d sta adrl ;expected result bits 0-7 -23f1 : a901 lda #1 ;set carry in & out -23f3 : 850a sta adfc ;carry in - for diag -23f5 : 850e sta adrh ;expected result bit 8 (carry out) -23f7 : a981 lda #$81 ;set N & C (99 + 99 + C = 99 + C) -23f9 : 850f sta adrf -23fb : a900 lda #0 ;complemented operand 2 for subtract -23fd : 8510 sta sb2 -23ff : 8d0602 sta sba2 ;non zp -2402 : 38 tdad sec ;test with carry set -2403 : 20ae24 jsr chkdad -2406 : c60a dec adfc ;now with carry clear -2408 : a50d lda adrl ;decimal adjust result -240a : d008 bne tdad1 ;skip clear carry & preset result 99 (9A-1) -240c : c60e dec adrh -240e : a999 lda #$99 -2410 : 850d sta adrl -2412 : d012 bne tdad3 -2414 : 290f tdad1 and #$f ;lower nibble mask -2416 : d00c bne tdad2 ;no decimal adjust needed -2418 : c60d dec adrl ;decimal adjust (?0-6) -241a : c60d dec adrl -241c : c60d dec adrl -241e : c60d dec adrl -2420 : c60d dec adrl -2422 : c60d dec adrl -2424 : c60d tdad2 dec adrl ;result -1 -2426 : 08 tdad3 php ;save valid flags -2427 : 68 pla -2428 : 2982 and #$82 ;N-----Z- -242a : 050e ora adrh ;N-----ZC -242c : 850f sta adrf -242e : 18 clc ;test with carry clear -242f : 20ae24 jsr chkdad -2432 : e60a inc adfc ;same for operand -1 but with carry -2434 : a50b lda ad1 ;decimal adjust operand 1 -2436 : f015 beq tdad5 ;iterate operand 2 -2438 : 290f and #$f ;lower nibble mask -243a : d00c bne tdad4 ;skip decimal adjust -243c : c60b dec ad1 ;decimal adjust (?0-6) -243e : c60b dec ad1 -2440 : c60b dec ad1 -2442 : c60b dec ad1 -2444 : c60b dec ad1 -2446 : c60b dec ad1 -2448 : c60b tdad4 dec ad1 ;operand 1 -1 -244a : 4c0224 jmp tdad ;iterate op1 +242a : f8 sed +242b : a20e ldx #ad2 ;for indexed test +242d : a0ff ldy #$ff ;max range +242f : a999 lda #$99 ;start with adding 99 to 99 with carry +2431 : 850d sta ad1 ;operand 1 - accumulator +2433 : 850e sta ad2 ;operand 2 - memory or immediate +2435 : 8d0502 sta ada2 ;non zp +2438 : 850f sta adrl ;expected result bits 0-7 +243a : a901 lda #1 ;set carry in & out +243c : 850c sta adfc ;carry in - for diag +243e : 8510 sta adrh ;expected result bit 8 (carry out) +2440 : a981 lda #$81 ;set N & C (99 + 99 + C = 99 + C) +2442 : 8511 sta adrf +2444 : a900 lda #0 ;complemented operand 2 for subtract +2446 : 8512 sta sb2 +2448 : 8d0602 sta sba2 ;non zp +244b : 38 tdad sec ;test with carry set +244c : 20f724 jsr chkdad +244f : c60c dec adfc ;now with carry clear +2451 : a50f lda adrl ;decimal adjust result +2453 : d008 bne tdad1 ;skip clear carry & preset result 99 (9A-1) +2455 : c610 dec adrh +2457 : a999 lda #$99 +2459 : 850f sta adrl +245b : d012 bne tdad3 +245d : 290f tdad1 and #$f ;lower nibble mask +245f : d00c bne tdad2 ;no decimal adjust needed +2461 : c60f dec adrl ;decimal adjust (?0-6) +2463 : c60f dec adrl +2465 : c60f dec adrl +2467 : c60f dec adrl +2469 : c60f dec adrl +246b : c60f dec adrl +246d : c60f tdad2 dec adrl ;result -1 +246f : 08 tdad3 php ;save valid flags +2470 : 68 pla +2471 : 2982 and #$82 ;N-----Z- +2473 : 0510 ora adrh ;N-----ZC +2475 : 8511 sta adrf +2477 : 18 clc ;test with carry clear +2478 : 20f724 jsr chkdad +247b : e60c inc adfc ;same for operand -1 but with carry +247d : a50d lda ad1 ;decimal adjust operand 1 +247f : f015 beq tdad5 ;iterate operand 2 +2481 : 290f and #$f ;lower nibble mask +2483 : d00c bne tdad4 ;skip decimal adjust +2485 : c60d dec ad1 ;decimal adjust (?0-6) +2487 : c60d dec ad1 +2489 : c60d dec ad1 +248b : c60d dec ad1 +248d : c60d dec ad1 +248f : c60d dec ad1 +2491 : c60d tdad4 dec ad1 ;operand 1 -1 +2493 : 4c4b24 jmp tdad ;iterate op1 -244d : a999 tdad5 lda #$99 ;precharge op1 max -244f : 850b sta ad1 -2451 : a50c lda ad2 ;decimal adjust operand 2 -2453 : f039 beq tdad7 ;end of iteration -2455 : 290f and #$f ;lower nibble mask -2457 : d018 bne tdad6 ;skip decimal adjust -2459 : c60c dec ad2 ;decimal adjust (?0-6) -245b : c60c dec ad2 -245d : c60c dec ad2 -245f : c60c dec ad2 -2461 : c60c dec ad2 -2463 : c60c dec ad2 -2465 : e610 inc sb2 ;complemented decimal adjust for subtract (?9+6) -2467 : e610 inc sb2 -2469 : e610 inc sb2 -246b : e610 inc sb2 -246d : e610 inc sb2 -246f : e610 inc sb2 -2471 : c60c tdad6 dec ad2 ;operand 2 -1 -2473 : e610 inc sb2 ;complemented operand for subtract -2475 : a510 lda sb2 -2477 : 8d0602 sta sba2 ;copy as non zp operand -247a : a50c lda ad2 -247c : 8d0502 sta ada2 ;copy as non zp operand -247f : 850d sta adrl ;new result since op1+carry=00+carry +op2=op2 -2481 : 08 php ;save flags -2482 : 68 pla -2483 : 2982 and #$82 ;N-----Z- -2485 : 0901 ora #1 ;N-----ZC -2487 : 850f sta adrf -2489 : e60e inc adrh ;result carry -248b : 4c0224 jmp tdad ;iterate op2 +2496 : a999 tdad5 lda #$99 ;precharge op1 max +2498 : 850d sta ad1 +249a : a50e lda ad2 ;decimal adjust operand 2 +249c : f039 beq tdad7 ;end of iteration +249e : 290f and #$f ;lower nibble mask +24a0 : d018 bne tdad6 ;skip decimal adjust +24a2 : c60e dec ad2 ;decimal adjust (?0-6) +24a4 : c60e dec ad2 +24a6 : c60e dec ad2 +24a8 : c60e dec ad2 +24aa : c60e dec ad2 +24ac : c60e dec ad2 +24ae : e612 inc sb2 ;complemented decimal adjust for subtract (?9+6) +24b0 : e612 inc sb2 +24b2 : e612 inc sb2 +24b4 : e612 inc sb2 +24b6 : e612 inc sb2 +24b8 : e612 inc sb2 +24ba : c60e tdad6 dec ad2 ;operand 2 -1 +24bc : e612 inc sb2 ;complemented operand for subtract +24be : a512 lda sb2 +24c0 : 8d0602 sta sba2 ;copy as non zp operand +24c3 : a50e lda ad2 +24c5 : 8d0502 sta ada2 ;copy as non zp operand +24c8 : 850f sta adrl ;new result since op1+carry=00+carry +op2=op2 +24ca : 08 php ;save flags +24cb : 68 pla +24cc : 2982 and #$82 ;N-----Z- +24ce : 0901 ora #1 ;N-----ZC +24d0 : 8511 sta adrf +24d2 : e610 inc adrh ;result carry +24d4 : 4c4b24 jmp tdad ;iterate op2 -248e : e00c tdad7 cpx #ad2 +24d7 : e00e tdad7 cpx #ad2 trap_ne ;x altered during test -2490 : d0fe > bne * ;failed not equal (non zero) +24d9 : d0fe > bne * ;failed not equal (non zero) -2492 : c0ff cpy #$ff +24db : c0ff cpy #$ff trap_ne ;y altered during test -2494 : d0fe > bne * ;failed not equal (non zero) +24dd : d0fe > bne * ;failed not equal (non zero) -2496 : ba tsx -2497 : e0ff cpx #$ff +24df : ba tsx +24e0 : e0ff cpx #$ff trap_ne ;sp push/pop mismatch -2499 : d0fe > bne * ;failed not equal (non zero) +24e2 : d0fe > bne * ;failed not equal (non zero) -249b : d8 cld +24e4 : d8 cld -249c : ad0202 lda test_case -249f : c915 cmp #test_num +24e5 : ad0202 lda test_case +24e8 : c915 cmp #test_num trap_ne ;previous test is out of sequence -24a1 : d0fe > bne * ;failed not equal (non zero) +24ea : d0fe > bne * ;failed not equal (non zero) -24a3 : a9f0 lda #$f0 ;mark opcode testing complete -24a5 : 8d0202 sta test_case +24ec : a9f0 lda #$f0 ;mark opcode testing complete +24ee : 8d0202 sta test_case ; final RAM integrity test ; verifies that none of the previous tests has altered RAM outside of the @@ -10632,534 +10729,635 @@ ffff = ram_top = -1 ; S U C C E S S ************************************************ ; ------------- success ;if you get here everything went well -24a8 : 4ca824 > jmp * ;test passed, no errors +24f1 : 4cf124 > jmp * ;test passed, no errors ; ------------- ; S U C C E S S ************************************************ -24ab : 4c0004 jmp start ;run again +24f4 : 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 -24ae : chkdad +24f7 : chkdad ; decimal ADC / SBC zp -24ae : 08 php ;save carry for subtract -24af : a50b lda ad1 -24b1 : 650c adc ad2 ;perform add -24b3 : 08 php -24b4 : c50d cmp adrl ;check result +24f7 : 08 php ;save carry for subtract +24f8 : a50d lda ad1 +24fa : 650e adc ad2 ;perform add +24fc : 08 php +24fd : c50f cmp adrl ;check result trap_ne ;bad result -24b6 : d0fe > bne * ;failed not equal (non zero) +24ff : d0fe > bne * ;failed not equal (non zero) -24b8 : 68 pla ;check flags -24b9 : 2983 and #$83 ;mask N-----ZC -24bb : c50f cmp adrf +2501 : 68 pla ;check flags +2502 : 2983 and #$83 ;mask N-----ZC +2504 : c511 cmp adrf trap_ne ;bad flags -24bd : d0fe > bne * ;failed not equal (non zero) +2506 : d0fe > bne * ;failed not equal (non zero) -24bf : 28 plp -24c0 : 08 php ;save carry for next add -24c1 : a50b lda ad1 -24c3 : e510 sbc sb2 ;perform subtract -24c5 : 08 php -24c6 : c50d cmp adrl ;check result +2508 : 28 plp +2509 : 08 php ;save carry for next add +250a : a50d lda ad1 +250c : e512 sbc sb2 ;perform subtract +250e : 08 php +250f : c50f cmp adrl ;check result trap_ne ;bad result -24c8 : d0fe > bne * ;failed not equal (non zero) +2511 : d0fe > bne * ;failed not equal (non zero) -24ca : 68 pla ;check flags -24cb : 2983 and #$83 ;mask N-----ZC -24cd : c50f cmp adrf +2513 : 68 pla ;check flags +2514 : 2983 and #$83 ;mask N-----ZC +2516 : c511 cmp adrf trap_ne ;bad flags -24cf : d0fe > bne * ;failed not equal (non zero) +2518 : d0fe > bne * ;failed not equal (non zero) -24d1 : 28 plp +251a : 28 plp ; decimal ADC / SBC abs -24d2 : 08 php ;save carry for subtract -24d3 : a50b lda ad1 -24d5 : 6d0502 adc ada2 ;perform add -24d8 : 08 php -24d9 : c50d cmp adrl ;check result +251b : 08 php ;save carry for subtract +251c : a50d lda ad1 +251e : 6d0502 adc ada2 ;perform add +2521 : 08 php +2522 : c50f cmp adrl ;check result trap_ne ;bad result -24db : d0fe > bne * ;failed not equal (non zero) +2524 : d0fe > bne * ;failed not equal (non zero) -24dd : 68 pla ;check flags -24de : 2983 and #$83 ;mask N-----ZC -24e0 : c50f cmp adrf +2526 : 68 pla ;check flags +2527 : 2983 and #$83 ;mask N-----ZC +2529 : c511 cmp adrf trap_ne ;bad flags -24e2 : d0fe > bne * ;failed not equal (non zero) +252b : d0fe > bne * ;failed not equal (non zero) -24e4 : 28 plp -24e5 : 08 php ;save carry for next add -24e6 : a50b lda ad1 -24e8 : ed0602 sbc sba2 ;perform subtract -24eb : 08 php -24ec : c50d cmp adrl ;check result +252d : 28 plp +252e : 08 php ;save carry for next add +252f : a50d lda ad1 +2531 : ed0602 sbc sba2 ;perform subtract +2534 : 08 php +2535 : c50f cmp adrl ;check result trap_ne ;bad result -24ee : d0fe > bne * ;failed not equal (non zero) +2537 : d0fe > bne * ;failed not equal (non zero) -24f0 : 68 pla ;check flags -24f1 : 2983 and #$83 ;mask N-----ZC -24f3 : c50f cmp adrf +2539 : 68 pla ;check flags +253a : 2983 and #$83 ;mask N-----ZC +253c : c511 cmp adrf trap_ne ;bad flags -24f5 : d0fe > bne * ;failed not equal (non zero) +253e : d0fe > bne * ;failed not equal (non zero) -24f7 : 28 plp +2540 : 28 plp ; decimal ADC / SBC # -24f8 : 08 php ;save carry for subtract -24f9 : a50c lda ad2 -24fb : 8d0125 sta chkdadi ;self modify immediate -24fe : a50b lda ad1 -2501 = chkdadi = * + 1 ;operand of the immediate ADC -2500 : 6900 adc #0 ;perform add -2502 : 08 php -2503 : c50d cmp adrl ;check result +2541 : 08 php ;save carry for subtract +2542 : a50e lda ad2 +2544 : 8d0b02 sta ex_adci+1 ;set ADC # operand +2547 : a50d lda ad1 +2549 : 200a02 jsr ex_adci ;execute ADC # in RAM +254c : 08 php +254d : c50f cmp adrl ;check result trap_ne ;bad result -2505 : d0fe > bne * ;failed not equal (non zero) +254f : d0fe > bne * ;failed not equal (non zero) -2507 : 68 pla ;check flags -2508 : 2983 and #$83 ;mask N-----ZC -250a : c50f cmp adrf +2551 : 68 pla ;check flags +2552 : 2983 and #$83 ;mask N-----ZC +2554 : c511 cmp adrf trap_ne ;bad flags -250c : d0fe > bne * ;failed not equal (non zero) +2556 : d0fe > bne * ;failed not equal (non zero) -250e : 28 plp -250f : 08 php ;save carry for next add -2510 : a510 lda sb2 -2512 : 8d1825 sta chkdsbi ;self modify immediate -2515 : a50b lda ad1 -2518 = chkdsbi = * + 1 ;operand of the immediate SBC -2517 : e900 sbc #0 ;perform subtract -2519 : 08 php -251a : c50d cmp adrl ;check result +2558 : 28 plp +2559 : 08 php ;save carry for next add +255a : a512 lda sb2 +255c : 8d0e02 sta ex_sbci+1 ;set SBC # operand +255f : a50d lda ad1 +2561 : 200d02 jsr ex_sbci ;execute SBC # in RAM +2564 : 08 php +2565 : c50f cmp adrl ;check result trap_ne ;bad result -251c : d0fe > bne * ;failed not equal (non zero) +2567 : d0fe > bne * ;failed not equal (non zero) -251e : 68 pla ;check flags -251f : 2983 and #$83 ;mask N-----ZC -2521 : c50f cmp adrf +2569 : 68 pla ;check flags +256a : 2983 and #$83 ;mask N-----ZC +256c : c511 cmp adrf trap_ne ;bad flags -2523 : d0fe > bne * ;failed not equal (non zero) +256e : d0fe > bne * ;failed not equal (non zero) -2525 : 28 plp +2570 : 28 plp ; decimal ADC / SBC zp,x -2526 : 08 php ;save carry for subtract -2527 : a50b lda ad1 -2529 : 7500 adc 0,x ;perform add -252b : 08 php -252c : c50d cmp adrl ;check result - trap_ne ;bad result -252e : d0fe > bne * ;failed not equal (non zero) - -2530 : 68 pla ;check flags -2531 : 2983 and #$83 ;mask N-----ZC -2533 : c50f cmp adrf - trap_ne ;bad flags -2535 : d0fe > bne * ;failed not equal (non zero) - -2537 : 28 plp -2538 : 08 php ;save carry for next add -2539 : a50b lda ad1 -253b : f504 sbc sb2-ad2,x ;perform subtract -253d : 08 php -253e : c50d cmp adrl ;check result - trap_ne ;bad result -2540 : d0fe > bne * ;failed not equal (non zero) - -2542 : 68 pla ;check flags -2543 : 2983 and #$83 ;mask N-----ZC -2545 : c50f cmp adrf - trap_ne ;bad flags -2547 : d0fe > bne * ;failed not equal (non zero) - -2549 : 28 plp - ; decimal ADC / SBC abs,x -254a : 08 php ;save carry for subtract -254b : a50b lda ad1 -254d : 7df901 adc ada2-ad2,x ;perform add -2550 : 08 php -2551 : c50d cmp adrl ;check result - trap_ne ;bad result -2553 : d0fe > bne * ;failed not equal (non zero) - -2555 : 68 pla ;check flags -2556 : 2983 and #$83 ;mask N-----ZC -2558 : c50f cmp adrf - trap_ne ;bad flags -255a : d0fe > bne * ;failed not equal (non zero) - -255c : 28 plp -255d : 08 php ;save carry for next add -255e : a50b lda ad1 -2560 : fdfa01 sbc sba2-ad2,x ;perform subtract -2563 : 08 php -2564 : c50d cmp adrl ;check result - trap_ne ;bad result -2566 : d0fe > bne * ;failed not equal (non zero) - -2568 : 68 pla ;check flags -2569 : 2983 and #$83 ;mask N-----ZC -256b : c50f cmp adrf - trap_ne ;bad flags -256d : d0fe > bne * ;failed not equal (non zero) - -256f : 28 plp - ; decimal ADC / SBC abs,y -2570 : 08 php ;save carry for subtract -2571 : a50b lda ad1 -2573 : 790601 adc ada2-$ff,y ;perform add +2571 : 08 php ;save carry for subtract +2572 : a50d lda ad1 +2574 : 7500 adc 0,x ;perform add 2576 : 08 php -2577 : c50d cmp adrl ;check result +2577 : c50f cmp adrl ;check result trap_ne ;bad result 2579 : d0fe > bne * ;failed not equal (non zero) 257b : 68 pla ;check flags 257c : 2983 and #$83 ;mask N-----ZC -257e : c50f cmp adrf +257e : c511 cmp adrf trap_ne ;bad flags 2580 : d0fe > bne * ;failed not equal (non zero) 2582 : 28 plp 2583 : 08 php ;save carry for next add -2584 : a50b lda ad1 -2586 : f90701 sbc sba2-$ff,y ;perform subtract -2589 : 08 php -258a : c50d cmp adrl ;check result +2584 : a50d lda ad1 +2586 : f504 sbc sb2-ad2,x ;perform subtract +2588 : 08 php +2589 : c50f cmp adrl ;check result trap_ne ;bad result -258c : d0fe > bne * ;failed not equal (non zero) +258b : d0fe > bne * ;failed not equal (non zero) -258e : 68 pla ;check flags -258f : 2983 and #$83 ;mask N-----ZC -2591 : c50f cmp adrf +258d : 68 pla ;check flags +258e : 2983 and #$83 ;mask N-----ZC +2590 : c511 cmp adrf trap_ne ;bad flags -2593 : d0fe > bne * ;failed not equal (non zero) +2592 : d0fe > bne * ;failed not equal (non zero) -2595 : 28 plp - ; decimal ADC / SBC (zp,x) -2596 : 08 php ;save carry for subtract -2597 : a50b lda ad1 -2599 : 6144 adc (lo adi2-ad2,x) ;perform add +2594 : 28 plp + ; decimal ADC / SBC abs,x +2595 : 08 php ;save carry for subtract +2596 : a50d lda ad1 +2598 : 7df701 adc ada2-ad2,x ;perform add 259b : 08 php -259c : c50d cmp adrl ;check result +259c : c50f cmp adrl ;check result trap_ne ;bad result 259e : d0fe > bne * ;failed not equal (non zero) 25a0 : 68 pla ;check flags 25a1 : 2983 and #$83 ;mask N-----ZC -25a3 : c50f cmp adrf +25a3 : c511 cmp adrf trap_ne ;bad flags 25a5 : d0fe > bne * ;failed not equal (non zero) 25a7 : 28 plp 25a8 : 08 php ;save carry for next add -25a9 : a50b lda ad1 -25ab : e146 sbc (lo sbi2-ad2,x) ;perform subtract -25ad : 08 php -25ae : c50d cmp adrl ;check result +25a9 : a50d lda ad1 +25ab : fdf801 sbc sba2-ad2,x ;perform subtract +25ae : 08 php +25af : c50f cmp adrl ;check result trap_ne ;bad result -25b0 : d0fe > bne * ;failed not equal (non zero) +25b1 : d0fe > bne * ;failed not equal (non zero) -25b2 : 68 pla ;check flags -25b3 : 2983 and #$83 ;mask N-----ZC -25b5 : c50f cmp adrf +25b3 : 68 pla ;check flags +25b4 : 2983 and #$83 ;mask N-----ZC +25b6 : c511 cmp adrf trap_ne ;bad flags -25b7 : d0fe > bne * ;failed not equal (non zero) +25b8 : d0fe > bne * ;failed not equal (non zero) -25b9 : 28 plp +25ba : 28 plp + ; decimal ADC / SBC abs,y +25bb : 08 php ;save carry for subtract +25bc : a50d lda ad1 +25be : 790601 adc ada2-$ff,y ;perform add +25c1 : 08 php +25c2 : c50f cmp adrl ;check result + trap_ne ;bad result +25c4 : d0fe > bne * ;failed not equal (non zero) + +25c6 : 68 pla ;check flags +25c7 : 2983 and #$83 ;mask N-----ZC +25c9 : c511 cmp adrf + trap_ne ;bad flags +25cb : d0fe > bne * ;failed not equal (non zero) + +25cd : 28 plp +25ce : 08 php ;save carry for next add +25cf : a50d lda ad1 +25d1 : f90701 sbc sba2-$ff,y ;perform subtract +25d4 : 08 php +25d5 : c50f cmp adrl ;check result + trap_ne ;bad result +25d7 : d0fe > bne * ;failed not equal (non zero) + +25d9 : 68 pla ;check flags +25da : 2983 and #$83 ;mask N-----ZC +25dc : c511 cmp adrf + trap_ne ;bad flags +25de : d0fe > bne * ;failed not equal (non zero) + +25e0 : 28 plp + ; decimal ADC / SBC (zp,x) +25e1 : 08 php ;save carry for subtract +25e2 : a50d lda ad1 +25e4 : 6144 adc (lo adi2-ad2,x) ;perform add +25e6 : 08 php +25e7 : c50f cmp adrl ;check result + trap_ne ;bad result +25e9 : d0fe > bne * ;failed not equal (non zero) + +25eb : 68 pla ;check flags +25ec : 2983 and #$83 ;mask N-----ZC +25ee : c511 cmp adrf + trap_ne ;bad flags +25f0 : d0fe > bne * ;failed not equal (non zero) + +25f2 : 28 plp +25f3 : 08 php ;save carry for next add +25f4 : a50d lda ad1 +25f6 : e146 sbc (lo sbi2-ad2,x) ;perform subtract +25f8 : 08 php +25f9 : c50f cmp adrl ;check result + trap_ne ;bad result +25fb : d0fe > bne * ;failed not equal (non zero) + +25fd : 68 pla ;check flags +25fe : 2983 and #$83 ;mask N-----ZC +2600 : c511 cmp adrf + trap_ne ;bad flags +2602 : d0fe > bne * ;failed not equal (non zero) + +2604 : 28 plp ; decimal ADC / SBC (abs),y -25ba : 08 php ;save carry for subtract -25bb : a50b lda ad1 -25bd : 7154 adc (adiy2),y ;perform add -25bf : 08 php -25c0 : c50d cmp adrl ;check result +2605 : 08 php ;save carry for subtract +2606 : a50d lda ad1 +2608 : 7156 adc (adiy2),y ;perform add +260a : 08 php +260b : c50f cmp adrl ;check result trap_ne ;bad result -25c2 : d0fe > bne * ;failed not equal (non zero) +260d : d0fe > bne * ;failed not equal (non zero) -25c4 : 68 pla ;check flags -25c5 : 2983 and #$83 ;mask N-----ZC -25c7 : c50f cmp adrf +260f : 68 pla ;check flags +2610 : 2983 and #$83 ;mask N-----ZC +2612 : c511 cmp adrf trap_ne ;bad flags -25c9 : d0fe > bne * ;failed not equal (non zero) +2614 : d0fe > bne * ;failed not equal (non zero) -25cb : 28 plp -25cc : 08 php ;save carry for next add -25cd : a50b lda ad1 -25cf : f156 sbc (sbiy2),y ;perform subtract -25d1 : 08 php -25d2 : c50d cmp adrl ;check result +2616 : 28 plp +2617 : 08 php ;save carry for next add +2618 : a50d lda ad1 +261a : f158 sbc (sbiy2),y ;perform subtract +261c : 08 php +261d : c50f cmp adrl ;check result trap_ne ;bad result -25d4 : d0fe > bne * ;failed not equal (non zero) +261f : d0fe > bne * ;failed not equal (non zero) -25d6 : 68 pla ;check flags -25d7 : 2983 and #$83 ;mask N-----ZC -25d9 : c50f cmp adrf +2621 : 68 pla ;check flags +2622 : 2983 and #$83 ;mask N-----ZC +2624 : c511 cmp adrf trap_ne ;bad flags -25db : d0fe > bne * ;failed not equal (non zero) +2626 : d0fe > bne * ;failed not equal (non zero) -25dd : 28 plp +2628 : 28 plp ; decimal ADC / SBC (zp) -25de : 08 php ;save carry for subtract -25df : a50b lda ad1 -25e1 : 7250 adc (adi2) ;perform add -25e3 : 08 php -25e4 : c50d cmp adrl ;check result +2629 : 08 php ;save carry for subtract +262a : a50d lda ad1 +262c : 7252 adc (adi2) ;perform add +262e : 08 php +262f : c50f cmp adrl ;check result trap_ne ;bad result -25e6 : d0fe > bne * ;failed not equal (non zero) +2631 : d0fe > bne * ;failed not equal (non zero) -25e8 : 68 pla ;check flags -25e9 : 2983 and #$83 ;mask N-----ZC -25eb : c50f cmp adrf +2633 : 68 pla ;check flags +2634 : 2983 and #$83 ;mask N-----ZC +2636 : c511 cmp adrf trap_ne ;bad flags -25ed : d0fe > bne * ;failed not equal (non zero) +2638 : d0fe > bne * ;failed not equal (non zero) -25ef : 28 plp -25f0 : 08 php ;save carry for next add -25f1 : a50b lda ad1 -25f3 : f252 sbc (sbi2) ;perform subtract -25f5 : 08 php -25f6 : c50d cmp adrl ;check result +263a : 28 plp +263b : 08 php ;save carry for next add +263c : a50d lda ad1 +263e : f254 sbc (sbi2) ;perform subtract +2640 : 08 php +2641 : c50f cmp adrl ;check result trap_ne ;bad result -25f8 : d0fe > bne * ;failed not equal (non zero) +2643 : d0fe > bne * ;failed not equal (non zero) -25fa : 68 pla ;check flags -25fb : 2983 and #$83 ;mask N-----ZC -25fd : c50f cmp adrf +2645 : 68 pla ;check flags +2646 : 2983 and #$83 ;mask N-----ZC +2648 : c511 cmp adrf trap_ne ;bad flags -25ff : d0fe > bne * ;failed not equal (non zero) +264a : d0fe > bne * ;failed not equal (non zero) -2601 : 28 plp -2602 : 60 rts +264c : 28 plp +264d : 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 -2603 : a50f chkadd lda adrf ;add V-flag if overflow -2605 : 2983 and #$83 ;keep N-----ZC / clear V -2607 : 48 pha -2608 : a50b lda ad1 ;test sign unequal between operands -260a : 450c eor ad2 -260c : 300a bmi ckad1 ;no overflow possible - operands have different sign -260e : a50b lda ad1 ;test sign equal between operands and result -2610 : 450d eor adrl -2612 : 1004 bpl ckad1 ;no overflow occured - operand and result have same sign -2614 : 68 pla -2615 : 0940 ora #$40 ;set V -2617 : 48 pha -2618 : 68 ckad1 pla -2619 : 850f sta adrf ;save expected flags +264e : a511 chkadd lda adrf ;add V-flag if overflow +2650 : 2983 and #$83 ;keep N-----ZC / clear V +2652 : 48 pha +2653 : a50d lda ad1 ;test sign unequal between operands +2655 : 450e eor ad2 +2657 : 300a bmi ckad1 ;no overflow possible - operands have different sign +2659 : a50d lda ad1 ;test sign equal between operands and result +265b : 450f eor adrl +265d : 1004 bpl ckad1 ;no overflow occured - operand and result have same sign +265f : 68 pla +2660 : 0940 ora #$40 ;set V +2662 : 48 pha +2663 : 68 ckad1 pla +2664 : 8511 sta adrf ;save expected flags ; binary ADC / SBC (zp) -261b : 08 php ;save carry for subtract -261c : a50b lda ad1 -261e : 7250 adc (adi2) ;perform add -2620 : 08 php -2621 : c50d cmp adrl ;check result +2666 : 08 php ;save carry for subtract +2667 : a50d lda ad1 +2669 : 7252 adc (adi2) ;perform add +266b : 08 php +266c : c50f cmp adrl ;check result trap_ne ;bad result -2623 : d0fe > bne * ;failed not equal (non zero) +266e : d0fe > bne * ;failed not equal (non zero) -2625 : 68 pla ;check flags -2626 : 29c3 and #$c3 ;mask NV----ZC -2628 : c50f cmp adrf +2670 : 68 pla ;check flags +2671 : 29c3 and #$c3 ;mask NV----ZC +2673 : c511 cmp adrf trap_ne ;bad flags -262a : d0fe > bne * ;failed not equal (non zero) +2675 : d0fe > bne * ;failed not equal (non zero) -262c : 28 plp -262d : 08 php ;save carry for next add -262e : a50b lda ad1 -2630 : f252 sbc (sbi2) ;perform subtract -2632 : 08 php -2633 : c50d cmp adrl ;check result +2677 : 28 plp +2678 : 08 php ;save carry for next add +2679 : a50d lda ad1 +267b : f254 sbc (sbi2) ;perform subtract +267d : 08 php +267e : c50f cmp adrl ;check result trap_ne ;bad result -2635 : d0fe > bne * ;failed not equal (non zero) +2680 : d0fe > bne * ;failed not equal (non zero) -2637 : 68 pla ;check flags -2638 : 29c3 and #$c3 ;mask NV----ZC -263a : c50f cmp adrf +2682 : 68 pla ;check flags +2683 : 29c3 and #$c3 ;mask NV----ZC +2685 : c511 cmp adrf trap_ne ;bad flags -263c : d0fe > bne * ;failed not equal (non zero) +2687 : d0fe > bne * ;failed not equal (non zero) -263e : 28 plp -263f : 60 rts +2689 : 28 plp +268a : 60 rts ; target for the jump indirect test -2640 : 4626 ji_adr dw test_ji -2642 : 8216 dw ji_ret +268b : 9126 ji_adr dw test_ji +268d : 8216 dw ji_ret -2644 : 88 dey -2645 : 88 dey -2646 : test_ji -2646 : 08 php ;either SP or Y count will fail, if we do not hit -2647 : 88 dey -2648 : 88 dey -2649 : 88 dey -264a : 28 plp +268f : 88 dey +2690 : 88 dey +2691 : test_ji +2691 : 08 php ;either SP or Y count will fail, if we do not hit +2692 : 88 dey +2693 : 88 dey +2694 : 88 dey +2695 : 28 plp trap_cs ;flags loaded? -264b : b0fe > bcs * ;failed carry set +2696 : b0fe > bcs * ;failed carry set trap_vs -264d : 70fe > bvs * ;failed overflow set +2698 : 70fe > bvs * ;failed overflow set trap_mi -264f : 30fe > bmi * ;failed minus (bit 7 set) +269a : 30fe > bmi * ;failed minus (bit 7 set) trap_eq -2651 : f0fe > beq * ;failed equal (zero) +269c : f0fe > beq * ;failed equal (zero) -2653 : c949 cmp #'I' ;registers loaded? +269e : c949 cmp #'I' ;registers loaded? trap_ne -2655 : d0fe > bne * ;failed not equal (non zero) +26a0 : d0fe > bne * ;failed not equal (non zero) -2657 : e04e cpx #'N' +26a2 : e04e cpx #'N' trap_ne -2659 : d0fe > bne * ;failed not equal (non zero) +26a4 : d0fe > bne * ;failed not equal (non zero) -265b : c041 cpy #('D'-3) +26a6 : c041 cpy #('D'-3) trap_ne -265d : d0fe > bne * ;failed not equal (non zero) +26a8 : d0fe > bne * ;failed not equal (non zero) -265f : 48 pha ;save a,x -2660 : 8a txa -2661 : 48 pha -2662 : ba tsx -2663 : e0fd cpx #$fd ;check SP +26aa : 48 pha ;save a,x +26ab : 8a txa +26ac : 48 pha +26ad : ba tsx +26ae : e0fd cpx #$fd ;check SP trap_ne -2665 : d0fe > bne * ;failed not equal (non zero) +26b0 : d0fe > bne * ;failed not equal (non zero) -2667 : 68 pla ;restore x -2668 : aa tax +26b2 : 68 pla ;restore x +26b3 : aa tax set_stat $ff > load_flag $ff -2669 : a9ff > lda #$ff ;allow test to change I-flag (no mask) +26b4 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -266b : 48 > pha ;use stack to load status -266c : 28 > plp +26b6 : 48 > pha ;use stack to load status +26b7 : 28 > plp -266d : 68 pla ;restore a -266e : e8 inx ;return registers with modifications -266f : 49aa eor #$aa ;N=1, V=1, Z=0, C=1 -2671 : 6cff02 jmp (ji_tab+2) -2674 : ea nop -2675 : ea nop +26b8 : 68 pla ;restore a +26b9 : e8 inx ;return registers with modifications +26ba : 49aa eor #$aa ;N=1, V=1, Z=0, C=1 +26bc : 6cff02 jmp (ji_tab+2) +26bf : ea nop +26c0 : ea nop trap ;runover protection -2676 : 4c7626 > jmp * ;failed anyway +26c1 : 4cc126 > jmp * ;failed anyway +26c4 : 4c0004 jmp start ;catastrophic error - cannot continue ; target for the jump indirect test -2679 : bd26 jxi_adr dw trap_ind -267b : bd26 dw trap_ind -267d : 8726 dw test_jxi ;+4 -267f : ce16 dw jxi_ret ;+6 -2681 : bd26 dw trap_ind -2683 : bd26 dw trap_ind +26c7 : 0e27 jxi_adr dw trap_ind +26c9 : 0e27 dw trap_ind +26cb : d526 dw test_jxi ;+4 +26cd : ce16 dw jxi_ret ;+6 +26cf : 0e27 dw trap_ind +26d1 : 0e27 dw trap_ind -2685 : 88 dey -2686 : 88 dey -2687 : test_jxi -2687 : 08 php ;either SP or Y count will fail, if we do not hit -2688 : 88 dey -2689 : 88 dey -268a : 88 dey -268b : 28 plp +26d3 : 88 dey +26d4 : 88 dey +26d5 : test_jxi +26d5 : 08 php ;either SP or Y count will fail, if we do not hit +26d6 : 88 dey +26d7 : 88 dey +26d8 : 88 dey +26d9 : 28 plp trap_cs ;flags loaded? -268c : b0fe > bcs * ;failed carry set +26da : b0fe > bcs * ;failed carry set trap_vs -268e : 70fe > bvs * ;failed overflow set +26dc : 70fe > bvs * ;failed overflow set trap_mi -2690 : 30fe > bmi * ;failed minus (bit 7 set) +26de : 30fe > bmi * ;failed minus (bit 7 set) trap_eq -2692 : f0fe > beq * ;failed equal (zero) +26e0 : f0fe > beq * ;failed equal (zero) -2694 : c958 cmp #'X' ;registers loaded? +26e2 : c958 cmp #'X' ;registers loaded? trap_ne -2696 : d0fe > bne * ;failed not equal (non zero) +26e4 : d0fe > bne * ;failed not equal (non zero) -2698 : e004 cpx #4 +26e6 : e004 cpx #4 trap_ne -269a : d0fe > bne * ;failed not equal (non zero) +26e8 : d0fe > bne * ;failed not equal (non zero) -269c : c046 cpy #('I'-3) +26ea : c046 cpy #('I'-3) trap_ne -269e : d0fe > bne * ;failed not equal (non zero) +26ec : d0fe > bne * ;failed not equal (non zero) -26a0 : 48 pha ;save a,x -26a1 : 8a txa -26a2 : 48 pha -26a3 : ba tsx -26a4 : e0fd cpx #$fd ;check SP +26ee : 48 pha ;save a,x +26ef : 8a txa +26f0 : 48 pha +26f1 : ba tsx +26f2 : e0fd cpx #$fd ;check SP trap_ne -26a6 : d0fe > bne * ;failed not equal (non zero) +26f4 : d0fe > bne * ;failed not equal (non zero) -26a8 : 68 pla ;restore x -26a9 : aa tax +26f6 : 68 pla ;restore x +26f7 : aa tax set_stat $ff > load_flag $ff -26aa : a9ff > lda #$ff ;allow test to change I-flag (no mask) +26f8 : a9ff > lda #$ff ;allow test to change I-flag (no mask) > -26ac : 48 > pha ;use stack to load status -26ad : 28 > plp +26fa : 48 > pha ;use stack to load status +26fb : 28 > plp -26ae : 68 pla ;restore a -26af : e8 inx ;return registers with modifications -26b0 : e8 inx -26b1 : 49aa eor #$aa ;N=1, V=1, Z=0, C=1 -26b3 : 7cf902 jmp (jxi_tab,x) -26b6 : ea nop -26b7 : ea nop +26fc : 68 pla ;restore a +26fd : e8 inx ;return registers with modifications +26fe : e8 inx +26ff : 49aa eor #$aa ;N=1, V=1, Z=0, C=1 +2701 : 7cf902 jmp (jxi_tab,x) +2704 : ea nop +2705 : ea nop trap ;runover protection -26b8 : 4cb826 > jmp * ;failed anyway +2706 : 4c0627 > jmp * ;failed anyway +2709 : 4c0004 jmp start ;catastrophic error - cannot continue ; JMP (abs,x) with bad x -26bb : ea nop -26bc : ea nop -26bd : trap_ind -26bd : ea nop -26be : ea nop +270c : ea nop +270d : ea nop +270e : trap_ind +270e : ea nop +270f : ea nop trap ;near miss indexed indirect jump -26bf : 4cbf26 > jmp * ;failed anyway +2710 : 4c1027 > jmp * ;failed anyway +2713 : 4c0004 jmp start ;catastrophic error - cannot continue ;trap in case of unexpected IRQ, NMI, BRK, RESET -26c2 : nmi_trap +2716 : nmi_trap trap ;check stack for conditions at NMI -26c2 : 4cc226 > jmp * ;failed anyway +2716 : 4c1627 > jmp * ;failed anyway -26c5 : res_trap +2719 : 4c0004 jmp start ;catastrophic error - cannot continue +271c : res_trap trap ;unexpected RESET -26c5 : 4cc526 > jmp * ;failed anyway +271c : 4c1c27 > jmp * ;failed anyway -26c8 : irq_trap -26c8 : 08 php ;save decimal flag -26c9 : ba tsx ;test break on stack -26ca : bd0201 lda $102,x -26cd : 2910 and #break - trap_eq ;check stack for conditions at IRQ -26cf : f0fe > beq * ;failed equal (zero) +271f : 4c0004 jmp start ;catastrophic error - cannot continue - if ROM_vectors = 1 -26d1 : 68 pla ;test decimal mode cleared -26d2 : 2908 and #decmode - trap_ne ;decimal mode not cleared after BRK -26d4 : d0fe > bne * ;failed not equal (non zero) +2722 : 88 dey +2723 : 88 dey +2724 : irq_trap ;BRK test or unextpected BRK or IRQ +2724 : 08 php ;either SP or Y count will fail, if we do not hit +2725 : 88 dey +2726 : 88 dey +2727 : 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) +2728 : c9bd cmp #$ff-'B' ;BRK pass 2 registers loaded? +272a : f042 beq break2 +272c : c942 cmp #'B' ;BRK pass 1 registers loaded? + trap_ne +272e : d0fe > bne * ;failed not equal (non zero) -26d6 : 28 plp ;pop saved flags -26d7 : 68 pla ;return address low -26d8 : c917 cmp #lo(brk_ret) - trap_ne ;unexpected BRK -26da : d0fe > bne * ;failed not equal (non zero) +2730 : e052 cpx #'R' + trap_ne +2732 : d0fe > bne * ;failed not equal (non zero) -26dc : 68 pla ;return address high -26dd : c917 cmp #hi(brk_ret) - trap_ne ;unexpected BRK -26df : d0fe > bne * ;failed not equal (non zero) +2734 : c048 cpy #'K'-3 + trap_ne +2736 : d0fe > bne * ;failed not equal (non zero) -26e1 : 4c1717 jmp brk_ret - else - trap_ne ;check stack for conditions at BRK - endif +2738 : 850a sta irq_a ;save registers during break test +273a : 860b stx irq_x +273c : ba tsx ;test break on stack +273d : bd0201 lda $102,x + cmp_flag 0 ;break test should have B=1 & unused=1 on stack +2740 : c930 > cmp #(0 |fao)&m8 ;expected flags + always on bits + + trap_ne ;possible no break flag on stack +2742 : d0fe > bne * ;failed not equal (non zero) + +2744 : 68 pla + cmp_flag intdis ;should have added interrupt disable +2745 : c934 > cmp #(intdis |fao)&m8 ;expected flags + always on bits + + trap_ne +2747 : d0fe > bne * ;failed not equal (non zero) + +2749 : ba tsx +274a : e0fc cpx #$fc ;sp -3? (return addr, flags) + trap_ne +274c : d0fe > bne * ;failed not equal (non zero) + +274e : adff01 lda $1ff ;propper return on stack +2751 : c917 cmp #hi(brk_ret0) + trap_ne +2753 : d0fe > bne * ;failed not equal (non zero) + +2755 : adfe01 lda $1fe +2758 : c920 cmp #lo(brk_ret0) + trap_ne +275a : d0fe > bne * ;failed not equal (non zero) + + load_flag $ff +275c : a9ff > lda #$ff ;allow test to change I-flag (no mask) + +275e : 48 pha +275f : a60b ldx irq_x +2761 : e8 inx ;return registers with modifications +2762 : a50a lda irq_a +2764 : 49aa eor #$aa +2766 : 28 plp ;N=1, V=1, Z=1, C=1 but original flags should be restored +2767 : 40 rti + trap ;runover protection +2768 : 4c6827 > jmp * ;failed anyway + +276b : 4c0004 jmp start ;catastrophic error - cannot continue + +276e : break2 ;BRK pass 2 +276e : e0ad cpx #$ff-'R' + trap_ne +2770 : d0fe > bne * ;failed not equal (non zero) + +2772 : c0b1 cpy #$ff-'K'-3 + trap_ne +2774 : d0fe > bne * ;failed not equal (non zero) + +2776 : 850a sta irq_a ;save registers during break test +2778 : 860b stx irq_x +277a : ba tsx ;test break on stack +277b : bd0201 lda $102,x + cmp_flag $ff ;break test should have B=1 +277e : c9ff > cmp #($ff |fao)&m8 ;expected flags + always on bits + + trap_ne ;possibly no break flag on stack +2780 : d0fe > bne * ;failed not equal (non zero) + +2782 : 68 pla + cmp_flag $ff-decmode ;actual passed flags should have decmode cleared +2783 : c9f7 > cmp #($ff-decmode |fao)&m8 ;expected flags + always on bits + + trap_ne +2785 : d0fe > bne * ;failed not equal (non zero) + +2787 : ba tsx +2788 : e0fc cpx #$fc ;sp -3? (return addr, flags) + trap_ne +278a : d0fe > bne * ;failed not equal (non zero) + +278c : adff01 lda $1ff ;propper return on stack +278f : c917 cmp #hi(brk_ret1) + trap_ne +2791 : d0fe > bne * ;failed not equal (non zero) + +2793 : adfe01 lda $1fe +2796 : c946 cmp #lo(brk_ret1) + trap_ne +2798 : d0fe > bne * ;failed not equal (non zero) + + load_flag intdis +279a : a904 > lda #intdis ;allow test to change I-flag (no mask) + +279c : 48 pha +279d : a60b ldx irq_x +279f : e8 inx ;return registers with modifications +27a0 : a50a lda irq_a +27a2 : 49aa eor #$aa +27a4 : 28 plp ;N=0, V=0, Z=0, C=0 but original flags should be restored +27a5 : 40 rti + trap ;runover protection +27a6 : 4ca627 > jmp * ;failed anyway + +27a9 : 4c0004 jmp start ;catastrophic error - cannot continue if report = 1 include "report.i65" @@ -11209,6 +11407,10 @@ ffff = ram_top = -1 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 @@ -11256,25 +11458,13 @@ ffff = ram_top = -1 ; 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 -26e4 : 00000000000000.. ds lo(ji_ret - * - 2) -2780 : ea nop -2781 : ea nop -2782 : ea ji_px nop ;low address byte matched with ji_ret -2783 : ea nop + ds lo(ji_ret - * - 2) + nop + nop + ji_px nop ;low address byte matched with ji_ret + nop trap ;jmp indirect page cross bug -2784 : 4c8427 > jmp * ;failed anyway - - ; JMP (abs,x) when $xxff and $xx00 are from same page -2787 : 00000000000000.. ds lo(jxi_ret - * - 2) -27cc : ea nop -27cd : ea nop -27ce : ea jxi_px nop ;low address byte matched with jxi_ret -27cf : ea nop - trap ;jmp indexed indirect page cross bug -27d0 : 4cd027 > jmp * ;failed anyway - - else ; JMP (abs,x) when $xxff and $xx00 are from same page ds lo(jxi_ret - * - 2) nop @@ -11282,25 +11472,37 @@ ffff = ram_top = -1 jxi_px nop ;low address byte matched with jxi_ret nop trap ;jmp indexed indirect page cross bug + else + ; JMP (abs,x) when $xxff and $xx00 are from same page +27ac : 00000000000000.. ds lo(jxi_ret - * - 2) +27cc : ea nop +27cd : ea nop +27ce : ea jxi_px nop ;low address byte matched with jxi_ret +27cf : ea nop + trap ;jmp indexed indirect page cross bug +27d0 : 4cd027 > jmp * ;failed anyway + ; 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 +27d3 : 00000000000000.. ds lo(ji_ret - * - 2) +2880 : ea nop +2881 : ea nop +2882 : ea ji_px nop ;low address byte matched with ji_ret +2883 : ea nop trap ;jmp indirect page cross bug +2884 : 4c8428 > jmp * ;failed anyway + endif if (load_data_direct = 1) & (ROM_vectors = 1) fffa = org $fffa ;vectors -fffa : c226 dw nmi_trap -fffc : c526 dw res_trap -fffe : c826 dw irq_trap +fffa : 1627 dw nmi_trap +fffc : 1c27 dw res_trap +fffe : 2427 dw irq_trap endif fffa = end start - + No errors in pass 2. Wrote binary from address $0000 through $ffff. Total size 65536 bytes. diff --git a/report.i65 b/report.i65 index 06f8849..8cf7a09 100644 --- a/report.i65 +++ b/report.i65 @@ -78,6 +78,8 @@ rabs jsr rspace ;ask to continue rprt rmsg_cont rerr1 jsr rget + cmp #'S' + beq rskip cmp #'C' bne rerr1 ;restore registers @@ -87,7 +89,44 @@ rerr1 jsr rget tax pla plp - rts + rts +;skip the current test +rskip lda #$f0 ;already end of tests? + cmp test_case + beq rerr1 ;skip is not available + ldx #$ff ;clear stack + txs + inc test_case ;next test + lda #lo(start) ;find begin of test + sta zpt + lda #hi(start) + sta zpt+1 +rskipl1 ldy #4 ;search pattern +rskipl2 lda (zpt),y ;next byte + cmp rmark,y + bne rskipnx ;no match + dey + bmi rskipf ;found pattern + cpy #1 ;skip immediate value + bne rskipl2 + dey + beq rskipl2 + +rskipnx inc zpt ;next RAM location + bne rskipl1 + inc zpt+1 + bne rskipl1 + +rskipf ldy #1 ;pattern found - check test number + lda (zpt),y ;test number + cmp #$f0 ;end of last test? + beq rskipe ;ask to rerun all + cmp test_case ;is next test? + bne rskipnx ;continue searching +rskipe jmp (zpt) ;start next test or rerun at end of tests + +rmark lda #0 ;begin of test search pattern + sta test_case ;show test has ended, ask to repeat report_success @@ -117,7 +156,8 @@ rget ;get character in A ; and #8 ; beq rget1 ;not a real ACIA - so RDRF is not checked - lda $bff0 ;read acia rx reg +; lda $bff0 ;read acia rx reg + lda $f004 ;Kowalski simulator default ;the load can be replaced by a call to a kernal routine ; jsr $ffcf ;example: CHRIN for a C64 cmp #'a' ;lower case @@ -159,7 +199,8 @@ rchar ;report character in A ; beq rchar1 ; pla ;not a real ACIA - so TDRF is not checked - sta $bff0 ;write acia tx reg +; sta $bff0 ;write acia tx reg + sta $f001 ;Kowalski simulator default ;the store can be replaced by a call to a kernal routine ; jsr $ffd2 ;example: CHROUT for a C64 rts @@ -169,7 +210,7 @@ rmsg_start rmsg_stack db 10,13,"regs Y X A PS PCLPCH",10,13,0 rmsg_cont - db 10,13,"press C to continue",10,13,0 + db 10,13,"press C to continue or S to skip current test",10,13,0 rmsg_success db 10,13,"All tests completed, press R to repeat",10,13,0 if rep_int = 1