Given the program below, trace the results for each instruction from start to stop. Use the
table provided below to indicate the values stored in registers A, B, X, and memory locations
at $5004 and $5005 after the execution of each instruction. Show all numbers in hexadeci-
mal representation.
org
$5000
data dc.b $44, SFA, $A1, $33, $22, $12 : define constants starting at org address
clra
; clear reg. A
clrb
; clear reg. B
start Idx #data
; load reg. X
Idd 2,+x
; load reg. D in preincrement addr. mode
Isla
; logical shift left acc. A (via Carry bit)
stop std 2,+x
; store reg. D in preincrement addr. mode
Note: Accumulator D consists of reg. A (most significant) and reg. B (least significant).
Instructions
A
B
X
[$5004] [$5005]
Idx #data
00
00
5000
22
12
Idd 2,+x
A1
33
5002
22
12
Isla
42
33
5002
22
12
std 2,+x
42
33
5004
42
33