Ignore:
Timestamp:
Dec 21, 2012, 1:01:55 AM (11 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Removed the dependency between MODULE_BOOT_MENU and MODULE_HOTKEYS. With these changes, 0, 1, or 2 of them can be included in a build. This change also means that the hotkeys don't work while the menu is up. But the most important hotkey there was for Rom Boot, and that has been added to the menu as a choice proper. Lots of changes across the board in the hotkeys code - even if we eventually back this change out (becaue, for example we want hotkeys to work in the menu) we should probably start from this base and add that functionality back in, as these changes results in approximately 120 bytes of savings and includes new functionality, such as the Rom Boot menu item and the Com Detect hotkey.

File:
1 edited

Legend:

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

    r392 r492  
    2424; Displays Boot Menu and returns Drive or Function number.
    2525;
    26 ; BootMenu_DisplayAndReturnSelectionInDX
     26; BootMenu_DisplayAndStoreSelection
    2727;   Parameters:
    2828;       DS:     RAMVARS segment
    2929;   Returns:
    30 ;       Nothing, selected drive is converted to hotkey
     30;       DL:     Drive number selected
     31;       CF:     Set if selected item is an actual drive, DL is valid
     32;               Clear if selected item is Rom Boot, DL is invalid
    3133;   Corrupts registers:
    3234;       All General Purpose Registers
    3335;--------------------------------------------------------------------
    34 BootMenu_DisplayAndStoreSelectionAsHotkey:
     36BootMenu_DisplayAndReturnDriveInDLRomBootClearCF:
    3537    call    DriveXlate_Reset
    3638
     
    3840    CALL_MENU_LIBRARY   DisplayWithHandlerInBXandUserDataInDXAX
    3941
     42    xchg    cx, ax
     43       
    4044    ; Clear Boot Menu from screen
    4145    mov     ax, ' ' | (MONO_NORMAL<<8)
    4246    CALL_DISPLAY_LIBRARY    ClearScreenWithCharInALandAttrInAH
    43     ret
    4447
     48    ; fall through to BootMenu_GetDriveToDXforMenuitemInCX
    4549
    4650;--------------------------------------------------------------------
     
    5256;       DS:     RAMVARS segment
    5357;       CF:     Set: There is a selected menu item, DL is valid
    54 ;               Clear: There is no selected menu item, DL is not valid
     58;               Clear: The item selected is Rom Boot, DL is not valid
    5559;   Corrupts registers:
    56 ;       AX, DI
     60;       AX, BX, DI
     61;
     62; NOTE: We can't use the menu structure in here, as we are falling through
     63; through from BootMenu_DisplayAndReturnDriveInDLRomBootClearCF when the
     64; menu structure has already been destroyed.
    5765;--------------------------------------------------------------------
    5866BootMenu_GetDriveToDXforMenuitemInCX:
    59     cmp     cl, NO_ITEM_HIGHLIGHTED
    60     je      SHORT .ReturnFloppyDriveInDX    ; Clear CF if branch taken
    61 
    6267    mov     dl, cl                          ; Copy menuitem index to DX
    6368    call    FloppyDrive_GetCountToAX
     
    6570    jb      SHORT .ReturnFloppyDriveInDX    ; Set CF if branch taken
    6671    or      al, 80h                         ; Or 80h into AL before the sub
    67                                             ; to cause CF to be set after
    68                                             ; and result has high order bit set
     72                                            ; shorter instruction than or'ing it in afterward
    6973    sub     dl, al                          ; Remove floppy drives from index
    70 
     74    call    RamVars_GetHardDiskCountFromBDAtoAX
     75    or      al, 80h                         ; Or 80h into AL before the sub             
     76    cmp     dl, al                          ; Set CF if hard disk
     77                                            ; Clear CF if last item, beyond hard disk list, which indicates ROM boot
    7178.ReturnFloppyDriveInDX:
    7279    ret
Note: See TracChangeset for help on using the changeset viewer.