source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm@ 366

Last change on this file since 366 was 332, checked in by krille_n_@…, 13 years ago

Changes:

  • Fixed a bug in the new BIOS Drive Information Tool.
  • Very small changes to improve speed (I hope).
  • Changed AH48h_GetExtendedDriveParameters.asm to allow AT builds with USE_386 (won't affect any other builds).
  • Verified that most define combinations can be built and changed Strings.asm accordingly. "Most" meaning with or without any combination of EBIOS and/or Serial code defines.
File size: 2.0 KB
Line 
1; Project name : XTIDE Universal BIOS
2; Description : Int 13h function AH=48h, Get Extended Drive Parameters.
3
4; Section containing code
5SECTION .text
6
7;--------------------------------------------------------------------
8; Int 13h function AH=48h, Get Extended Drive Parameters.
9;
10; AH48h_GetExtendedDriveParameters
11; Parameters:
12; SI: Same as in INTPACK
13; DL: Translated Drive number
14; DS:DI: Ptr to DPT (in RAMVARS segment)
15; SS:BP: Ptr to IDEPACK
16; Parameters on INTPACK:
17; DS:SI: Ptr to Extended Drive Information Table to fill
18; Returns with INTPACK:
19; AH: Int 13h return status
20; DS:SI: Ptr to Extended Drive Information Table
21; CF: 0 if successful, 1 if error
22;--------------------------------------------------------------------
23AH48h_HandlerForGetExtendedDriveParameters:
24 call AccessDPT_GetPointerToDRVPARAMStoCSBX
25 push bx
26 call AccessDPT_GetLbaSectorCountToBXDXAX
27 pop di ; CS:DI now points to DRVPARAMS
28
29 ; Point DS:SI to Extended Drive Information Table to fill
30 mov ds, [bp+IDEPACK.intpack+INTPACK.ds]
31 mov cx, MINIMUM_EDRIVEINFO_SIZE
32 cmp [si+EDRIVE_INFO.wSize], cx
33 jb Prepare_ReturnFromInt13hWithInvalidFunctionError
34 je SHORT .SkipEddConfigurationParameters
35
36 ; We do not support EDD Configuration Parameters so set to FFFF:FFFFh
37 mov cx, -1 ; FFFFh
38 mov [si+EDRIVE_INFO.fpEDDparams], cx
39 mov [si+EDRIVE_INFO.fpEDDparams+2], cx
40 mov cx, EDRIVE_INFO_size
41
42 ; Fill Extended Drive Information Table in DS:SI
43.SkipEddConfigurationParameters:
44 mov [si+EDRIVE_INFO.wSize], cx
45 mov WORD [si+EDRIVE_INFO.wFlags], FLG_DMA_BOUNDARY_ERRORS_HANDLED_BY_BIOS
46
47 ; Store total sector count
48 mov [si+EDRIVE_INFO.qwTotalSectors], ax
49 xor ax, ax ; Return with success
50 mov [si+EDRIVE_INFO.qwTotalSectors+2], dx
51 mov [si+EDRIVE_INFO.qwTotalSectors+4], bx
52 mov [si+EDRIVE_INFO.qwTotalSectors+6], ax ; Always zero
53 mov WORD [si+EDRIVE_INFO.wSectorSize], 512
54
55.ReturnWithError:
56 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
Note: See TracBrowser for help on using the repository browser.