Home » Archimedes archive » Archimedes World » AW-1994-08-Disc1.adf » Disk1Aug94 » !AWAug94/Goodies/3D_Demo/Random

!AWAug94/Goodies/3D_Demo/Random

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 » Archimedes World » AW-1994-08-Disc1.adf » Disk1Aug94
Filename: !AWAug94/Goodies/3D_Demo/Random
Read OK:
File size: 030C bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >Random
   20REM Program : Random
   30REM           Places random values into the screen memory
   40REM Author  : Kevin J Swinton
   50REM Version : Acorn A5000.1.00
   60REM Date    : Thursday 26th May 1994
   70ON ERROR MODE MODE : REPORT : PRINT " at Line ";ERL : END
   80
   90
  100
  110
  120
  130MODE 13 : OFF
  140
  150 PROCedure_FindBaseAddress
  160 PROCedure_PlaceRandomValues
  170
  180END
  190
  200
  210
  220
  230
  240DEF PROCedure_FindBaseAddress
  250
  260 DIM input_list  8
  270 DIM output_list 4
  280
  290 input_list!0 = 149
  300 input_list!4 =  -1
  310
  320 SYS "OS_ReadVduVariables",input_list,output_list
  330
  340 BASE_ADDRESS = output_list!0
  350
  360ENDPROC
  370
  380
  390
  400
  410
  420DEF PROCedure_PlaceRandomValues
  430
  440 REPEAT
  450
  460    colour_value = RND( &FF )
  470    offset       = RND( 80*1024 )
  480
  490    BASE_ADDRESS?offset = colour_value
  500
  510 UNTIL 1 = 2
  520
  530ENDPROC


