Bare Bones boot.s compiling

Programming, for all ages and all languages.
Post Reply
judolambchopranpig
Posts: 2
Joined: Fri Dec 09, 2016 6:19 pm
Libera.chat IRC: SuperNovaa41

Bare Bones boot.s compiling

Post 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:

Code: Select all

mov $stack_top, %esp
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?
User avatar
iansjack
Member
Member
Posts: 4685
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Bare Bones boot.s compiling

Post 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.)
NunoLava1998
Member
Member
Posts: 273
Joined: Sun Oct 09, 2016 4:38 am
Libera.chat IRC: NunoLava1998

Re: Bare Bones boot.s compiling

Post 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.
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.

https://github.com/NunoLava1998/DixiumOS
judolambchopranpig
Posts: 2
Joined: Fri Dec 09, 2016 6:19 pm
Libera.chat IRC: SuperNovaa41

Re: Bare Bones boot.s compiling

Post 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!
Post Reply