Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape15b_acorn_eu_1990_october.wav » R.Coder

R.Coder

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 tapes » Electron_User » Electron_User_tape15b_acorn_eu_1990_october.wav
Filename: R.Coder
Read OK:
File size: 059D bytes
Load address: FFFF1900
Exec address: FFFF8023
Duplicates

There are 3 duplicate copies of this file in the archive:

File contents
   10 REM Message encoder/decoder
   20 REM by Oliver Ramsden
   30 REM (c) The Micro User
   40 REM October 1990
   50 ON ERROR CLS:VDU 7:PRINT "ERROR!"':REPORT:PRINT" at line ";ERL''"Error number ";ERR'':PROCos("CLOSE"):END
   60 REPEAT:MODE 7:PRINT "MESSAGE ENCODER/DECODER"'STRING$(23,"=")''''"1) Encode message"''"2) Decode message"''"3) End program":REPEAT:A$=GET$:UNTIL INSTR("123",A$):IF A$="1" PROCencode ELSE IF A$="2" PROCdecode
   70 UNTIL A$="3":CLS:END
   80 DEFPROCencode:CLS:PRINT "MESSAGE ENCODER"'STRING$(15,"="):REPEAT:INPUT ''"Code number : "code%:UNTIL code%<060>>0:REPEAT:INPUT ''"Message to be encoded : "''message$:UNTIL message$<060>>"":coded$="":rnd=RND(-code%)
   90 FOR number=1 TO LEN message$:thisone=ASC(MID$(message$,number,1)):rnd=RND(256)-1:thisone=thisone EOR rnd:coded$=coded$+CHR$(thisone):NEXT
  100 REPEAT:INPUT ''"Filename to save the coded message under: "file$:UNTIL file$<060>>"":F%=OPENOUT file$:PRINT #F%,coded$:PROCos("CLOSE"):PRINT ''"Done."'"Press any key to continue...":A$=GET$:ENDPROC
  110 DEFPROCdecode:CLS:PRINT "MESSAGE DECODER"'STRING$(15,"="):REPEAT:INPUT ''"Code number : "code%:UNTIL code%<060>>0
  120 REPEAT:INPUT ''"Name of file containing the message to  be decoded : "file$:UNTIL file$<060>>"":message$="":rnd=RND(-code%):F%=OPENUP file$:INPUT #F%,coded$:PROCos("CLOSE")
  130 FOR number=1 TO LEN coded$:thisone=ASC(MID$(coded$,number,1)):rnd=RND(256)-1:thisone=thisone EOR rnd:message$=message$+CHR$(thisone):NEXT
  140 PRINT''"Shall I send the decoded message to the printer? (Y/N)":REPEAT:A$=GET$:UNTIL INSTR("YyNn",A$):IF A$="Y" OR A$="y" THEN VDU 2
  150 PRINT 'STRING$(40,"=")'"The decoded message is :-"''message$''STRING$(40,"="):VDU 3:PRINT "Press any key to continue...":A$=GET$:ENDPROC
  160 DEFPROCos($&700):LOCAL X%,Y%:X%=0:Y%=7:CALL &FFF7:ENDPROC

 � Message encoder/decoder
 � by Oliver Ramsden
 � (c) The Micro User
( � October 1990
2O � � �:� 7:� "ERROR!"':�:�" at line ";�''"Error number ";�'':�os("CLOSE"):�
<� �:� 7:� "MESSAGE ENCODER/DECODER"'�23,"=")''''"1) Encode message"''"2) Decode message"''"3) End program":�:A$=�:� �"123",A$):� A$="1" �encode � � A$="2" �decode
F � A$="3":�:�
P� ��encode:�:� "MESSAGE ENCODER"'�15,"="):�:� ''"Code number : "code%:� code%<060>>0:�:� ''"Message to be encoded : "''message$:� message$<060>>"":coded$="":rnd=�(-code%)
Zy � number=1 � � message$:thisone=�(�message$,number,1)):rnd=�(256)-1:thisone=thisone � rnd:coded$=coded$+�(thisone):�
d� �:� ''"Filename to save the coded message under: "file$:� file$<060>>"":F%=� file$:� #F%,coded$:�os("CLOSE"):� ''"Done."'"Press any key to continue...":A$=�:�
nW ��decode:�:� "MESSAGE DECODER"'�15,"="):�:� ''"Code number : "code%:� code%<060>>0
x� �:� ''"Name of file containing the message to  be decoded : "file$:� file$<060>>"":message$="":rnd=�(-code%):F%=� file$:� #F%,coded$:�os("CLOSE")
�y � number=1 � � coded$:thisone=�(�coded$,number,1)):rnd=�(256)-1:thisone=thisone � rnd:message$=message$+�(thisone):�
�m �''"Shall I send the decoded message to the printer? (Y/N)":�:A$=�:� �"YyNn",A$):� A$="Y" � A$="y" � � 2
�l � '�40,"=")'"The decoded message is :-"''message$''�40,"="):� 3:� "Press any key to continue...":A$=�:�
�, ��os($&700):� X%,Y%:X%=0:Y%=7:� &FFF7:�
�
00000000  0d 00 0a 1e 20 f4 20 4d  65 73 73 61 67 65 20 65  |.... . Message e|
00000010  6e 63 6f 64 65 72 2f 64  65 63 6f 64 65 72 0d 00  |ncoder/decoder..|
00000020  14 18 20 f4 20 62 79 20  4f 6c 69 76 65 72 20 52  |.. . by Oliver R|
00000030  61 6d 73 64 65 6e 0d 00  1e 19 20 f4 20 28 63 29  |amsden.... . (c)|
00000040  20 54 68 65 20 4d 69 63  72 6f 20 55 73 65 72 0d  | The Micro User.|
00000050  00 28 13 20 f4 20 4f 63  74 6f 62 65 72 20 31 39  |.(. . October 19|
00000060  39 30 0d 00 32 4f 20 ee  20 85 20 db 3a ef 20 37  |90..2O . . .:. 7|
00000070  3a f1 20 22 45 52 52 4f  52 21 22 27 3a f6 3a f1  |:. "ERROR!"':.:.|
00000080  22 20 61 74 20 6c 69 6e  65 20 22 3b 9e 27 27 22  |" at line ";.''"|
00000090  45 72 72 6f 72 20 6e 75  6d 62 65 72 20 22 3b 9f  |Error number ";.|
000000a0  27 27 3a f2 6f 73 28 22  43 4c 4f 53 45 22 29 3a  |'':.os("CLOSE"):|
000000b0  e0 0d 00 3c a5 20 f5 3a  eb 20 37 3a f1 20 22 4d  |...<. .:. 7:. "M|
000000c0  45 53 53 41 47 45 20 45  4e 43 4f 44 45 52 2f 44  |ESSAGE ENCODER/D|
000000d0  45 43 4f 44 45 52 22 27  c4 32 33 2c 22 3d 22 29  |ECODER"'.23,"=")|
000000e0  27 27 27 27 22 31 29 20  45 6e 63 6f 64 65 20 6d  |''''"1) Encode m|
000000f0  65 73 73 61 67 65 22 27  27 22 32 29 20 44 65 63  |essage"''"2) Dec|
00000100  6f 64 65 20 6d 65 73 73  61 67 65 22 27 27 22 33  |ode message"''"3|
00000110  29 20 45 6e 64 20 70 72  6f 67 72 61 6d 22 3a f5  |) End program":.|
00000120  3a 41 24 3d be 3a fd 20  a7 22 31 32 33 22 2c 41  |:A$=.:. ."123",A|
00000130  24 29 3a e7 20 41 24 3d  22 31 22 20 f2 65 6e 63  |$):. A$="1" .enc|
00000140  6f 64 65 20 8b 20 e7 20  41 24 3d 22 32 22 20 f2  |ode . . A$="2" .|
00000150  64 65 63 6f 64 65 0d 00  46 11 20 fd 20 41 24 3d  |decode..F. . A$=|
00000160  22 33 22 3a db 3a e0 0d  00 50 ad 20 dd f2 65 6e  |"3":.:...P. ..en|
00000170  63 6f 64 65 3a db 3a f1  20 22 4d 45 53 53 41 47  |code:.:. "MESSAG|
00000180  45 20 45 4e 43 4f 44 45  52 22 27 c4 31 35 2c 22  |E ENCODER"'.15,"|
00000190  3d 22 29 3a f5 3a e8 20  27 27 22 43 6f 64 65 20  |="):.:. ''"Code |
000001a0  6e 75 6d 62 65 72 20 3a  20 22 63 6f 64 65 25 3a  |number : "code%:|
000001b0  fd 20 63 6f 64 65 25 3c  30 36 30 3e 3e 30 3a f5  |. code%<060>>0:.|
000001c0  3a e8 20 27 27 22 4d 65  73 73 61 67 65 20 74 6f  |:. ''"Message to|
000001d0  20 62 65 20 65 6e 63 6f  64 65 64 20 3a 20 22 27  | be encoded : "'|
000001e0  27 6d 65 73 73 61 67 65  24 3a fd 20 6d 65 73 73  |'message$:. mess|
000001f0  61 67 65 24 3c 30 36 30  3e 3e 22 22 3a 63 6f 64  |age$<060>>"":cod|
00000200  65 64 24 3d 22 22 3a 72  6e 64 3d b3 28 2d 63 6f  |ed$="":rnd=.(-co|
00000210  64 65 25 29 0d 00 5a 79  20 e3 20 6e 75 6d 62 65  |de%)..Zy . numbe|
00000220  72 3d 31 20 b8 20 a9 20  6d 65 73 73 61 67 65 24  |r=1 . . message$|
00000230  3a 74 68 69 73 6f 6e 65  3d 97 28 c1 6d 65 73 73  |:thisone=.(.mess|
00000240  61 67 65 24 2c 6e 75 6d  62 65 72 2c 31 29 29 3a  |age$,number,1)):|
00000250  72 6e 64 3d b3 28 32 35  36 29 2d 31 3a 74 68 69  |rnd=.(256)-1:thi|
00000260  73 6f 6e 65 3d 74 68 69  73 6f 6e 65 20 82 20 72  |sone=thisone . r|
00000270  6e 64 3a 63 6f 64 65 64  24 3d 63 6f 64 65 64 24  |nd:coded$=coded$|
00000280  2b bd 28 74 68 69 73 6f  6e 65 29 3a ed 0d 00 64  |+.(thisone):...d|
00000290  a3 20 f5 3a e8 20 27 27  22 46 69 6c 65 6e 61 6d  |. .:. ''"Filenam|
000002a0  65 20 74 6f 20 73 61 76  65 20 74 68 65 20 63 6f  |e to save the co|
000002b0  64 65 64 20 6d 65 73 73  61 67 65 20 75 6e 64 65  |ded message unde|
000002c0  72 3a 20 22 66 69 6c 65  24 3a fd 20 66 69 6c 65  |r: "file$:. file|
000002d0  24 3c 30 36 30 3e 3e 22  22 3a 46 25 3d ae 20 66  |$<060>>"":F%=. f|
000002e0  69 6c 65 24 3a f1 20 23  46 25 2c 63 6f 64 65 64  |ile$:. #F%,coded|
000002f0  24 3a f2 6f 73 28 22 43  4c 4f 53 45 22 29 3a f1  |$:.os("CLOSE"):.|
00000300  20 27 27 22 44 6f 6e 65  2e 22 27 22 50 72 65 73  | ''"Done."'"Pres|
00000310  73 20 61 6e 79 20 6b 65  79 20 74 6f 20 63 6f 6e  |s any key to con|
00000320  74 69 6e 75 65 2e 2e 2e  22 3a 41 24 3d be 3a e1  |tinue...":A$=.:.|
00000330  0d 00 6e 57 20 dd f2 64  65 63 6f 64 65 3a db 3a  |..nW ..decode:.:|
00000340  f1 20 22 4d 45 53 53 41  47 45 20 44 45 43 4f 44  |. "MESSAGE DECOD|
00000350  45 52 22 27 c4 31 35 2c  22 3d 22 29 3a f5 3a e8  |ER"'.15,"="):.:.|
00000360  20 27 27 22 43 6f 64 65  20 6e 75 6d 62 65 72 20  | ''"Code number |
00000370  3a 20 22 63 6f 64 65 25  3a fd 20 63 6f 64 65 25  |: "code%:. code%|
00000380  3c 30 36 30 3e 3e 30 0d  00 78 96 20 f5 3a e8 20  |<060>>0..x. .:. |
00000390  27 27 22 4e 61 6d 65 20  6f 66 20 66 69 6c 65 20  |''"Name of file |
000003a0  63 6f 6e 74 61 69 6e 69  6e 67 20 74 68 65 20 6d  |containing the m|
000003b0  65 73 73 61 67 65 20 74  6f 20 20 62 65 20 64 65  |essage to  be de|
000003c0  63 6f 64 65 64 20 3a 20  22 66 69 6c 65 24 3a fd  |coded : "file$:.|
000003d0  20 66 69 6c 65 24 3c 30  36 30 3e 3e 22 22 3a 6d  | file$<060>>"":m|
000003e0  65 73 73 61 67 65 24 3d  22 22 3a 72 6e 64 3d b3  |essage$="":rnd=.|
000003f0  28 2d 63 6f 64 65 25 29  3a 46 25 3d ad 20 66 69  |(-code%):F%=. fi|
00000400  6c 65 24 3a e8 20 23 46  25 2c 63 6f 64 65 64 24  |le$:. #F%,coded$|
00000410  3a f2 6f 73 28 22 43 4c  4f 53 45 22 29 0d 00 82  |:.os("CLOSE")...|
00000420  79 20 e3 20 6e 75 6d 62  65 72 3d 31 20 b8 20 a9  |y . number=1 . .|
00000430  20 63 6f 64 65 64 24 3a  74 68 69 73 6f 6e 65 3d  | coded$:thisone=|
00000440  97 28 c1 63 6f 64 65 64  24 2c 6e 75 6d 62 65 72  |.(.coded$,number|
00000450  2c 31 29 29 3a 72 6e 64  3d b3 28 32 35 36 29 2d  |,1)):rnd=.(256)-|
00000460  31 3a 74 68 69 73 6f 6e  65 3d 74 68 69 73 6f 6e  |1:thisone=thison|
00000470  65 20 82 20 72 6e 64 3a  6d 65 73 73 61 67 65 24  |e . rnd:message$|
00000480  3d 6d 65 73 73 61 67 65  24 2b bd 28 74 68 69 73  |=message$+.(this|
00000490  6f 6e 65 29 3a ed 0d 00  8c 6d 20 f1 27 27 22 53  |one):....m .''"S|
000004a0  68 61 6c 6c 20 49 20 73  65 6e 64 20 74 68 65 20  |hall I send the |
000004b0  64 65 63 6f 64 65 64 20  6d 65 73 73 61 67 65 20  |decoded message |
000004c0  74 6f 20 74 68 65 20 70  72 69 6e 74 65 72 3f 20  |to the printer? |
000004d0  28 59 2f 4e 29 22 3a f5  3a 41 24 3d be 3a fd 20  |(Y/N)":.:A$=.:. |
000004e0  a7 22 59 79 4e 6e 22 2c  41 24 29 3a e7 20 41 24  |."YyNn",A$):. A$|
000004f0  3d 22 59 22 20 84 20 41  24 3d 22 79 22 20 8c 20  |="Y" . A$="y" . |
00000500  ef 20 32 0d 00 96 6c 20  f1 20 27 c4 34 30 2c 22  |. 2...l . '.40,"|
00000510  3d 22 29 27 22 54 68 65  20 64 65 63 6f 64 65 64  |=")'"The decoded|
00000520  20 6d 65 73 73 61 67 65  20 69 73 20 3a 2d 22 27  | message is :-"'|
00000530  27 6d 65 73 73 61 67 65  24 27 27 c4 34 30 2c 22  |'message$''.40,"|
00000540  3d 22 29 3a ef 20 33 3a  f1 20 22 50 72 65 73 73  |="):. 3:. "Press|
00000550  20 61 6e 79 20 6b 65 79  20 74 6f 20 63 6f 6e 74  | any key to cont|
00000560  69 6e 75 65 2e 2e 2e 22  3a 41 24 3d be 3a e1 0d  |inue...":A$=.:..|
00000570  00 a0 2c 20 dd f2 6f 73  28 24 26 37 30 30 29 3a  |.., ..os($&700):|
00000580  ea 20 58 25 2c 59 25 3a  58 25 3d 30 3a 59 25 3d  |. X%,Y%:X%=0:Y%=|
00000590  37 3a d6 20 26 46 46 46  37 3a e1 0d ff           |7:. &FFF7:...|
0000059d
R.Coder.m0
R.Coder.m1
R.Coder.m2
R.Coder.m4
R.Coder.m5