Download presentation
Presentation is loading. Please wait.
Published byNora Mathews Modified over 9 years ago
1
INTRODUCTION TO MICROPROCESSOR Engr. Ammar Anwar Khan
2
TUTORIAL # 2 EE-353 Physical and Logical Addresses 2
3
3 8086 MICROPROCESSOR
4
MEMORY 4
5
INSTRUCTION - MOV 5 MOV AX, BX Mneunomincs Move => MOV Addition => ADD Operands – Source, Destination AX, BX etc or may be zero operand (e.g., HLT=> halt)
6
SEGMENT REGISTERS 6
7
ADDRESSES 7 8086 addresses are specified as xxxx:yyyy where xxxx is value in segment register yyyy is offset Addresses are specified as relative to start of segment eg. Instruction Pointer relative to Code Segment
8
EXAMPLES 8 Logical Address CS:IP, DS:IP, ES:IP, SS:SP 3000:1500 Physical Address (20 bits) Shift Left CS, DS,ES or SS; 30000 Add the result to IP or SP 30000+1500=31500 is the Physical Address.
9
EXAMPLES 9 If CS=3000 and IP=1500 Offset =1500 Logical Address =3000:1500 Physical Address =31500 Lower range =30000+0000=30000 Upper Range = 30000+FFFF=3FFFF
10
EXAMPLES 10 If SS=3500 and SP=FFEE Offset =FFFE Logical Address =3500:FFFE Physical Address =44FFE Lower range =35000+0000=35000 Upper Range = 35000+FFFF=44FFF
11
STACK MEMORY 11 SS and SP Used to store value on the RUN PUSH => to store the value in the memory POP => Take out the value from the memory PUSH AX POP AX
12
STACK MEMORY 12
13
STACK MEMORY 13
14
LITTLE ENDIAN 14 Higher byte goes to Upper address Lower byte goes to Lower address MOV AX,6545 MOV [1500], AX [1500] = 45 [1501] = 65 Same for stack !!!!!
15
FLAG REGISTER 15
16
DEBUG- COMMAND PROMPT 16
17
DEBUG- COMMAND PROMPT 17
18
DEBUG- COMMAND PROMPT 18
19
DEBUG- COMMAND PROMPT 19
20
DEBUG- COMMAND PROMPT 20
21
End 21
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.