Ignore:
Timestamp:
May 29, 2012, 7:24:58 PM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Motor spin up is now waited when resetting drive.
  • Optimized boot sector loading a bit.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h/BootSector.asm

    r392 r428  
    7373
    7474.ReadRetryLoop:
    75     call    .ResetBootDriveFromDL
    7675    call    .LoadFirstSectorFromDLtoESBX
    7776    jnc     SHORT .Return
    78     dec     di                              ; Decrement retry counter
    79     jnz     SHORT .ReadRetryLoop            ; Loop while retries left
    80 .Return:
    81     ret
     77    dec     di                              ; Decrement retry counter (preserve CF)
     78    jz      SHORT .Return                   ; Loop while retries left
    8279
    83 ;--------------------------------------------------------------------
    84 ; .ResetBootDriveFromDL
    85 ;   Parameters:
    86 ;       DL:     Drive to boot from (translated, 00h or 80h)
    87 ;   Returns:
    88 ;       AH:     INT 13h error code
    89 ;       CF:     Cleared if read successful
    90 ;               Set if any error
    91 ;   Corrupts registers:
    92 ;       AL
    93 ;--------------------------------------------------------------------
    94 .ResetBootDriveFromDL:
     80    ; Reset drive and retry
    9581    xor     ax, ax                          ; AH=0h, Disk Controller Reset
    9682    test    dl, dl                          ; Floppy drive?
    97     jns     SHORT .SkipAltReset
    98     mov     ah, 0Dh                         ; AH=Dh, Reset Hard Disk (Alternate reset)
    99 .SkipAltReset:
     83    eCMOVS  ah, RESET_HARD_DISK             ; AH=Dh, Reset Hard Disk (Alternate reset)
    10084    int     BIOS_DISK_INTERRUPT_13h
    101     ret
     85    jmp     SHORT .ReadRetryLoop
     86
    10287
    10388;--------------------------------------------------------------------
     
    119104    xor     dh, dh                          ; Head 0
    120105    int     BIOS_DISK_INTERRUPT_13h
     106.Return:
    121107    ret
Note: See TracChangeset for help on using the changeset viewer.