using gnu as for 16 bit code?

Programming, for all ages and all languages.
Post Reply
User avatar
yemista
Member
Member
Posts: 299
Joined: Fri Dec 26, 2008 12:31 pm
Location: Boston
Contact:

using gnu as for 16 bit code?

Post 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?
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Re: using gnu as for 16 bit code?

Post by Alboin »

C8H10N4O2 | #446691 | Trust the nodes.
CodeCat
Member
Member
Posts: 158
Joined: Tue Sep 23, 2008 1:45 pm
Location: Eindhoven, Netherlands

Re: using gnu as for 16 bit code?

Post by CodeCat »

As far as I know, GAS can emit 16 bit code as normal, but it's not necessarily 286-compatible code.
User avatar
JackScott
Member
Member
Posts: 1031
Joined: Thu Dec 21, 2006 3:03 am
Location: Hobart, Australia
Contact:

Re: using gnu as for 16 bit code?

Post by JackScott »

That's just a case of picking the right instructions, IIRC.
Post Reply