Decision making



Decision making in Assembler is based on the setting of a 2-bit Condition Code (CC, bits 18 & 19) and always requires two instructions, the first to set the code, and the second, a Branch which tests the Condition Code and routes execution accordingly.

The two bits give four possible settings in binary; '00', '01', '10', and '11', so the Branch has a 4-bit mask for the test. (A mask of '1111' indicates an unconditional Branch (GOTO.)

Not all instructions set the Condition Code, but equally is it not restricted to Compares.

See some examples


The process is equivalent to COBOL and PLI IF statements.

Decision making

Copyright © Legac-e Education 2015-