HW_5_Solutions

HW_5_Solutions - 2 is active, a vector number of 01000010...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE252 Microprocessor Fall 2008 Homework #5 Solutions, 100 Points Due on Oct. 21, 2008 1. Chapter 4 Problems: Problems 6, 9, 12, 21, 22, 26, 28 (10pts each) 4.6. RTE as the last instruction in an exception handler will restore the status register and the PC with the return address. Notice that the CPU automatically pushes the return address to the supervisor’s stack followed by status register, at the occurrence of exceptions. If RTS is used instead of RTE at the end of an exception handler, it pops the status register and the high word of saved PC together as the return address, which corrupts PC as well as the stack pointer. 4.9. 0314 0000 2578 0081FA 0081F8 0081F6 0081F4 SSP 4.12. PC = $002A639C 4.21. 4.22. If INT 14 is active, a vector number of 01001110 is supplied to 68000. If INT
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 2 is active, a vector number of 01000010 is supplied to 68000. 4.26. Since $009A is larger than the upper bound $50 (80 in decimal) specified in CHK.W instruction, a CHK exception will occur. 4.28. 0003 0A50 $0016 $0014 2. Programming: SORT.x68 (20pts) The program reads in 3 decimal numbers from the PC keyboard and performs a sorting to put these 3 numbers in the descending order. Then it displays the sorted decimals to the PC monitor. 3. Programming: FACTOR.ASM (20pts) ; Calculate 10! The result is to appear in D1.L and ; displayed to the monitor. ; Initialize a loop counter as well as the ; starting value in D1.L. Then do the looping. factor --- org $2000 --- again ; Some looping will be required. --- move.b #9, d0 trap #15 end factor...
View Full Document

This note was uploaded on 02/18/2010 for the course ECET 252 taught by Professor Hu during the Spring '10 term at NJIT.

Page1 / 5

HW_5_Solutions - 2 is active, a vector number of 01000010...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online