Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_39.ADF » P/Counter
P/Counter
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 » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_39.ADF |
Filename: | P/Counter |
Read OK: | ✔ |
File size: | 01E6 bytes |
Load address: | FFFFFB48 |
Exec address: | FFFFF295 |
Duplicates
There are 2 duplicate copies of this file in the archive:
- AEW website » eug » eug_5_25_discs_Eug-39_D-EUG39.dsd » U.COUNTER
- Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_39.ADF » P/Counter
- Personal collection » Acorn hard disk » zipped_disks » elk03 » eug39/P/Counter
File contents
10REM Word Counter 20REM (C)1998 Tim Hackett 30VDU23,1,0,0,0,0,0,0,0,0:REM Set cursor=off 40INPUT"Enter name of file to be counted:"f$ 50F=OPENINf$:lof%=EXT#F:CLOSE#F 60DIMblock% lof% 70OSCLI"LOAD "+f$+" "+STR$~block% 80sofar%=0:data%=0:C%=0:O%=TRUE:REM Where in the file we are and were 90FORoffset%=0TO(lof%-1) 100last%=data%:data%=?(block%+offset%):C%=C%+1 110IFINSTR(".,!? -",CHR$(data%))<>0 ANDINSTR(".,!? -0123456789",CHR$(last%))=0 THENsofar%=sofar%+1 120IF(100*C%/lof%)<>O% THENO%=(100*C%/lof%):PRINTTAB(5,5);O%"%" 130NEXT 140PRINT sofar%" words"
� Word Counter � (C)1998 Tim Hackett *�23,1,0,0,0,0,0,0,0,0:� Set cursor=off (*�"Enter name of file to be counted:"f$ 2F=�f$:lof%=�#F:�#F <�block% lof% F�"LOAD "+f$+" "+�~block% PBsofar%=0:data%=0:C%=0:O%=�:� Where in the file we are and were Z�offset%=0�(lof%-1) d/last%=data%:data%=?(block%+offset%):C%=C%+1 nM�".,!? -",�(data%))<>0 ��".,!? -0123456789",�(last%))=0 �sofar%=sofar%+1 x5�(100*C%/lof%)<>O% �O%=(100*C%/lof%):�5,5);O%"%" �� �� sofar%" words" �
00000000 0d 00 0a 12 f4 20 57 6f 72 64 20 43 6f 75 6e 74 |..... Word Count| 00000010 65 72 0d 00 14 19 f4 20 28 43 29 31 39 39 38 20 |er..... (C)1998 | 00000020 54 69 6d 20 48 61 63 6b 65 74 74 0d 00 1e 2a ef |Tim Hackett...*.| 00000030 32 33 2c 31 2c 30 2c 30 2c 30 2c 30 2c 30 2c 30 |23,1,0,0,0,0,0,0| 00000040 2c 30 2c 30 3a f4 20 53 65 74 20 63 75 72 73 6f |,0,0:. Set curso| 00000050 72 3d 6f 66 66 0d 00 28 2a e8 22 45 6e 74 65 72 |r=off..(*."Enter| 00000060 20 6e 61 6d 65 20 6f 66 20 66 69 6c 65 20 74 6f | name of file to| 00000070 20 62 65 20 63 6f 75 6e 74 65 64 3a 22 66 24 0d | be counted:"f$.| 00000080 00 32 16 46 3d 8e 66 24 3a 6c 6f 66 25 3d a2 23 |.2.F=.f$:lof%=.#| 00000090 46 3a d9 23 46 0d 00 3c 10 de 62 6c 6f 63 6b 25 |F:.#F..<..block%| 000000a0 20 6c 6f 66 25 0d 00 46 1c ff 22 4c 4f 41 44 20 | lof%..F.."LOAD | 000000b0 22 2b 66 24 2b 22 20 22 2b c3 7e 62 6c 6f 63 6b |"+f$+" "+.~block| 000000c0 25 0d 00 50 42 73 6f 66 61 72 25 3d 30 3a 64 61 |%..PBsofar%=0:da| 000000d0 74 61 25 3d 30 3a 43 25 3d 30 3a 4f 25 3d b9 3a |ta%=0:C%=0:O%=.:| 000000e0 f4 20 57 68 65 72 65 20 69 6e 20 74 68 65 20 66 |. Where in the f| 000000f0 69 6c 65 20 77 65 20 61 72 65 20 61 6e 64 20 77 |ile we are and w| 00000100 65 72 65 0d 00 5a 17 e3 6f 66 66 73 65 74 25 3d |ere..Z..offset%=| 00000110 30 b8 28 6c 6f 66 25 2d 31 29 0d 00 64 2f 6c 61 |0.(lof%-1)..d/la| 00000120 73 74 25 3d 64 61 74 61 25 3a 64 61 74 61 25 3d |st%=data%:data%=| 00000130 3f 28 62 6c 6f 63 6b 25 2b 6f 66 66 73 65 74 25 |?(block%+offset%| 00000140 29 3a 43 25 3d 43 25 2b 31 0d 00 6e 4d e7 a7 22 |):C%=C%+1..nM.."| 00000150 2e 2c 21 3f 20 2d 22 2c bd 28 64 61 74 61 25 29 |.,!? -",.(data%)| 00000160 29 3c 3e 30 20 80 a7 22 2e 2c 21 3f 20 2d 30 31 |)<>0 ..".,!? -01| 00000170 32 33 34 35 36 37 38 39 22 2c bd 28 6c 61 73 74 |23456789",.(last| 00000180 25 29 29 3d 30 20 8c 73 6f 66 61 72 25 3d 73 6f |%))=0 .sofar%=so| 00000190 66 61 72 25 2b 31 0d 00 78 35 e7 28 31 30 30 2a |far%+1..x5.(100*| 000001a0 43 25 2f 6c 6f 66 25 29 3c 3e 4f 25 20 8c 4f 25 |C%/lof%)<>O% .O%| 000001b0 3d 28 31 30 30 2a 43 25 2f 6c 6f 66 25 29 3a f1 |=(100*C%/lof%):.| 000001c0 8a 35 2c 35 29 3b 4f 25 22 25 22 0d 00 82 05 ed |.5,5);O%"%".....| 000001d0 0d 00 8c 14 f1 20 73 6f 66 61 72 25 22 20 77 6f |..... sofar%" wo| 000001e0 72 64 73 22 0d ff |rds"..| 000001e6