When input is recieved it is put onto a stack. There are 2 input stacks, local and radio.
The computers would be programmed with a crude version of something like qBASIC. Instead of variables though, you'd access adresses directly. You don't have types of variables to hold your hand. If you want a string you've got to work out the specifics yourself, etc. Every tic, (fairly quickly?), a certain number of commands would be executed. I guess you'd just count certain things as a command. Like a comparison could be a command, an assignment could be a command, a function call could be a command, etc. When the command limit was reached execution would suspend until the next tic where it'd either start over or continue.
I'd want a similar set up to this:
GPOPINPUT fills from the adress specified to the end of the input, the input being from the radio. If there is no input execution stops.
GOUTPUTBEGIN is called with an argument to tell the beginning adress of the output.
GOUTPUTEND is called with an argument to tell the end.
GPUSHOUTPUT pushes the output onto the output stack which is actually popped from bottom to top on every tic.
Code: Select all
ADR[1] = 2
GPOPINPUT ADR[2]
findend:
IF ADR[ADR[1]] = 0 THEN
ADR[0] = ADR[1] - 1
ADR[1] = 2
GOTO decode
ELSE
ADR[1] = ADR[1] + 1
GOTO findend
END IF
decode:
IF ADR[1] = ADR[0] THEN
ADR[1] = 2
GOTO finish
ELSE
ADR[ADR[1]] = ADR[ADR[1]] - 3
END
finish:
LOUTPUTBEGIN ADR[ADR[1]]
LOUTPUTEND ADR[ADR[0]]
LPUSHOUTPUT
Would decode an obfuscated string of characters increased by 3 a piece.