URL
https://opencores.org/ocsvn/m65c02/m65c02/trunk
Subversion Repositories m65c02
[/] [m65c02/] [trunk/] [Src/] [M65C02-Test-Programs/] [Klaus2m5_Functional_Tests/] [65c02_ft.lst] - Rev 3
Compare with Previous | Blame | View Log
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 1
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
---------------------------------------------------------- Symbol Table -----------------------------------------------------------
Symbol Value Decimal
absAN : $023f 575
absANa : $024b 587
absANa_ : $3ed6 16086
absAN_ : $3eca 16074
absEO : $0243 579
absEOa : $024f 591
absEOa_ : $3eda 16090
absEO_ : $3ece 16078
absflo : $0257 599
absflo_ : $3ee2 16098
absOR : $023b 571
absORa : $0247 583
absORa_ : $3ed2 16082
absOR_ : $3ec6 16070
absrlo : $0253 595
absrlo_ : $3ede 16094
abst : $0203 515
abs1 : $0208 520
abs1_ : $3e93 16019
abs7f : $020c 524
abs7f_ : $3e97 16023
ada2 : $0203 515
adfc : $00b2 178
adiy2 : $00fc 252
adiy2_ : $3e8f 16015
adi2 : $00f8 248
adi2_ : $3e8b 16011
adrf : $00b7 183
adrh : $00b6 182
adrl : $00b5 181
ad1 : $00b3 179
ad2 : $00b4 180
bin_test : $38fc 14588
break : $0010 16
brk_ret : $09bb 2491
br1 : $0613 1555
br11 : $065d 1629
br12 : $0661 1633
br13 : $0665 1637
br14 : $0671 1649
br2 : $0617 1559
br3 : $061b 1563
br4 : $0627 1575
carry : $0001 1
check_ram : <macro>
chkadd : $3b90 15248
chkadi : $3c0b 15371 *
chkdad : $3a1f 14879
chkdadi : $3a82 14978 *
chkdsbi : $3a9d 15005 *
chksbi : $3c26 15398 *
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 2
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
ckad1 : $3ba5 15269
cmp_flag : <macro>
code_segment : $0400 1024 *
data_bss : $0208 520
data_bss_end : $025b 603
data_end : $3ee6 16102
data_init : $3e93 16019
data_segment : $0200 512 *
decmode : $0008 8
dec_test : $3968 14696
eor_flag : <macro>
fASL : $0221 545
fASL_ : $3eac 16044
fai : $0034 52
fao : $0030 48
far_ret : $08a8 2216
fc : $0001 1
fINC : $0236 566
fINC_ : $3ec1 16065
fLDx : $020d 525
fLDx_ : $3e98 16024
fLSR : $0229 553
fLSR_ : $3eb4 16052
fn : $0080 128
fnc : $0081 129
fnv : $00c0 192
fnz : $0082 130
fnzc : $0083 131
fROL : $0221 545
fROLc : $0225 549
fROLc_ : $3eb0 16048
fROL_ : $3eac 16044
fROR : $0229 553
fRORc : $022d 557
fRORc_ : $3eb8 16056
fROR_ : $3eb4 16052
fv : $0040 64
fvz : $0042 66
fz : $0002 2
fzc : $0003 3
I_flag : $0003 3 *
indAN : $00e0 224
indAN_ : $3e73 15987
indEO : $00e8 232
indEO_ : $3e7b 15995
indOR : $00f0 240
indOR_ : $3e83 16003
indt : $00d6 214
indt_ : $3e69 15977
ind1 : $00ca 202
ind1_ : $3e5d 15965
ind_ret : $091f 2335
intdis : $0004 4
inwt : $00de 222
inwt_ : $3e71 15985
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 3
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
inw1 : $00d4 212
inw1_ : $3e67 15975
irq_a : $00b0 176
irq_trap : $3dfa 15866
irq_x : $00b1 177
jsr_ret : $0967 2407 *
ld_data : $0412 1042
ld_zp : $0408 1032
load_data_direct : $0000 0 *
load_flag : <macro>
minus : $0080 128
m8 : $00ff 255
m8i : $00fb 251
nbr1 : $061f 1567
nbr11 : $0669 1641
nbr12 : $066b 1643
nbr13 : $066d 1645
nbr14 : $066f 1647
nbr2 : $0621 1569
nbr3 : $0623 1571
nbr4 : $0625 1573
next_test : <macro>
nmi_trap : $3df4 15860
overfl : $0040 64
ptr_ind_ret : $3d5c 15708
ptr_tst_ind : $3d5a 15706
ROM_vectors : $0000 0 *
rASL : $0211 529
rASL_ : $3e9c 16028
ram_chksm : $0201 513
ram_top : $ffff -1 *
range_adr : $04bc 1212 *
range_end : $0547 1351
range_fw : $0433 1075
range_loop : $042b 1067
range_ok : $0540 1344
range_op : $04bb 1211
reserv : $0020 32
res_trap : $3df6 15862
rINC : $0231 561
rINC_ : $3ebc 16060
rLSR : $0219 537
rLSR_ : $3ea4 16036
rROL : $0211 529
rROLc : $0215 533
rROLc_ : $3ea0 16032
rROL_ : $3e9c 16028
rROR : $0219 537
rRORc : $021d 541
rRORc_ : $3ea8 16040
rROR_ : $3ea4 16036
sba2 : $0204 516
sbiy2 : $00fe 254
sbiy2_ : $3e91 16017
sbi2 : $00fa 250
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 4
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
sbi2_ : $3e8d 16013
sb2 : $00b8 184
set_a : <macro>
set_abs : <macro>
set_absx : <macro>
set_ax : <macro>
set_ay : <macro>
set_stat : <macro>
set_x : <macro>
set_y : <macro>
set_z : <macro>
set_zx : <macro>
skip0002 : $0424 1060
skip0006 : $0550 1360
skip0009 : $0563 1379
skip0011 : $0567 1383
skip0013 : $056b 1387
skip0015 : $0571 1393
skip0017 : $0575 1397
skip0019 : $0579 1401
skip0021 : $0580 1408
skip0023 : $0584 1412
skip0025 : $0588 1416
skip0027 : $058e 1422
skip0029 : $0592 1426
skip0031 : $0596 1430
skip0033 : $059d 1437
skip0035 : $05a1 1441
skip0037 : $05a5 1445
skip0039 : $05ab 1451
skip0041 : $05af 1455
skip0043 : $05b3 1459
skip0046 : $05bc 1468
skip0048 : $05d1 1489
skip0050 : $05d9 1497
skip0052 : $05e0 1504
skip0054 : $05e7 1511
skip0056 : $05ee 1518
skip0058 : $05f5 1525
skip0061 : $05fe 1534
skip0073 : $062f 1583
skip0076 : $0636 1590
skip0078 : $063d 1597
skip0082 : $064d 1613
skip0084 : $0651 1617
skip0086 : $0655 1621
skip0088 : $0659 1625
skip0099 : $0679 1657
skip0103 : $0681 1665
skip0107 : $0689 1673
skip0111 : $0691 1681
skip0115 : $0699 1689
skip0119 : $06a1 1697
skip0123 : $06a9 1705
skip0127 : $06b1 1713
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 5
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip0131 : $06b9 1721
skip0134 : $06c2 1730
skip0139 : $06da 1754
skip0142 : $06e1 1761
skip0147 : $06f1 1777
skip0150 : $06f8 1784
skip0155 : $0708 1800
skip0158 : $070f 1807
skip0163 : $071f 1823
skip0166 : $0726 1830
skip0171 : $0736 1846
skip0174 : $073d 1853
skip0179 : $074d 1869
skip0182 : $0754 1876
skip0187 : $0764 1892
skip0190 : $076b 1899
skip0195 : $077b 1915
skip0198 : $0782 1922
skip0203 : $0792 1938
skip0206 : $0799 1945
skip0211 : $07a9 1961
skip0214 : $07b0 1968
skip0219 : $07c0 1984
skip0222 : $07c7 1991
skip0227 : $07d7 2007
skip0230 : $07de 2014
skip0232 : $07e5 2021
skip0234 : $07eb 2027
skip0237 : $07f4 2036
skip0242 : $0809 2057
skip0245 : $0810 2064
skip0250 : $0821 2081
skip0253 : $0828 2088
skip0256 : $0832 2098
skip0261 : $084a 2122
skip0264 : $0851 2129
skip0266 : $0858 2136
skip0268 : $085e 2142
skip0273 : $0871 2161
skip0276 : $0878 2168
skip0278 : $087f 2175
skip0280 : $0885 2181
skip0283 : $088e 2190
skip0287 : $08a6 2214
skip0289 : $08ac 2220
skip0291 : $08b0 2224
skip0293 : $08b4 2228
skip0295 : $08b8 2232
skip0297 : $08be 2238
skip0299 : $08c4 2244
skip0301 : $08ca 2250
skip0303 : $08d9 2265
skip0305 : $08df 2271
skip0307 : $08e3 2275
skip0309 : $08e7 2279
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 6
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip0311 : $08eb 2283
skip0313 : $08f1 2289
skip0315 : $08f7 2295
skip0317 : $08fd 2301
skip0320 : $0906 2310
skip0324 : $091d 2333
skip0326 : $0928 2344
skip0328 : $092c 2348
skip0330 : $0930 2352
skip0332 : $0934 2356
skip0334 : $093a 2362
skip0336 : $0940 2368
skip0338 : $0946 2374
skip0340 : $094d 2381
skip0343 : $0956 2390
skip0347 : $0971 2417
skip0349 : $0975 2421
skip0351 : $0979 2425
skip0353 : $097d 2429
skip0355 : $0983 2435
skip0357 : $0989 2441
skip0359 : $098f 2447
skip0361 : $0996 2454
skip0364 : $099f 2463
skip0368 : $09c5 2501
skip0370 : $09cb 2507
skip0372 : $09d1 2513
skip0375 : $09d8 2520
skip0377 : $09df 2527
skip0380 : $09e8 2536
skip0386 : $09fb 2555
skip0390 : $0a06 2566
skip0394 : $0a11 2577
skip0398 : $0a1c 2588
skip0402 : $0a27 2599
skip0406 : $0a32 2610
skip0410 : $0a3d 2621
skip0416 : $0a4b 2635
skip0420 : $0a56 2646
skip0424 : $0a61 2657
skip0428 : $0a6c 2668
skip0432 : $0a77 2679
skip0436 : $0a82 2690
skip0440 : $0a8d 2701
skip0446 : $0a9b 2715
skip0450 : $0aa6 2726
skip0453 : $0ab0 2736
skip0458 : $0ac4 2756
skip0461 : $0acb 2763
skip0464 : $0ad5 2773
skip0467 : $0adc 2780
skip0470 : $0ae6 2790
skip0473 : $0aed 2797
skip0476 : $0af7 2807
skip0479 : $0afe 2814
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 7
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip0482 : $0b08 2824
skip0485 : $0b0f 2831
skip0490 : $0b1e 2846
skip0493 : $0b25 2853
skip0496 : $0b2f 2863
skip0499 : $0b36 2870
skip0502 : $0b40 2880
skip0505 : $0b47 2887
skip0508 : $0b51 2897
skip0511 : $0b58 2904
skip0514 : $0b62 2914
skip0517 : $0b69 2921
skip0522 : $0b79 2937
skip0525 : $0b80 2944
skip0528 : $0b8a 2954
skip0531 : $0b91 2961
skip0534 : $0b9b 2971
skip0537 : $0ba2 2978
skip0540 : $0bac 2988
skip0543 : $0bb3 2995
skip0546 : $0bbd 3005
skip0549 : $0bc4 3012
skip0554 : $0bd3 3027
skip0557 : $0bda 3034
skip0560 : $0be4 3044
skip0563 : $0beb 3051
skip0566 : $0bf5 3061
skip0569 : $0bfc 3068
skip0572 : $0c06 3078
skip0575 : $0c0d 3085
skip0578 : $0c17 3095
skip0581 : $0c1e 3102
skip0586 : $0c2e 3118
skip0589 : $0c35 3125
skip0592 : $0c42 3138
skip0595 : $0c49 3145
skip0598 : $0c56 3158
skip0601 : $0c5d 3165
skip0606 : $0c6b 3179
skip0609 : $0c72 3186
skip0612 : $0c7f 3199
skip0615 : $0c86 3206
skip0618 : $0c93 3219
skip0621 : $0c9a 3226
skip0626 : $0caa 3242
skip0629 : $0cb1 3249
skip0632 : $0cbe 3262
skip0635 : $0cc5 3269
skip0638 : $0cd2 3282
skip0641 : $0cd9 3289
skip0646 : $0ce7 3303
skip0649 : $0cee 3310
skip0652 : $0cfb 3323
skip0655 : $0d02 3330
skip0658 : $0d0f 3343
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 8
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip0661 : $0d16 3350
skip0665 : $0d27 3367
skip0668 : $0d2e 3374
skip0671 : $0d3c 3388
skip0674 : $0d43 3395
skip0677 : $0d51 3409
skip0680 : $0d58 3416
skip0684 : $0d69 3433
skip0687 : $0d70 3440
skip0690 : $0d7e 3454
skip0693 : $0d85 3461
skip0696 : $0d93 3475
skip0699 : $0d9a 3482
skip0703 : $0dab 3499
skip0706 : $0db2 3506
skip0709 : $0dc0 3520
skip0712 : $0dc7 3527
skip0715 : $0dd5 3541
skip0718 : $0ddc 3548
skip0722 : $0ded 3565
skip0725 : $0df4 3572
skip0728 : $0e02 3586
skip0731 : $0e09 3593
skip0734 : $0e17 3607
skip0737 : $0e1e 3614
skip0740 : $0e28 3624
skip0745 : $0e3e 3646
skip0750 : $0e4d 3661
skip0755 : $0e5d 3677
skip0760 : $0e6c 3692
skip0765 : $0e7c 3708
skip0772 : $0e96 3734
skip0775 : $0e9f 3743
skip0779 : $0eab 3755
skip0782 : $0eb4 3764
skip0786 : $0ec0 3776
skip0789 : $0ec9 3785
skip0793 : $0ed8 3800
skip0796 : $0ee1 3809
skip0800 : $0eed 3821
skip0803 : $0ef6 3830
skip0807 : $0f02 3842
skip0810 : $0f0b 3851
skip0813 : $0f15 3861
skip0817 : $0f34 3892
skip0820 : $0f3e 3902
skip0824 : $0f5b 3931
skip0827 : $0f65 3941
skip0831 : $0f83 3971
skip0834 : $0f8d 3981
skip0838 : $0fab 4011
skip0841 : $0fb5 4021
skip0843 : $0fc8 4040
skip0845 : $0fd6 4054
skip0848 : $0fe6 4070
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 9
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip0850 : $1012 4114
skip0852 : $101e 4126
skip0855 : $102e 4142
skip0859 : $104d 4173
skip0862 : $1057 4183
skip0866 : $1074 4212
skip0869 : $107e 4222
skip0873 : $109b 4251
skip0876 : $10a5 4261
skip0880 : $10c2 4290
skip0883 : $10cc 4300
skip0885 : $10dd 4317
skip0887 : $10eb 4331
skip0890 : $10fb 4347
skip0892 : $1125 4389
skip0894 : $1131 4401
skip0897 : $1141 4417
skip0901 : $115f 4447
skip0904 : $1169 4457
skip0908 : $1182 4482
skip0911 : $118c 4492
skip0915 : $11a5 4517
skip0918 : $11af 4527
skip0922 : $11c8 4552
skip0925 : $11d2 4562
skip0929 : $11eb 4587
skip0932 : $11f5 4597
skip0936 : $120e 4622
skip0939 : $1218 4632
skip0943 : $1231 4657
skip0946 : $123b 4667
skip0950 : $1254 4692
skip0953 : $125e 4702
skip0957 : $1276 4726
skip0960 : $1280 4736
skip0964 : $1298 4760
skip0967 : $12a2 4770
skip0971 : $12ba 4794
skip0974 : $12c4 4804
skip0978 : $12dc 4828
skip0981 : $12e6 4838
skip0985 : $12ff 4863
skip0988 : $1309 4873
skip0992 : $1322 4898
skip0995 : $132c 4908
skip0999 : $1345 4933
skip1002 : $134f 4943
skip1006 : $1368 4968
skip1009 : $1372 4978
skip1013 : $1380 4992
skip1016 : $138a 5002
skip1020 : $1398 5016
skip1023 : $13a2 5026
skip1027 : $13b0 5040
skip1030 : $13ba 5050
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 10
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip1034 : $13c8 5064
skip1037 : $13d2 5074
skip1041 : $13e0 5088
skip1044 : $13ea 5098
skip1048 : $13f8 5112
skip1051 : $1402 5122
skip1055 : $1410 5136
skip1058 : $141a 5146
skip1062 : $1428 5160
skip1065 : $1432 5170
skip1067 : $143e 5182
skip1069 : $144c 5196
skip1071 : $1459 5209
skip1073 : $1467 5223
skip1075 : $1474 5236
skip1077 : $1482 5250
skip1079 : $148f 5263
skip1081 : $149d 5277
skip1084 : $14a9 5289
skip1088 : $14c7 5319
skip1091 : $14d1 5329
skip1095 : $14ea 5354
skip1098 : $14f4 5364
skip1102 : $150d 5389
skip1105 : $1517 5399
skip1109 : $1530 5424
skip1112 : $153a 5434
skip1116 : $1553 5459
skip1119 : $155d 5469
skip1123 : $1576 5494
skip1126 : $1580 5504
skip1130 : $1599 5529
skip1133 : $15a3 5539
skip1137 : $15bc 5564
skip1140 : $15c6 5574
skip1144 : $15df 5599
skip1147 : $15e9 5609
skip1151 : $1602 5634
skip1154 : $160c 5644
skip1158 : $1625 5669
skip1161 : $162f 5679
skip1165 : $1648 5704
skip1168 : $1652 5714
skip1172 : $166b 5739
skip1175 : $1675 5749
skip1179 : $168e 5774
skip1182 : $1698 5784
skip1186 : $16b1 5809
skip1189 : $16bb 5819
skip1193 : $16d4 5844
skip1196 : $16de 5854
skip1200 : $16ec 5868
skip1203 : $16f6 5878
skip1207 : $1704 5892
skip1210 : $170e 5902
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 11
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip1214 : $171c 5916
skip1217 : $1726 5926
skip1221 : $1734 5940
skip1224 : $173e 5950
skip1228 : $174c 5964
skip1231 : $1756 5974
skip1235 : $1764 5988
skip1238 : $176e 5998
skip1242 : $177c 6012
skip1245 : $1786 6022
skip1249 : $1794 6036
skip1252 : $179e 6046
skip1254 : $17aa 6058
skip1256 : $17b8 6072
skip1258 : $17c5 6085
skip1260 : $17d3 6099
skip1262 : $17e0 6112
skip1264 : $17ee 6126
skip1266 : $17fb 6139
skip1268 : $1809 6153
skip1271 : $1815 6165
skip1275 : $1833 6195
skip1278 : $183d 6205
skip1282 : $1859 6233
skip1285 : $1863 6243
skip1289 : $187e 6270
skip1292 : $1888 6280
skip1296 : $18a3 6307
skip1299 : $18ad 6317
skip1301 : $18be 6334
skip1303 : $18cc 6348
skip1306 : $18dc 6364
skip1310 : $18fa 6394
skip1313 : $1904 6404
skip1317 : $1920 6432
skip1320 : $192a 6442
skip1322 : $193d 6461
skip1326 : $195c 6492
skip1329 : $1966 6502
skip1333 : $1981 6529
skip1336 : $198b 6539
skip1338 : $199e 6558
skip1342 : $19bf 6591
skip1345 : $19c9 6601
skip1349 : $19e8 6632
skip1352 : $19f2 6642
skip1354 : $1a07 6663
skip1357 : $1a17 6679
skip1359 : $1a40 6720
skip1361 : $1a4c 6732
skip1363 : $1a71 6769
skip1365 : $1a92 6802
skip1367 : $1ab6 6838
skip1370 : $1ac6 6854
skip1374 : $1ae1 6881
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 12
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip1377 : $1aeb 6891
skip1381 : $1b01 6913
skip1384 : $1b0b 6923
skip1388 : $1b21 6945
skip1391 : $1b2b 6955
skip1395 : $1b41 6977
skip1398 : $1b4b 6987
skip1402 : $1b61 7009
skip1405 : $1b6b 7019
skip1409 : $1b81 7041
skip1412 : $1b8b 7051
skip1416 : $1ba1 7073
skip1419 : $1bab 7083
skip1423 : $1bc1 7105
skip1426 : $1bcb 7115
skip1430 : $1be1 7137
skip1433 : $1beb 7147
skip1437 : $1c01 7169
skip1440 : $1c0b 7179
skip1444 : $1c21 7201
skip1447 : $1c2b 7211
skip1451 : $1c41 7233
skip1454 : $1c4b 7243
skip1458 : $1c61 7265
skip1461 : $1c6b 7275
skip1465 : $1c81 7297
skip1468 : $1c8b 7307
skip1472 : $1ca1 7329
skip1475 : $1cab 7339
skip1479 : $1cc1 7361
skip1482 : $1ccb 7371
skip1486 : $1cd9 7385
skip1489 : $1ce3 7395
skip1493 : $1cf1 7409
skip1496 : $1cfb 7419
skip1500 : $1d09 7433
skip1503 : $1d13 7443
skip1507 : $1d21 7457
skip1510 : $1d2b 7467
skip1514 : $1d39 7481
skip1517 : $1d43 7491
skip1521 : $1d51 7505
skip1524 : $1d5b 7515
skip1528 : $1d69 7529
skip1531 : $1d73 7539
skip1535 : $1d81 7553
skip1538 : $1d8b 7563
skip1540 : $1d97 7575
skip1542 : $1da5 7589
skip1544 : $1db2 7602
skip1546 : $1dc0 7616
skip1548 : $1dcd 7629
skip1550 : $1ddb 7643
skip1552 : $1de8 7656
skip1554 : $1df6 7670
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 13
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip1557 : $1e02 7682
skip1562 : $1e17 7703
skip1565 : $1e1e 7710
skip1570 : $1e2f 7727
skip1573 : $1e36 7734
skip1578 : $1e47 7751
skip1581 : $1e4e 7758
skip1586 : $1e5f 7775
skip1589 : $1e66 7782
skip1594 : $1e77 7799
skip1597 : $1e7e 7806
skip1602 : $1e8f 7823
skip1605 : $1e96 7830
skip1610 : $1ea7 7847
skip1613 : $1eae 7854
skip1618 : $1ebf 7871
skip1621 : $1ec6 7878
skip1626 : $1ed8 7896
skip1629 : $1edf 7903
skip1634 : $1ef1 7921
skip1637 : $1ef8 7928
skip1642 : $1f0a 7946
skip1645 : $1f11 7953
skip1650 : $1f23 7971
skip1653 : $1f2a 7978
skip1658 : $1f3c 7996
skip1661 : $1f43 8003
skip1666 : $1f55 8021
skip1669 : $1f5c 8028
skip1674 : $1f6e 8046
skip1677 : $1f75 8053
skip1682 : $1f87 8071
skip1685 : $1f8e 8078
skip1688 : $1f98 8088
skip1694 : $1fae 8110
skip1698 : $1fbb 8123
skip1701 : $1fc7 8135
skip1704 : $1fce 8142
skip1710 : $1fe0 8160
skip1714 : $1fed 8173
skip1717 : $1ff9 8185
skip1720 : $2000 8192
skip1726 : $2013 8211
skip1730 : $2021 8225
skip1733 : $202e 8238
skip1736 : $2035 8245
skip1742 : $2048 8264
skip1746 : $2056 8278
skip1749 : $2063 8291
skip1752 : $206a 8298
skip1758 : $207c 8316
skip1762 : $2089 8329
skip1765 : $2095 8341
skip1768 : $209c 8348
skip1774 : $20ae 8366
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 14
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip1778 : $20bb 8379
skip1781 : $20c7 8391
skip1784 : $20ce 8398
skip1787 : $20d8 8408
skip1793 : $20ee 8430
skip1797 : $20fb 8443
skip1800 : $2107 8455
skip1803 : $210e 8462
skip1809 : $2120 8480
skip1813 : $212d 8493
skip1816 : $2139 8505
skip1819 : $2140 8512
skip1825 : $2153 8531
skip1829 : $2161 8545
skip1832 : $216e 8558
skip1835 : $2175 8565
skip1841 : $2188 8584
skip1845 : $2196 8598
skip1848 : $21a3 8611
skip1851 : $21aa 8618
skip1857 : $21bc 8636
skip1861 : $21c9 8649
skip1864 : $21d5 8661
skip1867 : $21dc 8668
skip1873 : $21ee 8686
skip1877 : $21fb 8699
skip1880 : $2207 8711
skip1883 : $220e 8718
skip1886 : $2218 8728
skip1891 : $222d 8749
skip1894 : $2234 8756
skip1899 : $2245 8773
skip1902 : $224c 8780
skip1907 : $225d 8797
skip1910 : $2264 8804
skip1915 : $2275 8821
skip1918 : $227c 8828
skip1923 : $228d 8845
skip1926 : $2294 8852
skip1931 : $22a5 8869
skip1934 : $22ac 8876
skip1939 : $22be 8894
skip1942 : $22c5 8901
skip1947 : $22d7 8919
skip1950 : $22de 8926
skip1955 : $22f0 8944
skip1958 : $22f7 8951
skip1963 : $2309 8969
skip1966 : $2310 8976
skip1971 : $2322 8994
skip1974 : $2329 9001
skip1979 : $233b 9019
skip1982 : $2342 9026
skip1987 : $2353 9043
skip1990 : $235a 9050
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 15
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip1995 : $236b 9067
skip1998 : $2372 9074
skip2003 : $2383 9091
skip2006 : $238a 9098
skip2011 : $239b 9115
skip2014 : $23a2 9122
skip2019 : $23b3 9139
skip2022 : $23ba 9146
skip2027 : $23cb 9163
skip2030 : $23d2 9170
skip2035 : $23e5 9189
skip2038 : $23ec 9196
skip2043 : $23fd 9213
skip2046 : $2404 9220
skip2051 : $2415 9237
skip2054 : $241c 9244
skip2059 : $242d 9261
skip2062 : $2434 9268
skip2067 : $2445 9285
skip2070 : $244c 9292
skip2075 : $245d 9309
skip2078 : $2464 9316
skip2083 : $2476 9334
skip2086 : $247d 9341
skip2091 : $248f 9359
skip2094 : $2496 9366
skip2099 : $24a8 9384
skip2102 : $24af 9391
skip2107 : $24c1 9409
skip2110 : $24c8 9416
skip2115 : $24da 9434
skip2118 : $24e1 9441
skip2123 : $24f3 9459
skip2126 : $24fa 9466
skip2131 : $2510 9488
skip2134 : $2517 9495
skip2139 : $2529 9513
skip2142 : $2530 9520
skip2147 : $2542 9538
skip2150 : $2549 9545
skip2155 : $255b 9563
skip2158 : $2562 9570
skip2163 : $2574 9588
skip2166 : $257b 9595
skip2171 : $258d 9613
skip2174 : $2594 9620
skip2179 : $25a5 9637
skip2182 : $25ac 9644
skip2187 : $25bd 9661
skip2190 : $25c4 9668
skip2195 : $25d5 9685
skip2198 : $25dc 9692
skip2203 : $25ed 9709
skip2206 : $25f4 9716
skip2211 : $2605 9733
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 16
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip2214 : $260c 9740
skip2219 : $261d 9757
skip2222 : $2624 9764
skip2227 : $2635 9781
skip2230 : $263c 9788
skip2235 : $264d 9805
skip2238 : $2654 9812
skip2243 : $2665 9829
skip2246 : $266c 9836
skip2251 : $267d 9853
skip2254 : $2684 9860
skip2259 : $2695 9877
skip2262 : $269c 9884
skip2267 : $26ad 9901
skip2270 : $26b4 9908
skip2273 : $26be 9918
skip2278 : $26d4 9940
skip2281 : $26de 9950
skip2286 : $26f2 9970
skip2289 : $26fc 9980
skip2294 : $2710 10000
skip2297 : $271a 10010
skip2302 : $272e 10030
skip2305 : $2738 10040
skip2310 : $274c 10060
skip2313 : $2756 10070
skip2318 : $276a 10090
skip2321 : $2774 10100
skip2326 : $2788 10120
skip2329 : $2792 10130
skip2334 : $27a6 10150
skip2337 : $27b0 10160
skip2342 : $27c4 10180
skip2345 : $27ce 10190
skip2350 : $27e2 10210
skip2353 : $27ec 10220
skip2358 : $2800 10240
skip2361 : $280a 10250
skip2366 : $281e 10270
skip2369 : $2828 10280
skip2372 : $2834 10292
skip2377 : $284f 10319
skip2380 : $2859 10329
skip2385 : $2872 10354
skip2388 : $287c 10364
skip2393 : $2895 10389
skip2396 : $289f 10399
skip2401 : $28b8 10424
skip2404 : $28c2 10434
skip2409 : $28db 10459
skip2412 : $28e5 10469
skip2417 : $28fe 10494
skip2420 : $2908 10504
skip2425 : $2921 10529
skip2428 : $292b 10539
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 17
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip2433 : $2944 10564
skip2436 : $294e 10574
skip2441 : $2967 10599
skip2444 : $2971 10609
skip2449 : $298a 10634
skip2452 : $2994 10644
skip2457 : $29ad 10669
skip2460 : $29b7 10679
skip2465 : $29d0 10704
skip2468 : $29da 10714
skip2471 : $29e6 10726
skip2476 : $2a04 10756
skip2479 : $2a0e 10766
skip2484 : $2a2a 10794
skip2487 : $2a34 10804
skip2492 : $2a50 10832
skip2495 : $2a5a 10842
skip2500 : $2a76 10870
skip2503 : $2a80 10880
skip2508 : $2a9c 10908
skip2511 : $2aa6 10918
skip2516 : $2ac2 10946
skip2519 : $2acc 10956
skip2524 : $2ae8 10984
skip2527 : $2af2 10994
skip2532 : $2b0e 11022
skip2535 : $2b18 11032
skip2540 : $2b34 11060
skip2543 : $2b3e 11070
skip2548 : $2b5a 11098
skip2551 : $2b64 11108
skip2556 : $2b80 11136
skip2559 : $2b8a 11146
skip2564 : $2ba6 11174
skip2567 : $2bb0 11184
skip2570 : $2bbc 11196
skip2575 : $2bd7 11223
skip2578 : $2be1 11233
skip2583 : $2bfa 11258
skip2586 : $2c04 11268
skip2591 : $2c1d 11293
skip2594 : $2c27 11303
skip2599 : $2c40 11328
skip2602 : $2c4a 11338
skip2607 : $2c63 11363
skip2610 : $2c6d 11373
skip2615 : $2c86 11398
skip2618 : $2c90 11408
skip2623 : $2ca9 11433
skip2626 : $2cb3 11443
skip2631 : $2ccc 11468
skip2634 : $2cd6 11478
skip2639 : $2cef 11503
skip2642 : $2cf9 11513
skip2647 : $2d12 11538
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 18
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip2650 : $2d1c 11548
skip2655 : $2d35 11573
skip2658 : $2d3f 11583
skip2663 : $2d58 11608
skip2666 : $2d62 11618
skip2669 : $2d6e 11630
skip2674 : $2d8c 11660
skip2677 : $2d96 11670
skip2682 : $2db2 11698
skip2685 : $2dbc 11708
skip2690 : $2dd8 11736
skip2693 : $2de2 11746
skip2698 : $2dfe 11774
skip2701 : $2e08 11784
skip2706 : $2e24 11812
skip2709 : $2e2e 11822
skip2714 : $2e4a 11850
skip2717 : $2e54 11860
skip2722 : $2e70 11888
skip2725 : $2e7a 11898
skip2730 : $2e96 11926
skip2733 : $2ea0 11936
skip2738 : $2ebc 11964
skip2741 : $2ec6 11974
skip2746 : $2ee2 12002
skip2749 : $2eec 12012
skip2754 : $2f08 12040
skip2757 : $2f12 12050
skip2762 : $2f2e 12078
skip2765 : $2f38 12088
skip2768 : $2f44 12100
skip2773 : $2f5f 12127
skip2776 : $2f69 12137
skip2781 : $2f89 12169
skip2784 : $2f93 12179
skip2789 : $2fb6 12214
skip2792 : $2fc0 12224
skip2797 : $2fe0 12256
skip2800 : $2fea 12266
skip2803 : $3000 12288
skip2808 : $301e 12318
skip2811 : $3028 12328
skip2816 : $304c 12364
skip2819 : $3056 12374
skip2824 : $307d 12413
skip2827 : $3087 12423
skip2832 : $30ab 12459
skip2835 : $30b5 12469
skip2838 : $30cc 12492
skip2843 : $30e7 12519
skip2846 : $30f1 12529
skip2851 : $3113 12563
skip2854 : $311d 12573
skip2859 : $3140 12608
skip2862 : $314a 12618
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 19
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip2867 : $316c 12652
skip2870 : $3176 12662
skip2873 : $318c 12684
skip2878 : $31aa 12714
skip2881 : $31b4 12724
skip2886 : $31da 12762
skip2889 : $31e4 12772
skip2894 : $320b 12811
skip2897 : $3215 12821
skip2902 : $323b 12859
skip2905 : $3245 12869
skip2908 : $325c 12892
skip2913 : $3279 12921
skip2916 : $3283 12931
skip2921 : $329e 12958
skip2924 : $32a8 12968
skip2929 : $32c2 12994
skip2932 : $32cc 13004
skip2937 : $32e6 13030
skip2940 : $32f0 13040
skip2945 : $330c 13068
skip2948 : $3316 13078
skip2953 : $3332 13106
skip2956 : $333c 13116
skip2961 : $3352 13138
skip2964 : $335c 13148
skip2969 : $3372 13170
skip2972 : $337c 13180
skip2977 : $3393 13203
skip2980 : $339d 13213
skip2985 : $33b4 13236
skip2988 : $33be 13246
skip2993 : $33d5 13269
skip2996 : $33df 13279
skip3001 : $33f6 13302
skip3004 : $3400 13312
skip3009 : $3418 13336
skip3012 : $3422 13346
skip3017 : $343c 13372
skip3020 : $3446 13382
skip3025 : $345e 13406
skip3028 : $3468 13416
skip3033 : $347e 13438
skip3036 : $3488 13448
skip3039 : $3494 13460
skip3044 : $34b1 13489
skip3047 : $34bb 13499
skip3052 : $34d6 13526
skip3055 : $34e0 13536
skip3060 : $34fa 13562
skip3063 : $3504 13572
skip3068 : $351e 13598
skip3071 : $3528 13608
skip3076 : $3544 13636
skip3079 : $354e 13646
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 20
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip3084 : $356a 13674
skip3087 : $3574 13684
skip3092 : $358a 13706
skip3095 : $3594 13716
skip3100 : $35aa 13738
skip3103 : $35b4 13748
skip3108 : $35cb 13771
skip3111 : $35d5 13781
skip3116 : $35ec 13804
skip3119 : $35f6 13814
skip3124 : $360d 13837
skip3127 : $3617 13847
skip3132 : $362e 13870
skip3135 : $3638 13880
skip3140 : $3650 13904
skip3143 : $365a 13914
skip3148 : $3674 13940
skip3151 : $367e 13950
skip3156 : $3696 13974
skip3159 : $36a0 13984
skip3164 : $36b6 14006
skip3167 : $36c0 14016
skip3170 : $36cc 14028
skip3175 : $36e9 14057
skip3178 : $36f3 14067
skip3183 : $370e 14094
skip3186 : $3718 14104
skip3191 : $3732 14130
skip3194 : $373c 14140
skip3199 : $3756 14166
skip3202 : $3760 14176
skip3207 : $377c 14204
skip3210 : $3786 14214
skip3215 : $37a2 14242
skip3218 : $37ac 14252
skip3223 : $37c2 14274
skip3226 : $37cc 14284
skip3231 : $37e2 14306
skip3234 : $37ec 14316
skip3239 : $3803 14339
skip3242 : $380d 14349
skip3247 : $3824 14372
skip3250 : $382e 14382
skip3255 : $3845 14405
skip3258 : $384f 14415
skip3263 : $3866 14438
skip3266 : $3870 14448
skip3271 : $3888 14472
skip3274 : $3892 14482
skip3279 : $38ac 14508
skip3282 : $38b6 14518
skip3287 : $38ce 14542
skip3290 : $38d8 14552
skip3295 : $38ee 14574
skip3298 : $38f8 14584
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 21
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip3301 : $390a 14602
skip3304 : $3976 14710
skip3306 : $3a1d 14877
skip3310 : $3a2b 14891
skip3312 : $3a34 14900
skip3314 : $3a41 14913
skip3316 : $3a4a 14922
skip3318 : $3a58 14936
skip3320 : $3a61 14945
skip3322 : $3a6f 14959
skip3324 : $3a78 14968
skip3326 : $3a8a 14986
skip3328 : $3a93 14995
skip3330 : $3aa5 15013
skip3332 : $3aae 15022
skip3334 : $3abb 15035
skip3336 : $3ac4 15044
skip3338 : $3ad1 15057
skip3340 : $3ada 15066
skip3342 : $3ae8 15080
skip3344 : $3af1 15089
skip3346 : $3aff 15103
skip3348 : $3b08 15112
skip3350 : $3b16 15126
skip3352 : $3b1f 15135
skip3354 : $3b2d 15149
skip3356 : $3b36 15158
skip3358 : $3b43 15171
skip3360 : $3b4c 15180
skip3362 : $3b59 15193
skip3364 : $3b62 15202
skip3366 : $3b6f 15215
skip3368 : $3b78 15224
skip3370 : $3b85 15237
skip3372 : $3b8e 15246
skip3374 : $3bb4 15284
skip3376 : $3bbd 15293
skip3378 : $3bca 15306
skip3380 : $3bd3 15315
skip3382 : $3be1 15329
skip3384 : $3bea 15338
skip3386 : $3bf8 15352
skip3388 : $3c01 15361
skip3390 : $3c13 15379
skip3392 : $3c1c 15388
skip3394 : $3c2e 15406
skip3396 : $3c37 15415
skip3398 : $3c44 15428
skip3400 : $3c4d 15437
skip3402 : $3c5a 15450
skip3404 : $3c63 15459
skip3406 : $3c71 15473
skip3408 : $3c7a 15482
skip3410 : $3c88 15496
skip3412 : $3c91 15505
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 22
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip3414 : $3c9f 15519
skip3416 : $3ca8 15528
skip3418 : $3cb6 15542
skip3420 : $3cbf 15551
skip3422 : $3ccc 15564
skip3424 : $3cd5 15573
skip3426 : $3ce2 15586
skip3428 : $3ceb 15595
skip3430 : $3cf8 15608
skip3432 : $3d01 15617
skip3434 : $3d0e 15630
skip3436 : $3d17 15639
skip3438 : $3d24 15652
skip3440 : $3d28 15656
skip3442 : $3d2c 15660
skip3444 : $3d30 15664
skip3446 : $3d36 15670
skip3448 : $3d3c 15676
skip3450 : $3d42 15682
skip3452 : $3d4c 15692
skip3457 : $3d6b 15723
skip3459 : $3d6f 15727
skip3461 : $3d73 15731
skip3463 : $3d77 15735
skip3465 : $3d7d 15741
skip3467 : $3d83 15747
skip3469 : $3d89 15753
skip3471 : $3d93 15763
skip3476 : $3dad 15789
skip3478 : $3db1 15793
skip3480 : $3db5 15797
skip3482 : $3db9 15801
skip3484 : $3dbf 15807
skip3486 : $3dc5 15813
skip3488 : $3dcb 15819
skip3490 : $3dd5 15829
skip3492 : $3dde 15838
skip3494 : $3de7 15847
skip3501 : $3e04 15876
skip3503 : $3e0a 15882
skip3505 : $3e10 15888
skip3508 : $3e1e 15902
skip3510 : $3e25 15909
skip3512 : $3e2c 15916
skip3514 : $3e35 15925
skip3516 : $3e3e 15934
skip_bin_test : $0000 0 *
skip_dec_test : $0000 0 *
skip_part_1 : $0000 0 *
stack_top : $01ff 511 *
start : $0400 1024
success : <macro>
tadd : $392e 14638
tadd1 : $3940 14656
tand : $3263 12899
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 23
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
tandi1 : $3270 12912
tandi2 : $3295 12949
tand1 : $3288 12936
tand10 : $33c3 13251
tand11 : $33e4 13284
tand12 : $3407 13319
tand13 : $342b 13355
tand14 : $344d 13389
tand15 : $346d 13421
tand2 : $32ad 12973
tand3 : $32d1 13009
tand4 : $32f5 13045
tand5 : $331b 13083
tand6 : $3341 13121
tand7 : $3361 13153
tand8 : $3381 13185
tand9 : $33a2 13218
tasl : $26c5 9925
tasl1 : $26e3 9955
tasl2 : $283b 10299
tasl3 : $285e 10334
tasl4 : $29ed 10733
tasl5 : $2a13 10771
tasl6 : $2bc3 11203
tasl7 : $2be6 11238
tasl8 : $2d75 11637
tasl9 : $2d9b 11675
tdad : $3998 14744
tdad1 : $39aa 14762
tdad2 : $39ba 14778
tdad3 : $39bc 14780
tdad4 : $39d6 14806
tdad5 : $39db 14811
tdad6 : $39ff 14847
tdad7 : $3a13 14867
tdec : $2f79 12153
tdec1 : $2fa0 12192
tdec10 : $2fd0 12240
tdec11 : $2ff7 12279
tdec12 : $3099 12441
tdec13 : $30c3 12483
tdec14 : $315a 12634
tdec15 : $3183 12675
tdec16 : $3226 12838
tdec17 : $3253 12883
tdec2 : $303a 12346
tdec3 : $3064 12388
tdec4 : $3101 12545
tdec5 : $312a 12586
tdec6 : $31c5 12741
tdec7 : $31f2 12786
teor : $349b 13467
teori1 : $34a8 13480
teori2 : $34cd 13517
teor1 : $34c0 13504
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 24
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
teor10 : $35fb 13819
teor11 : $361c 13852
teor12 : $363f 13887
teor13 : $3663 13923
teor14 : $3685 13957
teor15 : $36a5 13989
teor2 : $34e5 13541
teor3 : $3509 13577
teor4 : $352d 13613
teor5 : $3553 13651
teor6 : $3579 13689
teor7 : $3599 13721
teor8 : $35b9 13753
teor9 : $35da 13786
test_bne : $055b 1371
test_case : $0200 512
test_far : $3d1b 15643
test_ind : $3d62 15714
test_jsr : $3da4 15780
test_near : $08db 2267
test_num : $002a 42 *
tinc : $2f4f 12111
tinc1 : $2f72 12146
tinc10 : $2fa6 12198
tinc11 : $2fc9 12233
tinc12 : $306b 12395
tinc13 : $3091 12433
tinc14 : $312e 12590
tinc15 : $3153 12627
tinc16 : $31f6 12790
tinc17 : $321f 12831
tinc2 : $300c 12300
tinc3 : $3032 12338
tinc4 : $30d5 12501
tinc5 : $30fa 12538
tinc6 : $3195 12693
tinc7 : $31be 12734
tldax : $181c 6172
tldax1 : $1842 6210
tldax2 : $1868 6248
tldax3 : $188d 6285
tldax4 : $19a9 6569
tldax5 : $19d2 6610
tldax6 : $1a1e 6686
tldax7 : $1a2a 6698
tlday : $18e3 6371
tlday1 : $1909 6409
tlday2 : $1946 6470
tlday3 : $196b 6507
tlday4 : $1a57 6743
tlday5 : $1a7a 6778
tlday6 : $1a9d 6813
tldx : $0f1c 3868
tldx1 : $0f43 3907
tldx2 : $0f6a 3946
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 25
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
tldx3 : $0f92 3986
tldx4 : $0fed 4077
tldx5 : $0ffa 4090
tldy : $1035 4149
tldy1 : $105c 4188
tldy2 : $1083 4227
tldy3 : $10aa 4266
tldy4 : $1102 4354
tldy5 : $110f 4367
tlsr : $2701 9985
tlsr1 : $271f 10015
tlsr2 : $2881 10369
tlsr3 : $28a4 10404
tlsr4 : $2a39 10809
tlsr5 : $2a5f 10847
tlsr6 : $2c09 11273
tlsr7 : $2c2c 11308
tlsr8 : $2dc1 11713
tlsr9 : $2de7 11751
tora : $36d3 14035
torai1 : $36e0 14048
torai2 : $3705 14085
tora1 : $36f8 14072
tora10 : $3833 14387
tora11 : $3854 14420
tora12 : $3877 14455
tora13 : $389b 14491
tora14 : $38bd 14525
tora15 : $38dd 14557
tora2 : $371d 14109
tora3 : $3741 14145
tora4 : $3765 14181
tora5 : $378b 14219
tora6 : $37b1 14257
tora7 : $37d1 14289
tora8 : $37f1 14321
tora9 : $3812 14354
trap : <macro>
trap_cc : <macro>
trap_cs : <macro>
trap_eq : <macro>
trap_mi : <macro>
trap_ne : <macro>
trap_pl : <macro>
trap_vc : <macro>
trap_vs : <macro>
trol : $273d 10045
trolc : $2779 10105
trolc1 : $2797 10135
trolc2 : $290d 10509
trolc3 : $2930 10544
trolc4 : $2ad1 10961
trolc5 : $2af7 10999
trolc6 : $2c95 11413
trolc7 : $2cb8 11448
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 26
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
trolc8 : $2e59 11865
trolc9 : $2e7f 11903
trol1 : $275b 10075
trol2 : $28c7 10439
trol3 : $28ea 10474
trol4 : $2a85 10885
trol5 : $2aab 10923
trol6 : $2c4f 11343
trol7 : $2c72 11378
trol8 : $2e0d 11789
trol9 : $2e33 11827
tror : $27b5 10165
trorc : $27f1 10225
trorc1 : $280f 10255
trorc2 : $2999 10649
trorc3 : $29bc 10684
trorc4 : $2b69 11113
trorc5 : $2b8f 11151
trorc6 : $2d21 11553
trorc7 : $2d44 11588
trorc8 : $2ef1 12017
trorc9 : $2f17 12055
tror1 : $27d3 10195
tror2 : $2953 10579
tror3 : $2976 10614
tror4 : $2b1d 11037
tror5 : $2b43 11075
tror6 : $2cdb 11483
tror7 : $2cfe 11518
tror8 : $2ea5 11941
tror9 : $2ecb 11979
tstax : $18b4 6324
tstax1 : $1a38 6712
tstay : $1931 6449
tstay1 : $1992 6546
tstay2 : $19fb 6651
tstay4 : $1a67 6759
tstay5 : $1a88 6792
tstay6 : $1aac 6828
tstx : $0fbc 4028
tstx1 : $1008 4104
tsty : $10d3 4307
tsty1 : $111d 4381
tst_a : <macro>
tst_abs : <macro>
tst_absx : <macro>
tst_ax : <macro>
tst_ay : <macro>
tst_stat : <macro>
tst_x : <macro>
tst_y : <macro>
tst_z : <macro>
tst_zx : <macro>
vec_bss : $fffa 65530
vec_init : $3ffa 16378
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 27
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
zero : $0002 2
zero_page : $00b0 176 *
zpAN : $00c2 194
zpAN_ : $3e55 15957
zpEO : $00c6 198
zpEO_ : $3e59 15961
zpOR : $00be 190
zpOR_ : $3e51 15953
zpt : $00b2 178
zp1 : $00b9 185
zp1_ : $3e4c 15948
zp7f : $00bd 189
zp7f_ : $3e50 15952
zp_bss : $00b9 185
zp_bss_end : $0100 256
zp_end : $3e93 16019
zp_init : $3e4c 15948
__6502__ : $0001 1
1409 labels used
5937 lines read, no errors in pass 1.
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 28
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
;
; 6 5 0 2 F U N C T I O N A L T E S T
;
; Copyright (C) 2012-2013 Klaus Dormann
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
;
;
; This program is designed to test all opcodes of a 6502 emulator using all
; addressing modes with focus on propper setting of the processor status
; register bits.
;
; version 23-jul-2013
; contact info at http://2m5.de or email K@2m5.de
;
; assembled with AS65 from http://www.kingswood-consulting.co.uk/assemblers/
; command line switches: -l -m -s2 -w -h0
; | | | | no page headers in listing
; | | | wide listing (133 char/col)
; | | write intel hex file instead of binary
; | expand macros in listing
; generate pass2 listing
;
; No IO - should be run from a monitor with access to registers.
; To run load intel hex image with a load command, than alter PC to 400 hex
; (code_segment) and enter a go command.
; Loop on program counter determines error or successful completion of test.
; Check listing for relevant traps (jump/branch *).
; Please note that in early tests some instructions will have to be used before
; they are actually tested!
;
; RESET, NMI or IRQ should not occur and will be trapped if vectors are enabled.
; Tests documented behavior of the original NMOS 6502 only! No unofficial
; opcodes. Additional opcodes of newer versions of the CPU (65C02, 65816) will
; not be tested. Decimal ops will only be tested with valid BCD operands and
; N V Z flags will be ignored.
;
; Debugging hints:
; Most of the code is written sequentially. if you hit a trap, check the
; immediately preceeding code for the instruction to be tested. Results are
; tested first, flags are checked second by pushing them onto the stack and
; pulling them to the accumulator after the result was checked. The "real"
; flags are no longer valid for the tested instruction at this time!
; If the tested instruction was indexed, the relevant index (X or Y) must
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 29
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
; also be checked. Opposed to the flags, X and Y registers are still valid.
;
; versions:
; 28-jul-2012 1st version distributed for testing
; 29-jul-2012 fixed references to location 0, now #0
; added license - GPLv3
; 30-jul-2012 added configuration options
; 01-aug-2012 added trap macro to allow user to change error handling
; 01-dec-2012 fixed trap in branch field must be a branch
; 02-mar-2013 fixed PLA flags not tested
; 19-jul-2013 allowed ROM vectors to be loaded when load_data_direct = 0
; added test sequence check to detect if tests jump their fence
; 23-jul-2013 added RAM integrity check
;
; 30-Aug-2013 Modified by Michael A. Morris to allow selection of tests
; 04-Jan-2014 Modified trap vectors to use sbc2oslite BRK handler for error
; trapping. Enabled success macro, which returns to the monitor.
; Disabled BRK trap test in order to trap out to the monitor.
; 30-Jan-2014 Modified success macro to issue brk instruction instead of rts.
; 27-Nov-2014 Modified success macro to use stp instruction instead of brk
; 07-Dec-2014 Modified success macro to use brk instruction instead of stp
;
; C O N F I G U R A T I O N
;
;ROM_vectors writable (0=no, 1=yes)
;
; if ROM vectors can not be used interrupts will not be trapped
; as a consequence BRK can not be tested but will be emulated to test RTI
;
0000 = ROM_vectors = 0
;
;load_data_direct (0=move from code segment, 1=load directly)
;loading directly is preferred but may not be supported by your platform
;0 produces only consecutive object code, 1 is not suitable for a binary image
;
0000 = load_data_direct = 0
;
;I_flag behavior (0=force enabled, 1=force disabled, 2=prohibit change, 3=allow
;change) 2 requires extra code and is not recommended. SEI & CLI can only be
;tested if you allow changing the interrupt status (I_flag = 3)
;
0003 = I_flag = 3
;
;configure memory - try to stay away from memory used by the system
;zero_page memory start address, $50 (80) consecutive Bytes required
; add 2 if I_flag = 2
;
00b0 = zero_page = $B0
;
;data_segment memory start address, $5B (91) consecutive Bytes required
;
0200 = data_segment = $200
if (data_segment & $ff) != 0
ERROR ERROR ERROR low byte of data_segment MUST be $00 !!
endif
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 30
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
;
;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
;
;RAM integrity test option. Checks for undesired RAM writes.
;set lowest non RAM or RAM mirror address page (-1=disable, 0=64k, $40=16k)
;leave disabled if a monitor, OS or background interrupt is allowed to alter RAM
;
ffff = ram_top = -1
;ram_top = $40
;
; Define the top of stack location
;
01ff = stack_top = $1FF
;
;Skip to ADC/SBC tests
;
0000 = skip_part_1 = 0
;
;Skip Binary or Decimal mode ADC/SBC instruction tests
;
0000 = skip_bin_test = 0
0000 = skip_dec_test = 0
;
noopt ;do not take shortcuts
;
;macros for error & success traps to allow user modification
;example:
;
;trap macro
; jsr my_error_handler
; endm
;
;trap_eq macro
; bne skip\?
; trap ;failed equal (zero)
;skip\?
; endm
;
; my_error_handler should pop the calling address from the stack and report it.
; putting larger portions of code (more than 3 bytes) inside the trap macro
; may lead to branch range problems for some tests.
trap macro
; db $db ; M65C02/M65C02A SToP instruction
brk ; Use BRK to return to the monitor
db test_num
endm
trap_eq macro
bne skip\?
trap ;failed equal (zero)
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 31
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
skip\?
endm
trap_ne macro
beq skip\?
trap ;failed equal (zero)
skip\?
endm
trap_cs macro
bcc skip\?
trap ;failed equal (zero)
skip\?
endm
trap_cc macro
bcs skip\?
trap ;failed equal (zero)
skip\?
endm
trap_mi macro
bpl skip\?
trap ;failed equal (zero)
skip\?
endm
trap_pl macro
bmi skip\?
trap ;failed equal (zero)
skip\?
endm
trap_vs macro
bvc skip\?
trap ;failed equal (zero)
skip\?
endm
trap_vc macro
bvs skip\?
trap ;failed equal (zero)
skip\?
endm
success macro
brk
db test_num+1
endm
0001 = carry equ %00000001 ;flag bits in status
0002 = zero equ %00000010
0004 = intdis equ %00000100
0008 = decmode equ %00001000
0010 = break equ %00010000
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 32
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0020 = reserv equ %00100000
0040 = overfl equ %01000000
0080 = minus equ %10000000
0001 = fc equ carry
0002 = fz equ zero
0003 = fzc equ carry+zero
0040 = fv equ overfl
0042 = fvz equ overfl+zero
0080 = fn equ minus
0081 = fnc equ minus+carry
0082 = fnz equ minus+zero
0083 = fnzc equ minus+zero+carry
00c0 = fnv equ minus+overfl
0030 = fao equ break+reserv ;bits always on after PHP, BRK
0034 = fai equ fao+intdis ;+ forced interrupt disable
00ff = m8 equ $ff ;8 bit mask
00fb = m8i equ $ff&~intdis ;8 bit mask - interrupt disable
;macros to allow masking of status bits.
;masking of interrupt enable/disable on load and compare
;masking of always on bits after PHP or BRK (unused & break) on compare
if I_flag = 0
load_flag macro
lda #\1&m8i ;force enable interrupts (mask I)
endm
cmp_flag macro
cmp #(\1|fao)&m8i ;I_flag is always enabled + always on bits
endm
eor_flag macro
eor #(\1&m8i|fao) ;mask I, invert expected flags + always on bits
endm
endif
if I_flag = 1
load_flag macro
lda #\1|intdis ;force disable interrupts
endm
cmp_flag macro
cmp #(\1|fai)&m8 ;I_flag is always disabled + always on bits
endm
eor_flag macro
eor #(\1|fai) ;invert expected flags + always on bits + I
endm
endif
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 33
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
if I_flag = 2
load_flag macro
lda #\1
ora flag_I_on ;restore I-flag
and flag_I_off
endm
cmp_flag macro
eor flag_I_on ;I_flag is never changed
cmp #(\1|fao)&m8i ;expected flags + always on bits, mask I
endm
eor_flag macro
eor flag_I_on ;I_flag is never changed
eor #(\1&m8i|fao) ;mask I, invert expected flags + always on bits
endm
endif
if I_flag = 3
load_flag macro
lda #\1 ;allow test to change I-flag (no mask)
endm
cmp_flag macro
cmp #(\1|fao)&m8 ;expected flags + always on bits
endm
eor_flag macro
eor #\1|fao ;invert expected flags + always on bits
endm
endif
;macros to set (register|memory|zeropage) & status
set_stat macro ;setting flags in the processor status register
load_flag \1
pha ;use stack to load status
plp
endm
set_a macro ;precharging accu & status
load_flag \2
pha ;use stack to load status
lda #\1 ;precharge accu
plp
endm
set_x macro ;precharging index & status
load_flag \2
pha ;use stack to load status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 34
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
ldx #\1 ;precharge index x
plp
endm
set_y macro ;precharging index & status
load_flag \2
pha ;use stack to load status
ldy #\1 ;precharge index y
plp
endm
set_ax macro ;precharging indexed accu & immediate status
load_flag \2
pha ;use stack to load status
lda \1,x ;precharge accu
plp
endm
set_ay macro ;precharging indexed accu & immediate status
load_flag \2
pha ;use stack to load status
lda \1,y ;precharge accu
plp
endm
set_z macro ;precharging indexed zp & immediate status
load_flag \2
pha ;use stack to load status
lda \1,x ;load to zeropage
sta zpt
plp
endm
set_zx macro ;precharging zp,x & immediate status
load_flag \2
pha ;use stack to load status
lda \1,x ;load to indexed zeropage
sta zpt,x
plp
endm
set_abs macro ;precharging indexed memory & immediate status
load_flag \2
pha ;use stack to load status
lda \1,x ;load to memory
sta abst
plp
endm
set_absx macro ;precharging abs,x & immediate status
load_flag \2
pha ;use stack to load status
lda \1,x ;load to indexed memory
sta abst,x
plp
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 35
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
endm
;macros to test (register|memory|zeropage) & status & (mask)
tst_stat macro ;testing flags in the processor status register
php ;save status
php ;use stack to retrieve status
pla
cmp_flag \1
trap_ne
plp ;restore status
endm
tst_a macro ;testing result in accu & flags
php ;save flags
php
cmp #\1 ;test result
trap_ne
pla ;load status
cmp_flag \2
trap_ne
plp ;restore status
endm
tst_x macro ;testing result in x index & flags
php ;save flags
php
cpx #\1 ;test result
trap_ne
pla ;load status
cmp_flag \2
trap_ne
plp ;restore status
endm
tst_y macro ;testing result in y index & flags
php ;save flags
php
cpy #\1 ;test result
trap_ne
pla ;load status
cmp_flag \2
trap_ne
plp ;restore status
endm
tst_ax macro ;indexed testing result in accu & flags
php ;save flags
cmp \1,x ;test result
trap_ne
pla ;load status
eor_flag \3
cmp \2,x ;test flags
trap_ne ;
endm
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 36
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
tst_ay macro ;indexed testing result in accu & flags
php ;save flags
cmp \1,y ;test result
trap_ne ;
pla ;load status
eor_flag \3
cmp \2,y ;test flags
trap_ne
endm
tst_z macro ;indexed testing result in zp & flags
php ;save flags
lda zpt
cmp \1,x ;test result
trap_ne
pla ;load status
eor_flag \3
cmp \2,x ;test flags
trap_ne
endm
tst_zx macro ;testing result in zp,x & flags
php ;save flags
lda zpt,x
cmp \1,x ;test result
trap_ne
pla ;load status
eor_flag \3
cmp \2,x ;test flags
trap_ne
endm
tst_abs macro ;indexed testing result in memory & flags
php ;save flags
lda abst
cmp \1,x ;test result
trap_ne
pla ;load status
eor_flag \3
cmp \2,x ;test flags
trap_ne
endm
tst_absx macro ;testing result in abs,x & flags
php ;save flags
lda abst,x
cmp \1,x ;test result
trap_ne
pla ;load status
eor_flag \3
cmp \2,x ;test flags
trap_ne
endm
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 37
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
; RAM integrity test
; verifies that none of the previous tests has altered RAM outside of the
; designated write areas.
; uses zpt word as indirect pointer, zpt+2 word as checksum
if ram_top > -1
check_ram macro
cld
lda #0
sta zpt ;set low byte of indirect pointer
sta zpt+3 ;checksum high byte
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
clc
ldx #zp_bss-zero_page ;zeropage - write test area
ccs3\? adc zero_page,x
bcc ccs2\?
inc zpt+3 ;carry to high byte
clc
ccs2\? inx
bne ccs3\?
ldx #hi(data_segment) ;set high byte of indirect pointer
stx zpt+1
ldy #lo(data_bss) ;data after write test area
ccs5\? adc (zpt),y
bcc ccs4\?
inc zpt+3 ;carry to high byte
clc
ccs4\? iny
bne ccs5\?
inx ;advance RAM high address
stx zpt+1
cpx #ram_top
bne ccs5\?
sta zpt+2 ;checksum low is
cmp ram_chksm ;checksum low expected
trap_ne ;checksum mismatch
lda zpt+3 ;checksum high is
cmp ram_chksm+1 ;checksum high expected
trap_ne ;checksum mismatch
endm
else
check_ram macro
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 38
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
;RAM check disabled - RAM size not set
endm
endif
next_test macro ;make sure, tests don't jump the fence
lda test_case ;previous test
cmp #test_num
trap_ne ;test is out of sequence
test_num = test_num + 1
lda #test_num ;*** this tests' number
sta test_case
;check_ram ;uncomment to find altered RAM after each test
endm
if load_data_direct = 1
data
else
; bss ;uninitialized segment, copy of data at end of code!
code
0000 = org 0
0000 : 00000000000000.. ds zero_page
endif
;
00b0 = org zero_page
;
; org 0
; ds zero_page
;
;break test interrupt save
;
00b0 : 00 irq_a ds 1 ;a register
00b1 : 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
00b2 : zpt ;5 bytes store/modify test area
;add/subtract operand generation and result/flag prediction
00b2 : 00 adfc ds 1 ;carry flag before op
00b3 : 00 ad1 ds 1 ;operand 1 - accumulator
00b4 : 00 ad2 ds 1 ;operand 2 - memory / immediate
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 39
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
00b5 : 00 adrl ds 1 ;expected result bits 0-7
00b6 : 00 adrh ds 1 ;expected result bit 8 (carry)
00b7 : 00 adrf ds 1 ;expected flags NV0000ZC (-V in decimal mode)
00b8 : 00 sb2 ds 1 ;operand 2 complemented for subtract
00b9 : zp_bss
00b9 : c3824100 zp1 db $c3,$82,$41,0 ;test patterns for LDx BIT ROL ROR ASL LSR
00bd : 7f zp7f db $7f ;test pattern for compare
;logical zeropage operands
00be : 001f7180 zpOR db 0,$1f,$71,$80 ;test pattern for OR
00c2 : 0fff7f80 zpAN db $0f,$ff,$7f,$80 ;test pattern for AND
00c6 : ff0f8f8f zpEO db $ff,$0f,$8f,$8f ;test pattern for EOR
;indirect addressing pointers
00ca : 0802 ind1 dw abs1 ;indirect pointer to pattern in absolute memory
00cc : 0902 dw abs1+1
00ce : 0a02 dw abs1+2
00d0 : 0b02 dw abs1+3
00d2 : 0c02 dw abs7f
00d4 : 1001 inw1 dw abs1-$f8 ;indirect pointer for wrap-test pattern
00d6 : 0302 indt dw abst ;indirect pointer to store area in absolute memory
00d8 : 0402 dw abst+1
00da : 0502 dw abst+2
00dc : 0602 dw abst+3
00de : 0b01 inwt dw abst-$f8 ;indirect pointer for wrap-test store
00e0 : 3f02 indAN dw absAN ;indirect pointer to AND pattern in absolute memory
00e2 : 4002 dw absAN+1
00e4 : 4102 dw absAN+2
00e6 : 4202 dw absAN+3
00e8 : 4302 indEO dw absEO ;indirect pointer to EOR pattern in absolute memory
00ea : 4402 dw absEO+1
00ec : 4502 dw absEO+2
00ee : 4602 dw absEO+3
00f0 : 3b02 indOR dw absOR ;indirect pointer to OR pattern in absolute memory
00f2 : 3c02 dw absOR+1
00f4 : 3d02 dw absOR+2
00f6 : 3e02 dw absOR+3
;add/subtract indirect pointers
00f8 : 0302 adi2 dw ada2 ;indirect pointer to operand 2 in absolute memory
00fa : 0402 sbi2 dw sba2 ;indirect pointer to complemented operand 2 (SBC)
00fc : 0401 adiy2 dw ada2-$ff ;with offset for indirect indexed
00fe : 0501 sbiy2 dw sba2-$ff
0100 : zp_bss_end
0200 = org data_segment
0200 : 00 test_case ds 1 ;current test number
0201 : 0000 ram_chksm ds 2 ;checksum for RAM integrity test
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 40
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
;add/subtract operand copy - abs tests write area
0203 : abst ;5 bytes store/modify test area
0203 : 00 ada2 ds 1 ;operand 2
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
;loads
020d : 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
;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
;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
;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
;logical results
0253 : 00ff7f80 absrlo db 0,$ff,$7f,$80
0257 : 02800080 absflo db fz,fn,0,fn
025b : data_bss_end
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 41
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
code
0400 = org code_segment
0400 : d8 [ 2] start cld
0401 : a900 [ 2] lda #0 ;*** test 0 = initialize
0403 : 8d0002 [ 4] sta test_case
0000 = test_num = 0
;stop interrupts before initializing BSS
if I_flag = 1
sei
endif
;initialize BSS segment
if load_data_direct != 1
0406 : a246 [ 2] ldx #zp_end-zp_init-1
0408 : bd4c3e [ 4] ld_zp lda zp_init,x
040b : 95b9 [ 4] sta zp_bss,x
040d : ca [ 2] dex
040e : 10f8 [ 3] bpl ld_zp
0410 : a252 [ 2] ldx #data_end-data_init-1
0412 : bd933e [ 4] ld_data lda data_init,x
0415 : 9d0802 [ 5] sta data_bss,x
0418 : ca [ 2] dex
0419 : 10f7 [ 3] bpl ld_data
if ROM_vectors = 1
ldx #5
ld_vect lda vec_init,x
sta vec_bss,x
dex
bpl ld_vect
endif
endif
;retain status of interrupt flag
if I_flag = 2
php
pla
and #4 ;isolate flag
sta flag_I_on ;or mask
eor #lo(~4) ;reverse
sta flag_I_off ;and mask
endif
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 42
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
;generate checksum for RAM integrity test
if ram_top > -1
lda #0
sta zpt ;set low byte of indirect pointer
sta ram_chksm+1 ;checksum high byte
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
clc
ldx #zp_bss-zero_page ;zeropage - write test area
gcs3 adc zero_page,x
bcc gcs2
inc ram_chksm+1 ;carry to high byte
clc
gcs2 inx
bne gcs3
ldx #hi(data_segment) ;set high byte of indirect pointer
stx zpt+1
ldy #lo(data_bss) ;data after write test area
gcs5 adc (zpt),y
bcc gcs4
inc ram_chksm+1 ;carry to high byte
clc
gcs4 iny
bne gcs5
inx ;advance RAM high address
stx zpt+1
cpx #ram_top
bne gcs5
sta ram_chksm ;checksum complete
endif
if skip_part_1 = 1
jmp bin_test
endif
next_test
041b : ad0002 [ 4]> lda test_case ;previous test
041e : c900 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
0420 : f002 [ 3]> beq skip0002
> trap ;failed equal (zero)
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 43
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>; db $db ; M65C02/M65C02A SToP instruction
0422 : 00 [ 7]> brk ; Use BRK to return to the monitor
0423 : 00 > db test_num
>
0424 : >skip0002
>
0001 = >test_num = test_num + 1
0424 : a901 [ 2]> lda #test_num ;*** this tests' number
0426 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
;testing relative addressing with BEQ
0429 : a0fe [ 2] ldy #$fe ;testing maximum range, not -1/-2 (invalid/self adr)
042b : range_loop
042b : 88 [ 2] dey ;next relative address
042c : 98 [ 2] tya
042d : aa [ 2] tax ;precharge count to end of loop
042e : 1003 [ 3] bpl range_fw ;calculate relative address
0430 : 18 [ 2] clc ;avoid branch self or to relative address of branch
0431 : 6902 [ 2] adc #2
0433 : range_fw
0433 : 497f [ 2] eor #$7f ;complement except sign
0435 : 8dbc04 [ 4] sta range_adr ;load into test target
0438 : a900 [ 2] lda #0 ;should set zero flag in status register
043a : 4cbb04 [ 3] jmp range_op
;relative address target field with branch under test in the middle
043d : ca [ 2] dex ;-128 - max backward
043e : ca [ 2] dex
043f : ca [ 2] dex
0440 : ca [ 2] dex
0441 : ca [ 2] dex
0442 : ca [ 2] dex
0443 : ca [ 2] dex
0444 : ca [ 2] dex
0445 : ca [ 2] dex ;-120
0446 : ca [ 2] dex
0447 : ca [ 2] dex
0448 : ca [ 2] dex
0449 : ca [ 2] dex
044a : ca [ 2] dex
044b : ca [ 2] dex
044c : ca [ 2] dex
044d : ca [ 2] dex
044e : ca [ 2] dex
044f : ca [ 2] dex ;-110
0450 : ca [ 2] dex
0451 : ca [ 2] dex
0452 : ca [ 2] dex
0453 : ca [ 2] dex
0454 : ca [ 2] dex
0455 : ca [ 2] dex
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 44
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0456 : ca [ 2] dex
0457 : ca [ 2] dex
0458 : ca [ 2] dex
0459 : ca [ 2] dex ;-100
045a : ca [ 2] dex
045b : ca [ 2] dex
045c : ca [ 2] dex
045d : ca [ 2] dex
045e : ca [ 2] dex
045f : ca [ 2] dex
0460 : ca [ 2] dex
0461 : ca [ 2] dex
0462 : ca [ 2] dex
0463 : ca [ 2] dex ;-90
0464 : ca [ 2] dex
0465 : ca [ 2] dex
0466 : ca [ 2] dex
0467 : ca [ 2] dex
0468 : ca [ 2] dex
0469 : ca [ 2] dex
046a : ca [ 2] dex
046b : ca [ 2] dex
046c : ca [ 2] dex
046d : ca [ 2] dex ;-80
046e : ca [ 2] dex
046f : ca [ 2] dex
0470 : ca [ 2] dex
0471 : ca [ 2] dex
0472 : ca [ 2] dex
0473 : ca [ 2] dex
0474 : ca [ 2] dex
0475 : ca [ 2] dex
0476 : ca [ 2] dex
0477 : ca [ 2] dex ;-70
0478 : ca [ 2] dex
0479 : ca [ 2] dex
047a : ca [ 2] dex
047b : ca [ 2] dex
047c : ca [ 2] dex
047d : ca [ 2] dex
047e : ca [ 2] dex
047f : ca [ 2] dex
0480 : ca [ 2] dex
0481 : ca [ 2] dex ;-60
0482 : ca [ 2] dex
0483 : ca [ 2] dex
0484 : ca [ 2] dex
0485 : ca [ 2] dex
0486 : ca [ 2] dex
0487 : ca [ 2] dex
0488 : ca [ 2] dex
0489 : ca [ 2] dex
048a : ca [ 2] dex
048b : ca [ 2] dex ;-50
048c : ca [ 2] dex
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 45
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
048d : ca [ 2] dex
048e : ca [ 2] dex
048f : ca [ 2] dex
0490 : ca [ 2] dex
0491 : ca [ 2] dex
0492 : ca [ 2] dex
0493 : ca [ 2] dex
0494 : ca [ 2] dex
0495 : ca [ 2] dex ;-40
0496 : ca [ 2] dex
0497 : ca [ 2] dex
0498 : ca [ 2] dex
0499 : ca [ 2] dex
049a : ca [ 2] dex
049b : ca [ 2] dex
049c : ca [ 2] dex
049d : ca [ 2] dex
049e : ca [ 2] dex
049f : ca [ 2] dex ;-30
04a0 : ca [ 2] dex
04a1 : ca [ 2] dex
04a2 : ca [ 2] dex
04a3 : ca [ 2] dex
04a4 : ca [ 2] dex
04a5 : ca [ 2] dex
04a6 : ca [ 2] dex
04a7 : ca [ 2] dex
04a8 : ca [ 2] dex
04a9 : ca [ 2] dex ;-20
04aa : ca [ 2] dex
04ab : ca [ 2] dex
04ac : ca [ 2] dex
04ad : ca [ 2] dex
04ae : ca [ 2] dex
04af : ca [ 2] dex
04b0 : ca [ 2] dex
04b1 : ca [ 2] dex
04b2 : ca [ 2] dex
04b3 : ca [ 2] dex ;-10
04b4 : ca [ 2] dex
04b5 : ca [ 2] dex
04b6 : ca [ 2] dex
04b7 : ca [ 2] dex
04b8 : ca [ 2] dex
04b9 : ca [ 2] dex
04ba : ca [ 2] dex ;-3
04bb : range_op ;test target with zero flag=0, z=1 if previous dex
04bc = range_adr = *+1 ;modifiable relative address
04bb : f03e [ 3] beq *+64 ;if called without modification
04bd : ca [ 2] dex ;+0
04be : ca [ 2] dex
04bf : ca [ 2] dex
04c0 : ca [ 2] dex
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 46
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
04c1 : ca [ 2] dex
04c2 : ca [ 2] dex
04c3 : ca [ 2] dex
04c4 : ca [ 2] dex
04c5 : ca [ 2] dex
04c6 : ca [ 2] dex
04c7 : ca [ 2] dex ;+10
04c8 : ca [ 2] dex
04c9 : ca [ 2] dex
04ca : ca [ 2] dex
04cb : ca [ 2] dex
04cc : ca [ 2] dex
04cd : ca [ 2] dex
04ce : ca [ 2] dex
04cf : ca [ 2] dex
04d0 : ca [ 2] dex
04d1 : ca [ 2] dex ;+20
04d2 : ca [ 2] dex
04d3 : ca [ 2] dex
04d4 : ca [ 2] dex
04d5 : ca [ 2] dex
04d6 : ca [ 2] dex
04d7 : ca [ 2] dex
04d8 : ca [ 2] dex
04d9 : ca [ 2] dex
04da : ca [ 2] dex
04db : ca [ 2] dex ;+30
04dc : ca [ 2] dex
04dd : ca [ 2] dex
04de : ca [ 2] dex
04df : ca [ 2] dex
04e0 : ca [ 2] dex
04e1 : ca [ 2] dex
04e2 : ca [ 2] dex
04e3 : ca [ 2] dex
04e4 : ca [ 2] dex
04e5 : ca [ 2] dex ;+40
04e6 : ca [ 2] dex
04e7 : ca [ 2] dex
04e8 : ca [ 2] dex
04e9 : ca [ 2] dex
04ea : ca [ 2] dex
04eb : ca [ 2] dex
04ec : ca [ 2] dex
04ed : ca [ 2] dex
04ee : ca [ 2] dex
04ef : ca [ 2] dex ;+50
04f0 : ca [ 2] dex
04f1 : ca [ 2] dex
04f2 : ca [ 2] dex
04f3 : ca [ 2] dex
04f4 : ca [ 2] dex
04f5 : ca [ 2] dex
04f6 : ca [ 2] dex
04f7 : ca [ 2] dex
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 47
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
04f8 : ca [ 2] dex
04f9 : ca [ 2] dex ;+60
04fa : ca [ 2] dex
04fb : ca [ 2] dex
04fc : ca [ 2] dex
04fd : ca [ 2] dex
04fe : ca [ 2] dex
04ff : ca [ 2] dex
0500 : ca [ 2] dex
0501 : ca [ 2] dex
0502 : ca [ 2] dex
0503 : ca [ 2] dex ;+70
0504 : ca [ 2] dex
0505 : ca [ 2] dex
0506 : ca [ 2] dex
0507 : ca [ 2] dex
0508 : ca [ 2] dex
0509 : ca [ 2] dex
050a : ca [ 2] dex
050b : ca [ 2] dex
050c : ca [ 2] dex
050d : ca [ 2] dex ;+80
050e : ca [ 2] dex
050f : ca [ 2] dex
0510 : ca [ 2] dex
0511 : ca [ 2] dex
0512 : ca [ 2] dex
0513 : ca [ 2] dex
0514 : ca [ 2] dex
0515 : ca [ 2] dex
0516 : ca [ 2] dex
0517 : ca [ 2] dex ;+90
0518 : ca [ 2] dex
0519 : ca [ 2] dex
051a : ca [ 2] dex
051b : ca [ 2] dex
051c : ca [ 2] dex
051d : ca [ 2] dex
051e : ca [ 2] dex
051f : ca [ 2] dex
0520 : ca [ 2] dex
0521 : ca [ 2] dex ;+100
0522 : ca [ 2] dex
0523 : ca [ 2] dex
0524 : ca [ 2] dex
0525 : ca [ 2] dex
0526 : ca [ 2] dex
0527 : ca [ 2] dex
0528 : ca [ 2] dex
0529 : ca [ 2] dex
052a : ca [ 2] dex
052b : ca [ 2] dex ;+110
052c : ca [ 2] dex
052d : ca [ 2] dex
052e : ca [ 2] dex
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 48
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
052f : ca [ 2] dex
0530 : ca [ 2] dex
0531 : ca [ 2] dex
0532 : ca [ 2] dex
0533 : ca [ 2] dex
0534 : ca [ 2] dex
0535 : ca [ 2] dex ;+120
0536 : ca [ 2] dex
0537 : ca [ 2] dex
0538 : ca [ 2] dex
0539 : ca [ 2] dex
053a : ca [ 2] dex
053b : ca [ 2] dex
053c : f002 [ 3] beq range_ok ;+127 - max forward
trap ; bad range
>; db $db ; M65C02/M65C02A SToP instruction
053e : 00 [ 7]> brk ; Use BRK to return to the monitor
053f : 01 > db test_num
0540 : range_ok
0540 : c000 [ 2] cpy #0
0542 : f003 [ 3] beq range_end
0544 : 4c2b04 [ 3] jmp range_loop
0547 : range_end ;range test successful
next_test
0547 : ad0002 [ 4]> lda test_case ;previous test
054a : c901 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
054c : f002 [ 3]> beq skip0006
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
054e : 00 [ 7]> brk ; Use BRK to return to the monitor
054f : 01 > db test_num
>
0550 : >skip0006
>
0002 = >test_num = test_num + 1
0550 : a902 [ 2]> lda #test_num ;*** this tests' number
0552 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
;partial test BNE & CMP, CPX, CPY immediate
0555 : c001 [ 2] cpy #1 ;testing BNE true
0557 : d002 [ 3] bne test_bne
trap
>; db $db ; M65C02/M65C02A SToP instruction
0559 : 00 [ 7]> brk ; Use BRK to return to the monitor
055a : 02 > db test_num
055b : test_bne
055b : a900 [ 2] lda #0
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 49
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
055d : c900 [ 2] cmp #0 ;test compare immediate
trap_ne
055f : f002 [ 3]> beq skip0009
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0561 : 00 [ 7]> brk ; Use BRK to return to the monitor
0562 : 02 > db test_num
>
0563 : >skip0009
trap_cc
0563 : b002 [ 3]> bcs skip0011
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0565 : 00 [ 7]> brk ; Use BRK to return to the monitor
0566 : 02 > db test_num
>
0567 : >skip0011
trap_mi
0567 : 1002 [ 3]> bpl skip0013
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0569 : 00 [ 7]> brk ; Use BRK to return to the monitor
056a : 02 > db test_num
>
056b : >skip0013
056b : c901 [ 2] cmp #1
trap_eq
056d : d002 [ 3]> bne skip0015
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
056f : 00 [ 7]> brk ; Use BRK to return to the monitor
0570 : 02 > db test_num
>
0571 : >skip0015
trap_cs
0571 : 9002 [ 3]> bcc skip0017
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0573 : 00 [ 7]> brk ; Use BRK to return to the monitor
0574 : 02 > db test_num
>
0575 : >skip0017
trap_pl
0575 : 3002 [ 3]> bmi skip0019
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0577 : 00 [ 7]> brk ; Use BRK to return to the monitor
0578 : 02 > db test_num
>
0579 : >skip0019
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 50
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0579 : aa [ 2] tax
057a : e000 [ 2] cpx #0 ;test compare x immediate
trap_ne
057c : f002 [ 3]> beq skip0021
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
057e : 00 [ 7]> brk ; Use BRK to return to the monitor
057f : 02 > db test_num
>
0580 : >skip0021
trap_cc
0580 : b002 [ 3]> bcs skip0023
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0582 : 00 [ 7]> brk ; Use BRK to return to the monitor
0583 : 02 > db test_num
>
0584 : >skip0023
trap_mi
0584 : 1002 [ 3]> bpl skip0025
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0586 : 00 [ 7]> brk ; Use BRK to return to the monitor
0587 : 02 > db test_num
>
0588 : >skip0025
0588 : e001 [ 2] cpx #1
trap_eq
058a : d002 [ 3]> bne skip0027
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
058c : 00 [ 7]> brk ; Use BRK to return to the monitor
058d : 02 > db test_num
>
058e : >skip0027
trap_cs
058e : 9002 [ 3]> bcc skip0029
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0590 : 00 [ 7]> brk ; Use BRK to return to the monitor
0591 : 02 > db test_num
>
0592 : >skip0029
trap_pl
0592 : 3002 [ 3]> bmi skip0031
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0594 : 00 [ 7]> brk ; Use BRK to return to the monitor
0595 : 02 > db test_num
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 51
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
0596 : >skip0031
0596 : a8 [ 2] tay
0597 : c000 [ 2] cpy #0 ;test compare y immediate
trap_ne
0599 : f002 [ 3]> beq skip0033
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
059b : 00 [ 7]> brk ; Use BRK to return to the monitor
059c : 02 > db test_num
>
059d : >skip0033
trap_cc
059d : b002 [ 3]> bcs skip0035
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
059f : 00 [ 7]> brk ; Use BRK to return to the monitor
05a0 : 02 > db test_num
>
05a1 : >skip0035
trap_mi
05a1 : 1002 [ 3]> bpl skip0037
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
05a3 : 00 [ 7]> brk ; Use BRK to return to the monitor
05a4 : 02 > db test_num
>
05a5 : >skip0037
05a5 : c001 [ 2] cpy #1
trap_eq
05a7 : d002 [ 3]> bne skip0039
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
05a9 : 00 [ 7]> brk ; Use BRK to return to the monitor
05aa : 02 > db test_num
>
05ab : >skip0039
trap_cs
05ab : 9002 [ 3]> bcc skip0041
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
05ad : 00 [ 7]> brk ; Use BRK to return to the monitor
05ae : 02 > db test_num
>
05af : >skip0041
trap_pl
05af : 3002 [ 3]> bmi skip0043
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 52
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
05b1 : 00 [ 7]> brk ; Use BRK to return to the monitor
05b2 : 02 > db test_num
>
05b3 : >skip0043
next_test
05b3 : ad0002 [ 4]> lda test_case ;previous test
05b6 : c902 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
05b8 : f002 [ 3]> beq skip0046
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
05ba : 00 [ 7]> brk ; Use BRK to return to the monitor
05bb : 02 > db test_num
>
05bc : >skip0046
>
0003 = >test_num = test_num + 1
05bc : a903 [ 2]> lda #test_num ;*** this tests' number
05be : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
;testing stack operations PHA PHP PLA PLP
05c1 : a2ff [ 2] ldx #$ff ;initialize stack
05c3 : 9a [ 2] txs
05c4 : a955 [ 2] lda #$55
05c6 : 48 [ 3] pha
05c7 : a9aa [ 2] lda #$aa
05c9 : 48 [ 3] pha
05ca : cdfe01 [ 4] cmp $1fe ;on stack ?
trap_ne
05cd : f002 [ 3]> beq skip0048
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
05cf : 00 [ 7]> brk ; Use BRK to return to the monitor
05d0 : 03 > db test_num
>
05d1 : >skip0048
05d1 : ba [ 2] tsx
05d2 : 8a [ 2] txa ;overwrite accu
05d3 : c9fd [ 2] cmp #$fd ;sp decremented?
trap_ne
05d5 : f002 [ 3]> beq skip0050
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
05d7 : 00 [ 7]> brk ; Use BRK to return to the monitor
05d8 : 03 > db test_num
>
05d9 : >skip0050
05d9 : 68 [ 4] pla
05da : c9aa [ 2] cmp #$aa ;successful retreived from stack?
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 53
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
trap_ne
05dc : f002 [ 3]> beq skip0052
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
05de : 00 [ 7]> brk ; Use BRK to return to the monitor
05df : 03 > db test_num
>
05e0 : >skip0052
05e0 : 68 [ 4] pla
05e1 : c955 [ 2] cmp #$55
trap_ne
05e3 : f002 [ 3]> beq skip0054
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
05e5 : 00 [ 7]> brk ; Use BRK to return to the monitor
05e6 : 03 > db test_num
>
05e7 : >skip0054
05e7 : cdff01 [ 4] cmp $1ff ;remains on stack?
trap_ne
05ea : f002 [ 3]> beq skip0056
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
05ec : 00 [ 7]> brk ; Use BRK to return to the monitor
05ed : 03 > db test_num
>
05ee : >skip0056
05ee : ba [ 2] tsx
05ef : e0ff [ 2] cpx #$ff ;sp incremented?
trap_ne
05f1 : f002 [ 3]> beq skip0058
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
05f3 : 00 [ 7]> brk ; Use BRK to return to the monitor
05f4 : 03 > db test_num
>
05f5 : >skip0058
next_test
05f5 : ad0002 [ 4]> lda test_case ;previous test
05f8 : c903 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
05fa : f002 [ 3]> beq skip0061
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
05fc : 00 [ 7]> brk ; Use BRK to return to the monitor
05fd : 03 > db test_num
>
05fe : >skip0061
>
0004 = >test_num = test_num + 1
05fe : a904 [ 2]> lda #test_num ;*** this tests' number
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 54
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0600 : 8d0002 [ 4]> 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
0603 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
0605 : 48 [ 3]> pha ;use stack to load status
0606 : 28 [ 4]> plp
0607 : 1016 [ 3] bpl nbr1 ;branches should not be taken
0609 : 5016 [ 3] bvc nbr2
060b : 9016 [ 3] bcc nbr3
060d : d016 [ 3] bne nbr4
060f : 3002 [ 3] bmi br1 ;branches should be taken
trap
>; db $db ; M65C02/M65C02A SToP instruction
0611 : 00 [ 7]> brk ; Use BRK to return to the monitor
0612 : 04 > db test_num
0613 : 7002 [ 3] br1 bvs br2
trap
>; db $db ; M65C02/M65C02A SToP instruction
0615 : 00 [ 7]> brk ; Use BRK to return to the monitor
0616 : 04 > db test_num
0617 : b002 [ 3] br2 bcs br3
trap
>; db $db ; M65C02/M65C02A SToP instruction
0619 : 00 [ 7]> brk ; Use BRK to return to the monitor
061a : 04 > db test_num
061b : f00a [ 3] br3 beq br4
trap
>; db $db ; M65C02/M65C02A SToP instruction
061d : 00 [ 7]> brk ; Use BRK to return to the monitor
061e : 04 > db test_num
061f : nbr1
trap ;previous bpl taken
>; db $db ; M65C02/M65C02A SToP instruction
061f : 00 [ 7]> brk ; Use BRK to return to the monitor
0620 : 04 > db test_num
0621 : nbr2
trap ;previous bvc taken
>; db $db ; M65C02/M65C02A SToP instruction
0621 : 00 [ 7]> brk ; Use BRK to return to the monitor
0622 : 04 > db test_num
0623 : nbr3
trap ;previous bcc taken
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 55
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>; db $db ; M65C02/M65C02A SToP instruction
0623 : 00 [ 7]> brk ; Use BRK to return to the monitor
0624 : 04 > db test_num
0625 : nbr4
trap ;previous bne taken
>; db $db ; M65C02/M65C02A SToP instruction
0625 : 00 [ 7]> brk ; Use BRK to return to the monitor
0626 : 04 > db test_num
0627 : 08 [ 3] br4 php
0628 : ba [ 2] tsx
0629 : e0fe [ 2] cpx #$fe ;sp after php?
trap_ne
062b : f002 [ 3]> beq skip0073
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
062d : 00 [ 7]> brk ; Use BRK to return to the monitor
062e : 04 > db test_num
>
062f : >skip0073
062f : 68 [ 4] pla
cmp_flag $ff ;returned all flags on?
0630 : c9ff [ 2]> cmp #($ff |fao)&m8 ;expected flags + always on bits
trap_ne
0632 : f002 [ 3]> beq skip0076
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0634 : 00 [ 7]> brk ; Use BRK to return to the monitor
0635 : 04 > db test_num
>
0636 : >skip0076
0636 : ba [ 2] tsx
0637 : e0ff [ 2] cpx #$ff ;sp after php?
trap_ne
0639 : f002 [ 3]> beq skip0078
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
063b : 00 [ 7]> brk ; Use BRK to return to the monitor
063c : 04 > db test_num
>
063d : >skip0078
set_stat 0 ;all off
> load_flag 0
063d : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
063f : 48 [ 3]> pha ;use stack to load status
0640 : 28 [ 4]> plp
0641 : 3026 [ 3] bmi nbr11 ;branches should not be taken
0643 : 7026 [ 3] bvs nbr12
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 56
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0645 : b026 [ 3] bcs nbr13
0647 : f026 [ 3] beq nbr14
trap_mi
0649 : 1002 [ 3]> bpl skip0082
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
064b : 00 [ 7]> brk ; Use BRK to return to the monitor
064c : 04 > db test_num
>
064d : >skip0082
trap_vs
064d : 5002 [ 3]> bvc skip0084
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
064f : 00 [ 7]> brk ; Use BRK to return to the monitor
0650 : 04 > db test_num
>
0651 : >skip0084
trap_cs
0651 : 9002 [ 3]> bcc skip0086
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0653 : 00 [ 7]> brk ; Use BRK to return to the monitor
0654 : 04 > db test_num
>
0655 : >skip0086
trap_eq
0655 : d002 [ 3]> bne skip0088
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0657 : 00 [ 7]> brk ; Use BRK to return to the monitor
0658 : 04 > db test_num
>
0659 : >skip0088
0659 : 1002 [ 3] bpl br11 ;branches should be taken
trap
>; db $db ; M65C02/M65C02A SToP instruction
065b : 00 [ 7]> brk ; Use BRK to return to the monitor
065c : 04 > db test_num
065d : 5002 [ 3] br11 bvc br12
trap
>; db $db ; M65C02/M65C02A SToP instruction
065f : 00 [ 7]> brk ; Use BRK to return to the monitor
0660 : 04 > db test_num
0661 : 9002 [ 3] br12 bcc br13
trap
>; db $db ; M65C02/M65C02A SToP instruction
0663 : 00 [ 7]> brk ; Use BRK to return to the monitor
0664 : 04 > db test_num
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 57
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0665 : d00a [ 3] br13 bne br14
trap
>; db $db ; M65C02/M65C02A SToP instruction
0667 : 00 [ 7]> brk ; Use BRK to return to the monitor
0668 : 04 > db test_num
0669 : nbr11
trap ;previous bmi taken
>; db $db ; M65C02/M65C02A SToP instruction
0669 : 00 [ 7]> brk ; Use BRK to return to the monitor
066a : 04 > db test_num
066b : nbr12
trap ;previous bvs taken
>; db $db ; M65C02/M65C02A SToP instruction
066b : 00 [ 7]> brk ; Use BRK to return to the monitor
066c : 04 > db test_num
066d : nbr13
trap ;previous bcs taken
>; db $db ; M65C02/M65C02A SToP instruction
066d : 00 [ 7]> brk ; Use BRK to return to the monitor
066e : 04 > db test_num
066f : nbr14
trap ;previous beq taken
>; db $db ; M65C02/M65C02A SToP instruction
066f : 00 [ 7]> brk ; Use BRK to return to the monitor
0670 : 04 > db test_num
0671 : 08 [ 3] br14 php
0672 : 68 [ 4] pla
cmp_flag 0 ;flags off except break (pushed by sw) + reserved?
0673 : c930 [ 2]> cmp #(0 |fao)&m8 ;expected flags + always on bits
trap_ne
0675 : f002 [ 3]> beq skip0099
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0677 : 00 [ 7]> brk ; Use BRK to return to the monitor
0678 : 04 > db test_num
>
0679 : >skip0099
;crosscheck flags
set_stat carry
> load_flag carry
0679 : a901 [ 2]> lda #carry ;allow test to change I-flag (no mask)
>
067b : 48 [ 3]> pha ;use stack to load status
067c : 28 [ 4]> plp
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 58
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
trap_cc
067d : b002 [ 3]> bcs skip0103
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
067f : 00 [ 7]> brk ; Use BRK to return to the monitor
0680 : 04 > db test_num
>
0681 : >skip0103
set_stat zero
> load_flag zero
0681 : a902 [ 2]> lda #zero ;allow test to change I-flag (no mask)
>
0683 : 48 [ 3]> pha ;use stack to load status
0684 : 28 [ 4]> plp
trap_ne
0685 : f002 [ 3]> beq skip0107
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0687 : 00 [ 7]> brk ; Use BRK to return to the monitor
0688 : 04 > db test_num
>
0689 : >skip0107
set_stat overfl
> load_flag overfl
0689 : a940 [ 2]> lda #overfl ;allow test to change I-flag (no mask)
>
068b : 48 [ 3]> pha ;use stack to load status
068c : 28 [ 4]> plp
trap_vc
068d : 7002 [ 3]> bvs skip0111
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
068f : 00 [ 7]> brk ; Use BRK to return to the monitor
0690 : 04 > db test_num
>
0691 : >skip0111
set_stat minus
> load_flag minus
0691 : a980 [ 2]> lda #minus ;allow test to change I-flag (no mask)
>
0693 : 48 [ 3]> pha ;use stack to load status
0694 : 28 [ 4]> plp
trap_pl
0695 : 3002 [ 3]> bmi skip0115
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0697 : 00 [ 7]> brk ; Use BRK to return to the monitor
0698 : 04 > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 59
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0699 : >skip0115
set_stat $ff-carry
> load_flag $ff-carry
0699 : a9fe [ 2]> lda #$ff-carry ;allow test to change I-flag (no mask)
>
069b : 48 [ 3]> pha ;use stack to load status
069c : 28 [ 4]> plp
trap_cs
069d : 9002 [ 3]> bcc skip0119
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
069f : 00 [ 7]> brk ; Use BRK to return to the monitor
06a0 : 04 > db test_num
>
06a1 : >skip0119
set_stat $ff-zero
> load_flag $ff-zero
06a1 : a9fd [ 2]> lda #$ff-zero ;allow test to change I-flag (no mask)
>
06a3 : 48 [ 3]> pha ;use stack to load status
06a4 : 28 [ 4]> plp
trap_eq
06a5 : d002 [ 3]> bne skip0123
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
06a7 : 00 [ 7]> brk ; Use BRK to return to the monitor
06a8 : 04 > db test_num
>
06a9 : >skip0123
set_stat $ff-overfl
> load_flag $ff-overfl
06a9 : a9bf [ 2]> lda #$ff-overfl ;allow test to change I-flag (no mask)
>
06ab : 48 [ 3]> pha ;use stack to load status
06ac : 28 [ 4]> plp
trap_vs
06ad : 5002 [ 3]> bvc skip0127
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
06af : 00 [ 7]> brk ; Use BRK to return to the monitor
06b0 : 04 > db test_num
>
06b1 : >skip0127
set_stat $ff-minus
> load_flag $ff-minus
06b1 : a97f [ 2]> lda #$ff-minus ;allow test to change I-flag (no mask)
>
06b3 : 48 [ 3]> pha ;use stack to load status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 60
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
06b4 : 28 [ 4]> plp
trap_mi
06b5 : 1002 [ 3]> bpl skip0131
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
06b7 : 00 [ 7]> brk ; Use BRK to return to the monitor
06b8 : 04 > db test_num
>
06b9 : >skip0131
next_test
06b9 : ad0002 [ 4]> lda test_case ;previous test
06bc : c904 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
06be : f002 [ 3]> beq skip0134
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
06c0 : 00 [ 7]> brk ; Use BRK to return to the monitor
06c1 : 04 > db test_num
>
06c2 : >skip0134
>
0005 = >test_num = test_num + 1
06c2 : a905 [ 2]> lda #test_num ;*** this tests' number
06c4 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; test PHA does not alter flags or accumulator but PLA does
06c7 : a255 [ 2] ldx #$55 ;x & y protected
06c9 : a0aa [ 2] ldy #$aa
set_a 1,$ff ;push
> load_flag $ff
06cb : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
06cd : 48 [ 3]> pha ;use stack to load status
06ce : a901 [ 2]> lda #1 ;precharge accu
06d0 : 28 [ 4]> plp
06d1 : 48 [ 3] pha
tst_a 1,$ff
06d2 : 08 [ 3]> php ;save flags
06d3 : 08 [ 3]> php
06d4 : c901 [ 2]> cmp #1 ;test result
> trap_ne
06d6 : f002 [ 3]> beq skip0139
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
06d8 : 00 [ 7]> brk ; Use BRK to return to the monitor
06d9 : 05 > db test_num
>
06da : >skip0139
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 61
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
06da : 68 [ 4]> pla ;load status
> cmp_flag $ff
06db : c9ff [ 2]> cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
06dd : f002 [ 3]> beq skip0142
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
06df : 00 [ 7]> brk ; Use BRK to return to the monitor
06e0 : 05 > db test_num
>
06e1 : >skip0142
>
06e1 : 28 [ 4]> plp ;restore status
set_a 0,0
> load_flag 0
06e2 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
06e4 : 48 [ 3]> pha ;use stack to load status
06e5 : a900 [ 2]> lda #0 ;precharge accu
06e7 : 28 [ 4]> plp
06e8 : 48 [ 3] pha
tst_a 0,0
06e9 : 08 [ 3]> php ;save flags
06ea : 08 [ 3]> php
06eb : c900 [ 2]> cmp #0 ;test result
> trap_ne
06ed : f002 [ 3]> beq skip0147
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
06ef : 00 [ 7]> brk ; Use BRK to return to the monitor
06f0 : 05 > db test_num
>
06f1 : >skip0147
>
06f1 : 68 [ 4]> pla ;load status
> cmp_flag 0
06f2 : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
06f4 : f002 [ 3]> beq skip0150
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
06f6 : 00 [ 7]> brk ; Use BRK to return to the monitor
06f7 : 05 > db test_num
>
06f8 : >skip0150
>
06f8 : 28 [ 4]> plp ;restore status
set_a $ff,$ff
> load_flag $ff
06f9 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 62
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
06fb : 48 [ 3]> pha ;use stack to load status
06fc : a9ff [ 2]> lda #$ff ;precharge accu
06fe : 28 [ 4]> plp
06ff : 48 [ 3] pha
tst_a $ff,$ff
0700 : 08 [ 3]> php ;save flags
0701 : 08 [ 3]> php
0702 : c9ff [ 2]> cmp #$ff ;test result
> trap_ne
0704 : f002 [ 3]> beq skip0155
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0706 : 00 [ 7]> brk ; Use BRK to return to the monitor
0707 : 05 > db test_num
>
0708 : >skip0155
>
0708 : 68 [ 4]> pla ;load status
> cmp_flag $ff
0709 : c9ff [ 2]> cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
070b : f002 [ 3]> beq skip0158
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
070d : 00 [ 7]> brk ; Use BRK to return to the monitor
070e : 05 > db test_num
>
070f : >skip0158
>
070f : 28 [ 4]> plp ;restore status
set_a 1,0
> load_flag 0
0710 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
0712 : 48 [ 3]> pha ;use stack to load status
0713 : a901 [ 2]> lda #1 ;precharge accu
0715 : 28 [ 4]> plp
0716 : 48 [ 3] pha
tst_a 1,0
0717 : 08 [ 3]> php ;save flags
0718 : 08 [ 3]> php
0719 : c901 [ 2]> cmp #1 ;test result
> trap_ne
071b : f002 [ 3]> beq skip0163
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
071d : 00 [ 7]> brk ; Use BRK to return to the monitor
071e : 05 > db test_num
>
071f : >skip0163
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 63
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
071f : 68 [ 4]> pla ;load status
> cmp_flag 0
0720 : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0722 : f002 [ 3]> beq skip0166
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0724 : 00 [ 7]> brk ; Use BRK to return to the monitor
0725 : 05 > db test_num
>
0726 : >skip0166
>
0726 : 28 [ 4]> plp ;restore status
set_a 0,$ff
> load_flag $ff
0727 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
0729 : 48 [ 3]> pha ;use stack to load status
072a : a900 [ 2]> lda #0 ;precharge accu
072c : 28 [ 4]> plp
072d : 48 [ 3] pha
tst_a 0,$ff
072e : 08 [ 3]> php ;save flags
072f : 08 [ 3]> php
0730 : c900 [ 2]> cmp #0 ;test result
> trap_ne
0732 : f002 [ 3]> beq skip0171
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0734 : 00 [ 7]> brk ; Use BRK to return to the monitor
0735 : 05 > db test_num
>
0736 : >skip0171
>
0736 : 68 [ 4]> pla ;load status
> cmp_flag $ff
0737 : c9ff [ 2]> cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0739 : f002 [ 3]> beq skip0174
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
073b : 00 [ 7]> brk ; Use BRK to return to the monitor
073c : 05 > db test_num
>
073d : >skip0174
>
073d : 28 [ 4]> plp ;restore status
set_a $ff,0
> load_flag 0
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 64
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
073e : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
0740 : 48 [ 3]> pha ;use stack to load status
0741 : a9ff [ 2]> lda #$ff ;precharge accu
0743 : 28 [ 4]> plp
0744 : 48 [ 3] pha
tst_a $ff,0
0745 : 08 [ 3]> php ;save flags
0746 : 08 [ 3]> php
0747 : c9ff [ 2]> cmp #$ff ;test result
> trap_ne
0749 : f002 [ 3]> beq skip0179
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
074b : 00 [ 7]> brk ; Use BRK to return to the monitor
074c : 05 > db test_num
>
074d : >skip0179
>
074d : 68 [ 4]> pla ;load status
> cmp_flag 0
074e : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0750 : f002 [ 3]> beq skip0182
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0752 : 00 [ 7]> brk ; Use BRK to return to the monitor
0753 : 05 > db test_num
>
0754 : >skip0182
>
0754 : 28 [ 4]> plp ;restore status
set_a 0,$ff ;pull
> load_flag $ff
0755 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
0757 : 48 [ 3]> pha ;use stack to load status
0758 : a900 [ 2]> lda #0 ;precharge accu
075a : 28 [ 4]> plp
075b : 68 [ 4] pla
tst_a $ff,$ff-zero
075c : 08 [ 3]> php ;save flags
075d : 08 [ 3]> php
075e : c9ff [ 2]> cmp #$ff ;test result
> trap_ne
0760 : f002 [ 3]> beq skip0187
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0762 : 00 [ 7]> brk ; Use BRK to return to the monitor
0763 : 05 > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 65
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0764 : >skip0187
>
0764 : 68 [ 4]> pla ;load status
> cmp_flag $ff-zero
0765 : c9fd [ 2]> cmp #($ff-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0767 : f002 [ 3]> beq skip0190
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0769 : 00 [ 7]> brk ; Use BRK to return to the monitor
076a : 05 > db test_num
>
076b : >skip0190
>
076b : 28 [ 4]> plp ;restore status
set_a $ff,0
> load_flag 0
076c : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
076e : 48 [ 3]> pha ;use stack to load status
076f : a9ff [ 2]> lda #$ff ;precharge accu
0771 : 28 [ 4]> plp
0772 : 68 [ 4] pla
tst_a 0,zero
0773 : 08 [ 3]> php ;save flags
0774 : 08 [ 3]> php
0775 : c900 [ 2]> cmp #0 ;test result
> trap_ne
0777 : f002 [ 3]> beq skip0195
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0779 : 00 [ 7]> brk ; Use BRK to return to the monitor
077a : 05 > db test_num
>
077b : >skip0195
>
077b : 68 [ 4]> pla ;load status
> cmp_flag zero
077c : c932 [ 2]> cmp #(zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
077e : f002 [ 3]> beq skip0198
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0780 : 00 [ 7]> brk ; Use BRK to return to the monitor
0781 : 05 > db test_num
>
0782 : >skip0198
>
0782 : 28 [ 4]> plp ;restore status
set_a $fe,$ff
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 66
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> load_flag $ff
0783 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
0785 : 48 [ 3]> pha ;use stack to load status
0786 : a9fe [ 2]> lda #$fe ;precharge accu
0788 : 28 [ 4]> plp
0789 : 68 [ 4] pla
tst_a 1,$ff-zero-minus
078a : 08 [ 3]> php ;save flags
078b : 08 [ 3]> php
078c : c901 [ 2]> cmp #1 ;test result
> trap_ne
078e : f002 [ 3]> beq skip0203
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0790 : 00 [ 7]> brk ; Use BRK to return to the monitor
0791 : 05 > db test_num
>
0792 : >skip0203
>
0792 : 68 [ 4]> pla ;load status
> cmp_flag $ff-zero-minus
0793 : c97d [ 2]> cmp #($ff-zero-minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0795 : f002 [ 3]> beq skip0206
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0797 : 00 [ 7]> brk ; Use BRK to return to the monitor
0798 : 05 > db test_num
>
0799 : >skip0206
>
0799 : 28 [ 4]> plp ;restore status
set_a 0,0
> load_flag 0
079a : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
079c : 48 [ 3]> pha ;use stack to load status
079d : a900 [ 2]> lda #0 ;precharge accu
079f : 28 [ 4]> plp
07a0 : 68 [ 4] pla
tst_a $ff,minus
07a1 : 08 [ 3]> php ;save flags
07a2 : 08 [ 3]> php
07a3 : c9ff [ 2]> cmp #$ff ;test result
> trap_ne
07a5 : f002 [ 3]> beq skip0211
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
07a7 : 00 [ 7]> brk ; Use BRK to return to the monitor
07a8 : 05 > db test_num
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 67
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
07a9 : >skip0211
>
07a9 : 68 [ 4]> pla ;load status
> cmp_flag minus
07aa : c9b0 [ 2]> cmp #(minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
07ac : f002 [ 3]> beq skip0214
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
07ae : 00 [ 7]> brk ; Use BRK to return to the monitor
07af : 05 > db test_num
>
07b0 : >skip0214
>
07b0 : 28 [ 4]> plp ;restore status
set_a $ff,$ff
> load_flag $ff
07b1 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
07b3 : 48 [ 3]> pha ;use stack to load status
07b4 : a9ff [ 2]> lda #$ff ;precharge accu
07b6 : 28 [ 4]> plp
07b7 : 68 [ 4] pla
tst_a 0,$ff-minus
07b8 : 08 [ 3]> php ;save flags
07b9 : 08 [ 3]> php
07ba : c900 [ 2]> cmp #0 ;test result
> trap_ne
07bc : f002 [ 3]> beq skip0219
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
07be : 00 [ 7]> brk ; Use BRK to return to the monitor
07bf : 05 > db test_num
>
07c0 : >skip0219
>
07c0 : 68 [ 4]> pla ;load status
> cmp_flag $ff-minus
07c1 : c97f [ 2]> cmp #($ff-minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
07c3 : f002 [ 3]> beq skip0222
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
07c5 : 00 [ 7]> brk ; Use BRK to return to the monitor
07c6 : 05 > db test_num
>
07c7 : >skip0222
>
07c7 : 28 [ 4]> plp ;restore status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 68
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
set_a $fe,0
> load_flag 0
07c8 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
07ca : 48 [ 3]> pha ;use stack to load status
07cb : a9fe [ 2]> lda #$fe ;precharge accu
07cd : 28 [ 4]> plp
07ce : 68 [ 4] pla
tst_a 1,0
07cf : 08 [ 3]> php ;save flags
07d0 : 08 [ 3]> php
07d1 : c901 [ 2]> cmp #1 ;test result
> trap_ne
07d3 : f002 [ 3]> beq skip0227
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
07d5 : 00 [ 7]> brk ; Use BRK to return to the monitor
07d6 : 05 > db test_num
>
07d7 : >skip0227
>
07d7 : 68 [ 4]> pla ;load status
> cmp_flag 0
07d8 : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
07da : f002 [ 3]> beq skip0230
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
07dc : 00 [ 7]> brk ; Use BRK to return to the monitor
07dd : 05 > db test_num
>
07de : >skip0230
>
07de : 28 [ 4]> plp ;restore status
07df : e055 [ 2] cpx #$55 ;x & y unchanged?
trap_ne
07e1 : f002 [ 3]> beq skip0232
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
07e3 : 00 [ 7]> brk ; Use BRK to return to the monitor
07e4 : 05 > db test_num
>
07e5 : >skip0232
07e5 : c0aa [ 2] cpy #$aa
trap_ne
07e7 : f002 [ 3]> beq skip0234
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
07e9 : 00 [ 7]> brk ; Use BRK to return to the monitor
07ea : 05 > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 69
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
07eb : >skip0234
next_test
07eb : ad0002 [ 4]> lda test_case ;previous test
07ee : c905 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
07f0 : f002 [ 3]> beq skip0237
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
07f2 : 00 [ 7]> brk ; Use BRK to return to the monitor
07f3 : 05 > db test_num
>
07f4 : >skip0237
>
0006 = >test_num = test_num + 1
07f4 : a906 [ 2]> lda #test_num ;*** this tests' number
07f6 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; partial pretest EOR #
set_a $3c,0
> load_flag 0
07f9 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
07fb : 48 [ 3]> pha ;use stack to load status
07fc : a93c [ 2]> lda #$3c ;precharge accu
07fe : 28 [ 4]> plp
07ff : 49c3 [ 2] eor #$c3
tst_a $ff,fn
0801 : 08 [ 3]> php ;save flags
0802 : 08 [ 3]> php
0803 : c9ff [ 2]> cmp #$ff ;test result
> trap_ne
0805 : f002 [ 3]> beq skip0242
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0807 : 00 [ 7]> brk ; Use BRK to return to the monitor
0808 : 06 > db test_num
>
0809 : >skip0242
>
0809 : 68 [ 4]> pla ;load status
> cmp_flag fn
080a : c9b0 [ 2]> cmp #(fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
080c : f002 [ 3]> beq skip0245
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
080e : 00 [ 7]> brk ; Use BRK to return to the monitor
080f : 06 > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 70
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0810 : >skip0245
>
0810 : 28 [ 4]> plp ;restore status
set_a $c3,0
> load_flag 0
0811 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
0813 : 48 [ 3]> pha ;use stack to load status
0814 : a9c3 [ 2]> lda #$c3 ;precharge accu
0816 : 28 [ 4]> plp
0817 : 49c3 [ 2] eor #$c3
tst_a 0,fz
0819 : 08 [ 3]> php ;save flags
081a : 08 [ 3]> php
081b : c900 [ 2]> cmp #0 ;test result
> trap_ne
081d : f002 [ 3]> beq skip0250
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
081f : 00 [ 7]> brk ; Use BRK to return to the monitor
0820 : 06 > db test_num
>
0821 : >skip0250
>
0821 : 68 [ 4]> pla ;load status
> cmp_flag fz
0822 : c932 [ 2]> cmp #(fz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0824 : f002 [ 3]> beq skip0253
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0826 : 00 [ 7]> brk ; Use BRK to return to the monitor
0827 : 06 > db test_num
>
0828 : >skip0253
>
0828 : 28 [ 4]> plp ;restore status
next_test
0829 : ad0002 [ 4]> lda test_case ;previous test
082c : c906 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
082e : f002 [ 3]> beq skip0256
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0830 : 00 [ 7]> brk ; Use BRK to return to the monitor
0831 : 06 > db test_num
>
0832 : >skip0256
>
0007 = >test_num = test_num + 1
0832 : a907 [ 2]> lda #test_num ;*** this tests' number
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 71
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0834 : 8d0002 [ 4]> 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
0837 : a224 [ 2] ldx #$24
0839 : a042 [ 2] ldy #$42
set_a $18,0
> load_flag 0
083b : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
083d : 48 [ 3]> pha ;use stack to load status
083e : a918 [ 2]> lda #$18 ;precharge accu
0840 : 28 [ 4]> plp
0841 : ea [ 2] nop
tst_a $18,0
0842 : 08 [ 3]> php ;save flags
0843 : 08 [ 3]> php
0844 : c918 [ 2]> cmp #$18 ;test result
> trap_ne
0846 : f002 [ 3]> beq skip0261
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0848 : 00 [ 7]> brk ; Use BRK to return to the monitor
0849 : 07 > db test_num
>
084a : >skip0261
>
084a : 68 [ 4]> pla ;load status
> cmp_flag 0
084b : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
084d : f002 [ 3]> beq skip0264
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
084f : 00 [ 7]> brk ; Use BRK to return to the monitor
0850 : 07 > db test_num
>
0851 : >skip0264
>
0851 : 28 [ 4]> plp ;restore status
0852 : e024 [ 2] cpx #$24
trap_ne
0854 : f002 [ 3]> beq skip0266
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0856 : 00 [ 7]> brk ; Use BRK to return to the monitor
0857 : 07 > db test_num
>
0858 : >skip0266
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 72
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0858 : c042 [ 2] cpy #$42
trap_ne
085a : f002 [ 3]> beq skip0268
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
085c : 00 [ 7]> brk ; Use BRK to return to the monitor
085d : 07 > db test_num
>
085e : >skip0268
085e : a2db [ 2] ldx #$db
0860 : a0bd [ 2] ldy #$bd
set_a $e7,$ff
> load_flag $ff
0862 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
0864 : 48 [ 3]> pha ;use stack to load status
0865 : a9e7 [ 2]> lda #$e7 ;precharge accu
0867 : 28 [ 4]> plp
0868 : ea [ 2] nop
tst_a $e7,$ff
0869 : 08 [ 3]> php ;save flags
086a : 08 [ 3]> php
086b : c9e7 [ 2]> cmp #$e7 ;test result
> trap_ne
086d : f002 [ 3]> beq skip0273
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
086f : 00 [ 7]> brk ; Use BRK to return to the monitor
0870 : 07 > db test_num
>
0871 : >skip0273
>
0871 : 68 [ 4]> pla ;load status
> cmp_flag $ff
0872 : c9ff [ 2]> cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0874 : f002 [ 3]> beq skip0276
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0876 : 00 [ 7]> brk ; Use BRK to return to the monitor
0877 : 07 > db test_num
>
0878 : >skip0276
>
0878 : 28 [ 4]> plp ;restore status
0879 : e0db [ 2] cpx #$db
trap_ne
087b : f002 [ 3]> beq skip0278
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 73
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
087d : 00 [ 7]> brk ; Use BRK to return to the monitor
087e : 07 > db test_num
>
087f : >skip0278
087f : c0bd [ 2] cpy #$bd
trap_ne
0881 : f002 [ 3]> beq skip0280
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0883 : 00 [ 7]> brk ; Use BRK to return to the monitor
0884 : 07 > db test_num
>
0885 : >skip0280
next_test
0885 : ad0002 [ 4]> lda test_case ;previous test
0888 : c907 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
088a : f002 [ 3]> beq skip0283
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
088c : 00 [ 7]> brk ; Use BRK to return to the monitor
088d : 07 > db test_num
>
088e : >skip0283
>
0008 = >test_num = test_num + 1
088e : a908 [ 2]> lda #test_num ;*** this tests' number
0890 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; jump absolute
set_stat $0
> load_flag $0
0893 : a900 [ 2]> lda #$0 ;allow test to change I-flag (no mask)
>
0895 : 48 [ 3]> pha ;use stack to load status
0896 : 28 [ 4]> plp
0897 : a946 [ 2] lda #'F'
0899 : a241 [ 2] ldx #'A'
089b : a052 [ 2] ldy #'R' ;N=0, V=0, Z=0, C=0
089d : 4c1b3d [ 3] jmp test_far
08a0 : ea [ 2] nop
08a1 : ea [ 2] nop
trap_ne ;runover protection
08a2 : f002 [ 3]> beq skip0287
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
08a4 : 00 [ 7]> brk ; Use BRK to return to the monitor
08a5 : 08 > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 74
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
08a6 : >skip0287
08a6 : e8 [ 2] inx
08a7 : e8 [ 2] inx
08a8 : far_ret
trap_eq ;returned flags OK?
08a8 : d002 [ 3]> bne skip0289
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
08aa : 00 [ 7]> brk ; Use BRK to return to the monitor
08ab : 08 > db test_num
>
08ac : >skip0289
trap_pl
08ac : 3002 [ 3]> bmi skip0291
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
08ae : 00 [ 7]> brk ; Use BRK to return to the monitor
08af : 08 > db test_num
>
08b0 : >skip0291
trap_cc
08b0 : b002 [ 3]> bcs skip0293
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
08b2 : 00 [ 7]> brk ; Use BRK to return to the monitor
08b3 : 08 > db test_num
>
08b4 : >skip0293
trap_vc
08b4 : 7002 [ 3]> bvs skip0295
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
08b6 : 00 [ 7]> brk ; Use BRK to return to the monitor
08b7 : 08 > db test_num
>
08b8 : >skip0295
08b8 : c9ec [ 2] cmp #('F'^$aa) ;returned registers OK?
trap_ne
08ba : f002 [ 3]> beq skip0297
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
08bc : 00 [ 7]> brk ; Use BRK to return to the monitor
08bd : 08 > db test_num
>
08be : >skip0297
08be : e042 [ 2] cpx #('A'+1)
trap_ne
08c0 : f002 [ 3]> beq skip0299
> trap ;failed equal (zero)
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 75
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>; db $db ; M65C02/M65C02A SToP instruction
08c2 : 00 [ 7]> brk ; Use BRK to return to the monitor
08c3 : 08 > db test_num
>
08c4 : >skip0299
08c4 : c04f [ 2] cpy #('R'-3)
trap_ne
08c6 : f002 [ 3]> beq skip0301
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
08c8 : 00 [ 7]> brk ; Use BRK to return to the monitor
08c9 : 08 > db test_num
>
08ca : >skip0301
08ca : ca [ 2] dex
08cb : c8 [ 2] iny
08cc : c8 [ 2] iny
08cd : c8 [ 2] iny
08ce : 49aa [ 2] eor #$aa ;N=0, V=1, Z=0, C=1
08d0 : 4cdb08 [ 3] jmp test_near
08d3 : ea [ 2] nop
08d4 : ea [ 2] nop
trap_ne ;runover protection
08d5 : f002 [ 3]> beq skip0303
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
08d7 : 00 [ 7]> brk ; Use BRK to return to the monitor
08d8 : 08 > db test_num
>
08d9 : >skip0303
08d9 : e8 [ 2] inx
08da : e8 [ 2] inx
08db : test_near
trap_eq ;passed flags OK?
08db : d002 [ 3]> bne skip0305
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
08dd : 00 [ 7]> brk ; Use BRK to return to the monitor
08de : 08 > db test_num
>
08df : >skip0305
trap_mi
08df : 1002 [ 3]> bpl skip0307
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
08e1 : 00 [ 7]> brk ; Use BRK to return to the monitor
08e2 : 08 > db test_num
>
08e3 : >skip0307
trap_cc
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 76
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
08e3 : b002 [ 3]> bcs skip0309
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
08e5 : 00 [ 7]> brk ; Use BRK to return to the monitor
08e6 : 08 > db test_num
>
08e7 : >skip0309
trap_vc
08e7 : 7002 [ 3]> bvs skip0311
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
08e9 : 00 [ 7]> brk ; Use BRK to return to the monitor
08ea : 08 > db test_num
>
08eb : >skip0311
08eb : c946 [ 2] cmp #'F' ;passed registers OK?
trap_ne
08ed : f002 [ 3]> beq skip0313
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
08ef : 00 [ 7]> brk ; Use BRK to return to the monitor
08f0 : 08 > db test_num
>
08f1 : >skip0313
08f1 : e041 [ 2] cpx #'A'
trap_ne
08f3 : f002 [ 3]> beq skip0315
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
08f5 : 00 [ 7]> brk ; Use BRK to return to the monitor
08f6 : 08 > db test_num
>
08f7 : >skip0315
08f7 : c052 [ 2] cpy #'R'
trap_ne
08f9 : f002 [ 3]> beq skip0317
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
08fb : 00 [ 7]> brk ; Use BRK to return to the monitor
08fc : 08 > db test_num
>
08fd : >skip0317
next_test
08fd : ad0002 [ 4]> lda test_case ;previous test
0900 : c908 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
0902 : f002 [ 3]> beq skip0320
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0904 : 00 [ 7]> brk ; Use BRK to return to the monitor
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 77
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0905 : 08 > db test_num
>
0906 : >skip0320
>
0009 = >test_num = test_num + 1
0906 : a909 [ 2]> lda #test_num ;*** this tests' number
0908 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; jump indirect
set_stat 0
> load_flag 0
090b : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
090d : 48 [ 3]> pha ;use stack to load status
090e : 28 [ 4]> plp
090f : a949 [ 2] lda #'I'
0911 : a24e [ 2] ldx #'N'
0913 : a044 [ 2] ldy #'D' ;N=0, V=0, Z=0, C=0
0915 : 6c5a3d [ 6] jmp (ptr_tst_ind)
0918 : ea [ 2] nop
trap_ne ;runover protection
0919 : f002 [ 3]> beq skip0324
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
091b : 00 [ 7]> brk ; Use BRK to return to the monitor
091c : 09 > db test_num
>
091d : >skip0324
091d : 88 [ 2] dey
091e : 88 [ 2] dey
091f : ind_ret
091f : 08 [ 3] php ;either SP or Y count will fail, if we do not hit
0920 : 88 [ 2] dey
0921 : 88 [ 2] dey
0922 : 88 [ 2] dey
0923 : 28 [ 4] plp
trap_eq ;returned flags OK?
0924 : d002 [ 3]> bne skip0326
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0926 : 00 [ 7]> brk ; Use BRK to return to the monitor
0927 : 09 > db test_num
>
0928 : >skip0326
trap_pl
0928 : 3002 [ 3]> bmi skip0328
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
092a : 00 [ 7]> brk ; Use BRK to return to the monitor
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 78
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
092b : 09 > db test_num
>
092c : >skip0328
trap_cc
092c : b002 [ 3]> bcs skip0330
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
092e : 00 [ 7]> brk ; Use BRK to return to the monitor
092f : 09 > db test_num
>
0930 : >skip0330
trap_vc
0930 : 7002 [ 3]> bvs skip0332
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0932 : 00 [ 7]> brk ; Use BRK to return to the monitor
0933 : 09 > db test_num
>
0934 : >skip0332
0934 : c9e3 [ 2] cmp #('I'^$aa) ;returned registers OK?
trap_ne
0936 : f002 [ 3]> beq skip0334
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0938 : 00 [ 7]> brk ; Use BRK to return to the monitor
0939 : 09 > db test_num
>
093a : >skip0334
093a : e04f [ 2] cpx #('N'+1)
trap_ne
093c : f002 [ 3]> beq skip0336
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
093e : 00 [ 7]> brk ; Use BRK to return to the monitor
093f : 09 > db test_num
>
0940 : >skip0336
0940 : c03e [ 2] cpy #('D'-6)
trap_ne
0942 : f002 [ 3]> beq skip0338
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0944 : 00 [ 7]> brk ; Use BRK to return to the monitor
0945 : 09 > db test_num
>
0946 : >skip0338
0946 : ba [ 2] tsx ;SP check
0947 : e0ff [ 2] cpx #$ff
trap_ne
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 79
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0949 : f002 [ 3]> beq skip0340
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
094b : 00 [ 7]> brk ; Use BRK to return to the monitor
094c : 09 > db test_num
>
094d : >skip0340
next_test
094d : ad0002 [ 4]> lda test_case ;previous test
0950 : c909 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
0952 : f002 [ 3]> beq skip0343
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0954 : 00 [ 7]> brk ; Use BRK to return to the monitor
0955 : 09 > db test_num
>
0956 : >skip0343
>
000a = >test_num = test_num + 1
0956 : a90a [ 2]> lda #test_num ;*** this tests' number
0958 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; jump subroutine & return from subroutine
set_stat 0
> load_flag 0
095b : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
095d : 48 [ 3]> pha ;use stack to load status
095e : 28 [ 4]> plp
095f : a94a [ 2] lda #'J'
0961 : a253 [ 2] ldx #'S'
0963 : a052 [ 2] ldy #'R' ;N=0, V=0, Z=0, C=0
0965 : 20a43d [ 6] jsr test_jsr
0967 = jsr_ret = *-1 ;last address of jsr = return address
0968 : 08 [ 3] php ;either SP or Y count will fail, if we do not hit
0969 : 88 [ 2] dey
096a : 88 [ 2] dey
096b : 88 [ 2] dey
096c : 28 [ 4] plp
trap_eq ;returned flags OK?
096d : d002 [ 3]> bne skip0347
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
096f : 00 [ 7]> brk ; Use BRK to return to the monitor
0970 : 0a > db test_num
>
0971 : >skip0347
trap_pl
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 80
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0971 : 3002 [ 3]> bmi skip0349
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0973 : 00 [ 7]> brk ; Use BRK to return to the monitor
0974 : 0a > db test_num
>
0975 : >skip0349
trap_cc
0975 : b002 [ 3]> bcs skip0351
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0977 : 00 [ 7]> brk ; Use BRK to return to the monitor
0978 : 0a > db test_num
>
0979 : >skip0351
trap_vc
0979 : 7002 [ 3]> bvs skip0353
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
097b : 00 [ 7]> brk ; Use BRK to return to the monitor
097c : 0a > db test_num
>
097d : >skip0353
097d : c9e0 [ 2] cmp #('J'^$aa) ;returned registers OK?
trap_ne
097f : f002 [ 3]> beq skip0355
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0981 : 00 [ 7]> brk ; Use BRK to return to the monitor
0982 : 0a > db test_num
>
0983 : >skip0355
0983 : e054 [ 2] cpx #('S'+1)
trap_ne
0985 : f002 [ 3]> beq skip0357
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0987 : 00 [ 7]> brk ; Use BRK to return to the monitor
0988 : 0a > db test_num
>
0989 : >skip0357
0989 : c04c [ 2] cpy #('R'-6)
trap_ne
098b : f002 [ 3]> beq skip0359
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
098d : 00 [ 7]> brk ; Use BRK to return to the monitor
098e : 0a > db test_num
>
098f : >skip0359
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 81
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
098f : ba [ 2] tsx ;sp?
0990 : e0ff [ 2] cpx #$ff
trap_ne
0992 : f002 [ 3]> beq skip0361
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0994 : 00 [ 7]> brk ; Use BRK to return to the monitor
0995 : 0a > db test_num
>
0996 : >skip0361
next_test
0996 : ad0002 [ 4]> lda test_case ;previous test
0999 : c90a [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
099b : f002 [ 3]> beq skip0364
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
099d : 00 [ 7]> brk ; Use BRK to return to the monitor
099e : 0a > db test_num
>
099f : >skip0364
>
000b = >test_num = test_num + 1
099f : a90b [ 2]> lda #test_num ;*** this tests' number
09a1 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; break & return from interrupt
if ROM_vectors = 1
set_stat 0
lda #'B'
ldx #'R'
ldy #'K' ;N=0, V=0, Z=0, C=0
brk
else
09a4 : a909 [ 2] lda #hi(brk_ret) ;emulated break
09a6 : 48 [ 3] pha
09a7 : a9ba [ 2] lda #lo(brk_ret-1) ; M65C02 pushes BRK+1 not BRK+2
09a9 : 48 [ 3] pha
09aa : a930 [ 2] lda #fao ;set break & unused on stack
09ac : 48 [ 3] pha
set_stat intdis
> load_flag intdis
09ad : a904 [ 2]> lda #intdis ;allow test to change I-flag (no mask)
>
09af : 48 [ 3]> pha ;use stack to load status
09b0 : 28 [ 4]> plp
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 82
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
09b1 : a942 [ 2] lda #'B'
09b3 : a252 [ 2] ldx #'R'
09b5 : a04b [ 2] ldy #'K' ;N=0, V=0, Z=0, C=0
09b7 : 4cfa3d [ 3] jmp irq_trap
endif
09ba : 88 [ 2] dey ;should not be executed
09bb : brk_ret ;address of break return
09bb : 08 [ 3] php ;either SP or Y count will fail, if we do not hit
09bc : 88 [ 2] dey
09bd : 88 [ 2] dey
09be : 88 [ 2] dey
09bf : c9e8 [ 2] cmp #('B'^$aa) ;returned registers OK?
trap_ne
09c1 : f002 [ 3]> beq skip0368
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
09c3 : 00 [ 7]> brk ; Use BRK to return to the monitor
09c4 : 0b > db test_num
>
09c5 : >skip0368
09c5 : e053 [ 2] cpx #('R'+1)
trap_ne
09c7 : f002 [ 3]> beq skip0370
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
09c9 : 00 [ 7]> brk ; Use BRK to return to the monitor
09ca : 0b > db test_num
>
09cb : >skip0370
09cb : c045 [ 2] cpy #('K'-6)
trap_ne
09cd : f002 [ 3]> beq skip0372
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
09cf : 00 [ 7]> brk ; Use BRK to return to the monitor
09d0 : 0b > db test_num
>
09d1 : >skip0372
09d1 : 68 [ 4] pla ;returned flags OK (unchanged)?
cmp_flag 0
09d2 : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
trap_ne
09d4 : f002 [ 3]> beq skip0375
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
09d6 : 00 [ 7]> brk ; Use BRK to return to the monitor
09d7 : 0b > db test_num
>
09d8 : >skip0375
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 83
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
09d8 : ba [ 2] tsx ;sp?
09d9 : e0ff [ 2] cpx #$ff
trap_ne
09db : f002 [ 3]> beq skip0377
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
09dd : 00 [ 7]> brk ; Use BRK to return to the monitor
09de : 0b > db test_num
>
09df : >skip0377
next_test
09df : ad0002 [ 4]> lda test_case ;previous test
09e2 : c90b [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
09e4 : f002 [ 3]> beq skip0380
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
09e6 : 00 [ 7]> brk ; Use BRK to return to the monitor
09e7 : 0b > db test_num
>
09e8 : >skip0380
>
000c = >test_num = test_num + 1
09e8 : a90c [ 2]> lda #test_num ;*** this tests' number
09ea : 8d0002 [ 4]> 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
09ed : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
09ef : 48 [ 3]> pha ;use stack to load status
09f0 : 28 [ 4]> plp
09f1 : 18 [ 2] clc
tst_stat $ff-carry
09f2 : 08 [ 3]> php ;save status
09f3 : 08 [ 3]> php ;use stack to retrieve status
09f4 : 68 [ 4]> pla
> cmp_flag $ff-carry
09f5 : c9fe [ 2]> cmp #($ff-carry|fao)&m8 ;expected flags + always on bits
>
> trap_ne
09f7 : f002 [ 3]> beq skip0386
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
09f9 : 00 [ 7]> brk ; Use BRK to return to the monitor
09fa : 0c > db test_num
>
09fb : >skip0386
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 84
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
09fb : 28 [ 4]> plp ;restore status
09fc : 38 [ 2] sec
tst_stat $ff
09fd : 08 [ 3]> php ;save status
09fe : 08 [ 3]> php ;use stack to retrieve status
09ff : 68 [ 4]> pla
> cmp_flag $ff
0a00 : c9ff [ 2]> cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a02 : f002 [ 3]> beq skip0390
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0a04 : 00 [ 7]> brk ; Use BRK to return to the monitor
0a05 : 0c > db test_num
>
0a06 : >skip0390
>
0a06 : 28 [ 4]> plp ;restore status
if I_flag = 3
0a07 : 58 [ 2] cli
tst_stat $ff-intdis
0a08 : 08 [ 3]> php ;save status
0a09 : 08 [ 3]> php ;use stack to retrieve status
0a0a : 68 [ 4]> pla
> cmp_flag $ff-intdis
0a0b : c9fb [ 2]> cmp #($ff-intdis|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a0d : f002 [ 3]> beq skip0394
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0a0f : 00 [ 7]> brk ; Use BRK to return to the monitor
0a10 : 0c > db test_num
>
0a11 : >skip0394
>
0a11 : 28 [ 4]> plp ;restore status
0a12 : 78 [ 2] sei
tst_stat $ff
0a13 : 08 [ 3]> php ;save status
0a14 : 08 [ 3]> php ;use stack to retrieve status
0a15 : 68 [ 4]> pla
> cmp_flag $ff
0a16 : c9ff [ 2]> cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a18 : f002 [ 3]> beq skip0398
> trap ;failed equal (zero)
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 85
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>; db $db ; M65C02/M65C02A SToP instruction
0a1a : 00 [ 7]> brk ; Use BRK to return to the monitor
0a1b : 0c > db test_num
>
0a1c : >skip0398
>
0a1c : 28 [ 4]> plp ;restore status
endif
0a1d : d8 [ 2] cld
tst_stat $ff-decmode
0a1e : 08 [ 3]> php ;save status
0a1f : 08 [ 3]> php ;use stack to retrieve status
0a20 : 68 [ 4]> pla
> cmp_flag $ff-decmode
0a21 : c9f7 [ 2]> cmp #($ff-decmode|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a23 : f002 [ 3]> beq skip0402
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0a25 : 00 [ 7]> brk ; Use BRK to return to the monitor
0a26 : 0c > db test_num
>
0a27 : >skip0402
>
0a27 : 28 [ 4]> plp ;restore status
0a28 : f8 [ 2] sed
tst_stat $ff
0a29 : 08 [ 3]> php ;save status
0a2a : 08 [ 3]> php ;use stack to retrieve status
0a2b : 68 [ 4]> pla
> cmp_flag $ff
0a2c : c9ff [ 2]> cmp #($ff|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a2e : f002 [ 3]> beq skip0406
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0a30 : 00 [ 7]> brk ; Use BRK to return to the monitor
0a31 : 0c > db test_num
>
0a32 : >skip0406
>
0a32 : 28 [ 4]> plp ;restore status
0a33 : b8 [ 2] clv
tst_stat $ff-overfl
0a34 : 08 [ 3]> php ;save status
0a35 : 08 [ 3]> php ;use stack to retrieve status
0a36 : 68 [ 4]> pla
> cmp_flag $ff-overfl
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 86
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0a37 : c9bf [ 2]> cmp #($ff-overfl|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a39 : f002 [ 3]> beq skip0410
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0a3b : 00 [ 7]> brk ; Use BRK to return to the monitor
0a3c : 0c > db test_num
>
0a3d : >skip0410
>
0a3d : 28 [ 4]> plp ;restore status
set_stat 0
> load_flag 0
0a3e : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
0a40 : 48 [ 3]> pha ;use stack to load status
0a41 : 28 [ 4]> plp
tst_stat 0
0a42 : 08 [ 3]> php ;save status
0a43 : 08 [ 3]> php ;use stack to retrieve status
0a44 : 68 [ 4]> pla
> cmp_flag 0
0a45 : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a47 : f002 [ 3]> beq skip0416
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0a49 : 00 [ 7]> brk ; Use BRK to return to the monitor
0a4a : 0c > db test_num
>
0a4b : >skip0416
>
0a4b : 28 [ 4]> plp ;restore status
0a4c : 38 [ 2] sec
tst_stat carry
0a4d : 08 [ 3]> php ;save status
0a4e : 08 [ 3]> php ;use stack to retrieve status
0a4f : 68 [ 4]> pla
> cmp_flag carry
0a50 : c931 [ 2]> cmp #(carry|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a52 : f002 [ 3]> beq skip0420
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0a54 : 00 [ 7]> brk ; Use BRK to return to the monitor
0a55 : 0c > db test_num
>
0a56 : >skip0420
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 87
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0a56 : 28 [ 4]> plp ;restore status
0a57 : 18 [ 2] clc
tst_stat 0
0a58 : 08 [ 3]> php ;save status
0a59 : 08 [ 3]> php ;use stack to retrieve status
0a5a : 68 [ 4]> pla
> cmp_flag 0
0a5b : c930 [ 2]> cmp #(0 |fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a5d : f002 [ 3]> beq skip0424
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0a5f : 00 [ 7]> brk ; Use BRK to return to the monitor
0a60 : 0c > db test_num
>
0a61 : >skip0424
>
0a61 : 28 [ 4]> plp ;restore status
if I_flag = 3
0a62 : 78 [ 2] sei
tst_stat intdis
0a63 : 08 [ 3]> php ;save status
0a64 : 08 [ 3]> php ;use stack to retrieve status
0a65 : 68 [ 4]> pla
> cmp_flag intdis
0a66 : c934 [ 2]> cmp #(intdis|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a68 : f002 [ 3]> beq skip0428
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0a6a : 00 [ 7]> brk ; Use BRK to return to the monitor
0a6b : 0c > db test_num
>
0a6c : >skip0428
>
0a6c : 28 [ 4]> plp ;restore status
0a6d : 58 [ 2] cli
tst_stat 0
0a6e : 08 [ 3]> php ;save status
0a6f : 08 [ 3]> php ;use stack to retrieve status
0a70 : 68 [ 4]> pla
> cmp_flag 0
0a71 : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a73 : f002 [ 3]> beq skip0432
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 88
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0a75 : 00 [ 7]> brk ; Use BRK to return to the monitor
0a76 : 0c > db test_num
>
0a77 : >skip0432
>
0a77 : 28 [ 4]> plp ;restore status
endif
0a78 : f8 [ 2] sed
tst_stat decmode
0a79 : 08 [ 3]> php ;save status
0a7a : 08 [ 3]> php ;use stack to retrieve status
0a7b : 68 [ 4]> pla
> cmp_flag decmode
0a7c : c938 [ 2]> cmp #(decmode|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a7e : f002 [ 3]> beq skip0436
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0a80 : 00 [ 7]> brk ; Use BRK to return to the monitor
0a81 : 0c > db test_num
>
0a82 : >skip0436
>
0a82 : 28 [ 4]> plp ;restore status
0a83 : d8 [ 2] cld
tst_stat 0
0a84 : 08 [ 3]> php ;save status
0a85 : 08 [ 3]> php ;use stack to retrieve status
0a86 : 68 [ 4]> pla
> cmp_flag 0
0a87 : c930 [ 2]> cmp #(0 |fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a89 : f002 [ 3]> beq skip0440
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0a8b : 00 [ 7]> brk ; Use BRK to return to the monitor
0a8c : 0c > db test_num
>
0a8d : >skip0440
>
0a8d : 28 [ 4]> plp ;restore status
set_stat overfl
> load_flag overfl
0a8e : a940 [ 2]> lda #overfl ;allow test to change I-flag (no mask)
>
0a90 : 48 [ 3]> pha ;use stack to load status
0a91 : 28 [ 4]> plp
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 89
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
tst_stat overfl
0a92 : 08 [ 3]> php ;save status
0a93 : 08 [ 3]> php ;use stack to retrieve status
0a94 : 68 [ 4]> pla
> cmp_flag overfl
0a95 : c970 [ 2]> cmp #(overfl|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0a97 : f002 [ 3]> beq skip0446
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0a99 : 00 [ 7]> brk ; Use BRK to return to the monitor
0a9a : 0c > db test_num
>
0a9b : >skip0446
>
0a9b : 28 [ 4]> plp ;restore status
0a9c : b8 [ 2] clv
tst_stat 0
0a9d : 08 [ 3]> php ;save status
0a9e : 08 [ 3]> php ;use stack to retrieve status
0a9f : 68 [ 4]> pla
> cmp_flag 0
0aa0 : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0aa2 : f002 [ 3]> beq skip0450
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0aa4 : 00 [ 7]> brk ; Use BRK to return to the monitor
0aa5 : 0c > db test_num
>
0aa6 : >skip0450
>
0aa6 : 28 [ 4]> plp ;restore status
next_test
0aa7 : ad0002 [ 4]> lda test_case ;previous test
0aaa : c90c [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
0aac : f002 [ 3]> beq skip0453
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0aae : 00 [ 7]> brk ; Use BRK to return to the monitor
0aaf : 0c > db test_num
>
0ab0 : >skip0453
>
000d = >test_num = test_num + 1
0ab0 : a90d [ 2]> lda #test_num ;*** this tests' number
0ab2 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 90
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
; testing index register increment/decrement and transfer
; INX INY DEX DEY TAX TXA TAY TYA
0ab5 : a2fe [ 2] ldx #$fe
set_stat $ff
> load_flag $ff
0ab7 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
0ab9 : 48 [ 3]> pha ;use stack to load status
0aba : 28 [ 4]> plp
0abb : e8 [ 2] inx ;ff
tst_x $ff,$ff-zero
0abc : 08 [ 3]> php ;save flags
0abd : 08 [ 3]> php
0abe : e0ff [ 2]> cpx #$ff ;test result
> trap_ne
0ac0 : f002 [ 3]> beq skip0458
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0ac2 : 00 [ 7]> brk ; Use BRK to return to the monitor
0ac3 : 0d > db test_num
>
0ac4 : >skip0458
>
0ac4 : 68 [ 4]> pla ;load status
> cmp_flag $ff-zero
0ac5 : c9fd [ 2]> cmp #($ff-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0ac7 : f002 [ 3]> beq skip0461
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0ac9 : 00 [ 7]> brk ; Use BRK to return to the monitor
0aca : 0d > db test_num
>
0acb : >skip0461
>
0acb : 28 [ 4]> plp ;restore status
0acc : e8 [ 2] inx ;00
tst_x 0,$ff-minus
0acd : 08 [ 3]> php ;save flags
0ace : 08 [ 3]> php
0acf : e000 [ 2]> cpx #0 ;test result
> trap_ne
0ad1 : f002 [ 3]> beq skip0464
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0ad3 : 00 [ 7]> brk ; Use BRK to return to the monitor
0ad4 : 0d > db test_num
>
0ad5 : >skip0464
>
0ad5 : 68 [ 4]> pla ;load status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 91
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> cmp_flag $ff-minus
0ad6 : c97f [ 2]> cmp #($ff-minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0ad8 : f002 [ 3]> beq skip0467
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0ada : 00 [ 7]> brk ; Use BRK to return to the monitor
0adb : 0d > db test_num
>
0adc : >skip0467
>
0adc : 28 [ 4]> plp ;restore status
0add : e8 [ 2] inx ;01
tst_x 1,$ff-minus-zero
0ade : 08 [ 3]> php ;save flags
0adf : 08 [ 3]> php
0ae0 : e001 [ 2]> cpx #1 ;test result
> trap_ne
0ae2 : f002 [ 3]> beq skip0470
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0ae4 : 00 [ 7]> brk ; Use BRK to return to the monitor
0ae5 : 0d > db test_num
>
0ae6 : >skip0470
>
0ae6 : 68 [ 4]> pla ;load status
> cmp_flag $ff-minus-zero
0ae7 : c97d [ 2]> cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0ae9 : f002 [ 3]> beq skip0473
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0aeb : 00 [ 7]> brk ; Use BRK to return to the monitor
0aec : 0d > db test_num
>
0aed : >skip0473
>
0aed : 28 [ 4]> plp ;restore status
0aee : ca [ 2] dex ;00
tst_x 0,$ff-minus
0aef : 08 [ 3]> php ;save flags
0af0 : 08 [ 3]> php
0af1 : e000 [ 2]> cpx #0 ;test result
> trap_ne
0af3 : f002 [ 3]> beq skip0476
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0af5 : 00 [ 7]> brk ; Use BRK to return to the monitor
0af6 : 0d > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 92
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0af7 : >skip0476
>
0af7 : 68 [ 4]> pla ;load status
> cmp_flag $ff-minus
0af8 : c97f [ 2]> cmp #($ff-minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0afa : f002 [ 3]> beq skip0479
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0afc : 00 [ 7]> brk ; Use BRK to return to the monitor
0afd : 0d > db test_num
>
0afe : >skip0479
>
0afe : 28 [ 4]> plp ;restore status
0aff : ca [ 2] dex ;ff
tst_x $ff,$ff-zero
0b00 : 08 [ 3]> php ;save flags
0b01 : 08 [ 3]> php
0b02 : e0ff [ 2]> cpx #$ff ;test result
> trap_ne
0b04 : f002 [ 3]> beq skip0482
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0b06 : 00 [ 7]> brk ; Use BRK to return to the monitor
0b07 : 0d > db test_num
>
0b08 : >skip0482
>
0b08 : 68 [ 4]> pla ;load status
> cmp_flag $ff-zero
0b09 : c9fd [ 2]> cmp #($ff-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0b0b : f002 [ 3]> beq skip0485
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0b0d : 00 [ 7]> brk ; Use BRK to return to the monitor
0b0e : 0d > db test_num
>
0b0f : >skip0485
>
0b0f : 28 [ 4]> plp ;restore status
0b10 : ca [ 2] dex ;fe
set_stat 0
> load_flag 0
0b11 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
0b13 : 48 [ 3]> pha ;use stack to load status
0b14 : 28 [ 4]> plp
0b15 : e8 [ 2] inx ;ff
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 93
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
tst_x $ff,minus
0b16 : 08 [ 3]> php ;save flags
0b17 : 08 [ 3]> php
0b18 : e0ff [ 2]> cpx #$ff ;test result
> trap_ne
0b1a : f002 [ 3]> beq skip0490
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0b1c : 00 [ 7]> brk ; Use BRK to return to the monitor
0b1d : 0d > db test_num
>
0b1e : >skip0490
>
0b1e : 68 [ 4]> pla ;load status
> cmp_flag minus
0b1f : c9b0 [ 2]> cmp #(minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0b21 : f002 [ 3]> beq skip0493
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0b23 : 00 [ 7]> brk ; Use BRK to return to the monitor
0b24 : 0d > db test_num
>
0b25 : >skip0493
>
0b25 : 28 [ 4]> plp ;restore status
0b26 : e8 [ 2] inx ;00
tst_x 0,zero
0b27 : 08 [ 3]> php ;save flags
0b28 : 08 [ 3]> php
0b29 : e000 [ 2]> cpx #0 ;test result
> trap_ne
0b2b : f002 [ 3]> beq skip0496
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0b2d : 00 [ 7]> brk ; Use BRK to return to the monitor
0b2e : 0d > db test_num
>
0b2f : >skip0496
>
0b2f : 68 [ 4]> pla ;load status
> cmp_flag zero
0b30 : c932 [ 2]> cmp #(zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0b32 : f002 [ 3]> beq skip0499
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0b34 : 00 [ 7]> brk ; Use BRK to return to the monitor
0b35 : 0d > db test_num
>
0b36 : >skip0499
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 94
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0b36 : 28 [ 4]> plp ;restore status
0b37 : e8 [ 2] inx ;01
tst_x 1,0
0b38 : 08 [ 3]> php ;save flags
0b39 : 08 [ 3]> php
0b3a : e001 [ 2]> cpx #1 ;test result
> trap_ne
0b3c : f002 [ 3]> beq skip0502
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0b3e : 00 [ 7]> brk ; Use BRK to return to the monitor
0b3f : 0d > db test_num
>
0b40 : >skip0502
>
0b40 : 68 [ 4]> pla ;load status
> cmp_flag 0
0b41 : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0b43 : f002 [ 3]> beq skip0505
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0b45 : 00 [ 7]> brk ; Use BRK to return to the monitor
0b46 : 0d > db test_num
>
0b47 : >skip0505
>
0b47 : 28 [ 4]> plp ;restore status
0b48 : ca [ 2] dex ;00
tst_x 0,zero
0b49 : 08 [ 3]> php ;save flags
0b4a : 08 [ 3]> php
0b4b : e000 [ 2]> cpx #0 ;test result
> trap_ne
0b4d : f002 [ 3]> beq skip0508
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0b4f : 00 [ 7]> brk ; Use BRK to return to the monitor
0b50 : 0d > db test_num
>
0b51 : >skip0508
>
0b51 : 68 [ 4]> pla ;load status
> cmp_flag zero
0b52 : c932 [ 2]> cmp #(zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0b54 : f002 [ 3]> beq skip0511
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0b56 : 00 [ 7]> brk ; Use BRK to return to the monitor
0b57 : 0d > db test_num
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 95
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
0b58 : >skip0511
>
0b58 : 28 [ 4]> plp ;restore status
0b59 : ca [ 2] dex ;ff
tst_x $ff,minus
0b5a : 08 [ 3]> php ;save flags
0b5b : 08 [ 3]> php
0b5c : e0ff [ 2]> cpx #$ff ;test result
> trap_ne
0b5e : f002 [ 3]> beq skip0514
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0b60 : 00 [ 7]> brk ; Use BRK to return to the monitor
0b61 : 0d > db test_num
>
0b62 : >skip0514
>
0b62 : 68 [ 4]> pla ;load status
> cmp_flag minus
0b63 : c9b0 [ 2]> cmp #(minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0b65 : f002 [ 3]> beq skip0517
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0b67 : 00 [ 7]> brk ; Use BRK to return to the monitor
0b68 : 0d > db test_num
>
0b69 : >skip0517
>
0b69 : 28 [ 4]> plp ;restore status
0b6a : a0fe [ 2] ldy #$fe
set_stat $ff
> load_flag $ff
0b6c : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
0b6e : 48 [ 3]> pha ;use stack to load status
0b6f : 28 [ 4]> plp
0b70 : c8 [ 2] iny ;ff
tst_y $ff,$ff-zero
0b71 : 08 [ 3]> php ;save flags
0b72 : 08 [ 3]> php
0b73 : c0ff [ 2]> cpy #$ff ;test result
> trap_ne
0b75 : f002 [ 3]> beq skip0522
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0b77 : 00 [ 7]> brk ; Use BRK to return to the monitor
0b78 : 0d > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 96
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0b79 : >skip0522
>
0b79 : 68 [ 4]> pla ;load status
> cmp_flag $ff-zero
0b7a : c9fd [ 2]> cmp #($ff-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0b7c : f002 [ 3]> beq skip0525
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0b7e : 00 [ 7]> brk ; Use BRK to return to the monitor
0b7f : 0d > db test_num
>
0b80 : >skip0525
>
0b80 : 28 [ 4]> plp ;restore status
0b81 : c8 [ 2] iny ;00
tst_y 0,$ff-minus
0b82 : 08 [ 3]> php ;save flags
0b83 : 08 [ 3]> php
0b84 : c000 [ 2]> cpy #0 ;test result
> trap_ne
0b86 : f002 [ 3]> beq skip0528
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0b88 : 00 [ 7]> brk ; Use BRK to return to the monitor
0b89 : 0d > db test_num
>
0b8a : >skip0528
>
0b8a : 68 [ 4]> pla ;load status
> cmp_flag $ff-minus
0b8b : c97f [ 2]> cmp #($ff-minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0b8d : f002 [ 3]> beq skip0531
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0b8f : 00 [ 7]> brk ; Use BRK to return to the monitor
0b90 : 0d > db test_num
>
0b91 : >skip0531
>
0b91 : 28 [ 4]> plp ;restore status
0b92 : c8 [ 2] iny ;01
tst_y 1,$ff-minus-zero
0b93 : 08 [ 3]> php ;save flags
0b94 : 08 [ 3]> php
0b95 : c001 [ 2]> cpy #1 ;test result
> trap_ne
0b97 : f002 [ 3]> beq skip0534
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 97
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0b99 : 00 [ 7]> brk ; Use BRK to return to the monitor
0b9a : 0d > db test_num
>
0b9b : >skip0534
>
0b9b : 68 [ 4]> pla ;load status
> cmp_flag $ff-minus-zero
0b9c : c97d [ 2]> cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0b9e : f002 [ 3]> beq skip0537
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0ba0 : 00 [ 7]> brk ; Use BRK to return to the monitor
0ba1 : 0d > db test_num
>
0ba2 : >skip0537
>
0ba2 : 28 [ 4]> plp ;restore status
0ba3 : 88 [ 2] dey ;00
tst_y 0,$ff-minus
0ba4 : 08 [ 3]> php ;save flags
0ba5 : 08 [ 3]> php
0ba6 : c000 [ 2]> cpy #0 ;test result
> trap_ne
0ba8 : f002 [ 3]> beq skip0540
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0baa : 00 [ 7]> brk ; Use BRK to return to the monitor
0bab : 0d > db test_num
>
0bac : >skip0540
>
0bac : 68 [ 4]> pla ;load status
> cmp_flag $ff-minus
0bad : c97f [ 2]> cmp #($ff-minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0baf : f002 [ 3]> beq skip0543
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0bb1 : 00 [ 7]> brk ; Use BRK to return to the monitor
0bb2 : 0d > db test_num
>
0bb3 : >skip0543
>
0bb3 : 28 [ 4]> plp ;restore status
0bb4 : 88 [ 2] dey ;ff
tst_y $ff,$ff-zero
0bb5 : 08 [ 3]> php ;save flags
0bb6 : 08 [ 3]> php
0bb7 : c0ff [ 2]> cpy #$ff ;test result
> trap_ne
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 98
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0bb9 : f002 [ 3]> beq skip0546
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0bbb : 00 [ 7]> brk ; Use BRK to return to the monitor
0bbc : 0d > db test_num
>
0bbd : >skip0546
>
0bbd : 68 [ 4]> pla ;load status
> cmp_flag $ff-zero
0bbe : c9fd [ 2]> cmp #($ff-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0bc0 : f002 [ 3]> beq skip0549
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0bc2 : 00 [ 7]> brk ; Use BRK to return to the monitor
0bc3 : 0d > db test_num
>
0bc4 : >skip0549
>
0bc4 : 28 [ 4]> plp ;restore status
0bc5 : 88 [ 2] dey ;fe
set_stat 0
> load_flag 0
0bc6 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
0bc8 : 48 [ 3]> pha ;use stack to load status
0bc9 : 28 [ 4]> plp
0bca : c8 [ 2] iny ;ff
tst_y $ff,0+minus
0bcb : 08 [ 3]> php ;save flags
0bcc : 08 [ 3]> php
0bcd : c0ff [ 2]> cpy #$ff ;test result
> trap_ne
0bcf : f002 [ 3]> beq skip0554
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0bd1 : 00 [ 7]> brk ; Use BRK to return to the monitor
0bd2 : 0d > db test_num
>
0bd3 : >skip0554
>
0bd3 : 68 [ 4]> pla ;load status
> cmp_flag 0+minus
0bd4 : c9b0 [ 2]> cmp #(0+minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0bd6 : f002 [ 3]> beq skip0557
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0bd8 : 00 [ 7]> brk ; Use BRK to return to the monitor
0bd9 : 0d > db test_num
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 99
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
0bda : >skip0557
>
0bda : 28 [ 4]> plp ;restore status
0bdb : c8 [ 2] iny ;00
tst_y 0,zero
0bdc : 08 [ 3]> php ;save flags
0bdd : 08 [ 3]> php
0bde : c000 [ 2]> cpy #0 ;test result
> trap_ne
0be0 : f002 [ 3]> beq skip0560
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0be2 : 00 [ 7]> brk ; Use BRK to return to the monitor
0be3 : 0d > db test_num
>
0be4 : >skip0560
>
0be4 : 68 [ 4]> pla ;load status
> cmp_flag zero
0be5 : c932 [ 2]> cmp #(zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0be7 : f002 [ 3]> beq skip0563
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0be9 : 00 [ 7]> brk ; Use BRK to return to the monitor
0bea : 0d > db test_num
>
0beb : >skip0563
>
0beb : 28 [ 4]> plp ;restore status
0bec : c8 [ 2] iny ;01
tst_y 1,0
0bed : 08 [ 3]> php ;save flags
0bee : 08 [ 3]> php
0bef : c001 [ 2]> cpy #1 ;test result
> trap_ne
0bf1 : f002 [ 3]> beq skip0566
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0bf3 : 00 [ 7]> brk ; Use BRK to return to the monitor
0bf4 : 0d > db test_num
>
0bf5 : >skip0566
>
0bf5 : 68 [ 4]> pla ;load status
> cmp_flag 0
0bf6 : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0bf8 : f002 [ 3]> beq skip0569
> trap ;failed equal (zero)
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 100
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>; db $db ; M65C02/M65C02A SToP instruction
0bfa : 00 [ 7]> brk ; Use BRK to return to the monitor
0bfb : 0d > db test_num
>
0bfc : >skip0569
>
0bfc : 28 [ 4]> plp ;restore status
0bfd : 88 [ 2] dey ;00
tst_y 0,zero
0bfe : 08 [ 3]> php ;save flags
0bff : 08 [ 3]> php
0c00 : c000 [ 2]> cpy #0 ;test result
> trap_ne
0c02 : f002 [ 3]> beq skip0572
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0c04 : 00 [ 7]> brk ; Use BRK to return to the monitor
0c05 : 0d > db test_num
>
0c06 : >skip0572
>
0c06 : 68 [ 4]> pla ;load status
> cmp_flag zero
0c07 : c932 [ 2]> cmp #(zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0c09 : f002 [ 3]> beq skip0575
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0c0b : 00 [ 7]> brk ; Use BRK to return to the monitor
0c0c : 0d > db test_num
>
0c0d : >skip0575
>
0c0d : 28 [ 4]> plp ;restore status
0c0e : 88 [ 2] dey ;ff
tst_y $ff,minus
0c0f : 08 [ 3]> php ;save flags
0c10 : 08 [ 3]> php
0c11 : c0ff [ 2]> cpy #$ff ;test result
> trap_ne
0c13 : f002 [ 3]> beq skip0578
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0c15 : 00 [ 7]> brk ; Use BRK to return to the monitor
0c16 : 0d > db test_num
>
0c17 : >skip0578
>
0c17 : 68 [ 4]> pla ;load status
> cmp_flag minus
0c18 : c9b0 [ 2]> cmp #(minus|fao)&m8 ;expected flags + always on bits
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 101
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap_ne
0c1a : f002 [ 3]> beq skip0581
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0c1c : 00 [ 7]> brk ; Use BRK to return to the monitor
0c1d : 0d > db test_num
>
0c1e : >skip0581
>
0c1e : 28 [ 4]> plp ;restore status
0c1f : a2ff [ 2] ldx #$ff
set_stat $ff
> load_flag $ff
0c21 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
0c23 : 48 [ 3]> pha ;use stack to load status
0c24 : 28 [ 4]> plp
0c25 : 8a [ 2] txa
tst_a $ff,$ff-zero
0c26 : 08 [ 3]> php ;save flags
0c27 : 08 [ 3]> php
0c28 : c9ff [ 2]> cmp #$ff ;test result
> trap_ne
0c2a : f002 [ 3]> beq skip0586
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0c2c : 00 [ 7]> brk ; Use BRK to return to the monitor
0c2d : 0d > db test_num
>
0c2e : >skip0586
>
0c2e : 68 [ 4]> pla ;load status
> cmp_flag $ff-zero
0c2f : c9fd [ 2]> cmp #($ff-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0c31 : f002 [ 3]> beq skip0589
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0c33 : 00 [ 7]> brk ; Use BRK to return to the monitor
0c34 : 0d > db test_num
>
0c35 : >skip0589
>
0c35 : 28 [ 4]> plp ;restore status
0c36 : 08 [ 3] php
0c37 : e8 [ 2] inx ;00
0c38 : 28 [ 4] plp
0c39 : 8a [ 2] txa
tst_a 0,$ff-minus
0c3a : 08 [ 3]> php ;save flags
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 102
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0c3b : 08 [ 3]> php
0c3c : c900 [ 2]> cmp #0 ;test result
> trap_ne
0c3e : f002 [ 3]> beq skip0592
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0c40 : 00 [ 7]> brk ; Use BRK to return to the monitor
0c41 : 0d > db test_num
>
0c42 : >skip0592
>
0c42 : 68 [ 4]> pla ;load status
> cmp_flag $ff-minus
0c43 : c97f [ 2]> cmp #($ff-minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0c45 : f002 [ 3]> beq skip0595
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0c47 : 00 [ 7]> brk ; Use BRK to return to the monitor
0c48 : 0d > db test_num
>
0c49 : >skip0595
>
0c49 : 28 [ 4]> plp ;restore status
0c4a : 08 [ 3] php
0c4b : e8 [ 2] inx ;01
0c4c : 28 [ 4] plp
0c4d : 8a [ 2] txa
tst_a 1,$ff-minus-zero
0c4e : 08 [ 3]> php ;save flags
0c4f : 08 [ 3]> php
0c50 : c901 [ 2]> cmp #1 ;test result
> trap_ne
0c52 : f002 [ 3]> beq skip0598
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0c54 : 00 [ 7]> brk ; Use BRK to return to the monitor
0c55 : 0d > db test_num
>
0c56 : >skip0598
>
0c56 : 68 [ 4]> pla ;load status
> cmp_flag $ff-minus-zero
0c57 : c97d [ 2]> cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0c59 : f002 [ 3]> beq skip0601
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0c5b : 00 [ 7]> brk ; Use BRK to return to the monitor
0c5c : 0d > db test_num
>
0c5d : >skip0601
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 103
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
0c5d : 28 [ 4]> plp ;restore status
set_stat 0
> load_flag 0
0c5e : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
0c60 : 48 [ 3]> pha ;use stack to load status
0c61 : 28 [ 4]> plp
0c62 : 8a [ 2] txa
tst_a 1,0
0c63 : 08 [ 3]> php ;save flags
0c64 : 08 [ 3]> php
0c65 : c901 [ 2]> cmp #1 ;test result
> trap_ne
0c67 : f002 [ 3]> beq skip0606
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0c69 : 00 [ 7]> brk ; Use BRK to return to the monitor
0c6a : 0d > db test_num
>
0c6b : >skip0606
>
0c6b : 68 [ 4]> pla ;load status
> cmp_flag 0
0c6c : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0c6e : f002 [ 3]> beq skip0609
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0c70 : 00 [ 7]> brk ; Use BRK to return to the monitor
0c71 : 0d > db test_num
>
0c72 : >skip0609
>
0c72 : 28 [ 4]> plp ;restore status
0c73 : 08 [ 3] php
0c74 : ca [ 2] dex ;00
0c75 : 28 [ 4] plp
0c76 : 8a [ 2] txa
tst_a 0,zero
0c77 : 08 [ 3]> php ;save flags
0c78 : 08 [ 3]> php
0c79 : c900 [ 2]> cmp #0 ;test result
> trap_ne
0c7b : f002 [ 3]> beq skip0612
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0c7d : 00 [ 7]> brk ; Use BRK to return to the monitor
0c7e : 0d > db test_num
>
0c7f : >skip0612
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 104
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
0c7f : 68 [ 4]> pla ;load status
> cmp_flag zero
0c80 : c932 [ 2]> cmp #(zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0c82 : f002 [ 3]> beq skip0615
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0c84 : 00 [ 7]> brk ; Use BRK to return to the monitor
0c85 : 0d > db test_num
>
0c86 : >skip0615
>
0c86 : 28 [ 4]> plp ;restore status
0c87 : 08 [ 3] php
0c88 : ca [ 2] dex ;ff
0c89 : 28 [ 4] plp
0c8a : 8a [ 2] txa
tst_a $ff,minus
0c8b : 08 [ 3]> php ;save flags
0c8c : 08 [ 3]> php
0c8d : c9ff [ 2]> cmp #$ff ;test result
> trap_ne
0c8f : f002 [ 3]> beq skip0618
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0c91 : 00 [ 7]> brk ; Use BRK to return to the monitor
0c92 : 0d > db test_num
>
0c93 : >skip0618
>
0c93 : 68 [ 4]> pla ;load status
> cmp_flag minus
0c94 : c9b0 [ 2]> cmp #(minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0c96 : f002 [ 3]> beq skip0621
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0c98 : 00 [ 7]> brk ; Use BRK to return to the monitor
0c99 : 0d > db test_num
>
0c9a : >skip0621
>
0c9a : 28 [ 4]> plp ;restore status
0c9b : a0ff [ 2] ldy #$ff
set_stat $ff
> load_flag $ff
0c9d : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
0c9f : 48 [ 3]> pha ;use stack to load status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 105
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0ca0 : 28 [ 4]> plp
0ca1 : 98 [ 2] tya
tst_a $ff,$ff-zero
0ca2 : 08 [ 3]> php ;save flags
0ca3 : 08 [ 3]> php
0ca4 : c9ff [ 2]> cmp #$ff ;test result
> trap_ne
0ca6 : f002 [ 3]> beq skip0626
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0ca8 : 00 [ 7]> brk ; Use BRK to return to the monitor
0ca9 : 0d > db test_num
>
0caa : >skip0626
>
0caa : 68 [ 4]> pla ;load status
> cmp_flag $ff-zero
0cab : c9fd [ 2]> cmp #($ff-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0cad : f002 [ 3]> beq skip0629
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0caf : 00 [ 7]> brk ; Use BRK to return to the monitor
0cb0 : 0d > db test_num
>
0cb1 : >skip0629
>
0cb1 : 28 [ 4]> plp ;restore status
0cb2 : 08 [ 3] php
0cb3 : c8 [ 2] iny ;00
0cb4 : 28 [ 4] plp
0cb5 : 98 [ 2] tya
tst_a 0,$ff-minus
0cb6 : 08 [ 3]> php ;save flags
0cb7 : 08 [ 3]> php
0cb8 : c900 [ 2]> cmp #0 ;test result
> trap_ne
0cba : f002 [ 3]> beq skip0632
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0cbc : 00 [ 7]> brk ; Use BRK to return to the monitor
0cbd : 0d > db test_num
>
0cbe : >skip0632
>
0cbe : 68 [ 4]> pla ;load status
> cmp_flag $ff-minus
0cbf : c97f [ 2]> cmp #($ff-minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0cc1 : f002 [ 3]> beq skip0635
> trap ;failed equal (zero)
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 106
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>; db $db ; M65C02/M65C02A SToP instruction
0cc3 : 00 [ 7]> brk ; Use BRK to return to the monitor
0cc4 : 0d > db test_num
>
0cc5 : >skip0635
>
0cc5 : 28 [ 4]> plp ;restore status
0cc6 : 08 [ 3] php
0cc7 : c8 [ 2] iny ;01
0cc8 : 28 [ 4] plp
0cc9 : 98 [ 2] tya
tst_a 1,$ff-minus-zero
0cca : 08 [ 3]> php ;save flags
0ccb : 08 [ 3]> php
0ccc : c901 [ 2]> cmp #1 ;test result
> trap_ne
0cce : f002 [ 3]> beq skip0638
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0cd0 : 00 [ 7]> brk ; Use BRK to return to the monitor
0cd1 : 0d > db test_num
>
0cd2 : >skip0638
>
0cd2 : 68 [ 4]> pla ;load status
> cmp_flag $ff-minus-zero
0cd3 : c97d [ 2]> cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0cd5 : f002 [ 3]> beq skip0641
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0cd7 : 00 [ 7]> brk ; Use BRK to return to the monitor
0cd8 : 0d > db test_num
>
0cd9 : >skip0641
>
0cd9 : 28 [ 4]> plp ;restore status
set_stat 0
> load_flag 0
0cda : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
0cdc : 48 [ 3]> pha ;use stack to load status
0cdd : 28 [ 4]> plp
0cde : 98 [ 2] tya
tst_a 1,0
0cdf : 08 [ 3]> php ;save flags
0ce0 : 08 [ 3]> php
0ce1 : c901 [ 2]> cmp #1 ;test result
> trap_ne
0ce3 : f002 [ 3]> beq skip0646
> trap ;failed equal (zero)
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 107
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>; db $db ; M65C02/M65C02A SToP instruction
0ce5 : 00 [ 7]> brk ; Use BRK to return to the monitor
0ce6 : 0d > db test_num
>
0ce7 : >skip0646
>
0ce7 : 68 [ 4]> pla ;load status
> cmp_flag 0
0ce8 : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0cea : f002 [ 3]> beq skip0649
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0cec : 00 [ 7]> brk ; Use BRK to return to the monitor
0ced : 0d > db test_num
>
0cee : >skip0649
>
0cee : 28 [ 4]> plp ;restore status
0cef : 08 [ 3] php
0cf0 : 88 [ 2] dey ;00
0cf1 : 28 [ 4] plp
0cf2 : 98 [ 2] tya
tst_a 0,zero
0cf3 : 08 [ 3]> php ;save flags
0cf4 : 08 [ 3]> php
0cf5 : c900 [ 2]> cmp #0 ;test result
> trap_ne
0cf7 : f002 [ 3]> beq skip0652
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0cf9 : 00 [ 7]> brk ; Use BRK to return to the monitor
0cfa : 0d > db test_num
>
0cfb : >skip0652
>
0cfb : 68 [ 4]> pla ;load status
> cmp_flag zero
0cfc : c932 [ 2]> cmp #(zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0cfe : f002 [ 4]> beq skip0655
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0d00 : 00 [ 7]> brk ; Use BRK to return to the monitor
0d01 : 0d > db test_num
>
0d02 : >skip0655
>
0d02 : 28 [ 4]> plp ;restore status
0d03 : 08 [ 3] php
0d04 : 88 [ 2] dey ;ff
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 108
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0d05 : 28 [ 4] plp
0d06 : 98 [ 2] tya
tst_a $ff,minus
0d07 : 08 [ 3]> php ;save flags
0d08 : 08 [ 3]> php
0d09 : c9ff [ 2]> cmp #$ff ;test result
> trap_ne
0d0b : f002 [ 3]> beq skip0658
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0d0d : 00 [ 7]> brk ; Use BRK to return to the monitor
0d0e : 0d > db test_num
>
0d0f : >skip0658
>
0d0f : 68 [ 4]> pla ;load status
> cmp_flag minus
0d10 : c9b0 [ 2]> cmp #(minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0d12 : f002 [ 3]> beq skip0661
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0d14 : 00 [ 7]> brk ; Use BRK to return to the monitor
0d15 : 0d > db test_num
>
0d16 : >skip0661
>
0d16 : 28 [ 4]> plp ;restore status
load_flag $ff
0d17 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
0d19 : 48 [ 3] pha
0d1a : a2ff [ 2] ldx #$ff ;ff
0d1c : 8a [ 2] txa
0d1d : 28 [ 4] plp
0d1e : a8 [ 2] tay
tst_y $ff,$ff-zero
0d1f : 08 [ 3]> php ;save flags
0d20 : 08 [ 3]> php
0d21 : c0ff [ 2]> cpy #$ff ;test result
> trap_ne
0d23 : f002 [ 3]> beq skip0665
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0d25 : 00 [ 7]> brk ; Use BRK to return to the monitor
0d26 : 0d > db test_num
>
0d27 : >skip0665
>
0d27 : 68 [ 4]> pla ;load status
> cmp_flag $ff-zero
0d28 : c9fd [ 2]> cmp #($ff-zero|fao)&m8 ;expected flags + always on bits
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 109
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
> trap_ne
0d2a : f002 [ 3]> beq skip0668
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0d2c : 00 [ 7]> brk ; Use BRK to return to the monitor
0d2d : 0d > db test_num
>
0d2e : >skip0668
>
0d2e : 28 [ 4]> plp ;restore status
0d2f : 08 [ 3] php
0d30 : e8 [ 2] inx ;00
0d31 : 8a [ 2] txa
0d32 : 28 [ 4] plp
0d33 : a8 [ 2] tay
tst_y 0,$ff-minus
0d34 : 08 [ 3]> php ;save flags
0d35 : 08 [ 3]> php
0d36 : c000 [ 2]> cpy #0 ;test result
> trap_ne
0d38 : f002 [ 3]> beq skip0671
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0d3a : 00 [ 7]> brk ; Use BRK to return to the monitor
0d3b : 0d > db test_num
>
0d3c : >skip0671
>
0d3c : 68 [ 4]> pla ;load status
> cmp_flag $ff-minus
0d3d : c97f [ 2]> cmp #($ff-minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0d3f : f002 [ 3]> beq skip0674
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0d41 : 00 [ 7]> brk ; Use BRK to return to the monitor
0d42 : 0d > db test_num
>
0d43 : >skip0674
>
0d43 : 28 [ 4]> plp ;restore status
0d44 : 08 [ 3] php
0d45 : e8 [ 2] inx ;01
0d46 : 8a [ 2] txa
0d47 : 28 [ 4] plp
0d48 : a8 [ 2] tay
tst_y 1,$ff-minus-zero
0d49 : 08 [ 3]> php ;save flags
0d4a : 08 [ 3]> php
0d4b : c001 [ 2]> cpy #1 ;test result
> trap_ne
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 110
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0d4d : f002 [ 3]> beq skip0677
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0d4f : 00 [ 7]> brk ; Use BRK to return to the monitor
0d50 : 0d > db test_num
>
0d51 : >skip0677
>
0d51 : 68 [ 4]> pla ;load status
> cmp_flag $ff-minus-zero
0d52 : c97d [ 2]> cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0d54 : f002 [ 3]> beq skip0680
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0d56 : 00 [ 7]> brk ; Use BRK to return to the monitor
0d57 : 0d > db test_num
>
0d58 : >skip0680
>
0d58 : 28 [ 4]> plp ;restore status
load_flag 0
0d59 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
0d5b : 48 [ 3] pha
0d5c : a900 [ 2] lda #0
0d5e : 8a [ 2] txa
0d5f : 28 [ 4] plp
0d60 : a8 [ 2] tay
tst_y 1,0
0d61 : 08 [ 3]> php ;save flags
0d62 : 08 [ 3]> php
0d63 : c001 [ 2]> cpy #1 ;test result
> trap_ne
0d65 : f002 [ 3]> beq skip0684
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0d67 : 00 [ 7]> brk ; Use BRK to return to the monitor
0d68 : 0d > db test_num
>
0d69 : >skip0684
>
0d69 : 68 [ 4]> pla ;load status
> cmp_flag 0
0d6a : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0d6c : f002 [ 3]> beq skip0687
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0d6e : 00 [ 7]> brk ; Use BRK to return to the monitor
0d6f : 0d > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 111
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0d70 : >skip0687
>
0d70 : 28 [ 4]> plp ;restore status
0d71 : 08 [ 3] php
0d72 : ca [ 2] dex ;00
0d73 : 8a [ 2] txa
0d74 : 28 [ 4] plp
0d75 : a8 [ 2] tay
tst_y 0,zero
0d76 : 08 [ 3]> php ;save flags
0d77 : 08 [ 3]> php
0d78 : c000 [ 2]> cpy #0 ;test result
> trap_ne
0d7a : f002 [ 3]> beq skip0690
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0d7c : 00 [ 7]> brk ; Use BRK to return to the monitor
0d7d : 0d > db test_num
>
0d7e : >skip0690
>
0d7e : 68 [ 4]> pla ;load status
> cmp_flag zero
0d7f : c932 [ 2]> cmp #(zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0d81 : f002 [ 3]> beq skip0693
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0d83 : 00 [ 7]> brk ; Use BRK to return to the monitor
0d84 : 0d > db test_num
>
0d85 : >skip0693
>
0d85 : 28 [ 4]> plp ;restore status
0d86 : 08 [ 3] php
0d87 : ca [ 2] dex ;ff
0d88 : 8a [ 2] txa
0d89 : 28 [ 4] plp
0d8a : a8 [ 2] tay
tst_y $ff,minus
0d8b : 08 [ 3]> php ;save flags
0d8c : 08 [ 3]> php
0d8d : c0ff [ 2]> cpy #$ff ;test result
> trap_ne
0d8f : f002 [ 3]> beq skip0696
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0d91 : 00 [ 7]> brk ; Use BRK to return to the monitor
0d92 : 0d > db test_num
>
0d93 : >skip0696
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 112
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0d93 : 68 [ 4]> pla ;load status
> cmp_flag minus
0d94 : c9b0 [ 2]> cmp #(minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0d96 : f002 [ 3]> beq skip0699
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0d98 : 00 [ 7]> brk ; Use BRK to return to the monitor
0d99 : 0d > db test_num
>
0d9a : >skip0699
>
0d9a : 28 [ 4]> plp ;restore status
load_flag $ff
0d9b : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
0d9d : 48 [ 3] pha
0d9e : a0ff [ 2] ldy #$ff ;ff
0da0 : 98 [ 2] tya
0da1 : 28 [ 4] plp
0da2 : aa [ 2] tax
tst_x $ff,$ff-zero
0da3 : 08 [ 3]> php ;save flags
0da4 : 08 [ 3]> php
0da5 : e0ff [ 2]> cpx #$ff ;test result
> trap_ne
0da7 : f002 [ 3]> beq skip0703
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0da9 : 00 [ 7]> brk ; Use BRK to return to the monitor
0daa : 0d > db test_num
>
0dab : >skip0703
>
0dab : 68 [ 4]> pla ;load status
> cmp_flag $ff-zero
0dac : c9fd [ 2]> cmp #($ff-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0dae : f002 [ 3]> beq skip0706
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0db0 : 00 [ 7]> brk ; Use BRK to return to the monitor
0db1 : 0d > db test_num
>
0db2 : >skip0706
>
0db2 : 28 [ 4]> plp ;restore status
0db3 : 08 [ 3] php
0db4 : c8 [ 2] iny ;00
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 113
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0db5 : 98 [ 2] tya
0db6 : 28 [ 4] plp
0db7 : aa [ 2] tax
tst_x 0,$ff-minus
0db8 : 08 [ 3]> php ;save flags
0db9 : 08 [ 3]> php
0dba : e000 [ 2]> cpx #0 ;test result
> trap_ne
0dbc : f002 [ 3]> beq skip0709
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0dbe : 00 [ 7]> brk ; Use BRK to return to the monitor
0dbf : 0d > db test_num
>
0dc0 : >skip0709
>
0dc0 : 68 [ 4]> pla ;load status
> cmp_flag $ff-minus
0dc1 : c97f [ 2]> cmp #($ff-minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0dc3 : f002 [ 3]> beq skip0712
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0dc5 : 00 [ 7]> brk ; Use BRK to return to the monitor
0dc6 : 0d > db test_num
>
0dc7 : >skip0712
>
0dc7 : 28 [ 4]> plp ;restore status
0dc8 : 08 [ 3] php
0dc9 : c8 [ 2] iny ;01
0dca : 98 [ 2] tya
0dcb : 28 [ 4] plp
0dcc : aa [ 2] tax
tst_x 1,$ff-minus-zero
0dcd : 08 [ 3]> php ;save flags
0dce : 08 [ 3]> php
0dcf : e001 [ 2]> cpx #1 ;test result
> trap_ne
0dd1 : f002 [ 3]> beq skip0715
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0dd3 : 00 [ 7]> brk ; Use BRK to return to the monitor
0dd4 : 0d > db test_num
>
0dd5 : >skip0715
>
0dd5 : 68 [ 4]> pla ;load status
> cmp_flag $ff-minus-zero
0dd6 : c97d [ 2]> cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0dd8 : f002 [ 3]> beq skip0718
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 114
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0dda : 00 [ 7]> brk ; Use BRK to return to the monitor
0ddb : 0d > db test_num
>
0ddc : >skip0718
>
0ddc : 28 [ 4]> plp ;restore status
load_flag 0
0ddd : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
0ddf : 48 [ 3] pha
0de0 : a900 [ 2] lda #0 ;preset status
0de2 : 98 [ 2] tya
0de3 : 28 [ 4] plp
0de4 : aa [ 2] tax
tst_x 1,0
0de5 : 08 [ 3]> php ;save flags
0de6 : 08 [ 3]> php
0de7 : e001 [ 2]> cpx #1 ;test result
> trap_ne
0de9 : f002 [ 3]> beq skip0722
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0deb : 00 [ 7]> brk ; Use BRK to return to the monitor
0dec : 0d > db test_num
>
0ded : >skip0722
>
0ded : 68 [ 4]> pla ;load status
> cmp_flag 0
0dee : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0df0 : f002 [ 3]> beq skip0725
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0df2 : 00 [ 7]> brk ; Use BRK to return to the monitor
0df3 : 0d > db test_num
>
0df4 : >skip0725
>
0df4 : 28 [ 4]> plp ;restore status
0df5 : 08 [ 3] php
0df6 : 88 [ 2] dey ;00
0df7 : 98 [ 2] tya
0df8 : 28 [ 4] plp
0df9 : aa [ 2] tax
tst_x 0,zero
0dfa : 08 [ 3]> php ;save flags
0dfb : 08 [ 3]> php
0dfc : e000 [ 2]> cpx #0 ;test result
> trap_ne
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 115
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0dfe : f002 [ 4]> beq skip0728
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0e00 : 00 [ 7]> brk ; Use BRK to return to the monitor
0e01 : 0d > db test_num
>
0e02 : >skip0728
>
0e02 : 68 [ 4]> pla ;load status
> cmp_flag zero
0e03 : c932 [ 2]> cmp #(zero|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0e05 : f002 [ 3]> beq skip0731
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0e07 : 00 [ 7]> brk ; Use BRK to return to the monitor
0e08 : 0d > db test_num
>
0e09 : >skip0731
>
0e09 : 28 [ 4]> plp ;restore status
0e0a : 08 [ 3] php
0e0b : 88 [ 2] dey ;ff
0e0c : 98 [ 2] tya
0e0d : 28 [ 4] plp
0e0e : aa [ 2] tax
tst_x $ff,minus
0e0f : 08 [ 3]> php ;save flags
0e10 : 08 [ 3]> php
0e11 : e0ff [ 2]> cpx #$ff ;test result
> trap_ne
0e13 : f002 [ 3]> beq skip0734
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0e15 : 00 [ 7]> brk ; Use BRK to return to the monitor
0e16 : 0d > db test_num
>
0e17 : >skip0734
>
0e17 : 68 [ 4]> pla ;load status
> cmp_flag minus
0e18 : c9b0 [ 2]> cmp #(minus|fao)&m8 ;expected flags + always on bits
>
> trap_ne
0e1a : f002 [ 3]> beq skip0737
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0e1c : 00 [ 7]> brk ; Use BRK to return to the monitor
0e1d : 0d > db test_num
>
0e1e : >skip0737
>
0e1e : 28 [ 4]> plp ;restore status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 116
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
next_test
0e1f : ad0002 [ 4]> lda test_case ;previous test
0e22 : c90d [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
0e24 : f002 [ 3]> beq skip0740
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0e26 : 00 [ 7]> brk ; Use BRK to return to the monitor
0e27 : 0d > db test_num
>
0e28 : >skip0740
>
000e = >test_num = test_num + 1
0e28 : a90e [ 2]> lda #test_num ;*** this tests' number
0e2a : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
;TSX sets NZ - TXS does not
0e2d : a201 [ 2] ldx #1 ;01
set_stat $ff
> load_flag $ff
0e2f : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
0e31 : 48 [ 3]> pha ;use stack to load status
0e32 : 28 [ 4]> plp
0e33 : 9a [ 2] txs
0e34 : 08 [ 3] php
0e35 : ad0101 [ 4] lda $101
cmp_flag $ff
0e38 : c9ff [ 2]> cmp #($ff|fao)&m8 ;expected flags + always on bits
trap_ne
0e3a : f002 [ 3]> beq skip0745
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0e3c : 00 [ 7]> brk ; Use BRK to return to the monitor
0e3d : 0e > db test_num
>
0e3e : >skip0745
set_stat 0
> load_flag 0
0e3e : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
0e40 : 48 [ 3]> pha ;use stack to load status
0e41 : 28 [ 4]> plp
0e42 : 9a [ 2] txs
0e43 : 08 [ 3] php
0e44 : ad0101 [ 4] lda $101
cmp_flag 0
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 117
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0e47 : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
trap_ne
0e49 : f002 [ 3]> beq skip0750
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0e4b : 00 [ 7]> brk ; Use BRK to return to the monitor
0e4c : 0e > db test_num
>
0e4d : >skip0750
0e4d : ca [ 2] dex ;00
set_stat $ff
> load_flag $ff
0e4e : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
0e50 : 48 [ 3]> pha ;use stack to load status
0e51 : 28 [ 4]> plp
0e52 : 9a [ 2] txs
0e53 : 08 [ 3] php
0e54 : ad0001 [ 4] lda $100
cmp_flag $ff
0e57 : c9ff [ 2]> cmp #($ff|fao)&m8 ;expected flags + always on bits
trap_ne
0e59 : f002 [ 3]> beq skip0755
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0e5b : 00 [ 7]> brk ; Use BRK to return to the monitor
0e5c : 0e > db test_num
>
0e5d : >skip0755
set_stat 0
> load_flag 0
0e5d : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
0e5f : 48 [ 3]> pha ;use stack to load status
0e60 : 28 [ 4]> plp
0e61 : 9a [ 2] txs
0e62 : 08 [ 3] php
0e63 : ad0001 [ 4] lda $100
cmp_flag 0
0e66 : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
trap_ne
0e68 : f002 [ 3]> beq skip0760
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0e6a : 00 [ 7]> brk ; Use BRK to return to the monitor
0e6b : 0e > db test_num
>
0e6c : >skip0760
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 118
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0e6c : ca [ 2] dex ;ff
set_stat $ff
> load_flag $ff
0e6d : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
0e6f : 48 [ 3]> pha ;use stack to load status
0e70 : 28 [ 4]> plp
0e71 : 9a [ 2] txs
0e72 : 08 [ 3] php
0e73 : adff01 [ 4] lda $1ff
cmp_flag $ff
0e76 : c9ff [ 2]> cmp #($ff|fao)&m8 ;expected flags + always on bits
trap_ne
0e78 : f002 [ 3]> beq skip0765
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0e7a : 00 [ 7]> brk ; Use BRK to return to the monitor
0e7b : 0e > db test_num
>
0e7c : >skip0765
set_stat 0
> load_flag 0
0e7c : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
0e7e : 48 [ 3]> pha ;use stack to load status
0e7f : 28 [ 4]> plp
0e80 : 9a [ 2] txs
0e81 : 08 [ 3] php
0e82 : adff01 [ 4] lda $1ff
cmp_flag 0
0e85 : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
0e87 : a201 [ 2] ldx #1
0e89 : 9a [ 2] txs ;sp=01
set_stat $ff
> load_flag $ff
0e8a : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
0e8c : 48 [ 3]> pha ;use stack to load status
0e8d : 28 [ 4]> plp
0e8e : ba [ 2] tsx ;clears Z, N
0e8f : 08 [ 3] php ;sp=00
0e90 : e001 [ 2] cpx #1
trap_ne
0e92 : f002 [ 3]> beq skip0772
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0e94 : 00 [ 7]> brk ; Use BRK to return to the monitor
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 119
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0e95 : 0e > db test_num
>
0e96 : >skip0772
0e96 : ad0101 [ 4] lda $101
cmp_flag $ff-minus-zero
0e99 : c97d [ 2]> cmp #($ff-minus-zero|fao)&m8 ;expected flags + always on bits
trap_ne
0e9b : f002 [ 3]> beq skip0775
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0e9d : 00 [ 7]> brk ; Use BRK to return to the monitor
0e9e : 0e > db test_num
>
0e9f : >skip0775
set_stat $ff
> load_flag $ff
0e9f : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
0ea1 : 48 [ 3]> pha ;use stack to load status
0ea2 : 28 [ 4]> plp
0ea3 : ba [ 2] tsx ;clears N, sets Z
0ea4 : 08 [ 3] php ;sp=ff
0ea5 : e000 [ 2] cpx #0
trap_ne
0ea7 : f002 [ 3]> beq skip0779
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0ea9 : 00 [ 7]> brk ; Use BRK to return to the monitor
0eaa : 0e > db test_num
>
0eab : >skip0779
0eab : ad0001 [ 4] lda $100
cmp_flag $ff-minus
0eae : c97f [ 2]> cmp #($ff-minus|fao)&m8 ;expected flags + always on bits
trap_ne
0eb0 : f002 [ 3]> beq skip0782
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0eb2 : 00 [ 7]> brk ; Use BRK to return to the monitor
0eb3 : 0e > db test_num
>
0eb4 : >skip0782
set_stat $ff
> load_flag $ff
0eb4 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
0eb6 : 48 [ 3]> pha ;use stack to load status
0eb7 : 28 [ 4]> plp
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 120
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0eb8 : ba [ 2] tsx ;clears N, sets Z
0eb9 : 08 [ 3] php ;sp=fe
0eba : e0ff [ 2] cpx #$ff
trap_ne
0ebc : f002 [ 3]> beq skip0786
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0ebe : 00 [ 7]> brk ; Use BRK to return to the monitor
0ebf : 0e > db test_num
>
0ec0 : >skip0786
0ec0 : adff01 [ 4] lda $1ff
cmp_flag $ff-zero
0ec3 : c9fd [ 2]> cmp #($ff-zero|fao)&m8 ;expected flags + always on bits
trap_ne
0ec5 : f002 [ 3]> beq skip0789
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0ec7 : 00 [ 7]> brk ; Use BRK to return to the monitor
0ec8 : 0e > db test_num
>
0ec9 : >skip0789
0ec9 : a201 [ 2] ldx #1
0ecb : 9a [ 2] txs ;sp=01
set_stat 0
> load_flag 0
0ecc : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
0ece : 48 [ 3]> pha ;use stack to load status
0ecf : 28 [ 4]> plp
0ed0 : ba [ 2] tsx ;clears Z, N
0ed1 : 08 [ 3] php ;sp=00
0ed2 : e001 [ 2] cpx #1
trap_ne
0ed4 : f002 [ 3]> beq skip0793
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0ed6 : 00 [ 7]> brk ; Use BRK to return to the monitor
0ed7 : 0e > db test_num
>
0ed8 : >skip0793
0ed8 : ad0101 [ 4] lda $101
cmp_flag 0
0edb : c930 [ 2]> cmp #(0|fao)&m8 ;expected flags + always on bits
trap_ne
0edd : f002 [ 3]> beq skip0796
> trap ;failed equal (zero)
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 121
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>; db $db ; M65C02/M65C02A SToP instruction
0edf : 00 [ 7]> brk ; Use BRK to return to the monitor
0ee0 : 0e > db test_num
>
0ee1 : >skip0796
set_stat 0
> load_flag 0
0ee1 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
0ee3 : 48 [ 3]> pha ;use stack to load status
0ee4 : 28 [ 4]> plp
0ee5 : ba [ 2] tsx ;clears N, sets Z
0ee6 : 08 [ 3] php ;sp=ff
0ee7 : e000 [ 2] cpx #0
trap_ne
0ee9 : f002 [ 3]> beq skip0800
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0eeb : 00 [ 7]> brk ; Use BRK to return to the monitor
0eec : 0e > db test_num
>
0eed : >skip0800
0eed : ad0001 [ 4] lda $100
cmp_flag zero
0ef0 : c932 [ 2]> cmp #(zero|fao)&m8 ;expected flags + always on bits
trap_ne
0ef2 : f002 [ 3]> beq skip0803
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0ef4 : 00 [ 7]> brk ; Use BRK to return to the monitor
0ef5 : 0e > db test_num
>
0ef6 : >skip0803
set_stat 0
> load_flag 0
0ef6 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
0ef8 : 48 [ 3]> pha ;use stack to load status
0ef9 : 28 [ 4]> plp
0efa : ba [ 2] tsx ;clears N, sets Z
0efb : 08 [ 3] php ;sp=fe
0efc : e0ff [ 2] cpx #$ff
trap_ne
0efe : f002 [ 4]> beq skip0807
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0f00 : 00 [ 7]> brk ; Use BRK to return to the monitor
0f01 : 0e > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 122
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0f02 : >skip0807
0f02 : adff01 [ 4] lda $1ff
cmp_flag minus
0f05 : c9b0 [ 2]> cmp #(minus|fao)&m8 ;expected flags + always on bits
trap_ne
0f07 : f002 [ 3]> beq skip0810
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0f09 : 00 [ 7]> brk ; Use BRK to return to the monitor
0f0a : 0e > db test_num
>
0f0b : >skip0810
0f0b : 68 [ 4] pla ;sp=ff
next_test
0f0c : ad0002 [ 4]> lda test_case ;previous test
0f0f : c90e [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
0f11 : f002 [ 3]> beq skip0813
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0f13 : 00 [ 7]> brk ; Use BRK to return to the monitor
0f14 : 0e > db test_num
>
0f15 : >skip0813
>
000f = >test_num = test_num + 1
0f15 : a90f [ 2]> lda #test_num ;*** this tests' number
0f17 : 8d0002 [ 4]> 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
0f1a : a003 [ 2] ldy #3
0f1c : tldx
set_stat 0
> load_flag 0
0f1c : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
0f1e : 48 [ 3]> pha ;use stack to load status
0f1f : 28 [ 4]> plp
0f20 : b6b9 [ 4] ldx zp1,y
0f22 : 08 [ 3] php ;test stores do not alter flags
0f23 : 8a [ 2] txa
0f24 : 49c3 [ 2] eor #$c3
0f26 : 28 [ 4] plp
0f27 : 990302 [ 5] sta abst,y
0f2a : 08 [ 3] php ;flags after load/store sequence
0f2b : 49c3 [ 2] eor #$c3
0f2d : d90802 [ 4] cmp abs1,y ;test result
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 123
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
trap_ne
0f30 : f002 [ 3]> beq skip0817
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0f32 : 00 [ 7]> brk ; Use BRK to return to the monitor
0f33 : 0f > db test_num
>
0f34 : >skip0817
0f34 : 68 [ 4] pla ;load status
eor_flag 0
0f35 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
0f37 : d90d02 [ 4] cmp fLDx,y ;test flags
trap_ne
0f3a : f002 [ 3]> beq skip0820
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0f3c : 00 [ 7]> brk ; Use BRK to return to the monitor
0f3d : 0f > db test_num
>
0f3e : >skip0820
0f3e : 88 [ 2] dey
0f3f : 10db [ 3] bpl tldx
0f41 : a003 [ 2] ldy #3
0f43 : tldx1
set_stat $ff
> load_flag $ff
0f43 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
0f45 : 48 [ 3]> pha ;use stack to load status
0f46 : 28 [ 4]> plp
0f47 : b6b9 [ 4] ldx zp1,y
0f49 : 08 [ 3] php ;test stores do not alter flags
0f4a : 8a [ 2] txa
0f4b : 49c3 [ 2] eor #$c3
0f4d : 28 [ 4] plp
0f4e : 990302 [ 5] sta abst,y
0f51 : 08 [ 3] php ;flags after load/store sequence
0f52 : 49c3 [ 2] eor #$c3
0f54 : d90802 [ 4] cmp abs1,y ;test result
trap_ne
0f57 : f002 [ 3]> beq skip0824
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0f59 : 00 [ 7]> brk ; Use BRK to return to the monitor
0f5a : 0f > db test_num
>
0f5b : >skip0824
0f5b : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 124
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0f5c : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
0f5e : d90d02 [ 4] cmp fLDx,y ;test flags
trap_ne
0f61 : f002 [ 3]> beq skip0827
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0f63 : 00 [ 7]> brk ; Use BRK to return to the monitor
0f64 : 0f > db test_num
>
0f65 : >skip0827
0f65 : 88 [ 2] dey
0f66 : 10db [ 3] bpl tldx1
0f68 : a003 [ 2] ldy #3
0f6a : tldx2
set_stat 0
> load_flag 0
0f6a : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
0f6c : 48 [ 3]> pha ;use stack to load status
0f6d : 28 [ 4]> plp
0f6e : be0802 [ 4] ldx abs1,y
0f71 : 08 [ 3] php ;test stores do not alter flags
0f72 : 8a [ 2] txa
0f73 : 49c3 [ 2] eor #$c3
0f75 : aa [ 2] tax
0f76 : 28 [ 4] plp
0f77 : 96b2 [ 4] stx zpt,y
0f79 : 08 [ 3] php ;flags after load/store sequence
0f7a : 49c3 [ 2] eor #$c3
0f7c : d9b900 [ 4] cmp zp1,y ;test result
trap_ne
0f7f : f002 [ 3]> beq skip0831
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0f81 : 00 [ 7]> brk ; Use BRK to return to the monitor
0f82 : 0f > db test_num
>
0f83 : >skip0831
0f83 : 68 [ 4] pla ;load status
eor_flag 0
0f84 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
0f86 : d90d02 [ 4] cmp fLDx,y ;test flags
trap_ne
0f89 : f002 [ 3]> beq skip0834
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0f8b : 00 [ 7]> brk ; Use BRK to return to the monitor
0f8c : 0f > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 125
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0f8d : >skip0834
0f8d : 88 [ 2] dey
0f8e : 10da [ 3] bpl tldx2
0f90 : a003 [ 2] ldy #3
0f92 : tldx3
set_stat $ff
> load_flag $ff
0f92 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
0f94 : 48 [ 3]> pha ;use stack to load status
0f95 : 28 [ 4]> plp
0f96 : be0802 [ 4] ldx abs1,y
0f99 : 08 [ 3] php ;test stores do not alter flags
0f9a : 8a [ 2] txa
0f9b : 49c3 [ 2] eor #$c3
0f9d : aa [ 2] tax
0f9e : 28 [ 4] plp
0f9f : 96b2 [ 4] stx zpt,y
0fa1 : 08 [ 3] php ;flags after load/store sequence
0fa2 : 49c3 [ 2] eor #$c3
0fa4 : d9b900 [ 4] cmp zp1,y ;test result
trap_ne
0fa7 : f002 [ 3]> beq skip0838
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0fa9 : 00 [ 7]> brk ; Use BRK to return to the monitor
0faa : 0f > db test_num
>
0fab : >skip0838
0fab : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
0fac : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
0fae : d90d02 [ 4] cmp fLDx,y ;test flags
trap_ne
0fb1 : f002 [ 3]> beq skip0841
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0fb3 : 00 [ 7]> brk ; Use BRK to return to the monitor
0fb4 : 0f > db test_num
>
0fb5 : >skip0841
0fb5 : 88 [ 2] dey
0fb6 : 10da [ 3] bpl tldx3
0fb8 : a003 [ 2] ldy #3 ;testing store result
0fba : a200 [ 2] ldx #0
0fbc : b9b200 [ 4] tstx lda zpt,y
0fbf : 49c3 [ 2] eor #$c3
0fc1 : d9b900 [ 4] cmp zp1,y
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 126
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
trap_ne ;store to zp data
0fc4 : f002 [ 3]> beq skip0843
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0fc6 : 00 [ 7]> brk ; Use BRK to return to the monitor
0fc7 : 0f > db test_num
>
0fc8 : >skip0843
0fc8 : 96b2 [ 4] stx zpt,y ;clear
0fca : b90302 [ 4] lda abst,y
0fcd : 49c3 [ 2] eor #$c3
0fcf : d90802 [ 4] cmp abs1,y
trap_ne ;store to abs data
0fd2 : f002 [ 3]> beq skip0845
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0fd4 : 00 [ 7]> brk ; Use BRK to return to the monitor
0fd5 : 0f > db test_num
>
0fd6 : >skip0845
0fd6 : 8a [ 2] txa
0fd7 : 990302 [ 5] sta abst,y ;clear
0fda : 88 [ 2] dey
0fdb : 10df [ 3] bpl tstx
next_test
0fdd : ad0002 [ 4]> lda test_case ;previous test
0fe0 : c90f [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
0fe2 : f002 [ 3]> beq skip0848
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
0fe4 : 00 [ 7]> brk ; Use BRK to return to the monitor
0fe5 : 0f > db test_num
>
0fe6 : >skip0848
>
0010 = >test_num = test_num + 1
0fe6 : a910 [ 2]> lda #test_num ;*** this tests' number
0fe8 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; indexed wraparound test (only zp should wrap)
0feb : a0fd [ 2] ldy #3+$fa
0fed : b6bf [ 4] tldx4 ldx zp1-$fa&$ff,y ;wrap on indexed zp
0fef : 8a [ 2] txa
0ff0 : 990901 [ 5] sta abst-$fa,y ;no STX abs,y!
0ff3 : 88 [ 2] dey
0ff4 : c0fa [ 2] cpy #$fa
0ff6 : b0f5 [ 3] bcs tldx4
0ff8 : a0fd [ 2] ldy #3+$fa
0ffa : be0e01 [ 4] tldx5 ldx abs1-$fa,y ;no wrap on indexed abs
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 127
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
0ffd : 96b8 [ 4] stx zpt-$fa&$ff,y
0fff : 88 [ 2] dey
1000 : c0fa [ 2] cpy #$fa
1002 : b0f6 [ 4] bcs tldx5
1004 : a003 [ 2] ldy #3 ;testing wraparound result
1006 : a200 [ 2] ldx #0
1008 : b9b200 [ 4] tstx1 lda zpt,y
100b : d9b900 [ 4] cmp zp1,y
trap_ne ;store to zp data
100e : f002 [ 3]> beq skip0850
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1010 : 00 [ 7]> brk ; Use BRK to return to the monitor
1011 : 10 > db test_num
>
1012 : >skip0850
1012 : 96b2 [ 4] stx zpt,y ;clear
1014 : b90302 [ 4] lda abst,y
1017 : d90802 [ 4] cmp abs1,y
trap_ne ;store to abs data
101a : f002 [ 3]> beq skip0852
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
101c : 00 [ 7]> brk ; Use BRK to return to the monitor
101d : 10 > db test_num
>
101e : >skip0852
101e : 8a [ 2] txa
101f : 990302 [ 5] sta abst,y ;clear
1022 : 88 [ 2] dey
1023 : 10e3 [ 3] bpl tstx1
next_test
1025 : ad0002 [ 4]> lda test_case ;previous test
1028 : c910 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
102a : f002 [ 3]> beq skip0855
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
102c : 00 [ 7]> brk ; Use BRK to return to the monitor
102d : 10 > db test_num
>
102e : >skip0855
>
0011 = >test_num = test_num + 1
102e : a911 [ 2]> lda #test_num ;*** this tests' number
1030 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; LDY / STY - zp,x / abs,x
1033 : a203 [ 2] ldx #3
1035 : tldy
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 128
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
set_stat 0
> load_flag 0
1035 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1037 : 48 [ 3]> pha ;use stack to load status
1038 : 28 [ 4]> plp
1039 : b4b9 [ 4] ldy zp1,x
103b : 08 [ 3] php ;test stores do not alter flags
103c : 98 [ 2] tya
103d : 49c3 [ 2] eor #$c3
103f : 28 [ 4] plp
1040 : 9d0302 [ 5] sta abst,x
1043 : 08 [ 3] php ;flags after load/store sequence
1044 : 49c3 [ 2] eor #$c3
1046 : dd0802 [ 4] cmp abs1,x ;test result
trap_ne
1049 : f002 [ 3]> beq skip0859
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
104b : 00 [ 7]> brk ; Use BRK to return to the monitor
104c : 11 > db test_num
>
104d : >skip0859
104d : 68 [ 4] pla ;load status
eor_flag 0
104e : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1050 : dd0d02 [ 4] cmp fLDx,x ;test flags
trap_ne
1053 : f002 [ 3]> beq skip0862
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1055 : 00 [ 7]> brk ; Use BRK to return to the monitor
1056 : 11 > db test_num
>
1057 : >skip0862
1057 : ca [ 2] dex
1058 : 10db [ 3] bpl tldy
105a : a203 [ 2] ldx #3
105c : tldy1
set_stat $ff
> load_flag $ff
105c : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
105e : 48 [ 3]> pha ;use stack to load status
105f : 28 [ 4]> plp
1060 : b4b9 [ 4] ldy zp1,x
1062 : 08 [ 3] php ;test stores do not alter flags
1063 : 98 [ 2] tya
1064 : 49c3 [ 2] eor #$c3
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 129
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1066 : 28 [ 4] plp
1067 : 9d0302 [ 5] sta abst,x
106a : 08 [ 3] php ;flags after load/store sequence
106b : 49c3 [ 2] eor #$c3
106d : dd0802 [ 4] cmp abs1,x ;test result
trap_ne
1070 : f002 [ 3]> beq skip0866
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1072 : 00 [ 7]> brk ; Use BRK to return to the monitor
1073 : 11 > db test_num
>
1074 : >skip0866
1074 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1075 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1077 : dd0d02 [ 4] cmp fLDx,x ;test flags
trap_ne
107a : f002 [ 3]> beq skip0869
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
107c : 00 [ 7]> brk ; Use BRK to return to the monitor
107d : 11 > db test_num
>
107e : >skip0869
107e : ca [ 2] dex
107f : 10db [ 3] bpl tldy1
1081 : a203 [ 2] ldx #3
1083 : tldy2
set_stat 0
> load_flag 0
1083 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1085 : 48 [ 3]> pha ;use stack to load status
1086 : 28 [ 4]> plp
1087 : bc0802 [ 4] ldy abs1,x
108a : 08 [ 3] php ;test stores do not alter flags
108b : 98 [ 2] tya
108c : 49c3 [ 2] eor #$c3
108e : a8 [ 2] tay
108f : 28 [ 4] plp
1090 : 94b2 [ 4] sty zpt,x
1092 : 08 [ 3] php ;flags after load/store sequence
1093 : 49c3 [ 2] eor #$c3
1095 : d5b9 [ 4] cmp zp1,x ;test result
trap_ne
1097 : f002 [ 3]> beq skip0873
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1099 : 00 [ 7]> brk ; Use BRK to return to the monitor
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 130
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
109a : 11 > db test_num
>
109b : >skip0873
109b : 68 [ 4] pla ;load status
eor_flag 0
109c : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
109e : dd0d02 [ 4] cmp fLDx,x ;test flags
trap_ne
10a1 : f002 [ 3]> beq skip0876
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
10a3 : 00 [ 7]> brk ; Use BRK to return to the monitor
10a4 : 11 > db test_num
>
10a5 : >skip0876
10a5 : ca [ 2] dex
10a6 : 10db [ 3] bpl tldy2
10a8 : a203 [ 2] ldx #3
10aa : tldy3
set_stat $ff
> load_flag $ff
10aa : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
10ac : 48 [ 3]> pha ;use stack to load status
10ad : 28 [ 4]> plp
10ae : bc0802 [ 4] ldy abs1,x
10b1 : 08 [ 3] php ;test stores do not alter flags
10b2 : 98 [ 2] tya
10b3 : 49c3 [ 2] eor #$c3
10b5 : a8 [ 2] tay
10b6 : 28 [ 4] plp
10b7 : 94b2 [ 4] sty zpt,x
10b9 : 08 [ 3] php ;flags after load/store sequence
10ba : 49c3 [ 2] eor #$c3
10bc : d5b9 [ 4] cmp zp1,x ;test result
trap_ne
10be : f002 [ 3]> beq skip0880
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
10c0 : 00 [ 7]> brk ; Use BRK to return to the monitor
10c1 : 11 > db test_num
>
10c2 : >skip0880
10c2 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
10c3 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
10c5 : dd0d02 [ 4] cmp fLDx,x ;test flags
trap_ne
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 131
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
10c8 : f002 [ 3]> beq skip0883
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
10ca : 00 [ 7]> brk ; Use BRK to return to the monitor
10cb : 11 > db test_num
>
10cc : >skip0883
10cc : ca [ 2] dex
10cd : 10db [ 3] bpl tldy3
10cf : a203 [ 2] ldx #3 ;testing store result
10d1 : a000 [ 2] ldy #0
10d3 : b5b2 [ 4] tsty lda zpt,x
10d5 : 49c3 [ 2] eor #$c3
10d7 : d5b9 [ 4] cmp zp1,x
trap_ne ;store to zp,x data
10d9 : f002 [ 3]> beq skip0885
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
10db : 00 [ 7]> brk ; Use BRK to return to the monitor
10dc : 11 > db test_num
>
10dd : >skip0885
10dd : 94b2 [ 4] sty zpt,x ;clear
10df : bd0302 [ 4] lda abst,x
10e2 : 49c3 [ 2] eor #$c3
10e4 : dd0802 [ 4] cmp abs1,x
trap_ne ;store to abs,x data
10e7 : f002 [ 3]> beq skip0887
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
10e9 : 00 [ 7]> brk ; Use BRK to return to the monitor
10ea : 11 > db test_num
>
10eb : >skip0887
10eb : 8a [ 2] txa
10ec : 9d0302 [ 5] sta abst,x ;clear
10ef : ca [ 2] dex
10f0 : 10e1 [ 3] bpl tsty
next_test
10f2 : ad0002 [ 4]> lda test_case ;previous test
10f5 : c911 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
10f7 : f002 [ 3]> beq skip0890
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
10f9 : 00 [ 7]> brk ; Use BRK to return to the monitor
10fa : 11 > db test_num
>
10fb : >skip0890
>
0012 = >test_num = test_num + 1
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 132
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
10fb : a912 [ 2]> lda #test_num ;*** this tests' number
10fd : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; indexed wraparound test (only zp should wrap)
1100 : a2fd [ 2] ldx #3+$fa
1102 : b4bf [ 4] tldy4 ldy zp1-$fa&$ff,x ;wrap on indexed zp
1104 : 98 [ 2] tya
1105 : 9d0901 [ 5] sta abst-$fa,x ;no STX abs,x!
1108 : ca [ 2] dex
1109 : e0fa [ 2] cpx #$fa
110b : b0f5 [ 3] bcs tldy4
110d : a2fd [ 2] ldx #3+$fa
110f : bc0e01 [ 4] tldy5 ldy abs1-$fa,x ;no wrap on indexed abs
1112 : 94b8 [ 4] sty zpt-$fa&$ff,x
1114 : ca [ 2] dex
1115 : e0fa [ 2] cpx #$fa
1117 : b0f6 [ 3] bcs tldy5
1119 : a203 [ 2] ldx #3 ;testing wraparound result
111b : a000 [ 2] ldy #0
111d : b5b2 [ 4] tsty1 lda zpt,x
111f : d5b9 [ 4] cmp zp1,x
trap_ne ;store to zp,x data
1121 : f002 [ 3]> beq skip0892
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1123 : 00 [ 7]> brk ; Use BRK to return to the monitor
1124 : 12 > db test_num
>
1125 : >skip0892
1125 : 94b2 [ 4] sty zpt,x ;clear
1127 : bd0302 [ 4] lda abst,x
112a : dd0802 [ 4] cmp abs1,x
trap_ne ;store to abs,x data
112d : f002 [ 3]> beq skip0894
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
112f : 00 [ 7]> brk ; Use BRK to return to the monitor
1130 : 12 > db test_num
>
1131 : >skip0894
1131 : 8a [ 2] txa
1132 : 9d0302 [ 5] sta abst,x ;clear
1135 : ca [ 2] dex
1136 : 10e5 [ 3] bpl tsty1
next_test
1138 : ad0002 [ 4]> lda test_case ;previous test
113b : c912 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
113d : f002 [ 3]> beq skip0897
> trap ;failed equal (zero)
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 133
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>; db $db ; M65C02/M65C02A SToP instruction
113f : 00 [ 7]> brk ; Use BRK to return to the monitor
1140 : 12 > db test_num
>
1141 : >skip0897
>
0013 = >test_num = test_num + 1
1141 : a913 [ 2]> lda #test_num ;*** this tests' number
1143 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; LDX / STX - zp / abs / #
set_stat 0
> load_flag 0
1146 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1148 : 48 [ 3]> pha ;use stack to load status
1149 : 28 [ 4]> plp
114a : a6b9 [ 3] ldx zp1
114c : 08 [ 3] php ;test stores do not alter flags
114d : 8a [ 2] txa
114e : 49c3 [ 2] eor #$c3
1150 : aa [ 2] tax
1151 : 28 [ 4] plp
1152 : 8e0302 [ 4] stx abst
1155 : 08 [ 3] php ;flags after load/store sequence
1156 : 49c3 [ 2] eor #$c3
1158 : aa [ 2] tax
1159 : e0c3 [ 2] cpx #$c3 ;test result
trap_ne
115b : f002 [ 3]> beq skip0901
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
115d : 00 [ 7]> brk ; Use BRK to return to the monitor
115e : 13 > db test_num
>
115f : >skip0901
115f : 68 [ 4] pla ;load status
eor_flag 0
1160 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1162 : cd0d02 [ 4] cmp fLDx ;test flags
trap_ne
1165 : f002 [ 3]> beq skip0904
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1167 : 00 [ 7]> brk ; Use BRK to return to the monitor
1168 : 13 > db test_num
>
1169 : >skip0904
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 134
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
set_stat 0
> load_flag 0
1169 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
116b : 48 [ 3]> pha ;use stack to load status
116c : 28 [ 4]> plp
116d : a6ba [ 3] ldx zp1+1
116f : 08 [ 3] php ;test stores do not alter flags
1170 : 8a [ 2] txa
1171 : 49c3 [ 2] eor #$c3
1173 : aa [ 2] tax
1174 : 28 [ 4] plp
1175 : 8e0402 [ 4] stx abst+1
1178 : 08 [ 3] php ;flags after load/store sequence
1179 : 49c3 [ 2] eor #$c3
117b : aa [ 2] tax
117c : e082 [ 2] cpx #$82 ;test result
trap_ne
117e : f002 [ 3]> beq skip0908
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1180 : 00 [ 7]> brk ; Use BRK to return to the monitor
1181 : 13 > db test_num
>
1182 : >skip0908
1182 : 68 [ 4] pla ;load status
eor_flag 0
1183 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1185 : cd0e02 [ 4] cmp fLDx+1 ;test flags
trap_ne
1188 : f002 [ 3]> beq skip0911
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
118a : 00 [ 7]> brk ; Use BRK to return to the monitor
118b : 13 > db test_num
>
118c : >skip0911
set_stat 0
> load_flag 0
118c : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
118e : 48 [ 3]> pha ;use stack to load status
118f : 28 [ 4]> plp
1190 : a6bb [ 3] ldx zp1+2
1192 : 08 [ 3] php ;test stores do not alter flags
1193 : 8a [ 2] txa
1194 : 49c3 [ 2] eor #$c3
1196 : aa [ 2] tax
1197 : 28 [ 4] plp
1198 : 8e0502 [ 4] stx abst+2
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 135
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
119b : 08 [ 3] php ;flags after load/store sequence
119c : 49c3 [ 2] eor #$c3
119e : aa [ 2] tax
119f : e041 [ 2] cpx #$41 ;test result
trap_ne
11a1 : f002 [ 3]> beq skip0915
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
11a3 : 00 [ 7]> brk ; Use BRK to return to the monitor
11a4 : 13 > db test_num
>
11a5 : >skip0915
11a5 : 68 [ 4] pla ;load status
eor_flag 0
11a6 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
11a8 : cd0f02 [ 4] cmp fLDx+2 ;test flags
trap_ne
11ab : f002 [ 3]> beq skip0918
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
11ad : 00 [ 7]> brk ; Use BRK to return to the monitor
11ae : 13 > db test_num
>
11af : >skip0918
set_stat 0
> load_flag 0
11af : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
11b1 : 48 [ 3]> pha ;use stack to load status
11b2 : 28 [ 4]> plp
11b3 : a6bc [ 3] ldx zp1+3
11b5 : 08 [ 3] php ;test stores do not alter flags
11b6 : 8a [ 2] txa
11b7 : 49c3 [ 2] eor #$c3
11b9 : aa [ 2] tax
11ba : 28 [ 4] plp
11bb : 8e0602 [ 4] stx abst+3
11be : 08 [ 3] php ;flags after load/store sequence
11bf : 49c3 [ 2] eor #$c3
11c1 : aa [ 2] tax
11c2 : e000 [ 2] cpx #0 ;test result
trap_ne
11c4 : f002 [ 3]> beq skip0922
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
11c6 : 00 [ 7]> brk ; Use BRK to return to the monitor
11c7 : 13 > db test_num
>
11c8 : >skip0922
11c8 : 68 [ 4] pla ;load status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 136
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
eor_flag 0
11c9 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
11cb : cd1002 [ 4] cmp fLDx+3 ;test flags
trap_ne
11ce : f002 [ 3]> beq skip0925
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
11d0 : 00 [ 7]> brk ; Use BRK to return to the monitor
11d1 : 13 > db test_num
>
11d2 : >skip0925
set_stat $ff
> load_flag $ff
11d2 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
11d4 : 48 [ 3]> pha ;use stack to load status
11d5 : 28 [ 4]> plp
11d6 : a6b9 [ 3] ldx zp1
11d8 : 08 [ 3] php ;test stores do not alter flags
11d9 : 8a [ 2] txa
11da : 49c3 [ 2] eor #$c3
11dc : aa [ 2] tax
11dd : 28 [ 4] plp
11de : 8e0302 [ 4] stx abst
11e1 : 08 [ 3] php ;flags after load/store sequence
11e2 : 49c3 [ 2] eor #$c3
11e4 : aa [ 2] tax
11e5 : e0c3 [ 2] cpx #$c3 ;test result
trap_ne ;
11e7 : f002 [ 3]> beq skip0929
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
11e9 : 00 [ 7]> brk ; Use BRK to return to the monitor
11ea : 13 > db test_num
>
11eb : >skip0929
11eb : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
11ec : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
11ee : cd0d02 [ 4] cmp fLDx ;test flags
trap_ne
11f1 : f002 [ 3]> beq skip0932
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
11f3 : 00 [ 7]> brk ; Use BRK to return to the monitor
11f4 : 13 > db test_num
>
11f5 : >skip0932
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 137
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
set_stat $ff
> load_flag $ff
11f5 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
11f7 : 48 [ 3]> pha ;use stack to load status
11f8 : 28 [ 4]> plp
11f9 : a6ba [ 3] ldx zp1+1
11fb : 08 [ 3] php ;test stores do not alter flags
11fc : 8a [ 2] txa
11fd : 49c3 [ 2] eor #$c3
11ff : aa [ 2] tax
1200 : 28 [ 4] plp
1201 : 8e0402 [ 4] stx abst+1
1204 : 08 [ 3] php ;flags after load/store sequence
1205 : 49c3 [ 2] eor #$c3
1207 : aa [ 2] tax
1208 : e082 [ 2] cpx #$82 ;test result
trap_ne
120a : f002 [ 3]> beq skip0936
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
120c : 00 [ 7]> brk ; Use BRK to return to the monitor
120d : 13 > db test_num
>
120e : >skip0936
120e : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
120f : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1211 : cd0e02 [ 4] cmp fLDx+1 ;test flags
trap_ne
1214 : f002 [ 3]> beq skip0939
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1216 : 00 [ 7]> brk ; Use BRK to return to the monitor
1217 : 13 > db test_num
>
1218 : >skip0939
set_stat $ff
> load_flag $ff
1218 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
121a : 48 [ 3]> pha ;use stack to load status
121b : 28 [ 4]> plp
121c : a6bb [ 3] ldx zp1+2
121e : 08 [ 3] php ;test stores do not alter flags
121f : 8a [ 2] txa
1220 : 49c3 [ 2] eor #$c3
1222 : aa [ 2] tax
1223 : 28 [ 4] plp
1224 : 8e0502 [ 4] stx abst+2
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 138
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1227 : 08 [ 3] php ;flags after load/store sequence
1228 : 49c3 [ 2] eor #$c3
122a : aa [ 2] tax
122b : e041 [ 2] cpx #$41 ;test result
trap_ne ;
122d : f002 [ 3]> beq skip0943
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
122f : 00 [ 7]> brk ; Use BRK to return to the monitor
1230 : 13 > db test_num
>
1231 : >skip0943
1231 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1232 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1234 : cd0f02 [ 4] cmp fLDx+2 ;test flags
trap_ne
1237 : f002 [ 3]> beq skip0946
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1239 : 00 [ 7]> brk ; Use BRK to return to the monitor
123a : 13 > db test_num
>
123b : >skip0946
set_stat $ff
> load_flag $ff
123b : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
123d : 48 [ 3]> pha ;use stack to load status
123e : 28 [ 4]> plp
123f : a6bc [ 3] ldx zp1+3
1241 : 08 [ 3] php ;test stores do not alter flags
1242 : 8a [ 2] txa
1243 : 49c3 [ 2] eor #$c3
1245 : aa [ 2] tax
1246 : 28 [ 4] plp
1247 : 8e0602 [ 4] stx abst+3
124a : 08 [ 3] php ;flags after load/store sequence
124b : 49c3 [ 2] eor #$c3
124d : aa [ 2] tax
124e : e000 [ 2] cpx #0 ;test result
trap_ne
1250 : f002 [ 3]> beq skip0950
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1252 : 00 [ 7]> brk ; Use BRK to return to the monitor
1253 : 13 > db test_num
>
1254 : >skip0950
1254 : 68 [ 4] pla ;load status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 139
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
eor_flag lo~fnz ;mask bits not altered
1255 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1257 : cd1002 [ 4] cmp fLDx+3 ;test flags
trap_ne
125a : f002 [ 3]> beq skip0953
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
125c : 00 [ 7]> brk ; Use BRK to return to the monitor
125d : 13 > db test_num
>
125e : >skip0953
set_stat 0
> load_flag 0
125e : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1260 : 48 [ 3]> pha ;use stack to load status
1261 : 28 [ 4]> plp
1262 : ae0802 [ 4] ldx abs1
1265 : 08 [ 3] php ;test stores do not alter flags
1266 : 8a [ 2] txa
1267 : 49c3 [ 2] eor #$c3
1269 : aa [ 2] tax
126a : 28 [ 4] plp
126b : 86b2 [ 3] stx zpt
126d : 08 [ 3] php ;flags after load/store sequence
126e : 49c3 [ 2] eor #$c3
1270 : c5b9 [ 3] cmp zp1 ;test result
trap_ne
1272 : f002 [ 3]> beq skip0957
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1274 : 00 [ 7]> brk ; Use BRK to return to the monitor
1275 : 13 > db test_num
>
1276 : >skip0957
1276 : 68 [ 4] pla ;load status
eor_flag 0
1277 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1279 : cd0d02 [ 4] cmp fLDx ;test flags
trap_ne
127c : f002 [ 3]> beq skip0960
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
127e : 00 [ 7]> brk ; Use BRK to return to the monitor
127f : 13 > db test_num
>
1280 : >skip0960
set_stat 0
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 140
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> load_flag 0
1280 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1282 : 48 [ 3]> pha ;use stack to load status
1283 : 28 [ 4]> plp
1284 : ae0902 [ 4] ldx abs1+1
1287 : 08 [ 3] php ;test stores do not alter flags
1288 : 8a [ 2] txa
1289 : 49c3 [ 2] eor #$c3
128b : aa [ 2] tax
128c : 28 [ 4] plp
128d : 86b3 [ 3] stx zpt+1
128f : 08 [ 3] php ;flags after load/store sequence
1290 : 49c3 [ 2] eor #$c3
1292 : c5ba [ 3] cmp zp1+1 ;test result
trap_ne
1294 : f002 [ 3]> beq skip0964
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1296 : 00 [ 7]> brk ; Use BRK to return to the monitor
1297 : 13 > db test_num
>
1298 : >skip0964
1298 : 68 [ 4] pla ;load status
eor_flag 0
1299 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
129b : cd0e02 [ 4] cmp fLDx+1 ;test flags
trap_ne
129e : f002 [ 3]> beq skip0967
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
12a0 : 00 [ 7]> brk ; Use BRK to return to the monitor
12a1 : 13 > db test_num
>
12a2 : >skip0967
set_stat 0
> load_flag 0
12a2 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
12a4 : 48 [ 3]> pha ;use stack to load status
12a5 : 28 [ 4]> plp
12a6 : ae0a02 [ 4] ldx abs1+2
12a9 : 08 [ 3] php ;test stores do not alter flags
12aa : 8a [ 2] txa
12ab : 49c3 [ 2] eor #$c3
12ad : aa [ 2] tax
12ae : 28 [ 4] plp
12af : 86b4 [ 3] stx zpt+2
12b1 : 08 [ 3] php ;flags after load/store sequence
12b2 : 49c3 [ 2] eor #$c3
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 141
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
12b4 : c5bb [ 3] cmp zp1+2 ;test result
trap_ne
12b6 : f002 [ 3]> beq skip0971
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
12b8 : 00 [ 7]> brk ; Use BRK to return to the monitor
12b9 : 13 > db test_num
>
12ba : >skip0971
12ba : 68 [ 4] pla ;load status
eor_flag 0
12bb : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
12bd : cd0f02 [ 4] cmp fLDx+2 ;test flags
trap_ne
12c0 : f002 [ 3]> beq skip0974
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
12c2 : 00 [ 7]> brk ; Use BRK to return to the monitor
12c3 : 13 > db test_num
>
12c4 : >skip0974
set_stat 0
> load_flag 0
12c4 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
12c6 : 48 [ 3]> pha ;use stack to load status
12c7 : 28 [ 4]> plp
12c8 : ae0b02 [ 4] ldx abs1+3
12cb : 08 [ 3] php ;test stores do not alter flags
12cc : 8a [ 2] txa
12cd : 49c3 [ 2] eor #$c3
12cf : aa [ 2] tax
12d0 : 28 [ 4] plp
12d1 : 86b5 [ 3] stx zpt+3
12d3 : 08 [ 3] php ;flags after load/store sequence
12d4 : 49c3 [ 2] eor #$c3
12d6 : c5bc [ 3] cmp zp1+3 ;test result
trap_ne
12d8 : f002 [ 3]> beq skip0978
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
12da : 00 [ 7]> brk ; Use BRK to return to the monitor
12db : 13 > db test_num
>
12dc : >skip0978
12dc : 68 [ 4] pla ;load status
eor_flag 0
12dd : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
12df : cd1002 [ 4] cmp fLDx+3 ;test flags
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 142
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
trap_ne
12e2 : f002 [ 3]> beq skip0981
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
12e4 : 00 [ 7]> brk ; Use BRK to return to the monitor
12e5 : 13 > db test_num
>
12e6 : >skip0981
set_stat $ff
> load_flag $ff
12e6 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
12e8 : 48 [ 3]> pha ;use stack to load status
12e9 : 28 [ 4]> plp
12ea : ae0802 [ 4] ldx abs1
12ed : 08 [ 3] php ;test stores do not alter flags
12ee : 8a [ 2] txa
12ef : 49c3 [ 2] eor #$c3
12f1 : aa [ 2] tax
12f2 : 28 [ 4] plp
12f3 : 86b2 [ 3] stx zpt
12f5 : 08 [ 3] php ;flags after load/store sequence
12f6 : 49c3 [ 2] eor #$c3
12f8 : aa [ 2] tax
12f9 : e4b9 [ 3] cpx zp1 ;test result
trap_ne
12fb : f002 [ 3]> beq skip0985
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
12fd : 00 [ 7]> brk ; Use BRK to return to the monitor
12fe : 13 > db test_num
>
12ff : >skip0985
12ff : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1300 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1302 : cd0d02 [ 4] cmp fLDx ;test flags
trap_ne
1305 : f002 [ 3]> beq skip0988
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1307 : 00 [ 7]> brk ; Use BRK to return to the monitor
1308 : 13 > db test_num
>
1309 : >skip0988
set_stat $ff
> load_flag $ff
1309 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 143
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
130b : 48 [ 3]> pha ;use stack to load status
130c : 28 [ 4]> plp
130d : ae0902 [ 4] ldx abs1+1
1310 : 08 [ 3] php ;test stores do not alter flags
1311 : 8a [ 2] txa
1312 : 49c3 [ 2] eor #$c3
1314 : aa [ 2] tax
1315 : 28 [ 4] plp
1316 : 86b3 [ 3] stx zpt+1
1318 : 08 [ 3] php ;flags after load/store sequence
1319 : 49c3 [ 2] eor #$c3
131b : aa [ 2] tax
131c : e4ba [ 3] cpx zp1+1 ;test result
trap_ne
131e : f002 [ 3]> beq skip0992
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1320 : 00 [ 7]> brk ; Use BRK to return to the monitor
1321 : 13 > db test_num
>
1322 : >skip0992
1322 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1323 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1325 : cd0e02 [ 4] cmp fLDx+1 ;test flags
trap_ne
1328 : f002 [ 3]> beq skip0995
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
132a : 00 [ 7]> brk ; Use BRK to return to the monitor
132b : 13 > db test_num
>
132c : >skip0995
set_stat $ff
> load_flag $ff
132c : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
132e : 48 [ 3]> pha ;use stack to load status
132f : 28 [ 4]> plp
1330 : ae0a02 [ 4] ldx abs1+2
1333 : 08 [ 3] php ;test stores do not alter flags
1334 : 8a [ 2] txa
1335 : 49c3 [ 2] eor #$c3
1337 : aa [ 2] tax
1338 : 28 [ 4] plp
1339 : 86b4 [ 3] stx zpt+2
133b : 08 [ 3] php ;flags after load/store sequence
133c : 49c3 [ 2] eor #$c3
133e : aa [ 2] tax
133f : e4bb [ 3] cpx zp1+2 ;test result
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 144
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
trap_ne
1341 : f002 [ 3]> beq skip0999
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1343 : 00 [ 7]> brk ; Use BRK to return to the monitor
1344 : 13 > db test_num
>
1345 : >skip0999
1345 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1346 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1348 : cd0f02 [ 4] cmp fLDx+2 ;test flags
trap_ne
134b : f002 [ 3]> beq skip1002
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
134d : 00 [ 7]> brk ; Use BRK to return to the monitor
134e : 13 > db test_num
>
134f : >skip1002
set_stat $ff
> load_flag $ff
134f : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1351 : 48 [ 3]> pha ;use stack to load status
1352 : 28 [ 4]> plp
1353 : ae0b02 [ 4] ldx abs1+3
1356 : 08 [ 3] php ;test stores do not alter flags
1357 : 8a [ 2] txa
1358 : 49c3 [ 2] eor #$c3
135a : aa [ 2] tax
135b : 28 [ 4] plp
135c : 86b5 [ 3] stx zpt+3
135e : 08 [ 3] php ;flags after load/store sequence
135f : 49c3 [ 2] eor #$c3
1361 : aa [ 2] tax
1362 : e4bc [ 3] cpx zp1+3 ;test result
trap_ne
1364 : f002 [ 3]> beq skip1006
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1366 : 00 [ 7]> brk ; Use BRK to return to the monitor
1367 : 13 > db test_num
>
1368 : >skip1006
1368 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1369 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
136b : cd1002 [ 4] cmp fLDx+3 ;test flags
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 145
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
trap_ne
136e : f002 [ 3]> beq skip1009
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1370 : 00 [ 7]> brk ; Use BRK to return to the monitor
1371 : 13 > db test_num
>
1372 : >skip1009
set_stat 0
> load_flag 0
1372 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1374 : 48 [ 3]> pha ;use stack to load status
1375 : 28 [ 4]> plp
1376 : a2c3 [ 2] ldx #$c3
1378 : 08 [ 3] php
1379 : ec0802 [ 4] cpx abs1 ;test result
trap_ne
137c : f002 [ 3]> beq skip1013
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
137e : 00 [ 7]> brk ; Use BRK to return to the monitor
137f : 13 > db test_num
>
1380 : >skip1013
1380 : 68 [ 4] pla ;load status
eor_flag 0
1381 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1383 : cd0d02 [ 4] cmp fLDx ;test flags
trap_ne
1386 : f002 [ 3]> beq skip1016
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1388 : 00 [ 7]> brk ; Use BRK to return to the monitor
1389 : 13 > db test_num
>
138a : >skip1016
set_stat 0
> load_flag 0
138a : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
138c : 48 [ 3]> pha ;use stack to load status
138d : 28 [ 4]> plp
138e : a282 [ 2] ldx #$82
1390 : 08 [ 3] php
1391 : ec0902 [ 4] cpx abs1+1 ;test result
trap_ne
1394 : f002 [ 3]> beq skip1020
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 146
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1396 : 00 [ 7]> brk ; Use BRK to return to the monitor
1397 : 13 > db test_num
>
1398 : >skip1020
1398 : 68 [ 4] pla ;load status
eor_flag 0
1399 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
139b : cd0e02 [ 4] cmp fLDx+1 ;test flags
trap_ne
139e : f002 [ 3]> beq skip1023
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
13a0 : 00 [ 7]> brk ; Use BRK to return to the monitor
13a1 : 13 > db test_num
>
13a2 : >skip1023
set_stat 0
> load_flag 0
13a2 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
13a4 : 48 [ 3]> pha ;use stack to load status
13a5 : 28 [ 4]> plp
13a6 : a241 [ 2] ldx #$41
13a8 : 08 [ 3] php
13a9 : ec0a02 [ 4] cpx abs1+2 ;test result
trap_ne
13ac : f002 [ 3]> beq skip1027
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
13ae : 00 [ 7]> brk ; Use BRK to return to the monitor
13af : 13 > db test_num
>
13b0 : >skip1027
13b0 : 68 [ 4] pla ;load status
eor_flag 0
13b1 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
13b3 : cd0f02 [ 4] cmp fLDx+2 ;test flags
trap_ne
13b6 : f002 [ 3]> beq skip1030
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
13b8 : 00 [ 7]> brk ; Use BRK to return to the monitor
13b9 : 13 > db test_num
>
13ba : >skip1030
set_stat 0
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 147
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> load_flag 0
13ba : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
13bc : 48 [ 3]> pha ;use stack to load status
13bd : 28 [ 4]> plp
13be : a200 [ 2] ldx #0
13c0 : 08 [ 3] php
13c1 : ec0b02 [ 4] cpx abs1+3 ;test result
trap_ne
13c4 : f002 [ 3]> beq skip1034
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
13c6 : 00 [ 7]> brk ; Use BRK to return to the monitor
13c7 : 13 > db test_num
>
13c8 : >skip1034
13c8 : 68 [ 4] pla ;load status
eor_flag 0
13c9 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
13cb : cd1002 [ 4] cmp fLDx+3 ;test flags
trap_ne
13ce : f002 [ 3]> beq skip1037
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
13d0 : 00 [ 7]> brk ; Use BRK to return to the monitor
13d1 : 13 > db test_num
>
13d2 : >skip1037
set_stat $ff
> load_flag $ff
13d2 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
13d4 : 48 [ 3]> pha ;use stack to load status
13d5 : 28 [ 4]> plp
13d6 : a2c3 [ 2] ldx #$c3
13d8 : 08 [ 3] php
13d9 : ec0802 [ 4] cpx abs1 ;test result
trap_ne
13dc : f002 [ 3]> beq skip1041
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
13de : 00 [ 7]> brk ; Use BRK to return to the monitor
13df : 13 > db test_num
>
13e0 : >skip1041
13e0 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
13e1 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 148
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
13e3 : cd0d02 [ 4] cmp fLDx ;test flags
trap_ne
13e6 : f002 [ 3]> beq skip1044
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
13e8 : 00 [ 7]> brk ; Use BRK to return to the monitor
13e9 : 13 > db test_num
>
13ea : >skip1044
set_stat $ff
> load_flag $ff
13ea : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
13ec : 48 [ 3]> pha ;use stack to load status
13ed : 28 [ 4]> plp
13ee : a282 [ 2] ldx #$82
13f0 : 08 [ 3] php
13f1 : ec0902 [ 4] cpx abs1+1 ;test result
trap_ne
13f4 : f002 [ 3]> beq skip1048
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
13f6 : 00 [ 7]> brk ; Use BRK to return to the monitor
13f7 : 13 > db test_num
>
13f8 : >skip1048
13f8 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
13f9 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
13fb : cd0e02 [ 4] cmp fLDx+1 ;test flags
trap_ne
13fe : f002 [ 4]> beq skip1051
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1400 : 00 [ 7]> brk ; Use BRK to return to the monitor
1401 : 13 > db test_num
>
1402 : >skip1051
set_stat $ff
> load_flag $ff
1402 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1404 : 48 [ 3]> pha ;use stack to load status
1405 : 28 [ 4]> plp
1406 : a241 [ 2] ldx #$41
1408 : 08 [ 3] php
1409 : ec0a02 [ 4] cpx abs1+2 ;test result
trap_ne
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 149
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
140c : f002 [ 3]> beq skip1055
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
140e : 00 [ 7]> brk ; Use BRK to return to the monitor
140f : 13 > db test_num
>
1410 : >skip1055
1410 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1411 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1413 : cd0f02 [ 4] cmp fLDx+2 ;test flags
trap_ne
1416 : f002 [ 3]> beq skip1058
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1418 : 00 [ 7]> brk ; Use BRK to return to the monitor
1419 : 13 > db test_num
>
141a : >skip1058
set_stat $ff
> load_flag $ff
141a : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
141c : 48 [ 3]> pha ;use stack to load status
141d : 28 [ 4]> plp
141e : a200 [ 2] ldx #0
1420 : 08 [ 3] php
1421 : ec0b02 [ 4] cpx abs1+3 ;test result
trap_ne
1424 : f002 [ 3]> beq skip1062
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1426 : 00 [ 7]> brk ; Use BRK to return to the monitor
1427 : 13 > db test_num
>
1428 : >skip1062
1428 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1429 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
142b : cd1002 [ 4] cmp fLDx+3 ;test flags
trap_ne
142e : f002 [ 3]> beq skip1065
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1430 : 00 [ 7]> brk ; Use BRK to return to the monitor
1431 : 13 > db test_num
>
1432 : >skip1065
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 150
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1432 : a200 [ 2] ldx #0
1434 : a5b2 [ 3] lda zpt
1436 : 49c3 [ 2] eor #$c3
1438 : c5b9 [ 3] cmp zp1
trap_ne ;store to zp data
143a : f002 [ 3]> beq skip1067
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
143c : 00 [ 7]> brk ; Use BRK to return to the monitor
143d : 13 > db test_num
>
143e : >skip1067
143e : 86b2 [ 3] stx zpt ;clear
1440 : ad0302 [ 4] lda abst
1443 : 49c3 [ 2] eor #$c3
1445 : cd0802 [ 4] cmp abs1
trap_ne ;store to abs data
1448 : f002 [ 3]> beq skip1069
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
144a : 00 [ 7]> brk ; Use BRK to return to the monitor
144b : 13 > db test_num
>
144c : >skip1069
144c : 8e0302 [ 4] stx abst ;clear
144f : a5b3 [ 3] lda zpt+1
1451 : 49c3 [ 2] eor #$c3
1453 : c5ba [ 3] cmp zp1+1
trap_ne ;store to zp data
1455 : f002 [ 3]> beq skip1071
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1457 : 00 [ 7]> brk ; Use BRK to return to the monitor
1458 : 13 > db test_num
>
1459 : >skip1071
1459 : 86b3 [ 3] stx zpt+1 ;clear
145b : ad0402 [ 4] lda abst+1
145e : 49c3 [ 2] eor #$c3
1460 : cd0902 [ 4] cmp abs1+1
trap_ne ;store to abs data
1463 : f002 [ 3]> beq skip1073
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1465 : 00 [ 7]> brk ; Use BRK to return to the monitor
1466 : 13 > db test_num
>
1467 : >skip1073
1467 : 8e0402 [ 4] stx abst+1 ;clear
146a : a5b4 [ 3] lda zpt+2
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 151
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
146c : 49c3 [ 2] eor #$c3
146e : c5bb [ 3] cmp zp1+2
trap_ne ;store to zp data
1470 : f002 [ 3]> beq skip1075
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1472 : 00 [ 7]> brk ; Use BRK to return to the monitor
1473 : 13 > db test_num
>
1474 : >skip1075
1474 : 86b4 [ 3] stx zpt+2 ;clear
1476 : ad0502 [ 4] lda abst+2
1479 : 49c3 [ 2] eor #$c3
147b : cd0a02 [ 4] cmp abs1+2
trap_ne ;store to abs data
147e : f002 [ 3]> beq skip1077
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1480 : 00 [ 7]> brk ; Use BRK to return to the monitor
1481 : 13 > db test_num
>
1482 : >skip1077
1482 : 8e0502 [ 4] stx abst+2 ;clear
1485 : a5b5 [ 3] lda zpt+3
1487 : 49c3 [ 2] eor #$c3
1489 : c5bc [ 3] cmp zp1+3
trap_ne ;store to zp data
148b : f002 [ 3]> beq skip1079
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
148d : 00 [ 7]> brk ; Use BRK to return to the monitor
148e : 13 > db test_num
>
148f : >skip1079
148f : 86b5 [ 3] stx zpt+3 ;clear
1491 : ad0602 [ 4] lda abst+3
1494 : 49c3 [ 2] eor #$c3
1496 : cd0b02 [ 4] cmp abs1+3
trap_ne ;store to abs data
1499 : f002 [ 3]> beq skip1081
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
149b : 00 [ 7]> brk ; Use BRK to return to the monitor
149c : 13 > db test_num
>
149d : >skip1081
149d : 8e0602 [ 4] stx abst+3 ;clear
next_test
14a0 : ad0002 [ 4]> lda test_case ;previous test
14a3 : c913 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 152
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
14a5 : f002 [ 3]> beq skip1084
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
14a7 : 00 [ 7]> brk ; Use BRK to return to the monitor
14a8 : 13 > db test_num
>
14a9 : >skip1084
>
0014 = >test_num = test_num + 1
14a9 : a914 [ 2]> lda #test_num ;*** this tests' number
14ab : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; LDY / STY - zp / abs / #
set_stat 0
> load_flag 0
14ae : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
14b0 : 48 [ 3]> pha ;use stack to load status
14b1 : 28 [ 4]> plp
14b2 : a4b9 [ 3] ldy zp1
14b4 : 08 [ 3] php ;test stores do not alter flags
14b5 : 98 [ 2] tya
14b6 : 49c3 [ 2] eor #$c3
14b8 : a8 [ 2] tay
14b9 : 28 [ 4] plp
14ba : 8c0302 [ 4] sty abst
14bd : 08 [ 3] php ;flags after load/store sequence
14be : 49c3 [ 2] eor #$c3
14c0 : a8 [ 2] tay
14c1 : c0c3 [ 2] cpy #$c3 ;test result
trap_ne
14c3 : f002 [ 3]> beq skip1088
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
14c5 : 00 [ 7]> brk ; Use BRK to return to the monitor
14c6 : 14 > db test_num
>
14c7 : >skip1088
14c7 : 68 [ 4] pla ;load status
eor_flag 0
14c8 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
14ca : cd0d02 [ 4] cmp fLDx ;test flags
trap_ne
14cd : f002 [ 3]> beq skip1091
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
14cf : 00 [ 7]> brk ; Use BRK to return to the monitor
14d0 : 14 > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 153
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
14d1 : >skip1091
set_stat 0
> load_flag 0
14d1 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
14d3 : 48 [ 3]> pha ;use stack to load status
14d4 : 28 [ 4]> plp
14d5 : a4ba [ 3] ldy zp1+1
14d7 : 08 [ 3] php ;test stores do not alter flags
14d8 : 98 [ 2] tya
14d9 : 49c3 [ 2] eor #$c3
14db : a8 [ 2] tay
14dc : 28 [ 4] plp
14dd : 8c0402 [ 4] sty abst+1
14e0 : 08 [ 3] php ;flags after load/store sequence
14e1 : 49c3 [ 2] eor #$c3
14e3 : a8 [ 2] tay
14e4 : c082 [ 2] cpy #$82 ;test result
trap_ne
14e6 : f002 [ 3]> beq skip1095
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
14e8 : 00 [ 7]> brk ; Use BRK to return to the monitor
14e9 : 14 > db test_num
>
14ea : >skip1095
14ea : 68 [ 4] pla ;load status
eor_flag 0
14eb : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
14ed : cd0e02 [ 4] cmp fLDx+1 ;test flags
trap_ne
14f0 : f002 [ 3]> beq skip1098
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
14f2 : 00 [ 7]> brk ; Use BRK to return to the monitor
14f3 : 14 > db test_num
>
14f4 : >skip1098
set_stat 0
> load_flag 0
14f4 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
14f6 : 48 [ 3]> pha ;use stack to load status
14f7 : 28 [ 4]> plp
14f8 : a4bb [ 3] ldy zp1+2
14fa : 08 [ 3] php ;test stores do not alter flags
14fb : 98 [ 2] tya
14fc : 49c3 [ 2] eor #$c3
14fe : a8 [ 2] tay
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 154
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
14ff : 28 [ 4] plp
1500 : 8c0502 [ 4] sty abst+2
1503 : 08 [ 3] php ;flags after load/store sequence
1504 : 49c3 [ 2] eor #$c3
1506 : a8 [ 2] tay
1507 : c041 [ 2] cpy #$41 ;test result
trap_ne
1509 : f002 [ 3]> beq skip1102
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
150b : 00 [ 7]> brk ; Use BRK to return to the monitor
150c : 14 > db test_num
>
150d : >skip1102
150d : 68 [ 4] pla ;load status
eor_flag 0
150e : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1510 : cd0f02 [ 4] cmp fLDx+2 ;test flags
trap_ne
1513 : f002 [ 3]> beq skip1105
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1515 : 00 [ 7]> brk ; Use BRK to return to the monitor
1516 : 14 > db test_num
>
1517 : >skip1105
set_stat 0
> load_flag 0
1517 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1519 : 48 [ 3]> pha ;use stack to load status
151a : 28 [ 4]> plp
151b : a4bc [ 3] ldy zp1+3
151d : 08 [ 3] php ;test stores do not alter flags
151e : 98 [ 2] tya
151f : 49c3 [ 2] eor #$c3
1521 : a8 [ 2] tay
1522 : 28 [ 4] plp
1523 : 8c0602 [ 4] sty abst+3
1526 : 08 [ 3] php ;flags after load/store sequence
1527 : 49c3 [ 2] eor #$c3
1529 : a8 [ 2] tay
152a : c000 [ 2] cpy #0 ;test result
trap_ne
152c : f002 [ 3]> beq skip1109
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
152e : 00 [ 7]> brk ; Use BRK to return to the monitor
152f : 14 > db test_num
>
1530 : >skip1109
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 155
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1530 : 68 [ 4] pla ;load status
eor_flag 0
1531 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1533 : cd1002 [ 4] cmp fLDx+3 ;test flags
trap_ne
1536 : f002 [ 3]> beq skip1112
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1538 : 00 [ 7]> brk ; Use BRK to return to the monitor
1539 : 14 > db test_num
>
153a : >skip1112
set_stat $ff
> load_flag $ff
153a : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
153c : 48 [ 3]> pha ;use stack to load status
153d : 28 [ 4]> plp
153e : a4b9 [ 3] ldy zp1
1540 : 08 [ 3] php ;test stores do not alter flags
1541 : 98 [ 2] tya
1542 : 49c3 [ 2] eor #$c3
1544 : a8 [ 2] tay
1545 : 28 [ 4] plp
1546 : 8c0302 [ 4] sty abst
1549 : 08 [ 3] php ;flags after load/store sequence
154a : 49c3 [ 2] eor #$c3
154c : a8 [ 2] tay
154d : c0c3 [ 2] cpy #$c3 ;test result
trap_ne
154f : f002 [ 3]> beq skip1116
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1551 : 00 [ 7]> brk ; Use BRK to return to the monitor
1552 : 14 > db test_num
>
1553 : >skip1116
1553 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1554 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1556 : cd0d02 [ 4] cmp fLDx ;test flags
trap_ne
1559 : f002 [ 3]> beq skip1119
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
155b : 00 [ 7]> brk ; Use BRK to return to the monitor
155c : 14 > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 156
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
155d : >skip1119
set_stat $ff
> load_flag $ff
155d : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
155f : 48 [ 3]> pha ;use stack to load status
1560 : 28 [ 4]> plp
1561 : a4ba [ 3] ldy zp1+1
1563 : 08 [ 3] php ;test stores do not alter flags
1564 : 98 [ 2] tya
1565 : 49c3 [ 2] eor #$c3
1567 : a8 [ 2] tay
1568 : 28 [ 4] plp
1569 : 8c0402 [ 4] sty abst+1
156c : 08 [ 3] php ;flags after load/store sequence
156d : 49c3 [ 2] eor #$c3
156f : a8 [ 2] tay
1570 : c082 [ 2] cpy #$82 ;test result
trap_ne
1572 : f002 [ 3]> beq skip1123
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1574 : 00 [ 7]> brk ; Use BRK to return to the monitor
1575 : 14 > db test_num
>
1576 : >skip1123
1576 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1577 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1579 : cd0e02 [ 4] cmp fLDx+1 ;test flags
trap_ne
157c : f002 [ 3]> beq skip1126
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
157e : 00 [ 7]> brk ; Use BRK to return to the monitor
157f : 14 > db test_num
>
1580 : >skip1126
set_stat $ff
> load_flag $ff
1580 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1582 : 48 [ 3]> pha ;use stack to load status
1583 : 28 [ 4]> plp
1584 : a4bb [ 3] ldy zp1+2
1586 : 08 [ 3] php ;test stores do not alter flags
1587 : 98 [ 2] tya
1588 : 49c3 [ 2] eor #$c3
158a : a8 [ 2] tay
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 157
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
158b : 28 [ 4] plp
158c : 8c0502 [ 4] sty abst+2
158f : 08 [ 3] php ;flags after load/store sequence
1590 : 49c3 [ 2] eor #$c3
1592 : a8 [ 2] tay
1593 : c041 [ 2] cpy #$41 ;test result
trap_ne
1595 : f002 [ 3]> beq skip1130
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1597 : 00 [ 7]> brk ; Use BRK to return to the monitor
1598 : 14 > db test_num
>
1599 : >skip1130
1599 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
159a : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
159c : cd0f02 [ 4] cmp fLDx+2 ;test flags
trap_ne
159f : f002 [ 3]> beq skip1133
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
15a1 : 00 [ 7]> brk ; Use BRK to return to the monitor
15a2 : 14 > db test_num
>
15a3 : >skip1133
set_stat $ff
> load_flag $ff
15a3 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
15a5 : 48 [ 3]> pha ;use stack to load status
15a6 : 28 [ 4]> plp
15a7 : a4bc [ 3] ldy zp1+3
15a9 : 08 [ 3] php ;test stores do not alter flags
15aa : 98 [ 2] tya
15ab : 49c3 [ 2] eor #$c3
15ad : a8 [ 2] tay
15ae : 28 [ 4] plp
15af : 8c0602 [ 4] sty abst+3
15b2 : 08 [ 3] php ;flags after load/store sequence
15b3 : 49c3 [ 2] eor #$c3
15b5 : a8 [ 2] tay
15b6 : c000 [ 2] cpy #0 ;test result
trap_ne
15b8 : f002 [ 3]> beq skip1137
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
15ba : 00 [ 7]> brk ; Use BRK to return to the monitor
15bb : 14 > db test_num
>
15bc : >skip1137
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 158
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
15bc : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
15bd : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
15bf : cd1002 [ 4] cmp fLDx+3 ;test flags
trap_ne
15c2 : f002 [ 3]> beq skip1140
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
15c4 : 00 [ 7]> brk ; Use BRK to return to the monitor
15c5 : 14 > db test_num
>
15c6 : >skip1140
set_stat 0
> load_flag 0
15c6 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
15c8 : 48 [ 3]> pha ;use stack to load status
15c9 : 28 [ 4]> plp
15ca : ac0802 [ 4] ldy abs1
15cd : 08 [ 3] php ;test stores do not alter flags
15ce : 98 [ 2] tya
15cf : 49c3 [ 2] eor #$c3
15d1 : a8 [ 2] tay
15d2 : 28 [ 4] plp
15d3 : 84b2 [ 3] sty zpt
15d5 : 08 [ 3] php ;flags after load/store sequence
15d6 : 49c3 [ 2] eor #$c3
15d8 : a8 [ 2] tay
15d9 : c4b9 [ 3] cpy zp1 ;test result
trap_ne
15db : f002 [ 3]> beq skip1144
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
15dd : 00 [ 7]> brk ; Use BRK to return to the monitor
15de : 14 > db test_num
>
15df : >skip1144
15df : 68 [ 4] pla ;load status
eor_flag 0
15e0 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
15e2 : cd0d02 [ 4] cmp fLDx ;test flags
trap_ne
15e5 : f002 [ 3]> beq skip1147
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
15e7 : 00 [ 7]> brk ; Use BRK to return to the monitor
15e8 : 14 > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 159
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
15e9 : >skip1147
set_stat 0
> load_flag 0
15e9 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
15eb : 48 [ 3]> pha ;use stack to load status
15ec : 28 [ 4]> plp
15ed : ac0902 [ 4] ldy abs1+1
15f0 : 08 [ 3] php ;test stores do not alter flags
15f1 : 98 [ 2] tya
15f2 : 49c3 [ 2] eor #$c3
15f4 : a8 [ 2] tay
15f5 : 28 [ 4] plp
15f6 : 84b3 [ 3] sty zpt+1
15f8 : 08 [ 3] php ;flags after load/store sequence
15f9 : 49c3 [ 2] eor #$c3
15fb : a8 [ 2] tay
15fc : c4ba [ 3] cpy zp1+1 ;test result
trap_ne
15fe : f002 [ 4]> beq skip1151
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1600 : 00 [ 7]> brk ; Use BRK to return to the monitor
1601 : 14 > db test_num
>
1602 : >skip1151
1602 : 68 [ 4] pla ;load status
eor_flag 0
1603 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1605 : cd0e02 [ 4] cmp fLDx+1 ;test flags
trap_ne
1608 : f002 [ 3]> beq skip1154
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
160a : 00 [ 7]> brk ; Use BRK to return to the monitor
160b : 14 > db test_num
>
160c : >skip1154
set_stat 0
> load_flag 0
160c : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
160e : 48 [ 3]> pha ;use stack to load status
160f : 28 [ 4]> plp
1610 : ac0a02 [ 4] ldy abs1+2
1613 : 08 [ 3] php ;test stores do not alter flags
1614 : 98 [ 2] tya
1615 : 49c3 [ 2] eor #$c3
1617 : a8 [ 2] tay
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 160
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1618 : 28 [ 4] plp
1619 : 84b4 [ 3] sty zpt+2
161b : 08 [ 3] php ;flags after load/store sequence
161c : 49c3 [ 2] eor #$c3
161e : a8 [ 2] tay
161f : c4bb [ 3] cpy zp1+2 ;test result
trap_ne
1621 : f002 [ 3]> beq skip1158
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1623 : 00 [ 7]> brk ; Use BRK to return to the monitor
1624 : 14 > db test_num
>
1625 : >skip1158
1625 : 68 [ 4] pla ;load status
eor_flag 0
1626 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1628 : cd0f02 [ 4] cmp fLDx+2 ;test flags
trap_ne
162b : f002 [ 3]> beq skip1161
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
162d : 00 [ 7]> brk ; Use BRK to return to the monitor
162e : 14 > db test_num
>
162f : >skip1161
set_stat 0
> load_flag 0
162f : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1631 : 48 [ 3]> pha ;use stack to load status
1632 : 28 [ 4]> plp
1633 : ac0b02 [ 4] ldy abs1+3
1636 : 08 [ 3] php ;test stores do not alter flags
1637 : 98 [ 2] tya
1638 : 49c3 [ 2] eor #$c3
163a : a8 [ 2] tay
163b : 28 [ 4] plp
163c : 84b5 [ 3] sty zpt+3
163e : 08 [ 3] php ;flags after load/store sequence
163f : 49c3 [ 2] eor #$c3
1641 : a8 [ 2] tay
1642 : c4bc [ 3] cpy zp1+3 ;test result
trap_ne
1644 : f002 [ 3]> beq skip1165
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1646 : 00 [ 7]> brk ; Use BRK to return to the monitor
1647 : 14 > db test_num
>
1648 : >skip1165
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 161
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1648 : 68 [ 4] pla ;load status
eor_flag 0
1649 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
164b : cd1002 [ 4] cmp fLDx+3 ;test flags
trap_ne
164e : f002 [ 3]> beq skip1168
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1650 : 00 [ 7]> brk ; Use BRK to return to the monitor
1651 : 14 > db test_num
>
1652 : >skip1168
set_stat $ff
> load_flag $ff
1652 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1654 : 48 [ 3]> pha ;use stack to load status
1655 : 28 [ 4]> plp
1656 : ac0802 [ 4] ldy abs1
1659 : 08 [ 3] php ;test stores do not alter flags
165a : 98 [ 2] tya
165b : 49c3 [ 2] eor #$c3
165d : a8 [ 2] tay
165e : 28 [ 4] plp
165f : 84b2 [ 3] sty zpt
1661 : 08 [ 3] php ;flags after load/store sequence
1662 : 49c3 [ 2] eor #$c3
1664 : a8 [ 2] tay
1665 : c5b9 [ 3] cmp zp1 ;test result
trap_ne
1667 : f002 [ 3]> beq skip1172
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1669 : 00 [ 7]> brk ; Use BRK to return to the monitor
166a : 14 > db test_num
>
166b : >skip1172
166b : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
166c : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
166e : cd0d02 [ 4] cmp fLDx ;test flags
trap_ne
1671 : f002 [ 3]> beq skip1175
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1673 : 00 [ 7]> brk ; Use BRK to return to the monitor
1674 : 14 > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 162
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1675 : >skip1175
set_stat $ff
> load_flag $ff
1675 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1677 : 48 [ 3]> pha ;use stack to load status
1678 : 28 [ 4]> plp
1679 : ac0902 [ 4] ldy abs1+1
167c : 08 [ 3] php ;test stores do not alter flags
167d : 98 [ 2] tya
167e : 49c3 [ 2] eor #$c3
1680 : a8 [ 2] tay
1681 : 28 [ 4] plp
1682 : 84b3 [ 3] sty zpt+1
1684 : 08 [ 3] php ;flags after load/store sequence
1685 : 49c3 [ 2] eor #$c3
1687 : a8 [ 2] tay
1688 : c5ba [ 3] cmp zp1+1 ;test result
trap_ne
168a : f002 [ 3]> beq skip1179
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
168c : 00 [ 7]> brk ; Use BRK to return to the monitor
168d : 14 > db test_num
>
168e : >skip1179
168e : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
168f : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1691 : cd0e02 [ 4] cmp fLDx+1 ;test flags
trap_ne
1694 : f002 [ 3]> beq skip1182
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1696 : 00 [ 7]> brk ; Use BRK to return to the monitor
1697 : 14 > db test_num
>
1698 : >skip1182
set_stat $ff
> load_flag $ff
1698 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
169a : 48 [ 3]> pha ;use stack to load status
169b : 28 [ 4]> plp
169c : ac0a02 [ 4] ldy abs1+2
169f : 08 [ 3] php ;test stores do not alter flags
16a0 : 98 [ 2] tya
16a1 : 49c3 [ 2] eor #$c3
16a3 : a8 [ 2] tay
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 163
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
16a4 : 28 [ 4] plp
16a5 : 84b4 [ 3] sty zpt+2
16a7 : 08 [ 3] php ;flags after load/store sequence
16a8 : 49c3 [ 2] eor #$c3
16aa : a8 [ 2] tay
16ab : c5bb [ 3] cmp zp1+2 ;test result
trap_ne
16ad : f002 [ 3]> beq skip1186
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
16af : 00 [ 7]> brk ; Use BRK to return to the monitor
16b0 : 14 > db test_num
>
16b1 : >skip1186
16b1 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
16b2 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
16b4 : cd0f02 [ 4] cmp fLDx+2 ;test flags
trap_ne
16b7 : f002 [ 3]> beq skip1189
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
16b9 : 00 [ 7]> brk ; Use BRK to return to the monitor
16ba : 14 > db test_num
>
16bb : >skip1189
set_stat $ff
> load_flag $ff
16bb : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
16bd : 48 [ 3]> pha ;use stack to load status
16be : 28 [ 4]> plp
16bf : ac0b02 [ 4] ldy abs1+3
16c2 : 08 [ 3] php ;test stores do not alter flags
16c3 : 98 [ 2] tya
16c4 : 49c3 [ 2] eor #$c3
16c6 : a8 [ 2] tay
16c7 : 28 [ 4] plp
16c8 : 84b5 [ 3] sty zpt+3
16ca : 08 [ 3] php ;flags after load/store sequence
16cb : 49c3 [ 2] eor #$c3
16cd : a8 [ 2] tay
16ce : c5bc [ 3] cmp zp1+3 ;test result
trap_ne
16d0 : f002 [ 3]> beq skip1193
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
16d2 : 00 [ 7]> brk ; Use BRK to return to the monitor
16d3 : 14 > db test_num
>
16d4 : >skip1193
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 164
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
16d4 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
16d5 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
16d7 : cd1002 [ 4] cmp fLDx+3 ;test flags
trap_ne
16da : f002 [ 3]> beq skip1196
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
16dc : 00 [ 7]> brk ; Use BRK to return to the monitor
16dd : 14 > db test_num
>
16de : >skip1196
set_stat 0
> load_flag 0
16de : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
16e0 : 48 [ 3]> pha ;use stack to load status
16e1 : 28 [ 4]> plp
16e2 : a0c3 [ 2] ldy #$c3
16e4 : 08 [ 3] php
16e5 : cc0802 [ 4] cpy abs1 ;test result
trap_ne
16e8 : f002 [ 3]> beq skip1200
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
16ea : 00 [ 7]> brk ; Use BRK to return to the monitor
16eb : 14 > db test_num
>
16ec : >skip1200
16ec : 68 [ 4] pla ;load status
eor_flag 0
16ed : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
16ef : cd0d02 [ 4] cmp fLDx ;test flags
trap_ne
16f2 : f002 [ 3]> beq skip1203
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
16f4 : 00 [ 7]> brk ; Use BRK to return to the monitor
16f5 : 14 > db test_num
>
16f6 : >skip1203
set_stat 0
> load_flag 0
16f6 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
16f8 : 48 [ 3]> pha ;use stack to load status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 165
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
16f9 : 28 [ 4]> plp
16fa : a082 [ 2] ldy #$82
16fc : 08 [ 3] php
16fd : cc0902 [ 4] cpy abs1+1 ;test result
trap_ne
1700 : f002 [ 3]> beq skip1207
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1702 : 00 [ 7]> brk ; Use BRK to return to the monitor
1703 : 14 > db test_num
>
1704 : >skip1207
1704 : 68 [ 4] pla ;load status
eor_flag 0
1705 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1707 : cd0e02 [ 4] cmp fLDx+1 ;test flags
trap_ne
170a : f002 [ 3]> beq skip1210
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
170c : 00 [ 7]> brk ; Use BRK to return to the monitor
170d : 14 > db test_num
>
170e : >skip1210
set_stat 0
> load_flag 0
170e : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1710 : 48 [ 3]> pha ;use stack to load status
1711 : 28 [ 4]> plp
1712 : a041 [ 2] ldy #$41
1714 : 08 [ 3] php
1715 : cc0a02 [ 4] cpy abs1+2 ;test result
trap_ne
1718 : f002 [ 3]> beq skip1214
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
171a : 00 [ 7]> brk ; Use BRK to return to the monitor
171b : 14 > db test_num
>
171c : >skip1214
171c : 68 [ 4] pla ;load status
eor_flag 0
171d : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
171f : cd0f02 [ 4] cmp fLDx+2 ;test flags
trap_ne
1722 : f002 [ 3]> beq skip1217
> trap ;failed equal (zero)
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 166
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>; db $db ; M65C02/M65C02A SToP instruction
1724 : 00 [ 7]> brk ; Use BRK to return to the monitor
1725 : 14 > db test_num
>
1726 : >skip1217
set_stat 0
> load_flag 0
1726 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1728 : 48 [ 3]> pha ;use stack to load status
1729 : 28 [ 4]> plp
172a : a000 [ 2] ldy #0
172c : 08 [ 3] php
172d : cc0b02 [ 4] cpy abs1+3 ;test result
trap_ne
1730 : f002 [ 3]> beq skip1221
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1732 : 00 [ 7]> brk ; Use BRK to return to the monitor
1733 : 14 > db test_num
>
1734 : >skip1221
1734 : 68 [ 4] pla ;load status
eor_flag 0
1735 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1737 : cd1002 [ 4] cmp fLDx+3 ;test flags
trap_ne
173a : f002 [ 3]> beq skip1224
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
173c : 00 [ 7]> brk ; Use BRK to return to the monitor
173d : 14 > db test_num
>
173e : >skip1224
set_stat $ff
> load_flag $ff
173e : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1740 : 48 [ 3]> pha ;use stack to load status
1741 : 28 [ 4]> plp
1742 : a0c3 [ 2] ldy #$c3
1744 : 08 [ 3] php
1745 : cc0802 [ 4] cpy abs1 ;test result
trap_ne
1748 : f002 [ 3]> beq skip1228
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
174a : 00 [ 7]> brk ; Use BRK to return to the monitor
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 167
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
174b : 14 > db test_num
>
174c : >skip1228
174c : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
174d : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
174f : cd0d02 [ 4] cmp fLDx ;test flags
trap_ne
1752 : f002 [ 3]> beq skip1231
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1754 : 00 [ 7]> brk ; Use BRK to return to the monitor
1755 : 14 > db test_num
>
1756 : >skip1231
set_stat $ff
> load_flag $ff
1756 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1758 : 48 [ 3]> pha ;use stack to load status
1759 : 28 [ 4]> plp
175a : a082 [ 2] ldy #$82
175c : 08 [ 3] php
175d : cc0902 [ 4] cpy abs1+1 ;test result
trap_ne
1760 : f002 [ 3]> beq skip1235
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1762 : 00 [ 7]> brk ; Use BRK to return to the monitor
1763 : 14 > db test_num
>
1764 : >skip1235
1764 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1765 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1767 : cd0e02 [ 4] cmp fLDx+1 ;test flags
trap_ne
176a : f002 [ 3]> beq skip1238
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
176c : 00 [ 7]> brk ; Use BRK to return to the monitor
176d : 14 > db test_num
>
176e : >skip1238
set_stat $ff
> load_flag $ff
176e : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 168
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1770 : 48 [ 3]> pha ;use stack to load status
1771 : 28 [ 4]> plp
1772 : a041 [ 2] ldy #$41
1774 : 08 [ 3] php
1775 : cc0a02 [ 4] cpy abs1+2 ;test result
trap_ne
1778 : f002 [ 3]> beq skip1242
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
177a : 00 [ 7]> brk ; Use BRK to return to the monitor
177b : 14 > db test_num
>
177c : >skip1242
177c : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
177d : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
177f : cd0f02 [ 4] cmp fLDx+2 ;test flags
trap_ne
1782 : f002 [ 3]> beq skip1245
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1784 : 00 [ 7]> brk ; Use BRK to return to the monitor
1785 : 14 > db test_num
>
1786 : >skip1245
set_stat $ff
> load_flag $ff
1786 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1788 : 48 [ 3]> pha ;use stack to load status
1789 : 28 [ 4]> plp
178a : a000 [ 2] ldy #0
178c : 08 [ 3] php
178d : cc0b02 [ 4] cpy abs1+3 ;test result
trap_ne
1790 : f002 [ 3]> beq skip1249
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1792 : 00 [ 7]> brk ; Use BRK to return to the monitor
1793 : 14 > db test_num
>
1794 : >skip1249
1794 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1795 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1797 : cd1002 [ 4] cmp fLDx+3 ;test flags
trap_ne
179a : f002 [ 3]> beq skip1252
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 169
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
179c : 00 [ 7]> brk ; Use BRK to return to the monitor
179d : 14 > db test_num
>
179e : >skip1252
179e : a000 [ 2] ldy #0
17a0 : a5b2 [ 3] lda zpt
17a2 : 49c3 [ 2] eor #$c3
17a4 : c5b9 [ 3] cmp zp1
trap_ne ;store to zp data
17a6 : f002 [ 3]> beq skip1254
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
17a8 : 00 [ 7]> brk ; Use BRK to return to the monitor
17a9 : 14 > db test_num
>
17aa : >skip1254
17aa : 84b2 [ 3] sty zpt ;clear
17ac : ad0302 [ 4] lda abst
17af : 49c3 [ 2] eor #$c3
17b1 : cd0802 [ 4] cmp abs1
trap_ne ;store to abs data
17b4 : f002 [ 3]> beq skip1256
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
17b6 : 00 [ 7]> brk ; Use BRK to return to the monitor
17b7 : 14 > db test_num
>
17b8 : >skip1256
17b8 : 8c0302 [ 4] sty abst ;clear
17bb : a5b3 [ 3] lda zpt+1
17bd : 49c3 [ 2] eor #$c3
17bf : c5ba [ 3] cmp zp1+1
trap_ne ;store to zp+1 data
17c1 : f002 [ 3]> beq skip1258
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
17c3 : 00 [ 7]> brk ; Use BRK to return to the monitor
17c4 : 14 > db test_num
>
17c5 : >skip1258
17c5 : 84b3 [ 3] sty zpt+1 ;clear
17c7 : ad0402 [ 4] lda abst+1
17ca : 49c3 [ 2] eor #$c3
17cc : cd0902 [ 4] cmp abs1+1
trap_ne ;store to abs+1 data
17cf : f002 [ 3]> beq skip1260
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 170
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
17d1 : 00 [ 7]> brk ; Use BRK to return to the monitor
17d2 : 14 > db test_num
>
17d3 : >skip1260
17d3 : 8c0402 [ 4] sty abst+1 ;clear
17d6 : a5b4 [ 3] lda zpt+2
17d8 : 49c3 [ 2] eor #$c3
17da : c5bb [ 3] cmp zp1+2
trap_ne ;store to zp+2 data
17dc : f002 [ 3]> beq skip1262
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
17de : 00 [ 7]> brk ; Use BRK to return to the monitor
17df : 14 > db test_num
>
17e0 : >skip1262
17e0 : 84b4 [ 3] sty zpt+2 ;clear
17e2 : ad0502 [ 4] lda abst+2
17e5 : 49c3 [ 2] eor #$c3
17e7 : cd0a02 [ 4] cmp abs1+2
trap_ne ;store to abs+2 data
17ea : f002 [ 3]> beq skip1264
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
17ec : 00 [ 7]> brk ; Use BRK to return to the monitor
17ed : 14 > db test_num
>
17ee : >skip1264
17ee : 8c0502 [ 4] sty abst+2 ;clear
17f1 : a5b5 [ 3] lda zpt+3
17f3 : 49c3 [ 2] eor #$c3
17f5 : c5bc [ 3] cmp zp1+3
trap_ne ;store to zp+3 data
17f7 : f002 [ 3]> beq skip1266
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
17f9 : 00 [ 7]> brk ; Use BRK to return to the monitor
17fa : 14 > db test_num
>
17fb : >skip1266
17fb : 84b5 [ 3] sty zpt+3 ;clear
17fd : ad0602 [ 4] lda abst+3
1800 : 49c3 [ 2] eor #$c3
1802 : cd0b02 [ 4] cmp abs1+3
trap_ne ;store to abs+3 data
1805 : f002 [ 3]> beq skip1268
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1807 : 00 [ 7]> brk ; Use BRK to return to the monitor
1808 : 14 > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 171
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1809 : >skip1268
1809 : 8c0602 [ 4] sty abst+3 ;clear
next_test
180c : ad0002 [ 4]> lda test_case ;previous test
180f : c914 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
1811 : f002 [ 3]> beq skip1271
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1813 : 00 [ 7]> brk ; Use BRK to return to the monitor
1814 : 14 > db test_num
>
1815 : >skip1271
>
0015 = >test_num = test_num + 1
1815 : a915 [ 2]> lda #test_num ;*** this tests' number
1817 : 8d0002 [ 4]> 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
181a : a203 [ 2] ldx #3
181c : tldax
set_stat 0
> load_flag 0
181c : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
181e : 48 [ 3]> pha ;use stack to load status
181f : 28 [ 4]> plp
1820 : b5b9 [ 4] lda zp1,x
1822 : 08 [ 3] php ;test stores do not alter flags
1823 : 49c3 [ 2] eor #$c3
1825 : 28 [ 4] plp
1826 : 9d0302 [ 5] sta abst,x
1829 : 08 [ 3] php ;flags after load/store sequence
182a : 49c3 [ 2] eor #$c3
182c : dd0802 [ 4] cmp abs1,x ;test result
trap_ne
182f : f002 [ 3]> beq skip1275
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1831 : 00 [ 7]> brk ; Use BRK to return to the monitor
1832 : 15 > db test_num
>
1833 : >skip1275
1833 : 68 [ 4] pla ;load status
eor_flag 0
1834 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1836 : dd0d02 [ 4] cmp fLDx,x ;test flags
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 172
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
trap_ne
1839 : f002 [ 3]> beq skip1278
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
183b : 00 [ 7]> brk ; Use BRK to return to the monitor
183c : 15 > db test_num
>
183d : >skip1278
183d : ca [ 2] dex
183e : 10dc [ 3] bpl tldax
1840 : a203 [ 2] ldx #3
1842 : tldax1
set_stat $ff
> load_flag $ff
1842 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1844 : 48 [ 3]> pha ;use stack to load status
1845 : 28 [ 4]> plp
1846 : b5b9 [ 4] lda zp1,x
1848 : 08 [ 3] php ;test stores do not alter flags
1849 : 49c3 [ 2] eor #$c3
184b : 28 [ 4] plp
184c : 9d0302 [ 5] sta abst,x
184f : 08 [ 3] php ;flags after load/store sequence
1850 : 49c3 [ 2] eor #$c3
1852 : dd0802 [ 4] cmp abs1,x ;test result
trap_ne
1855 : f002 [ 3]> beq skip1282
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1857 : 00 [ 7]> brk ; Use BRK to return to the monitor
1858 : 15 > db test_num
>
1859 : >skip1282
1859 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
185a : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
185c : dd0d02 [ 4] cmp fLDx,x ;test flags
trap_ne
185f : f002 [ 3]> beq skip1285
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1861 : 00 [ 7]> brk ; Use BRK to return to the monitor
1862 : 15 > db test_num
>
1863 : >skip1285
1863 : ca [ 2] dex
1864 : 10dc [ 3] bpl tldax1
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 173
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1866 : a203 [ 2] ldx #3
1868 : tldax2
set_stat 0
> load_flag 0
1868 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
186a : 48 [ 3]> pha ;use stack to load status
186b : 28 [ 4]> plp
186c : bd0802 [ 4] lda abs1,x
186f : 08 [ 3] php ;test stores do not alter flags
1870 : 49c3 [ 2] eor #$c3
1872 : 28 [ 4] plp
1873 : 95b2 [ 4] sta zpt,x
1875 : 08 [ 3] php ;flags after load/store sequence
1876 : 49c3 [ 2] eor #$c3
1878 : d5b9 [ 4] cmp zp1,x ;test result
trap_ne
187a : f002 [ 3]> beq skip1289
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
187c : 00 [ 7]> brk ; Use BRK to return to the monitor
187d : 15 > db test_num
>
187e : >skip1289
187e : 68 [ 4] pla ;load status
eor_flag 0
187f : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1881 : dd0d02 [ 4] cmp fLDx,x ;test flags
trap_ne
1884 : f002 [ 3]> beq skip1292
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1886 : 00 [ 7]> brk ; Use BRK to return to the monitor
1887 : 15 > db test_num
>
1888 : >skip1292
1888 : ca [ 2] dex
1889 : 10dd [ 3] bpl tldax2
188b : a203 [ 2] ldx #3
188d : tldax3
set_stat $ff
> load_flag $ff
188d : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
188f : 48 [ 3]> pha ;use stack to load status
1890 : 28 [ 4]> plp
1891 : bd0802 [ 4] lda abs1,x
1894 : 08 [ 3] php ;test stores do not alter flags
1895 : 49c3 [ 2] eor #$c3
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 174
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1897 : 28 [ 4] plp
1898 : 95b2 [ 4] sta zpt,x
189a : 08 [ 3] php ;flags after load/store sequence
189b : 49c3 [ 2] eor #$c3
189d : d5b9 [ 4] cmp zp1,x ;test result
trap_ne
189f : f002 [ 3]> beq skip1296
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
18a1 : 00 [ 7]> brk ; Use BRK to return to the monitor
18a2 : 15 > db test_num
>
18a3 : >skip1296
18a3 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
18a4 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
18a6 : dd0d02 [ 4] cmp fLDx,x ;test flags
trap_ne
18a9 : f002 [ 3]> beq skip1299
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
18ab : 00 [ 7]> brk ; Use BRK to return to the monitor
18ac : 15 > db test_num
>
18ad : >skip1299
18ad : ca [ 2] dex
18ae : 10dd [ 3] bpl tldax3
18b0 : a203 [ 2] ldx #3 ;testing store result
18b2 : a000 [ 2] ldy #0
18b4 : b5b2 [ 4] tstax lda zpt,x
18b6 : 49c3 [ 2] eor #$c3
18b8 : d5b9 [ 4] cmp zp1,x
trap_ne ;store to zp,x data
18ba : f002 [ 3]> beq skip1301
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
18bc : 00 [ 7]> brk ; Use BRK to return to the monitor
18bd : 15 > db test_num
>
18be : >skip1301
18be : 94b2 [ 4] sty zpt,x ;clear
18c0 : bd0302 [ 4] lda abst,x
18c3 : 49c3 [ 2] eor #$c3
18c5 : dd0802 [ 4] cmp abs1,x
trap_ne ;store to abs,x data
18c8 : f002 [ 3]> beq skip1303
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
18ca : 00 [ 7]> brk ; Use BRK to return to the monitor
18cb : 15 > db test_num
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 175
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
18cc : >skip1303
18cc : 8a [ 2] txa
18cd : 9d0302 [ 5] sta abst,x ;clear
18d0 : ca [ 2] dex
18d1 : 10e1 [ 3] bpl tstax
next_test
18d3 : ad0002 [ 4]> lda test_case ;previous test
18d6 : c915 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
18d8 : f002 [ 3]> beq skip1306
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
18da : 00 [ 7]> brk ; Use BRK to return to the monitor
18db : 15 > db test_num
>
18dc : >skip1306
>
0016 = >test_num = test_num + 1
18dc : a916 [ 2]> lda #test_num ;*** this tests' number
18de : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; LDA / STA - (zp),y / abs,y / (zp,x)
18e1 : a003 [ 2] ldy #3
18e3 : tlday
set_stat 0
> load_flag 0
18e3 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
18e5 : 48 [ 3]> pha ;use stack to load status
18e6 : 28 [ 4]> plp
18e7 : b1ca [ 5] lda (ind1),y
18e9 : 08 [ 3] php ;test stores do not alter flags
18ea : 49c3 [ 2] eor #$c3
18ec : 28 [ 4] plp
18ed : 990302 [ 5] sta abst,y
18f0 : 08 [ 3] php ;flags after load/store sequence
18f1 : 49c3 [ 2] eor #$c3
18f3 : d90802 [ 4] cmp abs1,y ;test result
trap_ne
18f6 : f002 [ 3]> beq skip1310
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
18f8 : 00 [ 7]> brk ; Use BRK to return to the monitor
18f9 : 16 > db test_num
>
18fa : >skip1310
18fa : 68 [ 4] pla ;load status
eor_flag 0
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 176
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
18fb : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
18fd : d90d02 [ 4] cmp fLDx,y ;test flags
trap_ne
1900 : f002 [ 3]> beq skip1313
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1902 : 00 [ 7]> brk ; Use BRK to return to the monitor
1903 : 16 > db test_num
>
1904 : >skip1313
1904 : 88 [ 2] dey
1905 : 10dc [ 4] bpl tlday
1907 : a003 [ 2] ldy #3
1909 : tlday1
set_stat $ff
> load_flag $ff
1909 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
190b : 48 [ 3]> pha ;use stack to load status
190c : 28 [ 4]> plp
190d : b1ca [ 5] lda (ind1),y
190f : 08 [ 3] php ;test stores do not alter flags
1910 : 49c3 [ 2] eor #$c3
1912 : 28 [ 4] plp
1913 : 990302 [ 5] sta abst,y
1916 : 08 [ 3] php ;flags after load/store sequence
1917 : 49c3 [ 2] eor #$c3
1919 : d90802 [ 4] cmp abs1,y ;test result
trap_ne
191c : f002 [ 3]> beq skip1317
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
191e : 00 [ 7]> brk ; Use BRK to return to the monitor
191f : 16 > db test_num
>
1920 : >skip1317
1920 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1921 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1923 : d90d02 [ 4] cmp fLDx,y ;test flags
trap_ne
1926 : f002 [ 3]> beq skip1320
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1928 : 00 [ 7]> brk ; Use BRK to return to the monitor
1929 : 16 > db test_num
>
192a : >skip1320
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 177
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
192a : 88 [ 2] dey
192b : 10dc [ 3] bpl tlday1
192d : a003 [ 2] ldy #3 ;testing store result
192f : a200 [ 2] ldx #0
1931 : b90302 [ 4] tstay lda abst,y
1934 : 49c3 [ 2] eor #$c3
1936 : d90802 [ 4] cmp abs1,y
trap_ne ;store to abs data
1939 : f002 [ 3]> beq skip1322
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
193b : 00 [ 7]> brk ; Use BRK to return to the monitor
193c : 16 > db test_num
>
193d : >skip1322
193d : 8a [ 2] txa
193e : 990302 [ 5] sta abst,y ;clear
1941 : 88 [ 2] dey
1942 : 10ed [ 3] bpl tstay
1944 : a003 [ 2] ldy #3
1946 : tlday2
set_stat 0
> load_flag 0
1946 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1948 : 48 [ 3]> pha ;use stack to load status
1949 : 28 [ 4]> plp
194a : b90802 [ 4] lda abs1,y
194d : 08 [ 3] php ;test stores do not alter flags
194e : 49c3 [ 2] eor #$c3
1950 : 28 [ 4] plp
1951 : 91d6 [ 5] sta (indt),y
1953 : 08 [ 3] php ;flags after load/store sequence
1954 : 49c3 [ 2] eor #$c3
1956 : d1ca [ 5] cmp (ind1),y ;test result
trap_ne
1958 : f002 [ 3]> beq skip1326
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
195a : 00 [ 7]> brk ; Use BRK to return to the monitor
195b : 16 > db test_num
>
195c : >skip1326
195c : 68 [ 4] pla ;load status
eor_flag 0
195d : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
195f : d90d02 [ 4] cmp fLDx,y ;test flags
trap_ne
1962 : f002 [ 3]> beq skip1329
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 178
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1964 : 00 [ 7]> brk ; Use BRK to return to the monitor
1965 : 16 > db test_num
>
1966 : >skip1329
1966 : 88 [ 2] dey
1967 : 10dd [ 3] bpl tlday2
1969 : a003 [ 2] ldy #3
196b : tlday3
set_stat $ff
> load_flag $ff
196b : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
196d : 48 [ 3]> pha ;use stack to load status
196e : 28 [ 4]> plp
196f : b90802 [ 4] lda abs1,y
1972 : 08 [ 3] php ;test stores do not alter flags
1973 : 49c3 [ 2] eor #$c3
1975 : 28 [ 4] plp
1976 : 91d6 [ 5] sta (indt),y
1978 : 08 [ 3] php ;flags after load/store sequence
1979 : 49c3 [ 2] eor #$c3
197b : d1ca [ 5] cmp (ind1),y ;test result
trap_ne
197d : f002 [ 3]> beq skip1333
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
197f : 00 [ 7]> brk ; Use BRK to return to the monitor
1980 : 16 > db test_num
>
1981 : >skip1333
1981 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1982 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1984 : d90d02 [ 4] cmp fLDx,y ;test flags
trap_ne
1987 : f002 [ 3]> beq skip1336
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1989 : 00 [ 7]> brk ; Use BRK to return to the monitor
198a : 16 > db test_num
>
198b : >skip1336
198b : 88 [ 2] dey
198c : 10dd [ 3] bpl tlday3
198e : a003 [ 2] ldy #3 ;testing store result
1990 : a200 [ 2] ldx #0
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 179
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1992 : b90302 [ 4] tstay1 lda abst,y
1995 : 49c3 [ 2] eor #$c3
1997 : d90802 [ 4] cmp abs1,y
trap_ne ;store to abs data
199a : f002 [ 3]> beq skip1338
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
199c : 00 [ 7]> brk ; Use BRK to return to the monitor
199d : 16 > db test_num
>
199e : >skip1338
199e : 8a [ 2] txa
199f : 990302 [ 5] sta abst,y ;clear
19a2 : 88 [ 2] dey
19a3 : 10ed [ 3] bpl tstay1
19a5 : a206 [ 2] ldx #6
19a7 : a003 [ 2] ldy #3
19a9 : tldax4
set_stat 0
> load_flag 0
19a9 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
19ab : 48 [ 3]> pha ;use stack to load status
19ac : 28 [ 4]> plp
19ad : a1ca [ 6] lda (ind1,x)
19af : 08 [ 3] php ;test stores do not alter flags
19b0 : 49c3 [ 2] eor #$c3
19b2 : 28 [ 4] plp
19b3 : 81d6 [ 6] sta (indt,x)
19b5 : 08 [ 3] php ;flags after load/store sequence
19b6 : 49c3 [ 2] eor #$c3
19b8 : d90802 [ 4] cmp abs1,y ;test result
trap_ne
19bb : f002 [ 3]> beq skip1342
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
19bd : 00 [ 7]> brk ; Use BRK to return to the monitor
19be : 16 > db test_num
>
19bf : >skip1342
19bf : 68 [ 4] pla ;load status
eor_flag 0
19c0 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
19c2 : d90d02 [ 4] cmp fLDx,y ;test flags
trap_ne
19c5 : f002 [ 3]> beq skip1345
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
19c7 : 00 [ 7]> brk ; Use BRK to return to the monitor
19c8 : 16 > db test_num
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 180
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
19c9 : >skip1345
19c9 : ca [ 2] dex
19ca : ca [ 2] dex
19cb : 88 [ 2] dey
19cc : 10db [ 3] bpl tldax4
19ce : a206 [ 2] ldx #6
19d0 : a003 [ 2] ldy #3
19d2 : tldax5
set_stat $ff
> load_flag $ff
19d2 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
19d4 : 48 [ 3]> pha ;use stack to load status
19d5 : 28 [ 4]> plp
19d6 : a1ca [ 6] lda (ind1,x)
19d8 : 08 [ 3] php ;test stores do not alter flags
19d9 : 49c3 [ 2] eor #$c3
19db : 28 [ 4] plp
19dc : 81d6 [ 6] sta (indt,x)
19de : 08 [ 3] php ;flags after load/store sequence
19df : 49c3 [ 2] eor #$c3
19e1 : d90802 [ 4] cmp abs1,y ;test result
trap_ne
19e4 : f002 [ 3]> beq skip1349
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
19e6 : 00 [ 7]> brk ; Use BRK to return to the monitor
19e7 : 16 > db test_num
>
19e8 : >skip1349
19e8 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
19e9 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
19eb : d90d02 [ 4] cmp fLDx,y ;test flags
trap_ne
19ee : f002 [ 3]> beq skip1352
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
19f0 : 00 [ 7]> brk ; Use BRK to return to the monitor
19f1 : 16 > db test_num
>
19f2 : >skip1352
19f2 : ca [ 2] dex
19f3 : ca [ 2] dex
19f4 : 88 [ 2] dey
19f5 : 10db [ 3] bpl tldax5
19f7 : a003 [ 2] ldy #3 ;testing store result
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 181
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
19f9 : a200 [ 2] ldx #0
19fb : b90302 [ 4] tstay2 lda abst,y
19fe : 49c3 [ 2] eor #$c3
1a00 : d90802 [ 4] cmp abs1,y
trap_ne ;store to abs data
1a03 : f002 [ 3]> beq skip1354
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1a05 : 00 [ 7]> brk ; Use BRK to return to the monitor
1a06 : 16 > db test_num
>
1a07 : >skip1354
1a07 : 8a [ 2] txa
1a08 : 990302 [ 5] sta abst,y ;clear
1a0b : 88 [ 2] dey
1a0c : 10ed [ 4] bpl tstay2
next_test
1a0e : ad0002 [ 4]> lda test_case ;previous test
1a11 : c916 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
1a13 : f002 [ 3]> beq skip1357
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1a15 : 00 [ 7]> brk ; Use BRK to return to the monitor
1a16 : 16 > db test_num
>
1a17 : >skip1357
>
0017 = >test_num = test_num + 1
1a17 : a917 [ 2]> lda #test_num ;*** this tests' number
1a19 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; indexed wraparound test (only zp should wrap)
1a1c : a2fd [ 2] ldx #3+$fa
1a1e : b5bf [ 4] tldax6 lda zp1-$fa&$ff,x ;wrap on indexed zp
1a20 : 9d0901 [ 5] sta abst-$fa,x ;no STX abs,x!
1a23 : ca [ 2] dex
1a24 : e0fa [ 2] cpx #$fa
1a26 : b0f6 [ 3] bcs tldax6
1a28 : a2fd [ 2] ldx #3+$fa
1a2a : bd0e01 [ 4] tldax7 lda abs1-$fa,x ;no wrap on indexed abs
1a2d : 95b8 [ 4] sta zpt-$fa&$ff,x
1a2f : ca [ 2] dex
1a30 : e0fa [ 2] cpx #$fa
1a32 : b0f6 [ 3] bcs tldax7
1a34 : a203 [ 2] ldx #3 ;testing wraparound result
1a36 : a000 [ 2] ldy #0
1a38 : b5b2 [ 4] tstax1 lda zpt,x
1a3a : d5b9 [ 4] cmp zp1,x
trap_ne ;store to zp,x data
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 182
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1a3c : f002 [ 3]> beq skip1359
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1a3e : 00 [ 7]> brk ; Use BRK to return to the monitor
1a3f : 17 > db test_num
>
1a40 : >skip1359
1a40 : 94b2 [ 4] sty zpt,x ;clear
1a42 : bd0302 [ 4] lda abst,x
1a45 : dd0802 [ 4] cmp abs1,x
trap_ne ;store to abs,x data
1a48 : f002 [ 3]> beq skip1361
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1a4a : 00 [ 7]> brk ; Use BRK to return to the monitor
1a4b : 17 > db test_num
>
1a4c : >skip1361
1a4c : 8a [ 2] txa
1a4d : 9d0302 [ 5] sta abst,x ;clear
1a50 : ca [ 2] dex
1a51 : 10e5 [ 3] bpl tstax1
1a53 : a0fb [ 2] ldy #3+$f8
1a55 : a2fe [ 2] ldx #6+$f8
1a57 : a1d2 [ 6] tlday4 lda (ind1-$f8&$ff,x) ;wrap on indexed zp indirect
1a59 : 990b01 [ 5] sta abst-$f8,y
1a5c : ca [ 2] dex
1a5d : ca [ 2] dex
1a5e : 88 [ 2] dey
1a5f : c0f8 [ 2] cpy #$f8
1a61 : b0f4 [ 3] bcs tlday4
1a63 : a003 [ 2] ldy #3 ;testing wraparound result
1a65 : a200 [ 2] ldx #0
1a67 : b90302 [ 4] tstay4 lda abst,y
1a6a : d90802 [ 4] cmp abs1,y
trap_ne ;store to abs data
1a6d : f002 [ 3]> beq skip1363
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1a6f : 00 [ 7]> brk ; Use BRK to return to the monitor
1a70 : 17 > db test_num
>
1a71 : >skip1363
1a71 : 8a [ 2] txa
1a72 : 990302 [ 5] sta abst,y ;clear
1a75 : 88 [ 2] dey
1a76 : 10ef [ 3] bpl tstay4
1a78 : a0fb [ 2] ldy #3+$f8
1a7a : b91001 [ 4] tlday5 lda abs1-$f8,y ;no wrap on indexed abs
1a7d : 91de [ 5] sta (inwt),y
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 183
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1a7f : 88 [ 2] dey
1a80 : c0f8 [ 2] cpy #$f8
1a82 : b0f6 [ 3] bcs tlday5
1a84 : a003 [ 2] ldy #3 ;testing wraparound result
1a86 : a200 [ 2] ldx #0
1a88 : b90302 [ 4] tstay5 lda abst,y
1a8b : d90802 [ 4] cmp abs1,y
trap_ne ;store to abs data
1a8e : f002 [ 3]> beq skip1365
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1a90 : 00 [ 7]> brk ; Use BRK to return to the monitor
1a91 : 17 > db test_num
>
1a92 : >skip1365
1a92 : 8a [ 2] txa
1a93 : 990302 [ 5] sta abst,y ;clear
1a96 : 88 [ 2] dey
1a97 : 10ef [ 3] bpl tstay5
1a99 : a0fb [ 2] ldy #3+$f8
1a9b : a2fe [ 2] ldx #6+$f8
1a9d : b1d4 [ 5] tlday6 lda (inw1),y ;no wrap on zp indirect indexed
1a9f : 81de [ 6] sta (indt-$f8&$ff,x)
1aa1 : ca [ 2] dex
1aa2 : ca [ 2] dex
1aa3 : 88 [ 2] dey
1aa4 : c0f8 [ 2] cpy #$f8
1aa6 : b0f5 [ 3] bcs tlday6
1aa8 : a003 [ 2] ldy #3 ;testing wraparound result
1aaa : a200 [ 2] ldx #0
1aac : b90302 [ 4] tstay6 lda abst,y
1aaf : d90802 [ 4] cmp abs1,y
trap_ne ;store to abs data
1ab2 : f002 [ 3]> beq skip1367
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1ab4 : 00 [ 7]> brk ; Use BRK to return to the monitor
1ab5 : 17 > db test_num
>
1ab6 : >skip1367
1ab6 : 8a [ 2] txa
1ab7 : 990302 [ 5] sta abst,y ;clear
1aba : 88 [ 2] dey
1abb : 10ef [ 3] bpl tstay6
next_test
1abd : ad0002 [ 4]> lda test_case ;previous test
1ac0 : c917 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
1ac2 : f002 [ 3]> beq skip1370
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1ac4 : 00 [ 7]> brk ; Use BRK to return to the monitor
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 184
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1ac5 : 17 > db test_num
>
1ac6 : >skip1370
>
0018 = >test_num = test_num + 1
1ac6 : a918 [ 2]> lda #test_num ;*** this tests' number
1ac8 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; LDA / STA - zp / abs / #
set_stat 0
> load_flag 0
1acb : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1acd : 48 [ 3]> pha ;use stack to load status
1ace : 28 [ 4]> plp
1acf : a5b9 [ 3] lda zp1
1ad1 : 08 [ 3] php ;test stores do not alter flags
1ad2 : 49c3 [ 2] eor #$c3
1ad4 : 28 [ 4] plp
1ad5 : 8d0302 [ 4] sta abst
1ad8 : 08 [ 3] php ;flags after load/store sequence
1ad9 : 49c3 [ 2] eor #$c3
1adb : c9c3 [ 2] cmp #$c3 ;test result
trap_ne
1add : f002 [ 3]> beq skip1374
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1adf : 00 [ 7]> brk ; Use BRK to return to the monitor
1ae0 : 18 > db test_num
>
1ae1 : >skip1374
1ae1 : 68 [ 4] pla ;load status
eor_flag 0
1ae2 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1ae4 : cd0d02 [ 4] cmp fLDx ;test flags
trap_ne
1ae7 : f002 [ 3]> beq skip1377
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1ae9 : 00 [ 7]> brk ; Use BRK to return to the monitor
1aea : 18 > db test_num
>
1aeb : >skip1377
set_stat 0
> load_flag 0
1aeb : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1aed : 48 [ 3]> pha ;use stack to load status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 185
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1aee : 28 [ 4]> plp
1aef : a5ba [ 3] lda zp1+1
1af1 : 08 [ 3] php ;test stores do not alter flags
1af2 : 49c3 [ 2] eor #$c3
1af4 : 28 [ 4] plp
1af5 : 8d0402 [ 4] sta abst+1
1af8 : 08 [ 3] php ;flags after load/store sequence
1af9 : 49c3 [ 2] eor #$c3
1afb : c982 [ 2] cmp #$82 ;test result
trap_ne
1afd : f002 [ 4]> beq skip1381
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1aff : 00 [ 7]> brk ; Use BRK to return to the monitor
1b00 : 18 > db test_num
>
1b01 : >skip1381
1b01 : 68 [ 4] pla ;load status
eor_flag 0
1b02 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1b04 : cd0e02 [ 4] cmp fLDx+1 ;test flags
trap_ne
1b07 : f002 [ 3]> beq skip1384
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1b09 : 00 [ 7]> brk ; Use BRK to return to the monitor
1b0a : 18 > db test_num
>
1b0b : >skip1384
set_stat 0
> load_flag 0
1b0b : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1b0d : 48 [ 3]> pha ;use stack to load status
1b0e : 28 [ 4]> plp
1b0f : a5bb [ 3] lda zp1+2
1b11 : 08 [ 3] php ;test stores do not alter flags
1b12 : 49c3 [ 2] eor #$c3
1b14 : 28 [ 4] plp
1b15 : 8d0502 [ 4] sta abst+2
1b18 : 08 [ 3] php ;flags after load/store sequence
1b19 : 49c3 [ 2] eor #$c3
1b1b : c941 [ 2] cmp #$41 ;test result
trap_ne
1b1d : f002 [ 3]> beq skip1388
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1b1f : 00 [ 7]> brk ; Use BRK to return to the monitor
1b20 : 18 > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 186
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1b21 : >skip1388
1b21 : 68 [ 4] pla ;load status
eor_flag 0
1b22 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1b24 : cd0f02 [ 4] cmp fLDx+2 ;test flags
trap_ne
1b27 : f002 [ 3]> beq skip1391
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1b29 : 00 [ 7]> brk ; Use BRK to return to the monitor
1b2a : 18 > db test_num
>
1b2b : >skip1391
set_stat 0
> load_flag 0
1b2b : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1b2d : 48 [ 3]> pha ;use stack to load status
1b2e : 28 [ 4]> plp
1b2f : a5bc [ 3] lda zp1+3
1b31 : 08 [ 3] php ;test stores do not alter flags
1b32 : 49c3 [ 2] eor #$c3
1b34 : 28 [ 4] plp
1b35 : 8d0602 [ 4] sta abst+3
1b38 : 08 [ 3] php ;flags after load/store sequence
1b39 : 49c3 [ 2] eor #$c3
1b3b : c900 [ 2] cmp #0 ;test result
trap_ne
1b3d : f002 [ 3]> beq skip1395
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1b3f : 00 [ 7]> brk ; Use BRK to return to the monitor
1b40 : 18 > db test_num
>
1b41 : >skip1395
1b41 : 68 [ 4] pla ;load status
eor_flag 0
1b42 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1b44 : cd1002 [ 4] cmp fLDx+3 ;test flags
trap_ne
1b47 : f002 [ 3]> beq skip1398
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1b49 : 00 [ 7]> brk ; Use BRK to return to the monitor
1b4a : 18 > db test_num
>
1b4b : >skip1398
set_stat $ff
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 187
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> load_flag $ff
1b4b : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1b4d : 48 [ 3]> pha ;use stack to load status
1b4e : 28 [ 4]> plp
1b4f : a5b9 [ 3] lda zp1
1b51 : 08 [ 3] php ;test stores do not alter flags
1b52 : 49c3 [ 2] eor #$c3
1b54 : 28 [ 4] plp
1b55 : 8d0302 [ 4] sta abst
1b58 : 08 [ 3] php ;flags after load/store sequence
1b59 : 49c3 [ 2] eor #$c3
1b5b : c9c3 [ 2] cmp #$c3 ;test result
trap_ne
1b5d : f002 [ 3]> beq skip1402
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1b5f : 00 [ 7]> brk ; Use BRK to return to the monitor
1b60 : 18 > db test_num
>
1b61 : >skip1402
1b61 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1b62 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1b64 : cd0d02 [ 4] cmp fLDx ;test flags
trap_ne
1b67 : f002 [ 3]> beq skip1405
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1b69 : 00 [ 7]> brk ; Use BRK to return to the monitor
1b6a : 18 > db test_num
>
1b6b : >skip1405
set_stat $ff
> load_flag $ff
1b6b : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1b6d : 48 [ 3]> pha ;use stack to load status
1b6e : 28 [ 4]> plp
1b6f : a5ba [ 3] lda zp1+1
1b71 : 08 [ 3] php ;test stores do not alter flags
1b72 : 49c3 [ 2] eor #$c3
1b74 : 28 [ 4] plp
1b75 : 8d0402 [ 4] sta abst+1
1b78 : 08 [ 3] php ;flags after load/store sequence
1b79 : 49c3 [ 2] eor #$c3
1b7b : c982 [ 2] cmp #$82 ;test result
trap_ne
1b7d : f002 [ 3]> beq skip1409
> trap ;failed equal (zero)
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 188
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>; db $db ; M65C02/M65C02A SToP instruction
1b7f : 00 [ 7]> brk ; Use BRK to return to the monitor
1b80 : 18 > db test_num
>
1b81 : >skip1409
1b81 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1b82 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1b84 : cd0e02 [ 4] cmp fLDx+1 ;test flags
trap_ne
1b87 : f002 [ 3]> beq skip1412
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1b89 : 00 [ 7]> brk ; Use BRK to return to the monitor
1b8a : 18 > db test_num
>
1b8b : >skip1412
set_stat $ff
> load_flag $ff
1b8b : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1b8d : 48 [ 3]> pha ;use stack to load status
1b8e : 28 [ 4]> plp
1b8f : a5bb [ 3] lda zp1+2
1b91 : 08 [ 3] php ;test stores do not alter flags
1b92 : 49c3 [ 2] eor #$c3
1b94 : 28 [ 4] plp
1b95 : 8d0502 [ 4] sta abst+2
1b98 : 08 [ 3] php ;flags after load/store sequence
1b99 : 49c3 [ 2] eor #$c3
1b9b : c941 [ 2] cmp #$41 ;test result
trap_ne
1b9d : f002 [ 3]> beq skip1416
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1b9f : 00 [ 7]> brk ; Use BRK to return to the monitor
1ba0 : 18 > db test_num
>
1ba1 : >skip1416
1ba1 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1ba2 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1ba4 : cd0f02 [ 4] cmp fLDx+2 ;test flags
trap_ne
1ba7 : f002 [ 3]> beq skip1419
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1ba9 : 00 [ 7]> brk ; Use BRK to return to the monitor
1baa : 18 > db test_num
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 189
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
1bab : >skip1419
set_stat $ff
> load_flag $ff
1bab : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1bad : 48 [ 3]> pha ;use stack to load status
1bae : 28 [ 4]> plp
1baf : a5bc [ 3] lda zp1+3
1bb1 : 08 [ 3] php ;test stores do not alter flags
1bb2 : 49c3 [ 2] eor #$c3
1bb4 : 28 [ 4] plp
1bb5 : 8d0602 [ 4] sta abst+3
1bb8 : 08 [ 3] php ;flags after load/store sequence
1bb9 : 49c3 [ 2] eor #$c3
1bbb : c900 [ 2] cmp #0 ;test result
trap_ne
1bbd : f002 [ 3]> beq skip1423
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1bbf : 00 [ 7]> brk ; Use BRK to return to the monitor
1bc0 : 18 > db test_num
>
1bc1 : >skip1423
1bc1 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1bc2 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1bc4 : cd1002 [ 4] cmp fLDx+3 ;test flags
trap_ne
1bc7 : f002 [ 3]> beq skip1426
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1bc9 : 00 [ 7]> brk ; Use BRK to return to the monitor
1bca : 18 > db test_num
>
1bcb : >skip1426
set_stat 0
> load_flag 0
1bcb : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1bcd : 48 [ 3]> pha ;use stack to load status
1bce : 28 [ 4]> plp
1bcf : ad0802 [ 4] lda abs1
1bd2 : 08 [ 3] php ;test stores do not alter flags
1bd3 : 49c3 [ 2] eor #$c3
1bd5 : 28 [ 4] plp
1bd6 : 85b2 [ 3] sta zpt
1bd8 : 08 [ 3] php ;flags after load/store sequence
1bd9 : 49c3 [ 2] eor #$c3
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 190
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1bdb : c5b9 [ 3] cmp zp1 ;test result
trap_ne
1bdd : f002 [ 3]> beq skip1430
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1bdf : 00 [ 7]> brk ; Use BRK to return to the monitor
1be0 : 18 > db test_num
>
1be1 : >skip1430
1be1 : 68 [ 4] pla ;load status
eor_flag 0
1be2 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1be4 : cd0d02 [ 4] cmp fLDx ;test flags
trap_ne
1be7 : f002 [ 3]> beq skip1433
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1be9 : 00 [ 7]> brk ; Use BRK to return to the monitor
1bea : 18 > db test_num
>
1beb : >skip1433
set_stat 0
> load_flag 0
1beb : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1bed : 48 [ 3]> pha ;use stack to load status
1bee : 28 [ 4]> plp
1bef : ad0902 [ 4] lda abs1+1
1bf2 : 08 [ 3] php ;test stores do not alter flags
1bf3 : 49c3 [ 2] eor #$c3
1bf5 : 28 [ 4] plp
1bf6 : 85b3 [ 3] sta zpt+1
1bf8 : 08 [ 3] php ;flags after load/store sequence
1bf9 : 49c3 [ 2] eor #$c3
1bfb : c5ba [ 3] cmp zp1+1 ;test result
trap_ne
1bfd : f002 [ 4]> beq skip1437
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1bff : 00 [ 7]> brk ; Use BRK to return to the monitor
1c00 : 18 > db test_num
>
1c01 : >skip1437
1c01 : 68 [ 4] pla ;load status
eor_flag 0
1c02 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1c04 : cd0e02 [ 4] cmp fLDx+1 ;test flags
trap_ne
1c07 : f002 [ 3]> beq skip1440
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 191
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1c09 : 00 [ 7]> brk ; Use BRK to return to the monitor
1c0a : 18 > db test_num
>
1c0b : >skip1440
set_stat 0
> load_flag 0
1c0b : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1c0d : 48 [ 3]> pha ;use stack to load status
1c0e : 28 [ 4]> plp
1c0f : ad0a02 [ 4] lda abs1+2
1c12 : 08 [ 3] php ;test stores do not alter flags
1c13 : 49c3 [ 2] eor #$c3
1c15 : 28 [ 4] plp
1c16 : 85b4 [ 3] sta zpt+2
1c18 : 08 [ 3] php ;flags after load/store sequence
1c19 : 49c3 [ 2] eor #$c3
1c1b : c5bb [ 3] cmp zp1+2 ;test result
trap_ne
1c1d : f002 [ 3]> beq skip1444
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1c1f : 00 [ 7]> brk ; Use BRK to return to the monitor
1c20 : 18 > db test_num
>
1c21 : >skip1444
1c21 : 68 [ 4] pla ;load status
eor_flag 0
1c22 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1c24 : cd0f02 [ 4] cmp fLDx+2 ;test flags
trap_ne
1c27 : f002 [ 3]> beq skip1447
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1c29 : 00 [ 7]> brk ; Use BRK to return to the monitor
1c2a : 18 > db test_num
>
1c2b : >skip1447
set_stat 0
> load_flag 0
1c2b : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1c2d : 48 [ 3]> pha ;use stack to load status
1c2e : 28 [ 4]> plp
1c2f : ad0b02 [ 4] lda abs1+3
1c32 : 08 [ 3] php ;test stores do not alter flags
1c33 : 49c3 [ 2] eor #$c3
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 192
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1c35 : 28 [ 4] plp
1c36 : 85b5 [ 3] sta zpt+3
1c38 : 08 [ 3] php ;flags after load/store sequence
1c39 : 49c3 [ 2] eor #$c3
1c3b : c5bc [ 3] cmp zp1+3 ;test result
trap_ne
1c3d : f002 [ 3]> beq skip1451
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1c3f : 00 [ 7]> brk ; Use BRK to return to the monitor
1c40 : 18 > db test_num
>
1c41 : >skip1451
1c41 : 68 [ 4] pla ;load status
eor_flag 0
1c42 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1c44 : cd1002 [ 4] cmp fLDx+3 ;test flags
trap_ne
1c47 : f002 [ 3]> beq skip1454
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1c49 : 00 [ 7]> brk ; Use BRK to return to the monitor
1c4a : 18 > db test_num
>
1c4b : >skip1454
set_stat $ff
> load_flag $ff
1c4b : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1c4d : 48 [ 3]> pha ;use stack to load status
1c4e : 28 [ 4]> plp
1c4f : ad0802 [ 4] lda abs1
1c52 : 08 [ 3] php ;test stores do not alter flags
1c53 : 49c3 [ 2] eor #$c3
1c55 : 28 [ 4] plp
1c56 : 85b2 [ 3] sta zpt
1c58 : 08 [ 3] php ;flags after load/store sequence
1c59 : 49c3 [ 2] eor #$c3
1c5b : c5b9 [ 3] cmp zp1 ;test result
trap_ne
1c5d : f002 [ 3]> beq skip1458
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1c5f : 00 [ 7]> brk ; Use BRK to return to the monitor
1c60 : 18 > db test_num
>
1c61 : >skip1458
1c61 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1c62 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 193
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1c64 : cd0d02 [ 4] cmp fLDx ;test flags
trap_ne
1c67 : f002 [ 3]> beq skip1461
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1c69 : 00 [ 7]> brk ; Use BRK to return to the monitor
1c6a : 18 > db test_num
>
1c6b : >skip1461
set_stat $ff
> load_flag $ff
1c6b : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1c6d : 48 [ 3]> pha ;use stack to load status
1c6e : 28 [ 4]> plp
1c6f : ad0902 [ 4] lda abs1+1
1c72 : 08 [ 3] php ;test stores do not alter flags
1c73 : 49c3 [ 2] eor #$c3
1c75 : 28 [ 4] plp
1c76 : 85b3 [ 3] sta zpt+1
1c78 : 08 [ 3] php ;flags after load/store sequence
1c79 : 49c3 [ 2] eor #$c3
1c7b : c5ba [ 3] cmp zp1+1 ;test result
trap_ne
1c7d : f002 [ 3]> beq skip1465
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1c7f : 00 [ 7]> brk ; Use BRK to return to the monitor
1c80 : 18 > db test_num
>
1c81 : >skip1465
1c81 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1c82 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1c84 : cd0e02 [ 4] cmp fLDx+1 ;test flags
trap_ne
1c87 : f002 [ 3]> beq skip1468
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1c89 : 00 [ 7]> brk ; Use BRK to return to the monitor
1c8a : 18 > db test_num
>
1c8b : >skip1468
set_stat $ff
> load_flag $ff
1c8b : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1c8d : 48 [ 3]> pha ;use stack to load status
1c8e : 28 [ 4]> plp
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 194
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1c8f : ad0a02 [ 4] lda abs1+2
1c92 : 08 [ 3] php ;test stores do not alter flags
1c93 : 49c3 [ 2] eor #$c3
1c95 : 28 [ 4] plp
1c96 : 85b4 [ 3] sta zpt+2
1c98 : 08 [ 3] php ;flags after load/store sequence
1c99 : 49c3 [ 2] eor #$c3
1c9b : c5bb [ 3] cmp zp1+2 ;test result
trap_ne
1c9d : f002 [ 3]> beq skip1472
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1c9f : 00 [ 7]> brk ; Use BRK to return to the monitor
1ca0 : 18 > db test_num
>
1ca1 : >skip1472
1ca1 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1ca2 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1ca4 : cd0f02 [ 4] cmp fLDx+2 ;test flags
trap_ne
1ca7 : f002 [ 3]> beq skip1475
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1ca9 : 00 [ 7]> brk ; Use BRK to return to the monitor
1caa : 18 > db test_num
>
1cab : >skip1475
set_stat $ff
> load_flag $ff
1cab : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1cad : 48 [ 3]> pha ;use stack to load status
1cae : 28 [ 4]> plp
1caf : ad0b02 [ 4] lda abs1+3
1cb2 : 08 [ 3] php ;test stores do not alter flags
1cb3 : 49c3 [ 2] eor #$c3
1cb5 : 28 [ 4] plp
1cb6 : 85b5 [ 3] sta zpt+3
1cb8 : 08 [ 3] php ;flags after load/store sequence
1cb9 : 49c3 [ 2] eor #$c3
1cbb : c5bc [ 3] cmp zp1+3 ;test result
trap_ne
1cbd : f002 [ 3]> beq skip1479
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1cbf : 00 [ 7]> brk ; Use BRK to return to the monitor
1cc0 : 18 > db test_num
>
1cc1 : >skip1479
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 195
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1cc1 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1cc2 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1cc4 : cd1002 [ 4] cmp fLDx+3 ;test flags
trap_ne
1cc7 : f002 [ 3]> beq skip1482
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1cc9 : 00 [ 7]> brk ; Use BRK to return to the monitor
1cca : 18 > db test_num
>
1ccb : >skip1482
set_stat 0
> load_flag 0
1ccb : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1ccd : 48 [ 3]> pha ;use stack to load status
1cce : 28 [ 4]> plp
1ccf : a9c3 [ 2] lda #$c3
1cd1 : 08 [ 3] php
1cd2 : cd0802 [ 4] cmp abs1 ;test result
trap_ne
1cd5 : f002 [ 3]> beq skip1486
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1cd7 : 00 [ 7]> brk ; Use BRK to return to the monitor
1cd8 : 18 > db test_num
>
1cd9 : >skip1486
1cd9 : 68 [ 4] pla ;load status
eor_flag 0
1cda : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1cdc : cd0d02 [ 4] cmp fLDx ;test flags
trap_ne
1cdf : f002 [ 3]> beq skip1489
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1ce1 : 00 [ 7]> brk ; Use BRK to return to the monitor
1ce2 : 18 > db test_num
>
1ce3 : >skip1489
set_stat 0
> load_flag 0
1ce3 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1ce5 : 48 [ 3]> pha ;use stack to load status
1ce6 : 28 [ 4]> plp
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 196
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1ce7 : a982 [ 2] lda #$82
1ce9 : 08 [ 3] php
1cea : cd0902 [ 4] cmp abs1+1 ;test result
trap_ne
1ced : f002 [ 3]> beq skip1493
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1cef : 00 [ 7]> brk ; Use BRK to return to the monitor
1cf0 : 18 > db test_num
>
1cf1 : >skip1493
1cf1 : 68 [ 4] pla ;load status
eor_flag 0
1cf2 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1cf4 : cd0e02 [ 4] cmp fLDx+1 ;test flags
trap_ne
1cf7 : f002 [ 3]> beq skip1496
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1cf9 : 00 [ 7]> brk ; Use BRK to return to the monitor
1cfa : 18 > db test_num
>
1cfb : >skip1496
set_stat 0
> load_flag 0
1cfb : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1cfd : 48 [ 3]> pha ;use stack to load status
1cfe : 28 [ 4]> plp
1cff : a941 [ 2] lda #$41
1d01 : 08 [ 3] php
1d02 : cd0a02 [ 4] cmp abs1+2 ;test result
trap_ne
1d05 : f002 [ 3]> beq skip1500
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1d07 : 00 [ 7]> brk ; Use BRK to return to the monitor
1d08 : 18 > db test_num
>
1d09 : >skip1500
1d09 : 68 [ 4] pla ;load status
eor_flag 0
1d0a : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1d0c : cd0f02 [ 4] cmp fLDx+2 ;test flags
trap_ne
1d0f : f002 [ 3]> beq skip1503
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1d11 : 00 [ 7]> brk ; Use BRK to return to the monitor
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 197
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1d12 : 18 > db test_num
>
1d13 : >skip1503
set_stat 0
> load_flag 0
1d13 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1d15 : 48 [ 3]> pha ;use stack to load status
1d16 : 28 [ 4]> plp
1d17 : a900 [ 2] lda #0
1d19 : 08 [ 3] php
1d1a : cd0b02 [ 4] cmp abs1+3 ;test result
trap_ne
1d1d : f002 [ 3]> beq skip1507
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1d1f : 00 [ 7]> brk ; Use BRK to return to the monitor
1d20 : 18 > db test_num
>
1d21 : >skip1507
1d21 : 68 [ 4] pla ;load status
eor_flag 0
1d22 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
1d24 : cd1002 [ 4] cmp fLDx+3 ;test flags
trap_ne
1d27 : f002 [ 3]> beq skip1510
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1d29 : 00 [ 7]> brk ; Use BRK to return to the monitor
1d2a : 18 > db test_num
>
1d2b : >skip1510
set_stat $ff
> load_flag $ff
1d2b : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1d2d : 48 [ 3]> pha ;use stack to load status
1d2e : 28 [ 4]> plp
1d2f : a9c3 [ 2] lda #$c3
1d31 : 08 [ 3] php
1d32 : cd0802 [ 4] cmp abs1 ;test result
trap_ne
1d35 : f002 [ 3]> beq skip1514
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1d37 : 00 [ 7]> brk ; Use BRK to return to the monitor
1d38 : 18 > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 198
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1d39 : >skip1514
1d39 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1d3a : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1d3c : cd0d02 [ 4] cmp fLDx ;test flags
trap_ne
1d3f : f002 [ 3]> beq skip1517
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1d41 : 00 [ 7]> brk ; Use BRK to return to the monitor
1d42 : 18 > db test_num
>
1d43 : >skip1517
set_stat $ff
> load_flag $ff
1d43 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1d45 : 48 [ 3]> pha ;use stack to load status
1d46 : 28 [ 4]> plp
1d47 : a982 [ 2] lda #$82
1d49 : 08 [ 3] php
1d4a : cd0902 [ 4] cmp abs1+1 ;test result
trap_ne
1d4d : f002 [ 3]> beq skip1521
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1d4f : 00 [ 7]> brk ; Use BRK to return to the monitor
1d50 : 18 > db test_num
>
1d51 : >skip1521
1d51 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1d52 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1d54 : cd0e02 [ 4] cmp fLDx+1 ;test flags
trap_ne
1d57 : f002 [ 3]> beq skip1524
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1d59 : 00 [ 7]> brk ; Use BRK to return to the monitor
1d5a : 18 > db test_num
>
1d5b : >skip1524
set_stat $ff
> load_flag $ff
1d5b : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1d5d : 48 [ 3]> pha ;use stack to load status
1d5e : 28 [ 4]> plp
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 199
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1d5f : a941 [ 2] lda #$41
1d61 : 08 [ 3] php
1d62 : cd0a02 [ 4] cmp abs1+2 ;test result
trap_ne
1d65 : f002 [ 3]> beq skip1528
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1d67 : 00 [ 7]> brk ; Use BRK to return to the monitor
1d68 : 18 > db test_num
>
1d69 : >skip1528
1d69 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1d6a : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1d6c : cd0f02 [ 4] cmp fLDx+2 ;test flags
trap_ne
1d6f : f002 [ 3]> beq skip1531
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1d71 : 00 [ 7]> brk ; Use BRK to return to the monitor
1d72 : 18 > db test_num
>
1d73 : >skip1531
set_stat $ff
> load_flag $ff
1d73 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1d75 : 48 [ 3]> pha ;use stack to load status
1d76 : 28 [ 4]> plp
1d77 : a900 [ 2] lda #0
1d79 : 08 [ 3] php
1d7a : cd0b02 [ 4] cmp abs1+3 ;test result
trap_ne
1d7d : f002 [ 3]> beq skip1535
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1d7f : 00 [ 7]> brk ; Use BRK to return to the monitor
1d80 : 18 > db test_num
>
1d81 : >skip1535
1d81 : 68 [ 4] pla ;load status
eor_flag lo~fnz ;mask bits not altered
1d82 : 497d [ 2]> eor #lo~fnz |fao ;invert expected flags + always on bits
1d84 : cd1002 [ 4] cmp fLDx+3 ;test flags
trap_ne
1d87 : f002 [ 3]> beq skip1538
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 200
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1d89 : 00 [ 7]> brk ; Use BRK to return to the monitor
1d8a : 18 > db test_num
>
1d8b : >skip1538
1d8b : a200 [ 2] ldx #0
1d8d : a5b2 [ 3] lda zpt
1d8f : 49c3 [ 2] eor #$c3
1d91 : c5b9 [ 3] cmp zp1
trap_ne ;store to zp data
1d93 : f002 [ 3]> beq skip1540
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1d95 : 00 [ 7]> brk ; Use BRK to return to the monitor
1d96 : 18 > db test_num
>
1d97 : >skip1540
1d97 : 86b2 [ 3] stx zpt ;clear
1d99 : ad0302 [ 4] lda abst
1d9c : 49c3 [ 2] eor #$c3
1d9e : cd0802 [ 4] cmp abs1
trap_ne ;store to abs data
1da1 : f002 [ 3]> beq skip1542
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1da3 : 00 [ 7]> brk ; Use BRK to return to the monitor
1da4 : 18 > db test_num
>
1da5 : >skip1542
1da5 : 8e0302 [ 4] stx abst ;clear
1da8 : a5b3 [ 3] lda zpt+1
1daa : 49c3 [ 2] eor #$c3
1dac : c5ba [ 3] cmp zp1+1
trap_ne ;store to zp data
1dae : f002 [ 3]> beq skip1544
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1db0 : 00 [ 7]> brk ; Use BRK to return to the monitor
1db1 : 18 > db test_num
>
1db2 : >skip1544
1db2 : 86b3 [ 3] stx zpt+1 ;clear
1db4 : ad0402 [ 4] lda abst+1
1db7 : 49c3 [ 2] eor #$c3
1db9 : cd0902 [ 4] cmp abs1+1
trap_ne ;store to abs data
1dbc : f002 [ 3]> beq skip1546
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1dbe : 00 [ 7]> brk ; Use BRK to return to the monitor
1dbf : 18 > db test_num
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 201
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
1dc0 : >skip1546
1dc0 : 8e0402 [ 4] stx abst+1 ;clear
1dc3 : a5b4 [ 3] lda zpt+2
1dc5 : 49c3 [ 2] eor #$c3
1dc7 : c5bb [ 3] cmp zp1+2
trap_ne ;store to zp data
1dc9 : f002 [ 3]> beq skip1548
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1dcb : 00 [ 7]> brk ; Use BRK to return to the monitor
1dcc : 18 > db test_num
>
1dcd : >skip1548
1dcd : 86b4 [ 3] stx zpt+2 ;clear
1dcf : ad0502 [ 4] lda abst+2
1dd2 : 49c3 [ 2] eor #$c3
1dd4 : cd0a02 [ 4] cmp abs1+2
trap_ne ;store to abs data
1dd7 : f002 [ 3]> beq skip1550
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1dd9 : 00 [ 7]> brk ; Use BRK to return to the monitor
1dda : 18 > db test_num
>
1ddb : >skip1550
1ddb : 8e0502 [ 4] stx abst+2 ;clear
1dde : a5b5 [ 3] lda zpt+3
1de0 : 49c3 [ 2] eor #$c3
1de2 : c5bc [ 3] cmp zp1+3
trap_ne ;store to zp data
1de4 : f002 [ 3]> beq skip1552
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1de6 : 00 [ 7]> brk ; Use BRK to return to the monitor
1de7 : 18 > db test_num
>
1de8 : >skip1552
1de8 : 86b5 [ 3] stx zpt+3 ;clear
1dea : ad0602 [ 4] lda abst+3
1ded : 49c3 [ 2] eor #$c3
1def : cd0b02 [ 4] cmp abs1+3
trap_ne ;store to abs data
1df2 : f002 [ 3]> beq skip1554
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1df4 : 00 [ 7]> brk ; Use BRK to return to the monitor
1df5 : 18 > db test_num
>
1df6 : >skip1554
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 202
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1df6 : 8e0602 [ 4] stx abst+3 ;clear
next_test
1df9 : ad0002 [ 4]> lda test_case ;previous test
1dfc : c918 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
1dfe : f002 [ 4]> beq skip1557
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1e00 : 00 [ 7]> brk ; Use BRK to return to the monitor
1e01 : 18 > db test_num
>
1e02 : >skip1557
>
0019 = >test_num = test_num + 1
1e02 : a919 [ 2]> lda #test_num ;*** this tests' number
1e04 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; testing bit test & compares BIT CPX CPY CMP all addressing modes
; BIT - zp / abs
set_a $ff,0
> load_flag 0
1e07 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1e09 : 48 [ 3]> pha ;use stack to load status
1e0a : a9ff [ 2]> lda #$ff ;precharge accu
1e0c : 28 [ 4]> plp
1e0d : 24bc [ 3] bit zp1+3 ;00 - should set Z / clear NV
tst_a $ff,fz
1e0f : 08 [ 3]> php ;save flags
1e10 : 08 [ 3]> php
1e11 : c9ff [ 2]> cmp #$ff ;test result
> trap_ne
1e13 : f002 [ 3]> beq skip1562
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1e15 : 00 [ 7]> brk ; Use BRK to return to the monitor
1e16 : 19 > db test_num
>
1e17 : >skip1562
>
1e17 : 68 [ 4]> pla ;load status
> cmp_flag fz
1e18 : c932 [ 2]> cmp #(fz |fao)&m8 ;expected flags + always on bits
>
> trap_ne
1e1a : f002 [ 3]> beq skip1565
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1e1c : 00 [ 7]> brk ; Use BRK to return to the monitor
1e1d : 19 > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 203
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1e1e : >skip1565
>
1e1e : 28 [ 4]> plp ;restore status
set_a 1,0
> load_flag 0
1e1f : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1e21 : 48 [ 3]> pha ;use stack to load status
1e22 : a901 [ 2]> lda #1 ;precharge accu
1e24 : 28 [ 4]> plp
1e25 : 24bb [ 3] bit zp1+2 ;41 - should set V (M6) / clear NZ
tst_a 1,fv
1e27 : 08 [ 3]> php ;save flags
1e28 : 08 [ 3]> php
1e29 : c901 [ 2]> cmp #1 ;test result
> trap_ne
1e2b : f002 [ 3]> beq skip1570
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1e2d : 00 [ 7]> brk ; Use BRK to return to the monitor
1e2e : 19 > db test_num
>
1e2f : >skip1570
>
1e2f : 68 [ 4]> pla ;load status
> cmp_flag fv
1e30 : c970 [ 2]> cmp #(fv|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1e32 : f002 [ 3]> beq skip1573
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1e34 : 00 [ 7]> brk ; Use BRK to return to the monitor
1e35 : 19 > db test_num
>
1e36 : >skip1573
>
1e36 : 28 [ 4]> plp ;restore status
set_a 1,0
> load_flag 0
1e37 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1e39 : 48 [ 3]> pha ;use stack to load status
1e3a : a901 [ 2]> lda #1 ;precharge accu
1e3c : 28 [ 4]> plp
1e3d : 24ba [ 3] bit zp1+1 ;82 - should set N (M7) & Z / clear V
tst_a 1,fnz
1e3f : 08 [ 3]> php ;save flags
1e40 : 08 [ 3]> php
1e41 : c901 [ 2]> cmp #1 ;test result
> trap_ne
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 204
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1e43 : f002 [ 3]> beq skip1578
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1e45 : 00 [ 7]> brk ; Use BRK to return to the monitor
1e46 : 19 > db test_num
>
1e47 : >skip1578
>
1e47 : 68 [ 4]> pla ;load status
> cmp_flag fnz
1e48 : c9b2 [ 2]> cmp #(fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1e4a : f002 [ 3]> beq skip1581
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1e4c : 00 [ 7]> brk ; Use BRK to return to the monitor
1e4d : 19 > db test_num
>
1e4e : >skip1581
>
1e4e : 28 [ 4]> plp ;restore status
set_a 1,0
> load_flag 0
1e4f : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1e51 : 48 [ 3]> pha ;use stack to load status
1e52 : a901 [ 2]> lda #1 ;precharge accu
1e54 : 28 [ 4]> plp
1e55 : 24b9 [ 3] bit zp1 ;c3 - should set N (M7) & V (M6) / clear Z
tst_a 1,fnv
1e57 : 08 [ 3]> php ;save flags
1e58 : 08 [ 3]> php
1e59 : c901 [ 2]> cmp #1 ;test result
> trap_ne
1e5b : f002 [ 3]> beq skip1586
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1e5d : 00 [ 7]> brk ; Use BRK to return to the monitor
1e5e : 19 > db test_num
>
1e5f : >skip1586
>
1e5f : 68 [ 4]> pla ;load status
> cmp_flag fnv
1e60 : c9f0 [ 2]> cmp #(fnv|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1e62 : f002 [ 3]> beq skip1589
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1e64 : 00 [ 7]> brk ; Use BRK to return to the monitor
1e65 : 19 > db test_num
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 205
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
1e66 : >skip1589
>
1e66 : 28 [ 4]> plp ;restore status
set_a $ff,$ff
> load_flag $ff
1e67 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1e69 : 48 [ 3]> pha ;use stack to load status
1e6a : a9ff [ 2]> lda #$ff ;precharge accu
1e6c : 28 [ 4]> plp
1e6d : 24bc [ 3] bit zp1+3 ;00 - should set Z / clear NV
tst_a $ff,~fnv
1e6f : 08 [ 3]> php ;save flags
1e70 : 08 [ 3]> php
1e71 : c9ff [ 2]> cmp #$ff ;test result
> trap_ne
1e73 : f002 [ 3]> beq skip1594
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1e75 : 00 [ 7]> brk ; Use BRK to return to the monitor
1e76 : 19 > db test_num
>
1e77 : >skip1594
>
1e77 : 68 [ 4]> pla ;load status
> cmp_flag ~fnv
1e78 : c93f [ 2]> cmp #(~fnv |fao)&m8 ;expected flags + always on bits
>
> trap_ne
1e7a : f002 [ 3]> beq skip1597
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1e7c : 00 [ 7]> brk ; Use BRK to return to the monitor
1e7d : 19 > db test_num
>
1e7e : >skip1597
>
1e7e : 28 [ 4]> plp ;restore status
set_a 1,$ff
> load_flag $ff
1e7f : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1e81 : 48 [ 3]> pha ;use stack to load status
1e82 : a901 [ 2]> lda #1 ;precharge accu
1e84 : 28 [ 4]> plp
1e85 : 24bb [ 3] bit zp1+2 ;41 - should set V (M6) / clear NZ
tst_a 1,~fnz
1e87 : 08 [ 3]> php ;save flags
1e88 : 08 [ 3]> php
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 206
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1e89 : c901 [ 2]> cmp #1 ;test result
> trap_ne
1e8b : f002 [ 3]> beq skip1602
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1e8d : 00 [ 7]> brk ; Use BRK to return to the monitor
1e8e : 19 > db test_num
>
1e8f : >skip1602
>
1e8f : 68 [ 4]> pla ;load status
> cmp_flag ~fnz
1e90 : c97d [ 2]> cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1e92 : f002 [ 3]> beq skip1605
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1e94 : 00 [ 7]> brk ; Use BRK to return to the monitor
1e95 : 19 > db test_num
>
1e96 : >skip1605
>
1e96 : 28 [ 4]> plp ;restore status
set_a 1,$ff
> load_flag $ff
1e97 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1e99 : 48 [ 3]> pha ;use stack to load status
1e9a : a901 [ 2]> lda #1 ;precharge accu
1e9c : 28 [ 4]> plp
1e9d : 24ba [ 3] bit zp1+1 ;82 - should set N (M7) & Z / clear V
tst_a 1,~fv
1e9f : 08 [ 3]> php ;save flags
1ea0 : 08 [ 3]> php
1ea1 : c901 [ 2]> cmp #1 ;test result
> trap_ne
1ea3 : f002 [ 3]> beq skip1610
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1ea5 : 00 [ 7]> brk ; Use BRK to return to the monitor
1ea6 : 19 > db test_num
>
1ea7 : >skip1610
>
1ea7 : 68 [ 4]> pla ;load status
> cmp_flag ~fv
1ea8 : c9bf [ 2]> cmp #(~fv|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1eaa : f002 [ 3]> beq skip1613
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 207
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1eac : 00 [ 7]> brk ; Use BRK to return to the monitor
1ead : 19 > db test_num
>
1eae : >skip1613
>
1eae : 28 [ 4]> plp ;restore status
set_a 1,$ff
> load_flag $ff
1eaf : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1eb1 : 48 [ 3]> pha ;use stack to load status
1eb2 : a901 [ 2]> lda #1 ;precharge accu
1eb4 : 28 [ 4]> plp
1eb5 : 24b9 [ 3] bit zp1 ;c3 - should set N (M7) & V (M6) / clear Z
tst_a 1,~fz
1eb7 : 08 [ 3]> php ;save flags
1eb8 : 08 [ 3]> php
1eb9 : c901 [ 2]> cmp #1 ;test result
> trap_ne
1ebb : f002 [ 3]> beq skip1618
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1ebd : 00 [ 7]> brk ; Use BRK to return to the monitor
1ebe : 19 > db test_num
>
1ebf : >skip1618
>
1ebf : 68 [ 4]> pla ;load status
> cmp_flag ~fz
1ec0 : c9fd [ 2]> cmp #(~fz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1ec2 : f002 [ 3]> beq skip1621
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1ec4 : 00 [ 7]> brk ; Use BRK to return to the monitor
1ec5 : 19 > db test_num
>
1ec6 : >skip1621
>
1ec6 : 28 [ 4]> plp ;restore status
set_a $ff,0
> load_flag 0
1ec7 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1ec9 : 48 [ 3]> pha ;use stack to load status
1eca : a9ff [ 2]> lda #$ff ;precharge accu
1ecc : 28 [ 4]> plp
1ecd : 2c0b02 [ 4] bit abs1+3 ;00 - should set Z / clear NV
tst_a $ff,fz
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 208
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1ed0 : 08 [ 3]> php ;save flags
1ed1 : 08 [ 3]> php
1ed2 : c9ff [ 2]> cmp #$ff ;test result
> trap_ne
1ed4 : f002 [ 3]> beq skip1626
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1ed6 : 00 [ 7]> brk ; Use BRK to return to the monitor
1ed7 : 19 > db test_num
>
1ed8 : >skip1626
>
1ed8 : 68 [ 4]> pla ;load status
> cmp_flag fz
1ed9 : c932 [ 2]> cmp #(fz |fao)&m8 ;expected flags + always on bits
>
> trap_ne
1edb : f002 [ 3]> beq skip1629
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1edd : 00 [ 7]> brk ; Use BRK to return to the monitor
1ede : 19 > db test_num
>
1edf : >skip1629
>
1edf : 28 [ 4]> plp ;restore status
set_a 1,0
> load_flag 0
1ee0 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1ee2 : 48 [ 3]> pha ;use stack to load status
1ee3 : a901 [ 2]> lda #1 ;precharge accu
1ee5 : 28 [ 4]> plp
1ee6 : 2c0a02 [ 4] bit abs1+2 ;41 - should set V (M6) / clear NZ
tst_a 1,fv
1ee9 : 08 [ 3]> php ;save flags
1eea : 08 [ 3]> php
1eeb : c901 [ 2]> cmp #1 ;test result
> trap_ne
1eed : f002 [ 3]> beq skip1634
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1eef : 00 [ 7]> brk ; Use BRK to return to the monitor
1ef0 : 19 > db test_num
>
1ef1 : >skip1634
>
1ef1 : 68 [ 4]> pla ;load status
> cmp_flag fv
1ef2 : c970 [ 2]> cmp #(fv|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1ef4 : f002 [ 3]> beq skip1637
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 209
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1ef6 : 00 [ 7]> brk ; Use BRK to return to the monitor
1ef7 : 19 > db test_num
>
1ef8 : >skip1637
>
1ef8 : 28 [ 4]> plp ;restore status
set_a 1,0
> load_flag 0
1ef9 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1efb : 48 [ 3]> pha ;use stack to load status
1efc : a901 [ 2]> lda #1 ;precharge accu
1efe : 28 [ 4]> plp
1eff : 2c0902 [ 4] bit abs1+1 ;82 - should set N (M7) & Z / clear V
tst_a 1,fnz
1f02 : 08 [ 3]> php ;save flags
1f03 : 08 [ 3]> php
1f04 : c901 [ 2]> cmp #1 ;test result
> trap_ne
1f06 : f002 [ 3]> beq skip1642
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1f08 : 00 [ 7]> brk ; Use BRK to return to the monitor
1f09 : 19 > db test_num
>
1f0a : >skip1642
>
1f0a : 68 [ 4]> pla ;load status
> cmp_flag fnz
1f0b : c9b2 [ 2]> cmp #(fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1f0d : f002 [ 3]> beq skip1645
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1f0f : 00 [ 7]> brk ; Use BRK to return to the monitor
1f10 : 19 > db test_num
>
1f11 : >skip1645
>
1f11 : 28 [ 4]> plp ;restore status
set_a 1,0
> load_flag 0
1f12 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1f14 : 48 [ 3]> pha ;use stack to load status
1f15 : a901 [ 2]> lda #1 ;precharge accu
1f17 : 28 [ 4]> plp
1f18 : 2c0802 [ 4] bit abs1 ;c3 - should set N (M7) & V (M6) / clear Z
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 210
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
tst_a 1,fnv
1f1b : 08 [ 3]> php ;save flags
1f1c : 08 [ 3]> php
1f1d : c901 [ 2]> cmp #1 ;test result
> trap_ne
1f1f : f002 [ 3]> beq skip1650
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1f21 : 00 [ 7]> brk ; Use BRK to return to the monitor
1f22 : 19 > db test_num
>
1f23 : >skip1650
>
1f23 : 68 [ 4]> pla ;load status
> cmp_flag fnv
1f24 : c9f0 [ 2]> cmp #(fnv|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1f26 : f002 [ 3]> beq skip1653
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1f28 : 00 [ 7]> brk ; Use BRK to return to the monitor
1f29 : 19 > db test_num
>
1f2a : >skip1653
>
1f2a : 28 [ 4]> plp ;restore status
set_a $ff,$ff
> load_flag $ff
1f2b : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1f2d : 48 [ 3]> pha ;use stack to load status
1f2e : a9ff [ 2]> lda #$ff ;precharge accu
1f30 : 28 [ 4]> plp
1f31 : 2c0b02 [ 4] bit abs1+3 ;00 - should set Z / clear NV
tst_a $ff,~fnv
1f34 : 08 [ 3]> php ;save flags
1f35 : 08 [ 3]> php
1f36 : c9ff [ 2]> cmp #$ff ;test result
> trap_ne
1f38 : f002 [ 3]> beq skip1658
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1f3a : 00 [ 7]> brk ; Use BRK to return to the monitor
1f3b : 19 > db test_num
>
1f3c : >skip1658
>
1f3c : 68 [ 4]> pla ;load status
> cmp_flag ~fnv
1f3d : c93f [ 2]> cmp #(~fnv |fao)&m8 ;expected flags + always on bits
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 211
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap_ne
1f3f : f002 [ 3]> beq skip1661
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1f41 : 00 [ 7]> brk ; Use BRK to return to the monitor
1f42 : 19 > db test_num
>
1f43 : >skip1661
>
1f43 : 28 [ 4]> plp ;restore status
set_a 1,$ff
> load_flag $ff
1f44 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1f46 : 48 [ 3]> pha ;use stack to load status
1f47 : a901 [ 2]> lda #1 ;precharge accu
1f49 : 28 [ 4]> plp
1f4a : 2c0a02 [ 4] bit abs1+2 ;41 - should set V (M6) / clear NZ
tst_a 1,~fnz
1f4d : 08 [ 3]> php ;save flags
1f4e : 08 [ 3]> php
1f4f : c901 [ 2]> cmp #1 ;test result
> trap_ne
1f51 : f002 [ 3]> beq skip1666
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1f53 : 00 [ 7]> brk ; Use BRK to return to the monitor
1f54 : 19 > db test_num
>
1f55 : >skip1666
>
1f55 : 68 [ 4]> pla ;load status
> cmp_flag ~fnz
1f56 : c97d [ 2]> cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1f58 : f002 [ 3]> beq skip1669
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1f5a : 00 [ 7]> brk ; Use BRK to return to the monitor
1f5b : 19 > db test_num
>
1f5c : >skip1669
>
1f5c : 28 [ 4]> plp ;restore status
set_a 1,$ff
> load_flag $ff
1f5d : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1f5f : 48 [ 3]> pha ;use stack to load status
1f60 : a901 [ 2]> lda #1 ;precharge accu
1f62 : 28 [ 4]> plp
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 212
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1f63 : 2c0902 [ 4] bit abs1+1 ;82 - should set N (M7) & Z / clear V
tst_a 1,~fv
1f66 : 08 [ 3]> php ;save flags
1f67 : 08 [ 3]> php
1f68 : c901 [ 2]> cmp #1 ;test result
> trap_ne
1f6a : f002 [ 3]> beq skip1674
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1f6c : 00 [ 7]> brk ; Use BRK to return to the monitor
1f6d : 19 > db test_num
>
1f6e : >skip1674
>
1f6e : 68 [ 4]> pla ;load status
> cmp_flag ~fv
1f6f : c9bf [ 2]> cmp #(~fv|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1f71 : f002 [ 3]> beq skip1677
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1f73 : 00 [ 7]> brk ; Use BRK to return to the monitor
1f74 : 19 > db test_num
>
1f75 : >skip1677
>
1f75 : 28 [ 4]> plp ;restore status
set_a 1,$ff
> load_flag $ff
1f76 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1f78 : 48 [ 3]> pha ;use stack to load status
1f79 : a901 [ 2]> lda #1 ;precharge accu
1f7b : 28 [ 4]> plp
1f7c : 2c0802 [ 4] bit abs1 ;c3 - should set N (M7) & V (M6) / clear Z
tst_a 1,~fz
1f7f : 08 [ 3]> php ;save flags
1f80 : 08 [ 3]> php
1f81 : c901 [ 2]> cmp #1 ;test result
> trap_ne
1f83 : f002 [ 3]> beq skip1682
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1f85 : 00 [ 7]> brk ; Use BRK to return to the monitor
1f86 : 19 > db test_num
>
1f87 : >skip1682
>
1f87 : 68 [ 4]> pla ;load status
> cmp_flag ~fz
1f88 : c9fd [ 2]> cmp #(~fz|fao)&m8 ;expected flags + always on bits
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 213
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
> trap_ne
1f8a : f002 [ 3]> beq skip1685
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1f8c : 00 [ 7]> brk ; Use BRK to return to the monitor
1f8d : 19 > db test_num
>
1f8e : >skip1685
>
1f8e : 28 [ 4]> plp ;restore status
next_test
1f8f : ad0002 [ 4]> lda test_case ;previous test
1f92 : c919 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
1f94 : f002 [ 3]> beq skip1688
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1f96 : 00 [ 7]> brk ; Use BRK to return to the monitor
1f97 : 19 > db test_num
>
1f98 : >skip1688
>
001a = >test_num = test_num + 1
1f98 : a91a [ 2]> lda #test_num ;*** this tests' number
1f9a : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; CPX - zp / abs / #
set_x $80,0
> load_flag 0
1f9d : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
1f9f : 48 [ 3]> pha ;use stack to load status
1fa0 : a280 [ 2]> ldx #$80 ;precharge index x
1fa2 : 28 [ 4]> plp
1fa3 : e4bd [ 3] cpx zp7f
tst_stat fc
1fa5 : 08 [ 3]> php ;save status
1fa6 : 08 [ 3]> php ;use stack to retrieve status
1fa7 : 68 [ 4]> pla
> cmp_flag fc
1fa8 : c931 [ 2]> cmp #(fc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1faa : f002 [ 3]> beq skip1694
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1fac : 00 [ 7]> brk ; Use BRK to return to the monitor
1fad : 1a > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 214
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
1fae : >skip1694
>
1fae : 28 [ 4]> plp ;restore status
1faf : ca [ 2] dex
1fb0 : e4bd [ 3] cpx zp7f
tst_stat fzc
1fb2 : 08 [ 3]> php ;save status
1fb3 : 08 [ 3]> php ;use stack to retrieve status
1fb4 : 68 [ 4]> pla
> cmp_flag fzc
1fb5 : c933 [ 2]> cmp #(fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1fb7 : f002 [ 3]> beq skip1698
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1fb9 : 00 [ 7]> brk ; Use BRK to return to the monitor
1fba : 1a > db test_num
>
1fbb : >skip1698
>
1fbb : 28 [ 4]> plp ;restore status
1fbc : ca [ 2] dex
1fbd : e4bd [ 3] cpx zp7f
tst_x $7e,fn
1fbf : 08 [ 3]> php ;save flags
1fc0 : 08 [ 3]> php
1fc1 : e07e [ 2]> cpx #$7e ;test result
> trap_ne
1fc3 : f002 [ 3]> beq skip1701
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1fc5 : 00 [ 7]> brk ; Use BRK to return to the monitor
1fc6 : 1a > db test_num
>
1fc7 : >skip1701
>
1fc7 : 68 [ 4]> pla ;load status
> cmp_flag fn
1fc8 : c9b0 [ 2]> cmp #(fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1fca : f002 [ 3]> beq skip1704
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1fcc : 00 [ 7]> brk ; Use BRK to return to the monitor
1fcd : 1a > db test_num
>
1fce : >skip1704
>
1fce : 28 [ 4]> plp ;restore status
set_x $80,$ff
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 215
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> load_flag $ff
1fcf : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
1fd1 : 48 [ 3]> pha ;use stack to load status
1fd2 : a280 [ 2]> ldx #$80 ;precharge index x
1fd4 : 28 [ 4]> plp
1fd5 : e4bd [ 3] cpx zp7f
tst_stat ~fnz
1fd7 : 08 [ 3]> php ;save status
1fd8 : 08 [ 3]> php ;use stack to retrieve status
1fd9 : 68 [ 4]> pla
> cmp_flag ~fnz
1fda : c97d [ 2]> cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1fdc : f002 [ 3]> beq skip1710
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1fde : 00 [ 7]> brk ; Use BRK to return to the monitor
1fdf : 1a > db test_num
>
1fe0 : >skip1710
>
1fe0 : 28 [ 4]> plp ;restore status
1fe1 : ca [ 2] dex
1fe2 : e4bd [ 3] cpx zp7f
tst_stat ~fn
1fe4 : 08 [ 3]> php ;save status
1fe5 : 08 [ 3]> php ;use stack to retrieve status
1fe6 : 68 [ 4]> pla
> cmp_flag ~fn
1fe7 : c97f [ 2]> cmp #(~fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1fe9 : f002 [ 3]> beq skip1714
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1feb : 00 [ 7]> brk ; Use BRK to return to the monitor
1fec : 1a > db test_num
>
1fed : >skip1714
>
1fed : 28 [ 4]> plp ;restore status
1fee : ca [ 2] dex
1fef : e4bd [ 3] cpx zp7f
tst_x $7e,~fzc
1ff1 : 08 [ 3]> php ;save flags
1ff2 : 08 [ 3]> php
1ff3 : e07e [ 2]> cpx #$7e ;test result
> trap_ne
1ff5 : f002 [ 3]> beq skip1717
> trap ;failed equal (zero)
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 216
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>; db $db ; M65C02/M65C02A SToP instruction
1ff7 : 00 [ 7]> brk ; Use BRK to return to the monitor
1ff8 : 1a > db test_num
>
1ff9 : >skip1717
>
1ff9 : 68 [ 4]> pla ;load status
> cmp_flag ~fzc
1ffa : c9fc [ 2]> cmp #(~fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
1ffc : f002 [ 4]> beq skip1720
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
1ffe : 00 [ 7]> brk ; Use BRK to return to the monitor
1fff : 1a > db test_num
>
2000 : >skip1720
>
2000 : 28 [ 4]> plp ;restore status
set_x $80,0
> load_flag 0
2001 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2003 : 48 [ 3]> pha ;use stack to load status
2004 : a280 [ 2]> ldx #$80 ;precharge index x
2006 : 28 [ 4]> plp
2007 : ec0c02 [ 4] cpx abs7f
tst_stat fc
200a : 08 [ 3]> php ;save status
200b : 08 [ 3]> php ;use stack to retrieve status
200c : 68 [ 4]> pla
> cmp_flag fc
200d : c931 [ 2]> cmp #(fc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
200f : f002 [ 3]> beq skip1726
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2011 : 00 [ 7]> brk ; Use BRK to return to the monitor
2012 : 1a > db test_num
>
2013 : >skip1726
>
2013 : 28 [ 4]> plp ;restore status
2014 : ca [ 2] dex
2015 : ec0c02 [ 4] cpx abs7f
tst_stat fzc
2018 : 08 [ 3]> php ;save status
2019 : 08 [ 3]> php ;use stack to retrieve status
201a : 68 [ 4]> pla
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 217
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> cmp_flag fzc
201b : c933 [ 2]> cmp #(fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
201d : f002 [ 3]> beq skip1730
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
201f : 00 [ 7]> brk ; Use BRK to return to the monitor
2020 : 1a > db test_num
>
2021 : >skip1730
>
2021 : 28 [ 4]> plp ;restore status
2022 : ca [ 2] dex
2023 : ec0c02 [ 4] cpx abs7f
tst_x $7e,fn
2026 : 08 [ 3]> php ;save flags
2027 : 08 [ 3]> php
2028 : e07e [ 2]> cpx #$7e ;test result
> trap_ne
202a : f002 [ 3]> beq skip1733
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
202c : 00 [ 7]> brk ; Use BRK to return to the monitor
202d : 1a > db test_num
>
202e : >skip1733
>
202e : 68 [ 4]> pla ;load status
> cmp_flag fn
202f : c9b0 [ 2]> cmp #(fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2031 : f002 [ 3]> beq skip1736
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2033 : 00 [ 7]> brk ; Use BRK to return to the monitor
2034 : 1a > db test_num
>
2035 : >skip1736
>
2035 : 28 [ 4]> plp ;restore status
set_x $80,$ff
> load_flag $ff
2036 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2038 : 48 [ 3]> pha ;use stack to load status
2039 : a280 [ 2]> ldx #$80 ;precharge index x
203b : 28 [ 4]> plp
203c : ec0c02 [ 4] cpx abs7f
tst_stat ~fnz
203f : 08 [ 3]> php ;save status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 218
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2040 : 08 [ 3]> php ;use stack to retrieve status
2041 : 68 [ 4]> pla
> cmp_flag ~fnz
2042 : c97d [ 2]> cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2044 : f002 [ 3]> beq skip1742
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2046 : 00 [ 7]> brk ; Use BRK to return to the monitor
2047 : 1a > db test_num
>
2048 : >skip1742
>
2048 : 28 [ 4]> plp ;restore status
2049 : ca [ 2] dex
204a : ec0c02 [ 4] cpx abs7f
tst_stat ~fn
204d : 08 [ 3]> php ;save status
204e : 08 [ 3]> php ;use stack to retrieve status
204f : 68 [ 4]> pla
> cmp_flag ~fn
2050 : c97f [ 2]> cmp #(~fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2052 : f002 [ 3]> beq skip1746
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2054 : 00 [ 7]> brk ; Use BRK to return to the monitor
2055 : 1a > db test_num
>
2056 : >skip1746
>
2056 : 28 [ 4]> plp ;restore status
2057 : ca [ 2] dex
2058 : ec0c02 [ 4] cpx abs7f
tst_x $7e,~fzc
205b : 08 [ 3]> php ;save flags
205c : 08 [ 3]> php
205d : e07e [ 2]> cpx #$7e ;test result
> trap_ne
205f : f002 [ 3]> beq skip1749
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2061 : 00 [ 7]> brk ; Use BRK to return to the monitor
2062 : 1a > db test_num
>
2063 : >skip1749
>
2063 : 68 [ 4]> pla ;load status
> cmp_flag ~fzc
2064 : c9fc [ 2]> cmp #(~fzc|fao)&m8 ;expected flags + always on bits
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 219
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap_ne
2066 : f002 [ 3]> beq skip1752
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2068 : 00 [ 7]> brk ; Use BRK to return to the monitor
2069 : 1a > db test_num
>
206a : >skip1752
>
206a : 28 [ 4]> plp ;restore status
set_x $80,0
> load_flag 0
206b : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
206d : 48 [ 3]> pha ;use stack to load status
206e : a280 [ 2]> ldx #$80 ;precharge index x
2070 : 28 [ 4]> plp
2071 : e07f [ 2] cpx #$7f
tst_stat fc
2073 : 08 [ 3]> php ;save status
2074 : 08 [ 3]> php ;use stack to retrieve status
2075 : 68 [ 4]> pla
> cmp_flag fc
2076 : c931 [ 2]> cmp #(fc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2078 : f002 [ 3]> beq skip1758
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
207a : 00 [ 7]> brk ; Use BRK to return to the monitor
207b : 1a > db test_num
>
207c : >skip1758
>
207c : 28 [ 4]> plp ;restore status
207d : ca [ 2] dex
207e : e07f [ 2] cpx #$7f
tst_stat fzc
2080 : 08 [ 3]> php ;save status
2081 : 08 [ 3]> php ;use stack to retrieve status
2082 : 68 [ 4]> pla
> cmp_flag fzc
2083 : c933 [ 2]> cmp #(fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2085 : f002 [ 3]> beq skip1762
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2087 : 00 [ 7]> brk ; Use BRK to return to the monitor
2088 : 1a > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 220
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2089 : >skip1762
>
2089 : 28 [ 4]> plp ;restore status
208a : ca [ 2] dex
208b : e07f [ 2] cpx #$7f
tst_x $7e,fn
208d : 08 [ 3]> php ;save flags
208e : 08 [ 3]> php
208f : e07e [ 2]> cpx #$7e ;test result
> trap_ne
2091 : f002 [ 3]> beq skip1765
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2093 : 00 [ 7]> brk ; Use BRK to return to the monitor
2094 : 1a > db test_num
>
2095 : >skip1765
>
2095 : 68 [ 4]> pla ;load status
> cmp_flag fn
2096 : c9b0 [ 2]> cmp #(fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2098 : f002 [ 3]> beq skip1768
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
209a : 00 [ 7]> brk ; Use BRK to return to the monitor
209b : 1a > db test_num
>
209c : >skip1768
>
209c : 28 [ 4]> plp ;restore status
set_x $80,$ff
> load_flag $ff
209d : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
209f : 48 [ 3]> pha ;use stack to load status
20a0 : a280 [ 2]> ldx #$80 ;precharge index x
20a2 : 28 [ 4]> plp
20a3 : e07f [ 2] cpx #$7f
tst_stat ~fnz
20a5 : 08 [ 3]> php ;save status
20a6 : 08 [ 3]> php ;use stack to retrieve status
20a7 : 68 [ 4]> pla
> cmp_flag ~fnz
20a8 : c97d [ 2]> cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
20aa : f002 [ 3]> beq skip1774
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
20ac : 00 [ 7]> brk ; Use BRK to return to the monitor
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 221
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
20ad : 1a > db test_num
>
20ae : >skip1774
>
20ae : 28 [ 4]> plp ;restore status
20af : ca [ 2] dex
20b0 : e07f [ 2] cpx #$7f
tst_stat ~fn
20b2 : 08 [ 3]> php ;save status
20b3 : 08 [ 3]> php ;use stack to retrieve status
20b4 : 68 [ 4]> pla
> cmp_flag ~fn
20b5 : c97f [ 2]> cmp #(~fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
20b7 : f002 [ 3]> beq skip1778
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
20b9 : 00 [ 7]> brk ; Use BRK to return to the monitor
20ba : 1a > db test_num
>
20bb : >skip1778
>
20bb : 28 [ 4]> plp ;restore status
20bc : ca [ 2] dex
20bd : e07f [ 2] cpx #$7f
tst_x $7e,~fzc
20bf : 08 [ 3]> php ;save flags
20c0 : 08 [ 3]> php
20c1 : e07e [ 2]> cpx #$7e ;test result
> trap_ne
20c3 : f002 [ 3]> beq skip1781
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
20c5 : 00 [ 7]> brk ; Use BRK to return to the monitor
20c6 : 1a > db test_num
>
20c7 : >skip1781
>
20c7 : 68 [ 4]> pla ;load status
> cmp_flag ~fzc
20c8 : c9fc [ 2]> cmp #(~fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
20ca : f002 [ 3]> beq skip1784
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
20cc : 00 [ 7]> brk ; Use BRK to return to the monitor
20cd : 1a > db test_num
>
20ce : >skip1784
>
20ce : 28 [ 4]> plp ;restore status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 222
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
next_test
20cf : ad0002 [ 4]> lda test_case ;previous test
20d2 : c91a [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
20d4 : f002 [ 3]> beq skip1787
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
20d6 : 00 [ 7]> brk ; Use BRK to return to the monitor
20d7 : 1a > db test_num
>
20d8 : >skip1787
>
001b = >test_num = test_num + 1
20d8 : a91b [ 2]> lda #test_num ;*** this tests' number
20da : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; CPY - zp / abs / #
set_y $80,0
> load_flag 0
20dd : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
20df : 48 [ 3]> pha ;use stack to load status
20e0 : a080 [ 2]> ldy #$80 ;precharge index y
20e2 : 28 [ 4]> plp
20e3 : c4bd [ 3] cpy zp7f
tst_stat fc
20e5 : 08 [ 3]> php ;save status
20e6 : 08 [ 3]> php ;use stack to retrieve status
20e7 : 68 [ 4]> pla
> cmp_flag fc
20e8 : c931 [ 2]> cmp #(fc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
20ea : f002 [ 3]> beq skip1793
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
20ec : 00 [ 7]> brk ; Use BRK to return to the monitor
20ed : 1b > db test_num
>
20ee : >skip1793
>
20ee : 28 [ 4]> plp ;restore status
20ef : 88 [ 2] dey
20f0 : c4bd [ 3] cpy zp7f
tst_stat fzc
20f2 : 08 [ 3]> php ;save status
20f3 : 08 [ 3]> php ;use stack to retrieve status
20f4 : 68 [ 4]> pla
> cmp_flag fzc
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 223
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
20f5 : c933 [ 2]> cmp #(fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
20f7 : f002 [ 3]> beq skip1797
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
20f9 : 00 [ 7]> brk ; Use BRK to return to the monitor
20fa : 1b > db test_num
>
20fb : >skip1797
>
20fb : 28 [ 4]> plp ;restore status
20fc : 88 [ 2] dey
20fd : c4bd [ 3] cpy zp7f
tst_y $7e,fn
20ff : 08 [ 3]> php ;save flags
2100 : 08 [ 3]> php
2101 : c07e [ 2]> cpy #$7e ;test result
> trap_ne
2103 : f002 [ 3]> beq skip1800
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2105 : 00 [ 7]> brk ; Use BRK to return to the monitor
2106 : 1b > db test_num
>
2107 : >skip1800
>
2107 : 68 [ 4]> pla ;load status
> cmp_flag fn
2108 : c9b0 [ 2]> cmp #(fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
210a : f002 [ 3]> beq skip1803
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
210c : 00 [ 7]> brk ; Use BRK to return to the monitor
210d : 1b > db test_num
>
210e : >skip1803
>
210e : 28 [ 4]> plp ;restore status
set_y $80,$ff
> load_flag $ff
210f : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2111 : 48 [ 3]> pha ;use stack to load status
2112 : a080 [ 2]> ldy #$80 ;precharge index y
2114 : 28 [ 4]> plp
2115 : c4bd [ 3] cpy zp7f
tst_stat ~fnz
2117 : 08 [ 3]> php ;save status
2118 : 08 [ 3]> php ;use stack to retrieve status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 224
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2119 : 68 [ 4]> pla
> cmp_flag ~fnz
211a : c97d [ 2]> cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
211c : f002 [ 3]> beq skip1809
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
211e : 00 [ 7]> brk ; Use BRK to return to the monitor
211f : 1b > db test_num
>
2120 : >skip1809
>
2120 : 28 [ 4]> plp ;restore status
2121 : 88 [ 2] dey
2122 : c4bd [ 3] cpy zp7f
tst_stat ~fn
2124 : 08 [ 3]> php ;save status
2125 : 08 [ 3]> php ;use stack to retrieve status
2126 : 68 [ 4]> pla
> cmp_flag ~fn
2127 : c97f [ 2]> cmp #(~fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2129 : f002 [ 3]> beq skip1813
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
212b : 00 [ 7]> brk ; Use BRK to return to the monitor
212c : 1b > db test_num
>
212d : >skip1813
>
212d : 28 [ 4]> plp ;restore status
212e : 88 [ 2] dey
212f : c4bd [ 3] cpy zp7f
tst_y $7e,~fzc
2131 : 08 [ 3]> php ;save flags
2132 : 08 [ 3]> php
2133 : c07e [ 2]> cpy #$7e ;test result
> trap_ne
2135 : f002 [ 3]> beq skip1816
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2137 : 00 [ 7]> brk ; Use BRK to return to the monitor
2138 : 1b > db test_num
>
2139 : >skip1816
>
2139 : 68 [ 4]> pla ;load status
> cmp_flag ~fzc
213a : c9fc [ 2]> cmp #(~fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 225
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
213c : f002 [ 3]> beq skip1819
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
213e : 00 [ 7]> brk ; Use BRK to return to the monitor
213f : 1b > db test_num
>
2140 : >skip1819
>
2140 : 28 [ 4]> plp ;restore status
set_y $80,0
> load_flag 0
2141 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2143 : 48 [ 3]> pha ;use stack to load status
2144 : a080 [ 2]> ldy #$80 ;precharge index y
2146 : 28 [ 4]> plp
2147 : cc0c02 [ 4] cpy abs7f
tst_stat fc
214a : 08 [ 3]> php ;save status
214b : 08 [ 3]> php ;use stack to retrieve status
214c : 68 [ 4]> pla
> cmp_flag fc
214d : c931 [ 2]> cmp #(fc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
214f : f002 [ 3]> beq skip1825
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2151 : 00 [ 7]> brk ; Use BRK to return to the monitor
2152 : 1b > db test_num
>
2153 : >skip1825
>
2153 : 28 [ 4]> plp ;restore status
2154 : 88 [ 2] dey
2155 : cc0c02 [ 4] cpy abs7f
tst_stat fzc
2158 : 08 [ 3]> php ;save status
2159 : 08 [ 3]> php ;use stack to retrieve status
215a : 68 [ 4]> pla
> cmp_flag fzc
215b : c933 [ 2]> cmp #(fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
215d : f002 [ 3]> beq skip1829
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
215f : 00 [ 7]> brk ; Use BRK to return to the monitor
2160 : 1b > db test_num
>
2161 : >skip1829
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 226
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
2161 : 28 [ 4]> plp ;restore status
2162 : 88 [ 2] dey
2163 : cc0c02 [ 4] cpy abs7f
tst_y $7e,fn
2166 : 08 [ 3]> php ;save flags
2167 : 08 [ 3]> php
2168 : c07e [ 2]> cpy #$7e ;test result
> trap_ne
216a : f002 [ 3]> beq skip1832
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
216c : 00 [ 7]> brk ; Use BRK to return to the monitor
216d : 1b > db test_num
>
216e : >skip1832
>
216e : 68 [ 4]> pla ;load status
> cmp_flag fn
216f : c9b0 [ 2]> cmp #(fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2171 : f002 [ 3]> beq skip1835
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2173 : 00 [ 7]> brk ; Use BRK to return to the monitor
2174 : 1b > db test_num
>
2175 : >skip1835
>
2175 : 28 [ 4]> plp ;restore status
set_y $80,$ff
> load_flag $ff
2176 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2178 : 48 [ 3]> pha ;use stack to load status
2179 : a080 [ 2]> ldy #$80 ;precharge index y
217b : 28 [ 4]> plp
217c : cc0c02 [ 4] cpy abs7f
tst_stat ~fnz
217f : 08 [ 3]> php ;save status
2180 : 08 [ 3]> php ;use stack to retrieve status
2181 : 68 [ 4]> pla
> cmp_flag ~fnz
2182 : c97d [ 2]> cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2184 : f002 [ 3]> beq skip1841
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2186 : 00 [ 7]> brk ; Use BRK to return to the monitor
2187 : 1b > db test_num
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 227
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
2188 : >skip1841
>
2188 : 28 [ 4]> plp ;restore status
2189 : 88 [ 2] dey
218a : cc0c02 [ 4] cpy abs7f
tst_stat ~fn
218d : 08 [ 3]> php ;save status
218e : 08 [ 3]> php ;use stack to retrieve status
218f : 68 [ 4]> pla
> cmp_flag ~fn
2190 : c97f [ 2]> cmp #(~fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2192 : f002 [ 3]> beq skip1845
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2194 : 00 [ 7]> brk ; Use BRK to return to the monitor
2195 : 1b > db test_num
>
2196 : >skip1845
>
2196 : 28 [ 4]> plp ;restore status
2197 : 88 [ 2] dey
2198 : cc0c02 [ 4] cpy abs7f
tst_y $7e,~fzc
219b : 08 [ 3]> php ;save flags
219c : 08 [ 3]> php
219d : c07e [ 2]> cpy #$7e ;test result
> trap_ne
219f : f002 [ 3]> beq skip1848
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
21a1 : 00 [ 7]> brk ; Use BRK to return to the monitor
21a2 : 1b > db test_num
>
21a3 : >skip1848
>
21a3 : 68 [ 4]> pla ;load status
> cmp_flag ~fzc
21a4 : c9fc [ 2]> cmp #(~fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
21a6 : f002 [ 3]> beq skip1851
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
21a8 : 00 [ 7]> brk ; Use BRK to return to the monitor
21a9 : 1b > db test_num
>
21aa : >skip1851
>
21aa : 28 [ 4]> plp ;restore status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 228
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
set_y $80,0
> load_flag 0
21ab : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
21ad : 48 [ 3]> pha ;use stack to load status
21ae : a080 [ 2]> ldy #$80 ;precharge index y
21b0 : 28 [ 4]> plp
21b1 : c07f [ 2] cpy #$7f
tst_stat fc
21b3 : 08 [ 3]> php ;save status
21b4 : 08 [ 3]> php ;use stack to retrieve status
21b5 : 68 [ 4]> pla
> cmp_flag fc
21b6 : c931 [ 2]> cmp #(fc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
21b8 : f002 [ 3]> beq skip1857
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
21ba : 00 [ 7]> brk ; Use BRK to return to the monitor
21bb : 1b > db test_num
>
21bc : >skip1857
>
21bc : 28 [ 4]> plp ;restore status
21bd : 88 [ 2] dey
21be : c07f [ 2] cpy #$7f
tst_stat fzc
21c0 : 08 [ 3]> php ;save status
21c1 : 08 [ 3]> php ;use stack to retrieve status
21c2 : 68 [ 4]> pla
> cmp_flag fzc
21c3 : c933 [ 2]> cmp #(fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
21c5 : f002 [ 3]> beq skip1861
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
21c7 : 00 [ 7]> brk ; Use BRK to return to the monitor
21c8 : 1b > db test_num
>
21c9 : >skip1861
>
21c9 : 28 [ 4]> plp ;restore status
21ca : 88 [ 2] dey
21cb : c07f [ 2] cpy #$7f
tst_y $7e,fn
21cd : 08 [ 3]> php ;save flags
21ce : 08 [ 3]> php
21cf : c07e [ 2]> cpy #$7e ;test result
> trap_ne
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 229
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
21d1 : f002 [ 3]> beq skip1864
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
21d3 : 00 [ 7]> brk ; Use BRK to return to the monitor
21d4 : 1b > db test_num
>
21d5 : >skip1864
>
21d5 : 68 [ 4]> pla ;load status
> cmp_flag fn
21d6 : c9b0 [ 2]> cmp #(fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
21d8 : f002 [ 3]> beq skip1867
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
21da : 00 [ 7]> brk ; Use BRK to return to the monitor
21db : 1b > db test_num
>
21dc : >skip1867
>
21dc : 28 [ 4]> plp ;restore status
set_y $80,$ff
> load_flag $ff
21dd : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
21df : 48 [ 3]> pha ;use stack to load status
21e0 : a080 [ 2]> ldy #$80 ;precharge index y
21e2 : 28 [ 4]> plp
21e3 : c07f [ 2] cpy #$7f
tst_stat ~fnz
21e5 : 08 [ 3]> php ;save status
21e6 : 08 [ 3]> php ;use stack to retrieve status
21e7 : 68 [ 4]> pla
> cmp_flag ~fnz
21e8 : c97d [ 2]> cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
21ea : f002 [ 3]> beq skip1873
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
21ec : 00 [ 7]> brk ; Use BRK to return to the monitor
21ed : 1b > db test_num
>
21ee : >skip1873
>
21ee : 28 [ 4]> plp ;restore status
21ef : 88 [ 2] dey
21f0 : c07f [ 2] cpy #$7f
tst_stat ~fn
21f2 : 08 [ 3]> php ;save status
21f3 : 08 [ 3]> php ;use stack to retrieve status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 230
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
21f4 : 68 [ 4]> pla
> cmp_flag ~fn
21f5 : c97f [ 2]> cmp #(~fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
21f7 : f002 [ 3]> beq skip1877
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
21f9 : 00 [ 7]> brk ; Use BRK to return to the monitor
21fa : 1b > db test_num
>
21fb : >skip1877
>
21fb : 28 [ 4]> plp ;restore status
21fc : 88 [ 2] dey
21fd : c07f [ 2] cpy #$7f
tst_y $7e,~fzc
21ff : 08 [ 3]> php ;save flags
2200 : 08 [ 3]> php
2201 : c07e [ 2]> cpy #$7e ;test result
> trap_ne
2203 : f002 [ 3]> beq skip1880
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2205 : 00 [ 7]> brk ; Use BRK to return to the monitor
2206 : 1b > db test_num
>
2207 : >skip1880
>
2207 : 68 [ 4]> pla ;load status
> cmp_flag ~fzc
2208 : c9fc [ 2]> cmp #(~fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
220a : f002 [ 3]> beq skip1883
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
220c : 00 [ 7]> brk ; Use BRK to return to the monitor
220d : 1b > db test_num
>
220e : >skip1883
>
220e : 28 [ 4]> plp ;restore status
next_test
220f : ad0002 [ 4]> lda test_case ;previous test
2212 : c91b [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
2214 : f002 [ 3]> beq skip1886
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2216 : 00 [ 7]> brk ; Use BRK to return to the monitor
2217 : 1b > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 231
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2218 : >skip1886
>
001c = >test_num = test_num + 1
2218 : a91c [ 2]> lda #test_num ;*** this tests' number
221a : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; CMP - zp / abs / #
set_a $80,0
> load_flag 0
221d : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
221f : 48 [ 3]> pha ;use stack to load status
2220 : a980 [ 2]> lda #$80 ;precharge accu
2222 : 28 [ 4]> plp
2223 : c5bd [ 3] cmp zp7f
tst_a $80,fc
2225 : 08 [ 3]> php ;save flags
2226 : 08 [ 3]> php
2227 : c980 [ 2]> cmp #$80 ;test result
> trap_ne
2229 : f002 [ 3]> beq skip1891
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
222b : 00 [ 7]> brk ; Use BRK to return to the monitor
222c : 1c > db test_num
>
222d : >skip1891
>
222d : 68 [ 4]> pla ;load status
> cmp_flag fc
222e : c931 [ 2]> cmp #(fc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2230 : f002 [ 3]> beq skip1894
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2232 : 00 [ 7]> brk ; Use BRK to return to the monitor
2233 : 1c > db test_num
>
2234 : >skip1894
>
2234 : 28 [ 4]> plp ;restore status
set_a $7f,0
> load_flag 0
2235 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2237 : 48 [ 3]> pha ;use stack to load status
2238 : a97f [ 2]> lda #$7f ;precharge accu
223a : 28 [ 4]> plp
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 232
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
223b : c5bd [ 3] cmp zp7f
tst_a $7f,fzc
223d : 08 [ 3]> php ;save flags
223e : 08 [ 3]> php
223f : c97f [ 2]> cmp #$7f ;test result
> trap_ne
2241 : f002 [ 3]> beq skip1899
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2243 : 00 [ 7]> brk ; Use BRK to return to the monitor
2244 : 1c > db test_num
>
2245 : >skip1899
>
2245 : 68 [ 4]> pla ;load status
> cmp_flag fzc
2246 : c933 [ 2]> cmp #(fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2248 : f002 [ 3]> beq skip1902
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
224a : 00 [ 7]> brk ; Use BRK to return to the monitor
224b : 1c > db test_num
>
224c : >skip1902
>
224c : 28 [ 4]> plp ;restore status
set_a $7e,0
> load_flag 0
224d : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
224f : 48 [ 3]> pha ;use stack to load status
2250 : a97e [ 2]> lda #$7e ;precharge accu
2252 : 28 [ 4]> plp
2253 : c5bd [ 3] cmp zp7f
tst_a $7e,fn
2255 : 08 [ 3]> php ;save flags
2256 : 08 [ 3]> php
2257 : c97e [ 2]> cmp #$7e ;test result
> trap_ne
2259 : f002 [ 3]> beq skip1907
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
225b : 00 [ 7]> brk ; Use BRK to return to the monitor
225c : 1c > db test_num
>
225d : >skip1907
>
225d : 68 [ 4]> pla ;load status
> cmp_flag fn
225e : c9b0 [ 2]> cmp #(fn|fao)&m8 ;expected flags + always on bits
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 233
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap_ne
2260 : f002 [ 3]> beq skip1910
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2262 : 00 [ 7]> brk ; Use BRK to return to the monitor
2263 : 1c > db test_num
>
2264 : >skip1910
>
2264 : 28 [ 4]> plp ;restore status
set_a $80,$ff
> load_flag $ff
2265 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2267 : 48 [ 3]> pha ;use stack to load status
2268 : a980 [ 2]> lda #$80 ;precharge accu
226a : 28 [ 4]> plp
226b : c5bd [ 3] cmp zp7f
tst_a $80,~fnz
226d : 08 [ 3]> php ;save flags
226e : 08 [ 3]> php
226f : c980 [ 2]> cmp #$80 ;test result
> trap_ne
2271 : f002 [ 3]> beq skip1915
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2273 : 00 [ 7]> brk ; Use BRK to return to the monitor
2274 : 1c > db test_num
>
2275 : >skip1915
>
2275 : 68 [ 4]> pla ;load status
> cmp_flag ~fnz
2276 : c97d [ 2]> cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2278 : f002 [ 3]> beq skip1918
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
227a : 00 [ 7]> brk ; Use BRK to return to the monitor
227b : 1c > db test_num
>
227c : >skip1918
>
227c : 28 [ 4]> plp ;restore status
set_a $7f,$ff
> load_flag $ff
227d : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
227f : 48 [ 3]> pha ;use stack to load status
2280 : a97f [ 2]> lda #$7f ;precharge accu
2282 : 28 [ 4]> plp
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 234
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2283 : c5bd [ 3] cmp zp7f
tst_a $7f,~fn
2285 : 08 [ 3]> php ;save flags
2286 : 08 [ 3]> php
2287 : c97f [ 2]> cmp #$7f ;test result
> trap_ne
2289 : f002 [ 3]> beq skip1923
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
228b : 00 [ 7]> brk ; Use BRK to return to the monitor
228c : 1c > db test_num
>
228d : >skip1923
>
228d : 68 [ 4]> pla ;load status
> cmp_flag ~fn
228e : c97f [ 2]> cmp #(~fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2290 : f002 [ 3]> beq skip1926
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2292 : 00 [ 7]> brk ; Use BRK to return to the monitor
2293 : 1c > db test_num
>
2294 : >skip1926
>
2294 : 28 [ 4]> plp ;restore status
set_a $7e,$ff
> load_flag $ff
2295 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2297 : 48 [ 3]> pha ;use stack to load status
2298 : a97e [ 2]> lda #$7e ;precharge accu
229a : 28 [ 4]> plp
229b : c5bd [ 3] cmp zp7f
tst_a $7e,~fzc
229d : 08 [ 3]> php ;save flags
229e : 08 [ 3]> php
229f : c97e [ 2]> cmp #$7e ;test result
> trap_ne
22a1 : f002 [ 3]> beq skip1931
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
22a3 : 00 [ 7]> brk ; Use BRK to return to the monitor
22a4 : 1c > db test_num
>
22a5 : >skip1931
>
22a5 : 68 [ 4]> pla ;load status
> cmp_flag ~fzc
22a6 : c9fc [ 2]> cmp #(~fzc|fao)&m8 ;expected flags + always on bits
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 235
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
> trap_ne
22a8 : f002 [ 3]> beq skip1934
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
22aa : 00 [ 7]> brk ; Use BRK to return to the monitor
22ab : 1c > db test_num
>
22ac : >skip1934
>
22ac : 28 [ 4]> plp ;restore status
set_a $80,0
> load_flag 0
22ad : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
22af : 48 [ 3]> pha ;use stack to load status
22b0 : a980 [ 2]> lda #$80 ;precharge accu
22b2 : 28 [ 4]> plp
22b3 : cd0c02 [ 4] cmp abs7f
tst_a $80,fc
22b6 : 08 [ 3]> php ;save flags
22b7 : 08 [ 3]> php
22b8 : c980 [ 2]> cmp #$80 ;test result
> trap_ne
22ba : f002 [ 3]> beq skip1939
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
22bc : 00 [ 7]> brk ; Use BRK to return to the monitor
22bd : 1c > db test_num
>
22be : >skip1939
>
22be : 68 [ 4]> pla ;load status
> cmp_flag fc
22bf : c931 [ 2]> cmp #(fc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
22c1 : f002 [ 3]> beq skip1942
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
22c3 : 00 [ 7]> brk ; Use BRK to return to the monitor
22c4 : 1c > db test_num
>
22c5 : >skip1942
>
22c5 : 28 [ 4]> plp ;restore status
set_a $7f,0
> load_flag 0
22c6 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
22c8 : 48 [ 3]> pha ;use stack to load status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 236
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
22c9 : a97f [ 2]> lda #$7f ;precharge accu
22cb : 28 [ 4]> plp
22cc : cd0c02 [ 4] cmp abs7f
tst_a $7f,fzc
22cf : 08 [ 3]> php ;save flags
22d0 : 08 [ 3]> php
22d1 : c97f [ 2]> cmp #$7f ;test result
> trap_ne
22d3 : f002 [ 3]> beq skip1947
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
22d5 : 00 [ 7]> brk ; Use BRK to return to the monitor
22d6 : 1c > db test_num
>
22d7 : >skip1947
>
22d7 : 68 [ 4]> pla ;load status
> cmp_flag fzc
22d8 : c933 [ 2]> cmp #(fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
22da : f002 [ 3]> beq skip1950
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
22dc : 00 [ 7]> brk ; Use BRK to return to the monitor
22dd : 1c > db test_num
>
22de : >skip1950
>
22de : 28 [ 4]> plp ;restore status
set_a $7e,0
> load_flag 0
22df : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
22e1 : 48 [ 3]> pha ;use stack to load status
22e2 : a97e [ 2]> lda #$7e ;precharge accu
22e4 : 28 [ 4]> plp
22e5 : cd0c02 [ 4] cmp abs7f
tst_a $7e,fn
22e8 : 08 [ 3]> php ;save flags
22e9 : 08 [ 3]> php
22ea : c97e [ 2]> cmp #$7e ;test result
> trap_ne
22ec : f002 [ 3]> beq skip1955
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
22ee : 00 [ 7]> brk ; Use BRK to return to the monitor
22ef : 1c > db test_num
>
22f0 : >skip1955
>
22f0 : 68 [ 4]> pla ;load status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 237
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> cmp_flag fn
22f1 : c9b0 [ 2]> cmp #(fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
22f3 : f002 [ 3]> beq skip1958
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
22f5 : 00 [ 7]> brk ; Use BRK to return to the monitor
22f6 : 1c > db test_num
>
22f7 : >skip1958
>
22f7 : 28 [ 4]> plp ;restore status
set_a $80,$ff
> load_flag $ff
22f8 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
22fa : 48 [ 3]> pha ;use stack to load status
22fb : a980 [ 2]> lda #$80 ;precharge accu
22fd : 28 [ 4]> plp
22fe : cd0c02 [ 4] cmp abs7f
tst_a $80,~fnz
2301 : 08 [ 3]> php ;save flags
2302 : 08 [ 3]> php
2303 : c980 [ 2]> cmp #$80 ;test result
> trap_ne
2305 : f002 [ 3]> beq skip1963
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2307 : 00 [ 7]> brk ; Use BRK to return to the monitor
2308 : 1c > db test_num
>
2309 : >skip1963
>
2309 : 68 [ 4]> pla ;load status
> cmp_flag ~fnz
230a : c97d [ 2]> cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
230c : f002 [ 3]> beq skip1966
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
230e : 00 [ 7]> brk ; Use BRK to return to the monitor
230f : 1c > db test_num
>
2310 : >skip1966
>
2310 : 28 [ 4]> plp ;restore status
set_a $7f,$ff
> load_flag $ff
2311 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 238
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2313 : 48 [ 3]> pha ;use stack to load status
2314 : a97f [ 2]> lda #$7f ;precharge accu
2316 : 28 [ 4]> plp
2317 : cd0c02 [ 4] cmp abs7f
tst_a $7f,~fn
231a : 08 [ 3]> php ;save flags
231b : 08 [ 3]> php
231c : c97f [ 2]> cmp #$7f ;test result
> trap_ne
231e : f002 [ 3]> beq skip1971
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2320 : 00 [ 7]> brk ; Use BRK to return to the monitor
2321 : 1c > db test_num
>
2322 : >skip1971
>
2322 : 68 [ 4]> pla ;load status
> cmp_flag ~fn
2323 : c97f [ 2]> cmp #(~fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2325 : f002 [ 3]> beq skip1974
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2327 : 00 [ 7]> brk ; Use BRK to return to the monitor
2328 : 1c > db test_num
>
2329 : >skip1974
>
2329 : 28 [ 4]> plp ;restore status
set_a $7e,$ff
> load_flag $ff
232a : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
232c : 48 [ 3]> pha ;use stack to load status
232d : a97e [ 2]> lda #$7e ;precharge accu
232f : 28 [ 4]> plp
2330 : cd0c02 [ 4] cmp abs7f
tst_a $7e,~fzc
2333 : 08 [ 3]> php ;save flags
2334 : 08 [ 3]> php
2335 : c97e [ 2]> cmp #$7e ;test result
> trap_ne
2337 : f002 [ 3]> beq skip1979
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2339 : 00 [ 7]> brk ; Use BRK to return to the monitor
233a : 1c > db test_num
>
233b : >skip1979
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 239
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
233b : 68 [ 4]> pla ;load status
> cmp_flag ~fzc
233c : c9fc [ 2]> cmp #(~fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
233e : f002 [ 3]> beq skip1982
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2340 : 00 [ 7]> brk ; Use BRK to return to the monitor
2341 : 1c > db test_num
>
2342 : >skip1982
>
2342 : 28 [ 4]> plp ;restore status
set_a $80,0
> load_flag 0
2343 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2345 : 48 [ 3]> pha ;use stack to load status
2346 : a980 [ 2]> lda #$80 ;precharge accu
2348 : 28 [ 4]> plp
2349 : c97f [ 2] cmp #$7f
tst_a $80,fc
234b : 08 [ 3]> php ;save flags
234c : 08 [ 3]> php
234d : c980 [ 2]> cmp #$80 ;test result
> trap_ne
234f : f002 [ 3]> beq skip1987
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2351 : 00 [ 7]> brk ; Use BRK to return to the monitor
2352 : 1c > db test_num
>
2353 : >skip1987
>
2353 : 68 [ 4]> pla ;load status
> cmp_flag fc
2354 : c931 [ 2]> cmp #(fc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2356 : f002 [ 3]> beq skip1990
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2358 : 00 [ 7]> brk ; Use BRK to return to the monitor
2359 : 1c > db test_num
>
235a : >skip1990
>
235a : 28 [ 4]> plp ;restore status
set_a $7f,0
> load_flag 0
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 240
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
235b : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
235d : 48 [ 3]> pha ;use stack to load status
235e : a97f [ 2]> lda #$7f ;precharge accu
2360 : 28 [ 4]> plp
2361 : c97f [ 2] cmp #$7f
tst_a $7f,fzc
2363 : 08 [ 3]> php ;save flags
2364 : 08 [ 3]> php
2365 : c97f [ 2]> cmp #$7f ;test result
> trap_ne
2367 : f002 [ 3]> beq skip1995
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2369 : 00 [ 7]> brk ; Use BRK to return to the monitor
236a : 1c > db test_num
>
236b : >skip1995
>
236b : 68 [ 4]> pla ;load status
> cmp_flag fzc
236c : c933 [ 2]> cmp #(fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
236e : f002 [ 3]> beq skip1998
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2370 : 00 [ 7]> brk ; Use BRK to return to the monitor
2371 : 1c > db test_num
>
2372 : >skip1998
>
2372 : 28 [ 4]> plp ;restore status
set_a $7e,0
> load_flag 0
2373 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2375 : 48 [ 3]> pha ;use stack to load status
2376 : a97e [ 2]> lda #$7e ;precharge accu
2378 : 28 [ 4]> plp
2379 : c97f [ 2] cmp #$7f
tst_a $7e,fn
237b : 08 [ 3]> php ;save flags
237c : 08 [ 3]> php
237d : c97e [ 2]> cmp #$7e ;test result
> trap_ne
237f : f002 [ 3]> beq skip2003
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2381 : 00 [ 7]> brk ; Use BRK to return to the monitor
2382 : 1c > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 241
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2383 : >skip2003
>
2383 : 68 [ 4]> pla ;load status
> cmp_flag fn
2384 : c9b0 [ 2]> cmp #(fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2386 : f002 [ 3]> beq skip2006
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2388 : 00 [ 7]> brk ; Use BRK to return to the monitor
2389 : 1c > db test_num
>
238a : >skip2006
>
238a : 28 [ 4]> plp ;restore status
set_a $80,$ff
> load_flag $ff
238b : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
238d : 48 [ 3]> pha ;use stack to load status
238e : a980 [ 2]> lda #$80 ;precharge accu
2390 : 28 [ 4]> plp
2391 : c97f [ 2] cmp #$7f
tst_a $80,~fnz
2393 : 08 [ 3]> php ;save flags
2394 : 08 [ 3]> php
2395 : c980 [ 2]> cmp #$80 ;test result
> trap_ne
2397 : f002 [ 3]> beq skip2011
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2399 : 00 [ 7]> brk ; Use BRK to return to the monitor
239a : 1c > db test_num
>
239b : >skip2011
>
239b : 68 [ 4]> pla ;load status
> cmp_flag ~fnz
239c : c97d [ 2]> cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
239e : f002 [ 3]> beq skip2014
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
23a0 : 00 [ 7]> brk ; Use BRK to return to the monitor
23a1 : 1c > db test_num
>
23a2 : >skip2014
>
23a2 : 28 [ 4]> plp ;restore status
set_a $7f,$ff
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 242
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> load_flag $ff
23a3 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
23a5 : 48 [ 3]> pha ;use stack to load status
23a6 : a97f [ 2]> lda #$7f ;precharge accu
23a8 : 28 [ 4]> plp
23a9 : c97f [ 2] cmp #$7f
tst_a $7f,~fn
23ab : 08 [ 3]> php ;save flags
23ac : 08 [ 3]> php
23ad : c97f [ 2]> cmp #$7f ;test result
> trap_ne
23af : f002 [ 3]> beq skip2019
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
23b1 : 00 [ 7]> brk ; Use BRK to return to the monitor
23b2 : 1c > db test_num
>
23b3 : >skip2019
>
23b3 : 68 [ 4]> pla ;load status
> cmp_flag ~fn
23b4 : c97f [ 2]> cmp #(~fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
23b6 : f002 [ 3]> beq skip2022
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
23b8 : 00 [ 7]> brk ; Use BRK to return to the monitor
23b9 : 1c > db test_num
>
23ba : >skip2022
>
23ba : 28 [ 4]> plp ;restore status
set_a $7e,$ff
> load_flag $ff
23bb : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
23bd : 48 [ 3]> pha ;use stack to load status
23be : a97e [ 2]> lda #$7e ;precharge accu
23c0 : 28 [ 4]> plp
23c1 : c97f [ 2] cmp #$7f
tst_a $7e,~fzc
23c3 : 08 [ 3]> php ;save flags
23c4 : 08 [ 3]> php
23c5 : c97e [ 2]> cmp #$7e ;test result
> trap_ne
23c7 : f002 [ 3]> beq skip2027
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
23c9 : 00 [ 7]> brk ; Use BRK to return to the monitor
23ca : 1c > db test_num
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 243
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
23cb : >skip2027
>
23cb : 68 [ 4]> pla ;load status
> cmp_flag ~fzc
23cc : c9fc [ 2]> cmp #(~fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
23ce : f002 [ 3]> beq skip2030
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
23d0 : 00 [ 7]> brk ; Use BRK to return to the monitor
23d1 : 1c > db test_num
>
23d2 : >skip2030
>
23d2 : 28 [ 4]> plp ;restore status
23d3 : a204 [ 2] ldx #4 ;with indexing by X
set_a $80,0
> load_flag 0
23d5 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
23d7 : 48 [ 3]> pha ;use stack to load status
23d8 : a980 [ 2]> lda #$80 ;precharge accu
23da : 28 [ 4]> plp
23db : d5b9 [ 4] cmp zp1,x
tst_a $80,fc
23dd : 08 [ 3]> php ;save flags
23de : 08 [ 3]> php
23df : c980 [ 2]> cmp #$80 ;test result
> trap_ne
23e1 : f002 [ 3]> beq skip2035
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
23e3 : 00 [ 7]> brk ; Use BRK to return to the monitor
23e4 : 1c > db test_num
>
23e5 : >skip2035
>
23e5 : 68 [ 4]> pla ;load status
> cmp_flag fc
23e6 : c931 [ 2]> cmp #(fc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
23e8 : f002 [ 3]> beq skip2038
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
23ea : 00 [ 7]> brk ; Use BRK to return to the monitor
23eb : 1c > db test_num
>
23ec : >skip2038
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 244
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
23ec : 28 [ 4]> plp ;restore status
set_a $7f,0
> load_flag 0
23ed : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
23ef : 48 [ 3]> pha ;use stack to load status
23f0 : a97f [ 2]> lda #$7f ;precharge accu
23f2 : 28 [ 4]> plp
23f3 : d5b9 [ 4] cmp zp1,x
tst_a $7f,fzc
23f5 : 08 [ 3]> php ;save flags
23f6 : 08 [ 3]> php
23f7 : c97f [ 2]> cmp #$7f ;test result
> trap_ne
23f9 : f002 [ 3]> beq skip2043
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
23fb : 00 [ 7]> brk ; Use BRK to return to the monitor
23fc : 1c > db test_num
>
23fd : >skip2043
>
23fd : 68 [ 4]> pla ;load status
> cmp_flag fzc
23fe : c933 [ 2]> cmp #(fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2400 : f002 [ 3]> beq skip2046
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2402 : 00 [ 7]> brk ; Use BRK to return to the monitor
2403 : 1c > db test_num
>
2404 : >skip2046
>
2404 : 28 [ 4]> plp ;restore status
set_a $7e,0
> load_flag 0
2405 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2407 : 48 [ 3]> pha ;use stack to load status
2408 : a97e [ 2]> lda #$7e ;precharge accu
240a : 28 [ 4]> plp
240b : d5b9 [ 4] cmp zp1,x
tst_a $7e,fn
240d : 08 [ 3]> php ;save flags
240e : 08 [ 3]> php
240f : c97e [ 2]> cmp #$7e ;test result
> trap_ne
2411 : f002 [ 3]> beq skip2051
> trap ;failed equal (zero)
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 245
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>; db $db ; M65C02/M65C02A SToP instruction
2413 : 00 [ 7]> brk ; Use BRK to return to the monitor
2414 : 1c > db test_num
>
2415 : >skip2051
>
2415 : 68 [ 4]> pla ;load status
> cmp_flag fn
2416 : c9b0 [ 2]> cmp #(fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2418 : f002 [ 3]> beq skip2054
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
241a : 00 [ 7]> brk ; Use BRK to return to the monitor
241b : 1c > db test_num
>
241c : >skip2054
>
241c : 28 [ 4]> plp ;restore status
set_a $80,$ff
> load_flag $ff
241d : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
241f : 48 [ 3]> pha ;use stack to load status
2420 : a980 [ 2]> lda #$80 ;precharge accu
2422 : 28 [ 4]> plp
2423 : d5b9 [ 4] cmp zp1,x
tst_a $80,~fnz
2425 : 08 [ 3]> php ;save flags
2426 : 08 [ 3]> php
2427 : c980 [ 2]> cmp #$80 ;test result
> trap_ne
2429 : f002 [ 3]> beq skip2059
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
242b : 00 [ 7]> brk ; Use BRK to return to the monitor
242c : 1c > db test_num
>
242d : >skip2059
>
242d : 68 [ 4]> pla ;load status
> cmp_flag ~fnz
242e : c97d [ 2]> cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2430 : f002 [ 3]> beq skip2062
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2432 : 00 [ 7]> brk ; Use BRK to return to the monitor
2433 : 1c > db test_num
>
2434 : >skip2062
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 246
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
2434 : 28 [ 4]> plp ;restore status
set_a $7f,$ff
> load_flag $ff
2435 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2437 : 48 [ 3]> pha ;use stack to load status
2438 : a97f [ 2]> lda #$7f ;precharge accu
243a : 28 [ 4]> plp
243b : d5b9 [ 4] cmp zp1,x
tst_a $7f,~fn
243d : 08 [ 3]> php ;save flags
243e : 08 [ 3]> php
243f : c97f [ 2]> cmp #$7f ;test result
> trap_ne
2441 : f002 [ 3]> beq skip2067
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2443 : 00 [ 7]> brk ; Use BRK to return to the monitor
2444 : 1c > db test_num
>
2445 : >skip2067
>
2445 : 68 [ 4]> pla ;load status
> cmp_flag ~fn
2446 : c97f [ 2]> cmp #(~fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2448 : f002 [ 3]> beq skip2070
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
244a : 00 [ 7]> brk ; Use BRK to return to the monitor
244b : 1c > db test_num
>
244c : >skip2070
>
244c : 28 [ 4]> plp ;restore status
set_a $7e,$ff
> load_flag $ff
244d : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
244f : 48 [ 3]> pha ;use stack to load status
2450 : a97e [ 2]> lda #$7e ;precharge accu
2452 : 28 [ 4]> plp
2453 : d5b9 [ 4] cmp zp1,x
tst_a $7e,~fzc
2455 : 08 [ 3]> php ;save flags
2456 : 08 [ 3]> php
2457 : c97e [ 2]> cmp #$7e ;test result
> trap_ne
2459 : f002 [ 3]> beq skip2075
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 247
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
245b : 00 [ 7]> brk ; Use BRK to return to the monitor
245c : 1c > db test_num
>
245d : >skip2075
>
245d : 68 [ 4]> pla ;load status
> cmp_flag ~fzc
245e : c9fc [ 2]> cmp #(~fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2460 : f002 [ 3]> beq skip2078
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2462 : 00 [ 7]> brk ; Use BRK to return to the monitor
2463 : 1c > db test_num
>
2464 : >skip2078
>
2464 : 28 [ 4]> plp ;restore status
set_a $80,0
> load_flag 0
2465 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2467 : 48 [ 3]> pha ;use stack to load status
2468 : a980 [ 2]> lda #$80 ;precharge accu
246a : 28 [ 4]> plp
246b : dd0802 [ 4] cmp abs1,x
tst_a $80,fc
246e : 08 [ 3]> php ;save flags
246f : 08 [ 3]> php
2470 : c980 [ 2]> cmp #$80 ;test result
> trap_ne
2472 : f002 [ 3]> beq skip2083
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2474 : 00 [ 7]> brk ; Use BRK to return to the monitor
2475 : 1c > db test_num
>
2476 : >skip2083
>
2476 : 68 [ 4]> pla ;load status
> cmp_flag fc
2477 : c931 [ 2]> cmp #(fc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2479 : f002 [ 3]> beq skip2086
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
247b : 00 [ 7]> brk ; Use BRK to return to the monitor
247c : 1c > db test_num
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 248
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
247d : >skip2086
>
247d : 28 [ 4]> plp ;restore status
set_a $7f,0
> load_flag 0
247e : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2480 : 48 [ 3]> pha ;use stack to load status
2481 : a97f [ 2]> lda #$7f ;precharge accu
2483 : 28 [ 4]> plp
2484 : dd0802 [ 4] cmp abs1,x
tst_a $7f,fzc
2487 : 08 [ 3]> php ;save flags
2488 : 08 [ 3]> php
2489 : c97f [ 2]> cmp #$7f ;test result
> trap_ne
248b : f002 [ 3]> beq skip2091
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
248d : 00 [ 7]> brk ; Use BRK to return to the monitor
248e : 1c > db test_num
>
248f : >skip2091
>
248f : 68 [ 4]> pla ;load status
> cmp_flag fzc
2490 : c933 [ 2]> cmp #(fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2492 : f002 [ 3]> beq skip2094
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2494 : 00 [ 7]> brk ; Use BRK to return to the monitor
2495 : 1c > db test_num
>
2496 : >skip2094
>
2496 : 28 [ 4]> plp ;restore status
set_a $7e,0
> load_flag 0
2497 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2499 : 48 [ 3]> pha ;use stack to load status
249a : a97e [ 2]> lda #$7e ;precharge accu
249c : 28 [ 4]> plp
249d : dd0802 [ 4] cmp abs1,x
tst_a $7e,fn
24a0 : 08 [ 3]> php ;save flags
24a1 : 08 [ 3]> php
24a2 : c97e [ 2]> cmp #$7e ;test result
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 249
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap_ne
24a4 : f002 [ 3]> beq skip2099
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
24a6 : 00 [ 7]> brk ; Use BRK to return to the monitor
24a7 : 1c > db test_num
>
24a8 : >skip2099
>
24a8 : 68 [ 4]> pla ;load status
> cmp_flag fn
24a9 : c9b0 [ 2]> cmp #(fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
24ab : f002 [ 3]> beq skip2102
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
24ad : 00 [ 7]> brk ; Use BRK to return to the monitor
24ae : 1c > db test_num
>
24af : >skip2102
>
24af : 28 [ 4]> plp ;restore status
set_a $80,$ff
> load_flag $ff
24b0 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
24b2 : 48 [ 3]> pha ;use stack to load status
24b3 : a980 [ 2]> lda #$80 ;precharge accu
24b5 : 28 [ 4]> plp
24b6 : dd0802 [ 4] cmp abs1,x
tst_a $80,~fnz
24b9 : 08 [ 3]> php ;save flags
24ba : 08 [ 3]> php
24bb : c980 [ 2]> cmp #$80 ;test result
> trap_ne
24bd : f002 [ 3]> beq skip2107
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
24bf : 00 [ 7]> brk ; Use BRK to return to the monitor
24c0 : 1c > db test_num
>
24c1 : >skip2107
>
24c1 : 68 [ 4]> pla ;load status
> cmp_flag ~fnz
24c2 : c97d [ 2]> cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
24c4 : f002 [ 3]> beq skip2110
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
24c6 : 00 [ 7]> brk ; Use BRK to return to the monitor
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 250
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
24c7 : 1c > db test_num
>
24c8 : >skip2110
>
24c8 : 28 [ 4]> plp ;restore status
set_a $7f,$ff
> load_flag $ff
24c9 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
24cb : 48 [ 3]> pha ;use stack to load status
24cc : a97f [ 2]> lda #$7f ;precharge accu
24ce : 28 [ 4]> plp
24cf : dd0802 [ 4] cmp abs1,x
tst_a $7f,~fn
24d2 : 08 [ 3]> php ;save flags
24d3 : 08 [ 3]> php
24d4 : c97f [ 2]> cmp #$7f ;test result
> trap_ne
24d6 : f002 [ 3]> beq skip2115
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
24d8 : 00 [ 7]> brk ; Use BRK to return to the monitor
24d9 : 1c > db test_num
>
24da : >skip2115
>
24da : 68 [ 4]> pla ;load status
> cmp_flag ~fn
24db : c97f [ 2]> cmp #(~fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
24dd : f002 [ 3]> beq skip2118
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
24df : 00 [ 7]> brk ; Use BRK to return to the monitor
24e0 : 1c > db test_num
>
24e1 : >skip2118
>
24e1 : 28 [ 4]> plp ;restore status
set_a $7e,$ff
> load_flag $ff
24e2 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
24e4 : 48 [ 3]> pha ;use stack to load status
24e5 : a97e [ 2]> lda #$7e ;precharge accu
24e7 : 28 [ 4]> plp
24e8 : dd0802 [ 4] cmp abs1,x
tst_a $7e,~fzc
24eb : 08 [ 3]> php ;save flags
24ec : 08 [ 3]> php
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 251
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
24ed : c97e [ 2]> cmp #$7e ;test result
> trap_ne
24ef : f002 [ 3]> beq skip2123
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
24f1 : 00 [ 7]> brk ; Use BRK to return to the monitor
24f2 : 1c > db test_num
>
24f3 : >skip2123
>
24f3 : 68 [ 4]> pla ;load status
> cmp_flag ~fzc
24f4 : c9fc [ 2]> cmp #(~fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
24f6 : f002 [ 3]> beq skip2126
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
24f8 : 00 [ 7]> brk ; Use BRK to return to the monitor
24f9 : 1c > db test_num
>
24fa : >skip2126
>
24fa : 28 [ 4]> plp ;restore status
24fb : a004 [ 2] ldy #4 ;with indexing by Y
24fd : a208 [ 2] ldx #8 ;with indexed indirect
set_a $80,0
> load_flag 0
24ff : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2501 : 48 [ 3]> pha ;use stack to load status
2502 : a980 [ 2]> lda #$80 ;precharge accu
2504 : 28 [ 4]> plp
2505 : d90802 [ 4] cmp abs1,y
tst_a $80,fc
2508 : 08 [ 3]> php ;save flags
2509 : 08 [ 3]> php
250a : c980 [ 2]> cmp #$80 ;test result
> trap_ne
250c : f002 [ 3]> beq skip2131
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
250e : 00 [ 7]> brk ; Use BRK to return to the monitor
250f : 1c > db test_num
>
2510 : >skip2131
>
2510 : 68 [ 4]> pla ;load status
> cmp_flag fc
2511 : c931 [ 2]> cmp #(fc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 252
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2513 : f002 [ 3]> beq skip2134
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2515 : 00 [ 7]> brk ; Use BRK to return to the monitor
2516 : 1c > db test_num
>
2517 : >skip2134
>
2517 : 28 [ 4]> plp ;restore status
set_a $7f,0
> load_flag 0
2518 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
251a : 48 [ 3]> pha ;use stack to load status
251b : a97f [ 2]> lda #$7f ;precharge accu
251d : 28 [ 4]> plp
251e : d90802 [ 4] cmp abs1,y
tst_a $7f,fzc
2521 : 08 [ 3]> php ;save flags
2522 : 08 [ 3]> php
2523 : c97f [ 2]> cmp #$7f ;test result
> trap_ne
2525 : f002 [ 3]> beq skip2139
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2527 : 00 [ 7]> brk ; Use BRK to return to the monitor
2528 : 1c > db test_num
>
2529 : >skip2139
>
2529 : 68 [ 4]> pla ;load status
> cmp_flag fzc
252a : c933 [ 2]> cmp #(fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
252c : f002 [ 3]> beq skip2142
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
252e : 00 [ 7]> brk ; Use BRK to return to the monitor
252f : 1c > db test_num
>
2530 : >skip2142
>
2530 : 28 [ 4]> plp ;restore status
set_a $7e,0
> load_flag 0
2531 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2533 : 48 [ 3]> pha ;use stack to load status
2534 : a97e [ 2]> lda #$7e ;precharge accu
2536 : 28 [ 4]> plp
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 253
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2537 : d90802 [ 4] cmp abs1,y
tst_a $7e,fn
253a : 08 [ 3]> php ;save flags
253b : 08 [ 3]> php
253c : c97e [ 2]> cmp #$7e ;test result
> trap_ne
253e : f002 [ 3]> beq skip2147
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2540 : 00 [ 7]> brk ; Use BRK to return to the monitor
2541 : 1c > db test_num
>
2542 : >skip2147
>
2542 : 68 [ 4]> pla ;load status
> cmp_flag fn
2543 : c9b0 [ 2]> cmp #(fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2545 : f002 [ 3]> beq skip2150
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2547 : 00 [ 7]> brk ; Use BRK to return to the monitor
2548 : 1c > db test_num
>
2549 : >skip2150
>
2549 : 28 [ 4]> plp ;restore status
set_a $80,$ff
> load_flag $ff
254a : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
254c : 48 [ 3]> pha ;use stack to load status
254d : a980 [ 2]> lda #$80 ;precharge accu
254f : 28 [ 4]> plp
2550 : d90802 [ 4] cmp abs1,y
tst_a $80,~fnz
2553 : 08 [ 3]> php ;save flags
2554 : 08 [ 3]> php
2555 : c980 [ 2]> cmp #$80 ;test result
> trap_ne
2557 : f002 [ 3]> beq skip2155
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2559 : 00 [ 7]> brk ; Use BRK to return to the monitor
255a : 1c > db test_num
>
255b : >skip2155
>
255b : 68 [ 4]> pla ;load status
> cmp_flag ~fnz
255c : c97d [ 2]> cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 254
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap_ne
255e : f002 [ 3]> beq skip2158
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2560 : 00 [ 7]> brk ; Use BRK to return to the monitor
2561 : 1c > db test_num
>
2562 : >skip2158
>
2562 : 28 [ 4]> plp ;restore status
set_a $7f,$ff
> load_flag $ff
2563 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2565 : 48 [ 3]> pha ;use stack to load status
2566 : a97f [ 2]> lda #$7f ;precharge accu
2568 : 28 [ 4]> plp
2569 : d90802 [ 4] cmp abs1,y
tst_a $7f,~fn
256c : 08 [ 3]> php ;save flags
256d : 08 [ 3]> php
256e : c97f [ 2]> cmp #$7f ;test result
> trap_ne
2570 : f002 [ 3]> beq skip2163
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2572 : 00 [ 7]> brk ; Use BRK to return to the monitor
2573 : 1c > db test_num
>
2574 : >skip2163
>
2574 : 68 [ 4]> pla ;load status
> cmp_flag ~fn
2575 : c97f [ 2]> cmp #(~fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2577 : f002 [ 3]> beq skip2166
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2579 : 00 [ 7]> brk ; Use BRK to return to the monitor
257a : 1c > db test_num
>
257b : >skip2166
>
257b : 28 [ 4]> plp ;restore status
set_a $7e,$ff
> load_flag $ff
257c : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
257e : 48 [ 3]> pha ;use stack to load status
257f : a97e [ 2]> lda #$7e ;precharge accu
2581 : 28 [ 4]> plp
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 255
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2582 : d90802 [ 4] cmp abs1,y
tst_a $7e,~fzc
2585 : 08 [ 3]> php ;save flags
2586 : 08 [ 3]> php
2587 : c97e [ 2]> cmp #$7e ;test result
> trap_ne
2589 : f002 [ 3]> beq skip2171
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
258b : 00 [ 7]> brk ; Use BRK to return to the monitor
258c : 1c > db test_num
>
258d : >skip2171
>
258d : 68 [ 4]> pla ;load status
> cmp_flag ~fzc
258e : c9fc [ 2]> cmp #(~fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2590 : f002 [ 3]> beq skip2174
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2592 : 00 [ 7]> brk ; Use BRK to return to the monitor
2593 : 1c > db test_num
>
2594 : >skip2174
>
2594 : 28 [ 4]> plp ;restore status
set_a $80,0
> load_flag 0
2595 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2597 : 48 [ 3]> pha ;use stack to load status
2598 : a980 [ 2]> lda #$80 ;precharge accu
259a : 28 [ 4]> plp
259b : c1ca [ 6] cmp (ind1,x)
tst_a $80,fc
259d : 08 [ 3]> php ;save flags
259e : 08 [ 3]> php
259f : c980 [ 2]> cmp #$80 ;test result
> trap_ne
25a1 : f002 [ 3]> beq skip2179
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
25a3 : 00 [ 7]> brk ; Use BRK to return to the monitor
25a4 : 1c > db test_num
>
25a5 : >skip2179
>
25a5 : 68 [ 4]> pla ;load status
> cmp_flag fc
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 256
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
25a6 : c931 [ 2]> cmp #(fc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
25a8 : f002 [ 3]> beq skip2182
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
25aa : 00 [ 7]> brk ; Use BRK to return to the monitor
25ab : 1c > db test_num
>
25ac : >skip2182
>
25ac : 28 [ 4]> plp ;restore status
set_a $7f,0
> load_flag 0
25ad : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
25af : 48 [ 3]> pha ;use stack to load status
25b0 : a97f [ 2]> lda #$7f ;precharge accu
25b2 : 28 [ 4]> plp
25b3 : c1ca [ 6] cmp (ind1,x)
tst_a $7f,fzc
25b5 : 08 [ 3]> php ;save flags
25b6 : 08 [ 3]> php
25b7 : c97f [ 2]> cmp #$7f ;test result
> trap_ne
25b9 : f002 [ 3]> beq skip2187
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
25bb : 00 [ 7]> brk ; Use BRK to return to the monitor
25bc : 1c > db test_num
>
25bd : >skip2187
>
25bd : 68 [ 4]> pla ;load status
> cmp_flag fzc
25be : c933 [ 2]> cmp #(fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
25c0 : f002 [ 3]> beq skip2190
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
25c2 : 00 [ 7]> brk ; Use BRK to return to the monitor
25c3 : 1c > db test_num
>
25c4 : >skip2190
>
25c4 : 28 [ 4]> plp ;restore status
set_a $7e,0
> load_flag 0
25c5 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
25c7 : 48 [ 3]> pha ;use stack to load status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 257
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
25c8 : a97e [ 2]> lda #$7e ;precharge accu
25ca : 28 [ 4]> plp
25cb : c1ca [ 6] cmp (ind1,x)
tst_a $7e,fn
25cd : 08 [ 3]> php ;save flags
25ce : 08 [ 3]> php
25cf : c97e [ 2]> cmp #$7e ;test result
> trap_ne
25d1 : f002 [ 3]> beq skip2195
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
25d3 : 00 [ 7]> brk ; Use BRK to return to the monitor
25d4 : 1c > db test_num
>
25d5 : >skip2195
>
25d5 : 68 [ 4]> pla ;load status
> cmp_flag fn
25d6 : c9b0 [ 2]> cmp #(fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
25d8 : f002 [ 3]> beq skip2198
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
25da : 00 [ 7]> brk ; Use BRK to return to the monitor
25db : 1c > db test_num
>
25dc : >skip2198
>
25dc : 28 [ 4]> plp ;restore status
set_a $80,$ff
> load_flag $ff
25dd : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
25df : 48 [ 3]> pha ;use stack to load status
25e0 : a980 [ 2]> lda #$80 ;precharge accu
25e2 : 28 [ 4]> plp
25e3 : c1ca [ 6] cmp (ind1,x)
tst_a $80,~fnz
25e5 : 08 [ 3]> php ;save flags
25e6 : 08 [ 3]> php
25e7 : c980 [ 2]> cmp #$80 ;test result
> trap_ne
25e9 : f002 [ 3]> beq skip2203
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
25eb : 00 [ 7]> brk ; Use BRK to return to the monitor
25ec : 1c > db test_num
>
25ed : >skip2203
>
25ed : 68 [ 4]> pla ;load status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 258
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> cmp_flag ~fnz
25ee : c97d [ 2]> cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
25f0 : f002 [ 3]> beq skip2206
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
25f2 : 00 [ 7]> brk ; Use BRK to return to the monitor
25f3 : 1c > db test_num
>
25f4 : >skip2206
>
25f4 : 28 [ 4]> plp ;restore status
set_a $7f,$ff
> load_flag $ff
25f5 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
25f7 : 48 [ 3]> pha ;use stack to load status
25f8 : a97f [ 2]> lda #$7f ;precharge accu
25fa : 28 [ 4]> plp
25fb : c1ca [ 6] cmp (ind1,x)
tst_a $7f,~fn
25fd : 08 [ 3]> php ;save flags
25fe : 08 [ 3]> php
25ff : c97f [ 2]> cmp #$7f ;test result
> trap_ne
2601 : f002 [ 3]> beq skip2211
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2603 : 00 [ 7]> brk ; Use BRK to return to the monitor
2604 : 1c > db test_num
>
2605 : >skip2211
>
2605 : 68 [ 4]> pla ;load status
> cmp_flag ~fn
2606 : c97f [ 2]> cmp #(~fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2608 : f002 [ 3]> beq skip2214
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
260a : 00 [ 7]> brk ; Use BRK to return to the monitor
260b : 1c > db test_num
>
260c : >skip2214
>
260c : 28 [ 4]> plp ;restore status
set_a $7e,$ff
> load_flag $ff
260d : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 259
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
260f : 48 [ 3]> pha ;use stack to load status
2610 : a97e [ 2]> lda #$7e ;precharge accu
2612 : 28 [ 4]> plp
2613 : c1ca [ 6] cmp (ind1,x)
tst_a $7e,~fzc
2615 : 08 [ 3]> php ;save flags
2616 : 08 [ 3]> php
2617 : c97e [ 2]> cmp #$7e ;test result
> trap_ne
2619 : f002 [ 3]> beq skip2219
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
261b : 00 [ 7]> brk ; Use BRK to return to the monitor
261c : 1c > db test_num
>
261d : >skip2219
>
261d : 68 [ 4]> pla ;load status
> cmp_flag ~fzc
261e : c9fc [ 2]> cmp #(~fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2620 : f002 [ 3]> beq skip2222
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2622 : 00 [ 7]> brk ; Use BRK to return to the monitor
2623 : 1c > db test_num
>
2624 : >skip2222
>
2624 : 28 [ 4]> plp ;restore status
set_a $80,0
> load_flag 0
2625 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2627 : 48 [ 3]> pha ;use stack to load status
2628 : a980 [ 2]> lda #$80 ;precharge accu
262a : 28 [ 4]> plp
262b : d1ca [ 5] cmp (ind1),y
tst_a $80,fc
262d : 08 [ 3]> php ;save flags
262e : 08 [ 3]> php
262f : c980 [ 2]> cmp #$80 ;test result
> trap_ne
2631 : f002 [ 3]> beq skip2227
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2633 : 00 [ 7]> brk ; Use BRK to return to the monitor
2634 : 1c > db test_num
>
2635 : >skip2227
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 260
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
2635 : 68 [ 4]> pla ;load status
> cmp_flag fc
2636 : c931 [ 2]> cmp #(fc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2638 : f002 [ 3]> beq skip2230
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
263a : 00 [ 7]> brk ; Use BRK to return to the monitor
263b : 1c > db test_num
>
263c : >skip2230
>
263c : 28 [ 4]> plp ;restore status
set_a $7f,0
> load_flag 0
263d : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
263f : 48 [ 3]> pha ;use stack to load status
2640 : a97f [ 2]> lda #$7f ;precharge accu
2642 : 28 [ 4]> plp
2643 : d1ca [ 5] cmp (ind1),y
tst_a $7f,fzc
2645 : 08 [ 3]> php ;save flags
2646 : 08 [ 3]> php
2647 : c97f [ 2]> cmp #$7f ;test result
> trap_ne
2649 : f002 [ 3]> beq skip2235
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
264b : 00 [ 7]> brk ; Use BRK to return to the monitor
264c : 1c > db test_num
>
264d : >skip2235
>
264d : 68 [ 4]> pla ;load status
> cmp_flag fzc
264e : c933 [ 2]> cmp #(fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2650 : f002 [ 3]> beq skip2238
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2652 : 00 [ 7]> brk ; Use BRK to return to the monitor
2653 : 1c > db test_num
>
2654 : >skip2238
>
2654 : 28 [ 4]> plp ;restore status
set_a $7e,0
> load_flag 0
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 261
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2655 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2657 : 48 [ 3]> pha ;use stack to load status
2658 : a97e [ 2]> lda #$7e ;precharge accu
265a : 28 [ 4]> plp
265b : d1ca [ 5] cmp (ind1),y
tst_a $7e,fn
265d : 08 [ 3]> php ;save flags
265e : 08 [ 3]> php
265f : c97e [ 2]> cmp #$7e ;test result
> trap_ne
2661 : f002 [ 3]> beq skip2243
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2663 : 00 [ 7]> brk ; Use BRK to return to the monitor
2664 : 1c > db test_num
>
2665 : >skip2243
>
2665 : 68 [ 4]> pla ;load status
> cmp_flag fn
2666 : c9b0 [ 2]> cmp #(fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2668 : f002 [ 3]> beq skip2246
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
266a : 00 [ 7]> brk ; Use BRK to return to the monitor
266b : 1c > db test_num
>
266c : >skip2246
>
266c : 28 [ 4]> plp ;restore status
set_a $80,$ff
> load_flag $ff
266d : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
266f : 48 [ 3]> pha ;use stack to load status
2670 : a980 [ 2]> lda #$80 ;precharge accu
2672 : 28 [ 4]> plp
2673 : d1ca [ 5] cmp (ind1),y
tst_a $80,~fnz
2675 : 08 [ 3]> php ;save flags
2676 : 08 [ 3]> php
2677 : c980 [ 2]> cmp #$80 ;test result
> trap_ne
2679 : f002 [ 3]> beq skip2251
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
267b : 00 [ 7]> brk ; Use BRK to return to the monitor
267c : 1c > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 262
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
267d : >skip2251
>
267d : 68 [ 4]> pla ;load status
> cmp_flag ~fnz
267e : c97d [ 2]> cmp #(~fnz|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2680 : f002 [ 3]> beq skip2254
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2682 : 00 [ 7]> brk ; Use BRK to return to the monitor
2683 : 1c > db test_num
>
2684 : >skip2254
>
2684 : 28 [ 4]> plp ;restore status
set_a $7f,$ff
> load_flag $ff
2685 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2687 : 48 [ 3]> pha ;use stack to load status
2688 : a97f [ 2]> lda #$7f ;precharge accu
268a : 28 [ 4]> plp
268b : d1ca [ 5] cmp (ind1),y
tst_a $7f,~fn
268d : 08 [ 3]> php ;save flags
268e : 08 [ 3]> php
268f : c97f [ 2]> cmp #$7f ;test result
> trap_ne
2691 : f002 [ 3]> beq skip2259
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2693 : 00 [ 7]> brk ; Use BRK to return to the monitor
2694 : 1c > db test_num
>
2695 : >skip2259
>
2695 : 68 [ 4]> pla ;load status
> cmp_flag ~fn
2696 : c97f [ 2]> cmp #(~fn|fao)&m8 ;expected flags + always on bits
>
> trap_ne
2698 : f002 [ 3]> beq skip2262
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
269a : 00 [ 7]> brk ; Use BRK to return to the monitor
269b : 1c > db test_num
>
269c : >skip2262
>
269c : 28 [ 4]> plp ;restore status
set_a $7e,$ff
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 263
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> load_flag $ff
269d : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
269f : 48 [ 3]> pha ;use stack to load status
26a0 : a97e [ 2]> lda #$7e ;precharge accu
26a2 : 28 [ 4]> plp
26a3 : d1ca [ 5] cmp (ind1),y
tst_a $7e,~fzc
26a5 : 08 [ 3]> php ;save flags
26a6 : 08 [ 3]> php
26a7 : c97e [ 2]> cmp #$7e ;test result
> trap_ne
26a9 : f002 [ 3]> beq skip2267
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
26ab : 00 [ 7]> brk ; Use BRK to return to the monitor
26ac : 1c > db test_num
>
26ad : >skip2267
>
26ad : 68 [ 4]> pla ;load status
> cmp_flag ~fzc
26ae : c9fc [ 2]> cmp #(~fzc|fao)&m8 ;expected flags + always on bits
>
> trap_ne
26b0 : f002 [ 3]> beq skip2270
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
26b2 : 00 [ 7]> brk ; Use BRK to return to the monitor
26b3 : 1c > db test_num
>
26b4 : >skip2270
>
26b4 : 28 [ 4]> plp ;restore status
next_test
26b5 : ad0002 [ 4]> lda test_case ;previous test
26b8 : c91c [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
26ba : f002 [ 3]> beq skip2273
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
26bc : 00 [ 7]> brk ; Use BRK to return to the monitor
26bd : 1c > db test_num
>
26be : >skip2273
>
001d = >test_num = test_num + 1
26be : a91d [ 2]> lda #test_num ;*** this tests' number
26c0 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; testing shifts - ASL LSR ROL ROR all addressing modes
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 264
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
; shifts - accumulator
26c3 : a203 [ 2] ldx #3
26c5 : tasl
set_ax zp1,0
> load_flag 0
26c5 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
26c7 : 48 [ 3]> pha ;use stack to load status
26c8 : b5b9 [ 4]> lda zp1,x ;precharge accu
26ca : 28 [ 4]> plp
26cb : 0a [ 2] asl a
tst_ax rASL,fASL,0
26cc : 08 [ 3]> php ;save flags
26cd : dd1102 [ 4]> cmp rASL,x ;test result
> trap_ne
26d0 : f002 [ 3]> beq skip2278
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
26d2 : 00 [ 7]> brk ; Use BRK to return to the monitor
26d3 : 1d > db test_num
>
26d4 : >skip2278
>
26d4 : 68 [ 4]> pla ;load status
> eor_flag 0
26d5 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
26d7 : dd2102 [ 4]> cmp fASL,x ;test flags
> trap_ne ;
26da : f002 [ 3]> beq skip2281
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
26dc : 00 [ 7]> brk ; Use BRK to return to the monitor
26dd : 1d > db test_num
>
26de : >skip2281
>
26de : ca [ 2] dex
26df : 10e4 [ 3] bpl tasl
26e1 : a203 [ 2] ldx #3
26e3 : tasl1
set_ax zp1,$ff
> load_flag $ff
26e3 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
26e5 : 48 [ 3]> pha ;use stack to load status
26e6 : b5b9 [ 4]> lda zp1,x ;precharge accu
26e8 : 28 [ 4]> plp
26e9 : 0a [ 2] asl a
tst_ax rASL,fASL,$ff-fnzc
26ea : 08 [ 3]> php ;save flags
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 265
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
26eb : dd1102 [ 4]> cmp rASL,x ;test result
> trap_ne
26ee : f002 [ 3]> beq skip2286
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
26f0 : 00 [ 7]> brk ; Use BRK to return to the monitor
26f1 : 1d > db test_num
>
26f2 : >skip2286
>
26f2 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
26f3 : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
26f5 : dd2102 [ 4]> cmp fASL,x ;test flags
> trap_ne ;
26f8 : f002 [ 3]> beq skip2289
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
26fa : 00 [ 7]> brk ; Use BRK to return to the monitor
26fb : 1d > db test_num
>
26fc : >skip2289
>
26fc : ca [ 2] dex
26fd : 10e4 [ 3] bpl tasl1
26ff : a203 [ 2] ldx #3
2701 : tlsr
set_ax zp1,0
> load_flag 0
2701 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2703 : 48 [ 3]> pha ;use stack to load status
2704 : b5b9 [ 4]> lda zp1,x ;precharge accu
2706 : 28 [ 4]> plp
2707 : 4a [ 2] lsr a
tst_ax rLSR,fLSR,0
2708 : 08 [ 3]> php ;save flags
2709 : dd1902 [ 4]> cmp rLSR,x ;test result
> trap_ne
270c : f002 [ 3]> beq skip2294
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
270e : 00 [ 7]> brk ; Use BRK to return to the monitor
270f : 1d > db test_num
>
2710 : >skip2294
>
2710 : 68 [ 4]> pla ;load status
> eor_flag 0
2711 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 266
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2713 : dd2902 [ 4]> cmp fLSR,x ;test flags
> trap_ne ;
2716 : f002 [ 3]> beq skip2297
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2718 : 00 [ 7]> brk ; Use BRK to return to the monitor
2719 : 1d > db test_num
>
271a : >skip2297
>
271a : ca [ 2] dex
271b : 10e4 [ 3] bpl tlsr
271d : a203 [ 2] ldx #3
271f : tlsr1
set_ax zp1,$ff
> load_flag $ff
271f : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2721 : 48 [ 3]> pha ;use stack to load status
2722 : b5b9 [ 4]> lda zp1,x ;precharge accu
2724 : 28 [ 4]> plp
2725 : 4a [ 2] lsr a
tst_ax rLSR,fLSR,$ff-fnzc
2726 : 08 [ 3]> php ;save flags
2727 : dd1902 [ 4]> cmp rLSR,x ;test result
> trap_ne
272a : f002 [ 3]> beq skip2302
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
272c : 00 [ 7]> brk ; Use BRK to return to the monitor
272d : 1d > db test_num
>
272e : >skip2302
>
272e : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
272f : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2731 : dd2902 [ 4]> cmp fLSR,x ;test flags
> trap_ne ;
2734 : f002 [ 3]> beq skip2305
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2736 : 00 [ 7]> brk ; Use BRK to return to the monitor
2737 : 1d > db test_num
>
2738 : >skip2305
>
2738 : ca [ 2] dex
2739 : 10e4 [ 3] bpl tlsr1
273b : a203 [ 2] ldx #3
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 267
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
273d : trol
set_ax zp1,0
> load_flag 0
273d : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
273f : 48 [ 3]> pha ;use stack to load status
2740 : b5b9 [ 4]> lda zp1,x ;precharge accu
2742 : 28 [ 4]> plp
2743 : 2a [ 2] rol a
tst_ax rROL,fROL,0
2744 : 08 [ 3]> php ;save flags
2745 : dd1102 [ 4]> cmp rROL,x ;test result
> trap_ne
2748 : f002 [ 3]> beq skip2310
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
274a : 00 [ 7]> brk ; Use BRK to return to the monitor
274b : 1d > db test_num
>
274c : >skip2310
>
274c : 68 [ 4]> pla ;load status
> eor_flag 0
274d : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
274f : dd2102 [ 4]> cmp fROL,x ;test flags
> trap_ne ;
2752 : f002 [ 3]> beq skip2313
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2754 : 00 [ 7]> brk ; Use BRK to return to the monitor
2755 : 1d > db test_num
>
2756 : >skip2313
>
2756 : ca [ 2] dex
2757 : 10e4 [ 3] bpl trol
2759 : a203 [ 2] ldx #3
275b : trol1
set_ax zp1,$ff-fc
> load_flag $ff-fc
275b : a9fe [ 2]> lda #$ff-fc ;allow test to change I-flag (no mask)
>
275d : 48 [ 3]> pha ;use stack to load status
275e : b5b9 [ 4]> lda zp1,x ;precharge accu
2760 : 28 [ 4]> plp
2761 : 2a [ 2] rol a
tst_ax rROL,fROL,$ff-fnzc
2762 : 08 [ 3]> php ;save flags
2763 : dd1102 [ 4]> cmp rROL,x ;test result
> trap_ne
2766 : f002 [ 3]> beq skip2318
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 268
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2768 : 00 [ 7]> brk ; Use BRK to return to the monitor
2769 : 1d > db test_num
>
276a : >skip2318
>
276a : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
276b : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
276d : dd2102 [ 4]> cmp fROL,x ;test flags
> trap_ne ;
2770 : f002 [ 3]> beq skip2321
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2772 : 00 [ 7]> brk ; Use BRK to return to the monitor
2773 : 1d > db test_num
>
2774 : >skip2321
>
2774 : ca [ 2] dex
2775 : 10e4 [ 3] bpl trol1
2777 : a203 [ 2] ldx #3
2779 : trolc
set_ax zp1,fc
> load_flag fc
2779 : a901 [ 2]> lda #fc ;allow test to change I-flag (no mask)
>
277b : 48 [ 3]> pha ;use stack to load status
277c : b5b9 [ 4]> lda zp1,x ;precharge accu
277e : 28 [ 4]> plp
277f : 2a [ 2] rol a
tst_ax rROLc,fROLc,0
2780 : 08 [ 3]> php ;save flags
2781 : dd1502 [ 4]> cmp rROLc,x ;test result
> trap_ne
2784 : f002 [ 3]> beq skip2326
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2786 : 00 [ 7]> brk ; Use BRK to return to the monitor
2787 : 1d > db test_num
>
2788 : >skip2326
>
2788 : 68 [ 4]> pla ;load status
> eor_flag 0
2789 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
278b : dd2502 [ 4]> cmp fROLc,x ;test flags
> trap_ne ;
278e : f002 [ 3]> beq skip2329
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 269
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2790 : 00 [ 7]> brk ; Use BRK to return to the monitor
2791 : 1d > db test_num
>
2792 : >skip2329
>
2792 : ca [ 2] dex
2793 : 10e4 [ 3] bpl trolc
2795 : a203 [ 2] ldx #3
2797 : trolc1
set_ax zp1,$ff
> load_flag $ff
2797 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2799 : 48 [ 3]> pha ;use stack to load status
279a : b5b9 [ 4]> lda zp1,x ;precharge accu
279c : 28 [ 4]> plp
279d : 2a [ 2] rol a
tst_ax rROLc,fROLc,$ff-fnzc
279e : 08 [ 3]> php ;save flags
279f : dd1502 [ 4]> cmp rROLc,x ;test result
> trap_ne
27a2 : f002 [ 3]> beq skip2334
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
27a4 : 00 [ 7]> brk ; Use BRK to return to the monitor
27a5 : 1d > db test_num
>
27a6 : >skip2334
>
27a6 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
27a7 : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
27a9 : dd2502 [ 4]> cmp fROLc,x ;test flags
> trap_ne ;
27ac : f002 [ 3]> beq skip2337
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
27ae : 00 [ 7]> brk ; Use BRK to return to the monitor
27af : 1d > db test_num
>
27b0 : >skip2337
>
27b0 : ca [ 2] dex
27b1 : 10e4 [ 3] bpl trolc1
27b3 : a203 [ 2] ldx #3
27b5 : tror
set_ax zp1,0
> load_flag 0
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 270
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
27b5 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
27b7 : 48 [ 3]> pha ;use stack to load status
27b8 : b5b9 [ 4]> lda zp1,x ;precharge accu
27ba : 28 [ 4]> plp
27bb : 6a [ 2] ror a
tst_ax rROR,fROR,0
27bc : 08 [ 3]> php ;save flags
27bd : dd1902 [ 4]> cmp rROR,x ;test result
> trap_ne
27c0 : f002 [ 3]> beq skip2342
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
27c2 : 00 [ 7]> brk ; Use BRK to return to the monitor
27c3 : 1d > db test_num
>
27c4 : >skip2342
>
27c4 : 68 [ 4]> pla ;load status
> eor_flag 0
27c5 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
27c7 : dd2902 [ 4]> cmp fROR,x ;test flags
> trap_ne ;
27ca : f002 [ 3]> beq skip2345
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
27cc : 00 [ 7]> brk ; Use BRK to return to the monitor
27cd : 1d > db test_num
>
27ce : >skip2345
>
27ce : ca [ 2] dex
27cf : 10e4 [ 3] bpl tror
27d1 : a203 [ 2] ldx #3
27d3 : tror1
set_ax zp1,$ff-fc
> load_flag $ff-fc
27d3 : a9fe [ 2]> lda #$ff-fc ;allow test to change I-flag (no mask)
>
27d5 : 48 [ 3]> pha ;use stack to load status
27d6 : b5b9 [ 4]> lda zp1,x ;precharge accu
27d8 : 28 [ 4]> plp
27d9 : 6a [ 2] ror a
tst_ax rROR,fROR,$ff-fnzc
27da : 08 [ 3]> php ;save flags
27db : dd1902 [ 4]> cmp rROR,x ;test result
> trap_ne
27de : f002 [ 3]> beq skip2350
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
27e0 : 00 [ 7]> brk ; Use BRK to return to the monitor
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 271
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
27e1 : 1d > db test_num
>
27e2 : >skip2350
>
27e2 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
27e3 : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
27e5 : dd2902 [ 4]> cmp fROR,x ;test flags
> trap_ne ;
27e8 : f002 [ 3]> beq skip2353
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
27ea : 00 [ 7]> brk ; Use BRK to return to the monitor
27eb : 1d > db test_num
>
27ec : >skip2353
>
27ec : ca [ 2] dex
27ed : 10e4 [ 3] bpl tror1
27ef : a203 [ 2] ldx #3
27f1 : trorc
set_ax zp1,fc
> load_flag fc
27f1 : a901 [ 2]> lda #fc ;allow test to change I-flag (no mask)
>
27f3 : 48 [ 3]> pha ;use stack to load status
27f4 : b5b9 [ 4]> lda zp1,x ;precharge accu
27f6 : 28 [ 4]> plp
27f7 : 6a [ 2] ror a
tst_ax rRORc,fRORc,0
27f8 : 08 [ 3]> php ;save flags
27f9 : dd1d02 [ 4]> cmp rRORc,x ;test result
> trap_ne
27fc : f002 [ 4]> beq skip2358
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
27fe : 00 [ 7]> brk ; Use BRK to return to the monitor
27ff : 1d > db test_num
>
2800 : >skip2358
>
2800 : 68 [ 4]> pla ;load status
> eor_flag 0
2801 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2803 : dd2d02 [ 4]> cmp fRORc,x ;test flags
> trap_ne ;
2806 : f002 [ 3]> beq skip2361
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2808 : 00 [ 7]> brk ; Use BRK to return to the monitor
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 272
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2809 : 1d > db test_num
>
280a : >skip2361
>
280a : ca [ 2] dex
280b : 10e4 [ 4] bpl trorc
280d : a203 [ 2] ldx #3
280f : trorc1
set_ax zp1,$ff
> load_flag $ff
280f : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2811 : 48 [ 3]> pha ;use stack to load status
2812 : b5b9 [ 4]> lda zp1,x ;precharge accu
2814 : 28 [ 4]> plp
2815 : 6a [ 2] ror a
tst_ax rRORc,fRORc,$ff-fnzc
2816 : 08 [ 3]> php ;save flags
2817 : dd1d02 [ 4]> cmp rRORc,x ;test result
> trap_ne
281a : f002 [ 3]> beq skip2366
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
281c : 00 [ 7]> brk ; Use BRK to return to the monitor
281d : 1d > db test_num
>
281e : >skip2366
>
281e : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
281f : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2821 : dd2d02 [ 4]> cmp fRORc,x ;test flags
> trap_ne ;
2824 : f002 [ 3]> beq skip2369
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2826 : 00 [ 7]> brk ; Use BRK to return to the monitor
2827 : 1d > db test_num
>
2828 : >skip2369
>
2828 : ca [ 2] dex
2829 : 10e4 [ 3] bpl trorc1
next_test
282b : ad0002 [ 4]> lda test_case ;previous test
282e : c91d [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
2830 : f002 [ 3]> beq skip2372
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2832 : 00 [ 7]> brk ; Use BRK to return to the monitor
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 273
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2833 : 1d > db test_num
>
2834 : >skip2372
>
001e = >test_num = test_num + 1
2834 : a91e [ 2]> lda #test_num ;*** this tests' number
2836 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; shifts - zeropage
2839 : a203 [ 2] ldx #3
283b : tasl2
set_z zp1,0
> load_flag 0
283b : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
283d : 48 [ 3]> pha ;use stack to load status
283e : b5b9 [ 4]> lda zp1,x ;load to zeropage
2840 : 85b2 [ 3]> sta zpt
2842 : 28 [ 4]> plp
2843 : 06b2 [ 5] asl zpt
tst_z rASL,fASL,0
2845 : 08 [ 3]> php ;save flags
2846 : a5b2 [ 3]> lda zpt
2848 : dd1102 [ 4]> cmp rASL,x ;test result
> trap_ne
284b : f002 [ 3]> beq skip2377
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
284d : 00 [ 7]> brk ; Use BRK to return to the monitor
284e : 1e > db test_num
>
284f : >skip2377
>
284f : 68 [ 4]> pla ;load status
> eor_flag 0
2850 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2852 : dd2102 [ 4]> cmp fASL,x ;test flags
> trap_ne
2855 : f002 [ 3]> beq skip2380
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2857 : 00 [ 7]> brk ; Use BRK to return to the monitor
2858 : 1e > db test_num
>
2859 : >skip2380
>
2859 : ca [ 2] dex
285a : 10df [ 3] bpl tasl2
285c : a203 [ 2] ldx #3
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 274
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
285e : tasl3
set_z zp1,$ff
> load_flag $ff
285e : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2860 : 48 [ 3]> pha ;use stack to load status
2861 : b5b9 [ 4]> lda zp1,x ;load to zeropage
2863 : 85b2 [ 3]> sta zpt
2865 : 28 [ 4]> plp
2866 : 06b2 [ 5] asl zpt
tst_z rASL,fASL,$ff-fnzc
2868 : 08 [ 3]> php ;save flags
2869 : a5b2 [ 3]> lda zpt
286b : dd1102 [ 4]> cmp rASL,x ;test result
> trap_ne
286e : f002 [ 3]> beq skip2385
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2870 : 00 [ 7]> brk ; Use BRK to return to the monitor
2871 : 1e > db test_num
>
2872 : >skip2385
>
2872 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2873 : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2875 : dd2102 [ 4]> cmp fASL,x ;test flags
> trap_ne
2878 : f002 [ 3]> beq skip2388
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
287a : 00 [ 7]> brk ; Use BRK to return to the monitor
287b : 1e > db test_num
>
287c : >skip2388
>
287c : ca [ 2] dex
287d : 10df [ 3] bpl tasl3
287f : a203 [ 2] ldx #3
2881 : tlsr2
set_z zp1,0
> load_flag 0
2881 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2883 : 48 [ 3]> pha ;use stack to load status
2884 : b5b9 [ 4]> lda zp1,x ;load to zeropage
2886 : 85b2 [ 3]> sta zpt
2888 : 28 [ 4]> plp
2889 : 46b2 [ 5] lsr zpt
tst_z rLSR,fLSR,0
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 275
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
288b : 08 [ 3]> php ;save flags
288c : a5b2 [ 3]> lda zpt
288e : dd1902 [ 4]> cmp rLSR,x ;test result
> trap_ne
2891 : f002 [ 3]> beq skip2393
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2893 : 00 [ 7]> brk ; Use BRK to return to the monitor
2894 : 1e > db test_num
>
2895 : >skip2393
>
2895 : 68 [ 4]> pla ;load status
> eor_flag 0
2896 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2898 : dd2902 [ 4]> cmp fLSR,x ;test flags
> trap_ne
289b : f002 [ 3]> beq skip2396
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
289d : 00 [ 7]> brk ; Use BRK to return to the monitor
289e : 1e > db test_num
>
289f : >skip2396
>
289f : ca [ 2] dex
28a0 : 10df [ 3] bpl tlsr2
28a2 : a203 [ 2] ldx #3
28a4 : tlsr3
set_z zp1,$ff
> load_flag $ff
28a4 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
28a6 : 48 [ 3]> pha ;use stack to load status
28a7 : b5b9 [ 4]> lda zp1,x ;load to zeropage
28a9 : 85b2 [ 3]> sta zpt
28ab : 28 [ 4]> plp
28ac : 46b2 [ 5] lsr zpt
tst_z rLSR,fLSR,$ff-fnzc
28ae : 08 [ 3]> php ;save flags
28af : a5b2 [ 3]> lda zpt
28b1 : dd1902 [ 4]> cmp rLSR,x ;test result
> trap_ne
28b4 : f002 [ 3]> beq skip2401
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
28b6 : 00 [ 7]> brk ; Use BRK to return to the monitor
28b7 : 1e > db test_num
>
28b8 : >skip2401
>
28b8 : 68 [ 4]> pla ;load status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 276
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> eor_flag $ff-fnzc
28b9 : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
28bb : dd2902 [ 4]> cmp fLSR,x ;test flags
> trap_ne
28be : f002 [ 3]> beq skip2404
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
28c0 : 00 [ 7]> brk ; Use BRK to return to the monitor
28c1 : 1e > db test_num
>
28c2 : >skip2404
>
28c2 : ca [ 2] dex
28c3 : 10df [ 3] bpl tlsr3
28c5 : a203 [ 2] ldx #3
28c7 : trol2
set_z zp1,0
> load_flag 0
28c7 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
28c9 : 48 [ 3]> pha ;use stack to load status
28ca : b5b9 [ 4]> lda zp1,x ;load to zeropage
28cc : 85b2 [ 3]> sta zpt
28ce : 28 [ 4]> plp
28cf : 26b2 [ 5] rol zpt
tst_z rROL,fROL,0
28d1 : 08 [ 3]> php ;save flags
28d2 : a5b2 [ 3]> lda zpt
28d4 : dd1102 [ 4]> cmp rROL,x ;test result
> trap_ne
28d7 : f002 [ 3]> beq skip2409
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
28d9 : 00 [ 7]> brk ; Use BRK to return to the monitor
28da : 1e > db test_num
>
28db : >skip2409
>
28db : 68 [ 4]> pla ;load status
> eor_flag 0
28dc : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
28de : dd2102 [ 4]> cmp fROL,x ;test flags
> trap_ne
28e1 : f002 [ 3]> beq skip2412
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
28e3 : 00 [ 7]> brk ; Use BRK to return to the monitor
28e4 : 1e > db test_num
>
28e5 : >skip2412
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 277
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
28e5 : ca [ 2] dex
28e6 : 10df [ 3] bpl trol2
28e8 : a203 [ 2] ldx #3
28ea : trol3
set_z zp1,$ff-fc
> load_flag $ff-fc
28ea : a9fe [ 2]> lda #$ff-fc ;allow test to change I-flag (no mask)
>
28ec : 48 [ 3]> pha ;use stack to load status
28ed : b5b9 [ 4]> lda zp1,x ;load to zeropage
28ef : 85b2 [ 3]> sta zpt
28f1 : 28 [ 4]> plp
28f2 : 26b2 [ 5] rol zpt
tst_z rROL,fROL,$ff-fnzc
28f4 : 08 [ 3]> php ;save flags
28f5 : a5b2 [ 3]> lda zpt
28f7 : dd1102 [ 4]> cmp rROL,x ;test result
> trap_ne
28fa : f002 [ 3]> beq skip2417
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
28fc : 00 [ 7]> brk ; Use BRK to return to the monitor
28fd : 1e > db test_num
>
28fe : >skip2417
>
28fe : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
28ff : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2901 : dd2102 [ 4]> cmp fROL,x ;test flags
> trap_ne
2904 : f002 [ 3]> beq skip2420
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2906 : 00 [ 7]> brk ; Use BRK to return to the monitor
2907 : 1e > db test_num
>
2908 : >skip2420
>
2908 : ca [ 2] dex
2909 : 10df [ 4] bpl trol3
290b : a203 [ 2] ldx #3
290d : trolc2
set_z zp1,fc
> load_flag fc
290d : a901 [ 2]> lda #fc ;allow test to change I-flag (no mask)
>
290f : 48 [ 3]> pha ;use stack to load status
2910 : b5b9 [ 4]> lda zp1,x ;load to zeropage
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 278
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2912 : 85b2 [ 3]> sta zpt
2914 : 28 [ 4]> plp
2915 : 26b2 [ 5] rol zpt
tst_z rROLc,fROLc,0
2917 : 08 [ 3]> php ;save flags
2918 : a5b2 [ 3]> lda zpt
291a : dd1502 [ 4]> cmp rROLc,x ;test result
> trap_ne
291d : f002 [ 3]> beq skip2425
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
291f : 00 [ 7]> brk ; Use BRK to return to the monitor
2920 : 1e > db test_num
>
2921 : >skip2425
>
2921 : 68 [ 4]> pla ;load status
> eor_flag 0
2922 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2924 : dd2502 [ 4]> cmp fROLc,x ;test flags
> trap_ne
2927 : f002 [ 3]> beq skip2428
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2929 : 00 [ 7]> brk ; Use BRK to return to the monitor
292a : 1e > db test_num
>
292b : >skip2428
>
292b : ca [ 2] dex
292c : 10df [ 3] bpl trolc2
292e : a203 [ 2] ldx #3
2930 : trolc3
set_z zp1,$ff
> load_flag $ff
2930 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2932 : 48 [ 3]> pha ;use stack to load status
2933 : b5b9 [ 4]> lda zp1,x ;load to zeropage
2935 : 85b2 [ 3]> sta zpt
2937 : 28 [ 4]> plp
2938 : 26b2 [ 5] rol zpt
tst_z rROLc,fROLc,$ff-fnzc
293a : 08 [ 3]> php ;save flags
293b : a5b2 [ 3]> lda zpt
293d : dd1502 [ 4]> cmp rROLc,x ;test result
> trap_ne
2940 : f002 [ 3]> beq skip2433
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2942 : 00 [ 7]> brk ; Use BRK to return to the monitor
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 279
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2943 : 1e > db test_num
>
2944 : >skip2433
>
2944 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2945 : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2947 : dd2502 [ 4]> cmp fROLc,x ;test flags
> trap_ne
294a : f002 [ 3]> beq skip2436
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
294c : 00 [ 7]> brk ; Use BRK to return to the monitor
294d : 1e > db test_num
>
294e : >skip2436
>
294e : ca [ 2] dex
294f : 10df [ 3] bpl trolc3
2951 : a203 [ 2] ldx #3
2953 : tror2
set_z zp1,0
> load_flag 0
2953 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2955 : 48 [ 3]> pha ;use stack to load status
2956 : b5b9 [ 4]> lda zp1,x ;load to zeropage
2958 : 85b2 [ 3]> sta zpt
295a : 28 [ 4]> plp
295b : 66b2 [ 5] ror zpt
tst_z rROR,fROR,0
295d : 08 [ 3]> php ;save flags
295e : a5b2 [ 3]> lda zpt
2960 : dd1902 [ 4]> cmp rROR,x ;test result
> trap_ne
2963 : f002 [ 3]> beq skip2441
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2965 : 00 [ 7]> brk ; Use BRK to return to the monitor
2966 : 1e > db test_num
>
2967 : >skip2441
>
2967 : 68 [ 4]> pla ;load status
> eor_flag 0
2968 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
296a : dd2902 [ 4]> cmp fROR,x ;test flags
> trap_ne
296d : f002 [ 3]> beq skip2444
> trap ;failed equal (zero)
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 280
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>; db $db ; M65C02/M65C02A SToP instruction
296f : 00 [ 7]> brk ; Use BRK to return to the monitor
2970 : 1e > db test_num
>
2971 : >skip2444
>
2971 : ca [ 2] dex
2972 : 10df [ 3] bpl tror2
2974 : a203 [ 2] ldx #3
2976 : tror3
set_z zp1,$ff-fc
> load_flag $ff-fc
2976 : a9fe [ 2]> lda #$ff-fc ;allow test to change I-flag (no mask)
>
2978 : 48 [ 3]> pha ;use stack to load status
2979 : b5b9 [ 4]> lda zp1,x ;load to zeropage
297b : 85b2 [ 3]> sta zpt
297d : 28 [ 4]> plp
297e : 66b2 [ 5] ror zpt
tst_z rROR,fROR,$ff-fnzc
2980 : 08 [ 3]> php ;save flags
2981 : a5b2 [ 3]> lda zpt
2983 : dd1902 [ 4]> cmp rROR,x ;test result
> trap_ne
2986 : f002 [ 3]> beq skip2449
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2988 : 00 [ 7]> brk ; Use BRK to return to the monitor
2989 : 1e > db test_num
>
298a : >skip2449
>
298a : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
298b : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
298d : dd2902 [ 4]> cmp fROR,x ;test flags
> trap_ne
2990 : f002 [ 3]> beq skip2452
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2992 : 00 [ 7]> brk ; Use BRK to return to the monitor
2993 : 1e > db test_num
>
2994 : >skip2452
>
2994 : ca [ 2] dex
2995 : 10df [ 3] bpl tror3
2997 : a203 [ 2] ldx #3
2999 : trorc2
set_z zp1,fc
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 281
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> load_flag fc
2999 : a901 [ 2]> lda #fc ;allow test to change I-flag (no mask)
>
299b : 48 [ 3]> pha ;use stack to load status
299c : b5b9 [ 4]> lda zp1,x ;load to zeropage
299e : 85b2 [ 3]> sta zpt
29a0 : 28 [ 4]> plp
29a1 : 66b2 [ 5] ror zpt
tst_z rRORc,fRORc,0
29a3 : 08 [ 3]> php ;save flags
29a4 : a5b2 [ 3]> lda zpt
29a6 : dd1d02 [ 4]> cmp rRORc,x ;test result
> trap_ne
29a9 : f002 [ 3]> beq skip2457
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
29ab : 00 [ 7]> brk ; Use BRK to return to the monitor
29ac : 1e > db test_num
>
29ad : >skip2457
>
29ad : 68 [ 4]> pla ;load status
> eor_flag 0
29ae : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
29b0 : dd2d02 [ 4]> cmp fRORc,x ;test flags
> trap_ne
29b3 : f002 [ 3]> beq skip2460
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
29b5 : 00 [ 7]> brk ; Use BRK to return to the monitor
29b6 : 1e > db test_num
>
29b7 : >skip2460
>
29b7 : ca [ 2] dex
29b8 : 10df [ 3] bpl trorc2
29ba : a203 [ 2] ldx #3
29bc : trorc3
set_z zp1,$ff
> load_flag $ff
29bc : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
29be : 48 [ 3]> pha ;use stack to load status
29bf : b5b9 [ 4]> lda zp1,x ;load to zeropage
29c1 : 85b2 [ 3]> sta zpt
29c3 : 28 [ 4]> plp
29c4 : 66b2 [ 5] ror zpt
tst_z rRORc,fRORc,$ff-fnzc
29c6 : 08 [ 3]> php ;save flags
29c7 : a5b2 [ 3]> lda zpt
29c9 : dd1d02 [ 4]> cmp rRORc,x ;test result
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 282
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap_ne
29cc : f002 [ 3]> beq skip2465
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
29ce : 00 [ 7]> brk ; Use BRK to return to the monitor
29cf : 1e > db test_num
>
29d0 : >skip2465
>
29d0 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
29d1 : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
29d3 : dd2d02 [ 4]> cmp fRORc,x ;test flags
> trap_ne
29d6 : f002 [ 3]> beq skip2468
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
29d8 : 00 [ 7]> brk ; Use BRK to return to the monitor
29d9 : 1e > db test_num
>
29da : >skip2468
>
29da : ca [ 2] dex
29db : 10df [ 3] bpl trorc3
next_test
29dd : ad0002 [ 4]> lda test_case ;previous test
29e0 : c91e [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
29e2 : f002 [ 3]> beq skip2471
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
29e4 : 00 [ 7]> brk ; Use BRK to return to the monitor
29e5 : 1e > db test_num
>
29e6 : >skip2471
>
001f = >test_num = test_num + 1
29e6 : a91f [ 2]> lda #test_num ;*** this tests' number
29e8 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; shifts - absolute
29eb : a203 [ 2] ldx #3
29ed : tasl4
set_abs zp1,0
> load_flag 0
29ed : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
29ef : 48 [ 3]> pha ;use stack to load status
29f0 : b5b9 [ 4]> lda zp1,x ;load to memory
29f2 : 8d0302 [ 4]> sta abst
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 283
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
29f5 : 28 [ 4]> plp
29f6 : 0e0302 [ 6] asl abst
tst_abs rASL,fASL,0
29f9 : 08 [ 3]> php ;save flags
29fa : ad0302 [ 4]> lda abst
29fd : dd1102 [ 4]> cmp rASL,x ;test result
> trap_ne
2a00 : f002 [ 3]> beq skip2476
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2a02 : 00 [ 7]> brk ; Use BRK to return to the monitor
2a03 : 1f > db test_num
>
2a04 : >skip2476
>
2a04 : 68 [ 4]> pla ;load status
> eor_flag 0
2a05 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2a07 : dd2102 [ 4]> cmp fASL,x ;test flags
> trap_ne
2a0a : f002 [ 3]> beq skip2479
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2a0c : 00 [ 7]> brk ; Use BRK to return to the monitor
2a0d : 1f > db test_num
>
2a0e : >skip2479
>
2a0e : ca [ 2] dex
2a0f : 10dc [ 4] bpl tasl4
2a11 : a203 [ 2] ldx #3
2a13 : tasl5
set_abs zp1,$ff
> load_flag $ff
2a13 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2a15 : 48 [ 3]> pha ;use stack to load status
2a16 : b5b9 [ 4]> lda zp1,x ;load to memory
2a18 : 8d0302 [ 4]> sta abst
2a1b : 28 [ 4]> plp
2a1c : 0e0302 [ 6] asl abst
tst_abs rASL,fASL,$ff-fnzc
2a1f : 08 [ 3]> php ;save flags
2a20 : ad0302 [ 4]> lda abst
2a23 : dd1102 [ 4]> cmp rASL,x ;test result
> trap_ne
2a26 : f002 [ 3]> beq skip2484
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2a28 : 00 [ 7]> brk ; Use BRK to return to the monitor
2a29 : 1f > db test_num
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 284
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
2a2a : >skip2484
>
2a2a : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2a2b : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2a2d : dd2102 [ 4]> cmp fASL,x ;test flags
> trap_ne
2a30 : f002 [ 3]> beq skip2487
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2a32 : 00 [ 7]> brk ; Use BRK to return to the monitor
2a33 : 1f > db test_num
>
2a34 : >skip2487
>
2a34 : ca [ 2] dex
2a35 : 10dc [ 3] bpl tasl5
2a37 : a203 [ 2] ldx #3
2a39 : tlsr4
set_abs zp1,0
> load_flag 0
2a39 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2a3b : 48 [ 3]> pha ;use stack to load status
2a3c : b5b9 [ 4]> lda zp1,x ;load to memory
2a3e : 8d0302 [ 4]> sta abst
2a41 : 28 [ 4]> plp
2a42 : 4e0302 [ 6] lsr abst
tst_abs rLSR,fLSR,0
2a45 : 08 [ 3]> php ;save flags
2a46 : ad0302 [ 4]> lda abst
2a49 : dd1902 [ 4]> cmp rLSR,x ;test result
> trap_ne
2a4c : f002 [ 3]> beq skip2492
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2a4e : 00 [ 7]> brk ; Use BRK to return to the monitor
2a4f : 1f > db test_num
>
2a50 : >skip2492
>
2a50 : 68 [ 4]> pla ;load status
> eor_flag 0
2a51 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2a53 : dd2902 [ 4]> cmp fLSR,x ;test flags
> trap_ne
2a56 : f002 [ 3]> beq skip2495
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 285
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2a58 : 00 [ 7]> brk ; Use BRK to return to the monitor
2a59 : 1f > db test_num
>
2a5a : >skip2495
>
2a5a : ca [ 2] dex
2a5b : 10dc [ 3] bpl tlsr4
2a5d : a203 [ 2] ldx #3
2a5f : tlsr5
set_abs zp1,$ff
> load_flag $ff
2a5f : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2a61 : 48 [ 3]> pha ;use stack to load status
2a62 : b5b9 [ 4]> lda zp1,x ;load to memory
2a64 : 8d0302 [ 4]> sta abst
2a67 : 28 [ 4]> plp
2a68 : 4e0302 [ 6] lsr abst
tst_abs rLSR,fLSR,$ff-fnzc
2a6b : 08 [ 3]> php ;save flags
2a6c : ad0302 [ 4]> lda abst
2a6f : dd1902 [ 4]> cmp rLSR,x ;test result
> trap_ne
2a72 : f002 [ 3]> beq skip2500
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2a74 : 00 [ 7]> brk ; Use BRK to return to the monitor
2a75 : 1f > db test_num
>
2a76 : >skip2500
>
2a76 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2a77 : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2a79 : dd2902 [ 4]> cmp fLSR,x ;test flags
> trap_ne
2a7c : f002 [ 3]> beq skip2503
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2a7e : 00 [ 7]> brk ; Use BRK to return to the monitor
2a7f : 1f > db test_num
>
2a80 : >skip2503
>
2a80 : ca [ 2] dex
2a81 : 10dc [ 3] bpl tlsr5
2a83 : a203 [ 2] ldx #3
2a85 : trol4
set_abs zp1,0
> load_flag 0
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 286
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2a85 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2a87 : 48 [ 3]> pha ;use stack to load status
2a88 : b5b9 [ 4]> lda zp1,x ;load to memory
2a8a : 8d0302 [ 4]> sta abst
2a8d : 28 [ 4]> plp
2a8e : 2e0302 [ 6] rol abst
tst_abs rROL,fROL,0
2a91 : 08 [ 3]> php ;save flags
2a92 : ad0302 [ 4]> lda abst
2a95 : dd1102 [ 4]> cmp rROL,x ;test result
> trap_ne
2a98 : f002 [ 3]> beq skip2508
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2a9a : 00 [ 7]> brk ; Use BRK to return to the monitor
2a9b : 1f > db test_num
>
2a9c : >skip2508
>
2a9c : 68 [ 4]> pla ;load status
> eor_flag 0
2a9d : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2a9f : dd2102 [ 4]> cmp fROL,x ;test flags
> trap_ne
2aa2 : f002 [ 3]> beq skip2511
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2aa4 : 00 [ 7]> brk ; Use BRK to return to the monitor
2aa5 : 1f > db test_num
>
2aa6 : >skip2511
>
2aa6 : ca [ 2] dex
2aa7 : 10dc [ 3] bpl trol4
2aa9 : a203 [ 2] ldx #3
2aab : trol5
set_abs zp1,$ff-fc
> load_flag $ff-fc
2aab : a9fe [ 2]> lda #$ff-fc ;allow test to change I-flag (no mask)
>
2aad : 48 [ 3]> pha ;use stack to load status
2aae : b5b9 [ 4]> lda zp1,x ;load to memory
2ab0 : 8d0302 [ 4]> sta abst
2ab3 : 28 [ 4]> plp
2ab4 : 2e0302 [ 6] rol abst
tst_abs rROL,fROL,$ff-fnzc
2ab7 : 08 [ 3]> php ;save flags
2ab8 : ad0302 [ 4]> lda abst
2abb : dd1102 [ 4]> cmp rROL,x ;test result
> trap_ne
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 287
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2abe : f002 [ 3]> beq skip2516
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2ac0 : 00 [ 7]> brk ; Use BRK to return to the monitor
2ac1 : 1f > db test_num
>
2ac2 : >skip2516
>
2ac2 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2ac3 : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2ac5 : dd2102 [ 4]> cmp fROL,x ;test flags
> trap_ne
2ac8 : f002 [ 3]> beq skip2519
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2aca : 00 [ 7]> brk ; Use BRK to return to the monitor
2acb : 1f > db test_num
>
2acc : >skip2519
>
2acc : ca [ 2] dex
2acd : 10dc [ 3] bpl trol5
2acf : a203 [ 2] ldx #3
2ad1 : trolc4
set_abs zp1,fc
> load_flag fc
2ad1 : a901 [ 2]> lda #fc ;allow test to change I-flag (no mask)
>
2ad3 : 48 [ 3]> pha ;use stack to load status
2ad4 : b5b9 [ 4]> lda zp1,x ;load to memory
2ad6 : 8d0302 [ 4]> sta abst
2ad9 : 28 [ 4]> plp
2ada : 2e0302 [ 6] rol abst
tst_abs rROLc,fROLc,0
2add : 08 [ 3]> php ;save flags
2ade : ad0302 [ 4]> lda abst
2ae1 : dd1502 [ 4]> cmp rROLc,x ;test result
> trap_ne
2ae4 : f002 [ 3]> beq skip2524
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2ae6 : 00 [ 7]> brk ; Use BRK to return to the monitor
2ae7 : 1f > db test_num
>
2ae8 : >skip2524
>
2ae8 : 68 [ 4]> pla ;load status
> eor_flag 0
2ae9 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 288
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2aeb : dd2502 [ 4]> cmp fROLc,x ;test flags
> trap_ne
2aee : f002 [ 3]> beq skip2527
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2af0 : 00 [ 7]> brk ; Use BRK to return to the monitor
2af1 : 1f > db test_num
>
2af2 : >skip2527
>
2af2 : ca [ 2] dex
2af3 : 10dc [ 3] bpl trolc4
2af5 : a203 [ 2] ldx #3
2af7 : trolc5
set_abs zp1,$ff
> load_flag $ff
2af7 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2af9 : 48 [ 3]> pha ;use stack to load status
2afa : b5b9 [ 4]> lda zp1,x ;load to memory
2afc : 8d0302 [ 4]> sta abst
2aff : 28 [ 4]> plp
2b00 : 2e0302 [ 6] rol abst
tst_abs rROLc,fROLc,$ff-fnzc
2b03 : 08 [ 3]> php ;save flags
2b04 : ad0302 [ 4]> lda abst
2b07 : dd1502 [ 4]> cmp rROLc,x ;test result
> trap_ne
2b0a : f002 [ 3]> beq skip2532
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2b0c : 00 [ 7]> brk ; Use BRK to return to the monitor
2b0d : 1f > db test_num
>
2b0e : >skip2532
>
2b0e : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2b0f : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2b11 : dd2502 [ 4]> cmp fROLc,x ;test flags
> trap_ne
2b14 : f002 [ 3]> beq skip2535
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2b16 : 00 [ 7]> brk ; Use BRK to return to the monitor
2b17 : 1f > db test_num
>
2b18 : >skip2535
>
2b18 : ca [ 2] dex
2b19 : 10dc [ 4] bpl trolc5
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 289
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2b1b : a203 [ 2] ldx #3
2b1d : tror4
set_abs zp1,0
> load_flag 0
2b1d : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2b1f : 48 [ 3]> pha ;use stack to load status
2b20 : b5b9 [ 4]> lda zp1,x ;load to memory
2b22 : 8d0302 [ 4]> sta abst
2b25 : 28 [ 4]> plp
2b26 : 6e0302 [ 6] ror abst
tst_abs rROR,fROR,0
2b29 : 08 [ 3]> php ;save flags
2b2a : ad0302 [ 4]> lda abst
2b2d : dd1902 [ 4]> cmp rROR,x ;test result
> trap_ne
2b30 : f002 [ 3]> beq skip2540
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2b32 : 00 [ 7]> brk ; Use BRK to return to the monitor
2b33 : 1f > db test_num
>
2b34 : >skip2540
>
2b34 : 68 [ 4]> pla ;load status
> eor_flag 0
2b35 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2b37 : dd2902 [ 4]> cmp fROR,x ;test flags
> trap_ne
2b3a : f002 [ 3]> beq skip2543
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2b3c : 00 [ 7]> brk ; Use BRK to return to the monitor
2b3d : 1f > db test_num
>
2b3e : >skip2543
>
2b3e : ca [ 2] dex
2b3f : 10dc [ 3] bpl tror4
2b41 : a203 [ 2] ldx #3
2b43 : tror5
set_abs zp1,$ff-fc
> load_flag $ff-fc
2b43 : a9fe [ 2]> lda #$ff-fc ;allow test to change I-flag (no mask)
>
2b45 : 48 [ 3]> pha ;use stack to load status
2b46 : b5b9 [ 4]> lda zp1,x ;load to memory
2b48 : 8d0302 [ 4]> sta abst
2b4b : 28 [ 4]> plp
2b4c : 6e0302 [ 6] ror abst
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 290
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
tst_abs rROR,fROR,$ff-fnzc
2b4f : 08 [ 3]> php ;save flags
2b50 : ad0302 [ 4]> lda abst
2b53 : dd1902 [ 4]> cmp rROR,x ;test result
> trap_ne
2b56 : f002 [ 3]> beq skip2548
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2b58 : 00 [ 7]> brk ; Use BRK to return to the monitor
2b59 : 1f > db test_num
>
2b5a : >skip2548
>
2b5a : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2b5b : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2b5d : dd2902 [ 4]> cmp fROR,x ;test flags
> trap_ne
2b60 : f002 [ 3]> beq skip2551
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2b62 : 00 [ 7]> brk ; Use BRK to return to the monitor
2b63 : 1f > db test_num
>
2b64 : >skip2551
>
2b64 : ca [ 2] dex
2b65 : 10dc [ 3] bpl tror5
2b67 : a203 [ 2] ldx #3
2b69 : trorc4
set_abs zp1,fc
> load_flag fc
2b69 : a901 [ 2]> lda #fc ;allow test to change I-flag (no mask)
>
2b6b : 48 [ 3]> pha ;use stack to load status
2b6c : b5b9 [ 4]> lda zp1,x ;load to memory
2b6e : 8d0302 [ 4]> sta abst
2b71 : 28 [ 4]> plp
2b72 : 6e0302 [ 6] ror abst
tst_abs rRORc,fRORc,0
2b75 : 08 [ 3]> php ;save flags
2b76 : ad0302 [ 4]> lda abst
2b79 : dd1d02 [ 4]> cmp rRORc,x ;test result
> trap_ne
2b7c : f002 [ 3]> beq skip2556
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2b7e : 00 [ 7]> brk ; Use BRK to return to the monitor
2b7f : 1f > db test_num
>
2b80 : >skip2556
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 291
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
2b80 : 68 [ 4]> pla ;load status
> eor_flag 0
2b81 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2b83 : dd2d02 [ 4]> cmp fRORc,x ;test flags
> trap_ne
2b86 : f002 [ 3]> beq skip2559
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2b88 : 00 [ 7]> brk ; Use BRK to return to the monitor
2b89 : 1f > db test_num
>
2b8a : >skip2559
>
2b8a : ca [ 2] dex
2b8b : 10dc [ 3] bpl trorc4
2b8d : a203 [ 2] ldx #3
2b8f : trorc5
set_abs zp1,$ff
> load_flag $ff
2b8f : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2b91 : 48 [ 3]> pha ;use stack to load status
2b92 : b5b9 [ 4]> lda zp1,x ;load to memory
2b94 : 8d0302 [ 4]> sta abst
2b97 : 28 [ 4]> plp
2b98 : 6e0302 [ 6] ror abst
tst_abs rRORc,fRORc,$ff-fnzc
2b9b : 08 [ 3]> php ;save flags
2b9c : ad0302 [ 4]> lda abst
2b9f : dd1d02 [ 4]> cmp rRORc,x ;test result
> trap_ne
2ba2 : f002 [ 3]> beq skip2564
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2ba4 : 00 [ 7]> brk ; Use BRK to return to the monitor
2ba5 : 1f > db test_num
>
2ba6 : >skip2564
>
2ba6 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2ba7 : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2ba9 : dd2d02 [ 4]> cmp fRORc,x ;test flags
> trap_ne
2bac : f002 [ 3]> beq skip2567
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2bae : 00 [ 7]> brk ; Use BRK to return to the monitor
2baf : 1f > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 292
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2bb0 : >skip2567
>
2bb0 : ca [ 2] dex
2bb1 : 10dc [ 3] bpl trorc5
next_test
2bb3 : ad0002 [ 4]> lda test_case ;previous test
2bb6 : c91f [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
2bb8 : f002 [ 3]> beq skip2570
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2bba : 00 [ 7]> brk ; Use BRK to return to the monitor
2bbb : 1f > db test_num
>
2bbc : >skip2570
>
0020 = >test_num = test_num + 1
2bbc : a920 [ 2]> lda #test_num ;*** this tests' number
2bbe : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; shifts - zp indexed
2bc1 : a203 [ 2] ldx #3
2bc3 : tasl6
set_zx zp1,0
> load_flag 0
2bc3 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2bc5 : 48 [ 3]> pha ;use stack to load status
2bc6 : b5b9 [ 4]> lda zp1,x ;load to indexed zeropage
2bc8 : 95b2 [ 4]> sta zpt,x
2bca : 28 [ 4]> plp
2bcb : 16b2 [ 6] asl zpt,x
tst_zx rASL,fASL,0
2bcd : 08 [ 3]> php ;save flags
2bce : b5b2 [ 4]> lda zpt,x
2bd0 : dd1102 [ 4]> cmp rASL,x ;test result
> trap_ne
2bd3 : f002 [ 3]> beq skip2575
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2bd5 : 00 [ 7]> brk ; Use BRK to return to the monitor
2bd6 : 20 > db test_num
>
2bd7 : >skip2575
>
2bd7 : 68 [ 4]> pla ;load status
> eor_flag 0
2bd8 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2bda : dd2102 [ 4]> cmp fASL,x ;test flags
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 293
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap_ne
2bdd : f002 [ 3]> beq skip2578
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2bdf : 00 [ 7]> brk ; Use BRK to return to the monitor
2be0 : 20 > db test_num
>
2be1 : >skip2578
>
2be1 : ca [ 2] dex
2be2 : 10df [ 3] bpl tasl6
2be4 : a203 [ 2] ldx #3
2be6 : tasl7
set_zx zp1,$ff
> load_flag $ff
2be6 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2be8 : 48 [ 3]> pha ;use stack to load status
2be9 : b5b9 [ 4]> lda zp1,x ;load to indexed zeropage
2beb : 95b2 [ 4]> sta zpt,x
2bed : 28 [ 4]> plp
2bee : 16b2 [ 6] asl zpt,x
tst_zx rASL,fASL,$ff-fnzc
2bf0 : 08 [ 3]> php ;save flags
2bf1 : b5b2 [ 4]> lda zpt,x
2bf3 : dd1102 [ 4]> cmp rASL,x ;test result
> trap_ne
2bf6 : f002 [ 3]> beq skip2583
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2bf8 : 00 [ 7]> brk ; Use BRK to return to the monitor
2bf9 : 20 > db test_num
>
2bfa : >skip2583
>
2bfa : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2bfb : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2bfd : dd2102 [ 4]> cmp fASL,x ;test flags
> trap_ne
2c00 : f002 [ 3]> beq skip2586
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2c02 : 00 [ 7]> brk ; Use BRK to return to the monitor
2c03 : 20 > db test_num
>
2c04 : >skip2586
>
2c04 : ca [ 2] dex
2c05 : 10df [ 4] bpl tasl7
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 294
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2c07 : a203 [ 2] ldx #3
2c09 : tlsr6
set_zx zp1,0
> load_flag 0
2c09 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2c0b : 48 [ 3]> pha ;use stack to load status
2c0c : b5b9 [ 4]> lda zp1,x ;load to indexed zeropage
2c0e : 95b2 [ 4]> sta zpt,x
2c10 : 28 [ 4]> plp
2c11 : 56b2 [ 6] lsr zpt,x
tst_zx rLSR,fLSR,0
2c13 : 08 [ 3]> php ;save flags
2c14 : b5b2 [ 4]> lda zpt,x
2c16 : dd1902 [ 4]> cmp rLSR,x ;test result
> trap_ne
2c19 : f002 [ 3]> beq skip2591
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2c1b : 00 [ 7]> brk ; Use BRK to return to the monitor
2c1c : 20 > db test_num
>
2c1d : >skip2591
>
2c1d : 68 [ 4]> pla ;load status
> eor_flag 0
2c1e : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2c20 : dd2902 [ 4]> cmp fLSR,x ;test flags
> trap_ne
2c23 : f002 [ 3]> beq skip2594
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2c25 : 00 [ 7]> brk ; Use BRK to return to the monitor
2c26 : 20 > db test_num
>
2c27 : >skip2594
>
2c27 : ca [ 2] dex
2c28 : 10df [ 3] bpl tlsr6
2c2a : a203 [ 2] ldx #3
2c2c : tlsr7
set_zx zp1,$ff
> load_flag $ff
2c2c : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2c2e : 48 [ 3]> pha ;use stack to load status
2c2f : b5b9 [ 4]> lda zp1,x ;load to indexed zeropage
2c31 : 95b2 [ 4]> sta zpt,x
2c33 : 28 [ 4]> plp
2c34 : 56b2 [ 6] lsr zpt,x
tst_zx rLSR,fLSR,$ff-fnzc
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 295
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2c36 : 08 [ 3]> php ;save flags
2c37 : b5b2 [ 4]> lda zpt,x
2c39 : dd1902 [ 4]> cmp rLSR,x ;test result
> trap_ne
2c3c : f002 [ 3]> beq skip2599
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2c3e : 00 [ 7]> brk ; Use BRK to return to the monitor
2c3f : 20 > db test_num
>
2c40 : >skip2599
>
2c40 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2c41 : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2c43 : dd2902 [ 4]> cmp fLSR,x ;test flags
> trap_ne
2c46 : f002 [ 3]> beq skip2602
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2c48 : 00 [ 7]> brk ; Use BRK to return to the monitor
2c49 : 20 > db test_num
>
2c4a : >skip2602
>
2c4a : ca [ 2] dex
2c4b : 10df [ 3] bpl tlsr7
2c4d : a203 [ 2] ldx #3
2c4f : trol6
set_zx zp1,0
> load_flag 0
2c4f : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2c51 : 48 [ 3]> pha ;use stack to load status
2c52 : b5b9 [ 4]> lda zp1,x ;load to indexed zeropage
2c54 : 95b2 [ 4]> sta zpt,x
2c56 : 28 [ 4]> plp
2c57 : 36b2 [ 6] rol zpt,x
tst_zx rROL,fROL,0
2c59 : 08 [ 3]> php ;save flags
2c5a : b5b2 [ 4]> lda zpt,x
2c5c : dd1102 [ 4]> cmp rROL,x ;test result
> trap_ne
2c5f : f002 [ 3]> beq skip2607
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2c61 : 00 [ 7]> brk ; Use BRK to return to the monitor
2c62 : 20 > db test_num
>
2c63 : >skip2607
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 296
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2c63 : 68 [ 4]> pla ;load status
> eor_flag 0
2c64 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2c66 : dd2102 [ 4]> cmp fROL,x ;test flags
> trap_ne
2c69 : f002 [ 3]> beq skip2610
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2c6b : 00 [ 7]> brk ; Use BRK to return to the monitor
2c6c : 20 > db test_num
>
2c6d : >skip2610
>
2c6d : ca [ 2] dex
2c6e : 10df [ 3] bpl trol6
2c70 : a203 [ 2] ldx #3
2c72 : trol7
set_zx zp1,$ff-fc
> load_flag $ff-fc
2c72 : a9fe [ 2]> lda #$ff-fc ;allow test to change I-flag (no mask)
>
2c74 : 48 [ 3]> pha ;use stack to load status
2c75 : b5b9 [ 4]> lda zp1,x ;load to indexed zeropage
2c77 : 95b2 [ 4]> sta zpt,x
2c79 : 28 [ 4]> plp
2c7a : 36b2 [ 6] rol zpt,x
tst_zx rROL,fROL,$ff-fnzc
2c7c : 08 [ 3]> php ;save flags
2c7d : b5b2 [ 4]> lda zpt,x
2c7f : dd1102 [ 4]> cmp rROL,x ;test result
> trap_ne
2c82 : f002 [ 3]> beq skip2615
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2c84 : 00 [ 7]> brk ; Use BRK to return to the monitor
2c85 : 20 > db test_num
>
2c86 : >skip2615
>
2c86 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2c87 : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2c89 : dd2102 [ 4]> cmp fROL,x ;test flags
> trap_ne
2c8c : f002 [ 3]> beq skip2618
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2c8e : 00 [ 7]> brk ; Use BRK to return to the monitor
2c8f : 20 > db test_num
>
2c90 : >skip2618
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 297
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
2c90 : ca [ 2] dex
2c91 : 10df [ 3] bpl trol7
2c93 : a203 [ 2] ldx #3
2c95 : trolc6
set_zx zp1,fc
> load_flag fc
2c95 : a901 [ 2]> lda #fc ;allow test to change I-flag (no mask)
>
2c97 : 48 [ 3]> pha ;use stack to load status
2c98 : b5b9 [ 4]> lda zp1,x ;load to indexed zeropage
2c9a : 95b2 [ 4]> sta zpt,x
2c9c : 28 [ 4]> plp
2c9d : 36b2 [ 6] rol zpt,x
tst_zx rROLc,fROLc,0
2c9f : 08 [ 3]> php ;save flags
2ca0 : b5b2 [ 4]> lda zpt,x
2ca2 : dd1502 [ 4]> cmp rROLc,x ;test result
> trap_ne
2ca5 : f002 [ 3]> beq skip2623
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2ca7 : 00 [ 7]> brk ; Use BRK to return to the monitor
2ca8 : 20 > db test_num
>
2ca9 : >skip2623
>
2ca9 : 68 [ 4]> pla ;load status
> eor_flag 0
2caa : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2cac : dd2502 [ 4]> cmp fROLc,x ;test flags
> trap_ne
2caf : f002 [ 3]> beq skip2626
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2cb1 : 00 [ 7]> brk ; Use BRK to return to the monitor
2cb2 : 20 > db test_num
>
2cb3 : >skip2626
>
2cb3 : ca [ 2] dex
2cb4 : 10df [ 3] bpl trolc6
2cb6 : a203 [ 2] ldx #3
2cb8 : trolc7
set_zx zp1,$ff
> load_flag $ff
2cb8 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2cba : 48 [ 3]> pha ;use stack to load status
2cbb : b5b9 [ 4]> lda zp1,x ;load to indexed zeropage
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 298
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2cbd : 95b2 [ 4]> sta zpt,x
2cbf : 28 [ 4]> plp
2cc0 : 36b2 [ 6] rol zpt,x
tst_zx rROLc,fROLc,$ff-fnzc
2cc2 : 08 [ 3]> php ;save flags
2cc3 : b5b2 [ 4]> lda zpt,x
2cc5 : dd1502 [ 4]> cmp rROLc,x ;test result
> trap_ne
2cc8 : f002 [ 3]> beq skip2631
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2cca : 00 [ 7]> brk ; Use BRK to return to the monitor
2ccb : 20 > db test_num
>
2ccc : >skip2631
>
2ccc : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2ccd : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2ccf : dd2502 [ 4]> cmp fROLc,x ;test flags
> trap_ne
2cd2 : f002 [ 3]> beq skip2634
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2cd4 : 00 [ 7]> brk ; Use BRK to return to the monitor
2cd5 : 20 > db test_num
>
2cd6 : >skip2634
>
2cd6 : ca [ 2] dex
2cd7 : 10df [ 3] bpl trolc7
2cd9 : a203 [ 2] ldx #3
2cdb : tror6
set_zx zp1,0
> load_flag 0
2cdb : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2cdd : 48 [ 3]> pha ;use stack to load status
2cde : b5b9 [ 4]> lda zp1,x ;load to indexed zeropage
2ce0 : 95b2 [ 4]> sta zpt,x
2ce2 : 28 [ 4]> plp
2ce3 : 76b2 [ 6] ror zpt,x
tst_zx rROR,fROR,0
2ce5 : 08 [ 3]> php ;save flags
2ce6 : b5b2 [ 4]> lda zpt,x
2ce8 : dd1902 [ 4]> cmp rROR,x ;test result
> trap_ne
2ceb : f002 [ 3]> beq skip2639
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 299
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2ced : 00 [ 7]> brk ; Use BRK to return to the monitor
2cee : 20 > db test_num
>
2cef : >skip2639
>
2cef : 68 [ 4]> pla ;load status
> eor_flag 0
2cf0 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2cf2 : dd2902 [ 4]> cmp fROR,x ;test flags
> trap_ne
2cf5 : f002 [ 3]> beq skip2642
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2cf7 : 00 [ 7]> brk ; Use BRK to return to the monitor
2cf8 : 20 > db test_num
>
2cf9 : >skip2642
>
2cf9 : ca [ 2] dex
2cfa : 10df [ 3] bpl tror6
2cfc : a203 [ 2] ldx #3
2cfe : tror7
set_zx zp1,$ff-fc
> load_flag $ff-fc
2cfe : a9fe [ 2]> lda #$ff-fc ;allow test to change I-flag (no mask)
>
2d00 : 48 [ 3]> pha ;use stack to load status
2d01 : b5b9 [ 4]> lda zp1,x ;load to indexed zeropage
2d03 : 95b2 [ 4]> sta zpt,x
2d05 : 28 [ 4]> plp
2d06 : 76b2 [ 6] ror zpt,x
tst_zx rROR,fROR,$ff-fnzc
2d08 : 08 [ 3]> php ;save flags
2d09 : b5b2 [ 4]> lda zpt,x
2d0b : dd1902 [ 4]> cmp rROR,x ;test result
> trap_ne
2d0e : f002 [ 3]> beq skip2647
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2d10 : 00 [ 7]> brk ; Use BRK to return to the monitor
2d11 : 20 > db test_num
>
2d12 : >skip2647
>
2d12 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2d13 : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2d15 : dd2902 [ 4]> cmp fROR,x ;test flags
> trap_ne
2d18 : f002 [ 3]> beq skip2650
> trap ;failed equal (zero)
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 300
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>; db $db ; M65C02/M65C02A SToP instruction
2d1a : 00 [ 7]> brk ; Use BRK to return to the monitor
2d1b : 20 > db test_num
>
2d1c : >skip2650
>
2d1c : ca [ 2] dex
2d1d : 10df [ 4] bpl tror7
2d1f : a203 [ 2] ldx #3
2d21 : trorc6
set_zx zp1,fc
> load_flag fc
2d21 : a901 [ 2]> lda #fc ;allow test to change I-flag (no mask)
>
2d23 : 48 [ 3]> pha ;use stack to load status
2d24 : b5b9 [ 4]> lda zp1,x ;load to indexed zeropage
2d26 : 95b2 [ 4]> sta zpt,x
2d28 : 28 [ 4]> plp
2d29 : 76b2 [ 6] ror zpt,x
tst_zx rRORc,fRORc,0
2d2b : 08 [ 3]> php ;save flags
2d2c : b5b2 [ 4]> lda zpt,x
2d2e : dd1d02 [ 4]> cmp rRORc,x ;test result
> trap_ne
2d31 : f002 [ 3]> beq skip2655
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2d33 : 00 [ 7]> brk ; Use BRK to return to the monitor
2d34 : 20 > db test_num
>
2d35 : >skip2655
>
2d35 : 68 [ 4]> pla ;load status
> eor_flag 0
2d36 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2d38 : dd2d02 [ 4]> cmp fRORc,x ;test flags
> trap_ne
2d3b : f002 [ 3]> beq skip2658
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2d3d : 00 [ 7]> brk ; Use BRK to return to the monitor
2d3e : 20 > db test_num
>
2d3f : >skip2658
>
2d3f : ca [ 2] dex
2d40 : 10df [ 3] bpl trorc6
2d42 : a203 [ 2] ldx #3
2d44 : trorc7
set_zx zp1,$ff
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 301
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> load_flag $ff
2d44 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2d46 : 48 [ 3]> pha ;use stack to load status
2d47 : b5b9 [ 4]> lda zp1,x ;load to indexed zeropage
2d49 : 95b2 [ 4]> sta zpt,x
2d4b : 28 [ 4]> plp
2d4c : 76b2 [ 6] ror zpt,x
tst_zx rRORc,fRORc,$ff-fnzc
2d4e : 08 [ 3]> php ;save flags
2d4f : b5b2 [ 4]> lda zpt,x
2d51 : dd1d02 [ 4]> cmp rRORc,x ;test result
> trap_ne
2d54 : f002 [ 3]> beq skip2663
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2d56 : 00 [ 7]> brk ; Use BRK to return to the monitor
2d57 : 20 > db test_num
>
2d58 : >skip2663
>
2d58 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2d59 : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2d5b : dd2d02 [ 4]> cmp fRORc,x ;test flags
> trap_ne
2d5e : f002 [ 3]> beq skip2666
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2d60 : 00 [ 7]> brk ; Use BRK to return to the monitor
2d61 : 20 > db test_num
>
2d62 : >skip2666
>
2d62 : ca [ 2] dex
2d63 : 10df [ 3] bpl trorc7
next_test
2d65 : ad0002 [ 4]> lda test_case ;previous test
2d68 : c920 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
2d6a : f002 [ 3]> beq skip2669
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2d6c : 00 [ 7]> brk ; Use BRK to return to the monitor
2d6d : 20 > db test_num
>
2d6e : >skip2669
>
0021 = >test_num = test_num + 1
2d6e : a921 [ 2]> lda #test_num ;*** this tests' number
2d70 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 302
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
; shifts - abs indexed
2d73 : a203 [ 2] ldx #3
2d75 : tasl8
set_absx zp1,0
> load_flag 0
2d75 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2d77 : 48 [ 3]> pha ;use stack to load status
2d78 : b5b9 [ 4]> lda zp1,x ;load to indexed memory
2d7a : 9d0302 [ 5]> sta abst,x
2d7d : 28 [ 4]> plp
2d7e : 1e0302 [ 7] asl abst,x
tst_absx rASL,fASL,0
2d81 : 08 [ 3]> php ;save flags
2d82 : bd0302 [ 4]> lda abst,x
2d85 : dd1102 [ 4]> cmp rASL,x ;test result
> trap_ne
2d88 : f002 [ 3]> beq skip2674
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2d8a : 00 [ 7]> brk ; Use BRK to return to the monitor
2d8b : 21 > db test_num
>
2d8c : >skip2674
>
2d8c : 68 [ 4]> pla ;load status
> eor_flag 0
2d8d : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2d8f : dd2102 [ 4]> cmp fASL,x ;test flags
> trap_ne
2d92 : f002 [ 3]> beq skip2677
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2d94 : 00 [ 7]> brk ; Use BRK to return to the monitor
2d95 : 21 > db test_num
>
2d96 : >skip2677
>
2d96 : ca [ 2] dex
2d97 : 10dc [ 3] bpl tasl8
2d99 : a203 [ 2] ldx #3
2d9b : tasl9
set_absx zp1,$ff
> load_flag $ff
2d9b : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2d9d : 48 [ 3]> pha ;use stack to load status
2d9e : b5b9 [ 4]> lda zp1,x ;load to indexed memory
2da0 : 9d0302 [ 5]> sta abst,x
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 303
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2da3 : 28 [ 4]> plp
2da4 : 1e0302 [ 7] asl abst,x
tst_absx rASL,fASL,$ff-fnzc
2da7 : 08 [ 3]> php ;save flags
2da8 : bd0302 [ 4]> lda abst,x
2dab : dd1102 [ 4]> cmp rASL,x ;test result
> trap_ne
2dae : f002 [ 3]> beq skip2682
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2db0 : 00 [ 7]> brk ; Use BRK to return to the monitor
2db1 : 21 > db test_num
>
2db2 : >skip2682
>
2db2 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2db3 : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2db5 : dd2102 [ 4]> cmp fASL,x ;test flags
> trap_ne
2db8 : f002 [ 3]> beq skip2685
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2dba : 00 [ 7]> brk ; Use BRK to return to the monitor
2dbb : 21 > db test_num
>
2dbc : >skip2685
>
2dbc : ca [ 2] dex
2dbd : 10dc [ 3] bpl tasl9
2dbf : a203 [ 2] ldx #3
2dc1 : tlsr8
set_absx zp1,0
> load_flag 0
2dc1 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2dc3 : 48 [ 3]> pha ;use stack to load status
2dc4 : b5b9 [ 4]> lda zp1,x ;load to indexed memory
2dc6 : 9d0302 [ 5]> sta abst,x
2dc9 : 28 [ 4]> plp
2dca : 5e0302 [ 7] lsr abst,x
tst_absx rLSR,fLSR,0
2dcd : 08 [ 3]> php ;save flags
2dce : bd0302 [ 4]> lda abst,x
2dd1 : dd1902 [ 4]> cmp rLSR,x ;test result
> trap_ne
2dd4 : f002 [ 3]> beq skip2690
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2dd6 : 00 [ 7]> brk ; Use BRK to return to the monitor
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 304
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2dd7 : 21 > db test_num
>
2dd8 : >skip2690
>
2dd8 : 68 [ 4]> pla ;load status
> eor_flag 0
2dd9 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2ddb : dd2902 [ 4]> cmp fLSR,x ;test flags
> trap_ne
2dde : f002 [ 3]> beq skip2693
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2de0 : 00 [ 7]> brk ; Use BRK to return to the monitor
2de1 : 21 > db test_num
>
2de2 : >skip2693
>
2de2 : ca [ 2] dex
2de3 : 10dc [ 3] bpl tlsr8
2de5 : a203 [ 2] ldx #3
2de7 : tlsr9
set_absx zp1,$ff
> load_flag $ff
2de7 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2de9 : 48 [ 3]> pha ;use stack to load status
2dea : b5b9 [ 4]> lda zp1,x ;load to indexed memory
2dec : 9d0302 [ 5]> sta abst,x
2def : 28 [ 4]> plp
2df0 : 5e0302 [ 7] lsr abst,x
tst_absx rLSR,fLSR,$ff-fnzc
2df3 : 08 [ 3]> php ;save flags
2df4 : bd0302 [ 4]> lda abst,x
2df7 : dd1902 [ 4]> cmp rLSR,x ;test result
> trap_ne
2dfa : f002 [ 3]> beq skip2698
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2dfc : 00 [ 7]> brk ; Use BRK to return to the monitor
2dfd : 21 > db test_num
>
2dfe : >skip2698
>
2dfe : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2dff : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2e01 : dd2902 [ 4]> cmp fLSR,x ;test flags
> trap_ne
2e04 : f002 [ 3]> beq skip2701
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 305
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2e06 : 00 [ 7]> brk ; Use BRK to return to the monitor
2e07 : 21 > db test_num
>
2e08 : >skip2701
>
2e08 : ca [ 2] dex
2e09 : 10dc [ 4] bpl tlsr9
2e0b : a203 [ 2] ldx #3
2e0d : trol8
set_absx zp1,0
> load_flag 0
2e0d : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2e0f : 48 [ 3]> pha ;use stack to load status
2e10 : b5b9 [ 4]> lda zp1,x ;load to indexed memory
2e12 : 9d0302 [ 5]> sta abst,x
2e15 : 28 [ 4]> plp
2e16 : 3e0302 [ 7] rol abst,x
tst_absx rROL,fROL,0
2e19 : 08 [ 3]> php ;save flags
2e1a : bd0302 [ 4]> lda abst,x
2e1d : dd1102 [ 4]> cmp rROL,x ;test result
> trap_ne
2e20 : f002 [ 3]> beq skip2706
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2e22 : 00 [ 7]> brk ; Use BRK to return to the monitor
2e23 : 21 > db test_num
>
2e24 : >skip2706
>
2e24 : 68 [ 4]> pla ;load status
> eor_flag 0
2e25 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2e27 : dd2102 [ 4]> cmp fROL,x ;test flags
> trap_ne
2e2a : f002 [ 3]> beq skip2709
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2e2c : 00 [ 7]> brk ; Use BRK to return to the monitor
2e2d : 21 > db test_num
>
2e2e : >skip2709
>
2e2e : ca [ 2] dex
2e2f : 10dc [ 3] bpl trol8
2e31 : a203 [ 2] ldx #3
2e33 : trol9
set_absx zp1,$ff-fc
> load_flag $ff-fc
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 306
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2e33 : a9fe [ 2]> lda #$ff-fc ;allow test to change I-flag (no mask)
>
2e35 : 48 [ 3]> pha ;use stack to load status
2e36 : b5b9 [ 4]> lda zp1,x ;load to indexed memory
2e38 : 9d0302 [ 5]> sta abst,x
2e3b : 28 [ 4]> plp
2e3c : 3e0302 [ 7] rol abst,x
tst_absx rROL,fROL,$ff-fnzc
2e3f : 08 [ 3]> php ;save flags
2e40 : bd0302 [ 4]> lda abst,x
2e43 : dd1102 [ 4]> cmp rROL,x ;test result
> trap_ne
2e46 : f002 [ 3]> beq skip2714
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2e48 : 00 [ 7]> brk ; Use BRK to return to the monitor
2e49 : 21 > db test_num
>
2e4a : >skip2714
>
2e4a : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2e4b : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2e4d : dd2102 [ 4]> cmp fROL,x ;test flags
> trap_ne
2e50 : f002 [ 3]> beq skip2717
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2e52 : 00 [ 7]> brk ; Use BRK to return to the monitor
2e53 : 21 > db test_num
>
2e54 : >skip2717
>
2e54 : ca [ 2] dex
2e55 : 10dc [ 3] bpl trol9
2e57 : a203 [ 2] ldx #3
2e59 : trolc8
set_absx zp1,fc
> load_flag fc
2e59 : a901 [ 2]> lda #fc ;allow test to change I-flag (no mask)
>
2e5b : 48 [ 3]> pha ;use stack to load status
2e5c : b5b9 [ 4]> lda zp1,x ;load to indexed memory
2e5e : 9d0302 [ 5]> sta abst,x
2e61 : 28 [ 4]> plp
2e62 : 3e0302 [ 7] rol abst,x
tst_absx rROLc,fROLc,0
2e65 : 08 [ 3]> php ;save flags
2e66 : bd0302 [ 4]> lda abst,x
2e69 : dd1502 [ 4]> cmp rROLc,x ;test result
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 307
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap_ne
2e6c : f002 [ 3]> beq skip2722
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2e6e : 00 [ 7]> brk ; Use BRK to return to the monitor
2e6f : 21 > db test_num
>
2e70 : >skip2722
>
2e70 : 68 [ 4]> pla ;load status
> eor_flag 0
2e71 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2e73 : dd2502 [ 4]> cmp fROLc,x ;test flags
> trap_ne
2e76 : f002 [ 3]> beq skip2725
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2e78 : 00 [ 7]> brk ; Use BRK to return to the monitor
2e79 : 21 > db test_num
>
2e7a : >skip2725
>
2e7a : ca [ 2] dex
2e7b : 10dc [ 3] bpl trolc8
2e7d : a203 [ 2] ldx #3
2e7f : trolc9
set_absx zp1,$ff
> load_flag $ff
2e7f : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2e81 : 48 [ 3]> pha ;use stack to load status
2e82 : b5b9 [ 4]> lda zp1,x ;load to indexed memory
2e84 : 9d0302 [ 5]> sta abst,x
2e87 : 28 [ 4]> plp
2e88 : 3e0302 [ 7] rol abst,x
tst_absx rROLc,fROLc,$ff-fnzc
2e8b : 08 [ 3]> php ;save flags
2e8c : bd0302 [ 4]> lda abst,x
2e8f : dd1502 [ 4]> cmp rROLc,x ;test result
> trap_ne
2e92 : f002 [ 3]> beq skip2730
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2e94 : 00 [ 7]> brk ; Use BRK to return to the monitor
2e95 : 21 > db test_num
>
2e96 : >skip2730
>
2e96 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2e97 : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 308
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2e99 : dd2502 [ 4]> cmp fROLc,x ;test flags
> trap_ne
2e9c : f002 [ 3]> beq skip2733
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2e9e : 00 [ 7]> brk ; Use BRK to return to the monitor
2e9f : 21 > db test_num
>
2ea0 : >skip2733
>
2ea0 : ca [ 2] dex
2ea1 : 10dc [ 3] bpl trolc9
2ea3 : a203 [ 2] ldx #3
2ea5 : tror8
set_absx zp1,0
> load_flag 0
2ea5 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2ea7 : 48 [ 3]> pha ;use stack to load status
2ea8 : b5b9 [ 4]> lda zp1,x ;load to indexed memory
2eaa : 9d0302 [ 5]> sta abst,x
2ead : 28 [ 4]> plp
2eae : 7e0302 [ 7] ror abst,x
tst_absx rROR,fROR,0
2eb1 : 08 [ 3]> php ;save flags
2eb2 : bd0302 [ 4]> lda abst,x
2eb5 : dd1902 [ 4]> cmp rROR,x ;test result
> trap_ne
2eb8 : f002 [ 3]> beq skip2738
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2eba : 00 [ 7]> brk ; Use BRK to return to the monitor
2ebb : 21 > db test_num
>
2ebc : >skip2738
>
2ebc : 68 [ 4]> pla ;load status
> eor_flag 0
2ebd : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2ebf : dd2902 [ 4]> cmp fROR,x ;test flags
> trap_ne
2ec2 : f002 [ 3]> beq skip2741
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2ec4 : 00 [ 7]> brk ; Use BRK to return to the monitor
2ec5 : 21 > db test_num
>
2ec6 : >skip2741
>
2ec6 : ca [ 2] dex
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 309
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2ec7 : 10dc [ 3] bpl tror8
2ec9 : a203 [ 2] ldx #3
2ecb : tror9
set_absx zp1,$ff-fc
> load_flag $ff-fc
2ecb : a9fe [ 2]> lda #$ff-fc ;allow test to change I-flag (no mask)
>
2ecd : 48 [ 3]> pha ;use stack to load status
2ece : b5b9 [ 4]> lda zp1,x ;load to indexed memory
2ed0 : 9d0302 [ 5]> sta abst,x
2ed3 : 28 [ 4]> plp
2ed4 : 7e0302 [ 7] ror abst,x
tst_absx rROR,fROR,$ff-fnzc
2ed7 : 08 [ 3]> php ;save flags
2ed8 : bd0302 [ 4]> lda abst,x
2edb : dd1902 [ 4]> cmp rROR,x ;test result
> trap_ne
2ede : f002 [ 3]> beq skip2746
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2ee0 : 00 [ 7]> brk ; Use BRK to return to the monitor
2ee1 : 21 > db test_num
>
2ee2 : >skip2746
>
2ee2 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2ee3 : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2ee5 : dd2902 [ 4]> cmp fROR,x ;test flags
> trap_ne
2ee8 : f002 [ 3]> beq skip2749
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2eea : 00 [ 7]> brk ; Use BRK to return to the monitor
2eeb : 21 > db test_num
>
2eec : >skip2749
>
2eec : ca [ 2] dex
2eed : 10dc [ 3] bpl tror9
2eef : a203 [ 2] ldx #3
2ef1 : trorc8
set_absx zp1,fc
> load_flag fc
2ef1 : a901 [ 2]> lda #fc ;allow test to change I-flag (no mask)
>
2ef3 : 48 [ 3]> pha ;use stack to load status
2ef4 : b5b9 [ 4]> lda zp1,x ;load to indexed memory
2ef6 : 9d0302 [ 5]> sta abst,x
2ef9 : 28 [ 4]> plp
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 310
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2efa : 7e0302 [ 7] ror abst,x
tst_absx rRORc,fRORc,0
2efd : 08 [ 3]> php ;save flags
2efe : bd0302 [ 4]> lda abst,x
2f01 : dd1d02 [ 4]> cmp rRORc,x ;test result
> trap_ne
2f04 : f002 [ 3]> beq skip2754
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2f06 : 00 [ 7]> brk ; Use BRK to return to the monitor
2f07 : 21 > db test_num
>
2f08 : >skip2754
>
2f08 : 68 [ 4]> pla ;load status
> eor_flag 0
2f09 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2f0b : dd2d02 [ 4]> cmp fRORc,x ;test flags
> trap_ne
2f0e : f002 [ 3]> beq skip2757
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2f10 : 00 [ 7]> brk ; Use BRK to return to the monitor
2f11 : 21 > db test_num
>
2f12 : >skip2757
>
2f12 : ca [ 2] dex
2f13 : 10dc [ 4] bpl trorc8
2f15 : a203 [ 2] ldx #3
2f17 : trorc9
set_absx zp1,$ff
> load_flag $ff
2f17 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2f19 : 48 [ 3]> pha ;use stack to load status
2f1a : b5b9 [ 4]> lda zp1,x ;load to indexed memory
2f1c : 9d0302 [ 5]> sta abst,x
2f1f : 28 [ 4]> plp
2f20 : 7e0302 [ 7] ror abst,x
tst_absx rRORc,fRORc,$ff-fnzc
2f23 : 08 [ 3]> php ;save flags
2f24 : bd0302 [ 4]> lda abst,x
2f27 : dd1d02 [ 4]> cmp rRORc,x ;test result
> trap_ne
2f2a : f002 [ 3]> beq skip2762
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2f2c : 00 [ 7]> brk ; Use BRK to return to the monitor
2f2d : 21 > db test_num
>
2f2e : >skip2762
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 311
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
2f2e : 68 [ 4]> pla ;load status
> eor_flag $ff-fnzc
2f2f : 497c [ 2]> eor #$ff-fnzc|fao ;invert expected flags + always on bits
>
2f31 : dd2d02 [ 4]> cmp fRORc,x ;test flags
> trap_ne
2f34 : f002 [ 3]> beq skip2765
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2f36 : 00 [ 7]> brk ; Use BRK to return to the monitor
2f37 : 21 > db test_num
>
2f38 : >skip2765
>
2f38 : ca [ 2] dex
2f39 : 10dc [ 3] bpl trorc9
next_test
2f3b : ad0002 [ 4]> lda test_case ;previous test
2f3e : c921 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
2f40 : f002 [ 3]> beq skip2768
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2f42 : 00 [ 7]> brk ; Use BRK to return to the monitor
2f43 : 21 > db test_num
>
2f44 : >skip2768
>
0022 = >test_num = test_num + 1
2f44 : a922 [ 2]> lda #test_num ;*** this tests' number
2f46 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; testing memory increment/decrement - INC DEC all addressing modes
; zeropage
2f49 : a200 [ 2] ldx #0
2f4b : a97e [ 2] lda #$7e
2f4d : 85b2 [ 3] sta zpt
2f4f : tinc
set_stat 0
> load_flag 0
2f4f : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2f51 : 48 [ 3]> pha ;use stack to load status
2f52 : 28 [ 4]> plp
2f53 : e6b2 [ 5] inc zpt
tst_z rINC,fINC,0
2f55 : 08 [ 3]> php ;save flags
2f56 : a5b2 [ 3]> lda zpt
2f58 : dd3102 [ 4]> cmp rINC,x ;test result
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 312
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap_ne
2f5b : f002 [ 3]> beq skip2773
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2f5d : 00 [ 7]> brk ; Use BRK to return to the monitor
2f5e : 22 > db test_num
>
2f5f : >skip2773
>
2f5f : 68 [ 4]> pla ;load status
> eor_flag 0
2f60 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2f62 : dd3602 [ 4]> cmp fINC,x ;test flags
> trap_ne
2f65 : f002 [ 3]> beq skip2776
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2f67 : 00 [ 7]> brk ; Use BRK to return to the monitor
2f68 : 22 > db test_num
>
2f69 : >skip2776
>
2f69 : e8 [ 2] inx
2f6a : e002 [ 2] cpx #2
2f6c : d004 [ 3] bne tinc1
2f6e : a9fe [ 2] lda #$fe
2f70 : 85b2 [ 3] sta zpt
2f72 : e005 [ 2] tinc1 cpx #5
2f74 : d0d9 [ 3] bne tinc
2f76 : ca [ 2] dex
2f77 : e6b2 [ 5] inc zpt
2f79 : tdec
set_stat 0
> load_flag 0
2f79 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
2f7b : 48 [ 3]> pha ;use stack to load status
2f7c : 28 [ 4]> plp
2f7d : c6b2 [ 5] dec zpt
tst_z rINC,fINC,0
2f7f : 08 [ 3]> php ;save flags
2f80 : a5b2 [ 3]> lda zpt
2f82 : dd3102 [ 4]> cmp rINC,x ;test result
> trap_ne
2f85 : f002 [ 3]> beq skip2781
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2f87 : 00 [ 7]> brk ; Use BRK to return to the monitor
2f88 : 22 > db test_num
>
2f89 : >skip2781
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 313
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2f89 : 68 [ 4]> pla ;load status
> eor_flag 0
2f8a : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
2f8c : dd3602 [ 4]> cmp fINC,x ;test flags
> trap_ne
2f8f : f002 [ 3]> beq skip2784
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2f91 : 00 [ 7]> brk ; Use BRK to return to the monitor
2f92 : 22 > db test_num
>
2f93 : >skip2784
>
2f93 : ca [ 2] dex
2f94 : 300a [ 3] bmi tdec1
2f96 : e001 [ 2] cpx #1
2f98 : d0df [ 3] bne tdec
2f9a : a981 [ 2] lda #$81
2f9c : 85b2 [ 3] sta zpt
2f9e : d0d9 [ 3] bne tdec
2fa0 : tdec1
2fa0 : a200 [ 2] ldx #0
2fa2 : a97e [ 2] lda #$7e
2fa4 : 85b2 [ 3] sta zpt
2fa6 : tinc10
set_stat $ff
> load_flag $ff
2fa6 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2fa8 : 48 [ 3]> pha ;use stack to load status
2fa9 : 28 [ 4]> plp
2faa : e6b2 [ 5] inc zpt
tst_z rINC,fINC,$ff-fnz
2fac : 08 [ 3]> php ;save flags
2fad : a5b2 [ 3]> lda zpt
2faf : dd3102 [ 4]> cmp rINC,x ;test result
> trap_ne
2fb2 : f002 [ 3]> beq skip2789
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2fb4 : 00 [ 7]> brk ; Use BRK to return to the monitor
2fb5 : 22 > db test_num
>
2fb6 : >skip2789
>
2fb6 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
2fb7 : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
2fb9 : dd3602 [ 4]> cmp fINC,x ;test flags
> trap_ne
2fbc : f002 [ 3]> beq skip2792
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 314
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2fbe : 00 [ 7]> brk ; Use BRK to return to the monitor
2fbf : 22 > db test_num
>
2fc0 : >skip2792
>
2fc0 : e8 [ 2] inx
2fc1 : e002 [ 2] cpx #2
2fc3 : d004 [ 3] bne tinc11
2fc5 : a9fe [ 2] lda #$fe
2fc7 : 85b2 [ 3] sta zpt
2fc9 : e005 [ 2] tinc11 cpx #5
2fcb : d0d9 [ 3] bne tinc10
2fcd : ca [ 2] dex
2fce : e6b2 [ 5] inc zpt
2fd0 : tdec10
set_stat $ff
> load_flag $ff
2fd0 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
2fd2 : 48 [ 3]> pha ;use stack to load status
2fd3 : 28 [ 4]> plp
2fd4 : c6b2 [ 5] dec zpt
tst_z rINC,fINC,$ff-fnz
2fd6 : 08 [ 3]> php ;save flags
2fd7 : a5b2 [ 3]> lda zpt
2fd9 : dd3102 [ 4]> cmp rINC,x ;test result
> trap_ne
2fdc : f002 [ 3]> beq skip2797
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2fde : 00 [ 7]> brk ; Use BRK to return to the monitor
2fdf : 22 > db test_num
>
2fe0 : >skip2797
>
2fe0 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
2fe1 : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
2fe3 : dd3602 [ 4]> cmp fINC,x ;test flags
> trap_ne
2fe6 : f002 [ 3]> beq skip2800
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2fe8 : 00 [ 7]> brk ; Use BRK to return to the monitor
2fe9 : 22 > db test_num
>
2fea : >skip2800
>
2fea : ca [ 2] dex
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 315
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
2feb : 300a [ 3] bmi tdec11
2fed : e001 [ 2] cpx #1
2fef : d0df [ 3] bne tdec10
2ff1 : a981 [ 2] lda #$81
2ff3 : 85b2 [ 3] sta zpt
2ff5 : d0d9 [ 3] bne tdec10
2ff7 : tdec11
next_test
2ff7 : ad0002 [ 4]> lda test_case ;previous test
2ffa : c922 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
2ffc : f002 [ 4]> beq skip2803
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
2ffe : 00 [ 7]> brk ; Use BRK to return to the monitor
2fff : 22 > db test_num
>
3000 : >skip2803
>
0023 = >test_num = test_num + 1
3000 : a923 [ 2]> lda #test_num ;*** this tests' number
3002 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; absolute memory
3005 : a200 [ 2] ldx #0
3007 : a97e [ 2] lda #$7e
3009 : 8d0302 [ 4] sta abst
300c : tinc2
set_stat 0
> load_flag 0
300c : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
300e : 48 [ 3]> pha ;use stack to load status
300f : 28 [ 4]> plp
3010 : ee0302 [ 6] inc abst
tst_abs rINC,fINC,0
3013 : 08 [ 3]> php ;save flags
3014 : ad0302 [ 4]> lda abst
3017 : dd3102 [ 4]> cmp rINC,x ;test result
> trap_ne
301a : f002 [ 3]> beq skip2808
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
301c : 00 [ 7]> brk ; Use BRK to return to the monitor
301d : 23 > db test_num
>
301e : >skip2808
>
301e : 68 [ 4]> pla ;load status
> eor_flag 0
301f : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 316
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
3021 : dd3602 [ 4]> cmp fINC,x ;test flags
> trap_ne
3024 : f002 [ 3]> beq skip2811
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3026 : 00 [ 7]> brk ; Use BRK to return to the monitor
3027 : 23 > db test_num
>
3028 : >skip2811
>
3028 : e8 [ 2] inx
3029 : e002 [ 2] cpx #2
302b : d005 [ 3] bne tinc3
302d : a9fe [ 2] lda #$fe
302f : 8d0302 [ 4] sta abst
3032 : e005 [ 2] tinc3 cpx #5
3034 : d0d6 [ 3] bne tinc2
3036 : ca [ 2] dex
3037 : ee0302 [ 6] inc abst
303a : tdec2
set_stat 0
> load_flag 0
303a : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
303c : 48 [ 3]> pha ;use stack to load status
303d : 28 [ 4]> plp
303e : ce0302 [ 6] dec abst
tst_abs rINC,fINC,0
3041 : 08 [ 3]> php ;save flags
3042 : ad0302 [ 4]> lda abst
3045 : dd3102 [ 4]> cmp rINC,x ;test result
> trap_ne
3048 : f002 [ 3]> beq skip2816
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
304a : 00 [ 7]> brk ; Use BRK to return to the monitor
304b : 23 > db test_num
>
304c : >skip2816
>
304c : 68 [ 4]> pla ;load status
> eor_flag 0
304d : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
304f : dd3602 [ 4]> cmp fINC,x ;test flags
> trap_ne
3052 : f002 [ 3]> beq skip2819
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3054 : 00 [ 7]> brk ; Use BRK to return to the monitor
3055 : 23 > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 317
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3056 : >skip2819
>
3056 : ca [ 2] dex
3057 : 300b [ 3] bmi tdec3
3059 : e001 [ 2] cpx #1
305b : d0dd [ 3] bne tdec2
305d : a981 [ 2] lda #$81
305f : 8d0302 [ 4] sta abst
3062 : d0d6 [ 3] bne tdec2
3064 : tdec3
3064 : a200 [ 2] ldx #0
3066 : a97e [ 2] lda #$7e
3068 : 8d0302 [ 4] sta abst
306b : tinc12
set_stat $ff
> load_flag $ff
306b : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
306d : 48 [ 3]> pha ;use stack to load status
306e : 28 [ 4]> plp
306f : ee0302 [ 6] inc abst
tst_abs rINC,fINC,$ff-fnz
3072 : 08 [ 3]> php ;save flags
3073 : ad0302 [ 4]> lda abst
3076 : dd3102 [ 4]> cmp rINC,x ;test result
> trap_ne
3079 : f002 [ 3]> beq skip2824
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
307b : 00 [ 7]> brk ; Use BRK to return to the monitor
307c : 23 > db test_num
>
307d : >skip2824
>
307d : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
307e : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
3080 : dd3602 [ 4]> cmp fINC,x ;test flags
> trap_ne
3083 : f002 [ 3]> beq skip2827
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3085 : 00 [ 7]> brk ; Use BRK to return to the monitor
3086 : 23 > db test_num
>
3087 : >skip2827
>
3087 : e8 [ 2] inx
3088 : e002 [ 2] cpx #2
308a : d005 [ 3] bne tinc13
308c : a9fe [ 2] lda #$fe
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 318
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
308e : 8d0302 [ 4] sta abst
3091 : e005 [ 2] tinc13 cpx #5
3093 : d0d6 [ 3] bne tinc12
3095 : ca [ 2] dex
3096 : ee0302 [ 6] inc abst
3099 : tdec12
set_stat $ff
> load_flag $ff
3099 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
309b : 48 [ 3]> pha ;use stack to load status
309c : 28 [ 4]> plp
309d : ce0302 [ 6] dec abst
tst_abs rINC,fINC,$ff-fnz
30a0 : 08 [ 3]> php ;save flags
30a1 : ad0302 [ 4]> lda abst
30a4 : dd3102 [ 4]> cmp rINC,x ;test result
> trap_ne
30a7 : f002 [ 3]> beq skip2832
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
30a9 : 00 [ 7]> brk ; Use BRK to return to the monitor
30aa : 23 > db test_num
>
30ab : >skip2832
>
30ab : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
30ac : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
30ae : dd3602 [ 4]> cmp fINC,x ;test flags
> trap_ne
30b1 : f002 [ 3]> beq skip2835
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
30b3 : 00 [ 7]> brk ; Use BRK to return to the monitor
30b4 : 23 > db test_num
>
30b5 : >skip2835
>
30b5 : ca [ 2] dex
30b6 : 300b [ 3] bmi tdec13
30b8 : e001 [ 2] cpx #1
30ba : d0dd [ 3] bne tdec12
30bc : a981 [ 2] lda #$81
30be : 8d0302 [ 4] sta abst
30c1 : d0d6 [ 3] bne tdec12
30c3 : tdec13
next_test
30c3 : ad0002 [ 4]> lda test_case ;previous test
30c6 : c923 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
30c8 : f002 [ 3]> beq skip2838
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 319
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
30ca : 00 [ 7]> brk ; Use BRK to return to the monitor
30cb : 23 > db test_num
>
30cc : >skip2838
>
0024 = >test_num = test_num + 1
30cc : a924 [ 2]> lda #test_num ;*** this tests' number
30ce : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; zeropage indexed
30d1 : a200 [ 2] ldx #0
30d3 : a97e [ 2] lda #$7e
30d5 : 95b2 [ 4] tinc4 sta zpt,x
set_stat 0
> load_flag 0
30d7 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
30d9 : 48 [ 3]> pha ;use stack to load status
30da : 28 [ 4]> plp
30db : f6b2 [ 6] inc zpt,x
tst_zx rINC,fINC,0
30dd : 08 [ 3]> php ;save flags
30de : b5b2 [ 4]> lda zpt,x
30e0 : dd3102 [ 4]> cmp rINC,x ;test result
> trap_ne
30e3 : f002 [ 3]> beq skip2843
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
30e5 : 00 [ 7]> brk ; Use BRK to return to the monitor
30e6 : 24 > db test_num
>
30e7 : >skip2843
>
30e7 : 68 [ 4]> pla ;load status
> eor_flag 0
30e8 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
30ea : dd3602 [ 4]> cmp fINC,x ;test flags
> trap_ne
30ed : f002 [ 3]> beq skip2846
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
30ef : 00 [ 7]> brk ; Use BRK to return to the monitor
30f0 : 24 > db test_num
>
30f1 : >skip2846
>
30f1 : b5b2 [ 4] lda zpt,x
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 320
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
30f3 : e8 [ 2] inx
30f4 : e002 [ 2] cpx #2
30f6 : d002 [ 3] bne tinc5
30f8 : a9fe [ 2] lda #$fe
30fa : e005 [ 2] tinc5 cpx #5
30fc : d0d7 [ 3] bne tinc4
30fe : ca [ 2] dex
30ff : a902 [ 2] lda #2
3101 : 95b2 [ 4] tdec4 sta zpt,x
set_stat 0
> load_flag 0
3103 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
3105 : 48 [ 3]> pha ;use stack to load status
3106 : 28 [ 4]> plp
3107 : d6b2 [ 6] dec zpt,x
tst_zx rINC,fINC,0
3109 : 08 [ 3]> php ;save flags
310a : b5b2 [ 4]> lda zpt,x
310c : dd3102 [ 4]> cmp rINC,x ;test result
> trap_ne
310f : f002 [ 3]> beq skip2851
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3111 : 00 [ 7]> brk ; Use BRK to return to the monitor
3112 : 24 > db test_num
>
3113 : >skip2851
>
3113 : 68 [ 4]> pla ;load status
> eor_flag 0
3114 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
3116 : dd3602 [ 4]> cmp fINC,x ;test flags
> trap_ne
3119 : f002 [ 3]> beq skip2854
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
311b : 00 [ 7]> brk ; Use BRK to return to the monitor
311c : 24 > db test_num
>
311d : >skip2854
>
311d : b5b2 [ 4] lda zpt,x
311f : ca [ 2] dex
3120 : 3008 [ 3] bmi tdec5
3122 : e001 [ 2] cpx #1
3124 : d0db [ 3] bne tdec4
3126 : a981 [ 2] lda #$81
3128 : d0d7 [ 3] bne tdec4
312a : tdec5
312a : a200 [ 2] ldx #0
312c : a97e [ 2] lda #$7e
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 321
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
312e : 95b2 [ 4] tinc14 sta zpt,x
set_stat $ff
> load_flag $ff
3130 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
3132 : 48 [ 3]> pha ;use stack to load status
3133 : 28 [ 4]> plp
3134 : f6b2 [ 6] inc zpt,x
tst_zx rINC,fINC,$ff-fnz
3136 : 08 [ 3]> php ;save flags
3137 : b5b2 [ 4]> lda zpt,x
3139 : dd3102 [ 4]> cmp rINC,x ;test result
> trap_ne
313c : f002 [ 3]> beq skip2859
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
313e : 00 [ 7]> brk ; Use BRK to return to the monitor
313f : 24 > db test_num
>
3140 : >skip2859
>
3140 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
3141 : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
3143 : dd3602 [ 4]> cmp fINC,x ;test flags
> trap_ne
3146 : f002 [ 3]> beq skip2862
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3148 : 00 [ 7]> brk ; Use BRK to return to the monitor
3149 : 24 > db test_num
>
314a : >skip2862
>
314a : b5b2 [ 4] lda zpt,x
314c : e8 [ 2] inx
314d : e002 [ 2] cpx #2
314f : d002 [ 3] bne tinc15
3151 : a9fe [ 2] lda #$fe
3153 : e005 [ 2] tinc15 cpx #5
3155 : d0d7 [ 3] bne tinc14
3157 : ca [ 2] dex
3158 : a902 [ 2] lda #2
315a : 95b2 [ 4] tdec14 sta zpt,x
set_stat $ff
> load_flag $ff
315c : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
315e : 48 [ 3]> pha ;use stack to load status
315f : 28 [ 4]> plp
3160 : d6b2 [ 6] dec zpt,x
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 322
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
tst_zx rINC,fINC,$ff-fnz
3162 : 08 [ 3]> php ;save flags
3163 : b5b2 [ 4]> lda zpt,x
3165 : dd3102 [ 4]> cmp rINC,x ;test result
> trap_ne
3168 : f002 [ 3]> beq skip2867
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
316a : 00 [ 7]> brk ; Use BRK to return to the monitor
316b : 24 > db test_num
>
316c : >skip2867
>
316c : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
316d : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
316f : dd3602 [ 4]> cmp fINC,x ;test flags
> trap_ne
3172 : f002 [ 3]> beq skip2870
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3174 : 00 [ 7]> brk ; Use BRK to return to the monitor
3175 : 24 > db test_num
>
3176 : >skip2870
>
3176 : b5b2 [ 4] lda zpt,x
3178 : ca [ 2] dex
3179 : 3008 [ 3] bmi tdec15
317b : e001 [ 2] cpx #1
317d : d0db [ 3] bne tdec14
317f : a981 [ 2] lda #$81
3181 : d0d7 [ 3] bne tdec14
3183 : tdec15
next_test
3183 : ad0002 [ 4]> lda test_case ;previous test
3186 : c924 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
3188 : f002 [ 3]> beq skip2873
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
318a : 00 [ 7]> brk ; Use BRK to return to the monitor
318b : 24 > db test_num
>
318c : >skip2873
>
0025 = >test_num = test_num + 1
318c : a925 [ 2]> lda #test_num ;*** this tests' number
318e : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; memory indexed
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 323
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3191 : a200 [ 2] ldx #0
3193 : a97e [ 2] lda #$7e
3195 : 9d0302 [ 5] tinc6 sta abst,x
set_stat 0
> load_flag 0
3198 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
319a : 48 [ 3]> pha ;use stack to load status
319b : 28 [ 4]> plp
319c : fe0302 [ 7] inc abst,x
tst_absx rINC,fINC,0
319f : 08 [ 3]> php ;save flags
31a0 : bd0302 [ 4]> lda abst,x
31a3 : dd3102 [ 4]> cmp rINC,x ;test result
> trap_ne
31a6 : f002 [ 3]> beq skip2878
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
31a8 : 00 [ 7]> brk ; Use BRK to return to the monitor
31a9 : 25 > db test_num
>
31aa : >skip2878
>
31aa : 68 [ 4]> pla ;load status
> eor_flag 0
31ab : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
31ad : dd3602 [ 4]> cmp fINC,x ;test flags
> trap_ne
31b0 : f002 [ 3]> beq skip2881
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
31b2 : 00 [ 7]> brk ; Use BRK to return to the monitor
31b3 : 25 > db test_num
>
31b4 : >skip2881
>
31b4 : bd0302 [ 4] lda abst,x
31b7 : e8 [ 2] inx
31b8 : e002 [ 2] cpx #2
31ba : d002 [ 3] bne tinc7
31bc : a9fe [ 2] lda #$fe
31be : e005 [ 2] tinc7 cpx #5
31c0 : d0d3 [ 3] bne tinc6
31c2 : ca [ 2] dex
31c3 : a902 [ 2] lda #2
31c5 : 9d0302 [ 5] tdec6 sta abst,x
set_stat 0
> load_flag 0
31c8 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
31ca : 48 [ 3]> pha ;use stack to load status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 324
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
31cb : 28 [ 4]> plp
31cc : de0302 [ 7] dec abst,x
tst_absx rINC,fINC,0
31cf : 08 [ 3]> php ;save flags
31d0 : bd0302 [ 4]> lda abst,x
31d3 : dd3102 [ 4]> cmp rINC,x ;test result
> trap_ne
31d6 : f002 [ 3]> beq skip2886
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
31d8 : 00 [ 7]> brk ; Use BRK to return to the monitor
31d9 : 25 > db test_num
>
31da : >skip2886
>
31da : 68 [ 4]> pla ;load status
> eor_flag 0
31db : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
31dd : dd3602 [ 4]> cmp fINC,x ;test flags
> trap_ne
31e0 : f002 [ 3]> beq skip2889
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
31e2 : 00 [ 7]> brk ; Use BRK to return to the monitor
31e3 : 25 > db test_num
>
31e4 : >skip2889
>
31e4 : bd0302 [ 4] lda abst,x
31e7 : ca [ 2] dex
31e8 : 3008 [ 3] bmi tdec7
31ea : e001 [ 2] cpx #1
31ec : d0d7 [ 3] bne tdec6
31ee : a981 [ 2] lda #$81
31f0 : d0d3 [ 3] bne tdec6
31f2 : tdec7
31f2 : a200 [ 2] ldx #0
31f4 : a97e [ 2] lda #$7e
31f6 : 9d0302 [ 5] tinc16 sta abst,x
set_stat $ff
> load_flag $ff
31f9 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
31fb : 48 [ 3]> pha ;use stack to load status
31fc : 28 [ 4]> plp
31fd : fe0302 [ 7] inc abst,x
tst_absx rINC,fINC,$ff-fnz
3200 : 08 [ 3]> php ;save flags
3201 : bd0302 [ 4]> lda abst,x
3204 : dd3102 [ 4]> cmp rINC,x ;test result
> trap_ne
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 325
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3207 : f002 [ 3]> beq skip2894
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3209 : 00 [ 7]> brk ; Use BRK to return to the monitor
320a : 25 > db test_num
>
320b : >skip2894
>
320b : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
320c : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
320e : dd3602 [ 4]> cmp fINC,x ;test flags
> trap_ne
3211 : f002 [ 3]> beq skip2897
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3213 : 00 [ 7]> brk ; Use BRK to return to the monitor
3214 : 25 > db test_num
>
3215 : >skip2897
>
3215 : bd0302 [ 4] lda abst,x
3218 : e8 [ 2] inx
3219 : e002 [ 2] cpx #2
321b : d002 [ 3] bne tinc17
321d : a9fe [ 2] lda #$fe
321f : e005 [ 2] tinc17 cpx #5
3221 : d0d3 [ 4] bne tinc16
3223 : ca [ 2] dex
3224 : a902 [ 2] lda #2
3226 : 9d0302 [ 5] tdec16 sta abst,x
set_stat $ff
> load_flag $ff
3229 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
322b : 48 [ 3]> pha ;use stack to load status
322c : 28 [ 4]> plp
322d : de0302 [ 7] dec abst,x
tst_absx rINC,fINC,$ff-fnz
3230 : 08 [ 3]> php ;save flags
3231 : bd0302 [ 4]> lda abst,x
3234 : dd3102 [ 4]> cmp rINC,x ;test result
> trap_ne
3237 : f002 [ 3]> beq skip2902
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3239 : 00 [ 7]> brk ; Use BRK to return to the monitor
323a : 25 > db test_num
>
323b : >skip2902
>
323b : 68 [ 4]> pla ;load status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 326
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> eor_flag $ff-fnz
323c : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
323e : dd3602 [ 4]> cmp fINC,x ;test flags
> trap_ne
3241 : f002 [ 3]> beq skip2905
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3243 : 00 [ 7]> brk ; Use BRK to return to the monitor
3244 : 25 > db test_num
>
3245 : >skip2905
>
3245 : bd0302 [ 4] lda abst,x
3248 : ca [ 2] dex
3249 : 3008 [ 3] bmi tdec17
324b : e001 [ 2] cpx #1
324d : d0d7 [ 3] bne tdec16
324f : a981 [ 2] lda #$81
3251 : d0d3 [ 3] bne tdec16
3253 : tdec17
next_test
3253 : ad0002 [ 4]> lda test_case ;previous test
3256 : c925 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
3258 : f002 [ 3]> beq skip2908
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
325a : 00 [ 7]> brk ; Use BRK to return to the monitor
325b : 25 > db test_num
>
325c : >skip2908
>
0026 = >test_num = test_num + 1
325c : a926 [ 2]> lda #test_num ;*** this tests' number
325e : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; testing logical instructions - AND EOR ORA all addressing modes
; AND
3261 : a203 [ 2] ldx #3 ;immediate - self modifying code
3263 : b5c2 [ 4] tand lda zpAN,x
3265 : 8d7032 [ 4] sta tandi1
set_ax absANa,0
> load_flag 0
3268 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
326a : 48 [ 3]> pha ;use stack to load status
326b : bd4b02 [ 4]> lda absANa,x ;precharge accu
326e : 28 [ 4]> plp
3270 = tandi1 equ *+1 ;target for immediate operand
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 327
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
326f : 2963 [ 2] and #99
tst_ax absrlo,absflo,0
3271 : 08 [ 3]> php ;save flags
3272 : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
3275 : f002 [ 3]> beq skip2913
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3277 : 00 [ 7]> brk ; Use BRK to return to the monitor
3278 : 26 > db test_num
>
3279 : >skip2913
>
3279 : 68 [ 4]> pla ;load status
> eor_flag 0
327a : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
327c : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
327f : f002 [ 3]> beq skip2916
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3281 : 00 [ 7]> brk ; Use BRK to return to the monitor
3282 : 26 > db test_num
>
3283 : >skip2916
>
3283 : ca [ 2] dex
3284 : 10dd [ 3] bpl tand
3286 : a203 [ 2] ldx #3
3288 : b5c2 [ 4] tand1 lda zpAN,x
328a : 8d9532 [ 4] sta tandi2
set_ax absANa,$ff
> load_flag $ff
328d : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
328f : 48 [ 3]> pha ;use stack to load status
3290 : bd4b02 [ 4]> lda absANa,x ;precharge accu
3293 : 28 [ 4]> plp
3295 = tandi2 equ *+1 ;target for immediate operand
3294 : 2963 [ 2] and #99
tst_ax absrlo,absflo,$ff-fnz
3296 : 08 [ 3]> php ;save flags
3297 : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
329a : f002 [ 3]> beq skip2921
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
329c : 00 [ 7]> brk ; Use BRK to return to the monitor
329d : 26 > db test_num
>
329e : >skip2921
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 328
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
329e : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
329f : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
32a1 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
32a4 : f002 [ 3]> beq skip2924
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
32a6 : 00 [ 7]> brk ; Use BRK to return to the monitor
32a7 : 26 > db test_num
>
32a8 : >skip2924
>
32a8 : ca [ 2] dex
32a9 : 10dd [ 3] bpl tand1
32ab : a203 [ 2] ldx #3 ;zp
32ad : b5c2 [ 4] tand2 lda zpAN,x
32af : 85b2 [ 3] sta zpt
set_ax absANa,0
> load_flag 0
32b1 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
32b3 : 48 [ 3]> pha ;use stack to load status
32b4 : bd4b02 [ 4]> lda absANa,x ;precharge accu
32b7 : 28 [ 4]> plp
32b8 : 25b2 [ 3] and zpt
tst_ax absrlo,absflo,0
32ba : 08 [ 3]> php ;save flags
32bb : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
32be : f002 [ 3]> beq skip2929
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
32c0 : 00 [ 7]> brk ; Use BRK to return to the monitor
32c1 : 26 > db test_num
>
32c2 : >skip2929
>
32c2 : 68 [ 4]> pla ;load status
> eor_flag 0
32c3 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
32c5 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
32c8 : f002 [ 3]> beq skip2932
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
32ca : 00 [ 7]> brk ; Use BRK to return to the monitor
32cb : 26 > db test_num
>
32cc : >skip2932
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 329
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
32cc : ca [ 2] dex
32cd : 10de [ 3] bpl tand2
32cf : a203 [ 2] ldx #3
32d1 : b5c2 [ 4] tand3 lda zpAN,x
32d3 : 85b2 [ 3] sta zpt
set_ax absANa,$ff
> load_flag $ff
32d5 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
32d7 : 48 [ 3]> pha ;use stack to load status
32d8 : bd4b02 [ 4]> lda absANa,x ;precharge accu
32db : 28 [ 4]> plp
32dc : 25b2 [ 3] and zpt
tst_ax absrlo,absflo,$ff-fnz
32de : 08 [ 3]> php ;save flags
32df : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
32e2 : f002 [ 3]> beq skip2937
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
32e4 : 00 [ 7]> brk ; Use BRK to return to the monitor
32e5 : 26 > db test_num
>
32e6 : >skip2937
>
32e6 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
32e7 : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
32e9 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
32ec : f002 [ 3]> beq skip2940
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
32ee : 00 [ 7]> brk ; Use BRK to return to the monitor
32ef : 26 > db test_num
>
32f0 : >skip2940
>
32f0 : ca [ 2] dex
32f1 : 10de [ 3] bpl tand3
32f3 : a203 [ 2] ldx #3 ;abs
32f5 : b5c2 [ 4] tand4 lda zpAN,x
32f7 : 8d0302 [ 4] sta abst
set_ax absANa,0
> load_flag 0
32fa : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
32fc : 48 [ 3]> pha ;use stack to load status
32fd : bd4b02 [ 4]> lda absANa,x ;precharge accu
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 330
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3300 : 28 [ 4]> plp
3301 : 2d0302 [ 4] and abst
tst_ax absrlo,absflo,0
3304 : 08 [ 3]> php ;save flags
3305 : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
3308 : f002 [ 3]> beq skip2945
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
330a : 00 [ 7]> brk ; Use BRK to return to the monitor
330b : 26 > db test_num
>
330c : >skip2945
>
330c : 68 [ 4]> pla ;load status
> eor_flag 0
330d : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
330f : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
3312 : f002 [ 3]> beq skip2948
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3314 : 00 [ 7]> brk ; Use BRK to return to the monitor
3315 : 26 > db test_num
>
3316 : >skip2948
>
3316 : ca [ 2] dex
3317 : 10dc [ 4] bpl tand4
3319 : a203 [ 2] ldx #3
331b : b5c2 [ 4] tand5 lda zpAN,x
331d : 8d0302 [ 4] sta abst
set_ax absANa,$ff
> load_flag $ff
3320 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
3322 : 48 [ 3]> pha ;use stack to load status
3323 : bd4b02 [ 4]> lda absANa,x ;precharge accu
3326 : 28 [ 4]> plp
3327 : 2d0302 [ 4] and abst
tst_ax absrlo,absflo,$ff-fnz
332a : 08 [ 3]> php ;save flags
332b : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
332e : f002 [ 3]> beq skip2953
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3330 : 00 [ 7]> brk ; Use BRK to return to the monitor
3331 : 26 > db test_num
>
3332 : >skip2953
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 331
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
3332 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
3333 : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
3335 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
3338 : f002 [ 3]> beq skip2956
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
333a : 00 [ 7]> brk ; Use BRK to return to the monitor
333b : 26 > db test_num
>
333c : >skip2956
>
333c : ca [ 2] dex
333d : 1002 [ 3] bpl tand6
333f : a203 [ 2] ldx #3 ;zp,x
3341 : tand6
set_ax absANa,0
> load_flag 0
3341 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
3343 : 48 [ 3]> pha ;use stack to load status
3344 : bd4b02 [ 4]> lda absANa,x ;precharge accu
3347 : 28 [ 4]> plp
3348 : 35c2 [ 4] and zpAN,x
tst_ax absrlo,absflo,0
334a : 08 [ 3]> php ;save flags
334b : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
334e : f002 [ 3]> beq skip2961
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3350 : 00 [ 7]> brk ; Use BRK to return to the monitor
3351 : 26 > db test_num
>
3352 : >skip2961
>
3352 : 68 [ 4]> pla ;load status
> eor_flag 0
3353 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
3355 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
3358 : f002 [ 3]> beq skip2964
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
335a : 00 [ 7]> brk ; Use BRK to return to the monitor
335b : 26 > db test_num
>
335c : >skip2964
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 332
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
335c : ca [ 2] dex
335d : 10e2 [ 3] bpl tand6
335f : a203 [ 2] ldx #3
3361 : tand7
set_ax absANa,$ff
> load_flag $ff
3361 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
3363 : 48 [ 3]> pha ;use stack to load status
3364 : bd4b02 [ 4]> lda absANa,x ;precharge accu
3367 : 28 [ 4]> plp
3368 : 35c2 [ 4] and zpAN,x
tst_ax absrlo,absflo,$ff-fnz
336a : 08 [ 3]> php ;save flags
336b : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
336e : f002 [ 3]> beq skip2969
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3370 : 00 [ 7]> brk ; Use BRK to return to the monitor
3371 : 26 > db test_num
>
3372 : >skip2969
>
3372 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
3373 : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
3375 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
3378 : f002 [ 3]> beq skip2972
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
337a : 00 [ 7]> brk ; Use BRK to return to the monitor
337b : 26 > db test_num
>
337c : >skip2972
>
337c : ca [ 2] dex
337d : 10e2 [ 3] bpl tand7
337f : a203 [ 2] ldx #3 ;abs,x
3381 : tand8
set_ax absANa,0
> load_flag 0
3381 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
3383 : 48 [ 3]> pha ;use stack to load status
3384 : bd4b02 [ 4]> lda absANa,x ;precharge accu
3387 : 28 [ 4]> plp
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 333
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3388 : 3d3f02 [ 4] and absAN,x
tst_ax absrlo,absflo,0
338b : 08 [ 3]> php ;save flags
338c : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
338f : f002 [ 3]> beq skip2977
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3391 : 00 [ 7]> brk ; Use BRK to return to the monitor
3392 : 26 > db test_num
>
3393 : >skip2977
>
3393 : 68 [ 4]> pla ;load status
> eor_flag 0
3394 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
3396 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
3399 : f002 [ 3]> beq skip2980
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
339b : 00 [ 7]> brk ; Use BRK to return to the monitor
339c : 26 > db test_num
>
339d : >skip2980
>
339d : ca [ 2] dex
339e : 10e1 [ 3] bpl tand8
33a0 : a203 [ 2] ldx #3
33a2 : tand9
set_ax absANa,$ff
> load_flag $ff
33a2 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
33a4 : 48 [ 3]> pha ;use stack to load status
33a5 : bd4b02 [ 4]> lda absANa,x ;precharge accu
33a8 : 28 [ 4]> plp
33a9 : 3d3f02 [ 4] and absAN,x
tst_ax absrlo,absflo,$ff-fnz
33ac : 08 [ 3]> php ;save flags
33ad : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
33b0 : f002 [ 3]> beq skip2985
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
33b2 : 00 [ 7]> brk ; Use BRK to return to the monitor
33b3 : 26 > db test_num
>
33b4 : >skip2985
>
33b4 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 334
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
33b5 : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
33b7 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
33ba : f002 [ 3]> beq skip2988
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
33bc : 00 [ 7]> brk ; Use BRK to return to the monitor
33bd : 26 > db test_num
>
33be : >skip2988
>
33be : ca [ 2] dex
33bf : 10e1 [ 3] bpl tand9
33c1 : a003 [ 2] ldy #3 ;abs,y
33c3 : tand10
set_ay absANa,0
> load_flag 0
33c3 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
33c5 : 48 [ 3]> pha ;use stack to load status
33c6 : b94b02 [ 4]> lda absANa,y ;precharge accu
33c9 : 28 [ 4]> plp
33ca : 393f02 [ 4] and absAN,y
tst_ay absrlo,absflo,0
33cd : 08 [ 3]> php ;save flags
33ce : d95302 [ 4]> cmp absrlo,y ;test result
> trap_ne ;
33d1 : f002 [ 3]> beq skip2993
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
33d3 : 00 [ 7]> brk ; Use BRK to return to the monitor
33d4 : 26 > db test_num
>
33d5 : >skip2993
>
33d5 : 68 [ 4]> pla ;load status
> eor_flag 0
33d6 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
33d8 : d95702 [ 4]> cmp absflo,y ;test flags
> trap_ne
33db : f002 [ 3]> beq skip2996
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
33dd : 00 [ 7]> brk ; Use BRK to return to the monitor
33de : 26 > db test_num
>
33df : >skip2996
>
33df : 88 [ 2] dey
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 335
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
33e0 : 10e1 [ 3] bpl tand10
33e2 : a003 [ 2] ldy #3
33e4 : tand11
set_ay absANa,$ff
> load_flag $ff
33e4 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
33e6 : 48 [ 3]> pha ;use stack to load status
33e7 : b94b02 [ 4]> lda absANa,y ;precharge accu
33ea : 28 [ 4]> plp
33eb : 393f02 [ 4] and absAN,y
tst_ay absrlo,absflo,$ff-fnz
33ee : 08 [ 3]> php ;save flags
33ef : d95302 [ 4]> cmp absrlo,y ;test result
> trap_ne ;
33f2 : f002 [ 3]> beq skip3001
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
33f4 : 00 [ 7]> brk ; Use BRK to return to the monitor
33f5 : 26 > db test_num
>
33f6 : >skip3001
>
33f6 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
33f7 : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
33f9 : d95702 [ 4]> cmp absflo,y ;test flags
> trap_ne
33fc : f002 [ 4]> beq skip3004
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
33fe : 00 [ 7]> brk ; Use BRK to return to the monitor
33ff : 26 > db test_num
>
3400 : >skip3004
>
3400 : 88 [ 2] dey
3401 : 10e1 [ 4] bpl tand11
3403 : a206 [ 2] ldx #6 ;(zp,x)
3405 : a003 [ 2] ldy #3
3407 : tand12
set_ay absANa,0
> load_flag 0
3407 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
3409 : 48 [ 3]> pha ;use stack to load status
340a : b94b02 [ 4]> lda absANa,y ;precharge accu
340d : 28 [ 4]> plp
340e : 21e0 [ 6] and (indAN,x)
tst_ay absrlo,absflo,0
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 336
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3410 : 08 [ 3]> php ;save flags
3411 : d95302 [ 4]> cmp absrlo,y ;test result
> trap_ne ;
3414 : f002 [ 3]> beq skip3009
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3416 : 00 [ 7]> brk ; Use BRK to return to the monitor
3417 : 26 > db test_num
>
3418 : >skip3009
>
3418 : 68 [ 4]> pla ;load status
> eor_flag 0
3419 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
341b : d95702 [ 4]> cmp absflo,y ;test flags
> trap_ne
341e : f002 [ 3]> beq skip3012
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3420 : 00 [ 7]> brk ; Use BRK to return to the monitor
3421 : 26 > db test_num
>
3422 : >skip3012
>
3422 : ca [ 2] dex
3423 : ca [ 2] dex
3424 : 88 [ 2] dey
3425 : 10e0 [ 3] bpl tand12
3427 : a206 [ 2] ldx #6
3429 : a003 [ 2] ldy #3
342b : tand13
set_ay absANa,$ff
> load_flag $ff
342b : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
342d : 48 [ 3]> pha ;use stack to load status
342e : b94b02 [ 4]> lda absANa,y ;precharge accu
3431 : 28 [ 4]> plp
3432 : 21e0 [ 6] and (indAN,x)
tst_ay absrlo,absflo,$ff-fnz
3434 : 08 [ 3]> php ;save flags
3435 : d95302 [ 4]> cmp absrlo,y ;test result
> trap_ne ;
3438 : f002 [ 3]> beq skip3017
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
343a : 00 [ 7]> brk ; Use BRK to return to the monitor
343b : 26 > db test_num
>
343c : >skip3017
>
343c : 68 [ 4]> pla ;load status
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 337
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> eor_flag $ff-fnz
343d : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
343f : d95702 [ 4]> cmp absflo,y ;test flags
> trap_ne
3442 : f002 [ 3]> beq skip3020
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3444 : 00 [ 7]> brk ; Use BRK to return to the monitor
3445 : 26 > db test_num
>
3446 : >skip3020
>
3446 : ca [ 2] dex
3447 : ca [ 2] dex
3448 : 88 [ 2] dey
3449 : 10e0 [ 3] bpl tand13
344b : a003 [ 2] ldy #3 ;(zp),y
344d : tand14
set_ay absANa,0
> load_flag 0
344d : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
344f : 48 [ 3]> pha ;use stack to load status
3450 : b94b02 [ 4]> lda absANa,y ;precharge accu
3453 : 28 [ 4]> plp
3454 : 31e0 [ 5] and (indAN),y
tst_ay absrlo,absflo,0
3456 : 08 [ 3]> php ;save flags
3457 : d95302 [ 4]> cmp absrlo,y ;test result
> trap_ne ;
345a : f002 [ 3]> beq skip3025
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
345c : 00 [ 7]> brk ; Use BRK to return to the monitor
345d : 26 > db test_num
>
345e : >skip3025
>
345e : 68 [ 4]> pla ;load status
> eor_flag 0
345f : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
3461 : d95702 [ 4]> cmp absflo,y ;test flags
> trap_ne
3464 : f002 [ 3]> beq skip3028
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3466 : 00 [ 7]> brk ; Use BRK to return to the monitor
3467 : 26 > db test_num
>
3468 : >skip3028
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 338
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
3468 : 88 [ 2] dey
3469 : 10e2 [ 3] bpl tand14
346b : a003 [ 2] ldy #3
346d : tand15
set_ay absANa,$ff
> load_flag $ff
346d : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
346f : 48 [ 3]> pha ;use stack to load status
3470 : b94b02 [ 4]> lda absANa,y ;precharge accu
3473 : 28 [ 4]> plp
3474 : 31e0 [ 5] and (indAN),y
tst_ay absrlo,absflo,$ff-fnz
3476 : 08 [ 3]> php ;save flags
3477 : d95302 [ 4]> cmp absrlo,y ;test result
> trap_ne ;
347a : f002 [ 3]> beq skip3033
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
347c : 00 [ 7]> brk ; Use BRK to return to the monitor
347d : 26 > db test_num
>
347e : >skip3033
>
347e : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
347f : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
3481 : d95702 [ 4]> cmp absflo,y ;test flags
> trap_ne
3484 : f002 [ 3]> beq skip3036
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3486 : 00 [ 7]> brk ; Use BRK to return to the monitor
3487 : 26 > db test_num
>
3488 : >skip3036
>
3488 : 88 [ 2] dey
3489 : 10e2 [ 3] bpl tand15
next_test
348b : ad0002 [ 4]> lda test_case ;previous test
348e : c926 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
3490 : f002 [ 3]> beq skip3039
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3492 : 00 [ 7]> brk ; Use BRK to return to the monitor
3493 : 26 > db test_num
>
3494 : >skip3039
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 339
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
0027 = >test_num = test_num + 1
3494 : a927 [ 2]> lda #test_num ;*** this tests' number
3496 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; EOR
3499 : a203 [ 2] ldx #3 ;immediate - self modifying code
349b : b5c6 [ 4] teor lda zpEO,x
349d : 8da834 [ 4] sta teori1
set_ax absEOa,0
> load_flag 0
34a0 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
34a2 : 48 [ 3]> pha ;use stack to load status
34a3 : bd4f02 [ 4]> lda absEOa,x ;precharge accu
34a6 : 28 [ 4]> plp
34a8 = teori1 equ *+1 ;target for immediate operand
34a7 : 4963 [ 2] eor #99
tst_ax absrlo,absflo,0
34a9 : 08 [ 3]> php ;save flags
34aa : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
34ad : f002 [ 3]> beq skip3044
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
34af : 00 [ 7]> brk ; Use BRK to return to the monitor
34b0 : 27 > db test_num
>
34b1 : >skip3044
>
34b1 : 68 [ 4]> pla ;load status
> eor_flag 0
34b2 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
34b4 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
34b7 : f002 [ 3]> beq skip3047
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
34b9 : 00 [ 7]> brk ; Use BRK to return to the monitor
34ba : 27 > db test_num
>
34bb : >skip3047
>
34bb : ca [ 2] dex
34bc : 10dd [ 3] bpl teor
34be : a203 [ 2] ldx #3
34c0 : b5c6 [ 4] teor1 lda zpEO,x
34c2 : 8dcd34 [ 4] sta teori2
set_ax absEOa,$ff
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 340
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> load_flag $ff
34c5 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
34c7 : 48 [ 3]> pha ;use stack to load status
34c8 : bd4f02 [ 4]> lda absEOa,x ;precharge accu
34cb : 28 [ 4]> plp
34cd = teori2 equ *+1 ;target for immediate operand
34cc : 4963 [ 2] eor #99
tst_ax absrlo,absflo,$ff-fnz
34ce : 08 [ 3]> php ;save flags
34cf : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
34d2 : f002 [ 3]> beq skip3052
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
34d4 : 00 [ 7]> brk ; Use BRK to return to the monitor
34d5 : 27 > db test_num
>
34d6 : >skip3052
>
34d6 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
34d7 : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
34d9 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
34dc : f002 [ 3]> beq skip3055
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
34de : 00 [ 7]> brk ; Use BRK to return to the monitor
34df : 27 > db test_num
>
34e0 : >skip3055
>
34e0 : ca [ 2] dex
34e1 : 10dd [ 3] bpl teor1
34e3 : a203 [ 2] ldx #3 ;zp
34e5 : b5c6 [ 4] teor2 lda zpEO,x
34e7 : 85b2 [ 3] sta zpt
set_ax absEOa,0
> load_flag 0
34e9 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
34eb : 48 [ 3]> pha ;use stack to load status
34ec : bd4f02 [ 4]> lda absEOa,x ;precharge accu
34ef : 28 [ 4]> plp
34f0 : 45b2 [ 3] eor zpt
tst_ax absrlo,absflo,0
34f2 : 08 [ 3]> php ;save flags
34f3 : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 341
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
34f6 : f002 [ 3]> beq skip3060
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
34f8 : 00 [ 7]> brk ; Use BRK to return to the monitor
34f9 : 27 > db test_num
>
34fa : >skip3060
>
34fa : 68 [ 4]> pla ;load status
> eor_flag 0
34fb : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
34fd : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
3500 : f002 [ 3]> beq skip3063
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3502 : 00 [ 7]> brk ; Use BRK to return to the monitor
3503 : 27 > db test_num
>
3504 : >skip3063
>
3504 : ca [ 2] dex
3505 : 10de [ 4] bpl teor2
3507 : a203 [ 2] ldx #3
3509 : b5c6 [ 4] teor3 lda zpEO,x
350b : 85b2 [ 3] sta zpt
set_ax absEOa,$ff
> load_flag $ff
350d : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
350f : 48 [ 3]> pha ;use stack to load status
3510 : bd4f02 [ 4]> lda absEOa,x ;precharge accu
3513 : 28 [ 4]> plp
3514 : 45b2 [ 3] eor zpt
tst_ax absrlo,absflo,$ff-fnz
3516 : 08 [ 3]> php ;save flags
3517 : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
351a : f002 [ 3]> beq skip3068
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
351c : 00 [ 7]> brk ; Use BRK to return to the monitor
351d : 27 > db test_num
>
351e : >skip3068
>
351e : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
351f : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
3521 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 342
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3524 : f002 [ 3]> beq skip3071
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3526 : 00 [ 7]> brk ; Use BRK to return to the monitor
3527 : 27 > db test_num
>
3528 : >skip3071
>
3528 : ca [ 2] dex
3529 : 10de [ 3] bpl teor3
352b : a203 [ 2] ldx #3 ;abs
352d : b5c6 [ 4] teor4 lda zpEO,x
352f : 8d0302 [ 4] sta abst
set_ax absEOa,0
> load_flag 0
3532 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
3534 : 48 [ 3]> pha ;use stack to load status
3535 : bd4f02 [ 4]> lda absEOa,x ;precharge accu
3538 : 28 [ 4]> plp
3539 : 4d0302 [ 4] eor abst
tst_ax absrlo,absflo,0
353c : 08 [ 3]> php ;save flags
353d : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
3540 : f002 [ 3]> beq skip3076
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3542 : 00 [ 7]> brk ; Use BRK to return to the monitor
3543 : 27 > db test_num
>
3544 : >skip3076
>
3544 : 68 [ 4]> pla ;load status
> eor_flag 0
3545 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
3547 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
354a : f002 [ 3]> beq skip3079
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
354c : 00 [ 7]> brk ; Use BRK to return to the monitor
354d : 27 > db test_num
>
354e : >skip3079
>
354e : ca [ 2] dex
354f : 10dc [ 3] bpl teor4
3551 : a203 [ 2] ldx #3
3553 : b5c6 [ 4] teor5 lda zpEO,x
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 343
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3555 : 8d0302 [ 4] sta abst
set_ax absEOa,$ff
> load_flag $ff
3558 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
355a : 48 [ 3]> pha ;use stack to load status
355b : bd4f02 [ 4]> lda absEOa,x ;precharge accu
355e : 28 [ 4]> plp
355f : 4d0302 [ 4] eor abst
tst_ax absrlo,absflo,$ff-fnz
3562 : 08 [ 3]> php ;save flags
3563 : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
3566 : f002 [ 3]> beq skip3084
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3568 : 00 [ 7]> brk ; Use BRK to return to the monitor
3569 : 27 > db test_num
>
356a : >skip3084
>
356a : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
356b : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
356d : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
3570 : f002 [ 3]> beq skip3087
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3572 : 00 [ 7]> brk ; Use BRK to return to the monitor
3573 : 27 > db test_num
>
3574 : >skip3087
>
3574 : ca [ 2] dex
3575 : 1002 [ 3] bpl teor6
3577 : a203 [ 2] ldx #3 ;zp,x
3579 : teor6
set_ax absEOa,0
> load_flag 0
3579 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
357b : 48 [ 3]> pha ;use stack to load status
357c : bd4f02 [ 4]> lda absEOa,x ;precharge accu
357f : 28 [ 4]> plp
3580 : 55c6 [ 4] eor zpEO,x
tst_ax absrlo,absflo,0
3582 : 08 [ 3]> php ;save flags
3583 : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 344
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3586 : f002 [ 3]> beq skip3092
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3588 : 00 [ 7]> brk ; Use BRK to return to the monitor
3589 : 27 > db test_num
>
358a : >skip3092
>
358a : 68 [ 4]> pla ;load status
> eor_flag 0
358b : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
358d : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
3590 : f002 [ 3]> beq skip3095
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3592 : 00 [ 7]> brk ; Use BRK to return to the monitor
3593 : 27 > db test_num
>
3594 : >skip3095
>
3594 : ca [ 2] dex
3595 : 10e2 [ 3] bpl teor6
3597 : a203 [ 2] ldx #3
3599 : teor7
set_ax absEOa,$ff
> load_flag $ff
3599 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
359b : 48 [ 3]> pha ;use stack to load status
359c : bd4f02 [ 4]> lda absEOa,x ;precharge accu
359f : 28 [ 4]> plp
35a0 : 55c6 [ 4] eor zpEO,x
tst_ax absrlo,absflo,$ff-fnz
35a2 : 08 [ 3]> php ;save flags
35a3 : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
35a6 : f002 [ 3]> beq skip3100
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
35a8 : 00 [ 7]> brk ; Use BRK to return to the monitor
35a9 : 27 > db test_num
>
35aa : >skip3100
>
35aa : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
35ab : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
35ad : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
35b0 : f002 [ 3]> beq skip3103
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 345
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
35b2 : 00 [ 7]> brk ; Use BRK to return to the monitor
35b3 : 27 > db test_num
>
35b4 : >skip3103
>
35b4 : ca [ 2] dex
35b5 : 10e2 [ 3] bpl teor7
35b7 : a203 [ 2] ldx #3 ;abs,x
35b9 : teor8
set_ax absEOa,0
> load_flag 0
35b9 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
35bb : 48 [ 3]> pha ;use stack to load status
35bc : bd4f02 [ 4]> lda absEOa,x ;precharge accu
35bf : 28 [ 4]> plp
35c0 : 5d4302 [ 4] eor absEO,x
tst_ax absrlo,absflo,0
35c3 : 08 [ 3]> php ;save flags
35c4 : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
35c7 : f002 [ 3]> beq skip3108
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
35c9 : 00 [ 7]> brk ; Use BRK to return to the monitor
35ca : 27 > db test_num
>
35cb : >skip3108
>
35cb : 68 [ 4]> pla ;load status
> eor_flag 0
35cc : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
35ce : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
35d1 : f002 [ 3]> beq skip3111
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
35d3 : 00 [ 7]> brk ; Use BRK to return to the monitor
35d4 : 27 > db test_num
>
35d5 : >skip3111
>
35d5 : ca [ 2] dex
35d6 : 10e1 [ 3] bpl teor8
35d8 : a203 [ 2] ldx #3
35da : teor9
set_ax absEOa,$ff
> load_flag $ff
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 346
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
35da : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
35dc : 48 [ 3]> pha ;use stack to load status
35dd : bd4f02 [ 4]> lda absEOa,x ;precharge accu
35e0 : 28 [ 4]> plp
35e1 : 5d4302 [ 4] eor absEO,x
tst_ax absrlo,absflo,$ff-fnz
35e4 : 08 [ 3]> php ;save flags
35e5 : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
35e8 : f002 [ 3]> beq skip3116
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
35ea : 00 [ 7]> brk ; Use BRK to return to the monitor
35eb : 27 > db test_num
>
35ec : >skip3116
>
35ec : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
35ed : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
35ef : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
35f2 : f002 [ 3]> beq skip3119
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
35f4 : 00 [ 7]> brk ; Use BRK to return to the monitor
35f5 : 27 > db test_num
>
35f6 : >skip3119
>
35f6 : ca [ 2] dex
35f7 : 10e1 [ 3] bpl teor9
35f9 : a003 [ 2] ldy #3 ;abs,y
35fb : teor10
set_ay absEOa,0
> load_flag 0
35fb : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
35fd : 48 [ 3]> pha ;use stack to load status
35fe : b94f02 [ 4]> lda absEOa,y ;precharge accu
3601 : 28 [ 4]> plp
3602 : 594302 [ 4] eor absEO,y
tst_ay absrlo,absflo,0
3605 : 08 [ 3]> php ;save flags
3606 : d95302 [ 4]> cmp absrlo,y ;test result
> trap_ne ;
3609 : f002 [ 3]> beq skip3124
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 347
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
360b : 00 [ 7]> brk ; Use BRK to return to the monitor
360c : 27 > db test_num
>
360d : >skip3124
>
360d : 68 [ 4]> pla ;load status
> eor_flag 0
360e : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
3610 : d95702 [ 4]> cmp absflo,y ;test flags
> trap_ne
3613 : f002 [ 3]> beq skip3127
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3615 : 00 [ 7]> brk ; Use BRK to return to the monitor
3616 : 27 > db test_num
>
3617 : >skip3127
>
3617 : 88 [ 2] dey
3618 : 10e1 [ 4] bpl teor10
361a : a003 [ 2] ldy #3
361c : teor11
set_ay absEOa,$ff
> load_flag $ff
361c : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
361e : 48 [ 3]> pha ;use stack to load status
361f : b94f02 [ 4]> lda absEOa,y ;precharge accu
3622 : 28 [ 4]> plp
3623 : 594302 [ 4] eor absEO,y
tst_ay absrlo,absflo,$ff-fnz
3626 : 08 [ 3]> php ;save flags
3627 : d95302 [ 4]> cmp absrlo,y ;test result
> trap_ne ;
362a : f002 [ 3]> beq skip3132
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
362c : 00 [ 7]> brk ; Use BRK to return to the monitor
362d : 27 > db test_num
>
362e : >skip3132
>
362e : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
362f : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
3631 : d95702 [ 4]> cmp absflo,y ;test flags
> trap_ne
3634 : f002 [ 3]> beq skip3135
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3636 : 00 [ 7]> brk ; Use BRK to return to the monitor
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 348
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3637 : 27 > db test_num
>
3638 : >skip3135
>
3638 : 88 [ 2] dey
3639 : 10e1 [ 3] bpl teor11
363b : a206 [ 2] ldx #6 ;(zp,x)
363d : a003 [ 2] ldy #3
363f : teor12
set_ay absEOa,0
> load_flag 0
363f : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
3641 : 48 [ 3]> pha ;use stack to load status
3642 : b94f02 [ 4]> lda absEOa,y ;precharge accu
3645 : 28 [ 4]> plp
3646 : 41e8 [ 6] eor (indEO,x)
tst_ay absrlo,absflo,0
3648 : 08 [ 3]> php ;save flags
3649 : d95302 [ 4]> cmp absrlo,y ;test result
> trap_ne ;
364c : f002 [ 3]> beq skip3140
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
364e : 00 [ 7]> brk ; Use BRK to return to the monitor
364f : 27 > db test_num
>
3650 : >skip3140
>
3650 : 68 [ 4]> pla ;load status
> eor_flag 0
3651 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
3653 : d95702 [ 4]> cmp absflo,y ;test flags
> trap_ne
3656 : f002 [ 3]> beq skip3143
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3658 : 00 [ 7]> brk ; Use BRK to return to the monitor
3659 : 27 > db test_num
>
365a : >skip3143
>
365a : ca [ 2] dex
365b : ca [ 2] dex
365c : 88 [ 2] dey
365d : 10e0 [ 3] bpl teor12
365f : a206 [ 2] ldx #6
3661 : a003 [ 2] ldy #3
3663 : teor13
set_ay absEOa,$ff
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 349
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> load_flag $ff
3663 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
3665 : 48 [ 3]> pha ;use stack to load status
3666 : b94f02 [ 4]> lda absEOa,y ;precharge accu
3669 : 28 [ 4]> plp
366a : 41e8 [ 6] eor (indEO,x)
tst_ay absrlo,absflo,$ff-fnz
366c : 08 [ 3]> php ;save flags
366d : d95302 [ 4]> cmp absrlo,y ;test result
> trap_ne ;
3670 : f002 [ 3]> beq skip3148
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3672 : 00 [ 7]> brk ; Use BRK to return to the monitor
3673 : 27 > db test_num
>
3674 : >skip3148
>
3674 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
3675 : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
3677 : d95702 [ 4]> cmp absflo,y ;test flags
> trap_ne
367a : f002 [ 3]> beq skip3151
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
367c : 00 [ 7]> brk ; Use BRK to return to the monitor
367d : 27 > db test_num
>
367e : >skip3151
>
367e : ca [ 2] dex
367f : ca [ 2] dex
3680 : 88 [ 2] dey
3681 : 10e0 [ 3] bpl teor13
3683 : a003 [ 2] ldy #3 ;(zp),y
3685 : teor14
set_ay absEOa,0
> load_flag 0
3685 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
3687 : 48 [ 3]> pha ;use stack to load status
3688 : b94f02 [ 4]> lda absEOa,y ;precharge accu
368b : 28 [ 4]> plp
368c : 51e8 [ 5] eor (indEO),y
tst_ay absrlo,absflo,0
368e : 08 [ 3]> php ;save flags
368f : d95302 [ 4]> cmp absrlo,y ;test result
> trap_ne ;
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 350
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3692 : f002 [ 3]> beq skip3156
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3694 : 00 [ 7]> brk ; Use BRK to return to the monitor
3695 : 27 > db test_num
>
3696 : >skip3156
>
3696 : 68 [ 4]> pla ;load status
> eor_flag 0
3697 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
3699 : d95702 [ 4]> cmp absflo,y ;test flags
> trap_ne
369c : f002 [ 3]> beq skip3159
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
369e : 00 [ 7]> brk ; Use BRK to return to the monitor
369f : 27 > db test_num
>
36a0 : >skip3159
>
36a0 : 88 [ 2] dey
36a1 : 10e2 [ 3] bpl teor14
36a3 : a003 [ 2] ldy #3
36a5 : teor15
set_ay absEOa,$ff
> load_flag $ff
36a5 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
36a7 : 48 [ 3]> pha ;use stack to load status
36a8 : b94f02 [ 4]> lda absEOa,y ;precharge accu
36ab : 28 [ 4]> plp
36ac : 51e8 [ 5] eor (indEO),y
tst_ay absrlo,absflo,$ff-fnz
36ae : 08 [ 3]> php ;save flags
36af : d95302 [ 4]> cmp absrlo,y ;test result
> trap_ne ;
36b2 : f002 [ 3]> beq skip3164
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
36b4 : 00 [ 7]> brk ; Use BRK to return to the monitor
36b5 : 27 > db test_num
>
36b6 : >skip3164
>
36b6 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
36b7 : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
36b9 : d95702 [ 4]> cmp absflo,y ;test flags
> trap_ne
36bc : f002 [ 3]> beq skip3167
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 351
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
36be : 00 [ 7]> brk ; Use BRK to return to the monitor
36bf : 27 > db test_num
>
36c0 : >skip3167
>
36c0 : 88 [ 2] dey
36c1 : 10e2 [ 3] bpl teor15
next_test
36c3 : ad0002 [ 4]> lda test_case ;previous test
36c6 : c927 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
36c8 : f002 [ 3]> beq skip3170
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
36ca : 00 [ 7]> brk ; Use BRK to return to the monitor
36cb : 27 > db test_num
>
36cc : >skip3170
>
0028 = >test_num = test_num + 1
36cc : a928 [ 2]> lda #test_num ;*** this tests' number
36ce : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; OR
36d1 : a203 [ 2] ldx #3 ;immediate - self modifying code
36d3 : b5be [ 4] tora lda zpOR,x
36d5 : 8de036 [ 4] sta torai1
set_ax absORa,0
> load_flag 0
36d8 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
36da : 48 [ 3]> pha ;use stack to load status
36db : bd4702 [ 4]> lda absORa,x ;precharge accu
36de : 28 [ 4]> plp
36e0 = torai1 equ *+1 ;target for immediate operand
36df : 0963 [ 2] ora #99
tst_ax absrlo,absflo,0
36e1 : 08 [ 3]> php ;save flags
36e2 : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
36e5 : f002 [ 3]> beq skip3175
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
36e7 : 00 [ 7]> brk ; Use BRK to return to the monitor
36e8 : 28 > db test_num
>
36e9 : >skip3175
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 352
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
36e9 : 68 [ 4]> pla ;load status
> eor_flag 0
36ea : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
36ec : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
36ef : f002 [ 3]> beq skip3178
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
36f1 : 00 [ 7]> brk ; Use BRK to return to the monitor
36f2 : 28 > db test_num
>
36f3 : >skip3178
>
36f3 : ca [ 2] dex
36f4 : 10dd [ 3] bpl tora
36f6 : a203 [ 2] ldx #3
36f8 : b5be [ 4] tora1 lda zpOR,x
36fa : 8d0537 [ 4] sta torai2
set_ax absORa,$ff
> load_flag $ff
36fd : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
36ff : 48 [ 3]> pha ;use stack to load status
3700 : bd4702 [ 4]> lda absORa,x ;precharge accu
3703 : 28 [ 4]> plp
3705 = torai2 equ *+1 ;target for immediate operand
3704 : 0963 [ 2] ora #99
tst_ax absrlo,absflo,$ff-fnz
3706 : 08 [ 3]> php ;save flags
3707 : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
370a : f002 [ 3]> beq skip3183
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
370c : 00 [ 7]> brk ; Use BRK to return to the monitor
370d : 28 > db test_num
>
370e : >skip3183
>
370e : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
370f : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
3711 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
3714 : f002 [ 3]> beq skip3186
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3716 : 00 [ 7]> brk ; Use BRK to return to the monitor
3717 : 28 > db test_num
>
3718 : >skip3186
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 353
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
3718 : ca [ 2] dex
3719 : 10dd [ 4] bpl tora1
371b : a203 [ 2] ldx #3 ;zp
371d : b5be [ 4] tora2 lda zpOR,x
371f : 85b2 [ 3] sta zpt
set_ax absORa,0
> load_flag 0
3721 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
3723 : 48 [ 3]> pha ;use stack to load status
3724 : bd4702 [ 4]> lda absORa,x ;precharge accu
3727 : 28 [ 4]> plp
3728 : 05b2 [ 3] ora zpt
tst_ax absrlo,absflo,0
372a : 08 [ 3]> php ;save flags
372b : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
372e : f002 [ 3]> beq skip3191
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3730 : 00 [ 7]> brk ; Use BRK to return to the monitor
3731 : 28 > db test_num
>
3732 : >skip3191
>
3732 : 68 [ 4]> pla ;load status
> eor_flag 0
3733 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
3735 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
3738 : f002 [ 3]> beq skip3194
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
373a : 00 [ 7]> brk ; Use BRK to return to the monitor
373b : 28 > db test_num
>
373c : >skip3194
>
373c : ca [ 2] dex
373d : 10de [ 3] bpl tora2
373f : a203 [ 2] ldx #3
3741 : b5be [ 4] tora3 lda zpOR,x
3743 : 85b2 [ 3] sta zpt
set_ax absORa,$ff
> load_flag $ff
3745 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
3747 : 48 [ 3]> pha ;use stack to load status
3748 : bd4702 [ 4]> lda absORa,x ;precharge accu
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 354
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
374b : 28 [ 4]> plp
374c : 05b2 [ 3] ora zpt
tst_ax absrlo,absflo,$ff-fnz
374e : 08 [ 3]> php ;save flags
374f : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
3752 : f002 [ 3]> beq skip3199
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3754 : 00 [ 7]> brk ; Use BRK to return to the monitor
3755 : 28 > db test_num
>
3756 : >skip3199
>
3756 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
3757 : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
3759 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
375c : f002 [ 3]> beq skip3202
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
375e : 00 [ 7]> brk ; Use BRK to return to the monitor
375f : 28 > db test_num
>
3760 : >skip3202
>
3760 : ca [ 2] dex
3761 : 10de [ 3] bpl tora3
3763 : a203 [ 2] ldx #3 ;abs
3765 : b5be [ 4] tora4 lda zpOR,x
3767 : 8d0302 [ 4] sta abst
set_ax absORa,0
> load_flag 0
376a : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
376c : 48 [ 3]> pha ;use stack to load status
376d : bd4702 [ 4]> lda absORa,x ;precharge accu
3770 : 28 [ 4]> plp
3771 : 0d0302 [ 4] ora abst
tst_ax absrlo,absflo,0
3774 : 08 [ 3]> php ;save flags
3775 : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
3778 : f002 [ 3]> beq skip3207
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
377a : 00 [ 7]> brk ; Use BRK to return to the monitor
377b : 28 > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 355
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
377c : >skip3207
>
377c : 68 [ 4]> pla ;load status
> eor_flag 0
377d : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
377f : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
3782 : f002 [ 3]> beq skip3210
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3784 : 00 [ 7]> brk ; Use BRK to return to the monitor
3785 : 28 > db test_num
>
3786 : >skip3210
>
3786 : ca [ 2] dex
3787 : 10dc [ 3] bpl tora4
3789 : a203 [ 2] ldx #3
378b : b5be [ 4] tora5 lda zpOR,x
378d : 8d0302 [ 4] sta abst
set_ax absORa,$ff
> load_flag $ff
3790 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
3792 : 48 [ 3]> pha ;use stack to load status
3793 : bd4702 [ 4]> lda absORa,x ;precharge accu
3796 : 28 [ 4]> plp
3797 : 0d0302 [ 4] ora abst
tst_ax absrlo,absflo,$ff-fnz
379a : 08 [ 3]> php ;save flags
379b : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
379e : f002 [ 3]> beq skip3215
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
37a0 : 00 [ 7]> brk ; Use BRK to return to the monitor
37a1 : 28 > db test_num
>
37a2 : >skip3215
>
37a2 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
37a3 : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
37a5 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
37a8 : f002 [ 3]> beq skip3218
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
37aa : 00 [ 7]> brk ; Use BRK to return to the monitor
37ab : 28 > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 356
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
37ac : >skip3218
>
37ac : ca [ 2] dex
37ad : 1002 [ 3] bpl tora6
37af : a203 [ 2] ldx #3 ;zp,x
37b1 : tora6
set_ax absORa,0
> load_flag 0
37b1 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
37b3 : 48 [ 3]> pha ;use stack to load status
37b4 : bd4702 [ 4]> lda absORa,x ;precharge accu
37b7 : 28 [ 4]> plp
37b8 : 15be [ 4] ora zpOR,x
tst_ax absrlo,absflo,0
37ba : 08 [ 3]> php ;save flags
37bb : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
37be : f002 [ 3]> beq skip3223
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
37c0 : 00 [ 7]> brk ; Use BRK to return to the monitor
37c1 : 28 > db test_num
>
37c2 : >skip3223
>
37c2 : 68 [ 4]> pla ;load status
> eor_flag 0
37c3 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
37c5 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
37c8 : f002 [ 3]> beq skip3226
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
37ca : 00 [ 7]> brk ; Use BRK to return to the monitor
37cb : 28 > db test_num
>
37cc : >skip3226
>
37cc : ca [ 2] dex
37cd : 10e2 [ 3] bpl tora6
37cf : a203 [ 2] ldx #3
37d1 : tora7
set_ax absORa,$ff
> load_flag $ff
37d1 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
37d3 : 48 [ 3]> pha ;use stack to load status
37d4 : bd4702 [ 4]> lda absORa,x ;precharge accu
37d7 : 28 [ 4]> plp
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 357
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
37d8 : 15be [ 4] ora zpOR,x
tst_ax absrlo,absflo,$ff-fnz
37da : 08 [ 3]> php ;save flags
37db : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
37de : f002 [ 3]> beq skip3231
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
37e0 : 00 [ 7]> brk ; Use BRK to return to the monitor
37e1 : 28 > db test_num
>
37e2 : >skip3231
>
37e2 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
37e3 : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
37e5 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
37e8 : f002 [ 3]> beq skip3234
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
37ea : 00 [ 7]> brk ; Use BRK to return to the monitor
37eb : 28 > db test_num
>
37ec : >skip3234
>
37ec : ca [ 2] dex
37ed : 10e2 [ 3] bpl tora7
37ef : a203 [ 2] ldx #3 ;abs,x
37f1 : tora8
set_ax absORa,0
> load_flag 0
37f1 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
37f3 : 48 [ 3]> pha ;use stack to load status
37f4 : bd4702 [ 4]> lda absORa,x ;precharge accu
37f7 : 28 [ 4]> plp
37f8 : 1d3b02 [ 4] ora absOR,x
tst_ax absrlo,absflo,0
37fb : 08 [ 3]> php ;save flags
37fc : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
37ff : f002 [ 4]> beq skip3239
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3801 : 00 [ 7]> brk ; Use BRK to return to the monitor
3802 : 28 > db test_num
>
3803 : >skip3239
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 358
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3803 : 68 [ 4]> pla ;load status
> eor_flag 0
3804 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
3806 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
3809 : f002 [ 3]> beq skip3242
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
380b : 00 [ 7]> brk ; Use BRK to return to the monitor
380c : 28 > db test_num
>
380d : >skip3242
>
380d : ca [ 2] dex
380e : 10e1 [ 4] bpl tora8
3810 : a203 [ 2] ldx #3
3812 : tora9
set_ax absORa,$ff
> load_flag $ff
3812 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
3814 : 48 [ 3]> pha ;use stack to load status
3815 : bd4702 [ 4]> lda absORa,x ;precharge accu
3818 : 28 [ 4]> plp
3819 : 1d3b02 [ 4] ora absOR,x
tst_ax absrlo,absflo,$ff-fnz
381c : 08 [ 3]> php ;save flags
381d : dd5302 [ 4]> cmp absrlo,x ;test result
> trap_ne
3820 : f002 [ 3]> beq skip3247
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3822 : 00 [ 7]> brk ; Use BRK to return to the monitor
3823 : 28 > db test_num
>
3824 : >skip3247
>
3824 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
3825 : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
3827 : dd5702 [ 4]> cmp absflo,x ;test flags
> trap_ne ;
382a : f002 [ 3]> beq skip3250
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
382c : 00 [ 7]> brk ; Use BRK to return to the monitor
382d : 28 > db test_num
>
382e : >skip3250
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 359
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
382e : ca [ 2] dex
382f : 10e1 [ 3] bpl tora9
3831 : a003 [ 2] ldy #3 ;abs,y
3833 : tora10
set_ay absORa,0
> load_flag 0
3833 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
3835 : 48 [ 3]> pha ;use stack to load status
3836 : b94702 [ 4]> lda absORa,y ;precharge accu
3839 : 28 [ 4]> plp
383a : 193b02 [ 4] ora absOR,y
tst_ay absrlo,absflo,0
383d : 08 [ 3]> php ;save flags
383e : d95302 [ 4]> cmp absrlo,y ;test result
> trap_ne ;
3841 : f002 [ 3]> beq skip3255
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3843 : 00 [ 7]> brk ; Use BRK to return to the monitor
3844 : 28 > db test_num
>
3845 : >skip3255
>
3845 : 68 [ 4]> pla ;load status
> eor_flag 0
3846 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
3848 : d95702 [ 4]> cmp absflo,y ;test flags
> trap_ne
384b : f002 [ 3]> beq skip3258
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
384d : 00 [ 7]> brk ; Use BRK to return to the monitor
384e : 28 > db test_num
>
384f : >skip3258
>
384f : 88 [ 2] dey
3850 : 10e1 [ 3] bpl tora10
3852 : a003 [ 2] ldy #3
3854 : tora11
set_ay absORa,$ff
> load_flag $ff
3854 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
3856 : 48 [ 3]> pha ;use stack to load status
3857 : b94702 [ 4]> lda absORa,y ;precharge accu
385a : 28 [ 4]> plp
385b : 193b02 [ 4] ora absOR,y
tst_ay absrlo,absflo,$ff-fnz
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 360
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
385e : 08 [ 3]> php ;save flags
385f : d95302 [ 4]> cmp absrlo,y ;test result
> trap_ne ;
3862 : f002 [ 3]> beq skip3263
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3864 : 00 [ 7]> brk ; Use BRK to return to the monitor
3865 : 28 > db test_num
>
3866 : >skip3263
>
3866 : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
3867 : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
3869 : d95702 [ 4]> cmp absflo,y ;test flags
> trap_ne
386c : f002 [ 3]> beq skip3266
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
386e : 00 [ 7]> brk ; Use BRK to return to the monitor
386f : 28 > db test_num
>
3870 : >skip3266
>
3870 : 88 [ 2] dey
3871 : 10e1 [ 3] bpl tora11
3873 : a206 [ 2] ldx #6 ;(zp,x)
3875 : a003 [ 2] ldy #3
3877 : tora12
set_ay absORa,0
> load_flag 0
3877 : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
3879 : 48 [ 3]> pha ;use stack to load status
387a : b94702 [ 4]> lda absORa,y ;precharge accu
387d : 28 [ 4]> plp
387e : 01f0 [ 6] ora (indOR,x)
tst_ay absrlo,absflo,0
3880 : 08 [ 3]> php ;save flags
3881 : d95302 [ 4]> cmp absrlo,y ;test result
> trap_ne ;
3884 : f002 [ 3]> beq skip3271
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3886 : 00 [ 7]> brk ; Use BRK to return to the monitor
3887 : 28 > db test_num
>
3888 : >skip3271
>
3888 : 68 [ 4]> pla ;load status
> eor_flag 0
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 361
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3889 : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
388b : d95702 [ 4]> cmp absflo,y ;test flags
> trap_ne
388e : f002 [ 3]> beq skip3274
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3890 : 00 [ 7]> brk ; Use BRK to return to the monitor
3891 : 28 > db test_num
>
3892 : >skip3274
>
3892 : ca [ 2] dex
3893 : ca [ 2] dex
3894 : 88 [ 2] dey
3895 : 10e0 [ 3] bpl tora12
3897 : a206 [ 2] ldx #6
3899 : a003 [ 2] ldy #3
389b : tora13
set_ay absORa,$ff
> load_flag $ff
389b : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
389d : 48 [ 3]> pha ;use stack to load status
389e : b94702 [ 4]> lda absORa,y ;precharge accu
38a1 : 28 [ 4]> plp
38a2 : 01f0 [ 6] ora (indOR,x)
tst_ay absrlo,absflo,$ff-fnz
38a4 : 08 [ 3]> php ;save flags
38a5 : d95302 [ 4]> cmp absrlo,y ;test result
> trap_ne ;
38a8 : f002 [ 3]> beq skip3279
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
38aa : 00 [ 7]> brk ; Use BRK to return to the monitor
38ab : 28 > db test_num
>
38ac : >skip3279
>
38ac : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
38ad : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
38af : d95702 [ 4]> cmp absflo,y ;test flags
> trap_ne
38b2 : f002 [ 3]> beq skip3282
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
38b4 : 00 [ 7]> brk ; Use BRK to return to the monitor
38b5 : 28 > db test_num
>
38b6 : >skip3282
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 362
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
38b6 : ca [ 2] dex
38b7 : ca [ 2] dex
38b8 : 88 [ 2] dey
38b9 : 10e0 [ 3] bpl tora13
38bb : a003 [ 2] ldy #3 ;(zp),y
38bd : tora14
set_ay absORa,0
> load_flag 0
38bd : a900 [ 2]> lda #0 ;allow test to change I-flag (no mask)
>
38bf : 48 [ 3]> pha ;use stack to load status
38c0 : b94702 [ 4]> lda absORa,y ;precharge accu
38c3 : 28 [ 4]> plp
38c4 : 11f0 [ 5] ora (indOR),y
tst_ay absrlo,absflo,0
38c6 : 08 [ 3]> php ;save flags
38c7 : d95302 [ 4]> cmp absrlo,y ;test result
> trap_ne ;
38ca : f002 [ 3]> beq skip3287
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
38cc : 00 [ 7]> brk ; Use BRK to return to the monitor
38cd : 28 > db test_num
>
38ce : >skip3287
>
38ce : 68 [ 4]> pla ;load status
> eor_flag 0
38cf : 4930 [ 2]> eor #0|fao ;invert expected flags + always on bits
>
38d1 : d95702 [ 4]> cmp absflo,y ;test flags
> trap_ne
38d4 : f002 [ 3]> beq skip3290
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
38d6 : 00 [ 7]> brk ; Use BRK to return to the monitor
38d7 : 28 > db test_num
>
38d8 : >skip3290
>
38d8 : 88 [ 2] dey
38d9 : 10e2 [ 3] bpl tora14
38db : a003 [ 2] ldy #3
38dd : tora15
set_ay absORa,$ff
> load_flag $ff
38dd : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
38df : 48 [ 3]> pha ;use stack to load status
38e0 : b94702 [ 4]> lda absORa,y ;precharge accu
38e3 : 28 [ 4]> plp
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 363
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
38e4 : 11f0 [ 5] ora (indOR),y
tst_ay absrlo,absflo,$ff-fnz
38e6 : 08 [ 3]> php ;save flags
38e7 : d95302 [ 4]> cmp absrlo,y ;test result
> trap_ne ;
38ea : f002 [ 3]> beq skip3295
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
38ec : 00 [ 7]> brk ; Use BRK to return to the monitor
38ed : 28 > db test_num
>
38ee : >skip3295
>
38ee : 68 [ 4]> pla ;load status
> eor_flag $ff-fnz
38ef : 497d [ 2]> eor #$ff-fnz|fao ;invert expected flags + always on bits
>
38f1 : d95702 [ 4]> cmp absflo,y ;test flags
> trap_ne
38f4 : f002 [ 3]> beq skip3298
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
38f6 : 00 [ 7]> brk ; Use BRK to return to the monitor
38f7 : 28 > db test_num
>
38f8 : >skip3298
>
38f8 : 88 [ 2] dey
38f9 : 10e2 [ 3] bpl tora15
if I_flag = 3
38fb : 58 [ 2] cli
endif
38fc : bin_test
if skip_bin_test = 1
jmp dec_test
else
38fc : a928 [ 2] lda #test_num
38fe : 8d0002 [ 4] sta test_case
endif
next_test
3901 : ad0002 [ 4]> lda test_case ;previous test
3904 : c928 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
3906 : f002 [ 3]> beq skip3301
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 364
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3908 : 00 [ 7]> brk ; Use BRK to return to the monitor
3909 : 28 > db test_num
>
390a : >skip3301
>
0029 = >test_num = test_num + 1
390a : a929 [ 2]> lda #test_num ;*** this tests' number
390c : 8d0002 [ 4]> 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
390f : d8 [ 2] cld
3910 : a2b4 [ 2] ldx #ad2 ;for indexed test
3912 : a0ff [ 2] ldy #$ff ;max range
3914 : a900 [ 2] lda #0 ;start with adding zeroes & no carry
3916 : 85b2 [ 3] sta adfc ;carry in - for diag
3918 : 85b3 [ 3] sta ad1 ;operand 1 - accumulator
391a : 85b4 [ 3] sta ad2 ;operand 2 - memory or immediate
391c : 8d0302 [ 4] sta ada2 ;non zp
391f : 85b5 [ 3] sta adrl ;expected result bits 0-7
3921 : 85b6 [ 3] sta adrh ;expected result bit 8 (carry out)
3923 : a9ff [ 2] lda #$ff ;complemented operand 2 for subtract
3925 : 85b8 [ 3] sta sb2
3927 : 8d0402 [ 4] sta sba2 ;non zp
392a : a902 [ 2] lda #2 ;expected Z-flag
392c : 85b7 [ 3] sta adrf
392e : 18 [ 2] tadd clc ;test with carry clear
392f : 20903b [ 6] jsr chkadd
3932 : e6b2 [ 5] inc adfc ;now with carry
3934 : e6b5 [ 5] inc adrl ;result +1
3936 : 08 [ 3] php ;save N & Z from low result
3937 : 08 [ 3] php
3938 : 68 [ 4] pla ;accu holds expected flags
3939 : 2982 [ 2] and #$82 ;mask N & Z
393b : 28 [ 4] plp
393c : d002 [ 3] bne tadd1
393e : e6b6 [ 5] inc adrh ;result bit 8 - carry
3940 : 05b6 [ 3] tadd1 ora adrh ;merge C to expected flags
3942 : 85b7 [ 3] sta adrf ;save expected flags except overflow
3944 : 38 [ 2] sec ;test with carry set
3945 : 20903b [ 6] jsr chkadd
3948 : c6b2 [ 5] dec adfc ;same for operand +1 but no carry
394a : e6b3 [ 5] inc ad1
394c : d0e0 [ 3] bne tadd ;iterate op1
394e : a900 [ 2] lda #0 ;preset result to op2 when op1 = 0
3950 : 85b6 [ 3] sta adrh
3952 : ee0302 [ 6] inc ada2
3955 : e6b4 [ 5] inc ad2
3957 : 08 [ 3] php ;save NZ as operand 2 becomes the new result
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 365
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3958 : 68 [ 4] pla
3959 : 2982 [ 2] and #$82 ;mask N00000Z0
395b : 85b7 [ 3] sta adrf ;no need to check carry as we are adding to 0
395d : c6b8 [ 5] dec sb2 ;complement subtract operand 2
395f : ce0402 [ 6] dec sba2
3962 : a5b4 [ 3] lda ad2
3964 : 85b5 [ 3] sta adrl
3966 : d0c6 [ 3] bne tadd ;iterate op2
3968 : dec_test
if skip_dec_test = 1
success
else
3968 : a929 [ 2] lda #test_num
396a : 8d0002 [ 4] sta test_case
endif
next_test
396d : ad0002 [ 4]> lda test_case ;previous test
3970 : c929 [ 2]> cmp #test_num
> trap_ne ;test is out of sequence
3972 : f002 [ 3]> beq skip3304
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3974 : 00 [ 7]> brk ; Use BRK to return to the monitor
3975 : 29 > db test_num
>
3976 : >skip3304
>
002a = >test_num = test_num + 1
3976 : a92a [ 2]> lda #test_num ;*** this tests' number
3978 : 8d0002 [ 4]> sta test_case
> ;check_ram ;uncomment to find altered RAM after each test
; decimal add/subtract test
; *** WARNING - tests documented behavior only! ***
; only valid BCD operands are tested, N V Z flags are ignored
; iterates through all valid combinations of operands and carry input
; uses increments/decrements to predict result & carry flag
397b : f8 [ 2] sed
397c : a2b4 [ 2] ldx #ad2 ;for indexed test
397e : a0ff [ 2] ldy #$ff ;max range
3980 : a999 [ 2] lda #$99 ;start with adding 99 to 99 with carry
3982 : 85b3 [ 3] sta ad1 ;operand 1 - accumulator
3984 : 85b4 [ 3] sta ad2 ;operand 2 - memory or immediate
3986 : 8d0302 [ 4] sta ada2 ;non zp
3989 : 85b5 [ 3] sta adrl ;expected result bits 0-7
398b : a901 [ 2] lda #1 ;set carry in & out
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 366
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
398d : 85b2 [ 3] sta adfc ;carry in - for diag
398f : 85b6 [ 3] sta adrh ;expected result bit 8 (carry out)
3991 : a900 [ 2] lda #0 ;complemented operand 2 for subtract
3993 : 85b8 [ 3] sta sb2
3995 : 8d0402 [ 4] sta sba2 ;non zp
3998 : 38 [ 2] tdad sec ;test with carry set
3999 : 201f3a [ 6] jsr chkdad
399c : c6b2 [ 5] dec adfc ;now with carry clear
399e : a5b5 [ 3] lda adrl ;decimal adjust result
39a0 : d008 [ 3] bne tdad1 ;skip clear carry & preset result 99 (9A-1)
39a2 : c6b6 [ 5] dec adrh
39a4 : a999 [ 2] lda #$99
39a6 : 85b5 [ 3] sta adrl
39a8 : d012 [ 3] bne tdad3
39aa : 290f [ 2] tdad1 and #$f ;lower nibble mask
39ac : d00c [ 3] bne tdad2 ;no decimal adjust needed
39ae : c6b5 [ 5] dec adrl ;decimal adjust (?0-6)
39b0 : c6b5 [ 5] dec adrl
39b2 : c6b5 [ 5] dec adrl
39b4 : c6b5 [ 5] dec adrl
39b6 : c6b5 [ 5] dec adrl
39b8 : c6b5 [ 5] dec adrl
39ba : c6b5 [ 5] tdad2 dec adrl ;result -1
39bc : 18 [ 2] tdad3 clc ;test with carry clear
39bd : 201f3a [ 6] jsr chkdad
39c0 : e6b2 [ 5] inc adfc ;same for operand -1 but with carry
39c2 : a5b3 [ 3] lda ad1 ;decimal adjust operand 1
39c4 : f015 [ 3] beq tdad5 ;iterate operand 2
39c6 : 290f [ 2] and #$f ;lower nibble mask
39c8 : d00c [ 3] bne tdad4 ;skip decimal adjust
39ca : c6b3 [ 5] dec ad1 ;decimal adjust (?0-6)
39cc : c6b3 [ 5] dec ad1
39ce : c6b3 [ 5] dec ad1
39d0 : c6b3 [ 5] dec ad1
39d2 : c6b3 [ 5] dec ad1
39d4 : c6b3 [ 5] dec ad1
39d6 : c6b3 [ 5] tdad4 dec ad1 ;operand 1 -1
39d8 : 4c9839 [ 3] jmp tdad ;iterate op1
39db : a999 [ 2] tdad5 lda #$99 ;precharge op1 max
39dd : 85b3 [ 3] sta ad1
39df : a5b4 [ 3] lda ad2 ;decimal adjust operand 2
39e1 : f030 [ 4] beq tdad7 ;end of iteration
39e3 : 290f [ 2] and #$f ;lower nibble mask
39e5 : d018 [ 3] bne tdad6 ;skip decimal adjust
39e7 : c6b4 [ 5] dec ad2 ;decimal adjust (?0-6)
39e9 : c6b4 [ 5] dec ad2
39eb : c6b4 [ 5] dec ad2
39ed : c6b4 [ 5] dec ad2
39ef : c6b4 [ 5] dec ad2
39f1 : c6b4 [ 5] dec ad2
39f3 : e6b8 [ 5] inc sb2 ;complemented decimal adjust for subtract (?9+6)
39f5 : e6b8 [ 5] inc sb2
39f7 : e6b8 [ 5] inc sb2
39f9 : e6b8 [ 5] inc sb2
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 367
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
39fb : e6b8 [ 5] inc sb2
39fd : e6b8 [ 5] inc sb2
39ff : c6b4 [ 5] tdad6 dec ad2 ;operand 2 -1
3a01 : e6b8 [ 5] inc sb2 ;complemented operand for subtract
3a03 : a5b8 [ 3] lda sb2
3a05 : 8d0402 [ 4] sta sba2 ;copy as non zp operand
3a08 : a5b4 [ 3] lda ad2
3a0a : 8d0302 [ 4] sta ada2 ;copy as non zp operand
3a0d : 85b5 [ 3] sta adrl ;new result since op1+carry=00+carry +op2=op2
3a0f : e6b6 [ 5] inc adrh ;result carry
3a11 : d085 [ 4] bne tdad ;iterate op2
3a13 : d8 [ 2] tdad7 cld
3a14 : ad0002 [ 4] lda test_case
3a17 : c92a [ 2] cmp #test_num
trap_ne ;test is out of sequence
3a19 : f002 [ 3]> beq skip3306
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3a1b : 00 [ 7]> brk ; Use BRK to return to the monitor
3a1c : 2a > db test_num
>
3a1d : >skip3306
; final RAM integrity test
; verifies that none of the previous tests has altered RAM outside of the
; designated write areas.
check_ram
> ;RAM check disabled - RAM size not set
; *** DEBUG INFO ***
;
; to debug checksum errors uncomment check_ram in the next_test macro to
; narrow down the responsible opcode.
; may give false errors when monitor, OS or other background activity is
; allowed during previous tests.
; S U C C E S S ************************************************
; -------------
;success jmp start ;if you get here everything went well
success
3a1d : 00 [ 7]> brk
3a1e : 2b > db test_num+1
; -------------
; S U C C E S S ************************************************
; 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
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 368
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
; iterates through all valid combinations of operands and carry input
; uses increments/decrements to predict result & carry flag
3a1f : chkdad
; decimal ADC / SBC zp
3a1f : 08 [ 3] php ;save carry for subtract
3a20 : a5b3 [ 3] lda ad1
3a22 : 65b4 [ 3] adc ad2 ;perform add
3a24 : 08 [ 3] php
3a25 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3a27 : f002 [ 3]> beq skip3310
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3a29 : 00 [ 7]> brk ; Use BRK to return to the monitor
3a2a : 2a > db test_num
>
3a2b : >skip3310
3a2b : 68 [ 4] pla ;check flags
3a2c : 2901 [ 2] and #1 ;mask carry
3a2e : c5b6 [ 3] cmp adrh
trap_ne ;bad carry
3a30 : f002 [ 3]> beq skip3312
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3a32 : 00 [ 7]> brk ; Use BRK to return to the monitor
3a33 : 2a > db test_num
>
3a34 : >skip3312
3a34 : 28 [ 4] plp
3a35 : 08 [ 3] php ;save carry for next add
3a36 : a5b3 [ 3] lda ad1
3a38 : e5b8 [ 3] sbc sb2 ;perform subtract
3a3a : 08 [ 3] php
3a3b : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3a3d : f002 [ 3]> beq skip3314
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3a3f : 00 [ 7]> brk ; Use BRK to return to the monitor
3a40 : 2a > db test_num
>
3a41 : >skip3314
3a41 : 68 [ 4] pla ;check flags
3a42 : 2901 [ 2] and #1 ;mask carry
3a44 : c5b6 [ 3] cmp adrh
trap_ne ;bad flags
3a46 : f002 [ 3]> beq skip3316
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 369
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3a48 : 00 [ 7]> brk ; Use BRK to return to the monitor
3a49 : 2a > db test_num
>
3a4a : >skip3316
3a4a : 28 [ 4] plp
; decimal ADC / SBC abs
3a4b : 08 [ 3] php ;save carry for subtract
3a4c : a5b3 [ 3] lda ad1
3a4e : 6d0302 [ 4] adc ada2 ;perform add
3a51 : 08 [ 3] php
3a52 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3a54 : f002 [ 3]> beq skip3318
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3a56 : 00 [ 7]> brk ; Use BRK to return to the monitor
3a57 : 2a > db test_num
>
3a58 : >skip3318
3a58 : 68 [ 4] pla ;check flags
3a59 : 2901 [ 2] and #1 ;mask carry
3a5b : c5b6 [ 3] cmp adrh
trap_ne ;bad carry
3a5d : f002 [ 3]> beq skip3320
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3a5f : 00 [ 7]> brk ; Use BRK to return to the monitor
3a60 : 2a > db test_num
>
3a61 : >skip3320
3a61 : 28 [ 4] plp
3a62 : 08 [ 3] php ;save carry for next add
3a63 : a5b3 [ 3] lda ad1
3a65 : ed0402 [ 4] sbc sba2 ;perform subtract
3a68 : 08 [ 3] php
3a69 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3a6b : f002 [ 3]> beq skip3322
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3a6d : 00 [ 7]> brk ; Use BRK to return to the monitor
3a6e : 2a > db test_num
>
3a6f : >skip3322
3a6f : 68 [ 4] pla ;check flags
3a70 : 2901 [ 2] and #1 ;mask carry
3a72 : c5b6 [ 3] cmp adrh
trap_ne ;bad carry
3a74 : f002 [ 3]> beq skip3324
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 370
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3a76 : 00 [ 7]> brk ; Use BRK to return to the monitor
3a77 : 2a > db test_num
>
3a78 : >skip3324
3a78 : 28 [ 4] plp
; decimal ADC / SBC #
3a79 : 08 [ 3] php ;save carry for subtract
3a7a : a5b4 [ 3] lda ad2
3a7c : 8d823a [ 4] sta chkdadi ;self modify immediate
3a7f : a5b3 [ 3] lda ad1
3a82 = chkdadi = * + 1 ;operand of the immediate ADC
3a81 : 6900 [ 2] adc #0 ;perform add
3a83 : 08 [ 3] php
3a84 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3a86 : f002 [ 3]> beq skip3326
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3a88 : 00 [ 7]> brk ; Use BRK to return to the monitor
3a89 : 2a > db test_num
>
3a8a : >skip3326
3a8a : 68 [ 4] pla ;check flags
3a8b : 2901 [ 2] and #1 ;mask carry
3a8d : c5b6 [ 3] cmp adrh
trap_ne ;bad carry
3a8f : f002 [ 3]> beq skip3328
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3a91 : 00 [ 7]> brk ; Use BRK to return to the monitor
3a92 : 2a > db test_num
>
3a93 : >skip3328
3a93 : 28 [ 4] plp
3a94 : 08 [ 3] php ;save carry for next add
3a95 : a5b8 [ 3] lda sb2
3a97 : 8d9d3a [ 4] sta chkdsbi ;self modify immediate
3a9a : a5b3 [ 3] lda ad1
3a9d = chkdsbi = * + 1 ;operand of the immediate SBC
3a9c : e900 [ 2] sbc #0 ;perform subtract
3a9e : 08 [ 3] php
3a9f : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3aa1 : f002 [ 3]> beq skip3330
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 371
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3aa3 : 00 [ 7]> brk ; Use BRK to return to the monitor
3aa4 : 2a > db test_num
>
3aa5 : >skip3330
3aa5 : 68 [ 4] pla ;check flags
3aa6 : 2901 [ 2] and #1 ;mask carry
3aa8 : c5b6 [ 3] cmp adrh
trap_ne ;bad carry
3aaa : f002 [ 3]> beq skip3332
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3aac : 00 [ 7]> brk ; Use BRK to return to the monitor
3aad : 2a > db test_num
>
3aae : >skip3332
3aae : 28 [ 4] plp
; decimal ADC / SBC zp,x
3aaf : 08 [ 3] php ;save carry for subtract
3ab0 : a5b3 [ 3] lda ad1
3ab2 : 7500 [ 4] adc 0,x ;perform add
3ab4 : 08 [ 3] php
3ab5 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3ab7 : f002 [ 3]> beq skip3334
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3ab9 : 00 [ 7]> brk ; Use BRK to return to the monitor
3aba : 2a > db test_num
>
3abb : >skip3334
3abb : 68 [ 4] pla ;check flags
3abc : 2901 [ 2] and #1 ;mask carry
3abe : c5b6 [ 3] cmp adrh
trap_ne ;bad carry
3ac0 : f002 [ 3]> beq skip3336
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3ac2 : 00 [ 7]> brk ; Use BRK to return to the monitor
3ac3 : 2a > db test_num
>
3ac4 : >skip3336
3ac4 : 28 [ 4] plp
3ac5 : 08 [ 3] php ;save carry for next add
3ac6 : a5b3 [ 3] lda ad1
3ac8 : f504 [ 4] sbc sb2-ad2,x ;perform subtract
3aca : 08 [ 3] php
3acb : c5b5 [ 3] cmp adrl ;check result
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 372
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
trap_ne ;bad result
3acd : f002 [ 3]> beq skip3338
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3acf : 00 [ 7]> brk ; Use BRK to return to the monitor
3ad0 : 2a > db test_num
>
3ad1 : >skip3338
3ad1 : 68 [ 4] pla ;check flags
3ad2 : 2901 [ 2] and #1 ;mask carry
3ad4 : c5b6 [ 3] cmp adrh
trap_ne ;bad carry
3ad6 : f002 [ 3]> beq skip3340
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3ad8 : 00 [ 7]> brk ; Use BRK to return to the monitor
3ad9 : 2a > db test_num
>
3ada : >skip3340
3ada : 28 [ 4] plp
; decimal ADC / SBC abs,x
3adb : 08 [ 3] php ;save carry for subtract
3adc : a5b3 [ 3] lda ad1
3ade : 7d4f01 [ 4] adc ada2-ad2,x ;perform add
3ae1 : 08 [ 3] php
3ae2 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3ae4 : f002 [ 3]> beq skip3342
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3ae6 : 00 [ 7]> brk ; Use BRK to return to the monitor
3ae7 : 2a > db test_num
>
3ae8 : >skip3342
3ae8 : 68 [ 4] pla ;check flags
3ae9 : 2901 [ 2] and #1 ;mask carry
3aeb : c5b6 [ 3] cmp adrh
trap_ne ;bad carry
3aed : f002 [ 3]> beq skip3344
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3aef : 00 [ 7]> brk ; Use BRK to return to the monitor
3af0 : 2a > db test_num
>
3af1 : >skip3344
3af1 : 28 [ 4] plp
3af2 : 08 [ 3] php ;save carry for next add
3af3 : a5b3 [ 3] lda ad1
3af5 : fd5001 [ 4] sbc sba2-ad2,x ;perform subtract
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 373
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3af8 : 08 [ 3] php
3af9 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3afb : f002 [ 3]> beq skip3346
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3afd : 00 [ 7]> brk ; Use BRK to return to the monitor
3afe : 2a > db test_num
>
3aff : >skip3346
3aff : 68 [ 4] pla ;check flags
3b00 : 2901 [ 2] and #1 ;mask carry
3b02 : c5b6 [ 3] cmp adrh
trap_ne ;bad carry
3b04 : f002 [ 3]> beq skip3348
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3b06 : 00 [ 7]> brk ; Use BRK to return to the monitor
3b07 : 2a > db test_num
>
3b08 : >skip3348
3b08 : 28 [ 4] plp
; decimal ADC / SBC abs,y
3b09 : 08 [ 3] php ;save carry for subtract
3b0a : a5b3 [ 3] lda ad1
3b0c : 790401 [ 4] adc ada2-$ff,y ;perform add
3b0f : 08 [ 3] php
3b10 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3b12 : f002 [ 3]> beq skip3350
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3b14 : 00 [ 7]> brk ; Use BRK to return to the monitor
3b15 : 2a > db test_num
>
3b16 : >skip3350
3b16 : 68 [ 4] pla ;check flags
3b17 : 2901 [ 2] and #1 ;mask carry
3b19 : c5b6 [ 3] cmp adrh
trap_ne ;bad carry
3b1b : f002 [ 3]> beq skip3352
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3b1d : 00 [ 7]> brk ; Use BRK to return to the monitor
3b1e : 2a > db test_num
>
3b1f : >skip3352
3b1f : 28 [ 4] plp
3b20 : 08 [ 3] php ;save carry for next add
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 374
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3b21 : a5b3 [ 3] lda ad1
3b23 : f90501 [ 4] sbc sba2-$ff,y ;perform subtract
3b26 : 08 [ 3] php
3b27 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3b29 : f002 [ 3]> beq skip3354
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3b2b : 00 [ 7]> brk ; Use BRK to return to the monitor
3b2c : 2a > db test_num
>
3b2d : >skip3354
3b2d : 68 [ 4] pla ;check flags
3b2e : 2901 [ 2] and #1 ;mask carry
3b30 : c5b6 [ 3] cmp adrh
trap_ne ;bad carry
3b32 : f002 [ 3]> beq skip3356
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3b34 : 00 [ 7]> brk ; Use BRK to return to the monitor
3b35 : 2a > db test_num
>
3b36 : >skip3356
3b36 : 28 [ 4] plp
; decimal ADC / SBC (zp,x)
3b37 : 08 [ 3] php ;save carry for subtract
3b38 : a5b3 [ 3] lda ad1
3b3a : 6144 [ 6] adc (lo adi2-ad2,x) ;perform add
3b3c : 08 [ 3] php
3b3d : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3b3f : f002 [ 3]> beq skip3358
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3b41 : 00 [ 7]> brk ; Use BRK to return to the monitor
3b42 : 2a > db test_num
>
3b43 : >skip3358
3b43 : 68 [ 4] pla ;check flags
3b44 : 2901 [ 2] and #1 ;mask carry
3b46 : c5b6 [ 3] cmp adrh
trap_ne ;bad carry
3b48 : f002 [ 3]> beq skip3360
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3b4a : 00 [ 7]> brk ; Use BRK to return to the monitor
3b4b : 2a > db test_num
>
3b4c : >skip3360
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 375
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3b4c : 28 [ 4] plp
3b4d : 08 [ 3] php ;save carry for next add
3b4e : a5b3 [ 3] lda ad1
3b50 : e146 [ 6] sbc (lo sbi2-ad2,x) ;perform subtract
3b52 : 08 [ 3] php
3b53 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3b55 : f002 [ 3]> beq skip3362
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3b57 : 00 [ 7]> brk ; Use BRK to return to the monitor
3b58 : 2a > db test_num
>
3b59 : >skip3362
3b59 : 68 [ 4] pla ;check flags
3b5a : 2901 [ 2] and #1 ;mask carry
3b5c : c5b6 [ 3] cmp adrh
trap_ne ;bad carry
3b5e : f002 [ 3]> beq skip3364
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3b60 : 00 [ 7]> brk ; Use BRK to return to the monitor
3b61 : 2a > db test_num
>
3b62 : >skip3364
3b62 : 28 [ 4] plp
; decimal ADC / SBC (abs),y
3b63 : 08 [ 3] php ;save carry for subtract
3b64 : a5b3 [ 3] lda ad1
3b66 : 71fc [ 5] adc (adiy2),y ;perform add
3b68 : 08 [ 3] php
3b69 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3b6b : f002 [ 3]> beq skip3366
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3b6d : 00 [ 7]> brk ; Use BRK to return to the monitor
3b6e : 2a > db test_num
>
3b6f : >skip3366
3b6f : 68 [ 4] pla ;check flags
3b70 : 2901 [ 2] and #1 ;mask carry
3b72 : c5b6 [ 3] cmp adrh
trap_ne ;bad carry
3b74 : f002 [ 3]> beq skip3368
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3b76 : 00 [ 7]> brk ; Use BRK to return to the monitor
3b77 : 2a > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 376
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3b78 : >skip3368
3b78 : 28 [ 4] plp
3b79 : 08 [ 3] php ;save carry for next add
3b7a : a5b3 [ 3] lda ad1
3b7c : f1fe [ 5] sbc (sbiy2),y ;perform subtract
3b7e : 08 [ 3] php
3b7f : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3b81 : f002 [ 3]> beq skip3370
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3b83 : 00 [ 7]> brk ; Use BRK to return to the monitor
3b84 : 2a > db test_num
>
3b85 : >skip3370
3b85 : 68 [ 4] pla ;check flags
3b86 : 2901 [ 2] and #1 ;mask carry
3b88 : c5b6 [ 3] cmp adrh
trap_ne ;bad carry
3b8a : f002 [ 3]> beq skip3372
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3b8c : 00 [ 7]> brk ; Use BRK to return to the monitor
3b8d : 2a > db test_num
>
3b8e : >skip3372
3b8e : 28 [ 4] plp
3b8f : 60 [ 6] 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
3b90 : a5b7 [ 3] chkadd lda adrf ;add V-flag if overflow
3b92 : 2983 [ 2] and #$83 ;keep N-----ZC / clear V
3b94 : 48 [ 3] pha
3b95 : a5b3 [ 3] lda ad1 ;test sign unequal between operands
3b97 : 45b4 [ 3] eor ad2
3b99 : 300a [ 3] bmi ckad1 ;no overflow possible - operands have different sign
3b9b : a5b3 [ 3] lda ad1 ;test sign equal between operands and result
3b9d : 45b5 [ 3] eor adrl
3b9f : 1004 [ 3] bpl ckad1 ;no overflow occured - operand and result have same sign
3ba1 : 68 [ 4] pla
3ba2 : 0940 [ 2] ora #$40 ;set V
3ba4 : 48 [ 3] pha
3ba5 : 68 [ 4] ckad1 pla
3ba6 : 85b7 [ 3] sta adrf ;save expected flags
; binary ADC / SBC zp
3ba8 : 08 [ 3] php ;save carry for subtract
3ba9 : a5b3 [ 3] lda ad1
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 377
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3bab : 65b4 [ 3] adc ad2 ;perform add
3bad : 08 [ 3] php
3bae : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3bb0 : f002 [ 3]> beq skip3374
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3bb2 : 00 [ 7]> brk ; Use BRK to return to the monitor
3bb3 : 2a > db test_num
>
3bb4 : >skip3374
3bb4 : 68 [ 4] pla ;check flags
3bb5 : 29c3 [ 2] and #$c3 ;mask NV----ZC
3bb7 : c5b7 [ 3] cmp adrf
trap_ne ;bad flags
3bb9 : f002 [ 3]> beq skip3376
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3bbb : 00 [ 7]> brk ; Use BRK to return to the monitor
3bbc : 2a > db test_num
>
3bbd : >skip3376
3bbd : 28 [ 4] plp
3bbe : 08 [ 3] php ;save carry for next add
3bbf : a5b3 [ 3] lda ad1
3bc1 : e5b8 [ 3] sbc sb2 ;perform subtract
3bc3 : 08 [ 3] php
3bc4 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3bc6 : f002 [ 3]> beq skip3378
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3bc8 : 00 [ 7]> brk ; Use BRK to return to the monitor
3bc9 : 2a > db test_num
>
3bca : >skip3378
3bca : 68 [ 4] pla ;check flags
3bcb : 29c3 [ 2] and #$c3 ;mask NV----ZC
3bcd : c5b7 [ 3] cmp adrf
trap_ne ;bad flags
3bcf : f002 [ 3]> beq skip3380
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3bd1 : 00 [ 7]> brk ; Use BRK to return to the monitor
3bd2 : 2a > db test_num
>
3bd3 : >skip3380
3bd3 : 28 [ 4] plp
; binary ADC / SBC abs
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 378
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3bd4 : 08 [ 3] php ;save carry for subtract
3bd5 : a5b3 [ 3] lda ad1
3bd7 : 6d0302 [ 4] adc ada2 ;perform add
3bda : 08 [ 3] php
3bdb : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3bdd : f002 [ 3]> beq skip3382
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3bdf : 00 [ 7]> brk ; Use BRK to return to the monitor
3be0 : 2a > db test_num
>
3be1 : >skip3382
3be1 : 68 [ 4] pla ;check flags
3be2 : 29c3 [ 2] and #$c3 ;mask NV----ZC
3be4 : c5b7 [ 3] cmp adrf
trap_ne ;bad flags
3be6 : f002 [ 3]> beq skip3384
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3be8 : 00 [ 7]> brk ; Use BRK to return to the monitor
3be9 : 2a > db test_num
>
3bea : >skip3384
3bea : 28 [ 4] plp
3beb : 08 [ 3] php ;save carry for next add
3bec : a5b3 [ 3] lda ad1
3bee : ed0402 [ 4] sbc sba2 ;perform subtract
3bf1 : 08 [ 3] php
3bf2 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3bf4 : f002 [ 3]> beq skip3386
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3bf6 : 00 [ 7]> brk ; Use BRK to return to the monitor
3bf7 : 2a > db test_num
>
3bf8 : >skip3386
3bf8 : 68 [ 4] pla ;check flags
3bf9 : 29c3 [ 2] and #$c3 ;mask NV----ZC
3bfb : c5b7 [ 3] cmp adrf
trap_ne ;bad flags
3bfd : f002 [ 4]> beq skip3388
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3bff : 00 [ 7]> brk ; Use BRK to return to the monitor
3c00 : 2a > db test_num
>
3c01 : >skip3388
3c01 : 28 [ 4] plp
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 379
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
; binary ADC / SBC #
3c02 : 08 [ 3] php ;save carry for subtract
3c03 : a5b4 [ 3] lda ad2
3c05 : 8d0b3c [ 4] sta chkadi ;self modify immediate
3c08 : a5b3 [ 3] lda ad1
3c0b = chkadi = * + 1 ;operand of the immediate ADC
3c0a : 6900 [ 2] adc #0 ;perform add
3c0c : 08 [ 3] php
3c0d : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3c0f : f002 [ 3]> beq skip3390
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3c11 : 00 [ 7]> brk ; Use BRK to return to the monitor
3c12 : 2a > db test_num
>
3c13 : >skip3390
3c13 : 68 [ 4] pla ;check flags
3c14 : 29c3 [ 2] and #$c3 ;mask NV----ZC
3c16 : c5b7 [ 3] cmp adrf
trap_ne ;bad flags
3c18 : f002 [ 3]> beq skip3392
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3c1a : 00 [ 7]> brk ; Use BRK to return to the monitor
3c1b : 2a > db test_num
>
3c1c : >skip3392
3c1c : 28 [ 4] plp
3c1d : 08 [ 3] php ;save carry for next add
3c1e : a5b8 [ 3] lda sb2
3c20 : 8d263c [ 4] sta chksbi ;self modify immediate
3c23 : a5b3 [ 3] lda ad1
3c26 = chksbi = * + 1 ;operand of the immediate SBC
3c25 : e900 [ 2] sbc #0 ;perform subtract
3c27 : 08 [ 3] php
3c28 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3c2a : f002 [ 3]> beq skip3394
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3c2c : 00 [ 7]> brk ; Use BRK to return to the monitor
3c2d : 2a > db test_num
>
3c2e : >skip3394
3c2e : 68 [ 4] pla ;check flags
3c2f : 29c3 [ 2] and #$c3 ;mask NV----ZC
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 380
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3c31 : c5b7 [ 3] cmp adrf
trap_ne ;bad flags
3c33 : f002 [ 3]> beq skip3396
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3c35 : 00 [ 7]> brk ; Use BRK to return to the monitor
3c36 : 2a > db test_num
>
3c37 : >skip3396
3c37 : 28 [ 4] plp
; binary ADC / SBC zp,x
3c38 : 08 [ 3] php ;save carry for subtract
3c39 : a5b3 [ 3] lda ad1
3c3b : 7500 [ 4] adc 0,x ;perform add
3c3d : 08 [ 3] php
3c3e : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3c40 : f002 [ 3]> beq skip3398
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3c42 : 00 [ 7]> brk ; Use BRK to return to the monitor
3c43 : 2a > db test_num
>
3c44 : >skip3398
3c44 : 68 [ 4] pla ;check flags
3c45 : 29c3 [ 2] and #$c3 ;mask NV----ZC
3c47 : c5b7 [ 3] cmp adrf
trap_ne ;bad flags
3c49 : f002 [ 3]> beq skip3400
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3c4b : 00 [ 7]> brk ; Use BRK to return to the monitor
3c4c : 2a > db test_num
>
3c4d : >skip3400
3c4d : 28 [ 4] plp
3c4e : 08 [ 3] php ;save carry for next add
3c4f : a5b3 [ 3] lda ad1
3c51 : f504 [ 4] sbc sb2-ad2,x ;perform subtract
3c53 : 08 [ 3] php
3c54 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3c56 : f002 [ 3]> beq skip3402
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3c58 : 00 [ 7]> brk ; Use BRK to return to the monitor
3c59 : 2a > db test_num
>
3c5a : >skip3402
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 381
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3c5a : 68 [ 4] pla ;check flags
3c5b : 29c3 [ 2] and #$c3 ;mask NV----ZC
3c5d : c5b7 [ 3] cmp adrf
trap_ne ;bad flags
3c5f : f002 [ 3]> beq skip3404
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3c61 : 00 [ 7]> brk ; Use BRK to return to the monitor
3c62 : 2a > db test_num
>
3c63 : >skip3404
3c63 : 28 [ 4] plp
; binary ADC / SBC abs,x
3c64 : 08 [ 3] php ;save carry for subtract
3c65 : a5b3 [ 3] lda ad1
3c67 : 7d4f01 [ 4] adc ada2-ad2,x ;perform add
3c6a : 08 [ 3] php
3c6b : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3c6d : f002 [ 3]> beq skip3406
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3c6f : 00 [ 7]> brk ; Use BRK to return to the monitor
3c70 : 2a > db test_num
>
3c71 : >skip3406
3c71 : 68 [ 4] pla ;check flags
3c72 : 29c3 [ 2] and #$c3 ;mask NV----ZC
3c74 : c5b7 [ 3] cmp adrf
trap_ne ;bad flags
3c76 : f002 [ 3]> beq skip3408
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3c78 : 00 [ 7]> brk ; Use BRK to return to the monitor
3c79 : 2a > db test_num
>
3c7a : >skip3408
3c7a : 28 [ 4] plp
3c7b : 08 [ 3] php ;save carry for next add
3c7c : a5b3 [ 3] lda ad1
3c7e : fd5001 [ 4] sbc sba2-ad2,x ;perform subtract
3c81 : 08 [ 3] php
3c82 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3c84 : f002 [ 3]> beq skip3410
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3c86 : 00 [ 7]> brk ; Use BRK to return to the monitor
3c87 : 2a > db test_num
>
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 382
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3c88 : >skip3410
3c88 : 68 [ 4] pla ;check flags
3c89 : 29c3 [ 2] and #$c3 ;mask NV----ZC
3c8b : c5b7 [ 3] cmp adrf
trap_ne ;bad flags
3c8d : f002 [ 3]> beq skip3412
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3c8f : 00 [ 7]> brk ; Use BRK to return to the monitor
3c90 : 2a > db test_num
>
3c91 : >skip3412
3c91 : 28 [ 4] plp
; binary ADC / SBC abs,y
3c92 : 08 [ 3] php ;save carry for subtract
3c93 : a5b3 [ 3] lda ad1
3c95 : 790401 [ 4] adc ada2-$ff,y ;perform add
3c98 : 08 [ 3] php
3c99 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3c9b : f002 [ 3]> beq skip3414
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3c9d : 00 [ 7]> brk ; Use BRK to return to the monitor
3c9e : 2a > db test_num
>
3c9f : >skip3414
3c9f : 68 [ 4] pla ;check flags
3ca0 : 29c3 [ 2] and #$c3 ;mask NV----ZC
3ca2 : c5b7 [ 3] cmp adrf
trap_ne ;bad flags
3ca4 : f002 [ 3]> beq skip3416
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3ca6 : 00 [ 7]> brk ; Use BRK to return to the monitor
3ca7 : 2a > db test_num
>
3ca8 : >skip3416
3ca8 : 28 [ 4] plp
3ca9 : 08 [ 3] php ;save carry for next add
3caa : a5b3 [ 3] lda ad1
3cac : f90501 [ 4] sbc sba2-$ff,y ;perform subtract
3caf : 08 [ 3] php
3cb0 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3cb2 : f002 [ 3]> beq skip3418
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3cb4 : 00 [ 7]> brk ; Use BRK to return to the monitor
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 383
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3cb5 : 2a > db test_num
>
3cb6 : >skip3418
3cb6 : 68 [ 4] pla ;check flags
3cb7 : 29c3 [ 2] and #$c3 ;mask NV----ZC
3cb9 : c5b7 [ 3] cmp adrf
trap_ne ;bad flags
3cbb : f002 [ 3]> beq skip3420
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3cbd : 00 [ 7]> brk ; Use BRK to return to the monitor
3cbe : 2a > db test_num
>
3cbf : >skip3420
3cbf : 28 [ 4] plp
; binary ADC / SBC (zp,x)
3cc0 : 08 [ 3] php ;save carry for subtract
3cc1 : a5b3 [ 3] lda ad1
3cc3 : 6144 [ 6] adc (lo adi2-ad2,x) ;perform add
3cc5 : 08 [ 3] php
3cc6 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3cc8 : f002 [ 3]> beq skip3422
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3cca : 00 [ 7]> brk ; Use BRK to return to the monitor
3ccb : 2a > db test_num
>
3ccc : >skip3422
3ccc : 68 [ 4] pla ;check flags
3ccd : 29c3 [ 2] and #$c3 ;mask NV----ZC
3ccf : c5b7 [ 3] cmp adrf
trap_ne ;bad flags
3cd1 : f002 [ 3]> beq skip3424
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3cd3 : 00 [ 7]> brk ; Use BRK to return to the monitor
3cd4 : 2a > db test_num
>
3cd5 : >skip3424
3cd5 : 28 [ 4] plp
3cd6 : 08 [ 3] php ;save carry for next add
3cd7 : a5b3 [ 3] lda ad1
3cd9 : e146 [ 6] sbc (lo sbi2-ad2,x) ;perform subtract
3cdb : 08 [ 3] php
3cdc : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3cde : f002 [ 3]> beq skip3426
> trap ;failed equal (zero)
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 384
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>; db $db ; M65C02/M65C02A SToP instruction
3ce0 : 00 [ 7]> brk ; Use BRK to return to the monitor
3ce1 : 2a > db test_num
>
3ce2 : >skip3426
3ce2 : 68 [ 4] pla ;check flags
3ce3 : 29c3 [ 2] and #$c3 ;mask NV----ZC
3ce5 : c5b7 [ 3] cmp adrf
trap_ne ;bad flags
3ce7 : f002 [ 3]> beq skip3428
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3ce9 : 00 [ 7]> brk ; Use BRK to return to the monitor
3cea : 2a > db test_num
>
3ceb : >skip3428
3ceb : 28 [ 4] plp
; binary ADC / SBC (abs),y
3cec : 08 [ 3] php ;save carry for subtract
3ced : a5b3 [ 3] lda ad1
3cef : 71fc [ 5] adc (adiy2),y ;perform add
3cf1 : 08 [ 3] php
3cf2 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
3cf4 : f002 [ 3]> beq skip3430
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3cf6 : 00 [ 7]> brk ; Use BRK to return to the monitor
3cf7 : 2a > db test_num
>
3cf8 : >skip3430
3cf8 : 68 [ 4] pla ;check flags
3cf9 : 29c3 [ 2] and #$c3 ;mask NV----ZC
3cfb : c5b7 [ 3] cmp adrf
trap_ne ;bad flags
3cfd : f002 [ 4]> beq skip3432
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3cff : 00 [ 7]> brk ; Use BRK to return to the monitor
3d00 : 2a > db test_num
>
3d01 : >skip3432
3d01 : 28 [ 4] plp
3d02 : 08 [ 3] php ;save carry for next add
3d03 : a5b3 [ 3] lda ad1
3d05 : f1fe [ 5] sbc (sbiy2),y ;perform subtract
3d07 : 08 [ 3] php
3d08 : c5b5 [ 3] cmp adrl ;check result
trap_ne ;bad result
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 385
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3d0a : f002 [ 3]> beq skip3434
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3d0c : 00 [ 7]> brk ; Use BRK to return to the monitor
3d0d : 2a > db test_num
>
3d0e : >skip3434
3d0e : 68 [ 4] pla ;check flags
3d0f : 29c3 [ 2] and #$c3 ;mask NV----ZC
3d11 : c5b7 [ 3] cmp adrf
trap_ne ;bad flags
3d13 : f002 [ 3]> beq skip3436
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3d15 : 00 [ 7]> brk ; Use BRK to return to the monitor
3d16 : 2a > db test_num
>
3d17 : >skip3436
3d17 : 28 [ 4] plp
3d18 : 60 [ 6] rts
; target for the jump absolute test
3d19 : 88 [ 2] dey
3d1a : 88 [ 2] dey
3d1b : test_far
3d1b : 08 [ 3] php ;either SP or Y count will fail, if we do not hit
3d1c : 88 [ 2] dey
3d1d : 88 [ 2] dey
3d1e : 88 [ 2] dey
3d1f : 28 [ 4] plp
trap_cs ;flags loaded?
3d20 : 9002 [ 3]> bcc skip3438
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3d22 : 00 [ 7]> brk ; Use BRK to return to the monitor
3d23 : 2a > db test_num
>
3d24 : >skip3438
trap_vs
3d24 : 5002 [ 3]> bvc skip3440
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3d26 : 00 [ 7]> brk ; Use BRK to return to the monitor
3d27 : 2a > db test_num
>
3d28 : >skip3440
trap_mi
3d28 : 1002 [ 3]> bpl skip3442
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 386
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3d2a : 00 [ 7]> brk ; Use BRK to return to the monitor
3d2b : 2a > db test_num
>
3d2c : >skip3442
trap_eq
3d2c : d002 [ 3]> bne skip3444
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3d2e : 00 [ 7]> brk ; Use BRK to return to the monitor
3d2f : 2a > db test_num
>
3d30 : >skip3444
3d30 : c946 [ 2] cmp #'F' ;registers loaded?
trap_ne
3d32 : f002 [ 3]> beq skip3446
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3d34 : 00 [ 7]> brk ; Use BRK to return to the monitor
3d35 : 2a > db test_num
>
3d36 : >skip3446
3d36 : e041 [ 2] cpx #'A'
trap_ne
3d38 : f002 [ 3]> beq skip3448
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3d3a : 00 [ 7]> brk ; Use BRK to return to the monitor
3d3b : 2a > db test_num
>
3d3c : >skip3448
3d3c : c04f [ 2] cpy #('R'-3)
trap_ne
3d3e : f002 [ 3]> beq skip3450
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3d40 : 00 [ 7]> brk ; Use BRK to return to the monitor
3d41 : 2a > db test_num
>
3d42 : >skip3450
3d42 : 48 [ 3] pha ;save a,x
3d43 : 8a [ 2] txa
3d44 : 48 [ 3] pha
3d45 : ba [ 2] tsx
3d46 : e0fd [ 2] cpx #$fd ;check SP
trap_ne
3d48 : f002 [ 3]> beq skip3452
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3d4a : 00 [ 7]> brk ; Use BRK to return to the monitor
3d4b : 2a > db test_num
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 387
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>
3d4c : >skip3452
3d4c : 68 [ 4] pla ;restore x
3d4d : aa [ 2] tax
set_stat $ff
> load_flag $ff
3d4e : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
3d50 : 48 [ 3]> pha ;use stack to load status
3d51 : 28 [ 4]> plp
3d52 : 68 [ 4] pla ;restore a
3d53 : e8 [ 2] inx ;return registers with modifications
3d54 : 49aa [ 2] eor #$aa ;N=1, V=1, Z=0, C=1
3d56 : 4ca808 [ 3] jmp far_ret
; target for the jump indirect test
3d59 : 00 align
3d5a : 623d ptr_tst_ind dw test_ind
3d5c : 1f09 ptr_ind_ret dw ind_ret
trap ;runover protection
>; db $db ; M65C02/M65C02A SToP instruction
3d5e : 00 [ 7]> brk ; Use BRK to return to the monitor
3d5f : 2a > db test_num
3d60 : 88 [ 2] dey
3d61 : 88 [ 2] dey
3d62 : test_ind
3d62 : 08 [ 3] php ;either SP or Y count will fail, if we do not hit
3d63 : 88 [ 2] dey
3d64 : 88 [ 2] dey
3d65 : 88 [ 2] dey
3d66 : 28 [ 4] plp
trap_cs ;flags loaded?
3d67 : 9002 [ 3]> bcc skip3457
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3d69 : 00 [ 7]> brk ; Use BRK to return to the monitor
3d6a : 2a > db test_num
>
3d6b : >skip3457
trap_vs
3d6b : 5002 [ 3]> bvc skip3459
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3d6d : 00 [ 7]> brk ; Use BRK to return to the monitor
3d6e : 2a > db test_num
>
3d6f : >skip3459
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 388
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
trap_mi
3d6f : 1002 [ 3]> bpl skip3461
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3d71 : 00 [ 7]> brk ; Use BRK to return to the monitor
3d72 : 2a > db test_num
>
3d73 : >skip3461
trap_eq
3d73 : d002 [ 3]> bne skip3463
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3d75 : 00 [ 7]> brk ; Use BRK to return to the monitor
3d76 : 2a > db test_num
>
3d77 : >skip3463
3d77 : c949 [ 2] cmp #'I' ;registers loaded?
trap_ne
3d79 : f002 [ 3]> beq skip3465
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3d7b : 00 [ 7]> brk ; Use BRK to return to the monitor
3d7c : 2a > db test_num
>
3d7d : >skip3465
3d7d : e04e [ 2] cpx #'N'
trap_ne
3d7f : f002 [ 3]> beq skip3467
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3d81 : 00 [ 7]> brk ; Use BRK to return to the monitor
3d82 : 2a > db test_num
>
3d83 : >skip3467
3d83 : c041 [ 2] cpy #('D'-3)
trap_ne
3d85 : f002 [ 3]> beq skip3469
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3d87 : 00 [ 7]> brk ; Use BRK to return to the monitor
3d88 : 2a > db test_num
>
3d89 : >skip3469
3d89 : 48 [ 3] pha ;save a,x
3d8a : 8a [ 2] txa
3d8b : 48 [ 3] pha
3d8c : ba [ 2] tsx
3d8d : e0fd [ 2] cpx #$fd ;check SP
trap_ne
3d8f : f002 [ 3]> beq skip3471
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 389
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3d91 : 00 [ 7]> brk ; Use BRK to return to the monitor
3d92 : 2a > db test_num
>
3d93 : >skip3471
3d93 : 68 [ 4] pla ;restore x
3d94 : aa [ 2] tax
set_stat $ff
> load_flag $ff
3d95 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
3d97 : 48 [ 3]> pha ;use stack to load status
3d98 : 28 [ 4]> plp
3d99 : 68 [ 4] pla ;restore a
3d9a : e8 [ 2] inx ;return registers with modifications
3d9b : 49aa [ 2] eor #$aa ;N=1, V=1, Z=0, C=1
3d9d : 6c5c3d [ 6] jmp (ptr_ind_ret)
trap ;runover protection
>; db $db ; M65C02/M65C02A SToP instruction
3da0 : 00 [ 7]> brk ; Use BRK to return to the monitor
3da1 : 2a > db test_num
; target for the jump subroutine test
3da2 : 88 [ 2] dey
3da3 : 88 [ 2] dey
3da4 : test_jsr
3da4 : 08 [ 3] php ;either SP or Y count will fail, if we do not hit
3da5 : 88 [ 2] dey
3da6 : 88 [ 2] dey
3da7 : 88 [ 2] dey
3da8 : 28 [ 4] plp
trap_cs ;flags loaded?
3da9 : 9002 [ 3]> bcc skip3476
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3dab : 00 [ 7]> brk ; Use BRK to return to the monitor
3dac : 2a > db test_num
>
3dad : >skip3476
trap_vs
3dad : 5002 [ 3]> bvc skip3478
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3daf : 00 [ 7]> brk ; Use BRK to return to the monitor
3db0 : 2a > db test_num
>
3db1 : >skip3478
trap_mi
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 390
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3db1 : 1002 [ 3]> bpl skip3480
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3db3 : 00 [ 7]> brk ; Use BRK to return to the monitor
3db4 : 2a > db test_num
>
3db5 : >skip3480
trap_eq
3db5 : d002 [ 3]> bne skip3482
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3db7 : 00 [ 7]> brk ; Use BRK to return to the monitor
3db8 : 2a > db test_num
>
3db9 : >skip3482
3db9 : c94a [ 2] cmp #'J' ;registers loaded?
trap_ne
3dbb : f002 [ 3]> beq skip3484
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3dbd : 00 [ 7]> brk ; Use BRK to return to the monitor
3dbe : 2a > db test_num
>
3dbf : >skip3484
3dbf : e053 [ 2] cpx #'S'
trap_ne
3dc1 : f002 [ 3]> beq skip3486
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3dc3 : 00 [ 7]> brk ; Use BRK to return to the monitor
3dc4 : 2a > db test_num
>
3dc5 : >skip3486
3dc5 : c04f [ 2] cpy #('R'-3)
trap_ne
3dc7 : f002 [ 3]> beq skip3488
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3dc9 : 00 [ 7]> brk ; Use BRK to return to the monitor
3dca : 2a > db test_num
>
3dcb : >skip3488
3dcb : 48 [ 3] pha ;save a,x
3dcc : 8a [ 2] txa
3dcd : 48 [ 3] pha
3dce : ba [ 2] tsx ;sp -4? (return addr,a,x)
3dcf : e0fb [ 2] cpx #$fb
trap_ne
3dd1 : f002 [ 3]> beq skip3490
> trap ;failed equal (zero)
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 391
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
>; db $db ; M65C02/M65C02A SToP instruction
3dd3 : 00 [ 7]> brk ; Use BRK to return to the monitor
3dd4 : 2a > db test_num
>
3dd5 : >skip3490
3dd5 : adff01 [ 4] lda $1ff ;propper return on stack
3dd8 : c909 [ 2] cmp #hi(jsr_ret)
trap_ne
3dda : f002 [ 3]> beq skip3492
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3ddc : 00 [ 7]> brk ; Use BRK to return to the monitor
3ddd : 2a > db test_num
>
3dde : >skip3492
3dde : adfe01 [ 4] lda $1fe
3de1 : c967 [ 2] cmp #lo(jsr_ret)
trap_ne
3de3 : f002 [ 3]> beq skip3494
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3de5 : 00 [ 7]> brk ; Use BRK to return to the monitor
3de6 : 2a > db test_num
>
3de7 : >skip3494
set_stat $ff
> load_flag $ff
3de7 : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
3de9 : 48 [ 3]> pha ;use stack to load status
3dea : 28 [ 4]> plp
3deb : 68 [ 4] pla ;pull x,a
3dec : aa [ 2] tax
3ded : 68 [ 4] pla
3dee : e8 [ 2] inx ;return registers with modifications
3def : 49aa [ 2] eor #$aa ;N=1, V=1, Z=0, C=1
3df1 : 60 [ 6] rts
trap ;runover protection
>; db $db ; M65C02/M65C02A SToP instruction
3df2 : 00 [ 7]> brk ; Use BRK to return to the monitor
3df3 : 2a > db test_num
;trap in case of unexpected IRQ, NMI, BRK, RESET - BRK test target
3df4 : nmi_trap
trap ;check stack for conditions at NMI
>; db $db ; M65C02/M65C02A SToP instruction
3df4 : 00 [ 7]> brk ; Use BRK to return to the monitor
3df5 : 2a > db test_num
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 392
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3df6 : res_trap
trap ;unexpected RESET
>; db $db ; M65C02/M65C02A SToP instruction
3df6 : 00 [ 7]> brk ; Use BRK to return to the monitor
3df7 : 2a > db test_num
3df8 : 88 [ 2] dey
3df9 : 88 [ 2] dey
3dfa : irq_trap ;BRK test or unextpected BRK or IRQ
3dfa : 08 [ 3] php ;either SP or Y count will fail, if we do not hit
3dfb : 88 [ 2] dey
3dfc : 88 [ 2] dey
3dfd : 88 [ 2] dey
;next 4 traps could be caused by unexpected BRK or IRQ
;check stack for BREAK and originating location
;possible jump/branch into weeds (uninitialized space)
3dfe : c942 [ 2] cmp #'B' ;registers loaded?
trap_ne
3e00 : f002 [ 3]> beq skip3501
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3e02 : 00 [ 7]> brk ; Use BRK to return to the monitor
3e03 : 2a > db test_num
>
3e04 : >skip3501
3e04 : e052 [ 2] cpx #'R'
trap_ne
3e06 : f002 [ 3]> beq skip3503
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3e08 : 00 [ 7]> brk ; Use BRK to return to the monitor
3e09 : 2a > db test_num
>
3e0a : >skip3503
3e0a : c048 [ 2] cpy #('K'-3)
trap_ne
3e0c : f002 [ 3]> beq skip3505
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3e0e : 00 [ 7]> brk ; Use BRK to return to the monitor
3e0f : 2a > db test_num
>
3e10 : >skip3505
3e10 : 85b0 [ 3] sta irq_a ;save registers during break test
3e12 : 86b1 [ 3] stx irq_x
3e14 : ba [ 2] tsx ;test break on stack
3e15 : bd0201 [ 4] lda $102,x
cmp_flag 0 ;break test should have B=1
3e18 : c930 [ 2]> cmp #(0 |fao)&m8 ;expected flags + always on bits
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 393
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
trap_ne ; - no break flag on stack
3e1a : f002 [ 3]> beq skip3508
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3e1c : 00 [ 7]> brk ; Use BRK to return to the monitor
3e1d : 2a > db test_num
>
3e1e : >skip3508
3e1e : 68 [ 4] pla
3e1f : c934 [ 2] cmp #$34 ;should have added interrupt disable
trap_ne
3e21 : f002 [ 3]> beq skip3510
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3e23 : 00 [ 7]> brk ; Use BRK to return to the monitor
3e24 : 2a > db test_num
>
3e25 : >skip3510
3e25 : ba [ 2] tsx
3e26 : e0fc [ 2] cpx #$fc ;sp -3? (return addr, flags)
trap_ne
3e28 : f002 [ 3]> beq skip3512
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3e2a : 00 [ 7]> brk ; Use BRK to return to the monitor
3e2b : 2a > db test_num
>
3e2c : >skip3512
3e2c : adff01 [ 4] lda $1ff ;propper return on stack
3e2f : c909 [ 2] cmp #hi(brk_ret)
trap_ne
3e31 : f002 [ 3]> beq skip3514
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3e33 : 00 [ 7]> brk ; Use BRK to return to the monitor
3e34 : 2a > db test_num
>
3e35 : >skip3514
3e35 : adfe01 [ 4] lda $1fe
; cmp #lo(brk_ret)
3e38 : c9ba [ 2] cmp #lo(brk_ret - 1) ; M65C02 treats JSR and traps (NMI, BRK/IRQ, RST) the same; add one to
trap_ne
3e3a : f002 [ 3]> beq skip3516
> trap ;failed equal (zero)
>; db $db ; M65C02/M65C02A SToP instruction
3e3c : 00 [ 7]> brk ; Use BRK to return to the monitor
3e3d : 2a > db test_num
>
3e3e : >skip3516
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 394
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
set_stat $ff
> load_flag $ff
3e3e : a9ff [ 2]> lda #$ff ;allow test to change I-flag (no mask)
>
3e40 : 48 [ 3]> pha ;use stack to load status
3e41 : 28 [ 4]> plp
3e42 : a6b1 [ 3] ldx irq_x
3e44 : e8 [ 2] inx ;return registers with modifications
3e45 : a5b0 [ 3] lda irq_a
3e47 : 49aa [ 2] eor #$aa ;N=1, V=1, Z=0, C=1 but original flags should be restored
3e49 : 40 [ 6] rti
trap ;runover protection
>; db $db ; M65C02/M65C02A SToP instruction
3e4a : 00 [ 7]> brk ; Use BRK to return to the monitor
3e4b : 2a > db test_num
;copy of data to initialize BSS segment
if load_data_direct != 1
3e4c : zp_init
3e4c : c3824100 zp1_ db $c3,$82,$41,0 ;test patterns for LDx BIT ROL ROR ASL LSR
3e50 : 7f zp7f_ db $7f ;test pattern for compare
;logical zeropage operands
3e51 : 001f7180 zpOR_ db 0,$1f,$71,$80 ;test pattern for OR
3e55 : 0fff7f80 zpAN_ db $0f,$ff,$7f,$80 ;test pattern for AND
3e59 : ff0f8f8f zpEO_ db $ff,$0f,$8f,$8f ;test pattern for EOR
;indirect addressing pointers
3e5d : 0802 ind1_ dw abs1 ;indirect pointer to pattern in absolute memory
3e5f : 0902 dw abs1+1
3e61 : 0a02 dw abs1+2
3e63 : 0b02 dw abs1+3
3e65 : 0c02 dw abs7f
3e67 : 1001 inw1_ dw abs1-$f8 ;indirect pointer for wrap-test pattern
3e69 : 0302 indt_ dw abst ;indirect pointer to store area in absolute memory
3e6b : 0402 dw abst+1
3e6d : 0502 dw abst+2
3e6f : 0602 dw abst+3
3e71 : 0b01 inwt_ dw abst-$f8 ;indirect pointer for wrap-test store
3e73 : 3f02 indAN_ dw absAN ;indirect pointer to AND pattern in absolute memory
3e75 : 4002 dw absAN+1
3e77 : 4102 dw absAN+2
3e79 : 4202 dw absAN+3
3e7b : 4302 indEO_ dw absEO ;indirect pointer to EOR pattern in absolute memory
3e7d : 4402 dw absEO+1
3e7f : 4502 dw absEO+2
3e81 : 4602 dw absEO+3
3e83 : 3b02 indOR_ dw absOR ;indirect pointer to OR pattern in absolute memory
3e85 : 3c02 dw absOR+1
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 395
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3e87 : 3d02 dw absOR+2
3e89 : 3e02 dw absOR+3
;add/subtract indirect pointers
3e8b : 0302 adi2_ dw ada2 ;indirect pointer to operand 2 in absolute memory
3e8d : 0402 sbi2_ dw sba2 ;indirect pointer to complemented operand 2 (SBC)
3e8f : 0401 adiy2_ dw ada2-$ff ;with offset for indirect indexed
3e91 : 0501 sbiy2_ dw sba2-$ff
3e93 : zp_end
if (zp_end - zp_init) != (zp_bss_end - zp_bss)
;force assembler error if size is different
ERROR ERROR ERROR ;mismatch between bss and zeropage data
endif
3e93 : data_init
3e93 : c3824100 abs1_ db $c3,$82,$41,0 ;test patterns for LDx BIT ROL ROR ASL LSR
3e97 : 7f abs7f_ db $7f ;test pattern for compare
;loads
3e98 : 80800002 fLDx_ db fn,fn,0,fz ;expected flags for load
;shifts
3e9c : rASL_ ;expected result ASL & ROL -carry
3e9c : 86048200 rROL_ db $86,$04,$82,0 ; "
3ea0 : 87058301 rROLc_ db $87,$05,$83,1 ;expected result ROL +carry
3ea4 : rLSR_ ;expected result LSR & ROR -carry
3ea4 : 61412000 rROR_ db $61,$41,$20,0 ; "
3ea8 : e1c1a080 rRORc_ db $e1,$c1,$a0,$80 ;expected result ROR +carry
3eac : fASL_ ;expected flags for shifts
3eac : 81018002 fROL_ db fnc,fc,fn,fz ;no carry in
3eb0 : 81018000 fROLc_ db fnc,fc,fn,0 ;carry in
3eb4 : fLSR_
3eb4 : 01000102 fROR_ db fc,0,fc,fz ;no carry in
3eb8 : 81808180 fRORc_ db fnc,fn,fnc,fn ;carry in
;increments (decrements)
3ebc : 7f80ff0001 rINC_ db $7f,$80,$ff,0,1 ;expected result for INC/DEC
3ec1 : 0080800200 fINC_ db 0,fn,fn,fz,0 ;expected flags for INC/DEC
;logical memory operand
3ec6 : 001f7180 absOR_ db 0,$1f,$71,$80 ;test pattern for OR
3eca : 0fff7f80 absAN_ db $0f,$ff,$7f,$80 ;test pattern for AND
3ece : ff0f8f8f absEO_ db $ff,$0f,$8f,$8f ;test pattern for EOR
;logical accu operand
3ed2 : 00f11f00 absORa_ db 0,$f1,$1f,0 ;test pattern for OR
AS65 Assembler for R6502 [1.42]. Copyright 1994-2007, Frank A. Kingswood Page 396
---------------------------------------------------------- 65c02_ft.a65 -----------------------------------------------------------
3ed6 : f0ffffff absANa_ db $f0,$ff,$ff,$ff ;test pattern for AND
3eda : fff0f00f absEOa_ db $ff,$f0,$f0,$0f ;test pattern for EOR
;logical results
3ede : 00ff7f80 absrlo_ db 0,$ff,$7f,$80
3ee2 : 02800080 absflo_ db fz,fn,0,fn
3ee6 : data_end
if (data_end - data_init) != (data_bss_end - data_bss)
;force assembler error if size is different
ERROR ERROR ERROR ;mismatch between bss and data
endif
code
3ffa = org $3FFA
3ffa : vec_init
3ffa : f43d dw nmi_trap
3ffc : f63d dw res_trap
3ffe : fa3d dw irq_trap
fffa = vec_bss equ $fffa
endif ;end of RAM init data
if (load_data_direct = 1) & (ROM_vectors = 1)
org $fffa ;vectors
dw nmi_trap
dw res_trap
dw irq_trap
endif
fffa = end start
No errors in pass 2.
Wrote binary from address $0000 through $3fff.
Total size 16384 bytes.
Program start address is at $0400 (1024).