{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW2soln-F08

# HW2soln-F08 - 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 Fall 2008 1. In the following equation, all variables are byte variables. red ! brown " blue ( ) # yellow gold (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, BROWN SUB AL, BLUE ; one operand for byte multiplication must be in AL MUL YELLOW ; unsigned, product goes to AX DIV GOLD ; divides AX by gold , quotient goes to AL MOV RED, AL (b) MOV AL, BROWN SUB AL, BLUE ; one operand for byte multiplication must be in AL IMUL YELLOW ; signed, product goes to AX IDIV GOLD ; divides AX by gold , quotient goes to AL MOV RED, AL 2. Let the contents of AX = 100H, BX = 200H, CX = 300H, DX = 400H, and SI = 500H. Consider the following sequence of PUSH and POP instructions. PUSH AX PUSH BX POP SI PUSH CX POP CX PUSH DX POP AX POP BX (a) What are the contents of AX, BX, CX, DX, and SI after this sequence of instructions?

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 ]}