In: Computer Science
Explain 3 Register addressing modes?
Background:
Normally,an instruction is a group of three components.
a)Operation Code(Opcode):specifies which operation is to be
performed.
b)Address/Operand:Operation is performed upon a quantity.this
quantity is called operand.
instead of having operand,there may be address of operand in some
cases
c)Addressing Mode:this is a way of specifying operand of an
instruction.
Ans
Register Mode:
in this adressing scheme(register addressing), operand is stored in
a general purpose register.instruction specifies a register and
this register contains operand.
Register Indirect mode:
in this case,instruction specifies a register and this register
contains the effective address of operand(operand is placed in
memory).
Base register addressing mode:
in this addressing scheme, the effective address is obtained by
adding the value of base register to the value of address field
Auto Indexed (increment mode):instruction specifies a register and
this register contains the effective address of operand.the content
of this register(address of operand) is automatically incremented
after accessing operand.now it can point to the next consecutive
memory location.
Auto indexed ( Decrement mode):
instruction specifies a register and this register contains the
effective address of operand.the content of this register(address
of operand) is automatically decremented before accessing
operand.now it can point to the previous consecutive memory
location.