Three diffrent emulators show three diffrent outputs
Re: Three diffrent emulators show three diffrent outputs
Sure. Just use int 13h function 42h which is the extended read function. Keep in mind that the BIOS (or a chain loader) gives you the device number in DL. Use this number in the above interrupt call to access the boot device (which would be your CD.) The extended read function is also useful for hard disks as well. You will have to still implement ISO 9660 read support though.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Re: Three diffrent emulators show three diffrent outputs
Hi,
If you didn't boot from CD, then you might not be able to use any BIOS functions to access any CD (even if a CD is present), or you might be able to use BIOS functions to access one or more CDs.
Cheers,
Brendan
If you booted from CD using "El Torito, no emulation" then BIOS will tell your code a drive number that can be used to read from that CD using "Int 0x13, Extended Read". Note that for "El Torito, no emulation" your boot loader can be up to about 500 KiB (and the BIOS will/should load all of it, not just the first sector of it).lukaandjelkovic wrote:Is there any possibility to read CD ATAPI through interrupts in real mode?
If you didn't boot from CD, then you might not be able to use any BIOS functions to access any CD (even if a CD is present), or you might be able to use BIOS functions to access one or more CDs.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re: Three diffrent emulators show three diffrent outputs
Sorry, I missed this bit. As long as you know what it does then there is no problem. I just wanted to be sure. Note though that, in the series, we use /ALIGN:512 in the linker settings to simplify loading the file. If you switch to a CD, you should use /ALIGN:2048. In a real system, it should be done section by section taking section alignment into consideration (which is typically paged aligned.) This is a little more harder to do, but is something to perhaps look into later.No - oh sorry, i wrongly wrote my reply. I meant just documentation for real mode and protected mode. I know that filesystems doesn't depend on file formats, and it's easy to make it load PE executable. I understand whole bootloader, don't make that assumptions. I accidentally added that "bootloader for PE files"
I am fine with copying and pasting. My only concern is copying and pasting code without knowing the why of what it does and without consideration for the design and architecture of your system.If i even don't understand and don't know, it's still just a little bit better than using Grub, isn't it?
I don't copy paste your demos since 1 month or more. I write it by myself - and most things from demo got rewritten by me until version 0.0.1 was released.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Re: Three diffrent emulators show three diffrent outputs
Hmmm, no. No CDs until i give up.