
Computer Communication
Technical Handbook
019722-101 Rev. 05
91
SC-350/360
procedure Commands;
begin
writeln;
writeln(”Commands:”);
writeln(”1 <==> M - key”);
writeln(”2 <==> C - key”);
writeln(”3 <==> ACC+C - key”);
writeln(”8 Set batchlimit to 25”);
writeln(”9 Set batchlimit to 75”);
writeln(”0 Set batchlimit to 0”);
writeln(”C Read coins counted”);
writeln(”A Read accumlator”);
writeln(”R Start machine”);
writeln(”S Stop machine”);
writeln(”L Lock keyboard except STOP-key”);
writeln(”U Unlock keyboard”);
writeln(”H This command list”);
writeln(”esc Quit program”);
writeln;
end; { Commands }
procedure DoAction(key : char);
begin
case key of
”1”
: TxCommand(”A”, ”A”, TRUE);
”2”
: TxCommand(”C”, ”C”, TRUE);
”3”
: TxCommand(”C”, ”A”, TRUE);
”8”
: Setbatch(25);
”9”
: Setbatch(75);
”0”
: Setbatch(0);
”C”, ”c” : ReadCountReg;
”A”, ”a” : ReadAccReg;
”R”, ”r” : TxCommand(”M”, ”1”, TRUE);
”S”, ”s” : TxCommand(”M”, ”0”, TRUE);
”L”, ”l”
: TxCommand(”D”, ”k”, TRUE);
”U”, ”u” : TxCommand(”E”, ”K”, TRUE);
”H”, ”h” : Commands;
end; { case key }
end; { DoAction }
begin {
Main program
}
InitComm;
TxCommand(”Q”, ”F”, TRUE);{ LogIn }
Commands;
Revisions;
repeat
write(”Enter command: ”);
while not keypressed do;
key := readkey;
writeln(key);
DoAction(key);
until key = #27;
TxCommand(”Q”, ”Q”, TRUE);{ LogOut }
end. { Main program }
>>>