Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 2 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.

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

COMP 2003: Assembly Language and Digital Logic
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 2 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#3) By Dr. Syed Noman.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 2 The Microprocessor and its Architecture.
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 Spring 2013 Lecture 4: 80386DX memory, addressing.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 2 The Microprocessor and its Architecture.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
An Introduction to 8086 Microprocessor.
1 Fundamental of Computer Suthida Chaichomchuen : SCC
Types of Registers (8086 Microprocessor Based)
The x86 Architecture Lecture 15 Fri, Mar 4, 2005.
ECE291 Computer Engineering II Lecture 3 Josh Potts University of Illinois at Urbana- Champaign.
UHD:CS2401: A. Berrached1 The Intel x86 Hardware Organization.
Chapter 2 Parts of a Computer System. 2.1 PC Hardware: Memory.
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.
1 x86 Programming Model Microprocessor Computer Architectures Lab Components of any Computer System Control – logic that controls fetching/execution of.
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.
Microprocessors CSE- 341 Dr. Jia Uddin Assistant Professor, CSE, BRAC University Dr. Jia Uddin, CSE, BRAC University.
Computer Science 516 Intel x86 Overview. Intel x86 Family Eight-bit 8080, 8085 – 1970s 16-bit 8086 – was internally 16 bits, externally 8 bits.
Μ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.
Precept 7: Introduction to IA-32 Assembly Language Programming
Assembly language programming
Homework Reading Lab with your assigned section starts next week
Instruction set Architecture
Format of Assembly language
An Introduction to 8086 Microprocessor.
Microprocessor Systems Design I
Difference between Microprocessor and Microcontroller
UNIT Architecture M.Brindha AP/EIE
Introduction to 8086 Microprocessor
8086 Microprocessor.
COURSE OUTCOMES OF MICROPROCESSOR AND PROGRAMMING
ADDRESSING MODES.
Chapter 2 The Microprocessor and its Architecture
Intel 8086 MICROPROCESSOR Architecture.
Basic Microprocessor Architecture
Assembly IA-32.
ADDRESSING MODES.
University of Gujrat Department of Computer Science
Intel 8088 (8086) Microprocessor Structure
Homework Reading Continue work on mp1
Basic of Computer Organization
Microcomputer & Interfacing Lecture 1
Defining Types of data expression Dn [name] expression Dn [name]
Symbolic Instruction and Addressing
BIC 10503: COMPUTER ARCHITECTURE
Intel 8088 (8086) Microprocessor Structure
8086 Registers Module M14.2 Sections 9.2, 10.1.
CS-401 Computer Architecture & Assembly Language Programming
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
CNET 315 Microprocessor & Assembly Language
Lecture 06 Programming language.
Computer Architecture CST 250
X86 Assembly Review.
Unit-I 80386DX Architecture
Chapter 6 –Symbolic Instruction and Addressing
Process.
CSC 497/583 Advanced Topics in Computer Security
Intel 8086.
Part I Data Representation and 8086 Microprocessors
Presentation transcript:

Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 2 Department of Computer Science and Software Engineering University of Wisconsin-Platteville

General-Purpose Registers  AX(accumulator) often holds the temporary result after an arithmetic and logic operation (also addressed as EAX, AH, or AL)  BX (base) often holds the base (offset) address of data located in the memory (also addressed as EBX, BX, BL)  CX (count) contains the count for certain instructions such as shift count (CL) for shifts and a counter (CX or ECX) with the LOOP instruction (also addressed as ECX, CH, or CL)  DX (data) holds  the most significant part of the product after a 16- or 32-bit multiplication,  the most significant part of the dividend before a division, and  I/O port number for a variable I/O instruction (also addressed as EDX, DH, DL)

Pointer and Index Registers  SP (ESP) (stack pointer) used to address data in a LIFO (last-in, first-out) stack memory, most often used when  the PUSH and POP instructions are executed  a subroutine is CALLed or RETurned within a program  Don’t ever mess with this directly  BP (EBP) (base pointer) often used to address an array of data in the stack memory  SI,ESI (source index) used to address source data indirectly for use with the string instructions  DI,EDI (destination index) normally used to address destination data indirectly for use with the string instructions  IP,EIP (instruction pointer) always used to address the next instruction executed by the microprocessor

Logical vs. physical memory  Logical memory is the “view” of memory seen by the programmer  A large byte-addressable array of bytes  We can read/write bytes, words or doublewords  Physical memory  The physical organization of memory cells, which is not “visible” to the programmer  The unit of access to physical memory is equal to the width of the data bus  E.g. 16 bits in 8086, 32 bits in 80386

8086 physical memory Read Data from address 0:  Read a byte: result=FF  Read a word: result=ABFF  Read a doubleword: result=6611ABFF AB 1 FF DE 0146 F124 E B D F A C E Odd BankEven Bank Data Bus (15:8)Data Bus (7:0) E F1 E F1 E F1 E F1 E F1 E DE F1 E DE F1 E DE F1 E DE F1 E DE F1 E FF DE F1 E AB FF AAD 09C6 54FE EA

x86 byte ordering  Memory locations 0 and 1 contain FF and AB…  But a word access from address 0 returns ABFF  x86 uses “little endian” byte order  The requested address (0) points to the lower order byte of the result  The higher order byte of the result is taken from the next higher sequential address (1)

8086 physical memory AB 1 FF DE 0146 F124 E B D F A C E Odd BankEven Bank Data Bus (15:8)Data Bus (7:0) E F1 E F1 E F1 E F1 E F1 E DE F1 E DE F1 E DE F1 E DE F1 E DE F1 E FF DE F1 E AB FF AAD 09C6 54FE EA Read a word from address 0:  data(15:8)=AB,data(7:0)=FF  This is an aligned memory access Read a word from address 1:  It is a valid memory access  Result should be 11AB  But the bytes in the data bus are not aligned data(15:8)=AB,data(7:0)=11

Integer Representation  Three general techniques that have been used to represent signed integers in computer memory  Signed magnitude  One’s complement  Two’s complement

Integer Representation (cont.)  Signed magnitude  It represents the integer as two parts. The first part is the sign bit and the second is the magnitude of the integer  Example: +56= (38 Hex) and -56 = (B8 Hex)  One’s complement  A negative number is represented by the one’s complement of the absolute value  Example: +56= (38 Hex) and -56 = (C7 Hex)  Two’s complement (used by x86 and modern computers)  A negative number is represented by the two’s complement of the absolute value (ignore the carry bit)  Example: +56= (38 Hex) and -56 = (C8 Hex)

Integer Representation (cont.)  All of above methods use the most significant bit of the integer as a sign bit  An N-bits can represent integers in the range  Signed magnitude: −(2 N − 1 − 1) to +(2 N − 1 − 1)  One’s complement: −(2 N − 1 − 1) to +(2 N − 1 − 1)  Two's-complement: −(2 N − 1 ) to +(2 N − 1 − 1)