1. Immediate addressing - the operand appears directly in the instruction. The operand can be #da
MOV A,#da
MOV DPTR,#
2. Indirect addressing - the unit address of the operand appears directly in the instruction. This addressing method can access the internal storage unit. It includes:
(1) Special function register address space. This is also the only addressing mode that can address special function registers (SFR, upper 128 bytes).
MOV A,P1
MOV TCON,A
(2) The lower 128 bytes of internal RAM
MOV A,76H
MOV A,43H
3. Register addressing
MOV A,R1
In this addressing mode, the contents of the register are the operands that can be used to access the current working register Rn, accumulator A, register B, bit accumulator C, and data pointer DPTR.
4. Register indirect addressing
In this mode, the content in the specified register is the address of the operand, and the content of the storage unit corresponding to the address is the operand. In this addressing mode, the register is actually an address pointer. The registers that can be used for register indirect addressing are R0, R1, SP, and DPTR. When accessing the internal data memory, the current working registers R0 and R1 are used as indirect addresses. In stack operations, SP is used as indirect address. When reading external RAM, register indirect addressing must be used.
5. Displacement addressing - The displacement addressing method uses the program pointer PC or the data pointer DPTR as the base register and the accumulator A as the displacement register. The contents of the two are added (i.e., the base address + offset) to form a 16-bit operand address, which is mainly used to access a byte solidified in the program register.
(1) Use the program pointer PC as the base address and A as the displacement to form the operand address: @A+PC.
Use the address of the next instruction being executed (PC always points to the next instruction to be executed) + the address of A
(2) Use the data pointer DPTR as the base address and A as the index to form the operand address: @A+DPTR.
6. Relative addressing - Use the current value of the program counter PC as the base address and add it to the added offset rel given by the second byte in the instruction to obtain the relative offset address.
7. Bit addressing - The bit addressing space can only be all the bits in the 20H~2FH byte address of the on-chip RAM (the bit address is 00H~7FH) and some SFR bits (the address can be divided by 8).
Previous article:[C51 code] Serial communication
Next article:[Assembly Learning Notes] MCS-51 Instruction Symbol Description
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- Home electronic scale made of object weight elastic strain sensor
- Design and implementation of wireless real-time storage system in Jiashijie
- EEWORLD University Hall ---- EMC pre-test environment construction
- Restraining the complexity of embedded system design
- Device Basics - The Impact of Capacitor Self-resonance Frequency on Selection
- Comparison of Several Overcurrent Protection Methods in Switching Power Supplies
- Soliciting opinions on opening the "Audio Technology" section
- [Zhongke Bluexun AB32VG1 RISC-V Evaluation Board] Try to use RTThread multitasking
- CC3200 wireless wifi processor full voice interactive control smart home system
- PCB design based on TPS5430 power chip