Is this posible?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
thoover

Is this posible?

Post by thoover »

Can you make a complete Kernel out of C?
and
Can you make a complete Boot Code out of C?
Cjmovie

Re:Is this posible?

Post 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.
thoover

Re:Is this posible?

Post by thoover »

OK, Thanks for your time.
HardEnough

Re:Is this posible?

Post by HardEnough »

if u will use grub , i think u can :)
DennisCGc

Re:Is this posible?

Post 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.
HardEnough

Re:Is this posible?

Post by HardEnough »

he can also use oskit
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:Is this posible?

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Cjmovie

Re:Is this posible?

Post by Cjmovie »

Yes, using oskit for EVERYTHING kind of defeats the purpose....
HardEnough

Re:Is this posible?

Post 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.
Cjmovie

Re:Is this posible?

Post 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
Post Reply