Presentation is loading. Please wait.

Presentation is loading. Please wait.

Stack Relative Deferred (sf) Indexed (x) Stack Indexed (sx)

Similar presentations


Presentation on theme: "Stack Relative Deferred (sf) Indexed (x) Stack Indexed (sx)"— Presentation transcript:

1 Stack Relative Deferred (sf) Indexed (x) Stack Indexed (sx)
PEP8 Addressing Modes Immediate (i) Direct (d) Indirect (n) Stack Relative (s) Stack Relative Deferred (sf) Indexed (x) Stack Indexed (sx) Stack Indexed Deferred (sxf) 2

2 Operand is part of instruction Operand = Operand Specifier
Immediate Addressing Operand is part of instruction Operand = Operand Specifier e.g. ADDA d#5, i Add 5 to contents of accumulator d# stands for Decimal and i stands for immediate 5 is operand 3

3 Operand Specifier contains address of operand
Direct Addressing Operand Specifier contains address of operand Operand = Memory [Operand Specifier] e.g. ADDA h#004A, d Add content of memory location 004A to accumulator h# stands for hexadecimal and d stands for direct. 5

4 Direct Addressing Diagram
Instruction Instruction Specifier Operand Specifier Memory Operand 6

5 Indirect Addressing Memory cell pointed to by Operand Specifier contains the address of the operand Operand = Memory[ Memory [Operand Specifier]] e.g. ADDA h#004A,n Add contents of cell pointed to by contents of 004A to accumulator n stands for indirect 7

6 Indirect Addressing Diagram
Operand Specifier Instruction Memory Operand Pointer to operand Specifier 9

7 Stack Relative Addressing
Operand is on the stack Operand = Memory [Stack Pointer + Operand Specifier] e.g. ADDA d#-1,s Add contents of cell SP - 1 to accumulator s stands for stack relative 17

8 Stack Relative Addressing
Operand Specifier Instruction Memory Operand Stack Pointer Specifier +

9 Stack Relative Deferred Addressing
Operand is on the stack Operand = Memory [Memory [SP + Operand Specifier]] e.g. ADDA d#-4, sf Add contents of cell pointed to by contents of SP - 4 to accumulator sf stands for Stack Relative Deferred 17

10 Stack Relative Deferred Addressing
Stack Pointer Pointer to operand Operand Specifier Instruction Memory Operand Specifier +

11 Indexed Addressing e.g. ADDA h#004A, x
Operand = Memory [Index Register + Operand Specifier] e.g. ADDA h#004A, x Add contents of cell pointed to by X + 004A to accumulator x stands for indexed 19

12 Indexed Addressing Instruction Operand Specifier Memory +
Index Register Specifier +

13 Stack Indexed Addressing
Operand = Memory [SP + X + Operand Specifier] e.g. ADDA h#004A, sx Add contents of cell pointed to by SP + X + 004A to accumulator sx stands for stack indexed 19

14 Stack Indexed Addressing
Stack Pointer Operand Specifier Instruction Memory Operand Specifier + Index Register

15 Stack Indexed Deferred Addressing
Operand = Memory [X + Memory [ SP + Operand Specifier]] e.g. ADDA h#004A, sxf Add contents of cell pointed to by X + contents of SP + 004A to accumulator sxf stands for Stack Indexed Deferred 19

16 Stack Indexed Deferred Addressing
Stack Pointer Pointer to operand Operand Specifier Instruction Memory Operand Specifier + Index Register


Download ppt "Stack Relative Deferred (sf) Indexed (x) Stack Indexed (sx)"

Similar presentations


Ads by Google