Microprocess Architecture Real Mode Addressing
Microprocess Architecture Real Mode Addressing
1
Programming Model
2
8 bit
names
32 BIT 16 bit
NAMES names
EAX AH AX AL ACCUMULATOR
ECX CH CX CL COUNT
EDX DH DX DL DATA
3
EIP IP ACCUMULATOR
CS CODE
DS DATA
ES EXTRA
SS STACK
FS
GS
5
Special – Purpose Registers
EIP (Instruction Pointer)
ESP (Stack Pointer)
EFLAGS
6
FLAGS
C (Carry) RF(resume)
P (Parity) NT (nested task)
A (Auxiliary carry) VM (virtual mode)
Z (Zero) AC (alignment check)
S (Sign) VIF (Virtual Interrupt flag)
T (Trap) ID (identification)
I (Interrupt)
D (Direction)
O (overflow)
IOPL (I/O Privilege level)
7
Segment Register
CS (Code)
DS (Data)
ES (extra)
SS (Stack)
FS and GS
8
Real Mode Memory Addressing
80286 and above operate in either the read or protected mode.
Only the 8086 and 8088 operate exclusively in the real mode.
9
Segment and Offsets
Combination of a segment address and an offset address
access a memory location in the real mode.
The segment address located within one segment register
defines the beginning address of any 64K-byte memory
segment.
The offset address is also held in a register and selects any
location within the 64K byte memory segment.
10
FFFFF
1FFFF
Segment Register
10000 1000
12
Example
What is the ending address of the segment, whose address
is defined as 3000H in the segment register?
Solution:
30000H starting/first address (appended 0)
+ FFFFH
3FFFFH ending address
13
Example
If the segment address is 1000H and the offset address
2000H, what is the address of the memory location?
Solution:
10000H starting/first address (appended 0)
+ 2000H offset address
12000H memory location address
14
Example
What is the actual memory location of 1234:300?
Solution:
12340H starting/first address (appended 0)
+ 300H offset address
12640H memory location address
15
Segment and Offset Address
Combinations (for 16-bit)
Segment Offset
CS IP
SS SP or BP
DS BX, DI, SI
ES DI
17
Boardwork: (3 problems)
1. 2300H:1A00H
2. SI = 1002H and DS = 2000H
3. SP = 3A00H and SS = 2900H
18