I am following a tutorial and learning x64 Intel Syntax Assembly and I have this code sample that suppose to compile without issues but I am getting errors, so I cannot get started.
Code sample:
.code
ASM_Debug proc
mov rax, 55
ret
ASM_Debug endp
end
I am using NASM assembly compiler, using MinGW (G++) code compiler, if I compile using inline assembly using x64 Intel Syntax MASM I don't get any errors.
Could someone tell me what do I need to do?, what is the correct NASM command line to compile this code so I could get started learning. Thanks
My current command line is: nasm.exe -f elf64 Foo.asm -o Foo.o
PS: I am NOT using Visual Studio IDE for development, I don't want to hear anything about it.
PS2: I am developing/working on/for Windows OS, NOT Linux.
Compilation errors:
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]