我在Cygwin中使用gcc(在Windows7-64位中)运行此示例 http://asm.sourceforge.net/howto/build.html
.data # section declaration
msg:
.ascii "Hello, world!\n" # our dear string
len = .-msg # length of our dear string
.text # section declaration
# we must export the entry point to the ELF linker or
.global _start # loader. They conventionally recognize _start as their
# entry point. Use ld -e foo to override the default.
_start:
# write our string to stdout
movl $len,%edx # third argument: message length
movl $msg,%ecx # second argument: pointer …Run Code Online (Sandbox Code Playgroud)