Home » Archimedes archive » Archimedes World » AW-1992-10.adf » AWOct92 » !AWOct92/Goodies/Logo/!Robot/Driver

!AWOct92/Goodies/Logo/!Robot/Driver

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-1992-10.adf » AWOct92
Filename: !AWOct92/Goodies/Logo/!Robot/Driver
Read OK:
File size: 04A3 bytes
Load address: 0000
Exec address: 0000
Duplicates

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

File contents
   10REM >Driver
   20:
   30REM Purpose : Robot Driver nitty gritty procedures
   40REM Authur  : LEN Duncan F. McPherson
   50REM Date    : 27th of July 1992
   60:
   70REM This program is an example driver , which wont actually do much
   80REM apart from print commands in VDU 4 mode at the top left of your
   90REM desktop display.
  100:
  110REM To write your own robot driver see the 2Motors basic program
  120REM for more details, as it is a fully working driver with a running
  130REM comentary included in the rem lines.
  140:
  150REM --------------------------------------------------
  160REM |       Procedures for moving the robot          |
  170REM --------------------------------------------------
  180:
  190DEFPROCmoveforward(distance)
  200VDU4:PRINTTAB(0,0);"FORWARD ";distance;"              "
  210ENDPROC
  220:
  230DEFPROCmoveback(distance)
  240VDU4:PRINTTAB(0,0);"BACK ";distance;"              "
  250ENDPROC
  260:
  270DEFPROCmoveleft(degrees)
  280VDU4:PRINTTAB(0,0);"LEFT ";degrees;"              "
  290ENDPROC
  300:
  310DEFPROCmoveright(degrees)
  320VDU4:PRINTTAB(0,0);"RIGHT ";degrees;"              "
  330ENDPROC
  340:
  350DEFPROCpenup
  360VDU4:PRINTTAB(0,0);"PENUP             "
  370ENDPROC
  380:
  390DEFPROCpendown
  400VDU4:PRINTTAB(0,0);"PENDOWN           "
  410ENDPROC
  420:
  430DEFPROCpencolour(colour)
  440VDU4:PRINTTAB(0,0);"PENCOLOUR ";colour;"               "
  450ENDPROC


