当前位置:网站首页>第八章-数据处理的两个基本问题
第八章-数据处理的两个基本问题
2022-06-12 08:42:00 【皮卡乒的皮卡乓】
数据处理的两个基本问题
引言
- reg(寄存器)集合:ax、bx、cx、dx、ah、al、bh、bl、ch、cl、dh、dl、sp、bp、si、di;
- sreg(段寄存器)集合:ds、ss、cs、es(扩展段)
8.1 bx、si、di、bp
- 可以用作[bp]
- 四个组合只能如下出现:bx和si、bx和di、bp和si、bp和di
- 如果没有直接给出bp的段地址、段地址默认在ss
8.2机器指令处理的数据所在位置
指令执行前,所要处理的数据可以在三个地方:CPU内部、内存、端口

idata (立即数)
寄存器
段地址SA和偏移地址EA
8.3汇编语言中数据位置的表达
- 显性的给出存放段地址的寄存器
- 存放段地址的寄存器是默认的
8.4寻址方式

8.5 指令要处理的数据有多长?
byte---- 8位
word—16位
高位地址指向高字节
通过寄存器名指明要处理的数据的尺寸
操作符X ptr指明内存单元的长度
mov word ptr ds:[0],1 #所以ds:[0]存放的是0001H
mov byte ptr ds:[0],1 #所以ds:[0]存放的是01H
其他方法
- push[1000H]就不用指明访问的是什么数据,因为push指令只进行字操作。
8.6寻址方式的综合应用
8.7div指令
- 除法指令,除数在内存单元或者寄存器,被除数在AX或DX和AX中
| 除数 | 被除数 |
|---|---|
| 8位 | 16位(AX) |
| 16位 | 32位(DX+AX) |
除数如果是8位,商在AL,余数在AH
除数如果是16位,商在AX,余数在DX
指令格式
div reg
div 内存单元
div byte ptr ds:[0]#(al)=(ax)/((ds)*16+0)的商,(ah)=(ax)/((ds)*16+0)的余数
div word ptr es:[0]#(ax)=[(dx)*100000H+(ax)]/((ds)*16+0)的商,(dx)=[(dx)*100000H+(ax)]/((ds)*16+0)的商,
8.8伪指令dd
data segment
db 1
dw 1
dd 1
data ends
在data段中定义了三个数据:
第一个数据为01H,在data:0处,占1个字节;
第二个数据为0001H,在data:1处,占1个字;
第三个数据为00000001H,data:3处,占2个字节;
8.9dup
db 重复的次数 dup(重复的字节型数据)
db 3 dup(0)#定义了3个字节,它们的值都是0,相当于db,0,0,0
db 3 dup(0,1,2)#定义了9个字节,它们是0、1、2、0、1、2、0、1、2
db 3 dup('abc','ABC')#定义18个字节,它们是'abcABCabcABCabcABC'
边栏推荐
- 动态线段树leetcode.699
- Background color translucent
- Judge whether the object is empty
- (p17-p18) define the basic type and function pointer alias by using, and define the alias for the template by using and typedef
- 调整svg宽高
- Where does the driving force of MES system come from? What problems should be paid attention to in model selection?
- Get last month, current time and next month
- [advanced pointer I] character array & array pointer & pointer array
- 【进阶指针一】字符数组&数组指针&指针数组
- 正则校验用户名
猜你喜欢

MPLS的原理与配置

QT realizes multi screen and multi-resolution adaptation

Oracle installation details (verification)

Background color translucent

【动态内存管理】malloc&calloc和realloc和笔试题和柔性数组

FDA reviewers say Moderna covid vaccine is safe and effective for children under 5 years of age

Hands on learning and deep learning -- a brief introduction to softmax regression

What is the quality traceability function of MES system pursuing?

Graphic analysis of viewbox in SVG

Union selector
随机推荐
Shell basic syntax -- array
API处理Android安全距离
Specify 404 and 500 error reporting pages.
(p17-p18) define the basic type and function pointer alias by using, and define the alias for the template by using and typedef
Background location case 1
Where does the driving force of MES system come from? What problems should be paid attention to in model selection?
Website colab and kaggle
MES helps enterprises to transform intelligently and improve the transparency of enterprise production
ctfshow web3
When converting tensor to ndarray in tensorflow, the run or Eval function is constantly called in the loop, and the code runs more and more slowly!
安科瑞消防应急照明和疏散指示系统
Hands on deep learning -- concise implementation code of weight decay
Hands on deep learning -- activation function and code implementation of multi-layer perceptron
Handling abnormal data
Hands on learning and deep learning -- simple implementation of softmax regression
(p21-p24) unified data initialization method: List initialization, initializing objects of non aggregate type with initialization list, initializer_ Use of Lisy template class
Install iptables services and open ports
(P13) use of final keyword
报错:清除网站内搜索框中的历史记录?
js实现页面加载后再刷新一次