Addressing Modes the addressing mode defines how data is accessed

Slides:



Advertisements
Similar presentations
Instruction Set Design
Advertisements

INSTRUCTION SET ARCHITECTURES
Address Indirect Addressing with Index and Displacement – Mode 6 Opcode - 4dRn - 3dmd - 3sMS - 6 rt - 1xm - 3s -1und - 3 displacement - 8 rt – type of.
ITCS 3181 Logic and Computer Systems 2015 B. Wilkinson slides3.ppt Modification date: March 16, Addressing Modes The methods used in machine instructions.
9/20/6Lecture 3 - Instruction Set - Al Instruction Set.
CIS429.S00: Lec6- 1 Addressing Modes There are a variety of ways a machine instruction can specify an address in memory. Effective address - the actual.
ARM programmer’s model and assembler Embedded Systems Programming.
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.
Bit Operations C is well suited to system programming because it contains operators that can manipulate data at the bit level –Example: The Internet requires.
A bit can have one of two values: 0 or 1. The C language provides four operators that can be used to perform bitwise operations on the individual bits.
Assembly & Machine Languages
Lecture 18 Last Lecture Today’s Topic Instruction formats
Dr. Rabie A. Ramadan Al-Azhar University Lecture 6
Instruction Set Architecture
L/O/G/O The Instruction Set Chapter 9 CS.216 Computer Architecture and Organization.
1 Appendix B Classifying Instruction Set Architecture Memory addressing mode Operations in the instruction set Control flow instructions Instruction format.
Instruction Set Architecture Basics. Our Progress Done with levels 0 and 1 Seen multiple examples of level 2 Ready for ISA general principles.
Chapter 5 A Closer Look at Instruction Set Architectures.
Important Concepts  Parts of the CPU  Arithmetic/Logic Unit  Control Unit  Registers  Program Counter  Instruction Register  Fetch/Decode/Execute.
26-Nov-15 (1) CSC Computer Organization Lecture 6: Pentium IA-32.
9/20/6Lecture 2 - Prog Model Architecture, Data Types and Addressing Modes.
Addressing Modes1 Addressing modes are concerned with how the CPU accesses the operands used by its instructions.
Chapter 11 Instruction Sets: Addressing Modes and Formats Gabriel Baron Sydney Chow.
EE 345 Class Notes EE345 Midterm Review Dr. Jane Dong.
INTRODUCTION Programming – process of composing several instructions to perform certain tasks. Program – product of programming which contains several.
Topics covered: Instruction Set Architecture CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Instruction Sets: Addressing modes and Formats Group #4  Eloy Reyes  Rafael Arevalo  Julio Hernandez  Humood Aljassar Computer Design EEL 4709c Prof:
Lecture 5 A Closer Look at Instruction Set Architectures Lecture Duration: 2 Hours.
What is a program? A sequence of steps
Microprocessor & Assembly Language
ECE 511: Digital System & Microprocessor
Memory Access Instructions Load and Store Addressing Modes Memory Addressing. Base addressing mode. Load byte and store byte: lb, lbu, sb Address alignment.
Microprocessors I 8051 Addressing Modes CS Prof. Msc. Ivan A. Escobar
Displacement (Indexed) Stack
ARM Intro.
Machine Code typically: word 1 words 2-3 words 4-5
Memory Access Instructions
Addressing Modes in Microprocessors
Immediate Addressing Mode
ECE 3430 – Intro to Microcomputer Systems
Chapter 11 Instruction Sets
A Closer Look at Instruction Set Architectures
Morgan Kaufmann Publishers
The Cortex-M3/m4 Embedded Systems: Cortex-M3/M4 Instruction Sets
A Closer Look at Instruction Set Architectures
Addressing Modes Immediate #<data> or Imm
William Stallings Computer Organization and Architecture 8th Edition
Computer Organization and Assembly Language (COAL)
68000 Arithmetic Instructions
EECE-276 Fall 2003 Microprocessors & Microcontrollers II
Lecture 3 - Instruction Set - Al
Operating Modes UQ: State and explain the operating modes of X86 family of processors. Show the mode transition diagram highlighting important features.(10.
CSCI206 - Computer Organization & Programming
Introduction to Micro Controllers & Embedded System Design Addressing Mode Department of Electrical & Computer Engineering Missouri University of Science.
The University of Adelaide, School of Computer Science
Processor Organization and Architecture
Addressing Modes Immediate #<data> or Imm
68000 Architecture, Data Types and Addressing Modes
Fields in the FALCON-A Instruction
Write a program to calculate x**y, given x and y.
ECEG-3202 Computer Architecture and Organization
Introduction to Micro Controllers & Embedded System Design
Classification of instructions
Computer Architecture
ECEG-3202 Computer Architecture and Organization
Addressing Modes Immediate #<data> or Imm
CPU Structure CPU must:
Presentation transcript:

Addressing Modes the addressing mode defines how data is accessed ↑ # of addressing modes → ↑ flexibility → easier to program ↑ # of addressing modes → ↑ complex machine code each operand has an addressing mode e.g. MOVE.B Num1,D0 ideally, every addressing mode would work with every instruction ≡ orthogonal instruction set effective address ≡ <ea> ≡ EA effective address indicates how the address of the operand is calculated all addressing modes with the exception of immediate have an effective address

Basic Addressing Modes Immediate #<data> or Imm # (pound/hashtag) sign indicates that the item that follows is immediate data eg. #%1011, #$AF, #'The', #52*7, #NUM operand is a constant or a constant expression (evaluated at time of assembly) operand is in the instruction machine code <ea> = none instruction machine code operand

Basic Addressing Modes Immediate #<data> or Imm e.g. MOVE.B #25,D0 e.g. ADDI.B #1,D2 e.g. MOVE.W #num1,A0 …. num1 DC.W 255 “quick” instructions, e.g. ADDQ, SUBQ, MOVEQ, use immediate data but with restricted range

Basic Addressing Modes Register Direct (Register) Dn or An operand is in a general register registers <ea> = Rn e.g. MOVE.B #25,D0 e.g. ADDI.B #1,D2 operand Rn instruction machine code …

Basic Addressing Modes Direct (Memory Direct) (xxx).W or (xxx).L operand is a variable ± constant expression (evaluated at time of assembly) the address of the operand is part of the instruction <ea> = address e.g. MOVE.B D0,num1 … num1 DC.B $05 e.g. MOVE.B 25,D0 address instruction mcode operand memory

Direct (Memory Direct) (optional) Direct (Memory Direct) (xxx).W or Abs.W absolute short address stored as 16 bits specified as $0 to $7FFF $8000 to $FFFF final address is sign extension of 16 bit address (xxx).L or Abs.L absolute long address stored as 32 bits difference in machine code as absolute short generates more compact machine code memory extremes have special uses (system area, I/O interfaces, ROM) $00 0000 32K = 32 x 1024 $00 7FFF $FF 8000 32K $FF FFFF

e.g. shift a 16 bit variable left one bit; in place

eg. Divide an 8-bit variable into two 4-bit nibbles eg. Divide an 8-bit variable into two 4-bit nibbles. Store the top nibble of the original into the low nibble of the top byte of the result and store the low nibble of the original into the low nibble of the low byte of the result.  “unpack” the number For example, if byte =$5F, the resulting word would be $050F.

Reading/Expectations Endianness White Paper read pages 1-8 [pdf, 22p, Intel, November 15, 2004] Orthogonal instruction set [Wikipedia®] Expectations: you are able to write simple programs using the three addressing modes you can determine the addressing modes for any instruction (currently limited to the 3 addressing modes that you know) you can explain the concept of effective address and provide it for these and all future addressing modes