Memory Management 计算机学院 李征 Tel : 13882153765 : OICQ: 1340915.

Slides:



Advertisements
Similar presentations
Stack Memory 00000H 00001H 01058H TOS SS SP 1104FH BOS
Advertisements

Intel 8086.
Assembly Language – 1.
8086 Ahad.
Microprocessor A microprocessor also called the CPU is the heart of the computer system or any computing device. It is a semiconductor chip which can be.
Memory Segmentation of Intel 8086
O PERATING I N R EAL M ODE Prof.P.C.Patil Department of Computer Engg Matoshri College of Engg.Nasik M ICROPROCESSOR A RCHITECTURE.
CAP/IT2211 PC IBM Organization. 16-Bit Intel Processor Architecture  A-16 bit microprocessor can operate on 16 bits of data at a time.  8086/8088 have.
Block Diagram of Intel 8086 Engr.M.Zakir Shaikh
Instruction Classification and Addressing Mode 计算机学院 李征 Tel : : OICQ:
Programming 8086 – Part IV Stacks, Macros
Register In computer architecture, a processor register is a small amount of storage available on the CPU whose contents can be accessed more quickly than.
Registers of the 8086/ /2002 JNM.
Chapter 3 โพรเซสเซอร์และการทำงาน The Processing Unit
Run-time Environment for a Program different logical parts of a program during execution stack – automatically allocated variables (local variables, subdivided.
SOFTWARE ARCHITECTURE OF THE 8088 AND 8086 MICROPROCESSORS
Introduction to Microprocessor
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#3) By Dr. Syed Noman.
Procedures and Stacks. Outline Stack organization PUSH and POP instructions Defining and Calling procedures.
DAT x86 “Real” Memory Addressing © Alan T. Pinck / Algonquin College; 2003.
8086 Assembly Language Programming I
Lecture 6 Machine Code: How the CPU is programmed.
Set 20 Interrupts. INTERRUPTS The Pentium has a mechanism whereby external devices can interrupt it. Devices such as the keyboard, the monitor, hard disks.
1 Hardware and Software Architecture Chapter 2 n The Intel Processor Architecture n History of PC Memory Usage (Real Mode)
1 ICS 51 Introductory Computer Organization Fall 2006 updated: Oct. 2, 2006.
3-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL Intel 8088 (8086) Microprocessor.
ICS312 Set 3 Pentium Registers. Intel 8086 Family of Microprocessors All of the Intel chips from the 8086 to the latest pentium, have similar architectures.
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Fall 2012 Lecture 15: Protected mode intro.
80x86 Processor Architecture
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Spring 2013 Lecture 4: 80386DX memory, addressing.
Gursharan Singh Tatla Block Diagram of Intel 8086 Gursharan Singh Tatla 19-Apr-17.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
Interrupts  Interrupt is a process where an external device can get the attention of the microprocessor.  The process starts from the I/O device  The.
An Introduction to 8086 Microprocessor.
Basic Microcomputer Design. Inside the CPU Registers – storage locations Control Unit (CU) – coordinates the sequencing of steps involved in executing.
Intel Pentium II Processor Brent Perry Pat Reagan Brian Davis Umesh Vemuri.
Types of Registers (8086 Microprocessor Based)
Microcomputer Principle and Interface Technology - Introduction 计算机学院 李征 Tel : : OICQ:
INT- interrupt program execution 1. It decrements the sp by 2 and pushes the flag registers on the stack. 2. Decrement the sp by 2 and push the content.
INTRODUCTION TO MICROPROCESSOR Engr. Ammar Anwar Khan.
Microprocessor Microprocessor (cont..) It is a 16 bit μp has a 20 bit address bus can access upto 220 memory locations ( 1 MB). It can support.
Interfacing Data Converters. D/A converters Design an O/P port with the address FFh to interface the 1408 D/A converter that is calibrated for 0 to 10V.
Intel 8086 (8088) Microprocessor Structure
COMP 1321 Digital Infrastructure Richard Henson University of Worcester October 2015.
COMP 1321 Digital Infrastructure Richard Henson University of Worcester October 2012.
MODULE 5 INTEL TODAY WE ARE GOING TO DISCUSS ABOUT, FEATURES OF 8086 LOGICAL PIN DIAGRAM INTERNAL ARCHITECTURE REGISTERS AND FLAGS OPERATING MODES.
Microprocessor Fundamentals Week 2 Mount Druitt College of TAFE Dept. Electrical Engineering 2008.
Intel 8086 MICROPROCESSOR ARCHITECTURE
SOFTWARE ARCHITECTURE OF THE 8088 AND 8086 MICROPROCESSORS
ΜComputer Structure μProcessor Memory Bus System I/O Ports.
Interrupts and interrupt responses
16.317: Microprocessor System Design I
Microprocessor and Assembly Language
Microprocessor Systems Design I
Microprocessor Systems Design I
Microprocessor Systems Design I
Interrupts In 8085 and 8086.
143A: Principles of Operating Systems Lecture 5: Address translation
University of Gujrat Department of Computer Science
Instruction Formats Each instruction consists of two parts:
Symbolic Instruction and Addressing
University of Gujrat Department of Computer Science
8086 Registers Module M14.2 Sections 9.2, 10.1.
CS-401 Computer Architecture & Assembly Language Programming
Symbolic Instruction and Addressing
Von Neumann model - Memory
Lecture 06 Programming language.
Unit-I 80386DX Architecture
Memory segmentation and addressing
Presentation transcript:

Memory Management 计算机学院 李征 Tel : : OICQ:

(1) Segment Management Inside CPU, logic address is used; physic address is used on system bus. To CPU or program, memory is composed of several segments. There are only 4 current segments which can be operated.

(1) Segment Management For 8086/8088, the addressing range of memory is 1M bytes. How many segments can be there in maximum? How about the maximal length of a single segment?

(2) Storage order – Converse Storage Converse Storage: Lower address for lower bits, and higher address for higher bits. It is a tradition of Intel, not for all CPUs.

(2) Storage order – Converse Storage Example: MOV DS:[0002H], 1234H ; (DS) = 1000H How is this data be stored?

(2) Storage order – Converse Storage 10000H 10001H 10002H 10003H 10004H 10005H 10006H (DS)=1000H EA=0002H 34H 12H

(3) Stack Segment Functions of Stack Segment: 1) Preserve return point (address) of procedure 2) Preserve break point (address) of interrupt routine 3) Preserve CPU execution scene

