Posts

Showing posts from October, 2017

#35 8051 Addressing modes

8051 Addressing modes Lets begin this article with a simple question.  “What is an addressing mode ? “ . A simple question always has a simple answer too. Addressing mode is a way to address an operand.  Operand means the data we are operating upon (in most cases source data). It can be a direct address of memory, it can be register names, it can be any numerical data etc. I will explain this with a simple data move instruction of 8051. MOV A,#6AH Here the data 6A is the operand, often known as source data. When this instruction is executed, the data 6AH is moved to accumulator A. There are 5 different ways to execute this instruction and hence we say, we have got 5 addressing modes for 8051. They are  1)   Immediate addressing mode   2)   Direct addressing mode  3) Register direct addressing mode   4)   Register indirect addressing mode  5)  Indexed addressing mode . Immediate Addressing Mode Let’s b...