{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Test1-3750-S02

# Test1-3750-S02 - Next subtract that minimum value for each...

This preview shows page 1. Sign up to view the full content.

EE 3750 — Test 1 Wed., March 13, 2002 Open Book For all problems: state any assumptions made; include comments as needed to make assembly language instruction sequences clear. 1. (15 pts) For the instruction ADD DX, BROWN[BX][SI] , where DX = 7234H, BX = 100H, SI = 110H, the contents of the word in memory to which BROWN[BX][SI] points are 404CH, and the offset of BROWN is 246H, answer the following. (a) Identify the addressing modes of the two operands. (b) Give sum and the flag settings for CF, PF, AF, ZF, SF, and OF after the addition. (c) Give the effective address of BROWN[BX][SI]. (d) If the physical address of BROWN[BX][SI] is 77776H, then what are the contents of DS? 2. (25 pts) Write an 8086 instruction sequence to first find the value of the minimum element of a 30 word array PURPLE of unsigned integers and store it in word variable MIN.
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Next, subtract that minimum value for each of the 30 elements. 3. (25 pts) Let GOLD be an array of bytes and let NUM be a word variable holding the number of elements in GOLD. (You may assume NUM > 1.) Write an 8086 instruction sequence to reverse the contents of the NUM bytes in GOLD (so, at the end, the original first byte will be last, and so on). 4. (35 pts) Write an instruction sequence to implement the steps below. All variables are byte variables holding signed integers. GREEN ← RED + 88 if bits 2 and 4 of GREEN are both 1 then for j ← 0 to 29 rotate YELLOW j by 3 bits to the left endfor GREEN ← YELLOW 29 else GREEN ← (GREEN*RED) / YELLOW endif BLUE ← GREEN...
View Full Document

{[ snackBarMessage ]}