Changeset 95 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm


Ignore:
Timestamp:
Jan 28, 2011, 11:55:34 AM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to XTIDE Universal BIOS:

  • Smaller boot sector loading string.
  • Cleaned boot code a bit.
File:
1 edited

Legend:

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

    r90 r95  
    2525Int19h_TryToLoadBootSectorFromDL:
    2626    call    BootPrint_TryToBootFromDL
    27     call    Int19h_LoadFirstSectorFromDL
     27    call    LoadFirstSectorFromDriveDL
    2828    jc      SHORT .FailedToLoadFirstSector
    2929
     
    3333    jne     SHORT .FirstHardDiskSectorNotBootable
    3434.AlwaysBootFromFloppyDriveForBooterGames:
    35     call    BootPrint_BootSectorLoaded
     35    mov     bx, g_szFound
     36    call    BootPrint_BootSectorResultStringFromBX
    3637    stc
    3738    ret
     
    4142    ret
    4243.FirstHardDiskSectorNotBootable:
    43     call    BootPrint_FirstSectorNotBootable
     44    mov     bx, g_szNotFound
     45    call    BootPrint_BootSectorResultStringFromBX
    4446    clc
    4547    ret
    4648
    4749;--------------------------------------------------------------------
    48 ; Reads first sector (boot sector) from drive DL.
    49 ;
    50 ; Int19h_LoadFirstSectorFromDL
     50; LoadFirstSectorFromDriveDL
    5151;   Parameters:
    5252;       DL:     Drive to boot from (translated, 00h or 80h)
     
    6060;--------------------------------------------------------------------
    6161ALIGN JUMP_ALIGN
    62 Int19h_LoadFirstSectorFromDL:
     62LoadFirstSectorFromDriveDL:
    6363    LOAD_BDA_SEGMENT_TO es, bx              ; ES:BX now points to...
    6464    mov     bx, BOOTVARS.rgbBootSect        ; ...boot sector location
    65     mov     di, B_READ_RETRY_TIMES          ; Retry counter
     65    mov     di, B_READ_RETRY_TIMES          ; Initialize retry counter
    6666ALIGN JUMP_ALIGN
    6767.ReadRetryLoop:
     
    9090    xor     ax, ax                          ; AH=0h, Disk Controller Reset
    9191    test    dl, 80h                         ; Floppy drive?
    92     jz      SHORT .ResetDriveFromDL         ;  If so, jump to reset
    93     mov     ah, 0Dh                         ; AH=Dh, Reset Hard Disk (Alternate reset)
    94 .ResetDriveFromDL:
     92    eCMOVNZ ah, 0Dh                         ; AH=Dh, Reset Hard Disk (Alternate reset)
    9593    int     INTV_DISK_FUNC
    9694    ret
     
    155153    mov     es, ax
    156154    ret
    157 
    158 
    159 ;--------------------------------------------------------------------
    160 ; Calls INT 18h (ROM Basic or Boot Failure). Called after booting from
    161 ; floppy drive or hard disk fails.
    162 ;
    163 ; Int19h_BootFailure
    164 ;   Parameters:
    165 ;       Nothing
    166 ;   Returns:
    167 ;       Should never return (but might)
    168 ;--------------------------------------------------------------------
    169 ALIGN JUMP_ALIGN
    170 Int19h_BootFailure:
    171     call    Int19h_ClearSegmentsForBoot
    172     int     INTV_BOOT_FAILURE
    173     ret
Note: See TracChangeset for help on using the changeset viewer.