HW2soln-3750

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

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

View Full Document Right Arrow Icon
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
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.

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 Right Arrow Icon
Ask a homework question - tutors are online