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 Fall 2002 1. Let AX = 19C3H, BX = 2B11H, CX = 3EE0H, and SP = 1988H. What are the contents of AX, BX, CX, and SP after the following sequence of instructions? PUSH BX POP AX PUSH AX PUSH CX POP BX AX = 2B11H, BX = 3EE0H, CX = 3EE0H, and SP = 1986H. 2. The following equation arises in calculating flow conditions for natural gas through a pipe. H = Q C 2 P + A (a) Write an 8086 instruction sequence to compute the equation assuming that the values are given as unsigned binary integers. Let Q be a word variable, and let C , P , and A be byte variables. What type of variable should H be? (b) Write an 8086 instruction sequence to compute the equation assuming that the values are given in unpacked BCD format. All variables are byte variables. Variable Q is a two digit value, while C , P , and A are one digit values. Additional simplifications: Part (a) - To simplify the problem, ignore the remainders of both divisions, and assume that the sum of P+A fits into one byte. Part (b) - To simplify the problem, assume that the quotient of Q/C is one digit long,

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.

## This note was uploaded on 01/25/2012 for the course EE 3750 taught by Professor Desouza during the Fall '08 term at LSU.

### Page1 / 3

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