Changeset 285 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH15h_HSize.asm
- Timestamp:
- Feb 29, 2012, 7:20:36 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH15h_HSize.asm
r283 r285 77 77 ConvertAH08hReturnValuesToSectorCount: 78 78 call Address_ExtractLCHSparametersFromOldInt13hAddress 79 80 mov al, bl ; Get sector value 81 mul bh ; Multiply by heads-1 (since bh is zero based, and could be 255 and overflow) 82 xor bh, bh ; Clear upper byte for following addition... 83 add ax, bx ; Add in one more sector value, since heads was off by one 84 inc cx ; Max cylinder number to cylinder count (again, zero based) 85 mul cx ; Multiply in cylinders 86 xor bx, bx ; Zero upper 16-bits, sector count will not be that large 87 79 mov al, bh ; AL = Max head number 80 inc cx ; Max cylinder number to cylinder count 81 inc ax ; Max head number to head count (AH=8h returns max 254 so no overflow to AH) 82 mul bl ; AX = Head count * Sectors per track 83 mul cx ; DX:AX = Total sector count for AH=0xh transfer functions 84 xor bx, bx 88 85 ret
Note:
See TracChangeset
for help on using the changeset viewer.