当前位置:网站首页>GNU assembly basic mathematical equations multiplication
GNU assembly basic mathematical equations multiplication
2020-11-10 08:45:00 【osc_uie90flw】
List of articles
brief introduction
Multiplication is an important operation in integer operation . What's different from addition and subtraction is , Multiplication is not the same for signed and unsigned integer operators .
Use mul To perform an operation without sign
MUL The command is used to multiply two unsigned integers .MUL The multiplication is as follows :
mul source
among source It can be 8 Bit , It can also be 16 Bit , It can also be 32 Bit .
here source It's the multiplier , And the value of the multiplier comes from EAX register .
example :
.code32
.section .data
data1:
.int 10
data2:
.int 20
answer:
.quad 0
output:
.asciz "The result is %qd\n"
.section .text
.globl _start
_start:
nop
movl data1,%eax
mull data2
movl %eax, answer
movl %edx,answer+4
pushl %edx
pushl %eax
pushl $output
call printf
add $12,%esp
pushl $0
call exit
as -o multest.o multest.s -gstabs --32
ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o multest -L/lib -lc multest.o
The result is finally put in EDX and EAX Combined 8 Byte content , among EDX It's the high place where the results are stored ,EAX The low position of the result .
Use imul Do signed operations
版权声明
本文为[osc_uie90flw]所创,转载请带上原文链接,感谢
边栏推荐
- 【技术教程】Visual Studio 2017自建WebRTC中peerconnection_client程序报LNK2019 无法解析的外部符号错误
- 商品管统——采购需求合并到采购单
- If you need a million objects
- [leetcode] 92 integer inversion
- [paper reading notes] large scale heterogeneous feature embedding
- Graph undirected graph
- CSDN bug11: to be added
- csdn bug4:待加
- Difficulties in heterogeneous middleware implementation of Bifrost site management (1)
- 推动中国制造升级,汽车装配车间生产流水线3D可视化
猜你喜欢
![[论文阅读笔记] RoSANE, Robust and scalable attributed network embedding for sparse networks](/img/32/7f28d78caa3cbc2b60cea26a768797.jpg)
[论文阅读笔记] RoSANE, Robust and scalable attributed network embedding for sparse networks
![Collection of blockchain theory [31]](/img/3b/00bc81122d330c9d59909994e61027.jpg)
Collection of blockchain theory [31]

CSDN bug3: to be added

Wu Enda's refining notes on machine learning 4: basis of neural network - Zhihu

注册滴滴加不上车怎么办?要怎么处理?

编码风格:Mvc模式下SSM环境,代码分层管理

Fire knowledge online answer activity small program

Python cookbook 3rd note (2.1): using multiple qualifiers to split strings

CSDN bug6: to be added

区块链论文集【三十一】
随机推荐
分布式文档存储数据库之MongoDB索引管理
Coding style: SSM environment in MVC mode, code hierarchical management
Learning from scratch YoMo series: Opening
lodash.js源码-flatten
day85:luffy:购物车根据有效期不同切换价格&购物车删除操作&价格结算&订单页面前戏
Notes on Python cookbook 3rd (2.2): String start or end match
If you need a million objects
吴恩达《Machine Learning》精炼笔记 4:神经网络基础 - 知乎
对于程序员,那些既陌生又熟悉的计算机硬件
利用尾巴作为时间序列进行处理来识别鲸鱼
编码风格:Mvc模式下SSM环境,代码分层管理
网络安全工程师演示:原来***是这样控制你的服务器的!(下)
【技术教程】Visual Studio 2017自建WebRTC中peerconnection_client程序报LNK2019 无法解析的外部符号错误
gnu汇编-基本数学方程-乘法
The length of the last word in leetcode
csdn bug9:待加
接缝雕刻算法:一种看似不可能的图像大小调整方法
Getiservicemanager () source code analysis
Thinking about competitive programming: myths and shocking facts
Commodity management - merge purchase demand into purchase order