得到EAX寄存器的上半部分 [英] Get the upper half of the EAX register

查看:123
本文介绍了得到EAX寄存器的上半部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在x86汇编语言,有没有什么办法来获得的 EAX 寄存器的上半部分?我知道 AX 寄存器已经包含的 EAX 注册下半部分,但我还不知道的任何方式来获取上半部分

我知道 MOV BX,AX EAX 的下半部移动到 BX ,但我想知道如何 EAX 的上半部分移动到 BX 为好。


解决方案

  ROL EAX,16
MOV BX,AX
ROL EAX,16

In x86 assembly language, is there any way to obtain the upper half of the EAX register? I know that the AX register already contains the lower half of the EAX register, but I don't yet know of any way to obtain the upper half.

I know that mov bx, ax would move the lower half of eax into bx, but I want to know how to move the upper half of eax into bx as well.

解决方案

rol eax, 16
mov bx, ax
rol eax, 16

这篇关于得到EAX寄存器的上半部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