siggivara 0 Newbie Poster

I'm no assembly wizard, but I'm writing a bootloader and I get a few compile/assembler errors I haven't been able to find a solution to:

Heres the error messages and the code that it applies to:

os_size:
	.word	0
	.word	0

lea     %ax,os_size   # Error: suffix or operands invalid for `lea'
idivw   %bx,$512      # Error: suffix or operands invalid for `idiv'
movw    $2,%ah        # Error: `%ah' not allowed with `movw'
movw    %ax,%al       # Error: suffix or operands invalid for `mov'
ljmp    %bx:%ds       # Error: junk `:%ds' after register

Compiling with:
gcc -Wall -g -m32 -c -fomit-frame-pointer -O2 -fno-builtin bootblock.s

Tried on RedHat 64-bit and Ubuntu 32-bit. Get same errors on both.