December 2001 Commands 7 – 87
Word processing
with the LOAD
command
Syntax: L (LOAD)
Operands: B, W, D, K
Action:
Load the value of the addressed operand, or of a constant, into the word
accumulator. If necessary, the accumulator is supplemented with the correct
algebraic sign. In contrast to logical operations, you must always begin a
sequence of word gating operations with an L command. You cannot replace
the L command with a logical gating instruction.
Example:
Gate a constant and byte B5 with AND, and assign the result to byte B8.
Initial state:
Constant 54 = 36 (hex)
Byte B5 = 2A (hex)
Output B8 = ?
Function STL Accumulator contents [bit] Operand contents [bit]
31..15 .................... 7 ................. 0 7 ............. 0
Load the constant
into the word
accumulator.
L K+54 0 ..... 0 000000000110110
Gate the contents
of word
accumulator and
byte B5 with AND.
A B5 0 ..... 0 00 0 0 0 0 00 0 1 0 00 10 00101010
Assign the gating
result to byte B8.
= B8 0 ..... 0 0 00 00 00 00 1 0 00 10 00100010