[编译环境][gas]addr32和data32指令

在grub2的文件acinclude.m4文件中有这样两段话:

Older versions of GAS interpret “.code16” to mean “generate 32-bit instructions, but implicitly insert addr32 and data32 bytes so that the code works in real mode”.

Newer versions of GAS interpret “.code16” to mean “generate 16-bit instructions”, which seems right. This requires the programmer to explicitly insert addr32 and data32 instructions when they want them.

这两段话的中文意思是:

旧版本的GAS把”.code16”解释为“生成32位指令,但是隐式地插入addr32(Address-Size Prefix 67H)和data32(Operand-Size Prefix 66H)指令来使代码工作在实模式下”。

新版本得GAS把”.code16”解释为“生成看似正确的16位指令”。这要求,当程序员想要使用32位得地址或是数据时,自己显示地插入addr32和data32指令。

示例如下:

    .code16
l1:
    addr32 movb %al, l1
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值