flat assembler
Message board for the users of flat assembler.

Index > OS Construction > BIOS get drive parameters int 0x13 ah=0x48

Author
Thread Post new topic Reply to topic
cod3b453



Joined: 25 Aug 2004
Posts: 619
cod3b453
Last night I rediscovered these extensions to int 0x13 and realised they're potentially more useful than I had first thought. Laughing They appear to allow any boot sector to work out which device it was booted from by the BIOS - this is especially useful for CD,USB or HDD boots since it can eliminate the need for scanning all possible drives.

Having tested the installation check (int 0x13 ah=0x41) on QEMU and VirtualBox, they appear to handle all functions (cx=0x0007) but when I tried the get parameters function (int 0x13 ah=0x48) it simply failed (CF=1). I should point out both VirtualBox and QEMU returns values over 0x80 for the CD I'm trying to boot and so all the values I've given appear to be correct.

Has anyone here managed to get these to work?

Thanks!

I've attached a snapshot of my test build.


Description: Multiboot test snapshot
Download
Filename: snapshot.zip
Filesize: 8.28 KB
Downloaded: 70 Time(s)

Post 29 Jul 2010, 10:14
View user's profile Send private message Reply with quote
Mac2004



Joined: 15 Dec 2003
Posts: 313
Mac2004
You might have a stub bios implemention of extended read/write functions. That may be one cause to you problems.
Checking the magic number is not enough. You'll also need to check those bits as well (look at the bottom of the linked document)

http://lrs.uni-passau.de/support/doc/interrupt-57/RB-0668.HTM

regards
Mac2004
Post 29 Jul 2010, 13:00
View user's profile Send private message Reply with quote
cod3b453



Joined: 25 Aug 2004
Posts: 619
cod3b453
That's the problem - the install check test shows that CF=0 (success), correct BX "magic" value and all defined bits are set in cx, any of which are enough for the get parameters function to be valid. Confused
Post 29 Jul 2010, 13:20
View user's profile Send private message Reply with quote
cod3b453



Joined: 25 Aug 2004
Posts: 619
cod3b453
OK I found the problem - I missed that the word at ds:si (size) must be set to the max size expected! Embarassed

All now appears to work Cool
Post 29 Jul 2010, 13:51
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.