我正在关注教程和学习x64英特尔语法大会和我有这个代码示例,假设编译没有问题,但我得到错误,所以我无法开始。NASM ASM没有正确编译?
代码示例:
.code
ASM_Debug proc
mov rax, 55
ret
ASM_Debug endp
end
我使用NASM组件编译器,使用MinGW的(G ++)代码编译,如果我编译使用内联组件使用64英特尔语法MASM我不得到任何错误。
有人能告诉我我需要做什么吗?,什么是正确的NASM命令行来编译此代码,以便我可以开始学习。由于
我现在命令行是:nasm.exe -f ELF64 Foo.asm -o foo.o的
PS:我不使用Visual Studio IDE发展,我不想听关于它的一切。
PS2:我正在开发/工作于/为Windows操作系统,而不是Linux。
编译错误:
CoreASM.asm:1: warning: label alone on a line without a colon might be in error [-w+orphan-labels]
CoreASM.asm:1: error: attempt to define a local label before any non-local labels
CoreASM.asm:2: error: parser: instruction expected
CoreASM.asm:5: error: symbol `ASM_Debug' redefined
CoreASM.asm:5: error: parser: instruction expected
CoreASM.asm:6: warning: label alone on a line without a colon might be in error [-w+orphan-labels]