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

Last change on this file since 35 was 35, checked in by aitotat, 14 years ago

Cleaned recent changes a bit to save few bytes.

File size: 1019 bytes
RevLine 
[3]1; File name     :   AH1h_HStatus.asm
2; Project name  :   IDE BIOS
3; Created date  :   27.9.2007
[35]4; Last update   :   24.8.2010
[3]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
[28]30
[3]31    LOAD_BDA_SEGMENT_TO ds, di
32    xor     ah, ah                  ; Zero AH
33    cmp     ah, [BDA.bHDLastSt]     ; Set CF if error code is non-zero
[35]34    mov     ah, [BDA.bHDLastSt]     ; Last error to AH
[28]35
[3]36    pop     ds
37    jmp     Int13h_PopDiDsAndReturn
Note: See TracBrowser for help on using the repository browser.