Page 1 of 1

using gnu as for 16 bit code?

Posted: Mon Jan 05, 2009 2:32 pm
by yemista
Ok, from everything I read, as does not generate 16 bit code, so I wrote and assembled my bootloader with nasm. This is no big deal, but I will develop the rest of my OS with gnu as to interface gcc, so for the sake of consistency, Id rather have all my code written in ATT syntax rather than have the bootloader in intel and the rest in ATT. Does anyone know how to do this?

Re: using gnu as for 16 bit code?

Posted: Mon Jan 05, 2009 2:39 pm
by Alboin

Re: using gnu as for 16 bit code?

Posted: Mon Jan 05, 2009 5:32 pm
by CodeCat
As far as I know, GAS can emit 16 bit code as normal, but it's not necessarily 286-compatible code.

Re: using gnu as for 16 bit code?

Posted: Tue Jan 06, 2009 2:29 am
by JackScott
That's just a case of picking the right instructions, IIRC.