Changeset 241 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm
- Timestamp:
- Feb 9, 2012, 11:08:59 AM (13 years ago)
- google:author:
- gregli@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm
r181 r241 22 22 call BootMenu_Enter ; Get selected menuitem index to CX 23 23 call BootMenuPrint_ClearScreen 24 c mp cx, BYTE NO_ITEM_SELECTED25 j e SHORT BootMenu_DisplayAndReturnSelection ; Clear screen and display menu26 ; Fall to BootMenu_GetDriveToDXforMenuitemInCX24 call BootMenu_GetDriveToDXforMenuitemInCX 25 jnc BootMenu_DisplayAndReturnSelection 26 ret 27 27 28 28 ;-------------------------------------------------------------------- … … 30 30 ; Parameters: 31 31 ; CX: Index of menuitem selected from Boot Menu 32 ; DS: RAMVARS segment33 32 ; Returns: 34 33 ; DX: Drive number to be used for booting 35 ; Corrupts registers: 36 ; CX 37 ;-------------------------------------------------------------------- 34 ; DS: RAMVARS segment 35 ; CF: Set: There is a selected menu item, DL is valid 36 ; Clear: There is no selected menu item, DL is not valid 37 ; Corrupts registers: 38 ; CX, DI 39 ;-------------------------------------------------------------------- 40 ALIGN JUMP_ALIGN 41 BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS: 42 call RamVars_GetSegmentToDS 43 ;;; fall-through 44 38 45 ALIGN JUMP_ALIGN 39 46 BootMenu_GetDriveToDXforMenuitemInCX: 40 mov dx, cx ; Copy menuitem index to DX 41 call FloppyDrive_GetCountToCX 42 cmp dx, cx ; Floppy drive? 43 jb SHORT .ReturnFloppyDriveInDX 44 sub dx, cx ; Remove floppy drives from index 45 or dl, 80h 47 cmp cl, NO_ITEM_HIGHLIGHTED 48 je SHORT .ReturnFloppyDriveInDX ; Clear CF if branch taken 49 50 mov dl, cl ; Copy menuitem index to DX 51 call FloppyDrive_GetCountToCX 52 cmp dl, cl ; Floppy drive? 53 jb SHORT .ReturnFloppyDriveInDX ; Set CF if branch taken 54 or cl, 80h ; Or 80h into CL before the sub 55 ; to cause CF to be set after 56 ; and result has high order bit set 57 sub dl, cl ; Remove floppy drives from index 58 46 59 .ReturnFloppyDriveInDX: 47 60 ret
Note:
See TracChangeset
for help on using the changeset viewer.