Bios Disk Read functions

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
artrecks
Posts: 23
Joined: Wed Jul 11, 2007 8:24 pm

Bios Disk Read functions

Post 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???
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post 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.
artrecks
Posts: 23
Joined: Wed Jul 11, 2007 8:24 pm

Post by artrecks »

thanks,
I'll try this
cya
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post 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.
Post Reply