Question Problem compiling binary file with NASM ?

Status
Not open for further replies.
Dec 31, 2023
1
1
10
Hello!I am trying to complile a .asm file to a .o file(binary)

I have downloaded nasm:

I open the NASM shell:

Code:
...\AppData\Local\bin\NASM>nasm -f elf32 kernel.asm -o kasm.o
kernel.asm:5: error: parser: instruction expected

...\AppData\Local\bin\NASM>nasm -f elf32 kernel.asm
kernel.asm:5: error: parser: instruction expected

...\AppData\Local\bin\NASM>nasm kernel.asm
kernel.asm:5: error: parser: instruction expected

I have copied out my file into the bin directory.

But it prints out the above message. I typed in "help" to see the available instructions but nasm isn't anywhere to be found ?
 
  • Like
Reactions: glasierinc
And what have you done to troubleshoot this?

Your problem is somewhere within the first 5 lines of "kernel.asm".

It's very likely that the source isn't fully syntax compatible with NASM and will either need another assembler (likely MASM) or make appropriate changes to the source.
 
  • Like
Reactions: glasierinc
Status
Not open for further replies.