source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm @ 613

Last change on this file since 613 was 613, checked in by aitotat, 3 years ago

Added more complex way to limit illegal P-CHS Cylinders. This way more modifications can be easily made later if necessary.
Updated biosdrvs to display unmodified and modified CHS.

File size: 2.0 KB
RevLine 
[88]1; Project name  :   XTIDE Universal BIOS
[3]2; Description   :   Int 13h function AH=25h, Get Drive Information.
3
[376]4;
[526]5; XTIDE Universal BIOS and Associated Tools
6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
[376]7;
8; This program is free software; you can redistribute it and/or modify
9; it under the terms of the GNU General Public License as published by
10; the Free Software Foundation; either version 2 of the License, or
11; (at your option) any later version.
[526]12;
[376]13; This program is distributed in the hope that it will be useful,
14; but WITHOUT ANY WARRANTY; without even the implied warranty of
15; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
[526]16; GNU General Public License for more details.
[376]17; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
[526]18;
[376]19
[3]20; Section containing code
21SECTION .text
22
23;--------------------------------------------------------------------
24; Int 13h function AH=25h, Get Drive Information.
25;
26; AH25h_HandlerForGetDriveInformation
27;   Parameters:
[613]28;       CX, ES: Same as in INTPACK
[148]29;       DL:     Translated Drive number
30;       DS:DI:  Ptr to DPT (in RAMVARS segment)
[150]31;       SS:BP:  Ptr to IDEPACK
32;   Parameters on INTPACK:
[613]33;       CX:     XUB_INT13h_SIGNATURE to ignore illegal ATA-ID values, otherwise
34;               correct them (only used if NOT build with NO_ATAID_CORRECTION)
[3]35;       ES:BX:  Ptr to buffer to receive 512-byte drive information
[150]36;   Returns with INTPACK:
[3]37;       AH:     Int 13h return status
[294]38;       CF:     0 if successful, 1 if error
[3]39;--------------------------------------------------------------------
40AH25h_HandlerForGetDriveInformation:
[322]41    mov     ax, (COMMAND_IDENTIFY_DEVICE << 8 | 1)      ; Read 1 sector
42    call    Prepare_BufferToESSIforOldInt13hTransfer    ; Preserves AX
[305]43    mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ)
[165]44%ifdef USE_186
45    push    Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
[305]46    jmp     Idepack_TranslateOldInt13hAddressAndIssueCommandFromAH
[165]47%else
[305]48    call    Idepack_TranslateOldInt13hAddressAndIssueCommandFromAH
[165]49    jmp     Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
50%endif
Note: See TracBrowser for help on using the repository browser.