Page 1 of 1

Is this posible?

Posted: Sat Aug 13, 2005 1:43 pm
by thoover
Can you make a complete Kernel out of C?
and
Can you make a complete Boot Code out of C?

Re:Is this posible?

Posted: Sat Aug 13, 2005 1:53 pm
by Cjmovie
With inline assembly? Probably not.
Without? No.

Even inline assembly would be pretty hard. Remember, the entire code MUST fit into 512 bytes. That 512 bytes has to switch from 16 to 32 bits, which means seperating and linking the two seperate parts. It must load floppy sectors (or hard drive etc.).

Most C programs start at ~1K and go up, so I'd gander at: Impossible.

There is NO way to make an OS without ASM.

Re:Is this posible?

Posted: Sat Aug 13, 2005 1:55 pm
by thoover
OK, Thanks for your time.

Re:Is this posible?

Posted: Sat Aug 13, 2005 5:06 pm
by HardEnough
if u will use grub , i think u can :)

Re:Is this posible?

Posted: Sat Aug 13, 2005 6:38 pm
by DennisCGc
Hi,
HardEnough wrote: if u will use grub , i think u can :)
I doubt you can. You still need at least some inline assembly. like 'in' and 'out'. You still need the mov command, esp. for CR0,CR1, etc. Same for 'int','lidt',name it.

So my conclusion: it's IMPOSSIBLE to write an OS without at least some (inline) assembly. (even it's booted using GRUB)

DennisCGc.

Re:Is this posible?

Posted: Sat Aug 13, 2005 6:49 pm
by HardEnough
he can also use oskit

Re:Is this posible?

Posted: Sat Aug 13, 2005 10:31 pm
by Brendan
Hi,
HardEnough wrote:he can also use oskit
How much inline assembly is in OSkit?

Why not just use the Linux kernel and device drivers (you wouldn't need C or assembly then - you could do the rest of the OS in PERL! :)).


Cheers,

Brendan

Re:Is this posible?

Posted: Sat Aug 13, 2005 11:59 pm
by Cjmovie
Yes, using oskit for EVERYTHING kind of defeats the purpose....

Re:Is this posible?

Posted: Sun Aug 14, 2005 6:38 am
by HardEnough
>How much inline assembly is in OSkit?

>Why not just use the Linux kernel and device drivers (you wouldn't >need C or assembly then - you could do the rest of the OS in PERL! ).

Remember we are talking about the possibility. that's the point he can just use grub+oskit.

Re:Is this posible?

Posted: Sun Aug 14, 2005 10:28 am
by Cjmovie
Didn't say he couldn't, just that it would kind-of defeat the purpose of making one in the first place ;D