Page 1 of 1
Bare Bones boot.s compiling
Posted: Fri Dec 09, 2016 6:25 pm
by judolambchopranpig
I've been trying to get a start in os development and I was testing out the Bare Bones tutorial but there was an issue.
Boot.s wouldn't compile.
Line 56:
ERROR:
Code: Select all
$ i686-elf-as boot.s -o boot.o
boot.s: Assembler messages:
boot.s:56: Error: no instruction mnemonic suffix given and no register operands; can't size instruction
What would I do to get this working?
Re: Bare Bones boot.s compiling
Posted: Sat Dec 10, 2016 3:16 am
by iansjack
Clearly the error message is wrong as there is a register operand in that line (%esp).
That leads me to believe that there must be an error in your source code. Check it carefully to make sure there are no spaces or hidden characters where there shouldn't be.
I have just cut-and-pasted the source from the wiki and it assembles just fine on my system. (It actually consists of just 5 instructions.)
Re: Bare Bones boot.s compiling
Posted: Sat Dec 10, 2016 4:51 am
by NunoLava1998
iansjack wrote:Clearly the error message is wrong as there is a register operand in that line (%esp).
That leads me to believe that there must be an error in your source code. Check it carefully to make sure there are no spaces or hidden characters where there shouldn't be.
I have just cut-and-pasted the source from the wiki and it assembles just fine on my system. (It actually consists of just 5 instructions.)
It does work on my system, too.
My idea was that the GCC was not made correctly.
If you're running Windows, you can use ghost-i686-elf-tools.
Re: Bare Bones boot.s compiling
Posted: Sat Dec 10, 2016 9:19 am
by judolambchopranpig
iansjack wrote:Clearly the error message is wrong as there is a register operand in that line (%esp).
That leads me to believe that there must be an error in your source code. Check it carefully to make sure there are no spaces or hidden characters where there shouldn't be.
I have just cut-and-pasted the source from the wiki and it assembles just fine on my system. (It actually consists of just 5 instructions.)
I retyped the code without the comments, it was probably just some commenting whitespace error. Thanks mate!