Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
946 views
in Technique[技术] by (71.8m points)

assembly - Translation from NASM to GAS

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

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 :)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

How about 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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...