--- Thomas Hruska <[EMAIL PROTECTED]> wrote:

> Vineet Garg wrote:
> > Hello guys..
> > Let us suppose that i have made a c program to add
> two
> > numbers and i have compiled it too. Now i want to
> run
> > this program on bare pc(means without any OS).
> Suppose
> > i want my BIOS to load this program instead of
> boot
> > loader. So how can i do that?
> > 
> > Vineet Garg 
> 
> You can't.  At least not as-is.  Your program is
> compiled for a specific OS.
> 
> If you write your own boot sector* (requires
> knowledge of assembler), 
> then you can have the BIOS load the boot sector and
> the code can add two 
> numbers.  But that isn't C and therefore outside the
> scope of the group. 
>   AFAIK, you can't do what you want in C on Intel
> architecture...at 
> least not without writing or using an OS.
> 
> 
> * Back in the day of the uber-geekdom, there were
> various competitions 
> to see who could do the most in the least amount of
> disk space. 
> _Supposedly_ someone made a Space Invaders clone
> that fit entirely 
> inside a boot sector (510 bytes!).  I've been
> wanting to get my hands on 
> that just to have a copy of it.
> 
> -- 
> Thomas Hruska
> CubicleSoft President
> Ph: 517-803-4197
> 
> *NEW* MyTaskFocus 1.1
> Get on task.  Stay on task.
> 
> http://www.CubicleSoft.com/MyTaskFocus/
> 
> 




But GRUB boot loader is written in C language too. So
how tht program works without OS?



Vineet Garg 




      Download prohibited? No problem. CHAT from any browser, without download. 
Go to http://in.messenger.yahoo.com/webmessengerpromo.php/

Reply via email to