Changeset 492 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenu.asm
- Timestamp:
- Dec 21, 2012, 1:01:55 AM (12 years ago)
- google:author:
- gregli@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenu.asm
r392 r492 24 24 ; Displays Boot Menu and returns Drive or Function number. 25 25 ; 26 ; BootMenu_DisplayAnd ReturnSelectionInDX26 ; BootMenu_DisplayAndStoreSelection 27 27 ; Parameters: 28 28 ; DS: RAMVARS segment 29 29 ; 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 31 33 ; Corrupts registers: 32 34 ; All General Purpose Registers 33 35 ;-------------------------------------------------------------------- 34 BootMenu_DisplayAnd StoreSelectionAsHotkey:36 BootMenu_DisplayAndReturnDriveInDLRomBootClearCF: 35 37 call DriveXlate_Reset 36 38 … … 38 40 CALL_MENU_LIBRARY DisplayWithHandlerInBXandUserDataInDXAX 39 41 42 xchg cx, ax 43 40 44 ; Clear Boot Menu from screen 41 45 mov ax, ' ' | (MONO_NORMAL<<8) 42 46 CALL_DISPLAY_LIBRARY ClearScreenWithCharInALandAttrInAH 43 ret44 47 48 ; fall through to BootMenu_GetDriveToDXforMenuitemInCX 45 49 46 50 ;-------------------------------------------------------------------- … … 52 56 ; DS: RAMVARS segment 53 57 ; CF: Set: There is a selected menu item, DL is valid 54 ; Clear: The re is no selected menu item, DL is not valid58 ; Clear: The item selected is Rom Boot, DL is not valid 55 59 ; 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. 57 65 ;-------------------------------------------------------------------- 58 66 BootMenu_GetDriveToDXforMenuitemInCX: 59 cmp cl, NO_ITEM_HIGHLIGHTED60 je SHORT .ReturnFloppyDriveInDX ; Clear CF if branch taken61 62 67 mov dl, cl ; Copy menuitem index to DX 63 68 call FloppyDrive_GetCountToAX … … 65 70 jb SHORT .ReturnFloppyDriveInDX ; Set CF if branch taken 66 71 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 69 73 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 71 78 .ReturnFloppyDriveInDX: 72 79 ret
Note:
See TracChangeset
for help on using the changeset viewer.