iapx Systems Electronic Computers M
|
|
- Philip Allison
- 6 years ago
- Views:
Transcription
1 iapx Systems Electronic Computers M 1
2 iapx History We analyze 32 bit systems: generalization to 64 bits is straigtforward Segment Registers (16 bits) Code Segment Stack Segment Data Segment Extra Ssegment FS Data segments GS In iapx systems all (physical) addresses are relative that is they are indicated as offset from a base (a segment register). A consistent piece of software (i.e. a subroutine, an operating system service etc.) is called a segment and contains only relative addresses referred to a common base This means that relocation in a non paged system is very easy (only the base must be changed) This wouldn t be so important in a paged system but it is the base for the protection (see later) because it acts on segments 2
3 iapx Registers (32 bits) 31 0 IP 31 FLAGS 0 EF Accumulators AH 8 7 AX AL 0 EAX BH BX CH CX DH DX SI DI BP SP BL CL DL EBX ECX EDX ESI EDI EBP ESP In the new 64 bit systems more registers (R8, R9 R16) are present Floating Point registers (8 x 80 bit stack). 3
4 Segments The segmentation is a memory management scheme which reflects the programmer s point of view A program is a segments collection: main program, procedures, functions, objects, local and global variables, stack etc. that is modules with consistent information to be stored in memory in general in non consecutive addresses (at module level) The segmentation allows the relocation and the sharing of data Fragmentation is a possible drawback (external, not that of paging) for instance if paging not implemented or disabled Automatic segment association. Instructions=>CS, Stack=>SS, Data=>DS. Other associations are possible making it explicit in the instruction. BP automatically associated with SS (if no other indication in the instruction mov ax, 40 ; copy word at address of DS mod to ax mov ax, ES:40 ; copy word at address of ES mod to ax push ax ; push ax into the slot indicated by SP+SS mod16 mov al, 40 ; copy byte at address of DS mod to al Mod16 see later It must be noted that although the same instruction code at the assembly language is used (mov) compilers and assemblers translate this code into different machine laguage codes according to the destination register (ax, ah, al, eax etc.) 5
5 Segments FFFFFFFFF Data Segment(s) DS (ES, FS,GS) X+2 X X-2 Pop Stack Segment Push SP (offset) BP (offset) Word (16 bit) oriented stack SS Stack Segment base address The stack grows normally downwards The BP is mainly used to address the stack segment as a memory data segment Code Segment IP (offset) CS
6 FLAGS (partial list) TF DF IF OF SF ZF 4 Trap Direction 2 0 Sign Overflow Int. en. Zero AF PF CF Parity Aux. carry Carry 7
7 Address construction SEGMENT (0) CS/DS/ES/FS/GS/SS (Mod16) BASE BP/BX (16 bit) INDEX SI/DI (16 bit) (sum module 64K -16 bit)) OFFSET (16 bit) S + [(B + I + O)] 20 bit) 10
8 Address construction OPCODE MOD DISPL DIRECT EFFECT. ADDR. OPCODE MOD DISPL BASED BX/BP EFFECT. ADDR. OPCODE MOD DISPL INDEXED SI/DI EFFECT. ADDR. 11
9 Address construction OPCODE MOD DISPL BASED INDEXED SI/DI BX/BP EFFECT. ADDR. OPCODE MOD INDIRECT BX/BP/SI/DI EFFECT. ADDR. 13
10 iapx Segmentation (32+ bit Systems) Protection and segment access control to check the access rights and the address correctness Multiple environments : each one must be separated and protected from the others (multiple concurrent usersprocesses) Operating systems support 8086 Address Memory iapx86 Address Control Memory 15
11 Rivisited segmentation If a system access control must implemented a control mechanism is required This is achieved by means of a segment table which for each segment indicates the initial address, the size, its characteristics (valid/invalid, read/write, user/supervisor etc.) pointed by a segment table register. A further register storing the register table size is used for protection (Segment Table Length Register): a segment number k is valid if and only if k<stlr. Each entry is a segment descriptor 16
12 Segment descriptors Each segment is an «object» which is described by a segment descriptor which defines: The initial address in the address space The segment length The access rights (read, write, execute etc.) The privilege level (security level) which a program must exibit to access the segment (see later) Whether it is a data or code segment or other types of segments The presence in the main memory (significant when the system is not paged) Whether an access to the segment was made (not whether it was written dirty segment) 17
13 Segment descriptor Base 31:24 Base 15:00 G D B 0 A V Limit P P L S Type Limit 15:00 Base 23:16 64 bit 8 bytes Example. Data segment descriptor AV: available for the software BASE: base starting address (32 bit) DB: segment parallelism (16/32 bit operands) PL privilege level (see later) G: granularity (segment size limit - multiple of 1 or 4096 bytes) of the segment 1Byte=>1MB or 4KB=>4GB LIMIT: segment limit ( 20 bit see G bit) P: segment present in memory S: descriptor type (system/user) TYPE: segment type (data/code R/W - Expand down-up) The descriptor fields have different meanings according to the type and other parameters Please notice that no fields are available to determine the «age» of the segment for replacement policies (only the accessed bit can be used) : this is due to the fact that normally the systems are paged More modern descriptors for higher parallelism are slightly different 18
14 Descriptors Base 31:24 G D B 0 A Limit V P P L S Type Base 23:16 Base 15:00 Limit 15:00 P P L S Type Access Right Byte P > Present in memory (code/data) or valid/invalid (for OS segments and gates) PL > Protection level S > = 1 code(data (user) ; = 0 system or gates segments Type > 16 different types (really 32 because the meaning depends on S too) 19
15 Data descriptors (System ->only by OS usable level 0 see later) S = 1 non system P P L 1 Type Access Right Byte C/D E W A C/D E W A Data/code (0 data). Expand down or upward (stack) Write read only or R/W Accessed 20
16 Code descriptors S = 1 non system P P L 1 Type Access Right Byte C/D C R A C/D Code/Data (1 Code) C 0/1 Conforming descriptor (see later)) R 0/1 read only or R/W A Accessed 21
17 Data (C/D=0) Segments Non System C/D E(xp.) W A(ccessed) Descrizione Not yet accessed segment, read only, upward expansion The same but accessed Not yet accessed segment, read/write, upward expansion (normal data segment) The same but accessed Not yet accessed segment, read only, downward expansion (call gate see later) The same but accessed Not yet accessed segment, read/write, downward expansion (normale stack segment) The same but accessed 22
18 Descriptors tables In the iapx86 systems each segment is found through its descriptor whch can be located in two different tables: GDT (Global Descriptor Table) or LDT (Local Descriptor Table). Typical descriptors of the LDTs are data, segments, code. There are also task descriptors (see later) The CS, SS, DS etc. do not store addresses but selectors (16 bits) which lead to the segment descriptors storing all information of the segment 23
19 Addressing An address of iapx86 systems is a string of 48 bits (16 bit for the selector contained in thge segment register and 32 bit for the offset) Segment register Limit address Segment 47 SELECTOR OFFSET 0 data Access Rights Limit Initial address GDT or LDT segment descriptor Segment initial address The computed address is the linear or virtual address 24
20 GDT GDT N Index SELECTOR N-1 N-2 CPU Registers LIMIT BASE GDTR Global Descriptor Table Register The base address value and the limit of the GDT must be stored by the OS during the initial configuration phase through privileged instructions (see later) Since the index is stored in the first 13 bits of the selector (see later the other bits are for control) the GDT can store up to bytes descriptors (64 Kbytes). The same for each LDT (and IDT see later). GDT is used for system segments 25
21 LDT LDT N N-1 N-2 LDTR GDT N N-1 N There is a LDTR register storing a selector which points to the current LDT descriptor. The LDT is therefore a segment of the GDT. The register can be loded by a privileged instruction. LDT is used for user segments 26
22 Selectors Segment selector (Segment register content) 15 INDEX T I RPL INDEX: descriptor table index 13 bit -> 8192 selectors TI: Table Identifier (0 =>GDT 1 => LDT) RPL: Privilege level (see protection later) 27
23 LDT A Local Descriptor Table contains all descriptors of a task (process) defined in the system. In particular the LDTR stores the selector of the LDT of the process presently executed Local Descriptor Table contents: Task code, data and stack The call gates (see later) The task gates which allow to trigger the execution of other tasks Are the addresses of the GDTR and LDTR virtual or physical? And the addresses in the GDT and LDT? All virtual! There must be a GDT and LDT for each task! 28
24 Aliasing But since all data of the LDT or GDT are segments descriptors how can the OS modify the their contents since there are no specific access instructions? ALIAS Since a segment is a portion of the logical (and therefore physical) memory nothing prevents a double description of the same area with different access rights. N N-1 X K GDT Y X and Y are the same memory area which is however described by two different descriptors i.e. one (X) code and the other (Y) data. The compiler, for instance, when generates the code writes in the segment through descriptor Y (enable write) but when the segment must be executed the OS uses descriptor Y. Obviously the OS must be aware of this aliasing because when X (Y) is deleted from memory or saved in disk all aliased descriptors must be updatesd. For the entire GDT and LDT there is an alias. 29
25 An example mov ax, 00D0 mov ds, ax mov dl,[3] In iapx86 (i.e ) this means to insert value in DS (starting address 00D00) But in the protected environment (modern processors) 00D0 is a selector pointing the twentyseventh descriptor (do not forget 0!) of the GDT (11010 B =26 D ) with privilege level 00! If the segment base address in the descriptor is 0000F5D0 the byte at virtual address 0000F5D3 is read (the offset of the instruction is 3)! 30
26 Descriptors caching The descriptors of all segments pointed by the segment registers are stored in small caches of 8 bytes linked to the segment registers. These caches are loaded when a new selector is loaded into a segment register.. This prevents that for each memory access an access to the descriptor table is needed. 31
27 Full addressing in iapx86 Displacement selector SS selector GS selector FS selector ES selector DS selector CS Base Register Index Register X DESCRIPTOR REGISTERS Access Rights SS Access Rights GS Limit Access Rights FS Base Address Limit Access Rights ES Base Address Limit Access Rights DS Base Address Limit Access Rights CS Base Address Limit Base Address Limit Base Address + + Scale Offset LINEAR ADDRESS REGISTERS CACHE 32
28 iapx86 (32 bit) full addressing SELECTOR selector OFFSET Instruction Address Descriptor Linear address 0 DIR 20 bit address + 12 bit info TABLE 20 bit address + 12 bit info OFFSET OP. DIR ENTRY P.TBL.ENTRY Physical address 1024 slots CR3 Each task has its own page table loaded for each context change The OS services are started by software interrupts Physical address in CR3 (reloaded for each context switch) 35
29 Page table descriptors (I level) Page Directory Element (DIR field) Initial address 31: P P Avail 0 P 0 A C W U W P S D T Available for software [Page size (4K/4M)] [II level table used] Page cache disable Page write through Supervisor Writable Present Accessible only from Protection Level 0,1,2 The physical address of the first level table is pointed by the system register CR3 In the field the physical address of the II level table (aligned 4K!!) is stored PCD e PWT indicate whether the II level table items are cacheable and the used policy (WT or WB). The cacheability and the PWT of the I level table is stored in CR3. 37
30 Page table descriptors (II level) Page Table Entry (Table fields of the virtual address) Not used Page base address 31:12 Avail 0 0 D Available for software Dirty (written) Used Page cache disable Page write through User/Supervisor Writable Present in memory See later A P C D P W U W P T Indicate whether the page data are cacheable and their policy (WB or WT). For the protection (see later) first the segment descriptor is checked then the page protection. Very often for the page tables PWT=1: then no write-back problems occur 38
31 Sharing and protection Process 1 page table Process 2 page table Pointers Flags Bit di controllo Disk addresses Memory 39
32 I and II level page fault What in case of a page fault? The linear address is saved in CR2 (hardware see later) A software interrupt n. 14 is generated The triggered routine reads CR2 OS call to find a free or replaceable page Disk driver call The new initial address is stored in the II level table IRET which restarts the page-faulted instruction A page fault can occur also if the second level page table is missing 40
33 Caches and page tables A I or II level table stores data which must be available for the OS and therefore must be possibly cacheable. The use policy can be determined singularly for each level CR3 control register Physical Address Page directory base address Reserved 1/0 Data of the 1st level table can be cacheable. P C D P W T Reserv. If cacheable Write Back or Write Trhough The page (pointed by I or II level tables) policies are defined in the page descriptors (previously described) initial address of the 1st level page (1024 elements) (different for each process) is stored in the 20 Msbits (31-12). Different page tables for each process The physical 41
34 System registers 31 0 RESERVED CR0 CR BASE BASE 0 SELECTOR SELECTOR TR LDTR CR2 CR3 CR LIMIT LIMIT GDTR IDTR The system registers load and store are carried out by specific privileged instructions (ex. LTR Load Task Register LGDT Load Global Descriptor Table etc.). For privileges see later. Selectors have the associated shadow registers 42
35 CR P G C N D W R A M R W P R N E R T S E M 1 P E R Reserved PG Paging enable CD Cache disable CACHE control NW Not writethrough AM Alignment mask (align check) WP Write protect (supervisor is not allowed to write user pages) NE Numeric Error TS task switched (save e restore Floating Point) EM Escape Instruction Trapped PE Protection enabled NB: Paging enable is valid only if PE=1 43
36 Page Fault CR PAGE FAULT LINEAR ADDRESS 44
37 CR4 CR4 control register Reserved Machine check enable (i.e. unaligned data) [Page Size (4K/4M)] Debugging extensions Time stamp disable Protected Mode Virtual Interrupt Virtual 8086 Mode Extensions If paging is disabled virtual and physical addresses coincide iapx86 systems can be segmented only, paged only (defining only one big segment see Linux) and segmented and paged In the new systems bit 7 indicates whether page tables can be shared among many processes. Bit 5 allows 36 bit addressing M C E 0 P S E D E T S D P V I V M E 45
IA32 Intel 32-bit Architecture
1 2 IA32 Intel 32-bit Architecture Intel 32-bit Architecture (IA32) 32-bit machine CISC: 32-bit internal and external data bus 32-bit external address bus 8086 general registers extended to 32 bit width
More informationMICROPROCESSOR MICROPROCESSOR ARCHITECTURE. Prof. P. C. Patil UOP S.E.COMP (SEM-II)
MICROPROCESSOR UOP S.E.COMP (SEM-II) 80386 MICROPROCESSOR ARCHITECTURE Prof. P. C. Patil Department of Computer Engg Sandip Institute of Engineering & Management Nashik pc.patil@siem.org.in 1 Introduction
More informationEXPERIMENT WRITE UP. LEARNING OBJECTIVES: 1. Get hands on experience with Assembly Language Programming 2. Write and debug programs in TASM/MASM
EXPERIMENT WRITE UP AIM: Assembly language program for 16 bit BCD addition LEARNING OBJECTIVES: 1. Get hands on experience with Assembly Language Programming 2. Write and debug programs in TASM/MASM TOOLS/SOFTWARE
More informationMICROPROCESSOR MICROPROCESSOR ARCHITECTURE. Prof. P. C. Patil UOP S.E.COMP (SEM-II)
MICROPROCESSOR UOP S.E.COMP (SEM-II) 80386 MICROPROCESSOR ARCHITECTURE Prof. P. C. Patil Department of Computer Engg Sandip Institute of Engineering & Management Nashik pc.patil@siem.org.in 1 Introduction
More informationiapx86 Protection Electronic Computers M
iapx86 Protection Electronic Computers M 1 Protection Multitasking (multiple processes) > the system must prevent an uncontrolled access of a process to the memory space of another process....and that
More informationIntroduction to IA-32. Jo, Heeseung
Introduction to IA-32 Jo, Heeseung IA-32 Processors Evolutionary design Starting in 1978 with 8086 Added more features as time goes on Still support old features, although obsolete Totally dominate computer
More informationComplex Instruction Set Computer (CISC)
Introduction ti to IA-32 IA-32 Processors Evolutionary design Starting in 1978 with 886 Added more features as time goes on Still support old features, although obsolete Totally dominate computer market
More informationINTRODUCTION TO IA-32. Jo, Heeseung
INTRODUCTION TO IA-32 Jo, Heeseung IA-32 PROCESSORS Evolutionary design Starting in 1978 with 8086 Added more features as time goes on Still support old features, although obsolete Totally dominate computer
More informationLecture 15 Intel Manual, Vol. 1, Chapter 3. Fri, Mar 6, Hampden-Sydney College. The x86 Architecture. Robb T. Koether. Overview of the x86
Lecture 15 Intel Manual, Vol. 1, Chapter 3 Hampden-Sydney College Fri, Mar 6, 2009 Outline 1 2 Overview See the reference IA-32 Intel Software Developer s Manual Volume 1: Basic, Chapter 3. Instructions
More informationCode segment Stack segment
Registers Most of the registers contain data/instruction offsets within 64 KB memory segment. There are four different 64 KB segments for instructions, stack, data and extra data. To specify where in 1
More informationAssembler Programming. Lecture 2
Assembler Programming Lecture 2 Lecture 2 8086 family architecture. From 8086 to Pentium4. Registers, flags, memory organization. Logical, physical, effective address. Addressing modes. Processor Processor
More informationUnit 08 Advanced Microprocessor
Unit 08 Advanced Microprocessor 1. Features of 80386 The 80386 microprocessor is an enhanced version of the 80286 microprocessor Memory-management unit is enhanced to provide memory paging. The 80386 also
More informationThe x86 Architecture
The x86 Architecture Lecture 24 Intel Manual, Vol. 1, Chapter 3 Robb T. Koether Hampden-Sydney College Fri, Mar 20, 2015 Robb T. Koether (Hampden-Sydney College) The x86 Architecture Fri, Mar 20, 2015
More information6/17/2011. Introduction. Chapter Objectives Upon completion of this chapter, you will be able to:
Chapter 2: The Microprocessor and its Architecture Chapter 2: The Microprocessor and its Architecture Chapter 2: The Microprocessor and its Architecture Introduction This chapter presents the microprocessor
More informationChapter 2: The Microprocessor and its Architecture
Chapter 2: The Microprocessor and its Architecture Chapter 2: The Microprocessor and its Architecture Chapter 2: The Microprocessor and its Architecture Introduction This chapter presents the microprocessor
More informationAddressing Modes on the x86
Addressing Modes on the x86 register addressing mode mov ax, ax, mov ax, bx mov ax, cx mov ax, dx constant addressing mode mov ax, 25 mov bx, 195 mov cx, 2056 mov dx, 1000 accessing data in memory There
More informationThe Microprocessor and its Architecture
The Microprocessor and its Architecture Contents Internal architecture of the Microprocessor: The programmer s model, i.e. The registers model The processor model (organization) Real mode memory addressing
More informationBasic Execution Environment
Basic Execution Environment 3 CHAPTER 3 BASIC EXECUTION ENVIRONMENT This chapter describes the basic execution environment of an Intel Architecture processor as seen by assembly-language programmers.
More informationHardware and Software Architecture. Chapter 2
Hardware and Software Architecture Chapter 2 1 Basic Components The x86 processor communicates with main memory and I/O devices via buses Data bus for transferring data Address bus for the address of a
More informationTutorial 10 Protection Cont.
Tutorial 0 Protection Cont. 2 Privilege Levels Lower number => higher privilege Code can access data of equal/lower privilege levels only Code can call more privileged data via call gates Each level has
More informationModule 3 Instruction Set Architecture (ISA)
Module 3 Instruction Set Architecture (ISA) I S A L E V E L E L E M E N T S O F I N S T R U C T I O N S I N S T R U C T I O N S T Y P E S N U M B E R O F A D D R E S S E S R E G I S T E R S T Y P E S O
More informationMICROPROCESSOR ALL IN ONE. Prof. P. C. Patil UOP S.E.COMP (SEM-II)
MICROPROCESSOR UOP S.E.COMP (SEM-II) 80386 ALL IN ONE Prof. P. C. Patil Department of Computer Engg Sandip Institute of Engineering & Management Nashik pc.patil@siem.org.in 1 Architecture of 80386 2 ARCHITECTURE
More informationLow Level Programming Lecture 2. International Faculty of Engineerig, Technical University of Łódź
Low Level Programming Lecture 2 Intel processors' architecture reminder Fig. 1. IA32 Registers IA general purpose registers EAX- accumulator, usually used to store results of integer arithmetical or binary
More informationSPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY
BACKGROUND 8086 CPU has 8 general purpose registers listed below: AX - the accumulator register (divided into AH / AL): 1. Generates shortest machine code 2. Arithmetic, logic and data transfer 3. One
More informationScott M. Lewandowski CS295-2: Advanced Topics in Debugging September 21, 1998
Scott M. Lewandowski CS295-2: Advanced Topics in Debugging September 21, 1998 Assembler Syntax Everything looks like this: label: instruction dest,src instruction label Comments: comment $ This is a comment
More informationIA32/Linux Virtual Memory Architecture
IA32/Linux Virtual Memory Architecture Basic Execution Environment Application Programming Registers General-purpose registers 31 0 EAX AH AL EBX BH BL ECX CH CL EDX DH DL EBP ESI EDI BP SI DI Segment
More information2.5 Address Space. The IBM 6x86 CPU can directly address 64 KBytes of I/O space and 4 GBytes of physical memory (Figure 2-24).
Address Space 2.5 Address Space The IBM 6x86 CPU can directly address 64 KBytes of I/O space and 4 GBytes of physical memory (Figure 2-24). Memory Address Space. Access can be made to memory addresses
More informationPROTECTION CHAPTER 4 PROTECTION
Protection 4 CHAPTER 4 PROTECTION In protected mode, the Intel Architecture provides a protection mechanism that operates at both the segment level and the page level. This protection mechanism provides
More informationWe can study computer architectures by starting with the basic building blocks. Adders, decoders, multiplexors, flip-flops, registers,...
COMPUTER ARCHITECTURE II: MICROPROCESSOR PROGRAMMING We can study computer architectures by starting with the basic building blocks Transistors and logic gates To build more complex circuits Adders, decoders,
More informationMODE (mod) FIELD CODES. mod MEMORY MODE: 8-BIT DISPLACEMENT MEMORY MODE: 16- OR 32- BIT DISPLACEMENT REGISTER MODE
EXERCISE 9. Determine the mod bits from Figure 7-24 and write them in Table 7-7. MODE (mod) FIELD CODES mod 00 01 10 DESCRIPTION MEMORY MODE: NO DISPLACEMENT FOLLOWS MEMORY MODE: 8-BIT DISPLACEMENT MEMORY
More informationDr. Ramesh K. Karne Department of Computer and Information Sciences, Towson University, Towson, MD /12/2014 Slide 1
Dr. Ramesh K. Karne Department of Computer and Information Sciences, Towson University, Towson, MD 21252 rkarne@towson.edu 11/12/2014 Slide 1 Intel x86 Aseembly Language Assembly Language Assembly Language
More informationUMBC. A register, an immediate or a memory address holding the values on. Stores a symbolic name for the memory location that it represents.
Intel Assembly Format of an assembly instruction: LABEL OPCODE OPERANDS COMMENT DATA1 db 00001000b ;Define DATA1 as decimal 8 START: mov eax, ebx ;Copy ebx to eax LABEL: Stores a symbolic name for the
More informationThe Instruction Set. Chapter 5
The Instruction Set Architecture Level(ISA) Chapter 5 1 ISA Level The ISA level l is the interface between the compilers and the hardware. (ISA level code is what a compiler outputs) 2 Memory Models An
More informationx86 Assembly Tutorial COS 318: Fall 2017
x86 Assembly Tutorial COS 318: Fall 2017 Project 1 Schedule Design Review: Monday 9/25 Sign up for 10-min slot from 3:00pm to 7:00pm Complete set up and answer posted questions (Official) Precept: Monday
More informationMachine-level Representation of Programs. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
Machine-level Representation of Programs Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Program? 짬뽕라면 준비시간 :10 분, 조리시간 :10 분 재료라면 1개, 스프 1봉지, 오징어
More informationComputer Processors. Part 2. Components of a Processor. Execution Unit The ALU. Execution Unit. The Brains of the Box. Processors. Execution Unit (EU)
Part 2 Computer Processors Processors The Brains of the Box Computer Processors Components of a Processor The Central Processing Unit (CPU) is the most complex part of a computer In fact, it is the computer
More informationDarshan Institute of Engineering & Technology
1. Explain 80286 architecture. OR List the four major processing units in an 80286 microprocessor and briefly describe the function of each. Ans - The 80286 was designed for multi-user systems with multitasking
More informationMicrokernel Construction
Kernel Entry / Exit SS2013 Control Transfer Microkernel User Stack A Address Space Kernel Stack A User Stack User Stack B Address Space Kernel Stack B User Stack 1. Kernel Entry (A) 2. Thread Switch (A
More informationCHAPTER 3 BASIC EXECUTION ENVIRONMENT
CHAPTER 3 BASIC EXECUTION ENVIRONMENT This chapter describes the basic execution environment of an Intel 64 or I A-32 processor as seen by assemblylanguage programmers. It describes how the processor executes
More informationIntel 8086 MICROPROCESSOR. By Y V S Murthy
Intel 8086 MICROPROCESSOR By Y V S Murthy 1 Features It is a 16-bit μp. 8086 has a 20 bit address bus can access up to 2 20 memory locations (1 MB). It can support up to 64K I/O ports. It provides 14,
More informationLecture (02) The Microprocessor and Its Architecture By: Dr. Ahmed ElShafee
Lecture (02) The Microprocessor and Its Architecture By: Dr. Ahmed ElShafee ١ INTERNAL MICROPROCESSOR ARCHITECTURE Before a program is written or instruction investigated, internal configuration of the
More informationMicrokernel Construction
Microkernel Construction Kernel Entry / Exit Nils Asmussen 05/04/2017 1 / 45 Outline x86 Details Protection Facilities Interrupts and Exceptions Instructions for Entry/Exit Entering NOVA Leaving NOVA 2
More informationIntel 8086 MICROPROCESSOR ARCHITECTURE
Intel 8086 MICROPROCESSOR ARCHITECTURE 1 Features It is a 16-bit μp. 8086 has a 20 bit address bus can access up to 2 20 memory locations (1 MB). It can support up to 64K I/O ports. It provides 14, 16
More informationMOV Move INSTRUCTION SET REFERENCE, A-M. Description. Opcode Instruction 64-Bit Mode. Compat/ Leg Mode
Opcode Instruction 64-Bit Mode Compat/ Leg Mode 88 /r MOV r/m8,r8 Valid Valid Move r8 to r/m8. REX + 88 /r MOV r/m8 ***, r8 *** Valid N.E. Move r8 to r/m8. 89 /r MOV r/m16,r16 Valid Valid Move r16 to r/m16.
More informationThe Pentium Processor
The Pentium Processor Chapter 7 S. Dandamudi Outline Pentium family history Pentium processor details Pentium registers Data Pointer and index Control Segment Real mode memory architecture Protected mode
More informationLecture 5:8086 Outline: 1. introduction 2. execution unit 3. bus interface unit
Lecture 5:8086 Outline: 1. introduction 2. execution unit 3. bus interface unit 1 1. introduction The internal function of 8086 processor are partitioned logically into processing units,bus Interface Unit(BIU)
More informationSYSC3601 Microprocessor Systems. Unit 2: The Intel 8086 Architecture and Programming Model
SYSC3601 Microprocessor Systems Unit 2: The Intel 8086 Architecture and Programming Model Topics/Reading SYSC3601 2 Microprocessor Systems 1. Registers and internal architecture (Ch 2) 2. Address generation
More information3.6. PAGING (VIRTUAL MEMORY) OVERVIEW
an eight-byte boundary to yield the best processor performance. The limit value for the GDT is expressed in bytes. As with segments, the limit value is added to the base address to get the address of the
More informationEC-333 Microprocessor and Interfacing Techniques
EC-333 Microprocessor and Interfacing Techniques Lecture 3 The Microprocessor and its Architecture Dr Hashim Ali Fall - 2018 Department of Computer Science and Engineering HITEC University Taxila Slides
More informationComputer Organization (II) IA-32 Processor Architecture. Pu-Jen Cheng
Computer Organization & Assembly Languages Computer Organization (II) IA-32 Processor Architecture Pu-Jen Cheng Materials Some materials used in this course are adapted from The slides prepared by Kip
More informationChapter 11. Addressing Modes
Chapter 11 Addressing Modes 1 2 Chapter 11 11 1 Register addressing mode is the most efficient addressing mode because the operands are in the processor itself (there is no need to access memory). Chapter
More informationAMD-K5. Software Development Guide PROCESSOR
AMD-K5 TM PROCESSOR Software Development Guide Publication # 20007 Rev: D Amendment/0 Issue Date: September 1996 This document contains information on a product under development at Advanced Micro Devices
More informationCome and join us at WebLyceum
Come and join us at WebLyceum For Past Papers, Quiz, Assignments, GDBs, Video Lectures etc Go to http://www.weblyceum.com and click Register In Case of any Problem Contact Administrators Rana Muhammad
More informationUMBC. contain new IP while 4th and 5th bytes contain CS. CALL BX and CALL [BX] versions also exist. contain displacement added to IP.
Procedures: CALL: Pushes the address of the instruction following the CALL instruction onto the stack. RET: Pops the address. SUM PROC NEAR USES BX CX DX ADD AX, BX ADD AX, CX MOV AX, DX RET SUM ENDP NEAR
More informationIntroduction to The x86 Microprocessor
Introduction to The x86 Microprocessor Prof. V. Kamakoti Digital Circuits And VLSI Laboratory Indian Institute of Technology, Madras Chennai - 600 036. http://vlsi.cs.iitm.ernet.in Protected Mode Memory
More informationVARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad
Introduction to MS-DOS Debugger DEBUG In this laboratory, we will use DEBUG program and learn how to: 1. Examine and modify the contents of the 8086 s internal registers, and dedicated parts of the memory
More informationicroprocessor istory of Microprocessor ntel 8086:
Microprocessor A microprocessor is an electronic device which computes on the given input similar to CPU of a computer. It is made by fabricating millions (or billions) of transistors on a single chip.
More informationSRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013)
SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013) UNIT I THE 8086 MICROPROCESSOR PART A (2 MARKS) 1. What are the functional
More informationAssembly Language Each statement in an assembly language program consists of four parts or fields.
Chapter 3: Addressing Modes Assembly Language Each statement in an assembly language program consists of four parts or fields. The leftmost field is called the label. - used to identify the name of a memory
More informationMICROPROCESSOR PROGRAMMING AND SYSTEM DESIGN
MICROPROCESSOR PROGRAMMING AND SYSTEM DESIGN ROAD MAP SDK-86 Intel 8086 Features 8086 Block Diagram 8086 Architecture Bus Interface Unit Execution Unit 8086 Architecture 8086 Programmer s Model Flag Register
More information8086 INTERNAL ARCHITECTURE
8086 INTERNAL ARCHITECTURE Segment 2 Intel 8086 Microprocessor The 8086 CPU is divided into two independent functional parts: a) The Bus interface unit (BIU) b) Execution Unit (EU) Dividing the work between
More informationMechanisms for entering the system
Mechanisms for entering the system Yolanda Becerra Fontal Juan José Costa Prats Facultat d'informàtica de Barcelona (FIB) Universitat Politècnica de Catalunya (UPC) BarcelonaTech 2017-2018 QP Content Introduction
More informationUNIT 2 PROCESSORS ORGANIZATION CONT.
UNIT 2 PROCESSORS ORGANIZATION CONT. Types of Operand Addresses Numbers Integer/floating point Characters ASCII etc. Logical Data Bits or flags x86 Data Types Operands in 8 bit -Byte 16 bit- word 32 bit-
More informationInformation Security II Prof. Kamakoti Department of Computer Science and Engineering Indian Institute of Technology, Madras
Information Security II Prof. Kamakoti Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 30 Task Switch recap - Week 6 (Refer Slide Time: 00:09) So welcome back
More informationAdvanced Microprocessors
Advanced Microprocessors Notes #2 Software Architecture & Instruction Set Architecture Part 1 EE 467/567 Winter 2012 by Avinash Kodi SWA.1 Background Materials Textbook: 2.1, 2.2, 3.1 Other: IA-32 Intel
More informationRegisters. Ray Seyfarth. September 8, Bit Intel Assembly Language c 2011 Ray Seyfarth
Registers Ray Seyfarth September 8, 2011 Outline 1 Register basics 2 Moving a constant into a register 3 Moving a value from memory into a register 4 Moving values from a register into memory 5 Moving
More informationMarking Scheme. Examination Paper Department of CE. Module: Microprocessors (630313)
Philadelphia University Faculty of Engineering Marking Scheme Examination Paper Department of CE Module: Microprocessors (630313) Final Exam Second Semester Date: 02/06/2018 Section 1 Weighting 40% of
More information9/25/ Software & Hardware Architecture
8086 Software & Hardware Architecture 1 INTRODUCTION It is a multipurpose programmable clock drive register based integrated electronic device, that reads binary instructions from a storage device called
More informationFaculty of Engineering Computer Engineering Department Islamic University of Gaza Assembly Language Lab # 2 Assembly Language Fundamentals
Faculty of Engineering Computer Engineering Department Islamic University of Gaza 2011 Assembly Language Lab # 2 Assembly Language Fundamentals Assembly Language Lab # 2 Assembly Language Fundamentals
More informationAssembly Language. Dr. Esam Al_Qaralleh CE Department Princess Sumaya University for Technology. Overview of Assembly Language
4345 Assembly Language Assembly Language Dr. Esam Al_Qaralleh CE Department Princess Sumaya University for Technology Assembly Language 3-1 Overview of Assembly Language Advantages: Faster as compared
More informationMicroprocessors and Microcontrollers/High end processors
Module 8 learning unit 18 Architecture of 8386 The Internal Architecture of 8386 is divided into 3 sections. Central processing unit Memory management unit Bus interface unit Central processing unit is
More informationEEM336 Microprocessors I. The Microprocessor and Its Architecture
EEM336 Microprocessors I The Microprocessor and Its Architecture Introduction This chapter presents the microprocessor as a programmable device by first looking at its internal programming model and then
More informationMoodle WILLINGDON COLLEGE SANGLI (B. SC.-II) Digital Electronics
Moodle 4 WILLINGDON COLLEGE SANGLI (B. SC.-II) Digital Electronics Advanced Microprocessors and Introduction to Microcontroller Moodle developed By Dr. S. R. Kumbhar Department of Electronics Willingdon
More informationChapter 3: Addressing Modes
Chapter 3: Addressing Modes Chapter 3 Addressing Modes Note: Adapted from (Author Slides) Instructor: Prof. Dr. Khalid A. Darabkh 2 Introduction Efficient software development for the microprocessor requires
More information6/20/2011. Introduction. Chapter Objectives Upon completion of this chapter, you will be able to:
Introduction Efficient software development for the microprocessor requires a complete familiarity with the addressing modes employed by each instruction. This chapter explains the operation of the stack
More informationIA-32 Architecture COE 205. Computer Organization and Assembly Language. Computer Engineering Department
IA-32 Architecture COE 205 Computer Organization and Assembly Language Computer Engineering Department King Fahd University of Petroleum and Minerals Presentation Outline Basic Computer Organization Intel
More informationCC411: Introduction To Microprocessors
CC411: Introduction To Microprocessors OBJECTIVES this chapter enables the student to: Describe the Intel family of microprocessors from 8085 to Pentium. In terms of bus size, physical memory & special
More informationProtection and System Calls. Otto J. Anshus
Protection and System Calls Otto J. Anshus Protection Issues CPU protection Prevent a user from using the CPU for too long Throughput of jobs, and response time to events (incl. user interactive response
More informationBuffer Overflow Attack
Buffer Overflow Attack What every applicant for the hacker should know about the foundation of buffer overflow attacks By (Dalgona@wowhacker.org) Email: zinwon@gmail.com 2005 9 5 Abstract Buffer overflow.
More informationADVANCE MICROPROCESSOR & INTERFACING
VENUS INTERNATIONAL COLLEGE OF TECHNOLOGY Gandhinagar Department of Computer Enggineering ADVANCE MICROPROCESSOR & INTERFACING Name : Enroll no. : Class Year : 2014-15 : 5 th SEM C.E. VENUS INTERNATIONAL
More informationMICROPROCESSOR TECHNOLOGY
MICROPROCESSOR TECHNOLOGY Assis. Prof. Hossam El-Din Moustafa Lecture 16 Ch.7 The 80386 and 80486 Microprocessors 21-Apr-15 1 System Descriptors The system descriptor defines information about the system
More informationInstruction Set Architecture (ISA) Data Types
Instruction Set Architecture (ISA) Data Types Computer Systems: Section 4.1 Suppose you built a computer What Building Blocks would you use? Arithmetic Logic Unit (ALU) OP1 OP2 OPERATION ALU RES Full Adder
More informationProject 1: Bootloader. COS 318 Fall 2015
Project 1: Bootloader COS 318 Fall 2015 Project 1: Schedule Design Review - Monday, 9/28-10- min Ime slots from 1:30pm- 6:20pm - Write funcions print_char and print_string! - Answer the quesions: ü How
More informationInterfacing Compiler and Hardware. Computer Systems Architecture. Processor Types And Instruction Sets. What Instructions Should A Processor Offer?
Interfacing Compiler and Hardware Computer Systems Architecture FORTRAN 90 program C++ program Processor Types And Sets FORTRAN 90 Compiler C++ Compiler set level Hardware 1 2 What s Should A Processor
More informationAssembly Language. Lecture 2 - x86 Processor Architecture. Ahmed Sallam
Assembly Language Lecture 2 - x86 Processor Architecture Ahmed Sallam Introduction to the course Outcomes of Lecture 1 Always check the course website Don t forget the deadline rule!! Motivations for studying
More informationADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-11: 80x86 Architecture
ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-11: 80x86 Architecture 1 The 80x86 architecture processors popular since its application in IBM PC (personal computer). 2 First Four generations
More informationIntroduction to Microprocessor
Introduction to Microprocessor The microprocessor is a general purpose programmable logic device. It is the brain of the computer and it performs all the computational tasks, calculations data processing
More informationLecture 5: Computer Organization Instruction Execution. Computer Organization Block Diagram. Components. General Purpose Registers.
Lecture 5: Computer Organization Instruction Execution Computer Organization Addressing Buses Fetch-Execute Cycle Computer Organization CPU Control Unit U Input Output Memory Components Control Unit fetches
More informationX86 Addressing Modes Chapter 3" Review: Instructions to Recognize"
X86 Addressing Modes Chapter 3" Review: Instructions to Recognize" 1 Arithmetic Instructions (1)! Two Operand Instructions" ADD Dest, Src Dest = Dest + Src SUB Dest, Src Dest = Dest - Src MUL Dest, Src
More informationINSTRUCTOR: ABDULMUTTALIB A. H. ALDOURI
Note: PUSHF / POPF have no operands The figure below shows that if (SS) = 3000H, (SP) = 0042H, so the execution of POP CX loads CX by the word 4050H form the stack segment. The SP is incremented by 2.
More informationProcessor Structure and Function
WEEK 4 + Chapter 14 Processor Structure and Function + Processor Organization Processor Requirements: Fetch instruction The processor reads an instruction from memory (register, cache, main memory) Interpret
More informationAssembly Language. Lecture 2 x86 Processor Architecture
Assembly Language Lecture 2 x86 Processor Architecture Ahmed Sallam Slides based on original lecture slides by Dr. Mahmoud Elgayyar Introduction to the course Outcomes of Lecture 1 Always check the course
More informationMicroprocessor. By Mrs. R.P.Chaudhari Mrs.P.S.Patil
Microprocessor By Mrs. R.P.Chaudhari Mrs.P.S.Patil Chapter 1 Basics of Microprocessor CO-Draw Architecture Of 8085 Salient Features of 8085 It is a 8 bit microprocessor. It is manufactured with N-MOS technology.
More informationMarking Scheme. Examination Paper. Module: Microprocessors (630313)
Philadelphia University Faculty of Engineering Marking Scheme Examination Paper Department of CE Module: Microprocessors (630313) Final Exam Second Semester Date: 12/06/2017 Section 1 Weighting 40% of
More informationReverse Engineering II: Basics. Gergely Erdélyi Senior Antivirus Researcher
Reverse Engineering II: Basics Gergely Erdélyi Senior Antivirus Researcher Agenda Very basics Intel x86 crash course Basics of C Binary Numbers Binary Numbers 1 Binary Numbers 1 0 1 1 Binary Numbers 1
More informationEmbedded Systems Programming
Embedded Systems Programming x86 Memory and Interrupt (Module 8) Yann-Hang Lee Arizona State University yhlee@asu.edu (480) 727-7507 Summer 2014 X86 ISA Data Representations Little-endian byte ordering
More informationThe x86 Architecture. ICS312 - Spring 2018 Machine-Level and Systems Programming. Henri Casanova
The x86 Architecture ICS312 - Spring 2018 Machine-Level and Systems Programming Henri Casanova (henric@hawaii.edu) The 80x86 Architecture! To learn assembly programming we need to pick a processor family
More informationWilliam Stallings Computer Organization and Architecture 10 th Edition Pearson Education, Inc., Hoboken, NJ. All rights reserved.
+ William Stallings Computer Organization and Architecture 10 th Edition 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. 2 + Chapter 14 Processor Structure and Function + Processor Organization
More informationCS 16: Assembly Language Programming for the IBM PC and Compatibles
CS 16: Assembly Language Programming for the IBM PC and Compatibles Discuss the general concepts Look at IA-32 processor architecture and memory management Dive into 64-bit processors Explore the components
More informationReverse Engineering II: The Basics
Reverse Engineering II: The Basics Gergely Erdélyi Senior Manager, Anti-malware Research Protecting the irreplaceable f-secure.com Binary Numbers 1 0 1 1 - Nibble B 1 0 1 1 1 1 0 1 - Byte B D 1 0 1 1 1
More information