CS 594
Fall 2019
(Take Home) HW-04
Microprocessor-Based System Design
Due before class on Oct. 9 Microprocessor-Based System Design代写
Microprocessor-Based System Design代写 (10 points) Consider the code segment, registers, and memory in the figure. What value do you expect in register
It is extremely important that you understand the assignments; please participate in the classroom discussion. You are expected to solve the homework assignments individually. You are encouraged to discuss with others; however, do not copy. Follow the submission and grading policies.
Show all steps with your solutions for full/partial points.
NAME & WSU ID: Total Points: 50 Microprocessor-Based System Design代写
Make sure to provide (i) your name & WSU ID and (ii) course & assignment information.
Also, staple the papers, if needed. Otherwise, up to 10% marks will be subtracted.
- (10 points) Consider the code segment, registers, and memory in the figure. (a) What value do you expect in register D0(7-0)? (b) What value do you see in register D0(7-0)? (c) Explain your answers in (a) and(b).
- (8+8+4 = 20 points) Write an IDE68K Assembly language subroutine “PWR2” to calculate 2^n, where n = 0, 1, 2, 3, 4, …, 15. Write MAIN to test 2^6 and 2^11. Store 2^6 at $600and 2^11 at $604. Provide adequate comments.
3.(10 points) Write a complete IDE68K Assembly program to handle the two interruptsas described below. Provide adequate comments. Microprocessor-Based System Design代写
(i)If level-3 interrupt happens, read the value of memory location$E003
(ii)If level-5 interrupt happens, write the current value of bit(0) to bit(7) of $E005(other bits must be zeros)
[6 points for MAIN, 2 points for ISR3, 4 points for ISR5, and 3 points for comments]- (10 points) Consider the following code segment. Calculate the time (in sec) required to execute the code segment in (i) a microprocessor runs at 10 MHz and (ii) a microprocessorruns at 12 MHz. [(a) 5 points for calculating the total number of cycles, (b) 21/2 points for calculating the execution time for 10 MHz, and (c) 21/2 points for calculating the execution time for 12 MHz]
; Delay subroutine (DLY)
; Input: D0 (Longword) = 5000
DLY | MOVEI.L | #500,,D2 | ; ………8 cycles |
INLP | SUBI.L | #1,D2 | ; 4 cycles |
BNE | INLP | ; 10 cycles | |
SUBI.L | #1,D0 | ; ………4 cycles | |
BNE | DLY | ; ………10 cycles | |
RTS | ; ………………16 cycles |
其他代写:代写CS C++代写 r代写 金融经济统计代写 matlab代写 web代写 app代写 作业代写 物理代写 java代写 数学代写 考试助攻 CS代写