Home » Archimedes archive » Acorn User » AU 1994-07.adf » !BasicProg_BasicProg » Listing1

Listing1

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 » Archimedes archive » Acorn User » AU 1994-07.adf » !BasicProg_BasicProg
Filename: Listing1
Read OK:
File size: 019B bytes
Load address: 0000
Exec address: 0000
File contents
    1REM text file scrambler
    2:
    3key% = 1143697892
    4file% = OPENIN("<BackToBasics$Dir>.Text")
    5IF file%=0 PRINT "File cannot be found": QUIT
    6size% = EXT#file%
    7DIM memory% size%
    8FOR i% = 0 TO size%
    9  memory%?i% = BGET#file%
   10NEXT
   11CLOSE# file%
   12FOR j% = 0 TO size% STEP 4
   13  memory%!j% = memory%!j% EOR key%
   14NEXT
   15file% = OPENUP("<BackToBasics$Dir>.Text")
   16FOR k% = 0 TO size%
   17  BPUT#file%, memory%?k%
   18NEXT k%
   19CLOSE# file%
   20END
� text file scrambler
:
key% = 1143697892
(file% = �("<BackToBasics$Dir>.Text")
*� file%=0 � "File cannot be found": Ș
size% = �#file%
� memory% size%
� i% = 0 � size%
	  memory%?i% = �#file%

�
�# file%
� j% = 0 � size% � 4

$  memory%!j% = memory%!j% � key%
�
(file% = �("<BackToBasics$Dir>.Text")
� k% = 0 � size%
  �#file%, memory%?k%
� k%
�# file%
�
�
00000000  0d 00 01 19 f4 20 74 65  78 74 20 66 69 6c 65 20  |..... text file |
00000010  73 63 72 61 6d 62 6c 65  72 0d 00 02 05 3a 0d 00  |scrambler....:..|
00000020  03 15 6b 65 79 25 20 3d  20 31 31 34 33 36 39 37  |..key% = 1143697|
00000030  38 39 32 0d 00 04 28 66  69 6c 65 25 20 3d 20 8e  |892...(file% = .|
00000040  28 22 3c 42 61 63 6b 54  6f 42 61 73 69 63 73 24  |("<BackToBasics$|
00000050  44 69 72 3e 2e 54 65 78  74 22 29 0d 00 05 2a e7  |Dir>.Text")...*.|
00000060  20 66 69 6c 65 25 3d 30  20 f1 20 22 46 69 6c 65  | file%=0 . "File|
00000070  20 63 61 6e 6e 6f 74 20  62 65 20 66 6f 75 6e 64  | cannot be found|
00000080  22 3a 20 c8 98 0d 00 06  13 73 69 7a 65 25 20 3d  |": ......size% =|
00000090  20 a2 23 66 69 6c 65 25  0d 00 07 13 de 20 6d 65  | .#file%..... me|
000000a0  6d 6f 72 79 25 20 73 69  7a 65 25 0d 00 08 14 e3  |mory% size%.....|
000000b0  20 69 25 20 3d 20 30 20  b8 20 73 69 7a 65 25 0d  | i% = 0 . size%.|
000000c0  00 09 1a 20 20 6d 65 6d  6f 72 79 25 3f 69 25 20  |...  memory%?i% |
000000d0  3d 20 9a 23 66 69 6c 65  25 0d 00 0a 05 ed 0d 00  |= .#file%.......|
000000e0  0b 0c d9 23 20 66 69 6c  65 25 0d 00 0c 18 e3 20  |...# file%..... |
000000f0  6a 25 20 3d 20 30 20 b8  20 73 69 7a 65 25 20 88  |j% = 0 . size% .|
00000100  20 34 0d 00 0d 24 20 20  6d 65 6d 6f 72 79 25 21  | 4...$  memory%!|
00000110  6a 25 20 3d 20 6d 65 6d  6f 72 79 25 21 6a 25 20  |j% = memory%!j% |
00000120  82 20 6b 65 79 25 0d 00  0e 05 ed 0d 00 0f 28 66  |. key%........(f|
00000130  69 6c 65 25 20 3d 20 ad  28 22 3c 42 61 63 6b 54  |ile% = .("<BackT|
00000140  6f 42 61 73 69 63 73 24  44 69 72 3e 2e 54 65 78  |oBasics$Dir>.Tex|
00000150  74 22 29 0d 00 10 14 e3  20 6b 25 20 3d 20 30 20  |t")..... k% = 0 |
00000160  b8 20 73 69 7a 65 25 0d  00 11 19 20 20 d5 23 66  |. size%....  .#f|
00000170  69 6c 65 25 2c 20 6d 65  6d 6f 72 79 25 3f 6b 25  |ile%, memory%?k%|
00000180  0d 00 12 08 ed 20 6b 25  0d 00 13 0c d9 23 20 66  |..... k%.....# f|
00000190  69 6c 65 25 0d 00 14 05  e0 0d ff                 |ile%.......|
0000019b