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

Last change on this file since 294 was 294, checked in by krille_n_@…, 12 years ago

Commit 2/2 (BIOS):

  • Fixed a bug in AH1h_HStatus.asm.
  • Minor optimizations.
  • Fixed spelling and did some cleaning.
File size: 1.2 KB
RevLine 
[116]1; Project name  :   XTIDE Universal BIOS
[3]2; Description   :   Int 13h function AH=1h, Read Disk Status.
3
4; Section containing code
5SECTION .text
6
7;--------------------------------------------------------------------
8; Int 13h function AH=1h, Read Disk Status.
9;
10; AH1h_HandlerForReadDiskStatus
11;   Parameters:
[148]12;       DL:     Translated Drive number
13;       DS:DI:  Ptr to DPT (in RAMVARS segment)
[150]14;       SS:BP:  Ptr to IDEREGS_AND_INTPACK
15;   Returns with INTPACK:
[3]16;       AH:     Int 13h floppy return status
17;       CF:     0 if AH = RET_HD_SUCCESS, 1 otherwise (error)
18;--------------------------------------------------------------------
19ALIGN JUMP_ALIGN
20AH1h_HandlerForReadDiskStatus:
[148]21    LOAD_BDA_SEGMENT_TO ds, ax, !
[258]22
23%ifdef MODULE_SERIAL_FLOPPY
24    test    dl, dl
[294]25    js      .HardDisk
26    mov     ah, [BDA.bFDRetST]  ; Unlike for hard disks below, floppy version does not clear the status
[258]27    jmp     .done
[294]28.HardDisk:
[258]29%endif
[294]30
31    xchg    ah, [BDA.bHDLastSt] ; Load and clear last error (AH is cleared with the LOAD_BDA_SEGMENT_TO above)
32
[258]33.done:
[294]34%ifndef USE_186
[150]35    call    Int13h_SetErrorCodeToIntpackInSSBPfromAH
[148]36    jmp     Int13h_ReturnFromHandlerWithoutStoringErrorCode
[294]37%else
38    push    Int13h_ReturnFromHandlerWithoutStoringErrorCode
39    jmp     Int13h_SetErrorCodeToIntpackInSSBPfromAH
40%endif
Note: See TracBrowser for help on using the repository browser.