EE357-HW3-Nazarian-Fall09

EE357-HW3-Nazarian-Fall09 - EE 357 Homework 3 Fall 2009...

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

View Full Document Right Arrow Icon
1 of 3 EE 357 Homework 3 Fall 2009 Nazarian Name: ___________________________________________ Assigned Friday, Oct. 2 Due: Tuesday, Oct. 13 in class (RTH109) Score: ________ For problems 1) and 2) and 3) consider the following assembly code. Instructions : Enter all register and memory values in hexadecimal (with a preceding ‘0x’) and remember the 0x2000 address prefix for .text and stack areas. For 3) enter a short description. 1) (30 pts.) Show the word content (in hex) of registers D0, D1, SP, and PC: i) Just after execution of the BSR instruction at location L1 ii) Just after the first execution of the BSR instruction at L2 iii) Just after the first RTS instruction execution iv) After execution of the STOP instruction 2) (12 pts.) Show the contents of the stack at its fullest. 3) (2 pts.) What arithmetic function is this code performing? .text 20000500 BEGIN: MOVE.L #-1,D0 0506 MOVE.L #16,D1 050C L1: BSR.W SUB1 0510 STOP #$2700 .org 0x200 0700 SUB1: TST.L D1 0702 BEQ.S EXIT 0704 LSR.L #1,D1 0706 ADDQ.L #1,D0 0708 L2: BSR.S SUB1 070A EXIT: RTS D0 D1 SP PC I) ______ ______ ______ ______ II) ______ ______ ______ ______ III) ______ ______ ______ ______ IV) ______ ______ ______ 355C 3560 3564 3568 356C 3570 3574 Initially 3578 SP=0x2000357C --> 357C
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 of 3 Stack Frames 4) (20 pts.)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/14/2010 for the course EE 357 at USC.

Page1 / 3

EE357-HW3-Nazarian-Fall09 - EE 357 Homework 3 Fall 2009...

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

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