First page Back Continue Last page Overview Graphics
Laboratory 3.2 : Condition Code Register
The program below defines NUM_1 as a byte containing 40 hex and NUM_2 as a byte containing 50 hex. The program loads Accumulator A with NUM_1 and then adds NUM_2 to the Accumulator.
num_1: dc.b $40
num_2: dc.b $50
start: ldaa num_1
Set up sections for code and data as in the previous programs. Set the program counter to 0x900.
Step through the program (until the nop instruction is reached) and show the contents of Accumulator A after program execution.
A = ________________
Show the states of the following (Condition Code [CC] Register) after execution:
Carry Flag (C) ______ Overflow Flag (V) ______
Negative Flag (N) ______ Zero Flag (Z) ______
Is the result negative? _______ Did overflow occur? ______
Did a carry result? _______