Addressing
This presentation is the property of its rightful owner.
Sponsored Links
1 / 9

Addressing PowerPoint PPT Presentation


  • 41 Views
  • Uploaded on
  • Presentation posted in: General

Addressing. Sample Question. Three addressing modes. Immediate Not an address. Use this number as it is. Direct Treat this number as an address, use the value that is at that address. Indirect

Download Presentation

Addressing

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Addressing

Addressing


Sample question

Sample Question


Three addressing modes

Three addressing modes

  • Immediate

    • Not an address. Use this number as it is.

  • Direct

    • Treat this number as an address, use the value that is at that address.

  • Indirect

    • Treat this number as an index. Go to that address, find the address in that location, then use the number pointed by that.


Immediate addressing

Immediate addressing

Accumulator

LDA #99

99

MemoryOMatic


Immediate addressing1

Immediate addressing

Accumulator

LDA #99

99

MemoryOMatic


Direct addressing

Direct addressing

LDA 99

Accumulator

145

MemoryOMatic


Indirect addressing

Indirect addressing

LDA (99)

Accumulator

145

MemoryOMatic

Indirect addressing may be used for code or data. It can make implementation of pointers or references or handlesmuch easier, and can also make it easier to call subroutines which are not otherwise addressable.

Some early minicomputers (e.g. DEC PDP-8, Data General Nova) had only a few registers and only a limited addressing range (8 bits). Hence the use of memory indirect addressing was almost the only way of referring to any significant amount of memory.


Indexed addressing

Indexed addressing

X

LDA 99 (X)

Accumulator

10

333

MemoryOMatic


Example use of indexed addressing

Example use of Indexed Addressing

LDA #0;load 0 to acc

LDX #0;load 0 to x

LOOPSTA TABLE(X);store acc in table+x

INX;increment x

CPX #99;compare x with 99

BNE LOOP;branch if not equal

What does this do?


  • Login