Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199508.adf » !Regulars » Regulars/RunTheRISC/Racer1

Regulars/RunTheRISC/Racer1

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 » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199508.adf » !Regulars
Filename: Regulars/RunTheRISC/Racer1
Read OK:
File size: 0509 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM>Racer1
   20ON ERROR PRINT REPORT$" at line ";ERL:END
   30
   40PRINT"Single Car Slot Racer"
   50PRINT"By Mike Cook"
   60PRINT"See 'RUN THE RISC' for the hardware needed"
   70
   80SYS"XParallel_Op",0 TO ,,D% ;F%
   90IF (F% AND 1)=1 THEN
  100PRINT"Mono direction printer port"
  110PRINT"You need to load the Mono_D module"
  120END
  130ENDIF
  140
  150REPEAT
  151SYS"Parallel_Op",1,0 :REM Put all lights off
  160PRINT"Place the Car on the starting line"
  170REM Hold until the switch is triped
  180REPEAT
  190SYS"Parallel_Op",0 TO ,,D%
  200UNTIL(D% AND &80)<>0
  210PRINT"Count down to start"
  220FOR A%=10 TO 1 STEP -1
  230PRINTA%
  231IF A%=5 THEN SYS"Parallel_Op",1,3 : REM Red lights on
  240PROC_sec
  250NEXT
  260
  270REM Check if switch still triped if not then false start
  280SYS"Parallel_Op",0 TO ,,D%
  290IF (D% AND &80)<>0 THEN
  300SYS"Parallel_Op",1,&C :REM Red lights off Green lights on
  310PRINT"GO"
  320VDU 7
  330
  340FOR LAP%=1 TO 10
  350REM Hold until car is off the sensor
  360REPEAT
  370T%=TIME
  380SYS"Parallel_Op",0 TO ,,D%
  390UNTIL(D% AND &80)=0
  400
  410REM Wait until the car is on the sensor
  420REPEAT
  430SYS"Parallel_Op",0 TO ,,D%
  440UNTIL(D% AND &80)<>0
  450
  460LT=(TIME-T%)/100
  470PRINT"Lap ";LAP%;" time ";LT
  480NEXT
  481SYS"Parallel_Op",1,0 :REM Turn all lights off
  490PRINT"Race over"
  500PRINT"Press Space for another race"
  510REPEAT UNTIL INKEY(-99)
  520ELSE
  530FOR A%=1 TO 5
  540VDU7
  550T%=TIME+10
  560REPEAT UNTIL TIME>T%
  570NEXT
  580PRINT"False Start "
  590ENDIF
  600
  610UNTIL FALSE
  620END
  630
  640DEF PROC_sec
  650LOCAL T%
  660T%=TIME+100
  670REPEAT UNTIL TIME>T%
  680ENDPROC

�>Racer1
� � � �$" at line ";�:�

(�"Single Car Slot Racer"
2�"By Mike Cook"
<1�"See 'RUN THE RISC' for the hardware needed"
F
P!ș"XParallel_Op",0 � ,,D% ;F%
Z� (F% � 1)=1 �
d"�"Mono direction printer port"
n)�"You need to load the Mono_D module"
x�
��
�
��
�-ș"Parallel_Op",1,0 :� Put all lights off
�)�"Place the Car on the starting line"
�%� Hold until the switch is triped
��
�ș"Parallel_Op",0 � ,,D%
��(D% � &80)<>0
��"Count down to start"
�� A%=10 � 1 � -1
��A%
�2� A%=5 � ș"Parallel_Op",1,3 : � Red lights on
�	�_sec
��

