i have pro that is printing hello world , i want to make it boot after bios like operating sys .
booting program
Started by beginner-c, Feb 06 2008 10:55 AM
6 replies to this topic
#1
Posted 06 February 2008 - 10:55 AM
|
|
|
#2
Posted 06 February 2008 - 11:31 AM
#3
Posted 06 February 2008 - 07:50 PM
Yes and no. You can boot from a floppy that has your program on it, and in the code section of the boot sector, you can tell the computer to run your program. However, it'll never load Windows. You have to remove the floppy and do a hard reboot (i.e. push the power button). EDIT: If you know what you're doing, you can call the Windows loading program after yours exits, and load Windows normally.
Here's a series of articles on the web to help you get started:
Creating a "Toy" OS - Part I
Creating a "Toy" OS - Part II
Creating a "Toy" OS - Part III
Making Your Own Toy Boot Floppy
So you wanna create your own x86 Operating System?
By the way--DO NOT USE EXE FILES GENERATED BY A COMPILER! You must do this in Assembly language. The reason is that your program relies on a lot of DLLs, but you never notice because it's included in the bootstrap loader that the compiler writes for you. Since Windows loads those DLLs into memory, your program will crash and burn without them.
Here's a series of articles on the web to help you get started:
Creating a "Toy" OS - Part I
Creating a "Toy" OS - Part II
Creating a "Toy" OS - Part III
Making Your Own Toy Boot Floppy
So you wanna create your own x86 Operating System?
By the way--DO NOT USE EXE FILES GENERATED BY A COMPILER! You must do this in Assembly language. The reason is that your program relies on a lot of DLLs, but you never notice because it's included in the bootstrap loader that the compiler writes for you. Since Windows loads those DLLs into memory, your program will crash and burn without them.
#4
Posted 06 February 2008 - 10:12 PM
I would find a emulator which fits to your platform (preferably Bochs) It can be a pain to reboot to your floppy* all the time after you've made a little change to the bootloader* If you're using an emulator you don't have to do that. You can simply just run it through Bochs.
* I wouldn't use a floppy, but a compact disc or similar. I think floppies are too old. I don't even have one. Am I the only one thinking like that?
* I suppose you're just going to print from the bootloader.
* I wouldn't use a floppy, but a compact disc or similar. I think floppies are too old. I don't even have one. Am I the only one thinking like that?
* I suppose you're just going to print from the bootloader.
#5
Posted 08 February 2008 - 02:59 PM
You can use a flash drive or other media as a boot device, but it's slightly more complicated in that you have to change the BIOS settings to boot from that media device first instead of from the hard drive. By default, most computers try booting from a floppy first.
#6
Posted 08 February 2008 - 10:54 PM
I've never seen a BIOS where it was hard to change the boot priorities. Most BIOSs, at least modern ones, have a decent GUI and descriptions for everything, so even someone who had never tried to change settings in BIOS would be able to do so. Personally, I've set my BIOS to first try the disc, and then my hard drive.
#7
Posted 09 February 2008 - 01:13 PM
I didn't mean hard, just a little more of a hassle. It'd be hard if you want to change the boot priority from code.


Sign In
Create Account

Back to top










