source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1h_HStatus.asm @ 3

Last change on this file since 3 was 3, checked in by aitotat, 14 years ago
File size: 995 bytes
Line 
1; File name     :   AH1h_HStatus.asm
2; Project name  :   IDE BIOS
3; Created date  :   27.9.2007
4; Last update   :   12.4.2010
5; Author        :   Tomi Tilli
6; Description   :   Int 13h function AH=1h, Read Disk Status.
7
8; Section containing code
9SECTION .text
10
11;--------------------------------------------------------------------
12; Int 13h function AH=1h, Read Disk Status.
13;
14; AH1h_HandlerForReadDiskStatus
15;   Parameters:
16;       AH:     Bios function 1h
17;       DL:     Drive number (8xh)
18;   Parameters loaded by Int13h_Jump:
19;       DS:     RAMVARS segment
20;   Returns:
21;       AH:     Int 13h floppy return status
22;       CF:     0 if AH = RET_HD_SUCCESS, 1 otherwise (error)
23;       IF:     1
24;   Corrupts registers:
25;       Flags
26;--------------------------------------------------------------------
27ALIGN JUMP_ALIGN
28AH1h_HandlerForReadDiskStatus:
29    push    ds
30    LOAD_BDA_SEGMENT_TO ds, di
31    xor     ah, ah                  ; Zero AH
32    cmp     ah, [BDA.bHDLastSt]     ; Set CF if error code is non-zero
33    mov     ah, [BDA.bHDLastSt]
34    pop     ds
35    jmp     Int13h_PopDiDsAndReturn
Note: See TracBrowser for help on using the repository browser.