Changeset 130 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm
- Timestamp:
- Mar 4, 2011, 5:54:41 PM (14 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm
r128 r130 24 24 cmp cx, BYTE NO_ITEM_SELECTED 25 25 je SHORT BootMenu_DisplayAndReturnSelection ; Clear screen and display menu 26 ; Fall t hrough to BootMenu_ConvertMenuitemFromCXtoDriveInDX26 ; Fall to BootMenu_GetDriveToDXforMenuitemInCX 27 27 28 28 ;-------------------------------------------------------------------- 29 ; BootMenu_ ConvertMenuitemFromCXtoDriveInDX29 ; BootMenu_GetDriveToDXforMenuitemInCX 30 30 ; Parameters: 31 31 ; CX: Index of menuitem selected from Boot Menu … … 37 37 ;-------------------------------------------------------------------- 38 38 ALIGN JUMP_ALIGN 39 BootMenu_ ConvertMenuitemFromCXtoDriveInDX:39 BootMenu_GetDriveToDXforMenuitemInCX: 40 40 mov dx, cx ; Copy menuitem index to DX 41 41 call FloppyDrive_GetCountToCX … … 107 107 108 108 ;-------------------------------------------------------------------- 109 ; BootMenu_ ConvertAsciiHotkeyFromALtoMenuitemInCX109 ; BootMenu_GetMenuitemToAXforAsciiHotkeyInAL 110 110 ; Parameters: 111 ; AL: ASCII hotkey starting from upper case 'A'111 ; AL: ASCII hotkey 112 112 ; Returns: 113 ; CX: Menuitem index113 ; AX: Menuitem index 114 114 ; Corrupts registers: 115 ; AX115 ; CX 116 116 ;-------------------------------------------------------------------- 117 117 ALIGN JUMP_ALIGN 118 BootMenu_ConvertAsciiHotkeyFromALtoMenuitemInCX: 118 BootMenu_GetMenuitemToAXforAsciiHotkeyInAL: 119 call Char_ALtoUpperCaseLetter 119 120 call BootMenu_GetLetterForFirstHardDiskToCL 121 xor ah, ah 120 122 cmp al, cl ; Letter is for Hard Disk? 121 123 jae SHORT .StartFromHardDiskLetter 122 124 sub al, 'A' ; Letter to Floppy Drive menuitem 123 xchg ax, cx ; Menuitem index to CX124 125 ret 125 126 ALIGN JUMP_ALIGN … … 127 128 sub al, cl ; Hard Disk index 128 129 call FloppyDrive_GetCountToCX 129 add cx, ax ; Menuitem index130 add ax, cx ; Menuitem index 130 131 ret 131 132 … … 188 189 BootMenu_IsDriveInSystem: 189 190 test dl, dl ; Floppy drive? 190 jns SHORT .IsFloppyDriveI sInSystem191 jns SHORT .IsFloppyDriveInSystem 191 192 call RamVars_GetHardDiskCountFromBDAtoCX ; Hard Disk count to CX 192 193 or cl, 80h ; Set Hard Disk bit to CX 193 194 jmp SHORT .CompareDriveNumberToDriveCount 194 .IsFloppyDriveI sInSystem:195 .IsFloppyDriveInSystem: 195 196 call FloppyDrive_GetCountToCX 196 197 .CompareDriveNumberToDriveCount:
Note:
See TracChangeset
for help on using the changeset viewer.