Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

First Name Last Name Answer all questions and show your work Clearly indicate yo

ID: 2080260 • Letter: F

Question

First Name Last Name Answer all questions and show your work Clearly indicate your answers you need additional space, blank paper will be supplied No books or computers allowed. 1. (20 pts) Circle T (true) or F (false) for each of the following statements about the 68000. T F (a) Register A7 in the 68000 can be used as a stack pointer. T F (b) The program counter (PC) contains the address of the instruction currently being executed T F (c) ADD.L D5, #$05 is an executable instruction in 68000. T F (d) The 68000's JMP instruction causes a return address to be pushed onto the system stack. T F (e) An attempt to access a word or longword at an odd memory address is OK in 68K. T F d) Execution of the 68000's CMP instruction does not alter the destination register or memory. T F(g) The 68000s N flag is found in the Program Counter (PC) register. T F (h) The 68000 can address only byte and word length data. T F (ij In the 68000's LEA instruction, the destination must be a data register. T FO CMP D1, D2 subtracts D2 from D1 and set flags only; it does not change DI or D2. 2. (15 pts) Evaluate each of the following lines separately and describe the nature of the error. a. ADD. W +(AS), D3 b. SWAP. B D3 d. TST.W #$4000 e. ADDQ.B #19,-(A6) (5 pts) What is the largest memory space that can be directly addressed by the 68000 processor? Why? What is the address range?

Explanation / Answer

(a)

The active stack pointer register SP is also called A7 in 68000. It is called user stack pointer register.

During interrupts the active SP is another register called ISP (interrupt stack pointer)

Hence, the statement is true.

(b)

Program Counter is a 68k register that holds the current location of the program.

Hence, the statement is true.

(c)

ADD.L D5,#$05

The syntax of add instruction is

add{.size} src,dst

The destination register dst cannot be an A register, an immediate operand or a PC relative address.

Hence, the instruction is not a valid 68 k instruction.

Thus, the statement is false.

(d)

JMP instruction causes the continuation program execution at the address specified by the JMP instruction.

It does not have any return address like the interrupt service routine.

Hence, the statement is false.

(e)

For 16-bit memory interface, the address bus must be an even number.

For a 32 bit memory interface, the address bus must be a multiple of 4.

Hence, odd numbers are not allowed for memory addresses in 68k.

Thus, the statement is false.

(f)

CMP instruction compares the source and the destination operands by subtraction. It does not modify the destination register or memory.

Hence, the statement is true.

(g)

Program Counter is a 68k register that holds the current location of the program. It is not related with the Negative flag (N-flag).

Thus, the statement is false.

(h)

The 68k address bus uses 32 bits, but it accesses only 24-bit address space. The 8 high-order address bits are ignored due to lack of physical device pins.

Thus, the statement is false.

(i)

LEA is the load effective address instruction. The effective address is computed and loaded into the specified address register. The destination is an address register, not a data register.

Thus, the statement is false.

(j)

CMP D1,D2 instruction calculates the difference between D1 and D2 and sets the flags, N, Z, V, C according. It does not change the registers, D1 and D2.

Hence, the statement is true.