Addressing Modes
Addressing Modes
Architecture
Unit I – BASIC STRUCTURE OF
COMPUTERS
7. Addressing Modes
Dr.R.Kalaiselvi
Overview
2. Implied
6. Indexed
7. Relative
Instruction Format
Literal
Mov 5 R1
Memory Register
1000 A R0 A x582
1001 B R1 B
1002 C R2 C
Register Addressing Modes
Memory
Ex : MOV R1, (R2)
1000
1001
R1 10 1002 10
R2 1002
Memory Direct Addressing Mode
➢Memory location in which holds the operand is
specified in the instruction.
1000 10 A
20 B
Ex : MOV A, (C) 1001
1002 2000 C
2000 10
Memory
R1 0190
610
1565
Mov #0, R1
L1 Add (R2)+, R1 Ans 1565
Dec R0
Branch>0 L1
Mov R1, Ans
Indexed Addressing mode
Mov #100,R3 Find the sum of all students mark for a course
Memory
Mov L, R0 Thus the operand address is obtained by adding a
1000 id1 L constant to an address
Mov #0,R1
1004 m1 Constant is stored in an index register, thus index
1008 m2 Mov #0,R2 register is added with an address to get the
operand address
100C id2 L Add 4(R0),R1
1010 m1 Add 8(R0),R2
…..
Add #12,R0
Dec R3
Branch > 0 L
Mov R1,m1tot
Mov R2, m2tot
Relative Addressing Mode
2000 Mov #100,R3
1000 Mov #100,R3
2004 Mov L, R0
1004 Mov L, R0
2008 Mov #0,R1
1008 Mov #0,R1
200C Mov #0,R2
100C Mov #0,R2
2010 L Add 4(R0),R1
1010 L Add 4(R0),R1
2014 Add 8(R0),R2
1014 Add 8(R0),R2
2018 Dec R3
1018 Dec R3
201C Branch > 0 L
101C Branch > 0 L
2020 Mov R1,m1tot
1020 Mov R1,m1tot
Mov R2, m2tot
Mov R2, m2tot
➢https://www.slideshare.net/zuhaibroyzuhaib/compu
ter-architecture-62009686