Internal Programming Architecture or Model

Slides:



Advertisements
Similar presentations
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.
Advertisements

Registers of the 8086/ /2002 JNM.
There are two types of addressing schemes:
MICROPROCESSORS TWO TYPES OF MODELS ARE USED :  PROGRAMMER’S MODEL :- THIS MODEL SHOWS FEATURES, SUCH AS INTERNAL REGISTERS, ADDRESS,DATA & CONTROL BUSES.
Introduction to 8086 Microprocessor
Introduction to Microprocessor
The Microprocessor and its Architecture
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#3) By Dr. Syed Noman.
Azir ALIU 1 What is an assembly language?. Azir ALIU 2 Inside the CPU.
1 Hardware and Software Architecture Chapter 2 n The Intel Processor Architecture n History of PC Memory Usage (Real Mode)
3-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL Intel 8088 (8086) Microprocessor.
80x86 Processor Architecture
Gursharan Singh Tatla Block Diagram of Intel 8086 Gursharan Singh Tatla 19-Apr-17.
Unit-1 PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE Advance Processor.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
The 8086 Microprocessor The 8086, announced in 1978, was the first 16-bit microprocessor introduced by Intel Corporation 8086 is 16-bit MPU. Externally.
An Introduction to 8086 Microprocessor.
Microprocessors Sunday, Mar. 23 Dr. Asmaa Farouk Faculty of Engineering, Electrical Department, Assiut University.
1 Fundamental of Computer Suthida Chaichomchuen : SCC
MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR1 Addressing Mode.
Types of Registers (8086 Microprocessor Based)
ECE291 Computer Engineering II Lecture 3 Josh Potts University of Illinois at Urbana- Champaign.
UHD:CS2401: A. Berrached1 The Intel x86 Hardware Organization.
ECE291 Computer Engineering II Lecture 3 Josh Potts University of Illinois at Urbana- Champaign.
ECE291 Computer Engineering II Lecture 3 Dr. Zbigniew Kalbarczyk University of Illinois at Urbana- Champaign.
Microprocessors used in Personal Computers. The Memory Map of a Personal Computers Transient Program Area (TPA): Holds the operating system (interrupt.
1 Microprocessors CSE – 341 EEE – 365 \\server2\tsr\Spring\CSE\CSE341
Introduction to Microprocessors Chapter 3. Programming Model (8086)  Shows the various internal registers that are accessible to the programmer.
Chapter 2 The Microprocessor Architecture Microprocessors prepared by Dr. Mohamed A. Shohla.
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
Microprocessors CSE- 341 Dr. Jia Uddin Assistant Professor, CSE, BRAC University Dr. Jia Uddin, CSE, BRAC University.
Intel MP Organization. Registers - storage locations found inside the processor for temporary storage of data 1- Data Registers (16-bit) AX, BX, CX, DX.
The Microprocessor & Its Architecture A Course in Microprocessor Electrical Engineering Department Universitas 17 Agustus 1945 Jakarta.
SOFTWARE ARCHITECTURE OF THE 8088 AND 8086 MICROPROCESSORS
I NTEL 8086 M icroprocessor بسم الله الرحمن الرحيم 1.
PS02CINS02 Unit 1 Advanced Microprocessors. Comparison between 8085 and Size8-bit16-bit Address Bus and Memory16-bit/64kB20-bit/1MB Instruction.
ΜComputer Structure μProcessor Memory Bus System I/O Ports.
Chapter 12 Processor Structure and Function. Central Processing Unit CPU architecture, Register organization, Instruction formats and addressing modes(Intel.
Format of Assembly language
Difference between Microprocessor and Microcontroller
UNIT Architecture M.Brindha AP/EIE
Introduction to 8086 Microprocessor
8086 Microprocessor.
ADDRESSING MODES.
Chapter 2 The Microprocessor and its Architecture
Intel 8086 MICROPROCESSOR Architecture.
Basic Microprocessor Architecture
ADDRESSING MODES.
Intel 8088 (8086) Microprocessor Structure
Chapter 3 Addressing Modes
Basic of Computer Organization
Microcomputer & Interfacing Lecture 1
Symbolic Instruction and Addressing
Chapter 2: The Microprocessor and its Architecture
Introduction to Assembly Language
Data Addressing Modes • MOV AX,BX; This instruction transfers the word contents of the source-register(BX) into the destination register(AX). • The source.
Intel 8088 (8086) Microprocessor Structure
8086 Registers Module M14.2 Sections 9.2, 10.1.
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Symbolic Instruction and Addressing
CS 301 Fall 2002 Computer Organization
The Microprocessor & Its Architecture
Symbolic Instruction and Addressing
Lecture 06 Programming language.
Computer Architecture CST 250
Unit-I 80386DX Architecture
Chapter 6 –Symbolic Instruction and Addressing
Intel 8086.
Presentation transcript:

Internal Programming Architecture or Model Before a program is written, the internal architecture of microprocessor must be known. The programming model is considered to be program visible or program invisible (Internal Architecture). In program visible, the registers are used during application programming and are specified by the instructions. But in program invisible, the registers are not addressable directly during applications programming but may be used indirectly during system programming (control and operate protected memory system and other features). Programming Model: (Next Slide)

AX: It’s a 16-bit register or either used as 8-bit registers (AH or AL). The accumulator is used for instructions such as addition, subtraction, multiplication and division. BX: It some time holds the offset address of a location in memory system. CX: It hold the count for various instructions. DX: It holds the part of the result from a multiplication or part of dividend before division. BP: it points to a memory location for data transfer.

SI: It often addresses source string data for the string instructions. DI: It often addresses string destination data for the string instructions. IP: It addresses the next instruction in a section of a memory defined as a code segment. It can be modified with a jump or a call instruction. SP: It addresses an area of memory called stack. The stack memory stores data through this pointer. Flag Register: It indicates the condition of the microprocessor and control its operation. (6-Conditional and 3-Control flags)

C (carry): Carry holds the carry after addition or the borrow after subtraction. P (parity): Parity is a logic 0 for odd parity and a logic 1 for even parity. Parity is the count of ones in a number expressed as even or odd. A(auxiliary carry): The AC holds the carry (half-carry) after addition or subtraction between bit positions 3 and 4 of the result. Z (zero): It shows the result of an arithmetic or logic operation is zero. If Z=1, the result is zero; if Z=0, the result is not zero. S (sign): It holds the arithmetic sign of the result after as arithmetic or logic instruction executes. T (trap): It enables trapping through an on-chip debugging feature. I (interrupt): It controls the operation of INTR (interrupt request) input pin.

D (direction): It selects either the increment or decrement mode for the DI or SI registers during string instructions. O (overflow): It occurs when signed numbers are added or subtracted. An overflow indicates that the result has exceeded the capacity of a machine. For unsigned operations, the overflow flag is ignored. It generates memory address when combined with other registers in a microprocessor. There are either four or six segments registers in various versions of microprocessor.

CS: The code segment is a section of memory that holds the code (program and procedures) used by the microprocessor. It defines the starting address of the section of memory holding code. In real mode it defines the start of 64k-byte memory. DS: The data segment is a section of memory that holds the most data used by program. ES: The extra segment is an additional data segment that is used by some of string instructions to hold destination data. SS: The stack segment defines the area of memory used for the stack. The stack entry point is determined by the stack segment and stack pointer register. The BP register also address data with in the stack segment. ( In Assembly Language, Program is divided into 3 or 4 segments called program segments)

Real Mode Memory Addressing Only the 8086 and 8088 operate in the real mode. Real Mode operation allows the microprocessor to address only the first 1M byte of memory space. Note that the first 1M byte of memory is called the real memory, conventional memory, or DOS memory system. The DOS operating system requires that the microprocessor operates in real mode. Windows does not use the real mode. (Story of 8085, 16pins, only 64K-bytes addressable). Segments and Offsets: A combination of a segment address and an offset address accesses a memory location in the real mode. The Segment address, located within one of the segment registers, define the beginning of any 64K-byte memory segment. The Offset address selects any location within the 64K-byte memory segment.

Logical address and physical address: The physical address is the 20-bit address that is actually put on the address pins of the 8086 microprocessor and decoded by the memory interfacing circuitry. This address can have a range of 00000H to FFFFFH. This is the actual physical location of RAM and ROM. The offset address is a location with in a 64K-byte. Therefore its range from 0000H to FFFFH. The logical address consists of segment value and offset address. [Segment Address : Offset Address].

Figure shows how the segment plus offset address, selects a memory location. Offset is also called displacement. How to make a physical address. i)Start with segment address. ii)Shift left segment address. iii)Add offset address. iv) Physical address. For exp: Segment Address = 1200H its physical address is 12000H (if Offset Address = 0000H). Ending Address is found by adding FFFFH. For exp: Segment Address : 3000H, first address is 30000H, last address is 30000H+FFFFH or 3FFFFH.

