Home » Archimedes archive » Acorn Computing » 1994 11 subscription disc.adf » 9411s » BeebDisk/Primes6

BeebDisk/Primes6

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 Computing » 1994 11 subscription disc.adf » 9411s
Filename: BeebDisk/Primes6
Read OK:
File size: 0149 bytes
Load address: 0000
Exec address: 0000
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
   10 REM Primes in 6 columns
   20 REM by Jon Millington
   30 REM (c) Acorn Computing
   40 MODE 7:VDU 23;8202;0;0;0;
   50 PRINT " Primes in"CHR$129"red"
   60 PRINT'" 1"CHR$129"2 3"CHR$135;
   70 PRINT"�4"CHR$129" 5"CHR$135"�6"
   80 FOR A%=7 TO 1E6
   90 K%=0
  100 FOR N%=3 TO SQR A% STEP 2
  110 IF A% MOD N%=0 THEN K%=6
  120 NEXT N%
  130 IF A% MOD 2=0 THEN K%=6
  140 PRINT;CHR$(K%+129)A%;
  150 IF A% MOD 6=0 PRINT
  160 NEXT A%
 � Primes in 6 columns
 � by Jon Millington
 � (c) Acorn Computing
( � 7:� 23;8202;0;0;0;
2 � " Primes in"�129"red"
< �'" 1"�129"2 3"�135;
F �"�4"�129" 5"�135"�6"
P � A%=7 � 1E6
Z	 K%=0
d � N%=3 � � A% � 2
n � A% � N%=0 � K%=6
x	 � N%
� � A% � 2=0 � K%=6
� �;�(K%+129)A%;
� � A% � 6=0 �
�	 � A%
�
00000000  0d 00 0a 1a 20 f4 20 50  72 69 6d 65 73 20 69 6e  |.... . Primes in|
00000010  20 36 20 63 6f 6c 75 6d  6e 73 0d 00 14 18 20 f4  | 6 columns.... .|
00000020  20 62 79 20 4a 6f 6e 20  4d 69 6c 6c 69 6e 67 74  | by Jon Millingt|
00000030  6f 6e 0d 00 1e 1a 20 f4  20 28 63 29 20 41 63 6f  |on.... . (c) Aco|
00000040  72 6e 20 43 6f 6d 70 75  74 69 6e 67 0d 00 28 19  |rn Computing..(.|
00000050  20 eb 20 37 3a ef 20 32  33 3b 38 32 30 32 3b 30  | . 7:. 23;8202;0|
00000060  3b 30 3b 30 3b 0d 00 32  1c 20 f1 20 22 20 50 72  |;0;0;..2. . " Pr|
00000070  69 6d 65 73 20 69 6e 22  bd 31 32 39 22 72 65 64  |imes in".129"red|
00000080  22 0d 00 3c 19 20 f1 27  22 20 31 22 bd 31 32 39  |"..<. .'" 1".129|
00000090  22 32 20 33 22 bd 31 33  35 3b 0d 00 46 1a 20 f1  |"2 3".135;..F. .|
000000a0  22 87 34 22 bd 31 32 39  22 20 35 22 bd 31 33 35  |".4".129" 5".135|
000000b0  22 87 36 22 0d 00 50 11  20 e3 20 41 25 3d 37 20  |".6"..P. . A%=7 |
000000c0  b8 20 31 45 36 0d 00 5a  09 20 4b 25 3d 30 0d 00  |. 1E6..Z. K%=0..|
000000d0  64 16 20 e3 20 4e 25 3d  33 20 b8 20 b6 20 41 25  |d. . N%=3 . . A%|
000000e0  20 88 20 32 0d 00 6e 17  20 e7 20 41 25 20 83 20  | . 2..n. . A% . |
000000f0  4e 25 3d 30 20 8c 20 4b  25 3d 36 0d 00 78 09 20  |N%=0 . K%=6..x. |
00000100  ed 20 4e 25 0d 00 82 16  20 e7 20 41 25 20 83 20  |. N%.... . A% . |
00000110  32 3d 30 20 8c 20 4b 25  3d 36 0d 00 8c 13 20 f1  |2=0 . K%=6.... .|
00000120  3b bd 28 4b 25 2b 31 32  39 29 41 25 3b 0d 00 96  |;.(K%+129)A%;...|
00000130  11 20 e7 20 41 25 20 83  20 36 3d 30 20 f1 0d 00  |. . A% . 6=0 ...|
00000140  a0 09 20 ed 20 41 25 0d  ff                       |.. . A%..|
00000149