{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW2soln-3750

# HW2soln-3750 - EE 3750 HW 2 solutions 1 EE 3750 Homework 2...

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

EE 3750 — HW 2 solutions 1 EE 3750 — Homework 2 solutions Spring 2006 1. Brey, Chapter 5, Problem 13 — Write a short sequence of instructions that subtracts the numbers in DI, SI, and BP from the AX register. Store the difference in register BX. MOV BX, AX SUB BX, DI SUB BX, SI SUB BX, BP 2. In the following equation, all variables are byte variables. green red 5 gray * blue black (a) Write an 8086 instruction sequence to compute the equation assuming that the values are given as unsigned binary integers. (b) Write an 8086 instruction sequence to compute the equation assuming that the values are given as signed binary integers. (a) MOV AL, RED ; multiplication, division use AL, AX SUB AL, 5 MOV AH, 0 ; extend unsigned dividend to word size DIV GRAY ; divides AX / GRAY, quotient to AL MUL BLUE ; multiplies AL * BLUE, product to AX DIV BLACK ; divides AX / BLACK, quotient to AL MOV GREEN, AL (b) MOV AL, RED ; multiplication, division use AL, AX SUB AL, 5

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 2

HW2soln-3750 - EE 3750 HW 2 solutions 1 EE 3750 Homework 2...

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

View Full Document
Ask a homework question - tutors are online