Default Segment and Offset Register: For exp: if CS:1400H and IP: 1200H, it fetches instruction from code segment location 14000H+1200H or 15200H. IF SS: 2000H and BP: 3000H, the microprocessor addresses memory location 23000H for the stack segment memory location.

A memory segment can touch or even overlap if 64K-byte of memory is not required.

Suppose an application requires 1000H bytes of memory for its code, 190H bytes of memory for its data and 200H bytes of memory for its stack. This application does not require an extra segment. When this program is placed in the memory system by the DOS, it is loaded in the TPA at the first available area of memory above the drivers and other TPA programs. This area is indicated by a free-pointer located within DOS. Program loading is handled automatically by the program loader located with in DOS. Figure Shows how this application is stored in memory system.

*In the real mode, show how the starting and ending address of each segment located by the following segment register values: 1000H b) 1234H c) 2300H d) E000H e) AB00H *Find the memory address of the next instruction executed by the microprocessor, when operated in real mode, for the following CS:IP; a) CS: 1000H and IP: 2000H b) CS: 2000H and IP: 1000H c) CS: 2300H and IP: 1A00H d) CS: 1A00H and IP: B000H e) CS: 3456H and IP: ABCDH *Determine the memory location addressed by the following real mode 80286 register combinations; a) DS: 1000H and DI: 2000H b) DS: 2000H and SI: 1002H c) SS: 2300H and BP: 3200H a) DS: A000H and BX: 1000H e) DS: 2900H and SP: 3A00H

