本文介绍了从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 :)
推荐答案
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的翻译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!