Condition Code

Comparison instructions and arithmetic instructions set the condition code to signal the result of the operation. The condition code is set by these instructions as follows:

Comparison Instructions (CLC, CR, C)
Relation of Operands Condition Value of Condition Code
operand1 == operand2 equal 00 (0)
operand1 < operand2 low 01 (1)
operand1 > operand2 high 10 (2)
Arithmetic Instructions (A, AR, AH, AP, ZAP, S, SR, SH, SP)
Result of Operation Condition Value of Condition Code
0 zero 00 (0)
less than 0 minus 01 (1)
greater than 0 plus 10 (2)
overflow overflow 11 (3)


Email Me | Office Hours | My Home Page | Department Home | MCC Home Page

© Copyright Emmi Schatz 2003