The operand is in memory and its effective address is a base register (BX, BP) or an index register (SI, D
I) and the 8-bit/16-bit offset in the instruction. The calculation formula for its effective address is shown in the formula.
Without using the segment override prefix, the following provisions apply:
If the effective address is specified by one of SI, DI, and BX, the default segment register is DS;
if the effective address is specified by BP, the default segment register is SS.
The 8-bit/16-bit offset given in the instruction is represented by a complement code. When calculating the effective address, if the offset is 8 bits, it is sign-extended to 16 bits. When the effective address obtained exceeds 0FFFFH, its 64K modulus is taken.
Example: Assume the instruction: MOV BX, [SI+100H]. When it is executed, (DS)=1000H, (SI)=2345H, and the content of memory unit 12445H is 2715H. What is the value of BX after the instruction is executed?
Solution: According to the rules of register relative addressing mode, when executing this instruction, the effective address EA of the source operand is:
EA=(SI)+100H=2345H+100H=2445H.
The physical address of the operand should be formed by the values of DS and EA, that is:
PA=(DS)*16+EA=1000H*16+2445H=12445H.
Therefore, the execution effect of this instruction is: the value of a word starting from the physical address 12445H is transferred to BX.
The execution process is shown in the figure.
Previous article:Seven addressing modes (base address plus index addressing mode)
Next article:Seven addressing modes (register indirect addressing mode)
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Talk about the "obstacles" on the road to power supply upgrade
- How to do switch detection in TWS headset design
- FAQ|Littelfuse Live: How to improve the safety and reliability of smart building electronic equipment in the era of the Internet of Things
- How to measure the output ripple of a single-phase inverter with an oscilloscope
- No color difference splicing screen
- Analysis of optimization methods for overcrowded solder joints in PCB design
- FPGA design clean code is a core skill for programmers
- Toshiba DC motors and stepper motors make your motors smarter!
- Xilinx Vivado Quick Start - HDL Flow - Contains videos, projects and Chinese version documents
- 【Share】WB-Alibaba Cloud IoT Device Simulator