Changeset 92 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm


Ignore:
Timestamp:
Jan 27, 2011, 5:44:27 PM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to XTIDE Universal BIOS:

  • Removed ROM Boot from boot menu and created a hotkey for it.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm

    r88 r92  
    2727    cmp     cx, BYTE NO_ITEM_SELECTED
    2828    je      SHORT BootMenu_DisplayAndReturnSelection
    29     jmp     BootMenu_ConvertMenuitemToDriveOrFunction
     29    jmp     SHORT BootMenu_ConvertMenuitemFromCXtoDriveInDX
    3030
    3131
     
    6666    call    FloppyDrive_GetCount
    6767    add     ax, cx
    68     call    BootMenu_GetMenuFunctionCount
    69     add     cx, ax
    70     ret
    71 
    72 ;--------------------------------------------------------------------
    73 ; Returns number of functions displayed in Boot Menu.
    74 ;
    75 ; BootMenu_GetMenuFunctionCount
    76 ;   Parameters:
    77 ;       Nothing
    78 ;   Returns:
    79 ;       CX:     Number of boot menu functions
    80 ;   Corrupts registers:
    81 ;       Nothing
    82 ;--------------------------------------------------------------------
    83 ALIGN JUMP_ALIGN
    84 BootMenu_GetMenuFunctionCount:
    85     xor     cx, cx
    86     test    BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_ROMBOOT
    87     jz      SHORT .DontIncludeRomBoot
    88     inc     cx
    89 ALIGN JUMP_ALIGN
    90 .DontIncludeRomBoot:
    9168    ret
    9269
     
    11087
    11188;--------------------------------------------------------------------
    112 ; Converts any hotkey to Boot Menu menuitem index.
    113 ;
    114 ; BootMenu_ConvertHotkeyToMenuitem
    115 ;   Parameters:
    116 ;       AX:     ASCII hotkey starting from upper case 'A'
     89; BootMenu_ConvertAsciiHotkeyFromALtoMenuitemInCX
     90;   Parameters:
     91;       AL:     ASCII hotkey starting from upper case 'A'
    11792;   Returns:
    11893;       CX:     Menuitem index
     
    12196;--------------------------------------------------------------------
    12297ALIGN JUMP_ALIGN
    123 BootMenu_ConvertHotkeyToMenuitem:
    124     call    BootMenu_GetLetterForFirstHardDisk
     98BootMenu_ConvertAsciiHotkeyFromALtoMenuitemInCX:
     99    call    BootMenu_GetLetterForFirstHardDiskToCL
    125100    cmp     al, cl                      ; Letter is for Hard Disk?
    126101    jae     SHORT .StartFromHardDiskLetter
     
    139114; can be higher if more than two floppy drives are found.
    140115;
    141 ; BootMenu_GetLetterForFirstHardDisk
     116; BootMenu_GetLetterForFirstHardDiskToCL
    142117;   Parameters:
    143118;       Nothing
     
    148123;--------------------------------------------------------------------
    149124ALIGN JUMP_ALIGN
    150 BootMenu_GetLetterForFirstHardDisk:
     125BootMenu_GetLetterForFirstHardDiskToCL:
    151126    call    FloppyDrive_GetCount
    152127    add     cl, 'A'
     
    156131
    157132;--------------------------------------------------------------------
    158 ; Converts selected menuitem index to drive number or function ID.
    159 ;
    160 ; BootMenu_ConvertMenuitemToDriveOrFunction
     133; BootMenu_ConvertMenuitemFromCXtoDriveInDX
    161134;   Parameters:
    162135;       CX:     Index of menuitem selected from Boot Menu
    163136;       DS:     RAMVARS segment
    164137;   Returns:
    165 ;       DX:     Drive number to be used for booting (if CF cleared)
    166 ;               Function ID (if CF set)
    167 ;       CF:     Cleared if drive selected
    168 ;               Set if function selected
    169 ;   Corrupts registers:
    170 ;       AX, CX
    171 ;--------------------------------------------------------------------
    172 ALIGN JUMP_ALIGN
    173 BootMenu_ConvertMenuitemToDriveOrFunction:
     138;       DX:     Drive number to be used for booting
     139;   Corrupts registers:
     140;       CX
     141;--------------------------------------------------------------------
     142ALIGN JUMP_ALIGN
     143BootMenu_ConvertMenuitemFromCXtoDriveInDX:
    174144    mov     dx, cx                  ; Copy menuitem index to DX
    175145    call    FloppyDrive_GetCount
     
    177147    jb      SHORT .ReturnFloppyDriveInDX
    178148    sub     dx, cx                  ; Remove floppy drives from index
    179     call    RamVars_GetHardDiskCountFromBDAtoCX
    180     cmp     dx, cx                  ; Hard disk?
    181     jb      SHORT .ReturnHardDiskInDX
    182     sub     dx, cx                  ; Remove hard disks from index
    183     jmp     SHORT BootMenu_ConvertFunctionIndexToID
    184 ALIGN JUMP_ALIGN
    185 .ReturnHardDiskInDX:
    186149    or      dl, 80h
    187 ALIGN JUMP_ALIGN
    188150.ReturnFloppyDriveInDX:
    189     clc
    190     ret
    191 
    192 
    193 ;--------------------------------------------------------------------
    194 ; Converts selected menuitem index to drive number or function ID.
    195 ;
    196 ; BootMenu_ConvertFunctionIndexToID
    197 ;   Parameters:
    198 ;       CX:     Menuitem index
    199 ;       DX:     Function index (Menuitem index - floppy count - HD count)
    200 ;   Returns:
    201 ;       DX:     Function ID
    202 ;       CF:     Set to indicate function
    203 ;   Corrupts registers:
    204 ;       AX, CX
    205 ;--------------------------------------------------------------------
    206 ALIGN JUMP_ALIGN
    207 BootMenu_ConvertFunctionIndexToID:
    208     mov     dx, ID_BOOTFUNC_ROMBOOT
    209     stc
    210151    ret
    211152
Note: See TracChangeset for help on using the changeset viewer.