OSDev.org
https://forum.osdev.org/

Bare Bones boot.s compiling
https://forum.osdev.org/viewtopic.php?f=13&t=31064
Page 1 of 1

Author:  judolambchopranpig [ Fri Dec 09, 2016 6:25 pm ]
Post subject:  Bare Bones boot.s compiling

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:
mov $stack_top, %esp


ERROR:
Code:
$ 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?

Author:  iansjack [ Sat Dec 10, 2016 3:16 am ]
Post subject:  Re: Bare Bones boot.s compiling

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.)

Author:  NunoLava1998 [ Sat Dec 10, 2016 4:51 am ]
Post subject:  Re: Bare Bones boot.s compiling

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.

Author:  judolambchopranpig [ Sat Dec 10, 2016 9:19 am ]
Post subject:  Re: Bare Bones boot.s compiling

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!

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/