home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 72 / IOPROG_72.ISO / soft / Codice / CRobots / Software / PCROB141.ZIP / PCROBOTS.DOC next >
Encoding:
Text File  |  1993-01-07  |  78.3 KB  |  2,303 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.             PCROBOTS V1.41 By P.D.Smith (psmithb@CIX) 1992
  8.             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  9.  
  10.             Introduction
  11.             ~~~~~~~~~~~~~
  12.  
  13.             PCROBOTS is an adaptation of CROBOTS by Tom Poindexter. This
  14.             version has more features, and allows for much more
  15.             intelligent robots. It is not limited to any particular
  16.             language; C, Pascal,Compiled Basic, 8086 Assembler etc are
  17.             all possible. The only limitation is that it must be run on
  18.             an IBM PC Compatible.
  19.  
  20.             PCRobots uses 'robots' which are actually MsDos .COM or .EXE
  21.             programs. Each program is allocated 64k for data, program &
  22.             stack requirements. This is the main limiting factor for the
  23.             number of robots being run at once. If only conventional RAM
  24.             is used a maximum of 7-8 robots is possible, depending on
  25.             your system. However, with V1.3 onwards, EMS memory can be
  26.             used. This allows up to 20 robots at once.
  27.  
  28.             PCRobots allows a large user defined arena, with obstacles
  29.             in it, it also allows inter-robot communication to allow
  30.             teamwork between robots. PCROBOTS uses a cooperative
  31.             multitasker to share the processor between the robots, the
  32.             way this works means that robots can do lots of calculations
  33.             and planning without being penalised.
  34.  
  35.             Robots are configurable, this means that if your program
  36.             suits a fast agile robot, but one which doesn't need a long
  37.             cannon range, then you can configure the robot to make use
  38.             of this. Alternatively, you may want a slow robot with lots
  39.             of armour, this is also possible
  40.  
  41.             Hardware Requirements
  42.             ~~~~~~~~~~~~~~~~~~~~~~
  43.             PCROBOTS can only be run on a PC with an EGA or VGA monitor.
  44.  
  45.             A coprocessor is optional, but it will speed up processing
  46.             of functions like scans.
  47.  
  48.             PCROBOTS supports an Adlib compatible soundcard for (very)
  49.             basic sound effects.
  50.  
  51.  
  52.  
  53.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  54.             ============================================================
  55.  
  56.             How to run PCROBOTS
  57.             ~~~~~~~~~~~~~~~~~~~~
  58.  
  59.             To run the program, use a command line like:
  60.  
  61.             PCROBOTS robot1 robot1 robot2
  62.  
  63.             This will run the 'robot1' program twice, and the
  64.             'robot2' program once.
  65.  
  66.             You can also specify groups of robots to operate as teams.
  67.             To do this you use the name <team>.TM (eg 'myteam.tm')
  68.             instead of a robot name. This file should be a text file
  69.             with a separate line for each robot in the team.
  70.  
  71.             There are also optional parameters which can be used:
  72.  
  73.                  -d - this lets you run PCROBOTS in 'debugging' mode.
  74.                       Normally PCROBOTS will stop running as soon as
  75.                       there is only one robot left. Using this switch
  76.                       will make PCROBOTS keep running until you manually
  77.                       stop it by pressing the ESC key.
  78.  
  79.                  -l<n> - this lets you set the maximum number of 'ticks'
  80.                       that a game will run. A tick is not a fixed time
  81.                       interval, instead it is a complete turn for all
  82.                       the robots. There must not be a space between the
  83.                       'l' and the number to be used. Eg '-l5000' will
  84.                       run the game for 5000 ticks.
  85.  
  86.                  -f<name> - this will append a summary of the game
  87.                       results to the file specified after the 'f'. Again
  88.                       there must be no space between the 'f' and the
  89.                       filename which follows. If no filename is
  90.                       specified, then the name 'PCROBOTS.LOG' is used.
  91.  
  92.                  -s - this will run PCROBOTS in 'slow' mode to help you
  93.                       see what a robot is doing. Pressing the spacebar
  94.                       will toggle 'single step' mode on and off (the
  95.                       'enter' key will single step). Pressing the '0' to
  96.                       '9' keys will set the speed.
  97.  
  98.                  -q - this will run PCROBOTS in 'quick' mode. In this
  99.                       mode, certain features such as explosions, and
  100.                       sound effects are disabled to increase game speed.
  101.  
  102.                  -a - this allows you to specify an alternative arena
  103.                       file, rather than the default of PCROBOTS.RNA.
  104.  
  105.                  -m - this redirects STDOUT output to a monochrome
  106.                       monitor if you have one fitted to your PC (used
  107.                       for debugging robots).
  108.  
  109.  
  110.  
  111.  
  112.  
  113.             ============================================================
  114.                                                                Page No 2
  115.  
  116.  
  117.  
  118.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  119.             ============================================================
  120.  
  121.                  -v - this gives a 'verbose' output, both at startup,
  122.                       and in the results phase.
  123.  
  124.                  -r - this lets you set the random number generator seed
  125.                       to allow identical runs to be made.
  126.  
  127.                  -i - this enables more interrupt functions, it should
  128.                       only be used during debugging.
  129.  
  130.             The parameters can be placed anywhere on the command line
  131.             following the PCROBOTS name.
  132.  
  133.             Errorlevel values
  134.             ~~~~~~~~~~~~~~~~~~
  135.             When PCRobots exits it sets the DOS errorlevel value to
  136.             allow testing from batch files. The values are:
  137.  
  138.              -1     = Error
  139.              0 -> n = Winning robot
  140.              100    = Draw (>=2 left alive)
  141.              101    = Draw (0 left alive)
  142.              200    = Esc pressed
  143.  
  144.             The PCROBOTS Arena
  145.             ~~~~~~~~~~~~~~~~~~~
  146.  
  147.             The 'Arena' is a large 1000x1000 area. Each robot can move a
  148.             maximum of 1 square per move. This is unlike the original
  149.             CROBOTS where a robot could move 100 square per move.
  150.  
  151.             The arena is displayed as a large white box occupying most
  152.             of the screen.Inside this box you will see any obstacles
  153.             that have been placed on the map (see later section for a
  154.             description of the map file). All obstacles have a white
  155.             border displayed around the square, and are defined as
  156.             below:
  157.                  White - A wall - Robots can see through this, but they
  158.                       can't move or fire shells through it. If a robot
  159.                       collides with a wall it will lose 1 armour point.
  160.                  Red - A damage trap - A robot loses 1 armour point for
  161.                       every turn it is on one of these squares.
  162.                  Green - A refueling point - If a robot comes to rest on
  163.                       one of these points, it will regain some battery
  164.                       power (see later section for more details). There
  165.                       can be up to 10 refueling points per arena.
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.             ============================================================
  179.                                                                Page No 3
  180.  
  181.  
  182.  
  183.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  184.             ============================================================
  185.  
  186.             The Robots
  187.             ~~~~~~~~~~~
  188.  
  189.             The robots will be displayed on the arena as small 5x5 pixel
  190.             shapes in a particular colour. The actual shape can be
  191.             defined in the robot program, but the default is a small
  192.             'smiley'.
  193.  
  194.             Down the right hand side of the screen there will be a list
  195.             of robots. For each entry down the right, the robot shape
  196.             and colour match the robot in the arena. Underneath the
  197.             robot are two bars. The top bar indicates the armour level
  198.             of the robot - the longer the bar the more armour there is
  199.             left, the shorter the bar, the more the robot is damaged.
  200.             The bottom bar indicates the battery level of the robot -
  201.             again, the longer the bar, the more battery power exists. A
  202.             rapidly moving robot will quickly exhaust its battery power,
  203.             meaning that it will have to wait a while until the battery
  204.             has been recharged slightly before moving on.
  205.  
  206.             If a robot has fired a cannon shell, this will be displayed
  207.             as a simple white pixel. Cannon shells move twice as fast as
  208.             the fastest robot can go, which is four times as fast as a
  209.             normal robot.
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.             ============================================================
  244.                                                                Page No 4
  245.  
  246.  
  247.  
  248.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  249.             ============================================================
  250.  
  251.             Teams
  252.             ~~~~~~~~~
  253.  
  254.             Starting with PCRobots V1.3, proper robot teams are
  255.             supported.
  256.  
  257.             Team starting locations are defined in the arena map - if a
  258.             starting location for a certain team isn't specified, then
  259.             the robots will be placed randomly.
  260.  
  261.             A team is a group of robots which the PCRobots kernel
  262.             recognises as being together. The robots have to work
  263.             together as well, as it's entirely possible for a team to
  264.             wipe itself out without any help from anyone else!
  265.  
  266.             To define a team you make a file with an extension .TM .
  267.             This file should contain a list of robot names with one name
  268.             per line.
  269.  
  270.             All the robots in a specified team will start in the map
  271.             square which is defined in the arena file. Their actual
  272.             positions on that map square are random.
  273.  
  274.             It is possible to mix teams and 'loners' on any run.
  275.  
  276.             Teams will be given a score after a run.
  277.  
  278.             The score is currently obtained from the number of robots
  279.             which are killed by that team.
  280.  
  281.                  100 points - enemy robot killed
  282.                 -500 points - friendly robot killed.
  283.  
  284.             If teams are used, the game will end when only one team is
  285.             left and there are no loner robots alive.
  286.  
  287.             Coordinates
  288.             ~~~~~~~~~~~~
  289.             The arena is defined with the coordinate 0,0 being at the
  290.             top left of the screen, and 999,999 being at the bottom
  291.             right of the screen.
  292.             Angles are defined as 0 degrees pointing to the right and
  293.             angles increase in a clockwise direction - so 90 degrees is
  294.             pointing straight down. (This allows the use of programs for
  295.             the original CRobots - the only difference being that 0,0 is
  296.             at the top left now, instead of the bottom right - this
  297.             means the robot will do a mirror image of its previous
  298.             action.
  299.  
  300.             The Map
  301.             ~~~~~~~~
  302.             The robot combat arena is defined in the file PCROBOTS.RNA
  303.             (if the file doesn't exist, then the arena is empty).
  304.  
  305.  
  306.  
  307.  
  308.             ============================================================
  309.                                                                Page No 5
  310.  
  311.  
  312.  
  313.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  314.             ============================================================
  315.  
  316.             The arena is divided into 10x10 pixel squares (that's
  317.             100x100 squares in the whole arena). The contents of each
  318.             square are defined by a single character in the PCROBOTS.RNA
  319.             file.
  320.  
  321.             Each line of PCROBOTS.RNA defines a line in the arena, and
  322.             each character defines a square on that line.
  323.  
  324.             Ideally, a complete map will consist of 100 lines of 100
  325.             characters each. However, any lines which are not 100 lines
  326.             long will be assumed to be padded with empty area. If 100
  327.             lines don't exist, then the last lines will be padded with
  328.             empty area.
  329.  
  330.             The possible characters (at the moment) are:
  331.  
  332.              '.' - this is an empty square - internally has the value
  333.             set by 'ARENA_FREE' in pcrobots.h
  334.  
  335.              'X' - this is a wall - internally has the value set by
  336.             'ARENA_WALL' in pcrobots.h
  337.  
  338.              'D' - this is a damaging trap - internally has the value
  339.             set by 'ARENA_DAMAGE' in pcrobots.h
  340.  
  341.              'R' - this is a refueling point - internally has the value
  342.             set by 'ARENA_REFUEL' in pcrobots.h
  343.  
  344.              'A' -> 'C' - these are the starting positions for robot
  345.             teams A -> C. They are not marked on the maps.
  346.  
  347.             The robot's scanner will see straight through walls, so to
  348.             avoid collisions, the robot should periodically call
  349.             'get_local_map' to see a 9x9 area around the robot (this
  350.             will be quite a slow call, so shouldn't be called more than
  351.             necessary).
  352.  
  353.             Shells will not pass through walls, so although another
  354.             robot may see you hiding behind a wall, it will not be able
  355.             to damage you unless it moves around the wall. To see if a
  356.             shell has hit a wall you'll have to call the
  357.             'get_shell_status' routine, which will tell you if the last
  358.             shell to land hit a wall or a robot.
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.             ============================================================
  374.                                                                Page No 6
  375.  
  376.  
  377.  
  378.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  379.             ============================================================
  380.  
  381.             Robot Batteries
  382.             ~~~~~~~~~~~~~~~~
  383.             As of version 0.2 robots are powered by electrical
  384.             batteries.
  385.             These batteries are constantly being charged by a solar
  386.             panel, and are constantly being discharged by robot motion.
  387.  
  388.             The battery starts off being charged with 1000 units of
  389.             energy.
  390.             Each turn the battery will be charged by 4 units. Each turn
  391.             that the robot moves the battery will be discharged by the
  392.             current speed / 10. The battery can not be charged above the
  393.             1000 unit level.
  394.  
  395.             If the battery is flat, the robot will come to a
  396.             standstill,until the battery is charged again. This means
  397.             that the robot must issue a 'move' command to start the
  398.             robot moving again.
  399.  
  400.             Battery power may be traded to buy more shells, or more
  401.             armour.
  402.             Alternatively, armour may be traded to buy more battery
  403.             power.
  404.  
  405.             If a robot is destroyed, any battery power remaining is
  406.             transferred to the robot which dealt the death blow.
  407.  
  408.             Recharging Stations
  409.             ~~~~~~~~~~~~~~~~~~~~
  410.             A map may contain between 0 and 10 refueling stations where
  411.             robots can replenish their batteries.
  412.  
  413.             These refueling stations are simply large quick charging
  414.             batteries themselves. They recharge at a rate of 5 units per
  415.             turn, as long as no robot is currently being recharged from
  416.             them. Recharging units may not acquire more than 2000 units
  417.             of charge.
  418.  
  419.             A robot must be stationary and visible on a refueling
  420.             station in order to recharge its batteries. It will take 10
  421.             units of charge from the refueling station as long as there
  422.             is sufficient charge in the refueling station's batteries.
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.             ============================================================
  439.                                                                Page No 7
  440.  
  441.  
  442.  
  443.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  444.             ============================================================
  445.  
  446.             Robot Configuration
  447.             ~~~~~~~~~~~~~~~~~~~~
  448.  
  449.             Robots may now be customised to suit a specific task, you do
  450.             this by calling the configure routine, with the appropriate
  451.             parameters.
  452.  
  453.             The configuration call *must* be the first call in the
  454.             program. If you do not call it, all the parameters will be
  455.             set to their '2' value in the table below.
  456.  
  457.             Value  Speed Manouevre Range Armour Acceleration
  458.               0      50     20%     300     50      5
  459.               1      75     35%     500     75      7
  460.               2     100     50%     700    100     10
  461.               3     150     75%    1000    150     15
  462.               4     200    100%    1500    200     20
  463.  
  464.             You have a maximum of 10 points to allocate to the robot. If
  465.             you try to allocate more points to the robot, some items
  466.             will have a value of '0'.
  467.  
  468.             It is also possible to buy an 'invisibility' device using
  469.             this function. Normally a robot will start with 1000 shells
  470.             at the beginning of a game. If you take the invisibility
  471.             device this will be reduced to 900 shells.
  472.  
  473.             Invisibility
  474.             ~~~~~~~~~~~~~
  475.  
  476.             Invisibility is a purely defensive system, and will be of
  477.             negligible use in a 'dumb' robot.
  478.  
  479.             When your robot goes invisible it will be undetectable by
  480.             other robots' scanners, however, shells landing in the
  481.             vicinity will still damage the robot.
  482.  
  483.             Also, invisibility places the following limitations on your
  484.             robot:
  485.  
  486.                  - Scanning is not possible
  487.                  - Firing the cannon is not possible
  488.                  - The battery will *NOT* be recharged while invisible
  489.  
  490.             The main use of invisibility would be to hide while running
  491.             to a safer location (to stop some 'chase' robots from
  492.             following you there). When there it would be possible to
  493.             become visible to recharge the batteries.
  494.  
  495.             When the robot is invisible an 'I' will appear next to the
  496.             robot's name.
  497.  
  498.             A robot can only stay invisible for a maximum of 100 turns,
  499.             it will then automatically become visible again. After a
  500.  
  501.  
  502.  
  503.             ============================================================
  504.                                                                Page No 8
  505.  
  506.  
  507.  
  508.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  509.             ============================================================
  510.  
  511.             robot has become visible it must remain visible for as many
  512.             turns as it was invisible before it can turn invisible
  513.             again. Thus, if a robot was invisible for 50 turns, it must
  514.             be visible for at least 50 turns before it can go invisible
  515.             again.
  516.  
  517.             ROBOT DAMAGE
  518.             ~~~~~~~~~~~~~
  519.             When a robot collides with the outside of the arena, or is
  520.             hit by a shell then it is damaged. The values of damage are:
  521.  
  522.             Collision with edge of arena - 1 point
  523.             Explosion within 50 squares  - 2 points
  524.             Explosion within 25 squares  - 8 points
  525.             Explosion within 5 squares   - 25 points
  526.  
  527.             The explosion displayed on the screen has 3 coloured areas
  528.             corresponding to these radii: 50 squares is red, 25 squares
  529.             is yellow, and 5 squares is white.
  530.  
  531.             Debugging Aids
  532.             ~~~~~~~~~~~~~~~
  533.             There are several features to help you to debug robots.
  534.  
  535.             The most basic is the use of the 'debug flags'. These can
  536.             indicate certain 'modes' of operation of the robot, for
  537.             instance a robot may have a 'running' mode and an 'attack'
  538.             mode. A debug flag indicator could be used to let you see at
  539.             a glance which mode the robot is in.
  540.  
  541.             Writing to files is allowed during the debug stages of
  542.             writing a robot, but any code to do this should be removed
  543.             or disabled before allowing the robot out in public. Reading
  544.             from files is not allowed at any stage.
  545.  
  546.             It is also possible to send output to the 'stdout' file. In
  547.             C you do this by using any of the standard output routine
  548.             such as 'printf'. In Pascal you do it by using
  549.             WRITE/WRITELN, and in Assembler you simply send output to a
  550.             file with handle=1.
  551.  
  552.             This output will be ignored unless you give the '-s' or '-m'
  553.             options on the PCROBOTS command line.
  554.  
  555.             If you use '-m' the output will be displayed on an MDA
  556.             monitor attached to your PC in addition to the EGA/VGA
  557.             display. Don't use this option unless you have an MDA
  558.             adaptor fitted, as it may cause unpredictable results.
  559.  
  560.             If you use '-s' (without '-m') then the first 19 columns of
  561.             the output will be displayed in the right hand column of the
  562.             display (under the robot names and status indicators).
  563.  
  564.  
  565.  
  566.  
  567.  
  568.             ============================================================
  569.                                                                Page No 9
  570.  
  571.  
  572.  
  573.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  574.             ============================================================
  575.  
  576.             The output drivers understand certain special characters:
  577.  
  578.                  \n = 0ah = 10 - Line feed - the print position goes
  579.                       down a line
  580.                  \r = 0dh = 13 - Carriage Return - the print position
  581.                       goes to the left hand side of the current line
  582.                  \b = 08h = 8  - Backspace - the print position goes
  583.                       back one space
  584.                  \f = 0ch = 12 - Formfeed - the screen is cleared and
  585.                       the print position goes to the start of the screen
  586.                  <Esc>Y<y><x> - This is the VT52 cursor position code. y
  587.                       and x are specified by using the character which
  588.                       has the ASCII character of the required position
  589.                       plus 32. 1,1 is the top left of the screen. Thus
  590.                       <esc>Y!! will move the cursor to the top left of
  591.                       the screen.
  592.  
  593.             Most standard cursor positioning command will also work (for
  594.             instance 'gotoxy(x,y)' in Turbo C).
  595.  
  596.             Special Keys
  597.             ~~~~~~~~~~~~~
  598.             If during operation you wish to stop a game, pressing ESC
  599.             will cause it to stop at the next movement turn.
  600.  
  601.             Pressing Ctrl-Brk will cause all the robots to be killed
  602.             instantly (even if one of them is stuck in an internal
  603.             loop), and the program will exit.
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.             ============================================================
  634.                                                               Page No 10
  635.  
  636.  
  637.  
  638.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  639.             ============================================================
  640.  
  641.  
  642.             The ROBOT programs
  643.             ~~~~~~~~~~~~~~~~~~~
  644.             Each 'robot' program consists of a single .COM or small .EXE
  645.             file. These programs must obey certain rules for the program
  646.             to work correctly.
  647.  
  648.              - no standard I/O functions (such as printf) are allowed.
  649.  
  650.              - The program must *never* finish - the main program should
  651.             consist of an infinite loop. The PCRobots executive program
  652.             will kill the program when the robot is destroyed.
  653.  
  654.              - The program must not use any memory outside the 64k
  655.             segment which it is allocated.
  656.  
  657.              - The PSP is not completely created (and may be erroneous -
  658.             I have to create it in the PCRobots program, and it may not
  659.             match the proper definition - let me know if you find a
  660.             problem).
  661.              The sections which should be correct are:
  662.               - INT 20h
  663.               - Segment of end of allocation block
  664.               - Previous contents of ints 22,23,24
  665.               - Env block pointer (points to offset 0x90 of PSP which
  666.             contains a 00h,00h value).
  667.               - Command tail - contains 00h,0dh,00h.
  668.              The FCBs & Long call to function dispatcher aren't created.
  669.  
  670.              - Floating point maths are not allowed.
  671.  
  672.              - It must make sure that it always passes control back to
  673.             the executive program when it is idling.
  674.  
  675.             DOS Functions
  676.             ~~~~~~~~~~~~~~
  677.             In V1.3 onwards a lot of DOS functions are disabled to
  678.             prevent their use in robot programs (using certain functions
  679.             may be construed as 'cheating'). In V1.4 onwards, this
  680.             checking can be made more lenient by using a debugging
  681.             command line parameter.
  682.  
  683.             Basically all DOS functions will cause the robot to be
  684.             instantly killed, except for the following:
  685.  
  686.             AH=  9h - Display String (as normal)
  687.             AH= 25h - Set Int Vector (filtered)
  688.             AH= 2ah - Get date (as normal)
  689.             AH= 2bh - Set date (dummy - does nothing)
  690.             AH= 2ch - Get time (as normal)
  691.             AH= 2dh - Set time (dummy - does nothing)
  692.             AH= 30h - Get DOS Version (as normal)
  693.             AH= 35h - Get Int Vector (as normal)
  694.             AH= 40h - Write file or device (filtered)
  695.  
  696.  
  697.  
  698.             ============================================================
  699.                                                               Page No 11
  700.  
  701.  
  702.  
  703.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  704.             ============================================================
  705.  
  706.             AH= 43h - Get/Set file attributes (as normal)
  707.             AH= 44h - I/O Ctl (as normal)
  708.             AH= 4ah - Resize memory block (redefined)
  709.  
  710.             Many of these are allowed so that compiler startup code can
  711.             operate properly.
  712.  
  713.             If you see a message such as
  714.             'killed by System Violation (4c00)' when PCRobots finishes,
  715.             then it means that a robot tried to call int 21h with AX set
  716.             to 4c00h.
  717.  
  718.             A couple of these functions are filtered or redefined. These
  719.             are:
  720.  
  721.             Set Int Vector
  722.             ===============
  723.             In this case all vector changes are ignored, except for
  724.             changes to int e0h (in which case the current robot is
  725.             instantly killed!), or int 34h -> int 3fh (in which case
  726.             alterations are made to a local interrupt vector table for
  727.             that task).
  728.  
  729.             Int e0h is also constantly being checked to prevent direct
  730.             tampering with the interrupt vector table.
  731.  
  732.             Write File or Device
  733.             =====================
  734.             Writes to stdout (file handle 1) are redirected to the
  735.             debugging output routines, other writes pass through as
  736.             normal.
  737.  
  738.             Resize Memory Block
  739.             ====================
  740.             DOS memory blocks are simulated by PCRobots to enforce a 64k
  741.             memory limit per robot. This is necessary for the EMS
  742.             operating mode.
  743.  
  744.             Robot Time Limit
  745.             ~~~~~~~~~~~~~~~~~
  746.             As of V1.3 a time limit is enforced for a move by a robot.
  747.             This time limit adjusts for the speed of the computer, and
  748.             should be around 3 seconds on a 33MHz 386.
  749.  
  750.             This time limit is not meant to seriously limit robots, it
  751.             is merely meant as a protection against robots getting stuck
  752.             in a loop like:
  753.  
  754.              do
  755.              {
  756.               getxy(&x,&y);
  757.              }
  758.              while (x>100);
  759.  
  760.  
  761.  
  762.  
  763.             ============================================================
  764.                                                               Page No 12
  765.  
  766.  
  767.  
  768.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  769.             ============================================================
  770.  
  771.             Special Functions
  772.             ~~~~~~~~~~~~~~~~~~
  773.             Special 'robot' functions such as movement, scanning,
  774.             statusreports etc, are accessed by using software interrupt
  775.             0E0h.
  776.  
  777.             The function number is placed in the AX register, and
  778.             anyrequired parameters are placed in the BX & CX registers.
  779.             Values are returned in these registers as appropriate.
  780.  
  781.             Function numbers less than 10h cause a task switch to occur.
  782.             This will end the current robot's 'turn' and give the next
  783.             robot a chance.
  784.  
  785.             There are several methods of using the special robot
  786.             functions. These are for Assembler language, C/C++, Turbo
  787.             Pascal and BASIC. There is a section on each of these below,
  788.             C/C++/Pascal/BASIC are all included together as they are
  789.             very similar to use.
  790.  
  791.             C, C++, Pascal and BASIC Functions
  792.             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  793.  
  794.             For C and C++ there are two methods of using these
  795.             functions, via PCROBOTS.LIB or via PCROBOTS.OBJ.
  796.             PCROBOTS.LIB is a Borland Library, so it may not work with
  797.             non-Borland languages, whereas PCROBOTS.OBJ is a standard
  798.             .OBJ file, so it should work with any language which can
  799.             link an object file with the C parameter passing protocol.
  800.  
  801.             To use either of these routine you should
  802.             '#include "pcrobots.h" ' in your C/C++ program. The source
  803.             code for the library is supplied in PCROBOTS.C.
  804.  
  805.             For Turbo Pascal you can use the PCROBOTS.TPU unit. This was
  806.             compiled with Turbo Pascal V5.5, but it should work with
  807.             other versions of Turbo Pascal.
  808.  
  809.             Add 'uses pcrobots;' to your source code.
  810.  
  811.             For BASIC you should '$include: 'pcrobots.bi' in your BASIC
  812.             program. You should also compile pcrobots.bas for linking
  813.             with the object file from your program. You must also
  814.             specify QBX.LIB (MS BASIC 7.1) or QB.LIB (MS Quick BASIC
  815.             4.5) when linking.
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.             ============================================================
  829.                                                               Page No 13
  830.  
  831.  
  832.  
  833.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  834.             ============================================================
  835.  
  836.             Function names
  837.             ~~~~~~~~~~~~~~~
  838.  
  839.             void swaptask(void);
  840.             procedure swaptask;
  841.             declare sub SwapTask ()
  842.             =======================
  843.  
  844.                  This procedure will simply end the current robot's turn
  845.                  if it has nothing else to do. Use this if, for
  846.                  instance, you're waiting for the robot to move to a
  847.                  certain location.
  848.  
  849.             void movement(int speed, int angle);
  850.             procedure movement(speed,angle:integer);
  851.             declare sub Movement (byval Fast%, byval Angle%)
  852.             ================================================
  853.  
  854.                  This procedure will cause the robot to start moving in
  855.                  the specified direction at the specified speed.
  856.  
  857.                  speed = 0 - max speed of robot (<=200)
  858.                  angle = 0 - 359 degrees
  859.  
  860.                  The speed will change to the target speed at the
  861.                  maximum acceleration rate specified for this robot.
  862.  
  863.                  If the robot is going above its manouvrability speed,
  864.                  then it will not be able to change direction. It must
  865.                  slow down first.
  866.  
  867.                  This procedure will cause the current robot's turn to
  868.                  end.
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.             ============================================================
  894.                                                               Page No 14
  895.  
  896.  
  897.  
  898.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  899.             ============================================================
  900.  
  901.             int scan(int angle,int res,int *range);
  902.             Function scan(angle,res:integer;var range:integer):integer;
  903.             declare function Scan (byval Angle%,byval Res%, Range%)
  904.             ===========================================================
  905.  
  906.                  This function will cause the robot to scan for other
  907.                  robots in the specified direction.
  908.  
  909.                  angle = 0 - 359 degrees
  910.                  res   = 0 - 45 degrees
  911.  
  912.                  returns the id number of the robot which was detected,
  913.                  or -1 if no robot was detected.
  914.  
  915.                  The range value is set to the range to the detected
  916.                  robot, if no robot was detected, the range is
  917.                  unspecified.
  918.  
  919.                  The scan function will scan along a specified direction
  920.                  with the specified resolution. For instance a
  921.                  scan(300,5,....) will look at the angles from 295
  922.                  degrees to 305 degrees.
  923.  
  924.                  This function will cause the current robot's turn to
  925.                  end.
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.             ============================================================
  959.                                                               Page No 15
  960.  
  961.  
  962.  
  963.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  964.             ============================================================
  965.  
  966.             int shoot(int angle,int range);
  967.             Function shoot(angle,range:integer):integer;
  968.             declare function Shoot% (byval Angle%, byval Range%)
  969.             ====================================================
  970.  
  971.                  This function causes the robot to fire a shell in the
  972.                  specified direction for the specified range. The shell
  973.                  will be fired into the air, so it will not hit any
  974.                  targets before the range is reached.
  975.  
  976.                  angle = 0 - 359 degrees
  977.                  range = 0 - max range of robot's cannon
  978.  
  979.                  if the robot was able to fire a shell then the function
  980.                  will return the shell's Id value (used with the
  981.                  'get_ashell_status' function, if it was unable to fire
  982.                  a shell for any reason, then it will return 0.
  983.  
  984.                  The robot's turret is independant of the robot's
  985.                  heading, so shells can be fired in any direction.
  986.  
  987.                  Seven shells per robot are allowed in the air at once.
  988.                  Also, the cannon takes 50 ticks to reload.
  989.  
  990.                  The robot normally starts with only 1000 shells, if
  991.                  these all run out (very unusual!), then the robot will
  992.                  be unable to fire its cannon, unless it purchases more
  993.                  shells (see 'buy_shells' function).
  994.  
  995.                  This function will cause the current robot's turn to
  996.                  end.
  997.  
  998.             void getxy(int near *x,int near *y);
  999.             procedure getxy(var x,y:integer);
  1000.             declare sub GetXY (X%, Y%)
  1001.             =================================
  1002.  
  1003.                  This function will return the current position of the
  1004.                  robot.
  1005.  
  1006.                  The x and y coordinates of the robots are returned in
  1007.                  the x and y parameters (possible values are 0 - 999).
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.             ============================================================
  1024.                                                               Page No 16
  1025.  
  1026.  
  1027.  
  1028.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  1029.             ============================================================
  1030.  
  1031.             int transmit(int target,int data);
  1032.             function transmit(target,data:integer):integer;
  1033.             declare function Transmit% (byval Target%, byval Message%)
  1034.             ==========================================================
  1035.  
  1036.                  This function will transmit the specified data to the
  1037.                  specified robot.
  1038.  
  1039.                  target = target robot id - as obtained from the scan
  1040.                            function.
  1041.                  data   = data word to send to the robot.
  1042.  
  1043.                  If the data could not be sent for any reason, the
  1044.                  function will return 0, otherwise it will return 1.
  1045.  
  1046.                  It costs one battery unit to transmit a word of data.
  1047.  
  1048.                  Robots have a 20 word FIFO receive queue where received
  1049.                  data is stored until it is read. If this buffer is
  1050.                  full, or the target robot does not exist, then this
  1051.                  function will return a 0. Success of the call does
  1052.                  *not* mean that the target robot has actually looked at
  1053.                  the received data.
  1054.  
  1055.             int receive(int *source,int *data);
  1056.             function receive(var source,data:integer):integer;
  1057.             declare function Receive% (Source%, Message%)
  1058.             ==================================================
  1059.  
  1060.                  This function allows a robot to see if any data has
  1061.                  been sent to it by another robot.
  1062.  
  1063.                  The function will return 1 if data exists, or 0 if the
  1064.                  receive buffer is empty.
  1065.  
  1066.                  If data exists, then source will be set to the id
  1067.                  number of the sending robot, and data will be set to
  1068.                  the data which was sent.
  1069.  
  1070.                  If the receive buffer was empty, then source and data
  1071.                  will be undefined.
  1072.  
  1073.                  Because this function does not cause the current
  1074.                  robot's turn to end, it is recommended that this
  1075.                  function is called periodicallyto clear up the robot's
  1076.                  input buffer, even if the data is subsequently ignored.
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.             ============================================================
  1089.                                                               Page No 17
  1090.  
  1091.  
  1092.  
  1093.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  1094.             ============================================================
  1095.  
  1096.             int damage(void);
  1097.             function damage:integer;
  1098.             declare function Damage% ()
  1099.             ===========================
  1100.  
  1101.                  This function will return the current damage status of
  1102.                  the robot.
  1103.  
  1104.                  The lower the value, the more damaged the robot is. The
  1105.                  initial value depends on the robot's configuration, but
  1106.                  is normally 100.
  1107.  
  1108.             int speed(void);
  1109.             function speed:integer;
  1110.             declare function Speed% ()
  1111.             ==========================
  1112.  
  1113.                  This function will return the current speed of the
  1114.                  robot.
  1115.  
  1116.  
  1117.             int battery(void);
  1118.             function battery:integer;
  1119.             declare function battery% ()
  1120.             ============================
  1121.  
  1122.                  This function will return the current status of the
  1123.                  battery.
  1124.  
  1125.             long ticks(void);
  1126.             function ticks:longint;
  1127.             declare function Ticks& ()
  1128.             ==========================
  1129.  
  1130.                  This function will return the number of game ticks
  1131.                  since the beginning of the game. This is not related to
  1132.                  real time, just the number of complete turns that have
  1133.                  elapsed.
  1134.  
  1135.             long l_sin(int angle);
  1136.             function l_sin(angle:integer):longint;
  1137.             declare function lSin& (byval Angle%)
  1138.             ======================================
  1139.  
  1140.                  This function will return the sine of the requested
  1141.                  angle, scaled up by a factor of 100,000.
  1142.  
  1143.                  angle = 0 - 359
  1144.  
  1145.                  This function is supported because it is not advisable
  1146.                  to use floating point numbers in the robot programs.
  1147.                  Scaled integer values should be used instead.
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.             ============================================================
  1154.                                                               Page No 18
  1155.  
  1156.  
  1157.  
  1158.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  1159.             ============================================================
  1160.  
  1161.             long l_cos(int angle);
  1162.             function l_cos(angle:integer):longint;
  1163.             declare function lCos& (byval Angle%)
  1164.             ======================================
  1165.  
  1166.                  This function will return the cosine of the requested
  1167.                  angle, scaled up by a factor of 100,000.
  1168.  
  1169.                  angle = 0 - 359
  1170.  
  1171.                  This function is supported because it is not advisable
  1172.                  to use floating point numbers in the robot programs.
  1173.                  Scaled integer values should be used instead.
  1174.  
  1175.             long l_tan(int angle);
  1176.             function l_tan(angle:integer):longint;
  1177.             declare function lTan& (byval Angle%)
  1178.             ======================================
  1179.  
  1180.                  This function will return the tangent of the requested
  1181.                  angle, scaled up by a factor of 100,000.
  1182.  
  1183.                  angle = 0 - 359
  1184.  
  1185.                  This function is supported because it is not advisable
  1186.                  to use floating point numbers in the robot programs.
  1187.                  Scaled integer values should be used instead.
  1188.  
  1189.             int l_atan(long ratio);
  1190.             function l_atan(ratio:longint):integer;
  1191.             declare function lAtan% (byval Ratio&)
  1192.             =======================================
  1193.  
  1194.                  This function will return the arctangent of the
  1195.                  requested value.
  1196.  
  1197.                  The value should be scaled up by 100,000 times.
  1198.  
  1199.                  The return value is the angle in the range -90 degrees
  1200.                  to +90 degrees.
  1201.  
  1202.             long l_sqrt(long square);
  1203.             function l_sqrt(square:longint):longint;
  1204.             declare function lSqrt& (byval Value&)
  1205.             ========================================
  1206.  
  1207.                  This function will return the square root of a number.
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.             ============================================================
  1219.                                                               Page No 19
  1220.  
  1221.  
  1222.  
  1223.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  1224.             ============================================================
  1225.  
  1226.  
  1227.             void set_pattern(const char far *pattern);
  1228.             procedure set_pattern(Buffer:Patbuf_ptr);
  1229.             declare sub SetPattern (Pattern$)
  1230.             ==========================================
  1231.  
  1232.                  This procedure will set the current pattern used to
  1233.                  draw the robot on the display.
  1234.  
  1235.                  C/C++
  1236.                  ======
  1237.                  The pattern array should consist of 5 bytes. The lower
  1238.                  5 bits of each byte will be used as a bit pattern for
  1239.                  the appropriate line of the robot's icon.
  1240.  
  1241.                  PASCAL
  1242.                  =======
  1243.  
  1244.                  There are 2 type definitions:
  1245.  
  1246.                  Pattern_buffer=array[0..5] of shortint;
  1247.                  Patbuf_ptr=^Pattern_buffer;
  1248.  
  1249.                  Pattern_buffer should be filled with 5 bytes. The lower
  1250.                  5 bits of each byte will be used as a bit pattern for
  1251.                  the appropriate line of the robot's icon.
  1252.  
  1253.                  The pointer value of this array should be used as the
  1254.                  parameter to the procedure call.
  1255.  
  1256.                  BASIC
  1257.                  ======
  1258.                  The pattern is a string of 5 characters
  1259.  
  1260.                  dim Pattern as string * 5
  1261.  
  1262.                  Only the least significant 5 bits of the ASCII values
  1263.                  of each character will be used.
  1264.  
  1265.             void debug_flag(int flag_no,int flag_set);
  1266.             procedure debug_flag(flag_no,flag_set:integer);
  1267.             declare sub DebugFlag (byval Flag%, byval Setting%)
  1268.             ===================================================
  1269.  
  1270.                  This procedure allows you to set or clear two flag
  1271.                  markers by the side of the robot's name down the right
  1272.                  hand side of the screen.
  1273.  
  1274.                  flag_no = 0 or 1
  1275.                  flag_set= 0 or 1
  1276.  
  1277.                  These two flags may be used for whatever purpose you
  1278.                  want, but they are often useful for debugging purposes.
  1279.  
  1280.  
  1281.  
  1282.  
  1283.             ============================================================
  1284.                                                               Page No 20
  1285.  
  1286.  
  1287.  
  1288.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  1289.             ============================================================
  1290.  
  1291.             void buy_armour(int units);
  1292.             procedure buy_armour(units:integer);
  1293.             declare sub BuyArmour (byval Units%)
  1294.             ====================================
  1295.  
  1296.                  This procedure lets your robot buy or sell armour.
  1297.  
  1298.                  units = number of units to buy.
  1299.  
  1300.                  If 'units' is negative, then armour will be sold.
  1301.  
  1302.                  Armour units currently are worth 50 battery units, so
  1303.                  if a robot has a high battery charge it is possible to
  1304.                  sell some units to repair damaged armour. Also, if a
  1305.                  robot needs some battery power, it can sell armour in
  1306.                  exchange for some more battery power.
  1307.  
  1308.                  The armour rating can not go above the robot's initial
  1309.                  armour rating, any extra purchased units will be
  1310.                  wasted.
  1311.  
  1312.                  NB. It is quite possible to commit suicide using this
  1313.                  call.
  1314.  
  1315.  
  1316.             void buy_shells(unsigned int units);
  1317.             procedure buy_shells(units:word);
  1318.             declare sub BuyShells (byval Shells%)
  1319.             =====================================
  1320.  
  1321.                  This procedure lets you purchase more cannon shells.
  1322.  
  1323.                  units = number of shells to buy.
  1324.  
  1325.                  It is not possible to sell shells in exchange for
  1326.                  battery power. Shells cost 10 battery units each.
  1327.  
  1328.             int shells_left(void);
  1329.             function shells_left:integer;
  1330.             declare function ShellsLeft% ()
  1331.             ===============================
  1332.  
  1333.                  This function lets your robot determine how many cannon
  1334.                  shells it has remaining.
  1335.  
  1336.                  Returns the number of shells remaining.
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.             ============================================================
  1349.                                                               Page No 21
  1350.  
  1351.  
  1352.  
  1353.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  1354.             ============================================================
  1355.  
  1356.             void get_local_map(char far *buffer);
  1357.             procedure get_local_map(ptr:MapBuf_ptr);
  1358.             declare sub GetLocalMap (Buffer$)
  1359.             ========================================
  1360.  
  1361.                  This procedure lets you obtain a map of the area local
  1362.                  to the robot. You will receive a 9x9 square map of the
  1363.                  local area, the robot's current position will be in the
  1364.                  centre square of the map. See the section on the map
  1365.                  for details of the contents of the map.
  1366.  
  1367.                  C/C++
  1368.                  ======
  1369.                  The map array should be 81 bytes long.
  1370.  
  1371.                  PASCAL
  1372.                  =======
  1373.  
  1374.                  There are 2 type definitions:
  1375.  
  1376.                  Map_buffer=array[0..8,0..8] of shortint;
  1377.                  Mapbuf_ptr=^Map_buffer;
  1378.  
  1379.                  Pass the pointer to a type of Map_buffer to the
  1380.                  procedure.
  1381.  
  1382.                  BASIC
  1383.                  ======
  1384.                  The procedure will return with Buffer$ containing a
  1385.                  string 81 characters long.
  1386.  
  1387.             void invisibility(int invis_flag);
  1388.             procedure invisibility(invis_flag:integer);
  1389.             declare sub Invisibility (byval InvisFlag%)
  1390.             ===========================================
  1391.  
  1392.                  This procedure allow the robot to become invisible or
  1393.                  visible.
  1394.  
  1395.                  invis_flag = 0 - robot is visible,
  1396.                             = 1 - robot is invisible.
  1397.  
  1398.                  If the robot isn't capable of becoming invisible, then
  1399.                  this procedure will do nothing.
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.             ============================================================
  1414.                                                               Page No 22
  1415.  
  1416.  
  1417.  
  1418.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  1419.             ============================================================
  1420.  
  1421.             int get_shell_status(void);
  1422.             function get_shell_status:integer;
  1423.             declare function GetShellStatus% ()
  1424.             ===================================
  1425.  
  1426.                  This function will return a status value reporting what
  1427.                  happened to the last shell to land.
  1428.  
  1429.                  Return value:  0 - shell missed totally
  1430.                                 1 - shell hit a wall
  1431.                                 2 - shell hit a robot within a 50 square
  1432.                                      radius
  1433.                                 3 - shell hit a robot within a 25 square
  1434.                                      radius
  1435.                                 4 - shell hit a robot within a 5 square
  1436.                                      radius
  1437.  
  1438.                  This can be useful to see if a shell is firing at a
  1439.                  robot which is hiding behind a wall.
  1440.  
  1441.             int isinvisible(void);
  1442.             function isinvisible:integer;
  1443.             declare function IsInvisible% ()
  1444.             ================================
  1445.  
  1446.                  This function will return a flag indicating whether the
  1447.                  robot is invisible or not.
  1448.  
  1449.                  Return value:  0 - robot is visible,
  1450.                                 1 - robot is invisible.
  1451.  
  1452.             int l_atan2(int y,int x);
  1453.             function L_atan2(y,x:integer):integer;
  1454.             declare function lAtan2% (byval Y%, byval X%)
  1455.             =============================================
  1456.  
  1457.                  This function will return the arctangent of y/x, giving
  1458.                  the correct value even if x is near 0. If both x and y
  1459.                  are 0, then this function will return 0.
  1460.  
  1461.             int get_robot_id(void);
  1462.             function get_robot_id:integer;
  1463.             declare function GetRobotId% ()
  1464.             ===============================
  1465.  
  1466.                  This function will return the robot ID of the current
  1467.                  robot.
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.             ============================================================
  1479.                                                               Page No 23
  1480.  
  1481.  
  1482.  
  1483.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  1484.             ============================================================
  1485.  
  1486.             void register_iff(char far *iff_string);
  1487.             declare sub RegisterIFF (IFFname$)
  1488.             =============================================
  1489.  
  1490.                  This function will inform PCRobots of the 'IFF' string
  1491.                  for this particular robot. The IFF string may only be
  1492.                  set once.
  1493.  
  1494.                  The 'iff_string' parameter is a C format zero-
  1495.                  terminated string.
  1496.  
  1497.             int check_iff;(int id);
  1498.             function check_iff(id:integer):integer;
  1499.             declare function CheckIFF% (byval Id%)
  1500.             =======================================
  1501.  
  1502.                  This function will check to see if the robot with id
  1503.                  'id' has the same 'IFF' string as the current robot. It
  1504.                  will return 1 if the strings match, or 0 otherwise.
  1505.  
  1506.             void register_name(char far *name_string);
  1507.             declare sub RegisterName (rName$)
  1508.             ==============================================
  1509.  
  1510.                  This function will inform PCRobots of the name of this
  1511.                  robot. The name may only be set once.
  1512.  
  1513.                  The 'name_string' parameter is a C format zero-
  1514.                  terminated string.
  1515.  
  1516.             int find_name(int id,char far *name_string);
  1517.             ddeclare function FindName% (byval StartId%, Name$)
  1518.             ==================================================
  1519.  
  1520.                  This function will search for a specified name. The
  1521.                  search will start at 'id' and end when there are no
  1522.                  more robots to check.
  1523.  
  1524.                  If no robot is found, it will return -1, otherwise it
  1525.                  will return the robot id.
  1526.  
  1527.                  The 'name_string' parameter is a C format zero-
  1528.                  terminated string.
  1529.  
  1530.             int get_team_id(void);
  1531.             function get_team_id:integer;
  1532.             declare function GetTeamId% ()
  1533.             ==============================
  1534.  
  1535.                  This function will return the team which the current
  1536.                  robot is on. -1 will be returned if it is a 'loner',
  1537.                  otherwise the team number (0-2) will be returned.
  1538.  
  1539.  
  1540.  
  1541.  
  1542.  
  1543.             ============================================================
  1544.                                                               Page No 24
  1545.  
  1546.  
  1547.  
  1548.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  1549.             ============================================================
  1550.  
  1551.             int get_ashell_status(int shellid);
  1552.             function get_ashell_status(ShellId:integer):integer;
  1553.             ====================================================
  1554.  
  1555.                  This function will return the status of a shell which
  1556.                  was fired in the past. Only the 10 most recent shells
  1557.                  are remembered (including those currently in flight).
  1558.  
  1559.                  The return value is similar to that obtained from
  1560.                  'get_shell_status', but with these extra possibilities:
  1561.  
  1562.                       5 - The shell is unknown (it hasn't been fired
  1563.                  yet, or it is more than 10 shells old).
  1564.                       6 - The shell is still in flight
  1565.  
  1566.                  The shellid value is obtained from the 'shoot'
  1567.                  function.
  1568.  
  1569.             int register_x(int *X);
  1570.             function register_x(X:Int_ptr):integer;
  1571.             =======================================
  1572.  
  1573.                  This function sets up a memory area to receive
  1574.                  automatically updated reports of the robot's current x
  1575.                  coordinate (this saves having to constantly use the
  1576.                  'getxy' function).
  1577.  
  1578.                  The return value is 1 if it was carried out OK,
  1579.                  otherwise it is 0 (possible problems are if the address
  1580.                  of X is not in the robot's valid address space).
  1581.  
  1582.             int (int *Y);
  1583.             function register_y(Y:Int_ptr):integer;
  1584.             =======================================
  1585.  
  1586.                  This function sets up a memory area to receive
  1587.                  automatically updated reports of the robot's current y
  1588.                  coordinate (this saves having to constantly use the
  1589.                  'getxy' function).
  1590.  
  1591.                  The return value is 1 if it was carried out OK,
  1592.                  otherwise it is 0 (possible problems are if the address
  1593.                  of Y is not in the robot's valid address space).
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.             ============================================================
  1609.                                                               Page No 25
  1610.  
  1611.  
  1612.  
  1613.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  1614.             ============================================================
  1615.  
  1616.             int configure(int speed,int manouevre,int range,int
  1617.                            armour,int acceleration,int invisibility);
  1618.             function configure(speed,manouevre,range, armour,
  1619.                            acceleration,invisibility:integer):integer;
  1620.             declare function Configure% (byval Fast%, byval Manouevre%,
  1621.                            byval Range%, byval Armour%, byval
  1622.                            Acceleration, byval Invisible%)
  1623.             ==========================================================
  1624.  
  1625.                  This function allows you to configure the robot to suit
  1626.                  the program. It *must* be called as the first thing in
  1627.                  the program.
  1628.  
  1629.                  For values of the parameters, look at the 'robot
  1630.                  configuration' section.
  1631.  
  1632.                  This function returns 0 if it was not the first
  1633.                  PCRobots call in the program (in which case it was
  1634.                  ignored).
  1635.  
  1636.                  If this function was called as the first thing in the
  1637.                  program, then it will return the PCRobots version
  1638.                  number in the two bytes of the return value. The high
  1639.                  byte will be the 'major' version number, and the low
  1640.                  byte will be the 'minor' version number. For instance
  1641.                  V1.30 will return 0x0130.
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.  
  1658.  
  1659.  
  1660.  
  1661.  
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.             ============================================================
  1674.                                                               Page No 26
  1675.  
  1676.  
  1677.  
  1678.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  1679.             ============================================================
  1680.  
  1681.             Assembler functions
  1682.             ~~~~~~~~~~~~~~~~~~~~
  1683.  
  1684.             An 8086 assembler program will normally call the functions
  1685.             directly, via an INT 0E0h software interrupt.
  1686.  
  1687.             The details below specify what parameters to place in which
  1688.             registers, and what the returned values are.
  1689.  
  1690.             Look at the C/C++ and Pascal functions above for
  1691.             descriptions of the functions themselves.
  1692.  
  1693.             The PCROBOTS.INC file may be used to specify t
  1694.             he values to place in AX.
  1695.  
  1696.             SWAPTASK
  1697.             ========
  1698.  
  1699.             Call with:     AX = 00
  1700.  
  1701.             MOVEMENT
  1702.             ========
  1703.  
  1704.             Call with:     AX = 01
  1705.                            BX = speed 0-100
  1706.                            CX = direction 0-359
  1707.  
  1708.             SCAN
  1709.             =====
  1710.  
  1711.             Call with:     AX = 02
  1712.                            BX = direction 0-359 degrees
  1713.                            CX = resolution 0-45 degrees
  1714.  
  1715.             Returns value  AX = -1 if nothing detected
  1716.                               = robot id if a robot is detected
  1717.                                 (robot id's are 0-19)
  1718.                            BX = range to the detected robot.
  1719.  
  1720.             SHOOT
  1721.             ======
  1722.  
  1723.             Call with:     AX = 03
  1724.                            BX = direction 0-359
  1725.                            CX = range 0-700
  1726.  
  1727.             Returns value in AX = 1 if shell fired, 0 otherwise.
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.             ============================================================
  1739.                                                               Page No 27
  1740.  
  1741.  
  1742.  
  1743.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  1744.             ============================================================
  1745.  
  1746.             GETXY
  1747.             ======
  1748.  
  1749.             Call with:     AX = 10h
  1750.  
  1751.             Returns values BX = Current X coordinate (0-999)
  1752.                            CX = Current Y coordinate (0-999)
  1753.  
  1754.             TRANSMIT
  1755.             =========
  1756.  
  1757.             Call with:     AX = 11h
  1758.                            BX = target robot ID
  1759.                            CX = data to be sent
  1760.  
  1761.             Returns value  AX = 0 if data could not be sent,
  1762.                               = 1 otherwise.
  1763.  
  1764.             RECEIVE
  1765.             ========
  1766.  
  1767.             Call with:     AX = 12h
  1768.  
  1769.             Returns values AX = 1 if data exists,
  1770.                               = 0 if the buffer is empty
  1771.                  If AX=1
  1772.                            BX = sender's ID ('reply to' address)
  1773.                            CX = data
  1774.  
  1775.             DAMAGE
  1776.             =======
  1777.  
  1778.             Call with:     AX = 13h
  1779.  
  1780.             Returns value  BX = damage status
  1781.  
  1782.             SPEED
  1783.             ======
  1784.  
  1785.             Call with:     AX = 14h
  1786.  
  1787.             Returns value  BX = current speed
  1788.  
  1789.             BATTERY
  1790.             ========
  1791.  
  1792.             Call with:     AX = 15h
  1793.  
  1794.             Returns value  BX = battery charge
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803.             ============================================================
  1804.                                                               Page No 28
  1805.  
  1806.  
  1807.  
  1808.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  1809.             ============================================================
  1810.  
  1811.             TICKS
  1812.             ======
  1813.  
  1814.             Call with:     AX = 16h
  1815.  
  1816.             Returns value  BX = Most significant 16 bits
  1817.                            CX = Least significant 16 bits
  1818.  
  1819.             L_SIN
  1820.             ======
  1821.  
  1822.             Call with:     AX = 17h
  1823.                            BX = angle (0-359 degrees)
  1824.  
  1825.             Returns value of 100,000 x the sine of the angle
  1826.                            BX = Most significant 16 bits
  1827.                            CX = Least significant 16 bits
  1828.  
  1829.             L_COS
  1830.             ======
  1831.  
  1832.             Call with:     AX = 18h
  1833.                            BX = angle (0-359 degrees)
  1834.  
  1835.             Returns value of 100,000 x the cosine of the angle
  1836.                            BX = Most significant 16 bits
  1837.                            CX = Least significant 16 bits
  1838.  
  1839.             L_TAN
  1840.             ======
  1841.  
  1842.             Call with:     AX = 19h
  1843.                            BX = angle (0-359 degrees)
  1844.  
  1845.             Returns value of 100,000 x the tangent of the angle
  1846.                            BX = Most significant 16 bits
  1847.                            CX = Least significant 16 bits
  1848.  
  1849.             L_ATAN
  1850.             =======
  1851.  
  1852.             Call with:     AX = 1Ah
  1853.                            BX = Most significant 16 bits
  1854.                            CX = Least significant 16 bits
  1855.  
  1856.             Returns value  AX = angle (-90 to +90 degrees)
  1857.  
  1858.                  The BX,CX parameters make up a 32 bit value that is
  1859.                  scaled up by 100,000. Hence a BX,CX of 100,000 will
  1860.                  return an angle of 45 degrees.
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.             ============================================================
  1869.                                                               Page No 29
  1870.  
  1871.  
  1872.  
  1873.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  1874.             ============================================================
  1875.  
  1876.  
  1877.             SQRT
  1878.             =====
  1879.  
  1880.             Call with:     AX = 1Bh
  1881.                            BX = Most significant 16 bits of value
  1882.                            CX = Least significant 16 bits of value
  1883.  
  1884.             Returns value  BX = Most significant 16 bits of square root
  1885.                            CX = Least significant 16 bits
  1886.  
  1887.             SET_PATTERN
  1888.             ============
  1889.             his call will change the robot's displayed picture.
  1890.  
  1891.             Call with:     AX = 1Ch
  1892.                            BX = segment of pattern array
  1893.                            CX = offset of pattern array
  1894.  
  1895.             The pattern array should consist of 5 bytes. The lower 5
  1896.             bits of each byte are used as a bit pattern for the
  1897.             appropriate line of the robot's picture.
  1898.  
  1899.  
  1900.             DEBUG_FLAG
  1901.             ===========
  1902.  
  1903.             Call with:     AX = 1Dh
  1904.                            BX = flag number to set (0 or 1)
  1905.                            CX = set/reset flag (0=reset, 1=set)
  1906.  
  1907.             BUY ARMOUR
  1908.             ===========
  1909.  
  1910.             Call with:     AX = 1Eh
  1911.                            BX = number of armour units to buy.
  1912.  
  1913.             BUY SHELLS
  1914.             ===========
  1915.  
  1916.             Call with:     AX = 1Fh
  1917.                            BX = number of shells to buy
  1918.  
  1919.             SHELLS LEFT
  1920.             ============
  1921.  
  1922.             Call with:     AX = 20h
  1923.  
  1924.             Returns value  BX = number of shells remaining
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.             ============================================================
  1934.                                                               Page No 30
  1935.  
  1936.  
  1937.  
  1938.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  1939.             ============================================================
  1940.  
  1941.             GET LOCAL MAP
  1942.             ==============
  1943.  
  1944.             Call with:     AX = 21h
  1945.                            BX = segment of map buffer
  1946.                            CX = offset of map buffer
  1947.  
  1948.                  The map buffer must be at least 81 bytes long, and will
  1949.                  be filled with a 9x9 area of the map, with the robot's
  1950.                  position in the centre.
  1951.  
  1952.             INVISIBILITY
  1953.             =============
  1954.  
  1955.             Call with:     AX = 22h
  1956.                            BX = 0 - become visible
  1957.                               = 1 - become invisible
  1958.  
  1959.              GET_SHELL_STATUS==================
  1960.  
  1961.             Call with:     AX = 23h
  1962.  
  1963.             Returns value  BX = 0 - shell missed totally
  1964.                                 1 - shell hit a wall
  1965.                                 2 - shell hit a robot within a 50 square
  1966.                                      radius
  1967.                                 3 - shell hit a robot within a 25 square
  1968.                                      radius
  1969.                                 4 - shell hit a robot within a 5 square
  1970.                                      radius
  1971.  
  1972.             IS_INVISIBLE
  1973.             =============
  1974.  
  1975.             Call with:     AX = 24h
  1976.  
  1977.             Returns value  BX = 0 - robot is visible
  1978.                                 1 - robot is invisible
  1979.  
  1980.             L_ATAN2
  1981.             ========
  1982.  
  1983.             Call with:     AX = 25h
  1984.                            BX = y
  1985.                            CX = x
  1986.  
  1987.             Returns value  AX = angle - arctangent of y/x.
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.             ============================================================
  1999.                                                               Page No 31
  2000.  
  2001.  
  2002.  
  2003.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  2004.             ============================================================
  2005.  
  2006.             GET_ROBOT_ID
  2007.             =============
  2008.  
  2009.             Call with:     AX = 26h
  2010.  
  2011.             Returns value  AX = robot id
  2012.  
  2013.             REGISTER_IFF
  2014.             =============
  2015.  
  2016.             Call with:     AX = 27h
  2017.                            BX = segment of iff_string
  2018.                            CX = offset of iff_string
  2019.                                 (string is zero terminated)
  2020.  
  2021.             CHECK_IFF
  2022.             ==========
  2023.  
  2024.             Call with:     AX = 28h
  2025.                            BX = Robot Id to test
  2026.  
  2027.             Returns value  AX = 1 - IFF strings match
  2028.                                 0 - IFF strings don't match (or invalid
  2029.                                      robot ID)
  2030.  
  2031.             REGISTER_NAME
  2032.             ==============
  2033.  
  2034.             Call with:     AX = 29h
  2035.                            BX = segment of name_string
  2036.                            CX = offset of name_string
  2037.                                 (string is zero terminated)
  2038.  
  2039.             FIND_NAME
  2040.             ==========
  2041.  
  2042.             Call with:     AX = 2Ah
  2043.                            BX = segment of name_string
  2044.                            CX = offset of name_string
  2045.                                 (string is zero terminated)
  2046.                            DX = Start ID
  2047.  
  2048.             Returns value  AX = Found Robot ID (-1 if no robot with that
  2049.                                 name)
  2050.  
  2051.             GET_TEAM_ID
  2052.             ============
  2053.  
  2054.             Call with:     AX = 2Bh
  2055.  
  2056.             Returns value  AX = Team ID value (0-2) or -1 if a 'loner'.
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.             ============================================================
  2064.                                                               Page No 32
  2065.  
  2066.  
  2067.  
  2068.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  2069.             ============================================================
  2070.  
  2071.             GET_ASHELL_STATUS
  2072.             ==================
  2073.  
  2074.             Call with:     AX = 2Ch
  2075.                            BX = Shell ID
  2076.  
  2077.             Returns value  AX = 0 - shell missed totally
  2078.                                 1 - shell hit a wall
  2079.                                 2 - shell hit a robot within a 50 square
  2080.                                      radius
  2081.                                 3 - shell hit a robot within a 25 square
  2082.                                      radius
  2083.                                 4 - shell hit a robot within a 5 square
  2084.                                      radius
  2085.                                 5 - shell is not known (not yet fired,
  2086.                                      or too old)
  2087.                                 6 - shell is still in flight
  2088.  
  2089.             REGISTER_X
  2090.             ===========
  2091.  
  2092.             Call with:     AX = 2Dh
  2093.                            BX = Segment of X word variable
  2094.                            CX = Offset of X word variable
  2095.  
  2096.             Returns value  AX = 0 - problem with address of X word
  2097.                               = 1 - OK
  2098.  
  2099.             REGISTER_Y
  2100.             ===========
  2101.  
  2102.             Call with:     AX = 2Eh
  2103.                            BX = Segment of Y word variable
  2104.                            CX = Offset of Y word variable
  2105.  
  2106.             Returns value  AX = 0 - problem with address of Y word
  2107.                               = 1 - OK
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.             ============================================================
  2129.                                                               Page No 33
  2130.  
  2131.  
  2132.  
  2133.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  2134.             ============================================================
  2135.  
  2136.             CONFIGURE
  2137.             ==========
  2138.  
  2139.             Call with:     AX = 80h
  2140.                            BX,CX = configuration details:
  2141.  
  2142.                            BX bits    0-3  = max speed
  2143.                                       4-7  = manouevrability
  2144.                                       8-11 = cannon range
  2145.                                      12-15 = robot armour
  2146.  
  2147.                            CX bits   0-2   = robot acceleration
  2148.                                      3     = invisiblity capability
  2149.  
  2150.             Returns value  AX = 1 - Configuration OK
  2151.                               = 0 - Call was not first thing in program
  2152.  
  2153.             Values of BX,CX bitmapped values:
  2154.  
  2155.             Value  Speed Manouevre Range Armour Acceleration
  2156.               0      50     20%     300     50      5
  2157.               1      75     35%     500     75      7
  2158.               2     100     50%     700    100     10
  2159.               3     150     75%    1000    150     15
  2160.               4     200    100%    1500    200     20
  2161.  
  2162.                  You have a maximum of 10 points to allocate to the
  2163.                  robot. If you try to allocate more points to the robot,
  2164.                  some items will have a value of '0'.
  2165.  
  2166.  
  2167.  
  2168.             ============================================================
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.             ============================================================
  2194.                                                               Page No 34
  2195.  
  2196.  
  2197.  
  2198.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  2199.             ============================================================
  2200.  
  2201.  
  2202.             Introduction                                           1
  2203.  
  2204.             Hardware Requirements                                  1
  2205.  
  2206.             How to run PCROBOTS                                    2
  2207.                  -d command line option                            2
  2208.                  -l command line option                            2
  2209.                  -f command line option                            2
  2210.                  -s command line option                            2
  2211.                  -q command line option                            2
  2212.                  -a command line option                            2
  2213.                  -m command line option                            3
  2214.                  -v command line option                            3
  2215.                  -r command line option                            3
  2216.                  -i command line option                            3
  2217.  
  2218.             Errorlevel values                                      3
  2219.  
  2220.             The PCROBOTS Arena                                     3
  2221.  
  2222.             The Robots                                             4
  2223.  
  2224.             Teams                                                  5
  2225.  
  2226.             Coordinates                                            5
  2227.  
  2228.             The Map                                                5
  2229.  
  2230.             Robot Batteries                                        7
  2231.  
  2232.             Recharging Stations                                    7
  2233.  
  2234.             Robot Configuration                                    8
  2235.  
  2236.             Invisibility                                           8
  2237.  
  2238.             ROBOT DAMAGE                                           9
  2239.  
  2240.             Debugging Aids                                         9
  2241.  
  2242.             Special Keys                                           10
  2243.  
  2244.             The ROBOT programs                                     11
  2245.  
  2246.             DOS Functions                                          11
  2247.  
  2248.             Robot Time Limit                                       12
  2249.  
  2250.             Special Functions                                      13
  2251.  
  2252.             C, C++, Pascal and BASIC Functions                     13
  2253.  
  2254.             Function names                                         14
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261.                  swaptask                                          14
  2262.                  movement                                          14
  2263.                  scan                                              15
  2264.                  shoot                                             16
  2265.                  getxy                                             16
  2266.                  transmit                                          17
  2267.                  receive                                           17
  2268.                  damage                                            18
  2269.                  speed                                             18
  2270.                  battery                                           18
  2271.                  ticks                                             18
  2272.                  l_sin                                             18
  2273.                  l_cos                                             19
  2274.                  l_tan                                             19
  2275.                  l_atan                                            19
  2276.                  l_sqrt                                            19
  2277.                  set_pattern                                       20
  2278.                  debug_flag                                        20
  2279.                  buy_armour                                        21
  2280.                  buy_shells                                        21
  2281.                  shells_left                                       21
  2282.                  get_local_map                                     22
  2283.                  invisibility                                      22
  2284.                  get_shell_status                                  23
  2285.                  isinvisible                                       23
  2286.                  l_atan2                                           23
  2287.                  get_robot_id                                      23
  2288.                  register_iff                                      24
  2289.                  register_name                                     24
  2290.                  find_name(int id,char far *name_string);          24
  2291.                  get_team_id                                       24
  2292.                  get_ashell_status                                 25
  2293.                  register_x                                        25
  2294.                  register_y                                        25
  2295.                  configure                                         26
  2296.  
  2297.             Assembler functions                                    27
  2298.                  SWAPTASK                                          27
  2299.                  MOVEMENT                                          27
  2300.                  SCAN                                              27
  2301.                  SHOOT                                             27
  2302.                  GETXY                                             28
  2303.                  TRANSMIT                                          28
  2304.                  RECEIVE                                           28
  2305.                  DAMAGE                                            28
  2306.                  SPEED                                             28
  2307.                  BATTERY                                           28
  2308.                  TICKS                                             29
  2309.                  L_SIN                                             29
  2310.                  L_COS                                             29
  2311.                  L_TAN                                             29
  2312.                  L_ATAN                                            29
  2313.                  SQRT                                              30
  2314.                  SET_PATTERN                                       30
  2315.  
  2316.  
  2317.  
  2318.             PCROBOTS V1.41 - P.D.Smith 7 November, 1992
  2319.             ============================================================
  2320.  
  2321.                  DEBUG_FLAG                                        30
  2322.                  BUY ARMOUR                                        30
  2323.                  BUY SHELLS                                        30
  2324.                  SHELLS LEFT                                       30
  2325.                  GET LOCAL MAP                                     31
  2326.                  INVISIBILITY                                      31
  2327.                  GET_SHELL_STATUS                                  31
  2328.                  IS_INVISIBLE                                      31
  2329.                  L_ATAN2                                           31
  2330.                  GET_ROBOT_ID                                      32
  2331.                  REGISTER_IFF                                      32
  2332.                  CHECK_IFF                                         32
  2333.                  REGISTER_NAME                                     32
  2334.                  FIND_NAME                                         32
  2335.                  GET_TEAM_ID                                       32
  2336.                  GET_ASHELL_STATUS                                 33
  2337.                  REGISTER_X                                        33
  2338.                  REGISTER_Y                                        33
  2339.                  CONFIGURE                                         34
  2340.