Multiple choiceQuestion 1 · Recall
Loading…
By the end you can produce a trace table for a short assembly program — one row per instruction executed, recording only the values that change — and read the final contents of ACC and memory from it.
In a high-level language you read code top to bottom. An assembly program does not work like that: JMP, JPE and JPN send the processor backwards and forwards, so the same instruction runs several times and others are skipped.
A trace table records the path the processor actually took. That is the whole point: one row per instruction executed, in the order it runs.
If a loop runs three times, the loop's instructions appear in the table three times. If a jump is not taken, the next row is simply the following instruction.
END row only if the program reaches it.Two instructions change nothing in a trace table except the compare result:
CMP / CMI set the comparison result to True or False;"JMP always jumps, JPE jumps on True, JPN jumps on False."So a row for a jump often has an empty change cell — and that is the correct answer.