Home » Archimedes archive » Acorn User » AU 1993-09.adf » !StarInfo_StarInfo » Kalejdo

Kalejdo

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 1993-09.adf » !StarInfo_StarInfo
Filename: Kalejdo
Read OK:
File size: 068A bytes
Load address: 0000
Exec address: 0000
File contents
   10REM     >Kalejdo (Info4)
   20REM By  Jan Vibe
   30REM For 32-bit machines
   40REM (c) BAU September 1993
   50:
   60MODE137:MODE9:OFF
   70SYS "OS_SWINumberFromString",,"OS_SpriteOp" TO spop
   80ONERRORPROCerror:END
   90PROCcolours
  100PROCscreen
  110PROCkalejdo
  120END
  130:
  140DEF PROCerror
  150SYS spop,256+60,spr,0,0
  160SYS 6,112,update
  170PRINTREPORT$;" at line "STR$ERL
  180END
  190:
  200DEF PROCcolours
  210DIM r(15),g(15),b(15)
  220FOR i=1 TO 15
  230 r(i)=RND(510)
  240 g(i)=RND(510)
  250 b(i)=RND(510)
  260 COLOUR i,ABS(r(i) MOD 510-255),ABS(g(i) MOD 510-255),ABS(b(i) MOD 510-255)
  270NEXT
  280ENDPROC
  290:
  300DEF PROCscreen
  310DIM spr &20000
  320spr!0=&20000
  330spr!8=16
  340SYS spop,&109,spr
  350SYS spop,256+15,spr,"scr",0,320,256,9
  360SYS spop,256+60,spr,"scr",0
  370FOR i=1 TO 1000
  380 GCOL RND(15)
  390 x=RND(1280)
  400 y=RND(1024)
  410 MOVE x+RND(300)-150,y+RND(300)-150
  420 MOVE x+RND(300)-150,y+RND(300)-150
  430 PLOT 85,x+RND(300)-150,y+RND(300)-150
  440NEXT
  450SYS spop,256+60,spr,0,0
  460ENDPROC
  470:
  480DEF PROCkalejdo
  490update=1:display=2
  500x=512:y=384
  510dx=4*RND(4)*SGN(RND(1)-.5)
  520dy=4*RND(4)*SGN(RND(1)-.5)
  530REPEAT
  540 WAIT
  550 SYS 6,112,update:SYS 6,113,display
  560 SWAP update,display
  570 z=x+dx:IF z>980 OR z<0 dx=4*(RND(4)+1)*SGN(-dx)
  580 z=y+dy:IF z>724 OR z<0 dy=4*(RND(4)+1)*SGN(-dy)
  590 x+=dx:y+=dy
  600 c=RND(15)
  610 r(c)=(r(c)+RND(20))MOD510
  620 g(c)=(g(c)+RND(20))MOD510
  630 b(c)=(b(c)+RND(20))MOD510
  640 COLOUR c,ABS(r(c)MOD510-255),ABS(g(c)MOD510-255),ABS(b(c)MOD510-255)
  650 SYS spop,256+60,spr,"scr",0
  660 SYS spop,256+16,spr,"box",0,x,y,x+256,y+256
  670 SYS spop,256+60,spr,0,0:OFF
  680 PROCplot(0,0)
  690 SYSspop,256+47,spr,"box"
  700 PROCplot(256,0)
  710 SYSspop,256+33,spr,"box"
  720 PROCplot(256,256)
  730 SYSspop,256+47,spr,"box"
  740 PROCplot(0,256)
  750UNTIL 0
  760ENDPROC
  770:
  780DEF PROCplot(px,py)
  790LOCAL x,y
  800FOR x1=0 TO 1023 STEP 512
  810 FOR y1=0 TO 1023 STEP 512
  820  SYS spop,256+34,spr,"box",px+128+x1,py+y1,0
  830 NEXT
  840NEXT
  850ENDPROC

