Startup Code

Discussion in 'Programmer's Corner' started by Developer_Dan(), Oct 12, 2007.

  1. Developer_Dan()

    Thread Starter Member

    Oct 8, 2007
    17
    0
    Hello all,

    I'm wondering how I can control a computer without help from Microsoft or Borland etc.. startup code.

    I basically want to write and compile my own startup code, and link future programs to this customised startup code.

    Kind regards,
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Are you proposing to write an operating system? It is a bit hard to interpret your question. Modern computers have what might be considered a "startup code" in ROM. The code checks the computer for the status of all components and then strats to boot process for one of several sources.

    For older computers, like the Apple II or the TRS-80, this was not too difficult, although a thorough understanding of the internals of the computer was vital. For a modern computer, the task might be overwhelming.

    Possibly you could expand on the functions of your proposed code?
     
  3. RiJoRI

    Well-Known Member

    Aug 15, 2007
    536
    26
    What beenthere said. Also, look into the Minix operating system (google Minix). Minix was designed as a tool to teach how to create operating systems.

    --Rich
     
  4. Developer_Dan()

    Thread Starter Member

    Oct 8, 2007
    17
    0
    Thanks for the input guys.
    To elaborate further, I don't really want to write my own OS. I understand how hard that would be, and also wouldn't want to consume my life on the one program ;)

    I do however want to be able to make programs that can run on, for example, IA-32 chips without and operating system in place or anything. Basically I know I need to create a bootloader to take control from ROM BIOS.

    My real problem is compiling the code to work without VCL,OWL,.NET,MFC,Win32 etc... But NATIVE... :)

    Cheers,
     
  5. sax1johno

    Member

    Oct 20, 2007
    17
    0
    Hey Developer Dan,

    Check out MinGW and the GCC compilers. These are completely free compilers and you can choose a great number of processors for which you can compile your software. You can also compile it in Windows on IA32 and make code that can run on any processor that GCC supports.

    What you describe is a VERY difficult thing to do with IA-32 based processors. They are generally better suited to general-purpose applications (like your desktop computer). What you may want to consider is a Microcontroller (has the CPU, RAM, and storage (EEPROM) all on one chip).

    If you want to create something that you can start at boot on a regular PC, and load only certain programs, check out the "linux from scratch" project (google it). It will allow you to create your own linux distro and customize the features you want to run. **WARNING: You will want to know how to use linux in order to do this.

    I would suggest using linux for this type of applications because the liberal licensing allows you to do whatever you want with it.
     
Loading...