Question: Consider the following 68000 program: (a) What does this program do? (b) How many 16-bit words are needed to store this program in the memory?
Consider the following 68000 program:
(a) What does this program do?
(b) How many 16-bit words are needed to store this program in the memory?
(c) Give an expression for the number of memory accesses required. The expression should be of the form T = a + bn + cm, where n is the number of times the loop is executed, m is the number of times the branch to NXT is not taken, and
a, b, and c are constants.
MOVEA.L MEM1,A0 MOVEA.L MEM2,A2 ADDA.L AO,A1 MOVEA.L A0,A2 MOVE.B (A0)+,DO LOOP CMP.B (AO) +,DO BLE NXT LEA -1(A0),A2 MOVE.B (A2),D0 NXT CMPA.L AO,A1 BGT LOOP MOVE.L A2,DESIRED
Step by Step Solution
3.42 Rating (155 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