:� Check if switch still triped if not then false start
ș"Parallel_Op",0 � ,,D%
"� (D% � &80)<>0 �
,:ș"Parallel_Op",1,&C :� Red lights off Green lights on
6	�"GO"
@� 7
J
T� LAP%=1 � 10
^&� Hold until car is off the sensor
h�
rT%=�
|ș"Parallel_Op",0 � ,,D%
��(D% � &80)=0
�
�)� Wait until the car is on the sensor
��
�ș"Parallel_Op",0 � ,,D%
��(D% � &80)<>0
�
�LT=(�-T%)/100
��"Lap ";LAP%;" time ";LT
��
�.ș"Parallel_Op",1,0 :� Turn all lights off
��"Race over"
�#�"Press Space for another race"
�� � �(-99)
�
� A%=1 � 5
�7
&T%=�+10
0� � �>T%
:�
D�"False Start "
N�
X
b� �
l�
v
�� �_sec
�� T%
�T%=�+100
�� � �>T%
��
�
00000000  0d 00 0a 0c f4 3e 52 61  63 65 72 31 0d 00 14 1b  |.....>Racer1....|
00000010  ee 20 85 20 f1 20 f6 24  22 20 61 74 20 6c 69 6e  |. . . .$" at lin|
00000020  65 20 22 3b 9e 3a e0 0d  00 1e 04 0d 00 28 1c f1  |e ";.:.......(..|
00000030  22 53 69 6e 67 6c 65 20  43 61 72 20 53 6c 6f 74  |"Single Car Slot|
00000040  20 52 61 63 65 72 22 0d  00 32 13 f1 22 42 79 20  | Racer"..2.."By |
00000050  4d 69 6b 65 20 43 6f 6f  6b 22 0d 00 3c 31 f1 22  |Mike Cook"..<1."|
00000060  53 65 65 20 27 52 55 4e  20 54 48 45 20 52 49 53  |See 'RUN THE RIS|
00000070  43 27 20 66 6f 72 20 74  68 65 20 68 61 72 64 77  |C' for the hardw|
00000080  61 72 65 20 6e 65 65 64  65 64 22 0d 00 46 04 0d  |are needed"..F..|
00000090  00 50 21 c8 99 22 58 50  61 72 61 6c 6c 65 6c 5f  |.P!.."XParallel_|
000000a0  4f 70 22 2c 30 20 b8 20  2c 2c 44 25 20 3b 46 25  |Op",0 . ,,D% ;F%|
000000b0  0d 00 5a 12 e7 20 28 46  25 20 80 20 31 29 3d 31  |..Z.. (F% . 1)=1|
000000c0  20 8c 0d 00 64 22 f1 22  4d 6f 6e 6f 20 64 69 72  | ...d"."Mono dir|
000000d0  65 63 74 69 6f 6e 20 70  72 69 6e 74 65 72 20 70  |ection printer p|
000000e0  6f 72 74 22 0d 00 6e 29  f1 22 59 6f 75 20 6e 65  |ort"..n)."You ne|
000000f0  65 64 20 74 6f 20 6c 6f  61 64 20 74 68 65 20 4d  |ed to load the M|
00000100  6f 6e 6f 5f 44 20 6d 6f  64 75 6c 65 22 0d 00 78  |ono_D module"..x|
00000110  05 e0 0d 00 82 05 cd 0d  00 8c 04 0d 00 96 05 f5  |................|
00000120  0d 00 97 2d c8 99 22 50  61 72 61 6c 6c 65 6c 5f  |...-.."Parallel_|
00000130  4f 70 22 2c 31 2c 30 20  3a f4 20 50 75 74 20 61  |Op",1,0 :. Put a|
00000140  6c 6c 20 6c 69 67 68 74  73 20 6f 66 66 0d 00 a0  |ll lights off...|
00000150  29 f1 22 50 6c 61 63 65  20 74 68 65 20 43 61 72  |)."Place the Car|
00000160  20 6f 6e 20 74 68 65 20  73 74 61 72 74 69 6e 67  | on the starting|
00000170  20 6c 69 6e 65 22 0d 00  aa 25 f4 20 48 6f 6c 64  | line"...%. Hold|
00000180  20 75 6e 74 69 6c 20 74  68 65 20 73 77 69 74 63  | until the switc|
00000190  68 20 69 73 20 74 72 69  70 65 64 0d 00 b4 05 f5  |h is triped.....|
000001a0  0d 00 be 1c c8 99 22 50  61 72 61 6c 6c 65 6c 5f  |......"Parallel_|
000001b0  4f 70 22 2c 30 20 b8 20  2c 2c 44 25 0d 00 c8 12  |Op",0 . ,,D%....|
000001c0  fd 28 44 25 20 80 20 26  38 30 29 3c 3e 30 0d 00  |.(D% . &80)<>0..|
000001d0  d2 1a f1 22 43 6f 75 6e  74 20 64 6f 77 6e 20 74  |..."Count down t|
000001e0  6f 20 73 74 61 72 74 22  0d 00 dc 14 e3 20 41 25  |o start"..... A%|
000001f0  3d 31 30 20 b8 20 31 20  88 20 2d 31 0d 00 e6 07  |=10 . 1 . -1....|
00000200  f1 41 25 0d 00 e7 32 e7  20 41 25 3d 35 20 8c 20  |.A%...2. A%=5 . |
00000210  c8 99 22 50 61 72 61 6c  6c 65 6c 5f 4f 70 22 2c  |.."Parallel_Op",|
00000220  31 2c 33 20 3a 20 f4 20  52 65 64 20 6c 69 67 68  |1,3 : . Red ligh|
00000230  74 73 20 6f 6e 0d 00 f0  09 f2 5f 73 65 63 0d 00  |ts on....._sec..|
00000240  fa 05 ed 0d 01 04 04 0d  01 0e 3a f4 20 43 68 65  |..........:. Che|
00000250  63 6b 20 69 66 20 73 77  69 74 63 68 20 73 74 69  |ck if switch sti|
00000260  6c 6c 20 74 72 69 70 65  64 20 69 66 20 6e 6f 74  |ll triped if not|
00000270  20 74 68 65 6e 20 66 61  6c 73 65 20 73 74 61 72  | then false star|
00000280  74 0d 01 18 1c c8 99 22  50 61 72 61 6c 6c 65 6c  |t......"Parallel|
00000290  5f 4f 70 22 2c 30 20 b8  20 2c 2c 44 25 0d 01 22  |_Op",0 . ,,D%.."|
000002a0  15 e7 20 28 44 25 20 80  20 26 38 30 29 3c 3e 30  |.. (D% . &80)<>0|
000002b0  20 8c 0d 01 2c 3a c8 99  22 50 61 72 61 6c 6c 65  | ...,:.."Paralle|
000002c0  6c 5f 4f 70 22 2c 31 2c  26 43 20 3a f4 20 52 65  |l_Op",1,&C :. Re|
000002d0  64 20 6c 69 67 68 74 73  20 6f 66 66 20 47 72 65  |d lights off Gre|
000002e0  65 6e 20 6c 69 67 68 74  73 20 6f 6e 0d 01 36 09  |en lights on..6.|
000002f0  f1 22 47 4f 22 0d 01 40  07 ef 20 37 0d 01 4a 04  |."GO"..@.. 7..J.|
00000300  0d 01 54 11 e3 20 4c 41  50 25 3d 31 20 b8 20 31  |..T.. LAP%=1 . 1|
00000310  30 0d 01 5e 26 f4 20 48  6f 6c 64 20 75 6e 74 69  |0..^&. Hold unti|
00000320  6c 20 63 61 72 20 69 73  20 6f 66 66 20 74 68 65  |l car is off the|
00000330  20 73 65 6e 73 6f 72 0d  01 68 05 f5 0d 01 72 08  | sensor..h....r.|
00000340  54 25 3d 91 0d 01 7c 1c  c8 99 22 50 61 72 61 6c  |T%=...|..."Paral|
00000350  6c 65 6c 5f 4f 70 22 2c  30 20 b8 20 2c 2c 44 25  |lel_Op",0 . ,,D%|
00000360  0d 01 86 11 fd 28 44 25  20 80 20 26 38 30 29 3d  |.....(D% . &80)=|
00000370  30 0d 01 90 04 0d 01 9a  29 f4 20 57 61 69 74 20  |0.......). Wait |
00000380  75 6e 74 69 6c 20 74 68  65 20 63 61 72 20 69 73  |until the car is|
00000390  20 6f 6e 20 74 68 65 20  73 65 6e 73 6f 72 0d 01  | on the sensor..|
000003a0  a4 05 f5 0d 01 ae 1c c8  99 22 50 61 72 61 6c 6c  |........."Parall|
000003b0  65 6c 5f 4f 70 22 2c 30  20 b8 20 2c 2c 44 25 0d  |el_Op",0 . ,,D%.|
000003c0  01 b8 12 fd 28 44 25 20  80 20 26 38 30 29 3c 3e  |....(D% . &80)<>|
000003d0  30 0d 01 c2 04 0d 01 cc  11 4c 54 3d 28 91 2d 54  |0........LT=(.-T|
000003e0  25 29 2f 31 30 30 0d 01  d6 1c f1 22 4c 61 70 20  |%)/100....."Lap |
000003f0  22 3b 4c 41 50 25 3b 22  20 74 69 6d 65 20 22 3b  |";LAP%;" time ";|
00000400  4c 54 0d 01 e0 05 ed 0d  01 e1 2e c8 99 22 50 61  |LT..........."Pa|
00000410  72 61 6c 6c 65 6c 5f 4f  70 22 2c 31 2c 30 20 3a  |rallel_Op",1,0 :|
00000420  f4 20 54 75 72 6e 20 61  6c 6c 20 6c 69 67 68 74  |. Turn all light|
00000430  73 20 6f 66 66 0d 01 ea  10 f1 22 52 61 63 65 20  |s off....."Race |
00000440  6f 76 65 72 22 0d 01 f4  23 f1 22 50 72 65 73 73  |over"...#."Press|
00000450  20 53 70 61 63 65 20 66  6f 72 20 61 6e 6f 74 68  | Space for anoth|
00000460  65 72 20 72 61 63 65 22  0d 01 fe 0e f5 20 fd 20  |er race"..... . |
00000470  a6 28 2d 39 39 29 0d 02  08 05 cc 0d 02 12 0e e3  |.(-99)..........|
00000480  20 41 25 3d 31 20 b8 20  35 0d 02 1c 06 ef 37 0d  | A%=1 . 5.....7.|
00000490  02 26 0b 54 25 3d 91 2b  31 30 0d 02 30 0c f5 20  |.&.T%=.+10..0.. |
000004a0  fd 20 91 3e 54 25 0d 02  3a 05 ed 0d 02 44 13 f1  |. .>T%..:....D..|
000004b0  22 46 61 6c 73 65 20 53  74 61 72 74 20 22 0d 02  |"False Start "..|
000004c0  4e 05 cd 0d 02 58 04 0d  02 62 07 fd 20 a3 0d 02  |N....X...b.. ...|
000004d0  6c 05 e0 0d 02 76 04 0d  02 80 0b dd 20 f2 5f 73  |l....v...... ._s|
000004e0  65 63 0d 02 8a 08 ea 20  54 25 0d 02 94 0c 54 25  |ec..... T%....T%|
000004f0  3d 91 2b 31 30 30 0d 02  9e 0c f5 20 fd 20 91 3e  |=.+100..... . .>|
00000500  54 25 0d 02 a8 05 e1 0d  ff                       |T%.......|
00000509