Microprocessor Systems Design I

Slides:



Advertisements
Similar presentations
Chapter four – The 80x86 Instruction Set Principles of Microcomputers 2015年5月14日 2015年5月14日 2015年5月14日 2015年5月14日 2015年5月14日 2015年5月14日 1 Chapter Four.
Advertisements

16.317: Microprocessor System Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 8: Data Transfer Instructions.
Department of Computer Science and Software Engineering
80x86 Instruction Set Dr. Qiang Lin.
Gursharan Singh Tatla 21-Nov-20101www.eazynotes.com.
8086 : INSTRUCTION SET By, Pramod Sunagar Assistant Professor
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 5 Arithmetic and Logic Instructions.
9-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL x86 Instructions Part.
Shift and Rotate Instructions
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.
Microcomputer & Interfacing Lecture 3
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Fall 2012 Lecture 10: Flag control instructions Conditional execution.
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 2: 80386DX Internal Architecture & Data Organization.
Microprocessor Systems Design I
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Spring 2013 Lecture 4: 80386DX memory, addressing.
Microprocessor Systems Design I
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Spring 2014 Lecture 4: x86 memory.
An Introduction to 8086 Microprocessor.
Ch. 7 Logic, Shift and Rotate instr.
11.1/36 Repeat: From Bits and Pieces Till Strings.
Microprocessors Monday, Apr. 13 Dr. Asmaa Farouk Faculty of Engineering, Electrical Department, Assiut University.
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 4 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
UHD:CS2401: A. Berrached1 The Intel x86 Hardware Organization.
26-Nov-15 (1) CSC Computer Organization Lecture 6: Pentium IA-32.
3.4 Addressing modes Specify the operand to be used. To generate an address, a segment register is used also. Immediate addressing: the operand is a number.
Introduction to Microprocessors Chapter 3. Programming Model (8086)  Shows the various internal registers that are accessible to the programmer.
The Assemble, Unassemble commands of the debugger: U Command for converting machine code language source Equivalent machine code instructions Equivalent.
Microprocessor & Assembly Language Arithmetic and logical Instructions.
Intel MP Organization. Registers - storage locations found inside the processor for temporary storage of data 1- Data Registers (16-bit) AX, BX, CX, DX.
I NTEL 8086 M icroprocessor بسم الله الرحمن الرحيم 1.
Microprocessor Systems Design I
Chapter Nov-2010
Data Transfers, Addressing, and Arithmetic
Microprocessor Systems Design I
Microprocessor Systems Design I
Microprocessor Systems Design I
16.317: Microprocessor System Design I
Microprocessor Systems Design I
Introduction to 8086 Microprocessor
Microprocessor Systems Design I
8086 Microprocessor.
Today we are going to discuss about,
Microprocessor Systems Design I
16.317: Microprocessor System Design I
Microprocessor Systems Design I
ADDRESSING MODES.
Microprocessor Systems Design I
EE3541 Introduction to Microprocessors
Machine control instruction
INSTRUCTION SET.
Assembly Language Programming Part 2
16.317: Microprocessor System Design I
ADDRESSING MODES.
Intel 8088 (8086) Microprocessor Structure
INSTRUCTION SET OF 8086 PAWAN KUMAR SINGH.
X86’s instruction sets.
Introduction to Assembly Language
Intel 8088 (8086) Microprocessor Structure
CS-401 Computer Architecture & Assembly Language Programming
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Symbolic Instruction and Addressing
University of Gujrat Department of Computer Science
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
Chapter 5 Arithmetic and Logic Instructions
Chapter 6 –Symbolic Instruction and Addressing
Microprocessor and Assembly Language
CNET 315 Microprocessor & Assembly Language
Shift and Rotate Instructions.
CS-401 Computer Architecture & Assembly Language Programming
Presentation transcript:

16.317 Microprocessor Systems Design I Instructor: Dr. Michael Geiger Spring 2013 Lecture 11: Exam 1 Preview

Microprocessors I: Exam 1 Preview Lecture outline Announcements/reminders Lab 1 to be posted; due date likely 3/1 Today’s lecture: Exam 1 Preview General exam notes Topics covered Processor basics Instruction set architecture Storage & memory addressing 80386 memory architecture 80386 instructions 9/12/2018 Microprocessors I: Exam 1 Preview

Microprocessors I: Exam 1 Preview Exam 1 notes Allowed One 8.5” x 11” double-sided sheet of notes Calculator No other notes or electronic devices (phone, laptop, etc.) Exam will be 50 minutes Covers all lectures through Friday 9/12/2018 Microprocessors I: Exam 1 Preview

Review: processor basics; ISA Processor components Microprocessor for computation Input/output to communicate with outside world Storage to hold code/data Instruction set architecture Defines how programmer interfaces with hardware Operations generally fall into one of four groups Data transfer: move data across storage locations Arithmetic: add, subtract, etc. Logical: AND, OR, shifts, etc. Program control: jumps/branches/calls 9/12/2018 Microprocessors I: Exam 1 Preview

Microprocessors I: Exam 1 Preview Review: ISA, storage Instruction set architecture (cont.) Operands: the data being operated on How are the bits interpreted? (int, FP, signed/unsigned) What size are they? (byte, word, etc.) How do we reference operands? Instruction formats: how instructions are encoded Data storage Registers Small, fast set of on-chip storage (primarily for speed) Referenced by name Memory Larger, slower set of storage (primarily for capacity) Organized as hierarchy … … but programmer references single range of addresses Memory issues Aligned data: address divisible by number of bytes Endianness: 80x86 data is little endian 9/12/2018 Microprocessors I: Exam 1 Preview

