HW2-F08

HW2-F08 - instructions so that each of AX, BX, CX, DX, and...

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

View Full Document Right Arrow Icon
1 OVER EE 3750 — Homework 2 due Wed., October 1, 2008 For all problems: state any assumptions made; include comments as needed to make assembly language instruction sequences clear. 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. 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? (b) Keeping the order and sources of the PUSH instructions unchanged, change the POP
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: instructions so that each of AX, BX, CX, DX, and SI ends up with the same values it started with. You must use four POP instructions, but you may change the destinations and positions of the POP instructions in the code. 2 3. Write an 8086 instruction sequence to implement the following flowchart. Start at the top box. Assume that black , white , gray , and green are byte variables holding unsigned binary data and that black and white are arrays. 4. Let tan be an ASCII character string (byte array) of 70 characters. Write an 8086 instruction sequence to do the following. Use string instructions to copy tan to array pink . Replace each non-letter character in pink by ? (= 3FH). Letter characters in pink are not to change. (See Brey, p. 34 for a table of ASCII codes.)...
View Full 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 / 2

HW2-F08 - instructions so that each of AX, BX, CX, DX, and...

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