Changeset 542 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS
- Timestamp:
- Apr 15, 2013, 4:03:33 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm
r541 r542 52 52 ; AH=48h Total Sector Count: 11873* 16*63 = 11,967,984 53 53 ; 54 ; Notice how AH=48h returns lesser total sector count than AH= 8h! The only54 ; Notice how AH=48h returns lesser total sector count than AH=08h! The only 55 55 ; way I could think of to get 11873 cylinders is to divide AH=08h sector 56 56 ; count with P-CHS heads and sectors: (745*255*63) / (16*63) = 11873 57 57 ; 58 ; I have no idea what is the reasoning behind it but at least there is one 59 ; BIOS that does just that. 60 ; 61 ; I decided that we multiply P-CHS values and do not waste space like the 62 ; Award BIOS does. 58 ; The only reason I can think of is that the Award BIOS has a bug and 59 ; uses L-CHS when it should use P-CHS values in the calculation. 63 60 ; 64 61 ; … … 139 136 ; Store P-CHS. Based on phoenix specification this is returned only if 140 137 ; total sector count is 15,482,880 or less. 141 sub ax, 4001h142 sbb dx, 0ECh138 sub ax, MAX_SECTOR_COUNT_TO_RETURN_PCHS & 0FFFFh 139 sbb dx, MAX_SECTOR_COUNT_TO_RETURN_PCHS >> 16 143 140 sbb bx, cx ; Zero 144 j nc SHORT .ReturnWithSuccess ; More than EC4000h145 or WORD[di+EDRIVE_INFO.wFlags], FLG_CHS_INFORMATION_IS_VALID141 ja SHORT .ReturnWithSuccess 142 or BYTE [di+EDRIVE_INFO.wFlags], FLG_CHS_INFORMATION_IS_VALID 146 143 147 144 eMOVZX dx, BYTE [es:si+DPT.bPchsHeads]
Note:
See TracChangeset
for help on using the changeset viewer.