assembly - I get a different result with mul instruction in assembly
问题描述
I have this set of instructions in assembly.
mov ax,0055h
mov bx,11AAh
mul al
xchg ax,bx
not ax
neg bx
I don't understand the mul instruction in third line.If I do 0055h*11AAh I get 5DD72 but it's not correct because with a program I get in AX 1C39.How ? What's the procedure?
I know that AX and BX are 16 bit registers and my result should be on 32 bit and the result is on DX:AX
解决方案
的单参数形式将根据操作数大小将参数与///mul
相乘,并将结果相应地存储在///中。al
ax
eax
rax
ax
dx:ax
edx:eax
rdx:rax
mul al
将乘以al
并将al
结果存储在ax
. 你想要mul bx
。
推荐阅读
- javascript - cloudinary 在尝试上传图像时返回一个空对象 + 图像未上传(快速服务器)
- python - 如何在rest框架django的响应中设置每个项目的类别?
- googletest - 分离 Google 测试文件以调试 C 代码
- c++ - gcc 中缺少 __cpp_lib_generic_unordered_lookup 功能测试宏
- django - 使用 SSL_REDIRECT = True 后,无法在 Django 中通过 HTTPS 重定向网站
- ios - 如何解决:iOS 15.0 中已弃用“windows”
- macvim - 消息未出现在我的 MacVim 启动屏幕中
- wordpress - Google Page Insights:避免多个页面重定向
- c# - 当 DatagridView 中的日期与今天的日期匹配时显示输出
- python - 两种不同的类继承方式,有什么区别?