How to make programs that run without OS? 
Author Message
 How to make programs that run without OS?

    Well they say Unix was written in C. Now I have a basic problem
regarding to this. How can you write programs in C which do not need any
Operating System. I would love to have the details.

thankyou
AnkitJain

--



Fri, 09 Nov 2001 03:00:00 GMT  
 How to make programs that run without OS?

says...

Quote:
>     Well they say Unix was written in C. Now I have a basic problem
> regarding to this. How can you write programs in C which do not need any
> Operating System. I would love to have the details.

Most code you write in C does not use an OS directly.  OS calls are
made almost entirely through the standard library.  There's also some
OS-specific "stuff" in the startup code.

Therefore, to write code that runs independent of an OS, you implement
your own startup code and any library functions you're going to use.  
Depending on the situation, that may vary from a fairly trivial task
all the way up to a truly massive undertaking.
--



Sat, 10 Nov 2001 03:00:00 GMT  
 How to make programs that run without OS?

Quote:

>    Well they say Unix was written in C. Now I have a basic problem
>regarding to this. How can you write programs in C which do not need any
>Operating System. I would love to have the details.

>thankyou
>AnkitJain

        All OS's have a KERNAL program that acts as the interface between the
I/O and DOS. I/O = input/output, and DOS = Disk Operating System. Secondly, the
way BIOS's are programmed,

        Each kernel is HARDWARE platform dependent. So, the kernel for an
Intel-based system is different from a Sun Alpha,  Apple/Motorola 68xxx, or
PowerPC cpu.

        Plus, you have to add support for ALL the hardware variations: IDE,
SCSI/-II/-II/UW, IDE FDD/HDD, IDE/SCSI CDROM....
        Don't forget the various video cards, and modems. So, you have write
drivers to support the keyboard and monitor.

        At this point in time, I hope you can see the futility of trying to
write a complete OS by yourself. EVEN Linus Torvalds (LINUX) did NOT write the
entire OS by himself. He personally wrote what he needed to get up-and-running
(spent several years), released the code (open source) to hobbyists and
independent developers who have continued to add features and various hardware
support drivers.

        It can be done, BUT you might want to examine some open source OS's
first.

        At the very least, you would have to write the kernel and minimal
drivers to support CDROM's. Programs are way to large to put on floppy disks
anymore.

        There are books about writing OS's. You might want to look at a couple
of those before you start this project. Though, maybe not. According to a quote
by Linus Torvalds, he would never have started the LINUX project IF he'd known
how much time and energy it was going to take.

Michael J. Reeves, AA, ASc, LVN
MJR Consulting Services

---------------------------------------------------------
I have no SPAM. I don't give a SPAM.
I take no SPAM from anyone. I am NOT in the SPAM business!!!
--



Mon, 12 Nov 2001 03:00:00 GMT  
 How to make programs that run without OS?
Typical consultant. Answered a question that was not asked!

Ankit does NOT want to use an OS so why go on about them?

It is quite easy to write programs that do not have an OS. The majority
of embedded systems do not have an OS. It depends on your target.

In any event a simple OS is not that OS is not difficult. The last project I
was on the OS was designed and written by two people in 6 months.

The one thing you will need is a small start up file, usually assembler that
sets up the stack, memory spaces etc. This is usually provided my the
compiler vendor. Then you write the C program as normal however you
will only be able to use c functions that you write your self. Or those
provided by the compiler vendor. there will be no OS calls.

What target CPU / system did you have in mind?
What sort of application do you want to write.

Regards

        Chris



Quote:


>>    Well they say Unix was written in C. Now I have a basic problem
>>regarding to this. How can you write programs in C which do not need any
>>Operating System. I would love to have the details.

>>thankyou
>>AnkitJain

>       All OS's have a

I though he said "which do not need any Operating Systems?

Quote:
>       At this point in time, I hope you can see the futility of trying to
>write a complete OS by yourself.

Er sorry to labour the point but he does not want to write an OS
Quote:
>       It can be done, BUT you might want to examine some open source
>OS's
>first.

Good idea IF you want an OS which Ankit does NOT.

Quote:
>       At the very least, you would have to write the kernel and minimal
>drivers to support CDROM's. Programs are way to large to put on floppy disks

Why? the Last OS I was involved with had no CD's hard drives OR
floppy drives?

Quote:
>Michael J. Reeves, AA, ASc, LVN
>MJR Consulting Services

I gave up on the AA and joined the RAC.

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\/\  Chris Hills          Staffs /\/\/\/\/\/
/\/\/\/\/\/\/\/\/\     England      /\/\/\/\/\/\/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
--



Fri, 23 Nov 2001 03:00:00 GMT  
 How to make programs that run without OS?

Quote:
>    All OS's have a KERNAL program that acts as the interface between the
> I/O and DOS. I/O = input/output, and DOS = Disk Operating System.

Hmm... I am not aware of anything that goes under the name of DOS on
any computer system that I use at home or at work. Can you explain
what you mean?

--


--



Fri, 23 Nov 2001 03:00:00 GMT  
 How to make programs that run without OS?
Quote:

>>      All OS's have a KERNAL program that acts as the interface between

This is not true!

Quote:
>the
>> I/O and DOS. I/O = input/output, and DOS = Disk Operating System.

The last OS  I did didn't have a disk (of any type) on it.

Actually a lot of OS have drivers that interface between the Kernel and
the IO.....

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\/\  Chris Hills          Staffs /\/\/\/\/\/
/\/\/\/\/\/\/\/\/\     England      /\/\/\/\/\/\/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
--



Fri, 23 Nov 2001 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. DBX makes program run?

2. Programmatically making a program automatically run when Windows is started

3. Making a list of running programs

4. Running a program without it being displayed in the Task List

5. program can run without installation

6. Run MFC VC++ ODBC program on machine without studio

7. Want to run another program upon exit without exec or spawn

8. Want demo program to run from CD without install

9. running programs on Pocket PC 2002 emulator without evt

10. Run c# program without redistributable

11. Diff between PPC OS / HPC OS/ eXP OS

12. COBOL making dynamic call to c function under OS/390

 

 
Powered by phpBB® Forum Software