2.6 If a program needs to use the results of two constants multiplied together, should the multiplication be performed at build time, or run time? Why?

3.1 Using the DG128 Memory Mappreview.pngpopout.png (Configured with BasicIO and DBug12) for the MC9S12DG128E, show the origin directives required to:

a. locate a program in the byte erasable EEPROM

b. locate the variables in the user RAM

3.3 How many bytes of memory are used for each of the following directives?

a. fcc /Good luck/

b. PTR equ $0002

c. rmb 64

d. dc.b 10

e. ds.w 2

f. TBL fdb $0100,0,01

3.4 Show the values that will be loaded in memory for the directives in Excercise 3.3a. If the contents are unknown, show a question mark. The answer should be given as a table, assuming an org of $1000.

4.1 Determine the object code for the following instructions, assuming a two-pass assembly process. Assume that var1 is a forward-referenced label equal to $00E0.

a. ldaa var1

b. ldd 5,x

c. adda $15

d. ldd 5,x+

e. ldd A,x

f. ldd [D,pc]

4.2. Give the addressing mode and the effective addresses for the instructions in Excercise 1. Assume the following register and memory contents before each instruction:

8820    0D 26 E9 3F - 3B 16 08 2F - 83 00 01 26 - F8 3A 3D 34

 PC       SP        X         Y        D = A:B        CCR = SXHI  NZVC

0820   0900   0300   0000          80:00                  1001  0100

4.3 For Exercise 4.1a, show the instruction syntax to force direct addressing.


Want an answer?

No answer yet. Submit this
question to the community.