SMAC
LAC-26 Technical Reference Manual
4/29/2013 33
4.4 Register Commands
The LAC-26 uses part of its nonvolatile RAM (NVRAM) to create a 512 by 32 bit general purpose
register space with Register "0" being referred to as the Accumulator.
The registers have many uses including storing data and parameters, performing mathematical
operations and controlling command execution. The registers can be manipulated by several commands
and can also be used to replace the argument in most commands. For example, if register "6" contains
the value "-12000" and the following command is used...
MA@6,GO
it would use the contents of register "6" as the argument thus giving the same result as if the
following command was issued...
MA-12000
Note that the use of the "@" character is what caused the command to assume a register
argument (or indirect argument) instead of a direct argument. If the value following the "@" is not in the
range of the 512 registers (0 to 511), an error will be reported. If the value contained by the register of the
indirect argument is out of range, an error will also be reported.
As stated earlier, because the registers are within the NVRAM, they are non-volatile and can be
used as such. For example, if a register is incremented once every user program cycle, it can be used as
an ongoing cycle counter for maintenance purposes, production accounting and etc.
4.4.1 Internal Variables
In certain applications, the user may find it necessary to use data pertinent to the internal
operation of the LAC-26. This may be accomplished via the use of the Read Byte (RB), the Read Word
(RW) and the Read Long (RL) commands which copy the LAC-26's internal RAM memory to the
accumulator and the Write Byte (WB), the Write Word (WW) and the Write Long (WL) commands which
copy the accumulator to the LAC-26's internal RAM memory. The listings below tell the location of and
describe the internal variables that may be of use to the user.
WARNING: Randomly modifying these variables or other internal RAM not listed will most likely
affect the operation of the LAC-26 resulting in unpredictable behavior or possible
damage.