当前位置:网站首页>汇编语言(7)运算指令
汇编语言(7)运算指令
2022-06-26 10:48:00 【Day-3】
1 mul乘
assume cs:code
code segment
main proc
mov ax,5
mov bx,2
mul bx
MOV AX,4C00H
INT 21H
main endp
start:call main
code ends
end start
mul后写一个寄存器,另外的一个自动调用ax,结果存到ax中,如果大于16位则存在DX:AX中。
2 div除
assume cs:code
code segment
main proc
mov ax,5
mov bx,2
div bx
MOV AX,4C00H
INT 21H
main endp
start:call main
code ends
end start
ax存储商,dx存储余数。
3 位运算
xor异或 两个操作数,放到第一个操作数里
and 与 两个操作数,放到第一个操作数里
or或 两个操作数,放到第一个操作数里
not取反 一个操作数
4 移位指令
在汇编中移位命令有很多,左移右移都有不同的类型。
左移
左移有 SHL(逻辑左移)、SAL(算术左移) ,两者都是左移,都使用 0 来填充移位产生的空位。两者没有区别。
左移还有 ROL(循环左移)、RCL(带进位循环左移),循环左移,顾名思义循环着左移的;带进位的循环左移,即移位产生的 “ 溢出 ” 位移入 CF 中,原 CF 中的值移入数中。
右移
右移有 SHR(逻辑右移)、SAR(算术右移),算术右移产生的位置使用符号位填充;逻辑右移使用 0 填充。
右移还有 ROR(循环右移)、RCR(带进位循环右移),类似于左移的循环与带进位循环。
边栏推荐
- 代码规范 & 详细解释 husky、prettier、eslint、lint-staged 的作用和使用
- Easyx----- C language implementation 2048
- nacos2.x.x启动报错信息Error creating bean with name ‘grpcClusterServer‘;
- DD command tests the read and write speed of Huawei Kunpeng & Hongshan solid state storage disk
- FastRCNN
- 【北邮果园微处理器设计】10 Serial Communication 串口通信笔记
- 机器学习深度神经网络——实验报告
- 4、 Stacks and queues
- Grain Mall - High Availability Cluster
- Is it safe to open a stock account by mobile phone
猜你喜欢

Machine learning linear regression - Experimental Report

c语言 --- 运算符和表达式

Cet article présente la moyenne mobile quadratique linéaire et le fonctionnement simple d'Excel pour réaliser la prédiction des séries chronologiques dans la modélisation.

Black squares in word

April 13, 2021 interview with beaver family

Machine Learning Clustering - Experimental Report

QT connection MySQL data query failed

统计遗传学:第二章,统计分析概念

有手就行的移动平均法、指数平滑法的Excel操作,用来时间序列预测

Machine learning LDA - Experimental Report
随机推荐
Easyx----- C language implementation 2048
Basic use of express in nodejs
matlab 编程实例: 如何统计元胞数组中元素的数量
flannel的host-gw与calico
Sqli labs range 1-5
Unity使用SteamVRPlugin时如何不让其他Camera位置和旋转收到SteamVRPlugin控制
PC QQ大厅 上传更新 修改versionInfo
Machine learning linear regression - Experimental Report
Machine learning SVM - Experimental Report
FasterRCNN
Dynamic programming to solve stock problems (Part 2)
MySQL Performance Monitoring and SQL statements
哈希表的前置知识---二叉搜索树
我想知道同花顺是炒股的么?手机开户安全么?
UDP Flood攻击防御原理
9、 Beautify tables, forms, and hyperlinks
机器学习深度神经网络——实验报告
Machine Learning Clustering - Experimental Report
LeetCode 710 黑名单中的随机数[随机数] HERODING的LeetCode之路
Excel operation of manual moving average method and exponential smoothing method for time series prediction