A GUIDE TO USING OCC CONTROL

This program enables you to write commands to tell a control board what to do. It uses a Logo type language. There are 8 inputs and 8 outputs numbered 0 - 7.

Control board

DIRECT COMMANDS:

These commands must be used in direct mode and may not be written within a procedure:

BUILD name - to build a named procedure, eg. BUILD LIGHTS
BUILD name WITH store - to build a named procedure with a store, eg. BUILD FORWARD WITH TIME
CHANGE name - to change a named procedure that has already been built.
CLEAR - to clear the screen without altering memory.
DELETE name - to delete a named procedure.
DIR - to list the filenames stored in the disk directory.
FAST - to cause all procedures to run more quickly.
FINISH - to finish the program.
HURTLE - to run all procedures very fast without screen display.
LIST - to list the names of all procedures present in memory.
LIST name - to list the lines of instructions in a named procedure.
LIST ALL - to list the instructions in all procedures in memory.
LOAD filename - to load a file of procedures previously stored on disk.
PAUSE - to run a procedure one instruction at a time.
PLIST name - same as LIST but sends the output to the printer.
RENAME oldname AS newname - to rename a procedure.
RERUN - to clear memory and restart the program.
SAVE name - to save the named procedure with any dependant procedures from memory onto disk. A filename will be asked for.
SLOW - to run all procedures with a 1 second delay between each instruction. This is the normal default speed.
VALUES - to give a list of any stores and their current values.
CONTROL COMMANDS:

These commands can be used in direct mode and also for writing procedures:

BINOUT nnnnnnnn - to set the state of all the output channels (bits) by sending a binary value (0 or 1) to the output port, where 0 = off and 1 = on, eg. BINOUT 00110101 is the same as SET 5,4,2,0 plus RESET 7,6,3,1. (Can omit leading 0's = BIN 110101 )
HOOT - to make a beep sound on the computer.
IF ... THEN ... (ELSE ...) - to enable a choice of actions, eg. IF BIT 2=1 THEN SET 0 ELSE HOOT (the use of ELSE is optional).
INPUT store - to read the state of the input channels (bits) and put its decimal value into the stored variable whose name follows the command, eg. INPUT SENSORS
MAKE store=n - to give a value <n> to a store name, eg. MAKE TIME=400 or MAKE X=X+1
OUTPUT n - to set the state of all the output channels (bits) by sending a decimal value to the output port, eg. OUTPUT 53 is the same as BINOUT 00110101 above.
REPEAT n - to repeat the set of instruction lines that follow an optional number of times <n>. The number may be omitted for infinite repeats.
LIMIT (or AGAIN) - used to mark the end of a REPEAT loop (also see UNTIL)
RESET n - to reset up to four output channels (bits) to zero ie. switch them off, eg. RESET 3 or RESET 1,3,5,7
SET n - to set up to four output channels (bits) to 1, ie. switch them on, eg. SET 3 or SET 1,3,5,7
UNTIL - used instead of LIMIT or AGAIN, or after WAIT, eg. REPEAT ... UNTIL BIT 4=1 or WAIT UNTIL BIT 6=0
WAIT n - to cause a pause in a procedure, eg. WAIT 100 (waits for 1 sec.) or WAIT UNTIL BIT 6=0
DESIGNER COMMANDS:

These are procedures written using the BUILD command. They can be used in direct mode and also for writing larger procedures:

name to run the named procedure (up to 12 letters), eg. LIGHTS

name n to run a named procedure with a value <n> given to the store which was built into that procedure (see above) eg. FORWARD 100 to move a buggy forward for 1 second.
ACTION KEYS:

The following keys may be pressed while a procedure is running to effect its speed:

S slow
F fast
H hurtle
P pause (press space bar to continue)
[ESC] escape or stop
OUTPUT CONVERSION CHART:
SET BINOUT OUTPUT
0 00000001 1
1 00000010 2
2 00000100 4
3 00001000 8
4 00010000 16
5 00100000 32
6 01000000 64
7 10000000 128
     
0,1,2 00000111 7

Page last updated 23/05/2003 © Copyright, I.D.Lee, Didcot Girls' School.
All rights reserved. The original material provided on this site may not be copied or redistributed without written consent from the school.