从NASM到GAS的翻译 [英] Translation from NASM to GAS

查看:166
本文介绍了从NASM到GAS的翻译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将mov [ebx], al从NASM转换为GAS? 我尝试了mov %al, (%ebx),但确实出现了段错误.

how do I translate mov [ebx], al from NASM to GAS? I tried mov %al, (%ebx) but it does segmentatiob fault.

另一个问题,可以说我在GAS中有一个数组.lcomm array, 50 我是否必须像这样在array中放入美元($)标记:mov %rbx, $array还是不需要?

Another question, lets say I have an array in GAS .lcomm array, 50 Do I have to put a dollar($) sign in array like this: mov %rbx, $array or need not to?

任何答案都会有所帮助:)

Any answer would be helpful :)

推荐答案

intel2gas ?

usage: intel2gas [options] [-o outfile] [infile]
where options include:
    -h        this help
    -i        convert from intel to at&t format (default)
    -g        convert from at&t to intel format
    -m -t     convert from masm/tasm to at&t format
    -c        understand C style comments
    -I        convert inline assembler (intel to at&t only)
    -d        output all % chars as %%
    -V        show version
    infile and outfile default to stdin/stdout

这篇关于从NASM到GAS的翻译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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