�     >Kalejdo (Info4)
� By  Jan Vibe
� For 32-bit machines
(� (c) BAU September 1993
2:
<
�137:�9:�
F5ș "OS_SWINumberFromString",,"OS_SpriteOp" � spop
P��error:�
Z�colours
d�screen
n�kalejdo
x�
�:
�� �error
�ș spop,256+60,spr,0,0
�ș 6,112,update
��$;" at line "Þ
��
�:
�� �colours
�� r(15),g(15),b(15)
�� i=1 � 15
� r(i)=�(510)
� g(i)=�(510)
� b(i)=�(510)
> � i,�(r(i) � 510-255),�(g(i) � 510-255),�(b(i) � 510-255)
�
�
":
,
� �screen
6� spr &20000
@spr!0=&20000
Jspr!8=16
Tș spop,&109,spr
^(ș spop,256+15,spr,"scr",0,320,256,9
hș spop,256+60,spr,"scr",0
r� i=1 � 1000
| � �(15)
� x=�(1280)
� y=�(1024)
�  � x+�(300)-150,y+�(300)-150
�  � x+�(300)-150,y+�(300)-150
�# � 85,x+�(300)-150,y+�(300)-150
��
�ș spop,256+60,spr,0,0
��
�:
�� �kalejdo
�update=1:display=2
�x=512:y=384
�dx=4*�(4)*�(�(1)-.5)
dy=4*�(4)*�(�(1)-.5)
�
 Ȗ
&% ș 6,112,update:ș 6,113,display
0 Ȕ update,display
:. z=x+dx:� z>980 � z<0 dx=4*(�(4)+1)*�(-dx)
D. z=y+dy:� z>724 � z<0 dy=4*(�(4)+1)*�(-dy)
N x+=dx:y+=dy
X c=�(15)
b r(c)=(r(c)+�(20))�510
l g(c)=(g(c)+�(20))�510
v b(c)=(b(c)+�(20))�510
�8 � c,�(r(c)�510-255),�(g(c)�510-255),�(b(c)�510-255)
� ș spop,256+60,spr,"scr",0
�/ ș spop,256+16,spr,"box",0,x,y,x+256,y+256
� ș spop,256+60,spr,0,0:�
� �plot(0,0)
� șspop,256+47,spr,"box"
� �plot(256,0)
� șspop,256+33,spr,"box"
� �plot(256,256)
� șspop,256+47,spr,"box"
� �plot(0,256)
�� 0
��
:
� �plot(px,py)
	� x,y
 � x1=0 � 1023 � 512
* � y1=0 � 1023 � 512
40  ș spop,256+34,spr,"box",px+128+x1,py+y1,0
> �
H�
R�
�
00000000  0d 00 0a 1a f4 20 20 20  20 20 3e 4b 61 6c 65 6a  |.....     >Kalej|
00000010  64 6f 20 28 49 6e 66 6f  34 29 0d 00 14 12 f4 20  |do (Info4)..... |
00000020  42 79 20 20 4a 61 6e 20  56 69 62 65 0d 00 1e 19  |By  Jan Vibe....|
00000030  f4 20 46 6f 72 20 33 32  2d 62 69 74 20 6d 61 63  |. For 32-bit mac|
00000040  68 69 6e 65 73 0d 00 28  1c f4 20 28 63 29 20 42  |hines..(.. (c) B|
00000050  41 55 20 53 65 70 74 65  6d 62 65 72 20 31 39 39  |AU September 199|
00000060  33 0d 00 32 05 3a 0d 00  3c 0d eb 31 33 37 3a eb  |3..2.:..<..137:.|
00000070  39 3a 87 0d 00 46 35 c8  99 20 22 4f 53 5f 53 57  |9:...F5.. "OS_SW|
00000080  49 4e 75 6d 62 65 72 46  72 6f 6d 53 74 72 69 6e  |INumberFromStrin|
00000090  67 22 2c 2c 22 4f 53 5f  53 70 72 69 74 65 4f 70  |g",,"OS_SpriteOp|
000000a0  22 20 b8 20 73 70 6f 70  0d 00 50 0e ee 85 f2 65  |" . spop..P....e|
000000b0  72 72 6f 72 3a e0 0d 00  5a 0c f2 63 6f 6c 6f 75  |rror:...Z..colou|
000000c0  72 73 0d 00 64 0b f2 73  63 72 65 65 6e 0d 00 6e  |rs..d..screen..n|
000000d0  0c f2 6b 61 6c 65 6a 64  6f 0d 00 78 05 e0 0d 00  |..kalejdo..x....|
000000e0  82 05 3a 0d 00 8c 0c dd  20 f2 65 72 72 6f 72 0d  |..:..... .error.|
000000f0  00 96 1a c8 99 20 73 70  6f 70 2c 32 35 36 2b 36  |..... spop,256+6|
00000100  30 2c 73 70 72 2c 30 2c  30 0d 00 a0 13 c8 99 20  |0,spr,0,0...... |
00000110  36 2c 31 31 32 2c 75 70  64 61 74 65 0d 00 aa 15  |6,112,update....|
00000120  f1 f6 24 3b 22 20 61 74  20 6c 69 6e 65 20 22 c3  |..$;" at line ".|
00000130  9e 0d 00 b4 05 e0 0d 00  be 05 3a 0d 00 c8 0e dd  |..........:.....|
00000140  20 f2 63 6f 6c 6f 75 72  73 0d 00 d2 17 de 20 72  | .colours..... r|
00000150  28 31 35 29 2c 67 28 31  35 29 2c 62 28 31 35 29  |(15),g(15),b(15)|
00000160  0d 00 dc 0e e3 20 69 3d  31 20 b8 20 31 35 0d 00  |..... i=1 . 15..|
00000170  e6 10 20 72 28 69 29 3d  b3 28 35 31 30 29 0d 00  |.. r(i)=.(510)..|
00000180  f0 10 20 67 28 69 29 3d  b3 28 35 31 30 29 0d 00  |.. g(i)=.(510)..|
00000190  fa 10 20 62 28 69 29 3d  b3 28 35 31 30 29 0d 01  |.. b(i)=.(510)..|
000001a0  04 3e 20 fb 20 69 2c 94  28 72 28 69 29 20 83 20  |.> . i,.(r(i) . |
000001b0  35 31 30 2d 32 35 35 29  2c 94 28 67 28 69 29 20  |510-255),.(g(i) |
000001c0  83 20 35 31 30 2d 32 35  35 29 2c 94 28 62 28 69  |. 510-255),.(b(i|
000001d0  29 20 83 20 35 31 30 2d  32 35 35 29 0d 01 0e 05  |) . 510-255)....|
000001e0  ed 0d 01 18 05 e1 0d 01  22 05 3a 0d 01 2c 0d dd  |........".:..,..|
000001f0  20 f2 73 63 72 65 65 6e  0d 01 36 10 de 20 73 70  | .screen..6.. sp|
00000200  72 20 26 32 30 30 30 30  0d 01 40 10 73 70 72 21  |r &20000..@.spr!|
00000210  30 3d 26 32 30 30 30 30  0d 01 4a 0c 73 70 72 21  |0=&20000..J.spr!|
00000220  38 3d 31 36 0d 01 54 14  c8 99 20 73 70 6f 70 2c  |8=16..T... spop,|
00000230  26 31 30 39 2c 73 70 72  0d 01 5e 28 c8 99 20 73  |&109,spr..^(.. s|
00000240  70 6f 70 2c 32 35 36 2b  31 35 2c 73 70 72 2c 22  |pop,256+15,spr,"|
00000250  73 63 72 22 2c 30 2c 33  32 30 2c 32 35 36 2c 39  |scr",0,320,256,9|
00000260  0d 01 68 1e c8 99 20 73  70 6f 70 2c 32 35 36 2b  |..h... spop,256+|
00000270  36 30 2c 73 70 72 2c 22  73 63 72 22 2c 30 0d 01  |60,spr,"scr",0..|
00000280  72 10 e3 20 69 3d 31 20  b8 20 31 30 30 30 0d 01  |r.. i=1 . 1000..|
00000290  7c 0c 20 e6 20 b3 28 31  35 29 0d 01 86 0e 20 78  ||. . .(15).... x|
000002a0  3d b3 28 31 32 38 30 29  0d 01 90 0e 20 79 3d b3  |=.(1280).... y=.|
000002b0  28 31 30 32 34 29 0d 01  9a 20 20 ec 20 78 2b b3  |(1024)...  . x+.|
000002c0  28 33 30 30 29 2d 31 35  30 2c 79 2b b3 28 33 30  |(300)-150,y+.(30|
000002d0  30 29 2d 31 35 30 0d 01  a4 20 20 ec 20 78 2b b3  |0)-150...  . x+.|
000002e0  28 33 30 30 29 2d 31 35  30 2c 79 2b b3 28 33 30  |(300)-150,y+.(30|
000002f0  30 29 2d 31 35 30 0d 01  ae 23 20 f0 20 38 35 2c  |0)-150...# . 85,|
00000300  78 2b b3 28 33 30 30 29  2d 31 35 30 2c 79 2b b3  |x+.(300)-150,y+.|
00000310  28 33 30 30 29 2d 31 35  30 0d 01 b8 05 ed 0d 01  |(300)-150.......|
00000320  c2 1a c8 99 20 73 70 6f  70 2c 32 35 36 2b 36 30  |.... spop,256+60|
00000330  2c 73 70 72 2c 30 2c 30  0d 01 cc 05 e1 0d 01 d6  |,spr,0,0........|
00000340  05 3a 0d 01 e0 0e dd 20  f2 6b 61 6c 65 6a 64 6f  |.:..... .kalejdo|
00000350  0d 01 ea 16 75 70 64 61  74 65 3d 31 3a 64 69 73  |....update=1:dis|
00000360  70 6c 61 79 3d 32 0d 01  f4 0f 78 3d 35 31 32 3a  |play=2....x=512:|
00000370  79 3d 33 38 34 0d 01 fe  18 64 78 3d 34 2a b3 28  |y=384....dx=4*.(|
00000380  34 29 2a b4 28 b3 28 31  29 2d 2e 35 29 0d 02 08  |4)*.(.(1)-.5)...|
00000390  18 64 79 3d 34 2a b3 28  34 29 2a b4 28 b3 28 31  |.dy=4*.(4)*.(.(1|
000003a0  29 2d 2e 35 29 0d 02 12  05 f5 0d 02 1c 07 20 c8  |)-.5)......... .|
000003b0  96 0d 02 26 25 20 c8 99  20 36 2c 31 31 32 2c 75  |...&% .. 6,112,u|
000003c0  70 64 61 74 65 3a c8 99  20 36 2c 31 31 33 2c 64  |pdate:.. 6,113,d|
000003d0  69 73 70 6c 61 79 0d 02  30 16 20 c8 94 20 75 70  |isplay..0. .. up|
000003e0  64 61 74 65 2c 64 69 73  70 6c 61 79 0d 02 3a 2e  |date,display..:.|
000003f0  20 7a 3d 78 2b 64 78 3a  e7 20 7a 3e 39 38 30 20  | z=x+dx:. z>980 |
00000400  84 20 7a 3c 30 20 64 78  3d 34 2a 28 b3 28 34 29  |. z<0 dx=4*(.(4)|
00000410  2b 31 29 2a b4 28 2d 64  78 29 0d 02 44 2e 20 7a  |+1)*.(-dx)..D. z|
00000420  3d 79 2b 64 79 3a e7 20  7a 3e 37 32 34 20 84 20  |=y+dy:. z>724 . |
00000430  7a 3c 30 20 64 79 3d 34  2a 28 b3 28 34 29 2b 31  |z<0 dy=4*(.(4)+1|
00000440  29 2a b4 28 2d 64 79 29  0d 02 4e 10 20 78 2b 3d  |)*.(-dy)..N. x+=|
00000450  64 78 3a 79 2b 3d 64 79  0d 02 58 0c 20 63 3d b3  |dx:y+=dy..X. c=.|
00000460  28 31 35 29 0d 02 62 1a  20 72 28 63 29 3d 28 72  |(15)..b. r(c)=(r|
00000470  28 63 29 2b b3 28 32 30  29 29 83 35 31 30 0d 02  |(c)+.(20)).510..|
00000480  6c 1a 20 67 28 63 29 3d  28 67 28 63 29 2b b3 28  |l. g(c)=(g(c)+.(|
00000490  32 30 29 29 83 35 31 30  0d 02 76 1a 20 62 28 63  |20)).510..v. b(c|
000004a0  29 3d 28 62 28 63 29 2b  b3 28 32 30 29 29 83 35  |)=(b(c)+.(20)).5|
000004b0  31 30 0d 02 80 38 20 fb  20 63 2c 94 28 72 28 63  |10...8 . c,.(r(c|
000004c0  29 83 35 31 30 2d 32 35  35 29 2c 94 28 67 28 63  |).510-255),.(g(c|
000004d0  29 83 35 31 30 2d 32 35  35 29 2c 94 28 62 28 63  |).510-255),.(b(c|
000004e0  29 83 35 31 30 2d 32 35  35 29 0d 02 8a 1f 20 c8  |).510-255).... .|
000004f0  99 20 73 70 6f 70 2c 32  35 36 2b 36 30 2c 73 70  |. spop,256+60,sp|
00000500  72 2c 22 73 63 72 22 2c  30 0d 02 94 2f 20 c8 99  |r,"scr",0.../ ..|
00000510  20 73 70 6f 70 2c 32 35  36 2b 31 36 2c 73 70 72  | spop,256+16,spr|
00000520  2c 22 62 6f 78 22 2c 30  2c 78 2c 79 2c 78 2b 32  |,"box",0,x,y,x+2|
00000530  35 36 2c 79 2b 32 35 36  0d 02 9e 1d 20 c8 99 20  |56,y+256.... .. |
00000540  73 70 6f 70 2c 32 35 36  2b 36 30 2c 73 70 72 2c  |spop,256+60,spr,|
00000550  30 2c 30 3a 87 0d 02 a8  0f 20 f2 70 6c 6f 74 28  |0,0:..... .plot(|
00000560  30 2c 30 29 0d 02 b2 1c  20 c8 99 73 70 6f 70 2c  |0,0).... ..spop,|
00000570  32 35 36 2b 34 37 2c 73  70 72 2c 22 62 6f 78 22  |256+47,spr,"box"|
00000580  0d 02 bc 11 20 f2 70 6c  6f 74 28 32 35 36 2c 30  |.... .plot(256,0|
00000590  29 0d 02 c6 1c 20 c8 99  73 70 6f 70 2c 32 35 36  |).... ..spop,256|
000005a0  2b 33 33 2c 73 70 72 2c  22 62 6f 78 22 0d 02 d0  |+33,spr,"box"...|
000005b0  13 20 f2 70 6c 6f 74 28  32 35 36 2c 32 35 36 29  |. .plot(256,256)|
000005c0  0d 02 da 1c 20 c8 99 73  70 6f 70 2c 32 35 36 2b  |.... ..spop,256+|
000005d0  34 37 2c 73 70 72 2c 22  62 6f 78 22 0d 02 e4 11  |47,spr,"box"....|
000005e0  20 f2 70 6c 6f 74 28 30  2c 32 35 36 29 0d 02 ee  | .plot(0,256)...|
000005f0  07 fd 20 30 0d 02 f8 05  e1 0d 03 02 05 3a 0d 03  |.. 0.........:..|
00000600  0c 12 dd 20 f2 70 6c 6f  74 28 70 78 2c 70 79 29  |... .plot(px,py)|
00000610  0d 03 16 09 ea 20 78 2c  79 0d 03 20 17 e3 20 78  |..... x,y.. .. x|
00000620  31 3d 30 20 b8 20 31 30  32 33 20 88 20 35 31 32  |1=0 . 1023 . 512|
00000630  0d 03 2a 18 20 e3 20 79  31 3d 30 20 b8 20 31 30  |..*. . y1=0 . 10|
00000640  32 33 20 88 20 35 31 32  0d 03 34 30 20 20 c8 99  |23 . 512..40  ..|
00000650  20 73 70 6f 70 2c 32 35  36 2b 33 34 2c 73 70 72  | spop,256+34,spr|
00000660  2c 22 62 6f 78 22 2c 70  78 2b 31 32 38 2b 78 31  |,"box",px+128+x1|
00000670  2c 70 79 2b 79 31 2c 30  0d 03 3e 06 20 ed 0d 03  |,py+y1,0..>. ...|
00000680  48 05 ed 0d 03 52 05 e1  0d ff                    |H....R....|
0000068a