Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
45Activity
0 of .
Results for:
No results containing your search query
P. 1
microprocessor _Lecture4

microprocessor _Lecture4

Ratings:

4.65

(1)
|Views: 3,755|Likes:
Published by CS420
microprocessor lecture notes 4
microprocessor lecture notes 4

More info:

Categories:Types, School Work
Published by: CS420 on Sep 16, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

12/18/2012

pdf

text

original

 
EEE 410 – Microprocessors I
Fall 04/05 – Lecture Notes # 4
Outline of the Lecture
 
Memory Map of the IBM PC
 
Pushing and Popping Operations (Stack)
 
Flag Registers and bit fieldsM
EMORY
M
AP OF THE
IBM
 
PC
 
The 20-bit address of the 8086/8088 allows 1M byte of (1024 K bytes) memory space with theaddress range 00000-FFFFF.
 
The allocation of the memory is called a
memory map
.
 RAM 
:
Memory locations from 00000H to 9FFFFH (640K) are set aside for RAM. In an IBM PCthe DOS operating system first allocates the available RAM on the PC for its own use and let therest be used for applications such as word processors.The amount of memory used by DOS varies among its various versions. That is why we donot assign any values for the CS, DS, SS, and ES. Memory management functions within DOShandle this for the operating system.
Video RAM 
:
Memory locations from A0000H to BFFFFH (128K) are set aside for video. Thisamount varies depending on the video board installed on the PC.
 ROM:
 
Memory locations from C0000H to FFFFFH (256K) are set aside for ROM. First 64 K bytesis used by BIOS (Basic Input/Output System) ROM. Some of the remaining space is used for adapter cards.
Function of BIOS ROM:
 
CPU can only execute programs that are stored in memory, there must be some permanent(nonvolatile) memory to hold the programs telling the CPU what to do when the power is turnedon.
 
BIOS contains programs to test RAM and other components connected to the CPU.
00000H9FFFFHA0000HBFFFFHC0000HFFFFFH
 
RAM640KVideo DisplayRAM 128K ROM256K
 
 
S
TACK 
:
 
P
USHING AND
P
OPPING
O
PERATIONS
 
What is a stack, and why is it needed?
The stack is a section of read/write memory (RAM) used by the CPU to store information
temporarily
. CPU needs this storage area since there are
only limited number 
of registers.
 How stacks are accessed 
 
SS
(stack segment) and
SP
(stack pointer) must be loaded to access stack in the memory.
 
Every register in the CPU (except segment registers and SP) can be stored in the stack andloaded from the stack.
 Pushing onto the stack 
 
Storing the CPU register in the stack is called a
 push
.
Ex:
SP=1236, AX=24B6, DI=85C2, and DX=5F93, show the contents of the stack as eachinstruction is executed.PUSH AXPUSH DIPUSH DXSolution:
 
 Note that in 80x86 the lower byte of the register is stored to the lower address.
 Popping the stack 
 
Loading the contents of the stack into the CPU register is called a
 pop
.
Ex:
assume that the stack is shown below, and SP=18FA, show the contents of the stack andregisters as each of the following instructions is executed.POP CXPOP DXPOP BXSolution:
SS:1230SS:1231SS:1232SS:1233SS;1234SS;1235SS:1236
 
B624C285B624935FC285B624
STARTSP=1236
 
After PUSH AXSP=1234After PUSH DISP=1232After PUSH DXSP=1230
23146B2C91F6SS:18FASS:18FBSS:18FCSS:18FDSS;18FESS;18FFSS:19006B2C91F691F6
After POP DXSP=18FEDX=2C6B
 
After POP CXSP=18FCCX=1423
 
After POP BXSP=1900BX=F691STARTSP=18FA
 

Activity (45)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Adnan Alam Khan liked this
Oscar Muindi liked this
Venkat Ram liked this
Venkat Ram liked this
Jatin Mehra liked this
nandhabas liked this
nandhabas liked this
sankethks liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->