Now that I know that extensions are supported, I move foreword with int 0x13, ah=0x48 (extension : get drive parameters).
I stuff in word [0x42h] at the start of my buffer (pointed to by si), set up the registers, then call the interrupt.
Upon return, the word at the start of my buffer reports 0x1e, which, from http://www.ctyme.com/intr/rb-0715.htm#Table278
specifies the bios is returning info for a version 2.0x EDD (function ah 0x41 reported EDD 3.0 is avail), and upon inspection of
the returned data, word [si + 0x1e] contains the value 0xBEDD, which is the header signature for the EDD 3.0 part of the buffer.
Code: Select all
mov dl, [DATA_INT13_DRIVE] ; saved, but its 0x80
mov si, BUFFER_512 ; general purpose buffer location
mov ah, 0x48 ; get drive parameters
mov [si], word 0x42 ; EDD 3.0 uses this many bytes
push si ; just to be safe
int 0x13
pop si
jc .failed
mov eax, 0
mov ax, [si]
call print_eax ; this reports 0x1e, which is the size of an EDD 2.x buffer.
; but a
cmp [si + 0x1e], word 0xbedd
jne .falied
; we're still here, thinking we have a EDD 2.x buffer, but the 3.0 stuff is in there.
ret
.failed: ; output some fail message.
http://www.oocities.org/wangxuancong/int13h.html
Any ideas what I should do here? maybe if the EDD 3.0 signature matches, just default to using that?
(btw. this is being tested under qemu).