GAL 1.0

ACC: 0

PC : 0

HALT:

Instruction set

CLRclear the accumulator
LODload the accumulator from a cell or with a constant
ADDadd a cell or constant to the accumulator
SUBsubtract a cell or constant from the accumulator
INCadd 1 to the accumulator
DECsubtract 1 from the accumulator
NEGnegate the value in the accumulator
MULmultiply the accumulator by a cell or constant
DIVdivide the accumulator by a cell or constant
MODmodulo divide the accumulator by a cell or constant
STOstore the accumulator into a data cell
PRNoutput the accumulator as a number
PRCoutput the accumulator as a character
JMPjump to a code label
JEZjump to a code label if the accumulator is zero
JNZjump to a code label if the accumulator is not zero
JLZjump to a code label if the accumulator is less than zero
JGZjump to a code label if the accumulator is greater than zero
HLTstop execution
NOPdo nothing
RDNread a number into the accumulator (error if no number remains)
RDCread the next character into the accumulator (0 when input ends)
DATdeclare a data cell (label required), e.g. FOO: DAT 10