Page 1 of 1
Bios Disk Read functions
Posted: Wed Aug 15, 2007 6:35 pm
by artrecks
I want to use Bios Disk Read functions to read from disk to memory above 0x100000, but since it uses segmentation ( ES:BX ) I can only access from 0xFFFF:0x0010 (0x100000) to 0xFFFF:0xFFFF (0x10FFEF). But.. If I want to write to 0x200000 how could it be? I've heard something about "unreal mode", can I use BIOS interrupts and 32bits registers in unreal mode???
Posted: Wed Aug 15, 2007 7:54 pm
by frank
Bios functions generally don't work well with unreal mode. The best way to do it IMO is read say 5 sectors to a location under 1mb in real mode and then goto protected mode and copy to data to the location you want then go back to real mode and do it again until you are finished.
Posted: Wed Aug 15, 2007 8:32 pm
by artrecks
thanks,
I'll try this
cya
Posted: Wed Aug 15, 2007 8:39 pm
by Dex
The best way is like frank said, but it is easier if you make addressing identical in real mode and protected mode, by setting the base of the code and data descriptors to DS * 16. This number is computed at run-time. than you can go to and from realmode to pmode for every sector loaded, you may thing this is slow, but it will be as fast as any Pmode floppy driver from windows or linux.
Also by using this meford you can load from USB key fobs etc, if your bios can boot USB.