Yasm 使用 intel 语法编译 64 位代码 [英] Yasm compiling 64 bit code with intel syntax

查看:37
本文介绍了Yasm 使用 intel 语法编译 64 位代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个文件:

.code64
pop %rbx

使用带有以下指令的 yasm 可以很好地编译:

that compiles nicely with yasm with the following directive:

yasm.exe asm.asm -o asm.bin -m amd64 --parser=gas

我的问题是:有没有办法使用 nasm 解析器通过使用 intel 语法来编译 64 位代码?我真的不喜欢 AT&T 语法

my question is: is there any way to use nasm parser to compile 64 bit code by using intel syntax? I don't really like AT&T syntax

推荐答案

参见 关于 BITS 指令的 yasm 手册.

bits 64
pop rbx

yasm.exe asm.asm -o asm.bin -m amd64

这篇关于Yasm 使用 intel 语法编译 64 位代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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