Microprocessors I: Exam 1 Preview Review: 80386 & memory More 80386 memory specifics Six segment registers: CS (code), SS (stack), DS, ES, FS, GS (data) Each segment 64 KB, starts on 16B boundary Lowest hex digit of 20-bit address = 0 Logical address  SBA:EA Examples: DS:SI, SS:SP, CS:IP, DS:1000H Physical address: actual memory address Shift 16-bit segment register to left by 4 bits = SBA Add 16-bit EA to SBA Calculating EA Direct addressing: EA = const Register indirect—either “based” or “indexed”: EA = reg Possible register: SI, DI, BX, BP Only BP uses SS; others use DS by default Based-indexed: EA = base reg. + index reg. Based-indexed + displacement: EA = base reg + index reg + const 9/12/2018 Microprocessors I: Exam 1 Preview

Review: Addressing modes, segments Register addressing  data in register Immediate addressing  data in instruction Memory addressing  data in memory Need effective address EA calculation Direct addressing  EA = constant Register indirect  EA = register value Base + displacement addressing  EA = constant + reg(s) 80386 memory Data/code and I/O separated General memory uses segmented architecture Only subset of memory active at time Segment register(s) hold starting address of segment(s) 9/12/2018 Microprocessors I: Exam 1 Preview

Review: data & data transfer instructions Registers: access as 8-bit (e.g. AL, AH), 16-bit (AX), 32-bit (EAX) Memory Data size usually matches register If not, explicitly specify (BYTE PTR, WORD PTR, DWORD PTR) MOV: basic data transfer Can use registers, memory, immediates If segment reg. is destination, source must be register MOVSX/MOVZX Sign-extend or zero-extend register/memory value XCHG Exchange contents of source, dest 9/12/2018 Microprocessors I: Exam 1 Preview

Review: data transfer, arithmetic LEA: load effective address Calculate EA/store in register Load full pointer (LDS/LES/LFS/LGS/LSS) Load dest & segment register from memory Reviewed flags: CF, AF, SF, ZF, PF, OF Addition instructions ADD AX,BX  AX = AX + BX ADC AX,BX  AX = AX + BX + CF INC AX  AX = AX + 1 Subtraction instructions SUB AX,BX  AX = AX – BX SBB AX,BX  AX = AX – BX – CF DEC AX  AX = AX – 1 NEG AX  AX = -AX = 0 - AX 9/12/2018 Microprocessors I: Exam 1 Preview

Review: Multiplication & division Multiplication instructions MUL (unsigned), IMUL (signed) Result uses 2x bits of source Source usually implied (AL/AX/EAX) Division instructions DIV (unsigned), IDIV (signed) Implied source (AX, (DX,AX), (EDX,EAX)) 2x bits of specified source Quotient/remainder split across result 9/12/2018 Microprocessors I: Exam 1 Preview

Review: Logical instructions Logical instructions (AND/OR/XOR/NOT) Basic shift instructions Move value by <amt> bits; add 0s to left or right CF = last bit shifted out SHL <src>, <amt>: Move <src> to left SAL exactly the same SHR <src>, <amt>: Move <src> to right Arithmetic right shift Move value right by <amt> bits Copy sign bit to fill remaining bits SAR <src>, <amt> 9/12/2018 Microprocessors I: Exam 1 Preview

Review: rotate instructions Rotate instructions: bits that are shifted out one side are shifted back in other side ROL <src>, <amt> or ROR <src>, <amt> CF = last bit rotated Rotate through carry instructions CF acts as “extra” bit that is part of value being rotated RCL <src>, <amt> or RCR <src>, <amt> 9/12/2018 Microprocessors I: Exam 1 Preview

Review: bit test/scan, flag control Bit test instructions Check state of bit and store in CF Basic test (BT) leaves bit unchanged Can also set (BTS), clear (BTR), or complement bit (BTC) Bit scan instructions Find first non-zero bit and store index in dest. Set ZF = 1 if source non-zero; ZF = 0 if source == 0 BSF: scan right to left (LSB to MSB) BSR: scan left to right (MSB to LSB) Flag control instructions Initialize carry flag to 0 (CLC), 1 (STC), or ~CF (CMC) Set (STI) or clear (CLI) interrupt flag Transfer flags to (LAHF) or from (SAHF) register AH 9/12/2018 Microprocessors I: Exam 1 Preview

Microprocessors I: Exam 1 Preview Review: compare CMP D, S Flags show result of (D) – (S) Assumes signed computation ZF = 1  D == S ZF = 0, (SF XOR OF) = 1  D < S ZF = 0, (SF XOR OF) = 0  D > S Condition codes: mnemonics implying certain flag conditions 9/12/2018 Microprocessors I: Exam 1 Preview

Microprocessors I: Exam 1 Preview Final notes Next time: Exam 1 Allowed calculator, one 8.5” x 11” note sheet Will be provided list of instructions/condition codes Please be as close to on time as possible Reminders: Lab 1 coming soon 9/12/2018 Microprocessors I: Exam 1 Preview