
49
0002
0003
LR 0000
0001
0000
0004
0005
0106
0107
Address
Instruction
Operands
000
LD
0002
001
AND NOT
0003
002
OR
0001
003
AND
0000
004
LD NOT
0004
005
AND
0005
006
OR LD
--
007
LD NOT
0106
008
AND
0107
009
OR LD
--
010
OUT
LR
0000
The following diagram requires five blocks, which here are coded in order
before using OR LOAD and AND LOAD to combine them starting from the
last two blocks and working backward. The OR LOAD at program address
008 combines blocks d and e, the following AND LOAD combines the result-
ing execution condition with that of block c, etc.
LR 0000
0000
0003
0004
0106
0107
0001
0002
0005
Block e
Block d
Block c
Block b
Block a
Address
Instruction
Operands
Blocks d and e
Block c with result of above
Block b with result of above
Block a with result of above
000
LD
0000
001
LD
0001
002
AND
0002
003
LD
0003
004
AND
0004
005
LD
0005
006
LD
0106
007
AND
0107
008
OR LD
--
009
AND LD
--
010
OR LD
--
011
AND LD
--
012
OUT
LR
0000
Again, this diagram can be redrawn as follows to simplify program structure
and coding and to save memory space.
0106
0107
LR 0000
0005
0001
0002
0003
0004
0000
Address
Instruction
Operands
000
LD
0106
001
AND
0107
002
OR
0005
003
AND
0003
004
AND
0004
005
LD
0001
006
AND
0002
007
OR LD
--
008
AND
0000
009
OUT
LR
0000
Basic Programming
Section 3-4