ECET 20900 Practice Assembly Program memory map
1. Fill in the instruction addresses, the operands, (opcodes are given), and then, fill in the values for
the designated register (after execution of the instruction). Indicate answers in hex.
Segment addresses are as follows:
The constant section starts at 0xC01D The data section starts at 0x2100 The code section starts
at 0xc000
;addresses
; in the constant/variable section
________ v1: dc.b $45,$20,$18
________ v2: dc.w $9F8,$F322
________ c1: equ $1A
________ v3: dc.b $59
; in the data section
________ s1: ds.b 3
________ s2: ds.w 1
; in the code section
;addresses Opcode Operand Dest: Value

________ ldab v1+2 __F6__ _________ B: ________
________ ldaa v1 __B6__ ________ A: _________
________ staa s1+2 __7A__ ________ s1+2: ________
________ stab s1+1 __7B__ ________ s1+1: ________
________ ldd v2+2 __FC__ ________ D: ________
________ std s2 __7C__ ________ s2: ________
________ ldaa #c1 __86__ _________ A: _________
________ adda #c1 __8B__ ________ A: ________
________ adda v3 __BB__ ________ A: ________
________ staa s1 __7A__ ________ s1: ________
________ nop __A7__ ________ none

2. Consider the program in Question 1: For each section determine how many bytes are
reserved in memory:
constant section Answer: ________ decimal.
data section Answer: ________ decimal.
code section Answer: _____ decimal.
3. When the program reaches the NOP instruction What is in the following:
D reg ____, S1:____, S1+1: ___, S1+2 ____, S2____, S2+1_____

Published by
Ace Tutors
View all posts