about exe file

Hi,

I am using dual operating system(windows/linux) in my system.Now the problem is i want to run my .exe(of c languege)
before system ask for loading of operating system.Like my system ask for linux or dos.I want to run my .exe before this. Tell me how can i use this.

Do you mean to run it before the bootloader loads? Or are you writing a bootloader?

Keep in mind this is not a trivial task, nor will you be able to simply run a Windows / Linux executable. This is a fairly specialized subset of programming, not to mention very much machine dependant.

What are you trying to do? Maybe someone can help point you to an easier way of doing it.

I am now assuming that you are new to programming and Unix, and that you see this from the perspective of someone entering from the outside:

"Hey, there are two systems here, I want my program to run on both of them"

The simple answer is: Forget it. The different systems are made for different purposes, and in principle, there is no reason to want to run the same binary on both.

The better answer is:
You have made a Windows program and want it tu run under Linux.
Make sure it runs under Wine (www.winehq.org) - I have one example program at users.skynet.be/atle/acuwine.tgz

Then, remember: This program will ONLY run on a PC.

The best way is to make sure programs are source compatible, that they don't use any win32-specific calls, that they are made using autoconf.

That way, your programs will run on Apple ][, Cray T3, Dec Alpha, TRS-80 Model-16 running Xenix, ND-100 running SinTran, PC running DOS - and Linux and Windows.

This may be confusing, but it will seem natural in a short while.
Read about the i386, the SPARC/UltraSPARC, compare binary codes, read about the Linux kernel, read Matt Petrek 'Undocumented Windows'.

After that last one, you will even wonder that anything runs at all :slight_smile:

Atle