hw1_D06_sol

hw1_D06_sol - ECE 3803 Microprocessor System Design D Term...

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

View Full Document Right Arrow Icon
ECE 3803: Microprocessor System Design D Term 2006 Homework 1 -- Solutions Show all your work and it must be neat to receive credit. Fully document any code fragments. Due Friday, March 24 th at the beginning of class. 1. [15 points] Suppose CS = 0BF70h, DS = 10BCh, SS=590h, ES = 2120h, BX=1250h, BP=1Ch, SI=01FFH. What physical addresses in memory are accessed by the following instructions? MOV DL,[BX+SI+3FH] >> DS:[BX+SI+3FH] = 10BC0h + 1250h + 01FFh + 003Fh = 1204Eh MOV CX,ES:[BX] >> ES:BX = 21200h + 1250h = 22450h ADD [SI+328H],AX >> DS:[SI+328H] = 10BC0h + 01FFh + 0328h = 110E7h MOV [BP],4325H >> SS:BP = 05900h + 001Ch = 0591Ch 2. [15 points] Generate the machine code for the 4 instructions in question 1. Label the functionality of all the bits in the machine code. Note: Other valid encodings are possible! MOV DL,[BX+SI+3FH] OPCODE = 100010 D = 1 W = 0 MOD = 01 REG = 010 R/M = 000 displace = 3Fh 10001010 01010000 00111111 = 8A 503Fh MOV CX,ES:[BX] Segment Override Prefix: 001 SR 100 = 00100110 OPCODE = 100010 D = 1 W = 1 MOD = 00 REG = 001 R/M = 111
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/29/2009 for the course ECE ECE 3803 taught by Professor Jarvis during the Spring '06 term at WPI.

Page1 / 3

hw1_D06_sol - ECE 3803 Microprocessor System Design D Term...

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

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