HW2soln-3750

HW2soln-3750 - 1 EE 3750HW 2 solutions 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 Fall 2001 1. Write an 8086 assembly language instruction sequence to copy the odd numbered elements of byte array RED (from elements 1, 3, 5, 7, ) to consecutive elements of byte array BLUE (to elements 0, 1, 2, 3, ). Let RED have 100 elements, indexed 0 through 99. MOV SI, 1 ; pointer into RED array MOV DI, 0 ; pointer into BLUE array TOP: MOV AL, RED[SI] MOV BLUE[DI], AL ADD SI, 2 ; add 2 to SI to point to next odd element of RED INC DI ; add 1 to DI to point to next element of BLUE CMP SI, 99 JBE TOP 2. Given the register and memory contents listed below, list the changed registers and memory locations and their contents after each instruction below executed in sequence. You can identify memory locations by variable name or effective address. Contents: All integers in this problem are written in hexadecimal. Let AX = 41C, BX = 38DD, CX = 127, SP = 1984, GREEN = 670, contents of the word at the top of the stack = 3234. The effective address of GREEN is 8A14.
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.

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 - 1 EE 3750HW 2 solutions 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