microprocessors

microprocessors

EE 215 Homework #2

1. (15 pts) The following 68000 assembly language instructions are all incorrect. In each case, what

specifically is the error? (Hint: Consult the 68000 Instruction Set)

a. EXT.B DO

b. CMP.B #10,#20

c. ASR.W #9,D3

d. RTS.B

e. EOR.W (A1)+,D5

f. ANDI D1,D2

g. CLR.L A4

h. SWAP A3

i. ADDQ.L #14,D1

j. MOVEA.B #9,A1

2. (5 pts) Describe the following 68000 condition code register (CCR) flags

a. Z

b. N

c. C

d. V

3. (10 pts) Translate this high level language into 68000 assembly language. Assume the labels ‘T’, ‘X’,

and ‘Y’ have already been defined as references to specific memory addresses.

if T is greater than 10

then X=3

else Y=6

end if

4. (10 pts) Explain what the following 68000 assembly language does. Describe each line of code AND

describe the overall effect of the program.

MOVE.B #10,D1

MOVEA.L #$500,A1

LOOP CLR.L (A1)

ADD.L #4,A1

SUB.B #1,D1

BNE LOOP

STOP #$1000

Please follow and like us: