Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

10
  • 2
    "If you expect to execute a standalone program (i.e. without an OS), then you must not boot the computer to run the OS." is not entirely correct. Many DOS programs were loaded after DOS and then completely ignored DOS services (by directly bit-banging or perhaps calling BIOS directly). Win3.x is an excellent example that (except in some interesting corner cases) ignored that DOS was present. Win95/98/Me did this as well. There are many examples of OSs that support standalone programs, many from the 8-/16-bit era. Commented Jul 28, 2018 at 21:27
  • 10
    @EricTowers -- By "DOS" presumably you mean MS-DOS (since I've used DOSes not related to MS or Intel)? You're citing an "OS" that doesn't even match the criteria of my 1970's college textbooks on OS concepts and design. The origins of MS-DOS trace back (through Seattle Computer Products) to CP/M, which is explicitly not called an OS by its author Gary Kildall. FWIW an OS that allows a program to take over the system has failed in its basic function of managing the system resources. "There are many examples of OSs that support standalone programs" -- "Support" or unable to prevent?
    – sawdust
    Commented Jul 29, 2018 at 1:08
  • 5
    ... or ProDOS or PC-DOS or DR-DOS or CBM DOS or TRS DOS or FLEX ... Commented Jul 29, 2018 at 1:22
  • 4
    I like GCC's "freestanding" terminology. The English word has all the right connotations for code that runs without an OS, maybe even better than "standalone". e.g. you can compile gcc -O2 -ffreestanding my_kernel.c special_sauce.S to make an executable that doesn't assume any of the normal libraries or OS stuff will be there. (Of course you would normally need a linker script to get it to usefully link into a file format that a bootloader will want to load!) Commented Jul 29, 2018 at 17:07
  • 4
    @PeterCordes "standalone" is the term used in the C standard which IMO can be considered somewhat authoritative. Alternatively a good term is also "non-hosted" (as in hosted by the OS)
    – jaskij
    Commented Jul 30, 2018 at 18:47