� >Random
� Program : Random
;�           Places random values into the screen memory
(� Author  : Kevin J Swinton
2 � Version : Acorn A5000.1.00
<&� Date    : Thursday 26th May 1994
F%� � � � : � : � " at Line ";� : �
P
Z
d
n
x
�� 13 : �
�
� �edure_FindBaseAddress
� �edure_PlaceRandomValues
�
��
�
�
�
�
�
�� �edure_FindBaseAddress
�
 � input_list  8
 � output_list 4

" input_list!0 = 149
, input_list!4 =  -1
6
@4 ș "OS_ReadVduVariables",input_list,output_list
J
T! BASE_ADDRESS = output_list!0
^
h�
r
|
�
�
�
�� �edure_PlaceRandomValues
�
� �
�
�    colour_value = �( &FF )
�#    offset       = �( 80*1024 )
�
�*    BASE_ADDRESS?offset = colour_value
�
� � 1 = 2

�
�
00000000  0d 00 0a 0d f4 20 3e 52  61 6e 64 6f 6d 0d 00 14  |..... >Random...|
00000010  16 f4 20 50 72 6f 67 72  61 6d 20 3a 20 52 61 6e  |.. Program : Ran|
00000020  64 6f 6d 0d 00 1e 3b f4  20 20 20 20 20 20 20 20  |dom...;.        |
00000030  20 20 20 50 6c 61 63 65  73 20 72 61 6e 64 6f 6d  |   Places random|
00000040  20 76 61 6c 75 65 73 20  69 6e 74 6f 20 74 68 65  | values into the|
00000050  20 73 63 72 65 65 6e 20  6d 65 6d 6f 72 79 0d 00  | screen memory..|
00000060  28 1f f4 20 41 75 74 68  6f 72 20 20 3a 20 4b 65  |(.. Author  : Ke|
00000070  76 69 6e 20 4a 20 53 77  69 6e 74 6f 6e 0d 00 32  |vin J Swinton..2|
00000080  20 f4 20 56 65 72 73 69  6f 6e 20 3a 20 41 63 6f  | . Version : Aco|
00000090  72 6e 20 41 35 30 30 30  2e 31 2e 30 30 0d 00 3c  |rn A5000.1.00..<|
000000a0  26 f4 20 44 61 74 65 20  20 20 20 3a 20 54 68 75  |&. Date    : Thu|
000000b0  72 73 64 61 79 20 32 36  74 68 20 4d 61 79 20 31  |rsday 26th May 1|
000000c0  39 39 34 0d 00 46 25 ee  20 85 20 eb 20 eb 20 3a  |994..F%. . . . :|
000000d0  20 f6 20 3a 20 f1 20 22  20 61 74 20 4c 69 6e 65  | . : . " at Line|
000000e0  20 22 3b 9e 20 3a 20 e0  0d 00 50 04 0d 00 5a 04  | ";. : ...P...Z.|
000000f0  0d 00 64 04 0d 00 6e 04  0d 00 78 04 0d 00 82 0c  |..d...n...x.....|
00000100  eb 20 31 33 20 3a 20 87  0d 00 8c 04 0d 00 96 1b  |. 13 : .........|
00000110  20 f2 65 64 75 72 65 5f  46 69 6e 64 42 61 73 65  | .edure_FindBase|
00000120  41 64 64 72 65 73 73 0d  00 a0 1d 20 f2 65 64 75  |Address.... .edu|
00000130  72 65 5f 50 6c 61 63 65  52 61 6e 64 6f 6d 56 61  |re_PlaceRandomVa|
00000140  6c 75 65 73 0d 00 aa 04  0d 00 b4 05 e0 0d 00 be  |lues............|
00000150  04 0d 00 c8 04 0d 00 d2  04 0d 00 dc 04 0d 00 e6  |................|
00000160  04 0d 00 f0 1c dd 20 f2  65 64 75 72 65 5f 46 69  |...... .edure_Fi|
00000170  6e 64 42 61 73 65 41 64  64 72 65 73 73 0d 00 fa  |ndBaseAddress...|
00000180  04 0d 01 04 14 20 de 20  69 6e 70 75 74 5f 6c 69  |..... . input_li|
00000190  73 74 20 20 38 0d 01 0e  14 20 de 20 6f 75 74 70  |st  8.... . outp|
000001a0  75 74 5f 6c 69 73 74 20  34 0d 01 18 04 0d 01 22  |ut_list 4......"|
000001b0  17 20 69 6e 70 75 74 5f  6c 69 73 74 21 30 20 3d  |. input_list!0 =|
000001c0  20 31 34 39 0d 01 2c 17  20 69 6e 70 75 74 5f 6c  | 149..,. input_l|
000001d0  69 73 74 21 34 20 3d 20  20 2d 31 0d 01 36 04 0d  |ist!4 =  -1..6..|
000001e0  01 40 34 20 c8 99 20 22  4f 53 5f 52 65 61 64 56  |.@4 .. "OS_ReadV|
000001f0  64 75 56 61 72 69 61 62  6c 65 73 22 2c 69 6e 70  |duVariables",inp|
00000200  75 74 5f 6c 69 73 74 2c  6f 75 74 70 75 74 5f 6c  |ut_list,output_l|
00000210  69 73 74 0d 01 4a 04 0d  01 54 21 20 42 41 53 45  |ist..J...T! BASE|
00000220  5f 41 44 44 52 45 53 53  20 3d 20 6f 75 74 70 75  |_ADDRESS = outpu|
00000230  74 5f 6c 69 73 74 21 30  0d 01 5e 04 0d 01 68 05  |t_list!0..^...h.|
00000240  e1 0d 01 72 04 0d 01 7c  04 0d 01 86 04 0d 01 90  |...r...|........|
00000250  04 0d 01 9a 04 0d 01 a4  1e dd 20 f2 65 64 75 72  |.......... .edur|
00000260  65 5f 50 6c 61 63 65 52  61 6e 64 6f 6d 56 61 6c  |e_PlaceRandomVal|
00000270  75 65 73 0d 01 ae 04 0d  01 b8 06 20 f5 0d 01 c2  |ues........ ....|
00000280  04 0d 01 cc 1f 20 20 20  20 63 6f 6c 6f 75 72 5f  |.....    colour_|
00000290  76 61 6c 75 65 20 3d 20  b3 28 20 26 46 46 20 29  |value = .( &FF )|
000002a0  0d 01 d6 23 20 20 20 20  6f 66 66 73 65 74 20 20  |...#    offset  |
000002b0  20 20 20 20 20 3d 20 b3  28 20 38 30 2a 31 30 32  |     = .( 80*102|
000002c0  34 20 29 0d 01 e0 04 0d  01 ea 2a 20 20 20 20 42  |4 ).......*    B|
000002d0  41 53 45 5f 41 44 44 52  45 53 53 3f 6f 66 66 73  |ASE_ADDRESS?offs|
000002e0  65 74 20 3d 20 63 6f 6c  6f 75 72 5f 76 61 6c 75  |et = colour_valu|
000002f0  65 0d 01 f4 04 0d 01 fe  0c 20 fd 20 31 20 3d 20  |e........ . 1 = |
00000300  32 0d 02 08 04 0d 02 12  05 e1 0d ff              |2...........|
0000030c