Yasm compiling 64 bit code with intel syntax

試著忘記壹切 提交于 2020-01-24 20:26:06

问题


I have this file:

.code64
pop %rbx

that compiles nicely with yasm with the following directive:

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

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


回答1:


See the yasm manual about the BITS directive.

bits 64
pop rbx
yasm.exe asm.asm -o asm.bin -m amd64


来源:https://stackoverflow.com/questions/14217080/yasm-compiling-64-bit-code-with-intel-syntax

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!