Exercise 5 - Microprocessor Systems | CPE 310, Study notes of Microprocessors

Exercise 5 Material Type: Notes; Class: Microprocessor Systems; Subject: Computer Engineering; University: West Virginia University; Term: Spring 2015;

Typology: Study notes

2014/2015

Uploaded on 05/28/2015

jl1ff
jl1ff 🇺🇸

4.5

(1)

24 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Name: __________________
Exercise # 5 8086 Assembly CpE-310
(will not be graded as a quiz, but will be used to determine attendance)
Q1 – Assume that 8086 registers are loaded with the following values. Go through each instruction in the following list and
show what effective “address” or “addresses” will be used (if any) by the CPU for executing the instruction. Also update
memory or register content if needed.
Step 1: convert your student ID to HEX, copy that to memory, starting from location 12000H. Make sure to follow byte
swapping rules, the lowest byte goes first (example, ID = 70000000000 => 104C533C00
Step2: execute the following program
ADD BYTE PTR [SI], FFH
ADD WORD PTR [SI], FFH
ADD AX, [2002H]
SUB BX,[2002H]
MOV AX, 3401H
MOV BL, 04H
MUL BL
address content
12000 00
12001 3C
12002 53
12003 4C
12004 10
12005 44
12006 55
12007 66
12008 77
12009 AA
1200A A1
1200B A2
1200C 12
1200D 03
1200E 00
1200F 01
12010 10
address content
….
E0010
E0011
E0012
E0013
E0014
E0015
E0016
AX 00 55
BX 00 02
CX 11 3C
DX 00 22
SI 20 06
DI 00 02
BP 00 10
SP 00 16
DS 10 00
CS 20 00
ES 10 01
SS E0 00
(all hex numbers)

Partial preview of the text

Download Exercise 5 - Microprocessor Systems | CPE 310 and more Study notes Microprocessors in PDF only on Docsity!

Name: __________________

Exercise # 5 8086 Assembly CpE-

(will not be graded as a quiz, but will be used to determine attendance)

Q1 – Assume that 8086 registers are loaded with the following values. Go through each instruction in the following list and show what effective “address” or “addresses” will be used (if any) by the CPU for executing the instruction. Also update memory or register content if needed. Step 1: convert your student ID to HEX, copy that to memory, starting from location 12000H. Make sure to follow byte swapping rules, the lowest byte goes first (example, ID = 70000000000 => 104C533C Step2 : execute the following program ADD BYTE PTR [SI], FFH ADD WORD PTR [SI], FFH ADD AX, [2002H] SUB BX,[2002H] MOV AX, 3401H MOV BL, 04H MUL BL address content 12000 00 12001 3C 12002 53 12003 4C 12004 10 12005 44 12006 55 12007 66 12008 77 12009 AA 1200A A 1200B A 1200C 12 1200D 03 1200E 00 1200F 01 12010 10 address content …. E E E E E E E

AX 00 55

BX 00 02

CX 11 3C

DX 00 22

SI 20 06

DI 00 02

BP 00 10

SP 00 16

DS 10 00

CS 20 00

ES 10 01

SS E0 00

(all hex numbers)