Home » CEEFAX disks » telesoftware16.adl » 14-07-89/Timer
14-07-89/Timer
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » CEEFAX disks » telesoftware16.adl |
Filename: | 14-07-89/Timer |
Read OK: | ✔ |
File size: | 0D37 bytes |
Load address: | FFFF0E00 |
Exec address: | FFFF802B |
Duplicates
There are 2 duplicate copies of this file in the archive:
- AEW website » mu » mu_5_25_discs_Micro_User_07_04_D-MU07_04.ssd » Timer
- AEW website » mu » mu_Micro_User_07_04_MU7-4_B.uef » Timer
- CEEFAX disks » telesoftware16.adl » 14-07-89/Timer
File contents
10REM Timer Debug 20REM by Peter Fagan 30REM (c) The Micro User 40MODE 3 50PROCinit 60PROCassem 70PROCtest 80PROCsave 90END 100DEFPROCinit 110code =&900 120sysvia =&FE40 130ifr =sysvia + 13 140t1lh =sysvia + 7 150oldacc =&FC 160irq1v =&0204 170linptr =&000B 180REM Basic I > &9942 B 190REM Basic II > &9970 B or B+ 200REM Basic IV > &???? Master 210REM Basic VI > &???? Compact 220linsrch =&9970 230inta =&002A 240ptr =&003D 250delay =&03 260range1lo= 1690 270range1hi= 1699 280range2lo= 1700 290range2hi= 1709 300range3lo= 0 310range3hi= 9999 320ENDPROC 330DEFPROCassem 340FOR L%=0 TO 2 STEP 2 350P%=code:[OPT L% 360.start 370 LDX #&1C:LDA #&00 380.clear 390 STA counts,X 400 DEX:BPL clear 410 PHP:SEI 420 LDA irq1v+0:STA oldv+1 430 LDA irq1v+1:STA oldv+2 440 LDA #intrpt MOD256:STA irq1v+0 450 LDA #intrpt DIV256:STA irq1v+1 460 LDA t1lh:STA oldt1l 470 LDA #delay:STA t1lh 480 PLP 490 LDY #2 500.loop 510 TYA:ASL A 520 ASL A:TAX 530 LDA lines+2,X 540 ORA lines+3,X 550 BEQ repeat 560 LDA #&00 570 STA inta+2 580 STA inta+3 590 LDA lines+0,X:STA inta+0 600 LDA lines+1,X:STA inta+1 610 TYA:PHA 620 JSR linsrch 630 PLA:TAY 640 BCC lfound 650 CLC 660 LDA ptr+0:ADC #1:STA addrs+0,X 670 LDA ptr+1:ADC #0:STA addrs+1,X 680 JMP upper 690.lfound 700 SEC 710 LDA ptr+0:SBC #2:STA addrs+0,X 720 LDA ptr+1:SBC #0:STA addrs+1,X 730.upper 740 CLC 750 LDA lines+2,X:ADC #1:STA inta+0 760 LDA lines+3,X:ADC #0:STA inta+1 770 TYA:PHA 780 JSR linsrch 790 PLA:TAY 800 BCC ufound 810 LDA ptr+0:STA addrs+2,X 820 LDA ptr+1:STA addrs+3,X 830 JMP repeat 840.ufound 850 SEC 860 LDA ptr+0:SBC #3:STA addrs+2,X 870 LDA ptr+1:SBC #0:STA addrs+3,X 880.repeat 890 DEY:BPL loop 900 DEC active 910 RTS 920.intrpt 930 BIT ifr 940 BPL oldv 950 BIT active 960 BPL oldv 970 LDA oldacc:PHA 980 TXA:PHA:TYA:PHA 990 LDA ifr 1000 ASL A 1010 BPL exit 1020 INC entries+0:BNE getlin 1030 INC entries+1:BNE getlin 1040 INC entries+2:BNE getlin 1050 INC entries+3 1060.getlin 1070 LDY #2 1080.rpt 1090 TYA:ASL A 1100 ASL A:TAX 1110 SEC 1120 LDA linptr 1130 SBC addrs+0,X 1140 LDA linptr+1 1150 SBC addrs+1,X 1160 BCC next 1170 LDA addrs+2,X 1180 SBC linptr 1190 LDA addrs+3,X 1200 SBC linptr+1 1210 BCC next 1220 INC counts+0,X:BNE next 1230 INC counts+1,X:BNE next 1240 INC counts+2,X:BNE next 1250 INC counts+3,X 1260.next 1270 DEY:BPL rpt 1280.exit 1290 PLA:TAY:PLA:TAX 1300 PLA:STA oldacc 1310.oldv 1320 JMP &0000 1330.finish 1340 LDA #0:STA active 1350 PHP:SEI 1360 LDA oldv+1:STA irq1v+0 1370 LDA oldv+2:STA irq1v+1 1380 LDA oldt1l:STA t1lh 1390 PLP:RTS 1400.lines 1410 OPT FNw(range1lo) 1420 OPT FNw(range1hi) 1430 OPT FNw(range2lo) 1440 OPT FNw(range2hi) 1450 OPT FNw(range3lo) 1460 OPT FNw(range3hi) 1470.counts 1480 OPT FNd(0) 1490 OPT FNd(0) 1500 OPT FNd(0) 1510.entries 1520 OPT FNd(0) 1530.addrs 1540 OPT FNw(0):OPT FNw(0) 1550 OPT FNw(0):OPT FNw(0) 1560 OPT FNw(0):OPT FNw(0) 1570.active OPT FNb(0) 1580.oldt1l OPT FNb(0) 1590.codeend 1600]:NEXT:ENDPROC 1610DEFFNb(B%):?P%=B%:P%=P%+1:=L% 1620DEFFNw(W%):!P%=W%:P%=P%+2:=L% 1630DEFFNd(D%):!P%=D%:P%=P%+4:=L% 1640DEFPROCtest 1650PRINT"=== Timer Debug running ===" 1660LOCAL @%:@%=&905 1670CALL start 1680FOR X%=1 TO 100 1690A=SIN(0.6) 1700A=COS(0.6) 1710NEXT:CALL finish 1720E%=!entries 1730PRINT "Entries > "E% 1740FOR X%=0 TO 2 1750B%=lines+X%*4 1760L%=B%!0AND&FFFF:U%=B%!2AND&FFFF 1770B%=addrs+X%*4 1780a1%=B%!0AND&FFFF:a2%=B%!2AND&FFFF 1790C%=counts!(X%*4) 1800P%=100*C%/E%+0.5 1810PRINT L%" (&";~a1%")"SPC2; 1820PRINT U%" (&";~a2%")"SPC3; 1830PRINT "==> "C%" ("P%"%)" 1840NEXT:ENDPROC 1850DEF PROCsave 1860PRINT"To save, copy this:" 1870PRINTSPC1"*SAVE Tcode "STR$~code" "STR$~codeend 1880ENDPROC
� Timer Debug � by Peter Fagan � (c) The Micro User (� 3 2 �init < �assem F �test P �save Z� d ��init ncode =&900 xsysvia =&FE40 �ifr =sysvia + 13 �t1lh =sysvia + 7 �oldacc =&FC �irq1v =&0204 �linptr =&000B �� Basic I > &9942 B �� Basic II > &9970 B or B+ �� Basic IV > &???? Master �� Basic VI > &???? Compact �linsrch =&9970 �inta =&002A �ptr =&003D �delay =&03 range1lo= 1690 range1hi= 1699 range2lo= 1700 "range2hi= 1709 ,range3lo= 0 6range3hi= 9999 @� J��assem T� L%=0 � 2 � 2 ^P%=code:[OPT L% h .start r LDX #&1C:LDA #&00 | .clear � STA counts,X � DEX:BPL clear � PHP:SEI � LDA irq1v+0:STA oldv+1 � LDA irq1v+1:STA oldv+2 �! LDA #intrpt �256:STA irq1v+0 �! LDA #intrpt �256:STA irq1v+1 � LDA t1lh:STA oldt1l � LDA #delay:STA t1lh � PLP � LDY #2 � .loop � TYA:ASL A ASL A:TAX LDA lines+2,X �A lines+3,X & BEQ repeat 0 LDA #&00 : STA inta+2 D STA inta+3 N LDA lines+0,X:STA inta+0 X LDA lines+1,X:STA inta+1 b TYA:PHA l JSR linsrch v PLA:TAY � BCC lfound � CLC �# LDA ptr+0:ADC #1:STA addrs+0,X �# LDA ptr+1:ADC #0:STA addrs+1,X � JMP upper �.lfound � SEC �# LDA ptr+0:SBC #2:STA addrs+0,X �# LDA ptr+1:SBC #0:STA addrs+1,X � .upper � CLC �$ LDA lines+2,X:ADC #1:STA inta+0 �$ LDA lines+3,X:ADC #0:STA inta+1 TYA:PHA JSR linsrch PLA:TAY BCC ufound * LDA ptr+0:STA addrs+2,X 4 LDA ptr+1:STA addrs+3,X > JMP repeat H.ufound R SEC \# LDA ptr+0:SBC #3:STA addrs+2,X f# LDA ptr+1:SBC #0:STA addrs+3,X p.repeat z DEY:BPL loop � DEC active � RTS �.intrpt � BIT ifr � BPL oldv � BIT active � BPL oldv � LDA oldacc:PHA � TXA:PHA:TYA:PHA � LDA ifr � ASL A � BPL exit � INC entries+0:BNE getlin INC entries+1:BNE getlin INC entries+2:BNE getlin INC entries+3 $.getlin . LDY #2 8.rpt B TYA:ASL A L ASL A:TAX V SEC ` LDA linptr j SBC addrs+0,X t LDA linptr+1 ~ SBC addrs+1,X � BCC next � LDA addrs+2,X � SBC linptr � LDA addrs+3,X � SBC linptr+1 � BCC next � INC counts+0,X:BNE next � INC counts+1,X:BNE next � INC counts+2,X:BNE next � INC counts+3,X � .next � DEY:BPL rpt .exit PLA:TAY:PLA:TAX PLA:STA oldacc .oldv ( JMP &0000 2.finish < LDA #0:STA active F PHP:SEI P LDA oldv+1:STA irq1v+0 Z LDA oldv+2:STA irq1v+1 d LDA oldt1l:STA t1lh n PLP:RTS x .lines � OPT �w(range1lo) � OPT �w(range1hi) � OPT �w(range2lo) � OPT �w(range2hi) � OPT �w(range3lo) � OPT �w(range3hi) �.counts � OPT �d(0) � OPT �d(0) � OPT �d(0) �.entries � OPT �d(0) � .addrs OPT �w(0):OPT �w(0) OPT �w(0):OPT �w(0) OPT �w(0):OPT �w(0) ".active OPT �b(0) ,.oldt1l OPT �b(0) 6.codeend @ ]:�:� Jݤb(B%):?P%=B%:P%=P%+1:=L% Tݤw(W%):!P%=W%:P%=P%+2:=L% ^ݤd(D%):!P%=D%:P%=P%+4:=L% h ��test r"�"=== Timer Debug running ===" |� @%:@%=&905 �� start �� X%=1 � 100 �A=�(0.6) �A=�(0.6) ��:� finish �E%=!entries �� "Entries > "E% �� X%=0 � 2 �B%=lines+X%*4 �L%=B%!0�&FFFF:U%=B%!2�&FFFF �B%=addrs+X%*4 �!a1%=B%!0�&FFFF:a2%=B%!2�&FFFF �C%=counts!(X%*4) P%=100*C%/E%+0.5 � L%" (&";~a1%")"�2; � U%" (&";~a2%")"�3; &� "==> "C%" ("P%"%)" 0�:� :� �save D�"To save, copy this:" N'�1"*SAVE Tcode "�~code" "�~codeend X� �
00000000 0d 00 0a 11 f4 20 54 69 6d 65 72 20 44 65 62 75 |..... Timer Debu| 00000010 67 0d 00 14 14 f4 20 62 79 20 50 65 74 65 72 20 |g..... by Peter | 00000020 46 61 67 61 6e 0d 00 1e 18 f4 20 28 63 29 20 54 |Fagan..... (c) T| 00000030 68 65 20 4d 69 63 72 6f 20 55 73 65 72 0d 00 28 |he Micro User..(| 00000040 07 eb 20 33 0d 00 32 09 f2 69 6e 69 74 0d 00 3c |.. 3..2..init..<| 00000050 0a f2 61 73 73 65 6d 0d 00 46 09 f2 74 65 73 74 |..assem..F..test| 00000060 0d 00 50 09 f2 73 61 76 65 0d 00 5a 05 e0 0d 00 |..P..save..Z....| 00000070 64 0a dd f2 69 6e 69 74 0d 00 6e 11 63 6f 64 65 |d...init..n.code| 00000080 20 20 20 20 3d 26 39 30 30 0d 00 78 12 73 79 73 | =&900..x.sys| 00000090 76 69 61 20 20 3d 26 46 45 34 30 0d 00 82 18 69 |via =&FE40....i| 000000a0 66 72 20 20 20 20 20 3d 73 79 73 76 69 61 20 2b |fr =sysvia +| 000000b0 20 31 33 0d 00 8c 17 74 31 6c 68 20 20 20 20 3d | 13....t1lh =| 000000c0 73 79 73 76 69 61 20 2b 20 37 0d 00 96 10 6f 6c |sysvia + 7....ol| 000000d0 64 61 63 63 20 20 3d 26 46 43 0d 00 a0 12 69 72 |dacc =&FC....ir| 000000e0 71 31 76 20 20 20 3d 26 30 32 30 34 0d 00 aa 12 |q1v =&0204....| 000000f0 6c 69 6e 70 74 72 20 20 3d 26 30 30 30 42 0d 00 |linptr =&000B..| 00000100 b4 18 f4 20 42 61 73 69 63 20 49 20 20 3e 20 26 |... Basic I > &| 00000110 39 39 34 32 20 42 0d 00 be 1e f4 20 42 61 73 69 |9942 B..... Basi| 00000120 63 20 49 49 20 3e 20 26 39 39 37 30 20 42 20 6f |c II > &9970 B o| 00000130 72 20 42 2b 0d 00 c8 1d f4 20 42 61 73 69 63 20 |r B+..... Basic | 00000140 49 56 20 3e 20 26 3f 3f 3f 3f 20 4d 61 73 74 65 |IV > &???? Maste| 00000150 72 0d 00 d2 1e f4 20 42 61 73 69 63 20 56 49 20 |r..... Basic VI | 00000160 3e 20 26 3f 3f 3f 3f 20 43 6f 6d 70 61 63 74 0d |> &???? Compact.| 00000170 00 dc 12 6c 69 6e 73 72 63 68 20 3d 26 39 39 37 |...linsrch =&997| 00000180 30 0d 00 e6 12 69 6e 74 61 20 20 20 20 3d 26 30 |0....inta =&0| 00000190 30 32 41 0d 00 f0 12 70 74 72 20 20 20 20 20 3d |02A....ptr =| 000001a0 26 30 30 33 44 0d 00 fa 10 64 65 6c 61 79 20 20 |&003D....delay | 000001b0 20 3d 26 30 33 0d 01 04 12 72 61 6e 67 65 31 6c | =&03....range1l| 000001c0 6f 3d 20 31 36 39 30 0d 01 0e 12 72 61 6e 67 65 |o= 1690....range| 000001d0 31 68 69 3d 20 31 36 39 39 0d 01 18 12 72 61 6e |1hi= 1699....ran| 000001e0 67 65 32 6c 6f 3d 20 31 37 30 30 0d 01 22 12 72 |ge2lo= 1700..".r| 000001f0 61 6e 67 65 32 68 69 3d 20 31 37 30 39 0d 01 2c |ange2hi= 1709..,| 00000200 12 72 61 6e 67 65 33 6c 6f 3d 20 20 20 20 30 0d |.range3lo= 0.| 00000210 01 36 12 72 61 6e 67 65 33 68 69 3d 20 39 39 39 |.6.range3hi= 999| 00000220 39 0d 01 40 05 e1 0d 01 4a 0b dd f2 61 73 73 65 |9..@....J...asse| 00000230 6d 0d 01 54 12 e3 20 4c 25 3d 30 20 b8 20 32 20 |m..T.. L%=0 . 2 | 00000240 88 20 32 0d 01 5e 13 50 25 3d 63 6f 64 65 3a 5b |. 2..^.P%=code:[| 00000250 4f 50 54 20 4c 25 0d 01 68 0a 2e 73 74 61 72 74 |OPT L%..h..start| 00000260 0d 01 72 16 20 4c 44 58 20 23 26 31 43 3a 4c 44 |..r. LDX #&1C:LD| 00000270 41 20 23 26 30 30 0d 01 7c 0a 2e 63 6c 65 61 72 |A #&00..|..clear| 00000280 0d 01 86 11 20 53 54 41 20 63 6f 75 6e 74 73 2c |.... STA counts,| 00000290 58 0d 01 90 12 20 44 45 58 3a 42 50 4c 20 63 6c |X.... DEX:BPL cl| 000002a0 65 61 72 0d 01 9a 0c 20 50 48 50 3a 53 45 49 0d |ear.... PHP:SEI.| 000002b0 01 a4 1b 20 4c 44 41 20 69 72 71 31 76 2b 30 3a |... LDA irq1v+0:| 000002c0 53 54 41 20 6f 6c 64 76 2b 31 0d 01 ae 1b 20 4c |STA oldv+1.... L| 000002d0 44 41 20 69 72 71 31 76 2b 31 3a 53 54 41 20 6f |DA irq1v+1:STA o| 000002e0 6c 64 76 2b 32 0d 01 b8 21 20 4c 44 41 20 23 69 |ldv+2...! LDA #i| 000002f0 6e 74 72 70 74 20 83 32 35 36 3a 53 54 41 20 69 |ntrpt .256:STA i| 00000300 72 71 31 76 2b 30 0d 01 c2 21 20 4c 44 41 20 23 |rq1v+0...! LDA #| 00000310 69 6e 74 72 70 74 20 81 32 35 36 3a 53 54 41 20 |intrpt .256:STA | 00000320 69 72 71 31 76 2b 31 0d 01 cc 18 20 4c 44 41 20 |irq1v+1.... LDA | 00000330 74 31 6c 68 3a 53 54 41 20 6f 6c 64 74 31 6c 0d |t1lh:STA oldt1l.| 00000340 01 d6 18 20 4c 44 41 20 23 64 65 6c 61 79 3a 53 |... LDA #delay:S| 00000350 54 41 20 74 31 6c 68 0d 01 e0 08 20 50 4c 50 0d |TA t1lh.... PLP.| 00000360 01 ea 0b 20 4c 44 59 20 23 32 0d 01 f4 09 2e 6c |... LDY #2.....l| 00000370 6f 6f 70 0d 01 fe 0e 20 54 59 41 3a 41 53 4c 20 |oop.... TYA:ASL | 00000380 41 0d 02 08 0e 20 41 53 4c 20 41 3a 54 41 58 0d |A.... ASL A:TAX.| 00000390 02 12 12 20 4c 44 41 20 6c 69 6e 65 73 2b 32 2c |... LDA lines+2,| 000003a0 58 0d 02 1c 11 20 84 41 20 6c 69 6e 65 73 2b 33 |X.... .A lines+3| 000003b0 2c 58 0d 02 26 0f 20 42 45 51 20 72 65 70 65 61 |,X..&. BEQ repea| 000003c0 74 0d 02 30 0d 20 4c 44 41 20 23 26 30 30 0d 02 |t..0. LDA #&00..| 000003d0 3a 0f 20 53 54 41 20 69 6e 74 61 2b 32 0d 02 44 |:. STA inta+2..D| 000003e0 0f 20 53 54 41 20 69 6e 74 61 2b 33 0d 02 4e 1d |. STA inta+3..N.| 000003f0 20 4c 44 41 20 6c 69 6e 65 73 2b 30 2c 58 3a 53 | LDA lines+0,X:S| 00000400 54 41 20 69 6e 74 61 2b 30 0d 02 58 1d 20 4c 44 |TA inta+0..X. LD| 00000410 41 20 6c 69 6e 65 73 2b 31 2c 58 3a 53 54 41 20 |A lines+1,X:STA | 00000420 69 6e 74 61 2b 31 0d 02 62 0c 20 54 59 41 3a 50 |inta+1..b. TYA:P| 00000430 48 41 0d 02 6c 10 20 4a 53 52 20 6c 69 6e 73 72 |HA..l. JSR linsr| 00000440 63 68 0d 02 76 0c 20 50 4c 41 3a 54 41 59 0d 02 |ch..v. PLA:TAY..| 00000450 80 0f 20 42 43 43 20 6c 66 6f 75 6e 64 0d 02 8a |.. BCC lfound...| 00000460 08 20 43 4c 43 0d 02 94 23 20 4c 44 41 20 70 74 |. CLC...# LDA pt| 00000470 72 2b 30 3a 41 44 43 20 23 31 3a 53 54 41 20 61 |r+0:ADC #1:STA a| 00000480 64 64 72 73 2b 30 2c 58 0d 02 9e 23 20 4c 44 41 |ddrs+0,X...# LDA| 00000490 20 70 74 72 2b 31 3a 41 44 43 20 23 30 3a 53 54 | ptr+1:ADC #0:ST| 000004a0 41 20 61 64 64 72 73 2b 31 2c 58 0d 02 a8 0e 20 |A addrs+1,X.... | 000004b0 4a 4d 50 20 75 70 70 65 72 0d 02 b2 0b 2e 6c 66 |JMP upper.....lf| 000004c0 6f 75 6e 64 0d 02 bc 08 20 53 45 43 0d 02 c6 23 |ound.... SEC...#| 000004d0 20 4c 44 41 20 70 74 72 2b 30 3a 53 42 43 20 23 | LDA ptr+0:SBC #| 000004e0 32 3a 53 54 41 20 61 64 64 72 73 2b 30 2c 58 0d |2:STA addrs+0,X.| 000004f0 02 d0 23 20 4c 44 41 20 70 74 72 2b 31 3a 53 42 |..# LDA ptr+1:SB| 00000500 43 20 23 30 3a 53 54 41 20 61 64 64 72 73 2b 31 |C #0:STA addrs+1| 00000510 2c 58 0d 02 da 0a 2e 75 70 70 65 72 0d 02 e4 08 |,X.....upper....| 00000520 20 43 4c 43 0d 02 ee 24 20 4c 44 41 20 6c 69 6e | CLC...$ LDA lin| 00000530 65 73 2b 32 2c 58 3a 41 44 43 20 23 31 3a 53 54 |es+2,X:ADC #1:ST| 00000540 41 20 69 6e 74 61 2b 30 0d 02 f8 24 20 4c 44 41 |A inta+0...$ LDA| 00000550 20 6c 69 6e 65 73 2b 33 2c 58 3a 41 44 43 20 23 | lines+3,X:ADC #| 00000560 30 3a 53 54 41 20 69 6e 74 61 2b 31 0d 03 02 0c |0:STA inta+1....| 00000570 20 54 59 41 3a 50 48 41 0d 03 0c 10 20 4a 53 52 | TYA:PHA.... JSR| 00000580 20 6c 69 6e 73 72 63 68 0d 03 16 0c 20 50 4c 41 | linsrch.... PLA| 00000590 3a 54 41 59 0d 03 20 0f 20 42 43 43 20 75 66 6f |:TAY.. . BCC ufo| 000005a0 75 6e 64 0d 03 2a 1c 20 4c 44 41 20 70 74 72 2b |und..*. LDA ptr+| 000005b0 30 3a 53 54 41 20 61 64 64 72 73 2b 32 2c 58 0d |0:STA addrs+2,X.| 000005c0 03 34 1c 20 4c 44 41 20 70 74 72 2b 31 3a 53 54 |.4. LDA ptr+1:ST| 000005d0 41 20 61 64 64 72 73 2b 33 2c 58 0d 03 3e 0f 20 |A addrs+3,X..>. | 000005e0 4a 4d 50 20 72 65 70 65 61 74 0d 03 48 0b 2e 75 |JMP repeat..H..u| 000005f0 66 6f 75 6e 64 0d 03 52 08 20 53 45 43 0d 03 5c |found..R. SEC..\| 00000600 23 20 4c 44 41 20 70 74 72 2b 30 3a 53 42 43 20 |# LDA ptr+0:SBC | 00000610 23 33 3a 53 54 41 20 61 64 64 72 73 2b 32 2c 58 |#3:STA addrs+2,X| 00000620 0d 03 66 23 20 4c 44 41 20 70 74 72 2b 31 3a 53 |..f# LDA ptr+1:S| 00000630 42 43 20 23 30 3a 53 54 41 20 61 64 64 72 73 2b |BC #0:STA addrs+| 00000640 33 2c 58 0d 03 70 0b 2e 72 65 70 65 61 74 0d 03 |3,X..p..repeat..| 00000650 7a 11 20 44 45 59 3a 42 50 4c 20 6c 6f 6f 70 0d |z. DEY:BPL loop.| 00000660 03 84 0f 20 44 45 43 20 61 63 74 69 76 65 0d 03 |... DEC active..| 00000670 8e 08 20 52 54 53 0d 03 98 0b 2e 69 6e 74 72 70 |.. RTS.....intrp| 00000680 74 0d 03 a2 0c 20 42 49 54 20 69 66 72 0d 03 ac |t.... BIT ifr...| 00000690 0d 20 42 50 4c 20 6f 6c 64 76 0d 03 b6 0f 20 42 |. BPL oldv.... B| 000006a0 49 54 20 61 63 74 69 76 65 0d 03 c0 0d 20 42 50 |IT active.... BP| 000006b0 4c 20 6f 6c 64 76 0d 03 ca 13 20 4c 44 41 20 6f |L oldv.... LDA o| 000006c0 6c 64 61 63 63 3a 50 48 41 0d 03 d4 14 20 54 58 |ldacc:PHA.... TX| 000006d0 41 3a 50 48 41 3a 54 59 41 3a 50 48 41 0d 03 de |A:PHA:TYA:PHA...| 000006e0 0c 20 4c 44 41 20 69 66 72 0d 03 e8 0a 20 41 53 |. LDA ifr.... AS| 000006f0 4c 20 41 0d 03 f2 0d 20 42 50 4c 20 65 78 69 74 |L A.... BPL exit| 00000700 0d 03 fc 1d 20 49 4e 43 20 65 6e 74 72 69 65 73 |.... INC entries| 00000710 2b 30 3a 42 4e 45 20 67 65 74 6c 69 6e 0d 04 06 |+0:BNE getlin...| 00000720 1d 20 49 4e 43 20 65 6e 74 72 69 65 73 2b 31 3a |. INC entries+1:| 00000730 42 4e 45 20 67 65 74 6c 69 6e 0d 04 10 1d 20 49 |BNE getlin.... I| 00000740 4e 43 20 65 6e 74 72 69 65 73 2b 32 3a 42 4e 45 |NC entries+2:BNE| 00000750 20 67 65 74 6c 69 6e 0d 04 1a 12 20 49 4e 43 20 | getlin.... INC | 00000760 65 6e 74 72 69 65 73 2b 33 0d 04 24 0b 2e 67 65 |entries+3..$..ge| 00000770 74 6c 69 6e 0d 04 2e 0b 20 4c 44 59 20 23 32 0d |tlin.... LDY #2.| 00000780 04 38 08 2e 72 70 74 0d 04 42 0e 20 54 59 41 3a |.8..rpt..B. TYA:| 00000790 41 53 4c 20 41 0d 04 4c 0e 20 41 53 4c 20 41 3a |ASL A..L. ASL A:| 000007a0 54 41 58 0d 04 56 08 20 53 45 43 0d 04 60 0f 20 |TAX..V. SEC..`. | 000007b0 4c 44 41 20 6c 69 6e 70 74 72 0d 04 6a 12 20 53 |LDA linptr..j. S| 000007c0 42 43 20 61 64 64 72 73 2b 30 2c 58 0d 04 74 11 |BC addrs+0,X..t.| 000007d0 20 4c 44 41 20 6c 69 6e 70 74 72 2b 31 0d 04 7e | LDA linptr+1..~| 000007e0 12 20 53 42 43 20 61 64 64 72 73 2b 31 2c 58 0d |. SBC addrs+1,X.| 000007f0 04 88 0d 20 42 43 43 20 6e 65 78 74 0d 04 92 12 |... BCC next....| 00000800 20 4c 44 41 20 61 64 64 72 73 2b 32 2c 58 0d 04 | LDA addrs+2,X..| 00000810 9c 0f 20 53 42 43 20 6c 69 6e 70 74 72 0d 04 a6 |.. SBC linptr...| 00000820 12 20 4c 44 41 20 61 64 64 72 73 2b 33 2c 58 0d |. LDA addrs+3,X.| 00000830 04 b0 11 20 53 42 43 20 6c 69 6e 70 74 72 2b 31 |... SBC linptr+1| 00000840 0d 04 ba 0d 20 42 43 43 20 6e 65 78 74 0d 04 c4 |.... BCC next...| 00000850 1c 20 49 4e 43 20 63 6f 75 6e 74 73 2b 30 2c 58 |. INC counts+0,X| 00000860 3a 42 4e 45 20 6e 65 78 74 0d 04 ce 1c 20 49 4e |:BNE next.... IN| 00000870 43 20 63 6f 75 6e 74 73 2b 31 2c 58 3a 42 4e 45 |C counts+1,X:BNE| 00000880 20 6e 65 78 74 0d 04 d8 1c 20 49 4e 43 20 63 6f | next.... INC co| 00000890 75 6e 74 73 2b 32 2c 58 3a 42 4e 45 20 6e 65 78 |unts+2,X:BNE nex| 000008a0 74 0d 04 e2 13 20 49 4e 43 20 63 6f 75 6e 74 73 |t.... INC counts| 000008b0 2b 33 2c 58 0d 04 ec 09 2e 6e 65 78 74 0d 04 f6 |+3,X.....next...| 000008c0 10 20 44 45 59 3a 42 50 4c 20 72 70 74 0d 05 00 |. DEY:BPL rpt...| 000008d0 09 2e 65 78 69 74 0d 05 0a 14 20 50 4c 41 3a 54 |..exit.... PLA:T| 000008e0 41 59 3a 50 4c 41 3a 54 41 58 0d 05 14 13 20 50 |AY:PLA:TAX.... P| 000008f0 4c 41 3a 53 54 41 20 6f 6c 64 61 63 63 0d 05 1e |LA:STA oldacc...| 00000900 09 2e 6f 6c 64 76 0d 05 28 0e 20 4a 4d 50 20 26 |..oldv..(. JMP &| 00000910 30 30 30 30 0d 05 32 0b 2e 66 69 6e 69 73 68 0d |0000..2..finish.| 00000920 05 3c 16 20 4c 44 41 20 23 30 3a 53 54 41 20 61 |.<. LDA #0:STA a| 00000930 63 74 69 76 65 0d 05 46 0c 20 50 48 50 3a 53 45 |ctive..F. PHP:SE| 00000940 49 0d 05 50 1b 20 4c 44 41 20 6f 6c 64 76 2b 31 |I..P. LDA oldv+1| 00000950 3a 53 54 41 20 69 72 71 31 76 2b 30 0d 05 5a 1b |:STA irq1v+0..Z.| 00000960 20 4c 44 41 20 6f 6c 64 76 2b 32 3a 53 54 41 20 | LDA oldv+2:STA | 00000970 69 72 71 31 76 2b 31 0d 05 64 18 20 4c 44 41 20 |irq1v+1..d. LDA | 00000980 6f 6c 64 74 31 6c 3a 53 54 41 20 74 31 6c 68 0d |oldt1l:STA t1lh.| 00000990 05 6e 0c 20 50 4c 50 3a 52 54 53 0d 05 78 0a 2e |.n. PLP:RTS..x..| 000009a0 6c 69 6e 65 73 0d 05 82 15 20 4f 50 54 20 a4 77 |lines.... OPT .w| 000009b0 28 72 61 6e 67 65 31 6c 6f 29 0d 05 8c 15 20 4f |(range1lo).... O| 000009c0 50 54 20 a4 77 28 72 61 6e 67 65 31 68 69 29 0d |PT .w(range1hi).| 000009d0 05 96 15 20 4f 50 54 20 a4 77 28 72 61 6e 67 65 |... OPT .w(range| 000009e0 32 6c 6f 29 0d 05 a0 15 20 4f 50 54 20 a4 77 28 |2lo).... OPT .w(| 000009f0 72 61 6e 67 65 32 68 69 29 0d 05 aa 15 20 4f 50 |range2hi).... OP| 00000a00 54 20 a4 77 28 72 61 6e 67 65 33 6c 6f 29 0d 05 |T .w(range3lo)..| 00000a10 b4 15 20 4f 50 54 20 a4 77 28 72 61 6e 67 65 33 |.. OPT .w(range3| 00000a20 68 69 29 0d 05 be 0b 2e 63 6f 75 6e 74 73 0d 05 |hi).....counts..| 00000a30 c8 0e 20 4f 50 54 20 a4 64 28 30 29 0d 05 d2 0e |.. OPT .d(0)....| 00000a40 20 4f 50 54 20 a4 64 28 30 29 0d 05 dc 0e 20 4f | OPT .d(0).... O| 00000a50 50 54 20 a4 64 28 30 29 0d 05 e6 0c 2e 65 6e 74 |PT .d(0).....ent| 00000a60 72 69 65 73 0d 05 f0 0e 20 4f 50 54 20 a4 64 28 |ries.... OPT .d(| 00000a70 30 29 0d 05 fa 0a 2e 61 64 64 72 73 0d 06 04 18 |0).....addrs....| 00000a80 20 4f 50 54 20 a4 77 28 30 29 3a 4f 50 54 20 a4 | OPT .w(0):OPT .| 00000a90 77 28 30 29 0d 06 0e 18 20 4f 50 54 20 a4 77 28 |w(0).... OPT .w(| 00000aa0 30 29 3a 4f 50 54 20 a4 77 28 30 29 0d 06 18 18 |0):OPT .w(0)....| 00000ab0 20 4f 50 54 20 a4 77 28 30 29 3a 4f 50 54 20 a4 | OPT .w(0):OPT .| 00000ac0 77 28 30 29 0d 06 22 15 2e 61 63 74 69 76 65 20 |w(0).."..active | 00000ad0 4f 50 54 20 a4 62 28 30 29 0d 06 2c 15 2e 6f 6c |OPT .b(0)..,..ol| 00000ae0 64 74 31 6c 20 4f 50 54 20 a4 62 28 30 29 0d 06 |dt1l OPT .b(0)..| 00000af0 36 0c 2e 63 6f 64 65 65 6e 64 0d 06 40 09 5d 3a |6..codeend..@.]:| 00000b00 ed 3a e1 0d 06 4a 1e dd a4 62 28 42 25 29 3a 3f |.:...J...b(B%):?| 00000b10 50 25 3d 42 25 3a 50 25 3d 50 25 2b 31 3a 3d 4c |P%=B%:P%=P%+1:=L| 00000b20 25 0d 06 54 1e dd a4 77 28 57 25 29 3a 21 50 25 |%..T...w(W%):!P%| 00000b30 3d 57 25 3a 50 25 3d 50 25 2b 32 3a 3d 4c 25 0d |=W%:P%=P%+2:=L%.| 00000b40 06 5e 1e dd a4 64 28 44 25 29 3a 21 50 25 3d 44 |.^...d(D%):!P%=D| 00000b50 25 3a 50 25 3d 50 25 2b 34 3a 3d 4c 25 0d 06 68 |%:P%=P%+4:=L%..h| 00000b60 0a dd f2 74 65 73 74 0d 06 72 22 f1 22 3d 3d 3d |...test..r"."===| 00000b70 20 54 69 6d 65 72 20 44 65 62 75 67 20 72 75 6e | Timer Debug run| 00000b80 6e 69 6e 67 20 3d 3d 3d 22 0d 06 7c 10 ea 20 40 |ning ==="..|.. @| 00000b90 25 3a 40 25 3d 26 39 30 35 0d 06 86 0b d6 20 73 |%:@%=&905..... s| 00000ba0 74 61 72 74 0d 06 90 10 e3 20 58 25 3d 31 20 b8 |tart..... X%=1 .| 00000bb0 20 31 30 30 0d 06 9a 0c 41 3d b5 28 30 2e 36 29 | 100....A=.(0.6)| 00000bc0 0d 06 a4 0c 41 3d 9b 28 30 2e 36 29 0d 06 ae 0e |....A=.(0.6)....| 00000bd0 ed 3a d6 20 66 69 6e 69 73 68 0d 06 b8 0f 45 25 |.:. finish....E%| 00000be0 3d 21 65 6e 74 72 69 65 73 0d 06 c2 14 f1 20 22 |=!entries..... "| 00000bf0 45 6e 74 72 69 65 73 20 3e 20 22 45 25 0d 06 cc |Entries > "E%...| 00000c00 0e e3 20 58 25 3d 30 20 b8 20 32 0d 06 d6 11 42 |.. X%=0 . 2....B| 00000c10 25 3d 6c 69 6e 65 73 2b 58 25 2a 34 0d 06 e0 1f |%=lines+X%*4....| 00000c20 4c 25 3d 42 25 21 30 80 26 46 46 46 46 3a 55 25 |L%=B%!0.&FFFF:U%| 00000c30 3d 42 25 21 32 80 26 46 46 46 46 0d 06 ea 11 42 |=B%!2.&FFFF....B| 00000c40 25 3d 61 64 64 72 73 2b 58 25 2a 34 0d 06 f4 21 |%=addrs+X%*4...!| 00000c50 61 31 25 3d 42 25 21 30 80 26 46 46 46 46 3a 61 |a1%=B%!0.&FFFF:a| 00000c60 32 25 3d 42 25 21 32 80 26 46 46 46 46 0d 06 fe |2%=B%!2.&FFFF...| 00000c70 14 43 25 3d 63 6f 75 6e 74 73 21 28 58 25 2a 34 |.C%=counts!(X%*4| 00000c80 29 0d 07 08 14 50 25 3d 31 30 30 2a 43 25 2f 45 |)....P%=100*C%/E| 00000c90 25 2b 30 2e 35 0d 07 12 18 f1 20 4c 25 22 20 28 |%+0.5..... L%" (| 00000ca0 26 22 3b 7e 61 31 25 22 29 22 89 32 3b 0d 07 1c |&";~a1%")".2;...| 00000cb0 18 f1 20 55 25 22 20 28 26 22 3b 7e 61 32 25 22 |.. U%" (&";~a2%"| 00000cc0 29 22 89 33 3b 0d 07 26 18 f1 20 22 3d 3d 3e 20 |)".3;..&.. "==> | 00000cd0 22 43 25 22 20 28 22 50 25 22 25 29 22 0d 07 30 |"C%" ("P%"%)"..0| 00000ce0 07 ed 3a e1 0d 07 3a 0b dd 20 f2 73 61 76 65 0d |..:...:.. .save.| 00000cf0 07 44 1a f1 22 54 6f 20 73 61 76 65 2c 20 63 6f |.D.."To save, co| 00000d00 70 79 20 74 68 69 73 3a 22 0d 07 4e 27 f1 89 31 |py this:"..N'..1| 00000d10 22 2a 53 41 56 45 20 54 63 6f 64 65 20 22 c3 7e |"*SAVE Tcode ".~| 00000d20 63 6f 64 65 22 20 22 c3 7e 63 6f 64 65 65 6e 64 |code" ".~codeend| 00000d30 0d 07 58 05 e1 0d ff |..X....| 00000d37