Data-Addressing Modes The MOV instruction is very common and flexible instruction, it provides a basis for the explanation of the data-addressing modes. MOV is an opcode (operation code, tells the microprocessor which operation to perform). The MOV AX, BX instruction transfers the contents of source register (BX) into the destination register (AX). The source never changes, but the destination always changes. MOV copies the source data into the destination. The source and destination are often called operands. The data addressing modes are follows: a) Register b) Immediate c) Direct d) Register indirect e) Base-plus-index f) Register Relative g) Base relative-plus-index

Register Addressing: Register addressing transfers a copy of byte or a word from a source register or contents of a memory location to the destination register or a memory location. Ex: MOV CX, DX Immediate Addressing: Immediate addressing transfers the source, an immediate byte, word of data, into the destination register or memory location. Ex: MOV AL,22H Direct Addressing: Direct addressing moves a byte or word between a memory location and a register. The instruction set does not support memory-to-memory transfer, except with the MOVS instruction. Ex: MOV [1234H],AX MOV CX, LIST (here list is a memory location).

Register Indirect Addressing: Register indirect addressing transfer a byte or word between a register and a memory location addressed by an index or base register. The index and base registers are BP, BX, DI and SI. Ex: MOV [BX], CL MOV AX, [BX] Base-plus-index Addressing: byte or word between a register and a memory location addressed by a base register (BX or BP) plus an index register (SI or DI). Ex: MOV [BX+DI], CL Register Relative Addressing: Register relative addressing moves a byte or word between a register and the memory location addressed by an index or base register plus a displacement (also called effective address). Ex: MOV AX, [BX+4]

.MODEL TINY .CODE .STARTUP MOV AX,0 MOV BX,0 MOV CX,0 MOV SI,AX MOV DI,AX MOV BP,AX .EXIT END Assembly language program consists of four parts or fields

.MODEL SMALL .DATA DATA1 DB 10H DATA2 DB 0 DATA3 DW 0 DATA4 DW 0AAAAH .CODE .STARTUP MOV AL,DATA1 MOV AH,DATA2 MOV DATA3,AX MOV BX,DATA4 .EXIT END

STACK Stack is a section of read/write memory (RAM) used by the CPU to store Information temporarily. Every register inside 8086 (except segment registers and SP) can be stored and brought back into the CPU from the stack memory. The storing of a CPU register in the stack is called a push. And the loading contents of the stack is called a pop. SP is decremented during push and incremented during popped off the stack into the CPU. 16-bit Register is pushed and popped.