Changeset 96 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers


Ignore:
Timestamp:
Jan 28, 2011, 4:29:42 PM (14 years ago)
Author:
Tomi Tilli
google:author:
aitotat
Message:

Changes to XTIDE Universal BIOS:

  • Cleaned boot loader code some more.
Location:
trunk/XTIDE_Universal_BIOS/Src/Handlers
Files:
1 deleted
1 edited

Legend:

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

    r95 r96  
    2222
    2323    ; Install new INT 19h handler now that BOOTVARS has been initialized
    24     mov     WORD [INTV_BOOTSTRAP*4], Int19hMenu_Display
     24    mov     WORD [INTV_BOOTSTRAP*4], DisplayBootMenu
    2525    mov     WORD [INTV_BOOTSTRAP*4+2], cs
    26     ; Fall to Int19hMenu_Display
     26    ; Fall to DisplayBootMenu
    2727
    2828;--------------------------------------------------------------------
    29 ; Displays Boot Menu so user can select drive to boot from.
    30 ;
    31 ; Int19hMenu_Display
     29; DisplayBootMenu
    3230;   Parameters:
    3331;       Nothing
     
    3634;--------------------------------------------------------------------
    3735ALIGN JUMP_ALIGN
    38 Int19hMenu_Display:
    39     sti                                 ; Enable interrupts
     36DisplayBootMenu:
    4037    call    BootVars_SwitchToBootMenuStack
    4138    call    RamVars_GetSegmentToDS
    42     ; Fall to Int19hMenu_ProcessMenuSelectionsUntilBootable
     39    ; Fall to .ProcessMenuSelectionsUntilBootable
    4340
    4441;--------------------------------------------------------------------
    45 ; Processes user menu selections until bootable drive is selected.
    46 ;
    47 ; Int19hMenu_ProcessMenuSelectionsUntilBootable
     42; .ProcessMenuSelectionsUntilBootable
    4843;   Parameters:
    4944;       DS:     RAMVARS segment
     
    5247;--------------------------------------------------------------------
    5348ALIGN JUMP_ALIGN
    54 Int19hMenu_ProcessMenuSelectionsUntilBootable:
     49.ProcessMenuSelectionsUntilBootable:
    5550    call    BootMenu_DisplayAndReturnSelection
    5651    call    DriveXlate_ToOrBack         ; Translate drive number
    57     call    Int19h_TryToLoadBootSectorFromDL
    58     jnc     SHORT Int19hMenu_ProcessMenuSelectionsUntilBootable ; Boot failure, show menu again
     52    call    BootSector_TryToLoadFromDriveDL
     53    jnc     SHORT .ProcessMenuSelectionsUntilBootable   ; Boot failure, show menu again
    5954    call    BootVars_SwitchBackToPostStack
    60     jmp     Int19h_JumpToBootSector
     55    ; Fall to JumpToBootSector
     56
     57;--------------------------------------------------------------------
     58; JumpToBootSector
     59;   Parameters:
     60;       DL:     Drive to boot from (translated, 00h or 80h)
     61;       ES:BX:  Ptr to boot sector
     62;   Returns:
     63;       Never returns
     64;--------------------------------------------------------------------
     65ALIGN JUMP_ALIGN
     66JumpToBootSector:
     67    push    es                              ; Push boot sector segment
     68    push    bx                              ; Push boot sector offset
     69    call    ClearSegmentsForBoot
     70    xor     dh, dh                          ; Device supported by INT 13h
     71    retf
    6172
    6273
     
    7182Int19hMenu_RomBoot:
    7283    call    BootVars_SwitchBackToPostStack
    73     call    Int19h_ClearSegmentsForBoot
     84    call    ClearSegmentsForBoot
    7485    int     INTV_BOOT_FAILURE       ; Never returns
     86
     87
     88;--------------------------------------------------------------------
     89; ClearSegmentsForBoot
     90;   Parameters:
     91;       Nothing
     92;   Returns:
     93;       DS=ES:  Zero
     94;   Corrupts registers:
     95;       AX
     96;--------------------------------------------------------------------
     97ALIGN JUMP_ALIGN
     98ClearSegmentsForBoot:
     99    xor     ax, ax
     100    mov     ds, ax
     101    mov     es, ax
     102    ret
Note: See TracChangeset for help on using the changeset viewer.