Compile/run assembler in Linux?

后端 未结 8 1754
清歌不尽
清歌不尽 2020-12-22 18:05

I\'m fairly new to Linux (Ubuntu 10.04) and a total novice to assembler. I was following some tutorials and I couldn\'t find anything specific to Linux. So, my question is,

相关标签:
8条回答
  • 2020-12-22 18:37

    The GNU assembler (gas) and NASM are both good choices. However, they have some differences, the big one being the order you put operations and their operands.

    gas uses AT&T syntax (guide: https://stackoverflow.com/tags/att/info):

    mnemonic    source, destination
    

    nasm uses Intel style (guide: https://stackoverflow.com/tags/intel-syntax/info):

    mnemonic    destination, source
    

    Either one will probably do what you need. GAS also has an Intel-syntax mode, which is a lot like MASM, not NASM.


    Try out this tutorial: http://asm.sourceforge.net/intro/Assembly-Intro.html

    See also more links to guides and docs in Stack Overflow's x86 tag wiki

    0 讨论(0)
  • 2020-12-22 18:38

    3 syntax (nasm, tasm, gas ) in 1 assembler, yasm.

    http://www.tortall.net/projects/yasm/

    0 讨论(0)
提交回复
热议问题