Computer Science 516 Addressing Modes. Addressing modes are how our programs get to data Multiple addressing modes created for specific uses Function.

Slides:



Advertisements
Similar presentations
CPU Structure and Function
Advertisements

Instruction Set Design
1 Lecture 3: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation.
There are two types of addressing schemes:
SUPPLEMENTARY CHAPTER 2 Instruction Addressing Modes
ITCS 3181 Logic and Computer Systems 2015 B. Wilkinson slides3.ppt Modification date: March 16, Addressing Modes The methods used in machine instructions.
Computer Organization and Architecture
Processor Function Topic 3.
Chapter 9 Times and Timers Source: Robbins and Robbins, UNIX Systems Programming, Prentice Hall, 2003.
Chapter 12 CPU Structure and Function. CPU Sequence Fetch instructions Interpret instructions Fetch data Process data Write data.
Computer Organization and Architecture
Computer Organization and Architecture
System Files and Process Environment Password file Group file System identification Time Process environment.
Execution of an instruction
Memory - Registers Instruction Sets
CH11 Instruction Sets: Addressing Modes and Formats
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
Chapter 12 CPU Structure and Function. Example Register Organizations.
Week 8 - Friday.  What did we talk about last time?  String to int conversions  Users and groups  Password files.
Part II: Addressing Modes
Group 5 Alain J. Percial Paula A. Ortiz Francis X. Ruiz.
ADDRESSING MODES OF Addressing Modes of  To perform any operation, we have to give the corresponding instructions to the microprocessor.
Mr. Gursharan Singh Tatla
CH12 CPU Structure and Function
Processor Organization and Architecture Module III.
Assembly Language Part 5. Reference parameter/global variable model C++ reference parameters are references to the actual arguments (as opposed to copies.
Assembly Language part 1.
Dr. José M. Reyes Álamo 1.  The 80x86 memory addressing modes provide flexible access to memory, allowing you to easily access ◦ Variables ◦ Arrays ◦
Instruction Set Architecture
BASIC COMPUTING CONCEPTS Part 3 Dr. Abdel-Rahman Al-Qawasmi INSIDE THE MACHINE by Jon Stokes.
Computer Architecture and the Fetch-Execute Cycle
Computer Science 516 Week 3 Lecture Notes. Computer Architecture - Common Points This lecture will cover some common things which characterize computer.
Execution of an instruction
COMPUTER ARCHITECURE INSTRUCTION SET ARCHITECTURE.
Computer Science 516 Week 4 Lecture Notes. Addresses Related to C++ pointers Not consistently covered in CS575 Essential to Computer Architecture.
Fetch-execute cycle.
Computer Architecture Lecture 03 Fasih ur Rehman.
Computer Studies/ICT SS2
Interacting with Unix. Getting the Process ID u Synopsis #include pid_t getpid(void); u Example: #include int main(){ pid_t n = getpid(); printf("Process.
COMPUTER ORGANIZATION AND ASSEMBLY LANGUAGE Lecture 21 & 22 Processor Organization Register Organization Course Instructor: Engr. Aisha Danish.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
1/15/2016Course material created by D. Woit 1 CPS 393 Introduction to Unix and C START OF WEEK 11 (C-5)
WEEK 3 I/O Port Programming ET2640 Microprocessors and Microcontrollers.
MIPS Architecture Topics –What resources MIPS assembly manipulates –CPU (Central Processing Unit) –ALU (Arithmetic & Logical Unit), Registers –Memory –I/O.
Structure and Role of a Processor
Arrays in MIPS Assembly Computer Organization and Assembly Language: Module 6.
Computer Organization Instructions Language of The Computer (MIPS) 2.
Week 9 - Wednesday.  What did we talk about last time?  structs.
1 ADDRESSING MODES Addressing Modes: * Specifies a rule for interpreting or modifying the address field of the instruction (before the operand is actually.
William Stallings Computer Organization and Architecture 8th Edition
Introduction to Micro Controllers & Embedded System Design Stored Program Machine Department of Electrical & Computer Engineering Missouri University.
Processor Organization and Architecture
Introduction to Micro Controllers & Embedded System Design Background to Module4 Department of Electrical & Computer Engineering Missouri University.
Processor Organization and Architecture
ECEG-3202 Computer Architecture and Organization
Stack Relative Deferred (sf) Indexed (x) Stack Indexed (sx)
Stack Relative Deferred (sf) Indexed (x) Stack Indexed (sx)
Computer Architecture
LC-2: The Little Computer 2
CPU has 6 special locations called registers
Instruction Set Summary
CPU Structure and Function
Chapter 11 Processor Structure and function
Presentation transcript:

Computer Science 516 Addressing Modes

Addressing modes are how our programs get to data Multiple addressing modes created for specific uses Function calls Array processing Pep8 has eight Other processors have less or more IBM mainframe – basically three Intel – thirteen

Pep8 Storage Access Purpose of addressing mode is to develop the address of data in storage Memory registers Memory Address Register (MAR) Gets address of data to be retrieved or stored Memory Data Register (MDR) Holds actual data from memory, or data to be stored Neither MAR nor MDR are programmer visible

Pep8 Storage Access Diagram

Pep8 Direct Addressing (001)

Pep8 Immediate Addressing (000)

Pep8 Indexed Addressing Mode (101)

Pep8 Indirect Addressing Mode (010)

Pep8 Stack-Relative Addressing

Pep8 Stack-Relative Deferred Addressing Mode (100)

Pep8 Stack Indexed Addressing Mode (110)

Pep8 Stack-Relative Indexed Deferred Addressing Mode (111)

Some Useful Pep8 Pseudo-Operations Pep8 has no Load Address instruction Instead, the.ADDRSS pseudo-operation will create a word holding the address of some label Use in index register to provide address, leave operand specifier zero. Pep8 has no equivalent for the C/C++ struct The.EQUATE pseudo-operation lets us specify a value to be used as a displacement. See example, next slide.

Example Of.EQUATE Here is a commonly used C struct: struct tm { int tm_sec; //seconds after the minute 0-61 int tm_min; //minutes after the hour0-59 int tm_hour; //hours since midnight 0-23 int tm_mday; //day of the month 1-31 int tm_mon; //months since January 0-11 int tm_year; //years since 1900 int tm_wday; //days since Sunday 0-6 int tm_yday; //days since January int tm_isdst; //Daylight Saving Time flag };

Example of Equate (continued) tm_sec:.EQUATE 0 //seconds after the minute 0-61 tm_min:.EQUATE 2 //minutes after the hour 0-59 tm_hour:.EQUATE 4 //hours since midnight 0-23 tm_mday:.EQUATE 6 //day of the month 1-31 tm_mon:.EQUATE 8 //months since January 0-11 tm_year:.EQUATE 10 //years since 1900 tm_wday:.EQUATE 12 //days since Sunday 0-6 tm_yday:.EQUATE 14 //days since January tm_isdst:.EQUATE 16 //Daylight Saving Time flag

Using Equate With The Index Register LDX Timeval,d STRO Label1,d DECO tm_year,x Label1:.ASCII “The year is:\x00” Timeval:.ADDRSS Tm Tm.BLOCK 18 ;where tm struct values are This assumes that the Tm area was filled for us somehow.