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


Ignore:
Timestamp:
Mar 4, 2011, 5:54:41 PM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to XTIDE Universal BIOS:

  • Boot menu finally works but timeout and drive numbers not yet implemented.
File:
1 edited

Legend:

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

    r128 r130  
    2424    cmp     cx, BYTE NO_ITEM_SELECTED
    2525    je      SHORT BootMenu_DisplayAndReturnSelection    ; Clear screen and display menu
    26     ; Fall through to BootMenu_ConvertMenuitemFromCXtoDriveInDX
     26    ; Fall to BootMenu_GetDriveToDXforMenuitemInCX
    2727
    2828;--------------------------------------------------------------------
    29 ; BootMenu_ConvertMenuitemFromCXtoDriveInDX
     29; BootMenu_GetDriveToDXforMenuitemInCX
    3030;   Parameters:
    3131;       CX:     Index of menuitem selected from Boot Menu
     
    3737;--------------------------------------------------------------------
    3838ALIGN JUMP_ALIGN
    39 BootMenu_ConvertMenuitemFromCXtoDriveInDX:
     39BootMenu_GetDriveToDXforMenuitemInCX:
    4040    mov     dx, cx                  ; Copy menuitem index to DX
    4141    call    FloppyDrive_GetCountToCX
     
    107107
    108108;--------------------------------------------------------------------
    109 ; BootMenu_ConvertAsciiHotkeyFromALtoMenuitemInCX
     109; BootMenu_GetMenuitemToAXforAsciiHotkeyInAL
    110110;   Parameters:
    111 ;       AL:     ASCII hotkey starting from upper case 'A'
     111;       AL:     ASCII hotkey
    112112;   Returns:
    113 ;       CX:     Menuitem index
     113;       AX:     Menuitem index
    114114;   Corrupts registers:
    115 ;       AX
     115;       CX
    116116;--------------------------------------------------------------------
    117117ALIGN JUMP_ALIGN
    118 BootMenu_ConvertAsciiHotkeyFromALtoMenuitemInCX:
     118BootMenu_GetMenuitemToAXforAsciiHotkeyInAL:
     119    call    Char_ALtoUpperCaseLetter
    119120    call    BootMenu_GetLetterForFirstHardDiskToCL
     121    xor     ah, ah
    120122    cmp     al, cl                      ; Letter is for Hard Disk?
    121123    jae     SHORT .StartFromHardDiskLetter
    122124    sub     al, 'A'                     ; Letter to Floppy Drive menuitem
    123     xchg    ax, cx                      ; Menuitem index to CX
    124125    ret
    125126ALIGN JUMP_ALIGN
     
    127128    sub     al, cl                      ; Hard Disk index
    128129    call    FloppyDrive_GetCountToCX
    129     add     cx, ax                      ; Menuitem index
     130    add     ax, cx                      ; Menuitem index
    130131    ret
    131132
     
    188189BootMenu_IsDriveInSystem:
    189190    test    dl, dl                              ; Floppy drive?
    190     jns     SHORT .IsFloppyDriveIsInSystem
     191    jns     SHORT .IsFloppyDriveInSystem
    191192    call    RamVars_GetHardDiskCountFromBDAtoCX ; Hard Disk count to CX
    192193    or      cl, 80h                             ; Set Hard Disk bit to CX
    193194    jmp     SHORT .CompareDriveNumberToDriveCount
    194 .IsFloppyDriveIsInSystem:
     195.IsFloppyDriveInSystem:
    195196    call    FloppyDrive_GetCountToCX
    196197.CompareDriveNumberToDriveCount:
Note: See TracChangeset for help on using the changeset viewer.