1) Preserve return point (address) of procedure In calling program …… CALL PROC1 …… Where does IP point when this ‘CALL’ instruction is executed ?

1) Preserve return point (address) of procedure How is ‘CALL’ instruction executed? Just one case, not all: SP <= (SP)-2 (SP) <= (IP) IP <= PROC1

1) Preserve return point (address) of procedure In called procedure: ……RET The final instruction executed in procedure must be a ‘RET’.

1) Preserve return point (address) of procedure How is ‘RET’ instruction executed? Just one case, not all: IP <= ((SP)) SP <= (SP)+2 When ‘RET’ is executed, procedure must ensure the stack top is return point.

1) Preserve return point (address) of procedure Why return point must be stored as stack structure? Why not other structures? The calling and returning follow the LIFO rule.

2) Preserve break point (address) of interrupt routine When CPU accept an interrupt, the following operation is executed: SP <= (SP)-2 (SP) <= FR SP <= (SP)-2 (SP) <= CS SP <= (SP)-2 (SP) <=IP Why FR is also preserved?

2) Preserve break point (address) of interrupt routine In interrupt routine: ……IRET The final instruction executed in procedure must be a ‘IRET’.

2) Preserve break point (address) of interrupt routine How is ‘IRET’ instruction executed? IP <= ((SP)) SP <= (SP)+2 CS <=((SP)) SP <= (SP)+2 FR <= ((SP)) SP <= (SP)+2 When ‘IRET’ is executed, interrupt routine must ensure the stack top is a break point.

2) Preserve break point (address) of interrupt routine Why break point is also preserved in stack structure? Because the interrupt routine might be interrupted again.

3) Preserve CPU execution scene CPU execution scene: The status of all registers and flags. When procedure is executed, it may use registers or flags. This might introduce logic error in calling program.

3) Preserve CPU execution scene Then, the CPU execution scene must be preserved in procedure. (Why not in calling program?) ;Example: PUSH AX PUSH BX PUSHF … ;AX, BX, and FLAGS modified here POPF POP BX POP AX RET