当前位置:网站首页>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
边栏推荐
猜你喜欢
MySQL create event execution task

商品推荐和分类商品推荐

MySQL 04 advanced query (II)

Kinect2 for Unity3D——AvatarDemo学习

连续时间系统的性能分析(1)-控制系统性能指标及一二阶分析

Docker - docker installation, MySQL installation on docker, and project deployment on docker

CMD command

Commodity comment information and comment information classification

Household mute mosquito repellent lamp chip-dltap703sd-jericho

如何用自动化测试搞垮团队
随机推荐
CMD command
C basic concepts list description suggestions collection
C interface knowledge collection suggestions collection
C#与Mysql数据库交互-Mysql配置及增删查改操作
大冤种们,新进测试行业,如何正确选择意向企业?
TypeScript安装
个人中心--订单业务流程
贪心法,拟阵和亚模函数(refer)
SSM项目使用过滤器实现登录监听
C file and folder input / output stream code
ridis命令笔记
MySQL 03 advanced query (I)
Acquisition data transmission mode and online monitoring system of vibrating wire wireless acquisition instrument for engineering instruments
CMD 命令
【微信小程序】项目实战—抽签应用
[wechat applet] project practice - lottery application
Day 3 of leetcode question brushing
Commodity comment information and comment information classification
Product recommendation and classified product recommendation
Openstack login dashboard prompt authentication error