Presentation is loading. Please wait.

Presentation is loading. Please wait.

Under http://www.edsim51.com/8051Notes/index.html Address Modes Source: http://www.edsim51.com/8051Notes/8051/instructionSetSummary.html under http://www.edsim51.com/8051Notes/index.html.

Similar presentations


Presentation on theme: "Under http://www.edsim51.com/8051Notes/index.html Address Modes Source: http://www.edsim51.com/8051Notes/8051/instructionSetSummary.html under http://www.edsim51.com/8051Notes/index.html."— Presentation transcript:

1 under http://www.edsim51.com/8051Notes/index.html
Address Modes Source: under

2 What does an assembly instruction do?
Instructions tell the processor which operation to carry out. For example, the instruction MOV A, #5EH tells the processor to move the data 5EH to the accumulator.

3 Instructions result in the processor performing some operation on some data (the data being 5EH in the example above). The instruction above (i.e., MOV A, #5EH) is an example of what's known as immediate addressing. The reason for this is because the data 5EH immediately follows the instruction in code memory.

4 Address Modes The available ways of how a processor accesses data from registers or memory are called the “address modes”. The following are the address modes provided for 8051 processor: Immediate Register Direct Indirect Indexed Relative Absolute Long

5 “Immediate” address mode
The machine code of “MOV A, #5EH” is “74H, 5EH” stored at addresses 0000H and 0001H. The datum “5EH” is stored immediately after the opcode “74H”.

6 “Register” address mode

7 “Direct” address mode

8 Quiz: what are the address modes in “MOV 65H,#43H”
Q: What are the address modes? Q: How does the datum flow?

9 “Indirect” address mode
In the indirect address mode, R0 and R1 are used as pointer registers. With the indirect address mode, the source or destination address can be altered while the program is running. With the direct address mode, the source or destination address can be altered while the program is running.

10 “Indexed” address mode
MOVC

11 “Indexed” address mode
MOVC

12 “Relative” address mode

13 “Absolute” address mode

14 “Long” address mode

15

16


Download ppt "Under http://www.edsim51.com/8051Notes/index.html Address Modes Source: http://www.edsim51.com/8051Notes/8051/instructionSetSummary.html under http://www.edsim51.com/8051Notes/index.html."

Similar presentations


Ads by Google