� >Driver
:
4� Purpose : Robot Driver nitty gritty procedures
(%� Authur  : � Duncan F. McPherson
2!� Date    : 27th of July 1992
<:
FE� This program is an example driver , which wont actually do much
PE� apart from print commands in VDU 4 mode at the top left of your
Z� desktop display.
d:
nB� To write your own robot driver see the 2Motors basic program
xF� for more details, as it is a fully working driver with a running
�*� comentary included in the rem lines.
�:
�8� --------------------------------------------------
�8� |       Procedures for moving the robot          |
�8� --------------------------------------------------
�:
���moveforward(distance)
�2�4:�0,0);"FORWARD ";distance;"              "
��
�:
���moveback(distance)
�/�4:�0,0);"BACK ";distance;"              "
��
:
��moveleft(degrees)
.�4:�0,0);"LEFT ";degrees;"              "
"�
,:
6��moveright(degrees)
@/�4:�0,0);"RIGHT ";degrees;"              "
J�
T:
^��penup
h"�4:�0,0);"PENUP             "
r�
|:
�
��pendown
�"�4:�0,0);"PENDOWN           "
��
�:
���pencolour(colour)
�3�4:�0,0);"PENCOLOUR ";colour;"               "
��
�
00000000  0d 00 0a 0d f4 20 3e 44  72 69 76 65 72 0d 00 14  |..... >Driver...|
00000010  05 3a 0d 00 1e 34 f4 20  50 75 72 70 6f 73 65 20  |.:...4. Purpose |
00000020  3a 20 52 6f 62 6f 74 20  44 72 69 76 65 72 20 6e  |: Robot Driver n|
00000030  69 74 74 79 20 67 72 69  74 74 79 20 70 72 6f 63  |itty gritty proc|
00000040  65 64 75 72 65 73 0d 00  28 25 f4 20 41 75 74 68  |edures..(%. Auth|
00000050  75 72 20 20 3a 20 a9 20  44 75 6e 63 61 6e 20 46  |ur  : . Duncan F|
00000060  2e 20 4d 63 50 68 65 72  73 6f 6e 0d 00 32 21 f4  |. McPherson..2!.|
00000070  20 44 61 74 65 20 20 20  20 3a 20 32 37 74 68 20  | Date    : 27th |
00000080  6f 66 20 4a 75 6c 79 20  31 39 39 32 0d 00 3c 05  |of July 1992..<.|
00000090  3a 0d 00 46 45 f4 20 54  68 69 73 20 70 72 6f 67  |:..FE. This prog|
000000a0  72 61 6d 20 69 73 20 61  6e 20 65 78 61 6d 70 6c  |ram is an exampl|
000000b0  65 20 64 72 69 76 65 72  20 2c 20 77 68 69 63 68  |e driver , which|
000000c0  20 77 6f 6e 74 20 61 63  74 75 61 6c 6c 79 20 64  | wont actually d|
000000d0  6f 20 6d 75 63 68 0d 00  50 45 f4 20 61 70 61 72  |o much..PE. apar|
000000e0  74 20 66 72 6f 6d 20 70  72 69 6e 74 20 63 6f 6d  |t from print com|
000000f0  6d 61 6e 64 73 20 69 6e  20 56 44 55 20 34 20 6d  |mands in VDU 4 m|
00000100  6f 64 65 20 61 74 20 74  68 65 20 74 6f 70 20 6c  |ode at the top l|
00000110  65 66 74 20 6f 66 20 79  6f 75 72 0d 00 5a 16 f4  |eft of your..Z..|
00000120  20 64 65 73 6b 74 6f 70  20 64 69 73 70 6c 61 79  | desktop display|
00000130  2e 0d 00 64 05 3a 0d 00  6e 42 f4 20 54 6f 20 77  |...d.:..nB. To w|
00000140  72 69 74 65 20 79 6f 75  72 20 6f 77 6e 20 72 6f  |rite your own ro|
00000150  62 6f 74 20 64 72 69 76  65 72 20 73 65 65 20 74  |bot driver see t|
00000160  68 65 20 32 4d 6f 74 6f  72 73 20 62 61 73 69 63  |he 2Motors basic|
00000170  20 70 72 6f 67 72 61 6d  0d 00 78 46 f4 20 66 6f  | program..xF. fo|
00000180  72 20 6d 6f 72 65 20 64  65 74 61 69 6c 73 2c 20  |r more details, |
00000190  61 73 20 69 74 20 69 73  20 61 20 66 75 6c 6c 79  |as it is a fully|
000001a0  20 77 6f 72 6b 69 6e 67  20 64 72 69 76 65 72 20  | working driver |
000001b0  77 69 74 68 20 61 20 72  75 6e 6e 69 6e 67 0d 00  |with a running..|
000001c0  82 2a f4 20 63 6f 6d 65  6e 74 61 72 79 20 69 6e  |.*. comentary in|
000001d0  63 6c 75 64 65 64 20 69  6e 20 74 68 65 20 72 65  |cluded in the re|
000001e0  6d 20 6c 69 6e 65 73 2e  0d 00 8c 05 3a 0d 00 96  |m lines.....:...|
000001f0  38 f4 20 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |8. -------------|
00000200  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000220  2d 2d 2d 2d 2d 0d 00 a0  38 f4 20 7c 20 20 20 20  |-----...8. |    |
00000230  20 20 20 50 72 6f 63 65  64 75 72 65 73 20 66 6f  |   Procedures fo|
00000240  72 20 6d 6f 76 69 6e 67  20 74 68 65 20 72 6f 62  |r moving the rob|
00000250  6f 74 20 20 20 20 20 20  20 20 20 20 7c 0d 00 aa  |ot          |...|
00000260  38 f4 20 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |8. -------------|
00000270  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000290  2d 2d 2d 2d 2d 0d 00 b4  05 3a 0d 00 be 1b dd f2  |-----....:......|
000002a0  6d 6f 76 65 66 6f 72 77  61 72 64 28 64 69 73 74  |moveforward(dist|
000002b0  61 6e 63 65 29 0d 00 c8  32 ef 34 3a f1 8a 30 2c  |ance)...2.4:..0,|
000002c0  30 29 3b 22 46 4f 52 57  41 52 44 20 22 3b 64 69  |0);"FORWARD ";di|
000002d0  73 74 61 6e 63 65 3b 22  20 20 20 20 20 20 20 20  |stance;"        |
000002e0  20 20 20 20 20 20 22 0d  00 d2 05 e1 0d 00 dc 05  |      ".........|
000002f0  3a 0d 00 e6 18 dd f2 6d  6f 76 65 62 61 63 6b 28  |:......moveback(|
00000300  64 69 73 74 61 6e 63 65  29 0d 00 f0 2f ef 34 3a  |distance).../.4:|
00000310  f1 8a 30 2c 30 29 3b 22  42 41 43 4b 20 22 3b 64  |..0,0);"BACK ";d|
00000320  69 73 74 61 6e 63 65 3b  22 20 20 20 20 20 20 20  |istance;"       |
00000330  20 20 20 20 20 20 20 22  0d 00 fa 05 e1 0d 01 04  |       "........|
00000340  05 3a 0d 01 0e 17 dd f2  6d 6f 76 65 6c 65 66 74  |.:......moveleft|
00000350  28 64 65 67 72 65 65 73  29 0d 01 18 2e ef 34 3a  |(degrees).....4:|
00000360  f1 8a 30 2c 30 29 3b 22  4c 45 46 54 20 22 3b 64  |..0,0);"LEFT ";d|
00000370  65 67 72 65 65 73 3b 22  20 20 20 20 20 20 20 20  |egrees;"        |
00000380  20 20 20 20 20 20 22 0d  01 22 05 e1 0d 01 2c 05  |      ".."....,.|
00000390  3a 0d 01 36 18 dd f2 6d  6f 76 65 72 69 67 68 74  |:..6...moveright|
000003a0  28 64 65 67 72 65 65 73  29 0d 01 40 2f ef 34 3a  |(degrees)..@/.4:|
000003b0  f1 8a 30 2c 30 29 3b 22  52 49 47 48 54 20 22 3b  |..0,0);"RIGHT ";|
000003c0  64 65 67 72 65 65 73 3b  22 20 20 20 20 20 20 20  |degrees;"       |
000003d0  20 20 20 20 20 20 20 22  0d 01 4a 05 e1 0d 01 54  |       "..J....T|
000003e0  05 3a 0d 01 5e 0b dd f2  70 65 6e 75 70 0d 01 68  |.:..^...penup..h|
000003f0  22 ef 34 3a f1 8a 30 2c  30 29 3b 22 50 45 4e 55  |".4:..0,0);"PENU|
00000400  50 20 20 20 20 20 20 20  20 20 20 20 20 20 22 0d  |P             ".|
00000410  01 72 05 e1 0d 01 7c 05  3a 0d 01 86 0d dd f2 70  |.r....|.:......p|
00000420  65 6e 64 6f 77 6e 0d 01  90 22 ef 34 3a f1 8a 30  |endown...".4:..0|
00000430  2c 30 29 3b 22 50 45 4e  44 4f 57 4e 20 20 20 20  |,0);"PENDOWN    |
00000440  20 20 20 20 20 20 20 22  0d 01 9a 05 e1 0d 01 a4  |       "........|
00000450  05 3a 0d 01 ae 17 dd f2  70 65 6e 63 6f 6c 6f 75  |.:......pencolou|
00000460  72 28 63 6f 6c 6f 75 72  29 0d 01 b8 33 ef 34 3a  |r(colour)...3.4:|
00000470  f1 8a 30 2c 30 29 3b 22  50 45 4e 43 4f 4c 4f 55  |..0,0);"PENCOLOU|
00000480  52 20 22 3b 63 6f 6c 6f  75 72 3b 22 20 20 20 20  |R ";colour;"    |
00000490  20 20 20 20 20 20 20 20  20 20 20 22 0d 01 c2 05  |           "....|
000004a0  e1 0d ff                                          |...|
000004a3