108
To use logic block instructions, the diagram must be divided into logic blocks.
Each block is coded using LD to code the first condition, and then AND LD or
OR LD is used to logically combine the blocks. With both AND LD and OR
LD there are two ways to achieve this. One is to code the logic block instruc-
tion after the first two blocks and then after each additional block. The other
way is to code all the blocks to be combined and then code the logic block
instructions to combine them, coding the instruction for the last pair of blocks
first and then coding the instruction to combine each other block backward to
the first block. Although either of these methods will produce exactly the
same program, the second method, coding all logic block instructions to-
gether, can be used only if eight or fewer blocks are being combined, i.e., if
seven or fewer logic block instructions are required.
The following diagram requires AND LD to be converted to mnemonic code
because three pairs of parallel conditions lie in series.
0000 0002 0004
0001 0003 0005
0500
The first of each pair of conditions is converted to LD with the assigned bit
operand and then ORed with the other condition. The first two blocks can be
coded first, followed by AND LD, the last block, and another AND LD, or the
three blocks can be coded first followed by two AND LDs. The mnemonic
code for both methods is shown below.
Address Instruction Data
0000 LD 0000
0001 OR NOT 0001
0002 LD NOT 0002
0003 OR 0003
0004 AND LD —
0005 LD 0004
0006 OR 0005
0007 AND LD —
0008 OUT 0500
Address Instruction Data
0000 LD 0000
0001 OR NOT 0001
0002 LD NOT 0002
0003 OR 0003
0004 LD 0004
0005 OR 0005
0006 AND LD —
0007 AND LD —
0008 OUT 0500
Again, with last method (on the right), a maximum of eight blocks can be
combined. There is no limit to the number of blocks that can be combined
with the first method.
The following diagram requires OR LD to be converted to mnemonic code
because three pairs of conditions in series lie in parallel to each other.
AND LD
OR LD
Converting to Mnemonic Code Section 7–2