Popular Posts
- Instruction Set Summary (Logical Operations)
- What is Assembly Language?
- QUIZ #1: Arithmetic and Logical Instructions (ANSWERS)
- Addressing Modes
- How to Understand Hexadecimal Part 1
- Addressing Modes and Instruction Set (Part 1) PDF file
- Instruction Set Summary (Arithmetic Operations)
- How to Understand Hexadecimal Part 2
- Hello random stranger! :)
- Thank You Points!!!!! (updated)
nice one
ReplyDeleteHi ma'am hannah. What is the main purpose of the addressing modes? and why does it has 5 different addressing modes?
ReplyDeletehi Jen! The way an operand is specified is known as its addressing modes. It helps the programmer to store or retrieve the data which is stored in any part of the data memory. the 8051 microcontroller is designed to 5 addressing modes that's why it has 5 :) Hope this helps!
DeleteIt is not yet clear to me the function of the indexed addressing mode, Ma'am. Yeah :)
ReplyDeleteThe address of the operand is obtained by adding the contents of the general register (called index register) a constant value. The number of the index register and the constant value are included in the instruction code. Index Mode is used to access an array whose elements are in successive memory locations. The content of the instruction code, represents the starting address of the array and the value of the index register, and the index value of the current element. By incrementing or decrementing index register different element of the array can be accessed.
DeleteFor example, our data pointer (DPTR) is in address 0054H. and our accumulator has the immediate value of 02H. When we execute the instruction:
MOV A, @A+DPTR
We first add A and DPTR. So we add 0054H and 02H we now have 0056H. Meaning, whatever value is stored in the address 0056H, we will move it to the accumulator. So if 0056H has the value of 0AH, our accumulator will now have a value 0f 0AH. Hope this helps!
Ma'am ano po ito Autoincrement /Autodecrement Mode and Displacement Mode?
ReplyDelete