Ignore:
Timestamp:
Mar 19, 2011, 8:09:41 PM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to XTIDE Universal BIOS:

  • INT 13h optimizations to save almost 100 bytes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1h_HStatus.asm

    r116 r148  
    1010; AH1h_HandlerForReadDiskStatus
    1111;   Parameters:
    12 ;       AH:     Bios function 1h
    13 ;       DL:     Drive number (8xh)
    14 ;   Parameters loaded by Int13h_Jump:
    15 ;       DS:     RAMVARS segment
    16 ;   Returns:
     12;       DL:     Translated Drive number
     13;       DS:DI:  Ptr to DPT (in RAMVARS segment)
     14;       SS:BP:  Ptr to INTPACK
     15;   Returns with INTPACK in SS:BP:
    1716;       AH:     Int 13h floppy return status
    1817;       CF:     0 if AH = RET_HD_SUCCESS, 1 otherwise (error)
    19 ;       IF:     1
    20 ;   Corrupts registers:
    21 ;       Flags
    2218;--------------------------------------------------------------------
    2319ALIGN JUMP_ALIGN
    2420AH1h_HandlerForReadDiskStatus:
    25     push    ds
    26 
    27     LOAD_BDA_SEGMENT_TO ds, di
    28     mov     ah, [BDA.bHDLastSt]     ; Last error to AH
    29     cmp     ah, 1                   ; Set CF if error code is zero
    30     cmc                             ; Invert CF
    31 
    32     pop     ds
    33     jmp     Int13h_PopDiDsAndReturn
     21    LOAD_BDA_SEGMENT_TO ds, ax, !
     22    xchg    ah, [BDA.bHDLastSt]     ; Load and clear last error
     23    call    HError_SetErrorCodeToIntpackInSSBPfromAH
     24    jmp     Int13h_ReturnFromHandlerWithoutStoringErrorCode
Note: See TracChangeset for help on using the changeset viewer.