Addressing Modes Charles Abzug, Ph.D. Department of Computer Science

Slides:



Advertisements
Similar presentations
Assembly Language Programming
Advertisements

INSTRUCTION SET ARCHITECTURES
There are two types of addressing schemes:
ITCS 3181 Logic and Computer Systems 2015 B. Wilkinson slides3.ppt Modification date: March 16, Addressing Modes The methods used in machine instructions.
Processor Function Topic 3.
Execution of an instruction
TK 2633 Microprocessor & Interfacing Lecture 3: Introduction to 8085 Assembly Language Programming (2) 1 Prepared By: Associate Prof. Dr Masri Ayob.
Room: E-3-31 Phone: Dr Masri Ayob TK 2633 Microprocessor & Interfacing Lecture 1: Introduction to 8085 Assembly Language.
Basic Computer Organization, CPU L1 Prof. Sin-Min Lee Department of Computer Science.
Part II: Addressing Modes
ADDRESSING MODES OF Addressing Modes of  To perform any operation, we have to give the corresponding instructions to the microprocessor.
INSTRUCTION SET OF MICROPROCESSOR 8085
MICROCONTROLLER INSTRUCTION SET
The M68HC11 Basic Instruction Set Basic Arithmetic Instructions
Computer Science 210 Computer Organization The Instruction Execution Cycle.
Module 10 Adapted By and Prepared James Tan © 2001.
Computer Architecture Lecture 13 – part 2 by Engineer A. Lecturer Aymen Hasan AlAwady 7/4/2014 University of Kufa - Information Technology Research and.
Computer Architecture and the Fetch-Execute Cycle
Execution of an instruction
COMPUTER ARCHITECURE INSTRUCTION SET ARCHITECTURE.
Represents different voltage levels High: 5 Volts Low: 0 Volts At this raw level a digital computer is instructed to carry out instructions.
ECEG-3202 Computer Architecture and Organization Chapter 6 Instruction Sets: Addressing Modes and Formats.
Addressing Modes MTT CPU08 Core Motorola CPU08 ADDRESSING MODES.
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:
Assembly Language Programming of 8085 BY Prof. U. V. THETE Dept. of Computer Science YMA.
ECE 447: Lecture 11 Introduction to Programming in Assembly Language.
1 ADDRESSING MODES Addressing Modes: * Specifies a rule for interpreting or modifying the address field of the instruction (before the operand is actually.
Computer Architecture
EE345 Chapter 2 Lecture 3 April Instruction and addressing modes 1.Extended Addressing 2.Direct Addressing 3.Inherent Addressing 4.Immediate Addressing.
Displacement (Indexed) Stack
Overview of Instruction Set Architectures
ECE 3430 – Intro to Microcomputer Systems
Immediate Addressing Mode
Overview Introduction General Register Organization Stack Organization
Assembly Language Programming of 8085
Microprocessor T. Y. B. Sc..
Lecture Set 5 The 8051 Instruction Set.
8051 Addressing Modes The way, using which the data source or destination addresses are specified in the instruction mnemonic for moving the data, is.
Microcomputer Programming
William Stallings Computer Organization and Architecture 8th Edition
Overview Introduction General Register Organization Stack Organization
Computer Organization and Design
Computer Organization and Assembly Language (COAL)
CS-401 Assembly Language Programming
Introduction to Micro Controllers & Embedded System Design Stored Program Machine Department of Electrical & Computer Engineering Missouri University.
Computer Science 210 Computer Organization
ECE 445 CS1251 Computer Organization Carl Hamacher
Additional data transfer and 16 bit arithmetic instruction Lecture 1
SCHOOL OF ELECTRONICS ENGINEERING Electronics and Communication
Introduction to Micro Controllers & Embedded System Design Background to Module4 Department of Electrical & Computer Engineering Missouri University.
Computer Science 210 Computer Organization
Introduction to Micro Controllers & Embedded System Design Addressing Mode Department of Electrical & Computer Engineering Missouri University of Science.
Chapter 8 Central Processing Unit
ECEG-3202 Computer Architecture and Organization
Stack Relative Deferred (sf) Indexed (x) Stack Indexed (sx)
Under Address Modes Source: under
Introduction to Micro Controllers & Embedded System Design
Classification of instructions
THE FETCH-EXECUTE CYCLE.
Stack Relative Deferred (sf) Indexed (x) Stack Indexed (sx)
Under Address Modes Source: under
CPU has 6 special locations called registers
Assembly Language Programming
Central Processing Unit.
Instruction Set Summary
THE FETCH-EXECUTE CYCLE.
William Stallings Computer Organization and Architecture 8 th Edition Chapter 11 Instruction Sets: Addressing Modes and Formats.
Little Man Computer.
Presentation transcript:

Addressing Modes Charles Abzug, Ph.D. Department of Computer Science James Madison University Harrisonburg, VA 22807 Voice Phone: 540-568-8746, E-mail: CharlesAbzug@ACM.org Home Page: http://www.cs.jmu.edu/users/abzugcx © 2002 Charles Abzug

Addressing Modes in the Beboputer Implied: The location(s) acted upon are implied by the instruction mnemonic (the name of the instruction), and therefore are not separately specified. EXAMPLES: INCA #(Increment Accumulator) DECX #(Decrement Index Register) PUSHSR #(Push Status Register) CLRIM #(Clear Interrupt Mask)

Figure 8.54 from Maxfield & Brown

Addressing Modes in the Beboputer (continued) Implied: The location(s) acted upon are implied by the instruction mnemonic (the name of the instruction), and therefore are not separately specified. EXAMPLES: INCA #(Increment Accumulator) DECX #(Decrement Index Register) PUSHSR #(Push Status Register) CLRIM #(Clear Interrupt Mask) Immediate: The value of the operand is specified in the body of the program immediately following the instruction opcode. EXAMPLES: LDA $F3 #(Load Accumulator) ADDC %10110101 #(Add [to Accumulator] with Carry) BLDSP $4317 #(“Big” Load Stack Pointer)

Figure 8.55 from Maxfield & Brown

Addressing Modes in the Beboputer (continued) Implied: The location(s) acted upon are implied by the instruction mnemonic (the name of the instruction), and therefore are not separately specified. EXAMPLES: INCA #(Increment Accumulator) DECX #(Decrement Index Register) PUSHSR #(Push Status Register) CLRIM #(Clear Interrupt Mask) Immediate: The value of the operand is specified in the body of the program immediately following the instruction opcode. EXAMPLES: LDA $F3 #(Load Accumulator) ADDC %10110101 #(Add [to Accumulator] with Carry) BLDSP $4317 #(“Big” Load Stack Pointer) Absolute: Instead of the value of the operand, the ADDRESS of the operand follows immediately after the instruction opcode. EXAMPLES: LDA [DATA] #(Load Accumulator) LDA [$4317] #(Load Accumulator

Figure 8.58 from Maxfield & Brown

Addressing Modes in the Beboputer (continued) Indirect: The address of the address of the operand follows immediately after the instruction opcode. EXAMPLES: LDA [[DATA]] LDA [[$4317]]

Figure 8.63 from Maxfield & Brown

Addressing Modes in the Beboputer (continued) Indirect: The address of the address of the operand follows immediately after the instruction opcode. EXAMPLES: LDA [[DATA]] LDA [[$4317]] Indexed: The value of the Index Register is added to the base address which follows immediately after the instruction opcode. Useful for accessing elements of an array. EXAMPLES: LDA [DATA,X] LDA [$4317,X]

Figure 8.65 from Maxfield & Brown

Addressing Modes in the Beboputer (continued) Indirect: The address of the address of the operand follows immediately after the instruction opcode. EXAMPLES: LDA [[DATA]] LDA [[$4317]] Indexed: The value of the Index Register is added to the base address which follows immediately after the instruction opcode. Useful for accessing elements of an array. EXAMPLES: LDA [DATA,X] LDA [$4317,X] Pre-Indexed Indirect: The address of the address of the operand is modified by adding the value of the Index Register. EXAMPLES: LDA [[DATA,X]] LDA [[$4317,X]]

Figure 8.68 from Maxfield & Brown

Addressing Modes in the Beboputer (continued) Indirect: The address of the address of the operand follows immediately after the instruction opcode. EXAMPLES: LDA [[DATA]] LDA [[$4317]] Indexed: The value of the Index Register is added to the base address which follows immediately after the instruction opcode. Useful for accessing elements of an array. EXAMPLES: LDA [DATA,X] LDA [$4317,X] Pre-Indexed Indirect: The address of the address of the operand is modified by adding the value of the Index Register. EXAMPLES: LDA [[DATA,X]] LDA [[$4317,X]] Indirect Post-Indexed: The value of the Index Register is not added until the second stage of address resolution. EXAMPLES: LDA [[DATA],X] LDA [[$4317],X]

Figure 8.69 from Maxfield & Brown

Addressing Modes (continued) ADDITIONAL ADDRESSING MODES COMMONLY USED in digital computers, although not in the Beboputer: Pre-Indexed Indirect AutoINcrement: Value stored in Index Register is automatically incremented each time the instruction is executed. Pre-Indexed Indirect AutoDEcrement: Value stored in Index Register is automatically decremented each time the instruction is executed. Indirect Post-Indexed AutoINcrement: Value stored in Index Register is automatically incremented each time the instruction is executed. Indirect Post-Indexed AutoDEcrement: Value stored in Index Register is automatically decremented each time the instruction is executed.

Op Codes and Addressing Modes Mnemonic Implied Immediate Absolute Indexed Indirect Pre-Indexed Post-Indexed LDA $90 $91 $92 $93 $94 $95 STA $99 $9A $9B $9C $9D JMP $C1 $C2 $C3 $C4 $C5 JSR $C9 $CA $CB $CC $CD

Summary of Beboputer Addressing Modes Implied: The location(s) acted upon are implied by the instruction mnemonic (the name of the instruction), and therefore are not separately specified. EXAMPLES: INCA #(Increment Accumulator) DECX #(Decrement Index Register) PUSHSR #(Push Status Register) CLRIM #(Clear Interrupt Mask) Immediate: The value of the operand is specified in the body of the program immediately following the instruction opcode. EXAMPLES: LDA $F3 #(Load Accumulator) ADDC %10110101 #(Add [to Accumulator] with Carry) BLDSP $4317 #(“Big” Load Stack Pointer) Absolute: Instead of the value of the operand, the ADDRESS of the operand follows immediately after the instruction opcode. EXAMPLES: LDA [DATA] #(Load Accumulator) LDA [$4317] #(Load Accumulator

Summary of Beboputer Addressing Modes (continued) Indirect: The address of the address of the operand follows immediately after the instruction opcode. EXAMPLES: LDA [[DATA]] LDA [[$4317]] Indexed: The value of the Index Register is added to the base address which follows immediately after the instruction opcode. Useful for accessing elements of an array. EXAMPLES: LDA [DATA,X] LDA [$4317,X] Pre-Indexed Indirect: The address of the address of the operand is modified by adding the value of the Index Register. EXAMPLES: LDA [[DATA,X]] LDA [[$4317,X]] Indirect Post-Indexed: The value of the Index Register is not added until the second stage of address resolution. EXAMPLES: LDA [[DATA],X] LDA [[$4317],X]

Summary of Addressing Modes (continued) ADDITIONAL ADDRESSING MODES COMMONLY USED, but not in Beboputer Pre-Indexed Indirect AutoINcrement: Value stored in Index Register is automatically incremented each time the instruction is executed. Pre-Indexed Indirect AutoDEcrement: Value stored in Index Register is automatically decremented each time the instruction is executed. Indirect Post-Indexed AutoINcrement: Value stored in Index Register is automatically incremented each time the instruction is executed. Indirect Post-Indexed AutoDEcrement: Value stored in Index Register is automatically decremented each time the instruction is executed.

END