Boot Disks

This is a discussion on Boot Disks within the C++ Programming forums, part of the General Programming Boards category; I am interesting im writting applications that can run off of a boot floppy but I am really not sure ...

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    59

    Boot Disks

    I am interesting im writting applications that can run off of a boot floppy but I am really not sure how to go about doing so. I have searched for "Writing Boot Floppies" and things like that but have come up empty handed. I was wondering someone could point me in the right direction. I am trying to write an application in C or C++ and making it into a floppy image (*.img) or just put it directly onto a floppy and then start a computer and boot directly from that floppy. I would like to beable to use my own administrative tools...

    A link to a tutorial or something of that nature would be wonderful.

    By the way... I am running Linux and would prefer doing everything with Linux but if you only know of a way I can do it with Windows I would still like to read about it.

    Thanks for your help.
    Last edited by Jperensky; 06-18-2003 at 06:48 PM.

  2. #2
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,493
    Go to www.flashdaddee.com to the Operating Systems forum, and ask about it. I know for sure that you can find that information there.


    Or, you could create a system disk, and use autoexec.bat to automatically run your program when you boot the computer with the disk.

  3. #3
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    ygfperson's second idea was probably best, using a dos boot disk. If you wanted the boot floppy to hold your application only:
    * It would have to be written in ASM for the first sector of the disk (this is the boot sector).
    * The first sector would then probably load the second sector, which jumps from real mode (which is 16 bit and needs to be in ASM) to protected mode (for 32bit C/C++ code). This is normally a pretty big sector and ususally isn't done in the first sector.
    * The second sector then (in protected mode) would run your program. Unfortunately, because at this stage Windows/Linux hasn't even started, your application CANNOT use any external header files. You will have to create everything yourself, such as iostream and string.h.

    At least, thats how I understand the boot process. Using a windows/dos boot disk will still let dos/windows start and then run your application, so you dont need to go through all the steps I outlined above.

    ~ Paul
    Last edited by nickname_changed; 06-19-2003 at 08:32 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Vista/XP Dual Boot Help
    By alpha in forum Tech Board
    Replies: 1
    Last Post: 06-29-2007, 03:50 AM
  2. freebsd and redhat dual boot.
    By xddxogm3 in forum Linux Programming
    Replies: 1
    Last Post: 05-09-2004, 06:06 PM
  3. XP vs ME Boot disks
    By Biggie in forum Tech Board
    Replies: 8
    Last Post: 06-17-2003, 04:34 PM
  4. Linux and Windows Duel Boot
    By The15th in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 04-26-2002, 04:59 AM
  5. CD Boot - Need Help
    By (TNT) in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-19-2001, 12:29 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21