Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_18.ADF » F/C/ENCODE
F/C/ENCODE
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_18.ADF |
Filename: | F/C/ENCODE |
Read OK: | ✔ |
File size: | 02DC bytes |
Load address: | FFFF1D00 |
Exec address: | FFFF8023 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- AEW website » eug » eug_5_25_discs_Eug-18_D-EUG18.dsd » C.ENCODE
- Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_18.ADF » F/C/ENCODE
File contents
1REM ***************************** 2REM TEXT COMPRESSION ENCODER 3REM by Richard Dimond, March 1994 4REM from E.U. August 1987 5REM ***************************** 6REM 10HIMEM=&2800 20S%=HIMEM:I%=0:J%=0 30DIM nib%(2) 40INPUT'"File to encode "f$ 50X=OPENUP f$ 60PROCentercode 70CLOSE#X 80INPUT'"File to save "fn$ 90OSCLI"SAVE "+fn$+" 2800 "+STR$~(&2800+J%) 100END 330DEFPROCentercode 340i%=0:j%=0 350F=TRUE 360REPEAT 370byte%=BGET#X 375IFbyte%=&1A byte%=&20 380Q%=INSTR(" etaonri",CHR$(byte%)) 390IF Q% PROCcode:F=NOT F:GOTO410 400PROCclear 410I%=I%+1:UNTIL EOF#X 420ENDPROC 430: 440DEFPROCcode 450IF F THENi%=Q%+7:ENDPROC 460IF NOT F THEN j%=Q%+7 470PROCout 480ENDPROC 490: 500DEFPROCclear 510IF NOT F THEN 560 520i%=byte% DIV16 530j%=byte% MOD16 540PROCout 550ENDPROC 560j%=byte% DIV16 570PROCout 580i%=byte% MOD16 590ENDPROC 600: 610DEFPROCout 620J%?S%=16*i%+j% 630J%=J%+1 640ENDPROC
#� ***************************** � TEXT COMPRESSION ENCODER #� by Richard Dimond, March 1994 � from E.U. August 1987 #� ***************************** � �=&2800 S%=�:I%=0:J%=0 � nib%(2) (�'"File to encode "f$ 2 X=� f$ <�entercode F�#X P�'"File to save "fn$ Z&�"SAVE "+fn$+" 2800 "+�~(&2800+J%) d� J��entercode T i%=0:j%=0 ^F=� h� r byte%=�#X w�byte%=&1A byte%=&20 |Q%=�" etaonri",�(byte%)) �� Q% �code:F=� F:�tZA � �clear �I%=I%+1:� �#X �� �: � ��code �� F �i%=Q%+7:� �� � F � j%=Q%+7 ��out �� �: ���clear �� � F � �TpB i%=byte% �16 j%=byte% �16 �out &� 0j%=byte% �16 :�out Di%=byte% �16 N� X: b ��out lJ%?S%=16*i%+j% vJ%=J%+1 �� �
00000000 0d 00 01 23 f4 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |...#. **********| 00000010 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00000020 2a 2a 2a 0d 00 02 1e f4 20 54 45 58 54 20 43 4f |***..... TEXT CO| 00000030 4d 50 52 45 53 53 49 4f 4e 20 45 4e 43 4f 44 45 |MPRESSION ENCODE| 00000040 52 0d 00 03 23 f4 20 62 79 20 52 69 63 68 61 72 |R...#. by Richar| 00000050 64 20 44 69 6d 6f 6e 64 2c 20 4d 61 72 63 68 20 |d Dimond, March | 00000060 31 39 39 34 0d 00 04 1b f4 20 66 72 6f 6d 20 45 |1994..... from E| 00000070 2e 55 2e 20 41 75 67 75 73 74 20 31 39 38 37 0d |.U. August 1987.| 00000080 00 05 23 f4 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |..#. ***********| 00000090 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 000000a0 2a 2a 0d 00 06 05 f4 0d 00 0a 0b d3 3d 26 32 38 |**..........=&28| 000000b0 30 30 0d 00 14 12 53 25 3d 93 3a 49 25 3d 30 3a |00....S%=.:I%=0:| 000000c0 4a 25 3d 30 0d 00 1e 0d de 20 6e 69 62 25 28 32 |J%=0..... nib%(2| 000000d0 29 0d 00 28 19 e8 27 22 46 69 6c 65 20 74 6f 20 |)..(..'"File to | 000000e0 65 6e 63 6f 64 65 20 22 66 24 0d 00 32 0a 58 3d |encode "f$..2.X=| 000000f0 ad 20 66 24 0d 00 3c 0e f2 65 6e 74 65 72 63 6f |. f$..<..enterco| 00000100 64 65 0d 00 46 07 d9 23 58 0d 00 50 18 e8 27 22 |de..F..#X..P..'"| 00000110 46 69 6c 65 20 74 6f 20 73 61 76 65 20 22 66 6e |File to save "fn| 00000120 24 0d 00 5a 26 ff 22 53 41 56 45 20 22 2b 66 6e |$..Z&."SAVE "+fn| 00000130 24 2b 22 20 32 38 30 30 20 22 2b c3 7e 28 26 32 |$+" 2800 "+.~(&2| 00000140 38 30 30 2b 4a 25 29 0d 00 64 05 e0 0d 01 4a 0f |800+J%)..d....J.| 00000150 dd f2 65 6e 74 65 72 63 6f 64 65 0d 01 54 0d 69 |..entercode..T.i| 00000160 25 3d 30 3a 6a 25 3d 30 0d 01 5e 07 46 3d b9 0d |%=0:j%=0..^.F=..| 00000170 01 68 05 f5 0d 01 72 0d 62 79 74 65 25 3d 9a 23 |.h....r.byte%=.#| 00000180 58 0d 01 77 18 e7 62 79 74 65 25 3d 26 31 41 20 |X..w..byte%=&1A | 00000190 62 79 74 65 25 3d 26 32 30 0d 01 7c 1c 51 25 3d |byte%=&20..|.Q%=| 000001a0 a7 22 20 65 74 61 6f 6e 72 69 22 2c bd 28 62 79 |." etaonri",.(by| 000001b0 74 65 25 29 29 0d 01 86 1a e7 20 51 25 20 f2 63 |te%))..... Q% .c| 000001c0 6f 64 65 3a 46 3d ac 20 46 3a e5 8d 74 5a 41 0d |ode:F=. F:..tZA.| 000001d0 01 90 0a f2 63 6c 65 61 72 0d 01 9a 11 49 25 3d |....clear....I%=| 000001e0 49 25 2b 31 3a fd 20 c5 23 58 0d 01 a4 05 e1 0d |I%+1:. .#X......| 000001f0 01 ae 05 3a 0d 01 b8 0a dd f2 63 6f 64 65 0d 01 |...:......code..| 00000200 c2 12 e7 20 46 20 8c 69 25 3d 51 25 2b 37 3a e1 |... F .i%=Q%+7:.| 00000210 0d 01 cc 13 e7 20 ac 20 46 20 8c 20 6a 25 3d 51 |..... . F . j%=Q| 00000220 25 2b 37 0d 01 d6 08 f2 6f 75 74 0d 01 e0 05 e1 |%+7.....out.....| 00000230 0d 01 ea 05 3a 0d 01 f4 0b dd f2 63 6c 65 61 72 |....:......clear| 00000240 0d 01 fe 10 e7 20 ac 20 46 20 8c 20 8d 54 70 42 |..... . F . .TpB| 00000250 0d 02 08 10 69 25 3d 62 79 74 65 25 20 81 31 36 |....i%=byte% .16| 00000260 0d 02 12 10 6a 25 3d 62 79 74 65 25 20 83 31 36 |....j%=byte% .16| 00000270 0d 02 1c 08 f2 6f 75 74 0d 02 26 05 e1 0d 02 30 |.....out..&....0| 00000280 10 6a 25 3d 62 79 74 65 25 20 81 31 36 0d 02 3a |.j%=byte% .16..:| 00000290 08 f2 6f 75 74 0d 02 44 10 69 25 3d 62 79 74 65 |..out..D.i%=byte| 000002a0 25 20 83 31 36 0d 02 4e 05 e1 0d 02 58 05 3a 0d |% .16..N....X.:.| 000002b0 02 62 09 dd f2 6f 75 74 0d 02 6c 12 4a 25 3f 53 |.b...out..l.J%?S| 000002c0 25 3d 31 36 2a 69 25 2b 6a 25 0d 02 76 0b 4a 25 |%=16*i%+j%..v.J%| 000002d0 3d 4a 25 2b 31 0d 02 80 05 e1 0d ff |=J%+1.......| 000002dc