Changeset 228 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS
- Timestamp:
- Jan 29, 2012, 1:49:15 PM (13 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
r227 r228 22 22 ;-------------------------------------------------------------------- 23 23 AH48h_HandlerForGetExtendedDriveParameters: 24 call AccessDPT_GetPointerToDRVPARAMStoCSBX 25 push bx 24 26 call AccessDPT_GetLbaSectorCountToBXDXAX 27 pop di ; CS:DI now points to DRVPARAMS 25 28 26 29 ; Point DS:SI to Extended Drive Information Table to fill … … 42 45 mov WORD [si+EDRIVE_INFO.wFlags], FLG_DMA_BOUNDARY_ERRORS_HANDLED_BY_BIOS 43 46 44 mov [di+EDRIVE_INFO.qwTotalSectors], ax 47 ; Limit LBA if necessary 48 test BYTE [cs:di+DRVPARAMS.wFlags], FLG_DRVPARAMS_USERLBA 49 jz SHORT .StoreTotalSectorsFromBXDXAX 50 test bx, bx 51 jnz SHORT .LimitTotalSectors 52 cmp dx, [cs:di+DRVPARAMS.dwMaximumLBA+2] 53 jb SHORT .StoreTotalSectorsFromBXDXAX ; Real size less than max 54 ja SHORT .LimitTotalSectors 55 cmp ax, [cs:di+DRVPARAMS.dwMaximumLBA] 56 jbe SHORT .StoreTotalSectorsFromBXDXAX ; Real size less than max 57 58 .LimitTotalSectors: 59 xor bx, bx 60 mov ax, [cs:di+DRVPARAMS.dwMaximumLBA] 61 mov dx, [cs:di+DRVPARAMS.dwMaximumLBA+2] 62 63 .StoreTotalSectorsFromBXDXAX: 64 mov [si+EDRIVE_INFO.qwTotalSectors], ax 45 65 xor ax, ax ; Return with success 46 mov [ di+EDRIVE_INFO.qwTotalSectors+2], dx47 mov [ di+EDRIVE_INFO.qwTotalSectors+4], bx48 mov [ di+EDRIVE_INFO.qwTotalSectors+6], ax49 mov WORD [ di+EDRIVE_INFO.wSectorSize], 51266 mov [si+EDRIVE_INFO.qwTotalSectors+2], dx 67 mov [si+EDRIVE_INFO.qwTotalSectors+4], bx 68 mov [si+EDRIVE_INFO.qwTotalSectors+6], ax 69 mov WORD [si+EDRIVE_INFO.wSectorSize], 512 50 70 51 71 .ReturnWithError:
Note:
See TracChangeset
for help on using the changeset viewer.