当前位置:网站首页>Learning notes of Microcomputer Principles - common addressing methods
Learning notes of Microcomputer Principles - common addressing methods
2022-07-27 19:03:00 【Miracle Fan】
Common addressing methods
List of articles
- Common addressing methods
- 1. Immediate addressing
- 2. Register addressing ( Register direct addressing )
- 3. Direct addressing ( Memory direct addressing )
- 4. Register indirection
- 5. Base addressing
- 6. Addressing
- 7. Proportional addressing
- 8. Base plus index register addressing
- 9. Base address plus proportional index addressing
- 10. Base address with displacement plus indexed addressing
- 11. Base address with displacement plus proportional index addressing
- 11. Base address with displacement plus proportional index addressing
1. Immediate addressing
The simplest way to address , Pass the immediate number directly to the destination operand .
MOV AX,9099H ; Send the immediate number to AX
2. Register addressing ( Register direct addressing )
The operand is stored in the corresponding register . Short instruction code , There is no need to fetch operands from memory , Fast execution
MOV EDX,EBX
INC CL
MOV DS,AX
3. Direct addressing ( Memory direct addressing )
Operands are stored in memory , But the effective address is given directly by the instruction .EA It is stored in the memory code segment together with the operation code
MOV AX,BUFFER ; Address BUFFER The operands in two consecutive byte addresses are sent to AX,BUFFER: The symbolic address of the storage unit in the memory .
// hypothesis BUFFER The offset address is 3000H,(DS)=5000H
MOV AX,DS:[3000H] ; The physical address 53000H The content in is sent to AL,53001H Send AH
Equivalent to :
MOV AX,[3000H];
In case of other segment registers , You need to add a transcendental prefix .
MOV AX,ES:[3000H];
4. Register indirection
Use the register to save the address of the storage unit , All storage units can be accessed through indirect addressing . namely Operands are stored in memory , But it's EA Stored in a register , From EA Read address , Then go to the corresponding address unit to find the corresponding content .
E A = [ Send save device ] EA=[ register ] EA=[ Send save device ]
#16 Bit addressing , The offset address is stored in SI,DI,BP and BX
#1. With SI、DI、BX Indirect addressing , The default operand is DS paragraph
MOV AX,[DI]
#2. With BP Indirect addressing , The default operand is SS(stack segment) paragraph
MOV DX,[BP]
# If the operand is in another segment , You need to prefix the instruction operand with a segment override .
5. Base addressing
E A = [ The base site Send save device ] + position move The amount EA=[ Base register ]+ Displacement EA=[ The base site Send save device ]+ position move The amount
16 Bit addressing defaults to :BX With DS As a segment register ;BP With SS As a segment register
MOV AX,[BP+24] ; Equivalent to MOV AX,24[BP]
It is applicable to the retrieval of array elements of one-dimensional array
6. Addressing
E A = [ The base site Send save device ] + position move The amount EA=[ Base register ]+ Displacement EA=[ The base site Send save device ]+ position move The amount
16 Bit addressing defaults to : only SI、DI As an index register , And the default is DS As a segment register
MOV AX,BUFFER[DI] ;BUFFER Is the offset equivalent to MOV AX,[DI+BUFFER]
It is applicable to the retrieval of array elements of one-dimensional array
7. Proportional addressing
E A = [ change site Send save device ] × Than example because Son + position move The amount EA=[ Index register ]\times The scaling factor + Displacement EA=[ change site Send save device ]× Than example because Son + position move The amount
MOV AX,TABLE[EBP*4]
Only applicable to 32 Bit addressing .
8. Base plus index register addressing
E A = [ The base site Send save device ] + [ change site Send save device ] EA=[ Base register ]+[ Index register ] EA=[ The base site Send save device ]+[ change site Send save device ]
It is generally stipulated that the base register determines which segment register is used as the base pointer .
MOV AX,[BP][SI] ; from SI The decision defaults to DS As a segment base register
It is often used for two-dimensional array retrieval and double loop
9. Base address plus proportional index addressing
E A = [ change site Send save device ] × Than example because Son + [ The base site Send save device ] EA=[ Index register ] \times The scaling factor +[ Base register ] EA=[ change site Send save device ]× Than example because Son +[ The base site Send save device ]
Only 32 A situation .
10. Base address with displacement plus indexed addressing
E A = [ change site Send save device ] + [ The base site Send save device ] + position move The amount EA=[ Index register ]+[ Base register ]+ Displacement EA=[ change site Send save device ]+[ The base site Send save device ]+ position move The amount
MOV AX,[BX+DI+MASK]
This addressing operation is mainly used for two-dimensional array operations , The displacement is the starting address of the array .
11. Base address with displacement plus proportional index addressing
E A = [ change site Send save device ] × Than example because Son + [ The base site Send save device ] + position move The amount EA=[ Index register ]\times The scaling factor +[ Base register ]+ Displacement EA=[ change site Send save device ]× Than example because Son +[ The base site Send save device ]+ position move The amount
$
MOV AX,[BX+DI+MASK]
This addressing operation is mainly used for two-dimensional array operations , The displacement is the starting address of the array .
11. Base address with displacement plus proportional index addressing
E A = [ change site Send save device ] × Than example because Son + [ The base site Send save device ] + position move The amount EA=[ Index register ]\times The scaling factor +[ Base register ]+ Displacement EA=[ change site Send save device ]× Than example because Son +[ The base site Send save device ]+ position move The amount
边栏推荐
- Unity学习笔记(刚体-物理-碰撞器-触发器)
- 大冤种们,新进测试行业,如何正确选择意向企业?
- I'm stupid. When completable future is used with openfegin, it even reports an error
- Blog Garden beautification tutorial
- Interceptor拦截器
- 地图找房的实例
- MySQL 04 advanced query (II)
- Music rhythm colorful gradient lamp chip -- dlt8s04a- Jericho
- C interface knowledge collection suggestions collection
- Nacos display service registration address error
猜你喜欢
随机推荐
How to send external mail to the company mailbox server on the Intranet
Hash、Set、List、Zset、BitMap、Scan
Bathroom with demister vanity mirror touch chip-dlt8t10s
npm、cnpm 淘宝镜像
Multifunctional wireless remote control moxibustion instrument chip dltap703sd
汇编语言入门基础(1)
Redis注解
Matplotlib (basic usage)
个人中心--订单业务流程
贪心法,拟阵和亚模函数(refer)
Kinect for Unity3d----KinectManager
Order timeout cancellation and commodity query by category
C basic concepts list description suggestions collection
【微信小程序】项目实战—抽签应用
Aircraft battle with enemy aircraft
Typescript installation
文件的上传和下载
如何用自动化测试搞垮团队
Extension of regular expression
大冤种们,新进测试行业,如何正确选择意向企业?









