Well great, function AH=08h reports that there are 0 sectors per track. *mumbles about dodgy BIOS calls* Gonna see what other ones say.
My code tells me that the function returns the following:
Number of drives : 16
Heads (selected drive) : 0
Sectors per track (selected drive) : 0
So my assumption now is that there is something wrong with my test code, but the only part I can see having a problem is my code to convert an 8-bit binary number to a two character text version of the hex equivalent (so that 00010111 would be printed as 17). I went through this code on paper and it all worked fine, and the fact that I'm getting real numbers out of it rather than random characters seems to indicate it's ok, though I did write it on the fly.
Code:
bin2hex:
MOV AH, AL
AND AL, 00001111b ; Lower digit
AND AH, 11110000b ; Higher digit
SHR AH, 4 ; Make upper digit correct
ADD AL, 48 ; Turn into ASCII character
ADD AH, 48 ; And again
RETN
It basically takes the number in AL and returns the text version of the hex in AX.
So that's where I am, either the BIOS is giving me stupid values back or my code is broke.
Edit: That procedure gives the two characters the wrong way round, so I've fixed that, obviously not getting the right values still though
Edit 2: Ok, I think that's enough for today. It has know started giving me an error when it calls the function. God knows what's going on. Error 1: Invalid function or parameter. AH is 08h and DL is the drive number (80h), what could possibly be wrong with that? >:(