Loading a memory address from a cd rom
Loading a memory address from a cd rom
Hi. I'm very new to OS developing and I have just made a bootloader that will load the address 0x2000 where the kernel is located. However as my computer does not have a floppy drive I can't make a bootable floppy. I have made a bootable cd using nero burning rom and put the basic bootloader on using the wizard. However is there a way of loading a memory address using Int 13h because as far as I'm aware Int 13h can only load addresses from a floppy drive or hardrive. Also is there a way to make sure that my kernel is written to 0x2000? Thank you for your help in advance.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
related topic you might want to read:
http://www.osdev.org/phpBB2/viewtopic.php?t=12583
http://www.osdev.org/phpBB2/viewtopic.php?t=12583
@Jabus, When you burn the CD with the floppy image, it emulates the floppy, so if you write your bootable floppy image to load from a address, it will work the same from the CD.
When your code is in real mode the real floppy drive becomes B:\ and emulated is A:\
Once you go to pmode emulation stops. you can also stop emulation in real mode by calling a certain int.
NOTE: If you do not stop emulation in real mode and go to pmode, if you return to realmode emulation starts again, this is good for loading from USB fobs that also use emulation of floppy/hdd.
When your code is in real mode the real floppy drive becomes B:\ and emulated is A:\
Once you go to pmode emulation stops. you can also stop emulation in real mode by calling a certain int.
NOTE: If you do not stop emulation in real mode and go to pmode, if you return to realmode emulation starts again, this is good for loading from USB fobs that also use emulation of floppy/hdd.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
I'm sorry if the following question is a stupid question.
All the tutorials and articles on writing a bootloader seem to be about making a fat12 bootloader (at least this is what I think they are doing) when I made my own bootloader I made a bootable cd rom and usedmy bootloader as the image however it didn't work. I then tried a bootloader that was made in a tutorial and copied the image directly from the tutorial and used that image as the image for the bootable cd rom, however this also failed. Do I need to format the cd rom so that it usees the fat12 filesystem and if so how do I format it? Otherwise could you tell me what I am doing wrong.
All the tutorials and articles on writing a bootloader seem to be about making a fat12 bootloader (at least this is what I think they are doing) when I made my own bootloader I made a bootable cd rom and usedmy bootloader as the image however it didn't work. I then tried a bootloader that was made in a tutorial and copied the image directly from the tutorial and used that image as the image for the bootable cd rom, however this also failed. Do I need to format the cd rom so that it usees the fat12 filesystem and if so how do I format it? Otherwise could you tell me what I am doing wrong.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
The thread i posted previously should contain all the information to make a correctly bootable CD. If you have a 1.44MB floppy image that works, then making a CD image should work too. If its not exactly 1.44MB (2880 * 512 bytes) then mkisofs will complain, and probably some other programs would do so as well.
And if you did manage to burn a cd, I got a complaint about some BIOS not supporting my bootable CD's, which are built the same way. Maybe you just got unlucky
Sounds like its time to write a wiki page on this.
And if you did manage to burn a cd, I got a complaint about some BIOS not supporting my bootable CD's, which are built the same way. Maybe you just got unlucky
Sounds like its time to write a wiki page on this.
1. First are you using some burn software to make it bootable ?, eg: Nero burn.
2. What are you using to make a image ?, the image needs to be a full bootable floppy image. eg: like this http://www.dex4u.com/DosBoxDex4u.zip
3. Is your BIOS set to boot CD, before Hdd ?.
2. What are you using to make a image ?, the image needs to be a full bootable floppy image. eg: like this http://www.dex4u.com/DosBoxDex4u.zip
3. Is your BIOS set to boot CD, before Hdd ?.
In answer to your questions I am using nero burning rom I am using the file loader.bin as the image (source code is included as attatchment) and it is said to cd before hdd. However when I boot from it it displays the bootloader welcome message and then appears to hang. I've included the source code of the bootloader as it might be the code. I haven't managed to test it on a floppy as I have no floppy drive on my computer. The loader source code is my code mixed with some open source code.
- Attachments
-
- loader.asm
- loader source code
- (4.29 KiB) Downloaded 25 times
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
I think i got it: You are making a no-emulation CD-Rom.
This means your code gets loaded without any floppy disk being emulated. Consequence is that you have to write a specially tailored bootloader to accomodate for it.
I suggest you use mkisofs instead of asking Nero to create a bootable CD. I put up a tutorial here
This means your code gets loaded without any floppy disk being emulated. Consequence is that you have to write a specially tailored bootloader to accomodate for it.
I suggest you use mkisofs instead of asking Nero to create a bootable CD. I put up a tutorial here
if you have nero se (the version that comes free with many CD burners and computers) you can only burn floppy emulation bootdisks (makes my life difficult when im trying to slipstream windows...), if you use the full program, there will be an option in your dialog box, but i dont remember what it is (should be a check box)
just another option
just another option