Changeset 505 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Menus
- Timestamp:
- Feb 25, 2013, 4:23:09 PM (12 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Menus
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenu.asm
r492 r505 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 16 ; GNU General Public License for more details. 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 19 19 20 20 ; Section containing code … … 24 24 ; Displays Boot Menu and returns Drive or Function number. 25 25 ; 26 ; BootMenu_DisplayAnd StoreSelection26 ; BootMenu_DisplayAndReturnDriveInDLRomBootClearCF 27 27 ; Parameters: 28 28 ; DS: RAMVARS segment … … 41 41 42 42 xchg cx, ax 43 43 44 44 ; Clear Boot Menu from screen 45 45 mov ax, ' ' | (MONO_NORMAL<<8) … … 52 52 ; Parameters: 53 53 ; CX: Index of menuitem selected from Boot Menu 54 ; DS: RAMVARS segment 54 55 ; Returns: 55 56 ; DX: Drive number to be used for booting 56 ; DS: RAMVARS segment57 57 ; CF: Set: There is a selected menu item, DL is valid 58 58 ; Clear: The item selected is Rom Boot, DL is not valid 59 59 ; Corrupts registers: 60 ; AX, BX , DI60 ; AX, BX 61 61 ; 62 62 ; NOTE: We can't use the menu structure in here, as we are falling through 63 ; throughfrom BootMenu_DisplayAndReturnDriveInDLRomBootClearCF when the63 ; from BootMenu_DisplayAndReturnDriveInDLRomBootClearCF when the 64 64 ; menu structure has already been destroyed. 65 65 ;-------------------------------------------------------------------- … … 73 73 sub dl, al ; Remove floppy drives from index 74 74 call RamVars_GetHardDiskCountFromBDAtoAX 75 or al, 80h ; Or 80h into AL before the sub 75 or al, 80h ; Or 80h into AL before the sub 76 76 cmp dl, al ; Set CF if hard disk 77 77 ; Clear CF if last item, beyond hard disk list, which indicates ROM boot -
trunk/XTIDE_Universal_BIOS/Src/Menus/DriveXlate.asm
r493 r505 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 18 ; 19 19 20 20 ; Section containing code … … 48 48 %if HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber <> DriveXlate_ConvertDriveLetterInDLtoDriveNumber 49 49 %error "DriveXlate_ConvertDriveLetterInDLtoDriveNumber must be at the top of DriveXlate.asm, and that file must immediately follow HotKeys.asm" 50 %endif51 50 %endif 52 51 %endif 52 53 53 ;-------------------------------------------------------------------- 54 54 ; DriveXlate_ConvertDriveNumberFromDLtoDriveLetter … … 64 64 ;-------------------------------------------------------------------- 65 65 DriveXlate_ConvertDriveNumberFromDLtoDriveLetter: 66 test dl, dl67 j ns SHORT .GetDefaultFloppyDrive66 xor dl, 80h 67 js SHORT .GetDefaultFloppyDrive 68 68 69 69 ; Store default hard drive to boot from 70 70 call DriveXlate_GetLetterForFirstHardDriveToAX 71 sub dl, 80h72 71 add dl, al 73 72 stc … … 75 74 76 75 .GetDefaultFloppyDrive: 77 add dl, DEFAULT_FLOPPY_DRIVE_LETTER; Clears CF76 sub dl, 80h - DEFAULT_FLOPPY_DRIVE_LETTER ; Clears CF 78 77 ret 79 78 … … 96 95 MAX_U al, DEFAULT_HARD_DRIVE_LETTER 97 96 ret 98 97 99 98 100 99 ;-------------------------------------------------------------------- … … 168 167 mov al, dl ; Store floppy translation 169 168 SKIP2B di 170 .SetHardDriveToSwap: 169 .SetHardDriveToSwap: 171 170 mov ah, dl ; Store HD translation 172 171 mov WORD [RAMVARS.xlateVars+XLATEVARS.wFDandHDswap], ax -
trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm
r500 r505 34 34 call HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars 35 35 ; Fall to HotkeyBar_DrawToTopOfScreen 36 37 36 37 38 38 ;-------------------------------------------------------------------- 39 39 ; HotkeyBar_DrawToTopOfScreen … … 127 127 call FormatFunctionHotkeyString 128 128 %endif 129 ; Fall to .PrintRomBootHotkey 129 ; Fall to .PrintRomBootHotkey 130 130 131 131 ;-------------------------------------------------------------------- … … 169 169 ;-------------------------------------------------------------------- 170 170 HotkeyBar_ClearRestOfTopRow: 171 CALL_DISPLAY_LIBRARY 171 CALL_DISPLAY_LIBRARY GetColumnsToALandRowsToAH 172 172 eMOVZX cx, al 173 CALL_DISPLAY_LIBRARY 173 CALL_DISPLAY_LIBRARY GetSoftwareCoordinatesToAX 174 174 sub cl, al 175 175 mov al, ' ' 176 CALL_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX 177 ret 176 JMP_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX 178 177 179 178 … … 216 215 217 216 mov si, ATTRIBUTE_CHARS.cHurryTimeout ; Selected hotkey 218 j zSHORT GetDescriptionAttributeToDX ; From compare with bScancode above217 je SHORT GetDescriptionAttributeToDX ; From compare with bScancode above 219 218 220 219 GetNonSelectedHotkeyDescriptionAttributeToDX: … … 226 225 call MenuAttribute_GetToAXfromTypeInSI 227 226 xchg dx, ax ; DX = Description attribute 228 ;; fall through to PushHotkeyParamsAndFormat 227 ;; fall through to PushHotkeyParamsAndFormat 229 228 230 229 … … 232 231 233 232 mov dx, (COLOR_ATTRIBUTE(COLOR_YELLOW, COLOR_CYAN) << 8) | MONO_REVERSE_BLINK 234 j z SHORT SelectAttributeFromDHorDLbasedOnVideoMode; From compare with bScancode above233 je SHORT SelectAttributeFromDHorDLbasedOnVideoMode ; From compare with bScancode above 235 234 236 235 GetNonSelectedHotkeyDescriptionAttributeToDX: … … 245 244 mov dl, dh 246 245 .AttributeLoadedToDL: 247 ;; fall through to PushHotkeyParamsAndFormat 246 ;; fall through to PushHotkeyParamsAndFormat 248 247 249 248 %endif ; MODULE_BOOT_MENU … … 277 276 push di ; Description string 278 277 push cx ; Description string parameter 279 278 280 279 push si ; Key attribute for last space 281 280 … … 308 307 ;-------------------------------------------------------------------- 309 308 HotkeyBar_RestoreCursorCoordinatesFromAX: 310 CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 311 ret 309 JMP_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 312 310 313 311 … … 325 323 HotkeyBar_StoreHotkeyToBootvarsForDriveLetterInDL: 326 324 eMOVZX ax, dl 327 xor al, 32 ; Upper case drive letter to lower case keystroke325 or al, 32 ; Upper case drive letter to lower case keystroke 328 326 jmp SHORT HotkeyBar_StoreHotkeyToBootvarsIfValidKeystrokeInAX 329 327 … … 364 362 ; All scancodes are saved, even if it wasn't a drive letter, 365 363 ; which also covers our function key case. Invalid function keys 366 ; will not do anything (won't be printed, won't be accepted as input) 364 ; will not do anything (won't be printed, won't be accepted as input) 367 365 mov [es:di], ah 368 366 369 367 ; Drive letter hotkeys remaining, allow 'a' to 'z' 370 368 call Char_IsLowerCaseLetterInAL 371 369 jnc SHORT .KeystrokeIsNotValidDriveLetter 372 xor al,32 ; We want to print upper case letters370 and al, ~32 ; We want to print upper case letters 373 371 374 372 ; Clear HD First flag to assume Floppy Drive hotkey … … 377 375 378 376 ; Determine if Floppy or Hard Drive hotkey 379 eMOVZX cx, al ; Clear CH to clear scancode377 xchg cx, ax 380 378 call DriveXlate_GetLetterForFirstHardDriveToAX 381 379 cmp cl, al … … 386 384 387 385 .StoreDriveLetter: 388 sbb di, BYTE 1 ; Sub CF if Floppy Drive386 sbb di, BYTE 1 ; Sub CF if Floppy Drive 389 387 xchg ax, cx 390 mov [es:di], al ; AH = zero to clear function hotkey391 392 .KeystrokeIsNotValidDriveLetter: 388 mov [es:di], al 389 390 .KeystrokeIsNotValidDriveLetter: 393 391 NoHotkeyToProcess: 394 392 mov al, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode] … … 407 405 HotkeyBar_GetBootDriveNumbersToDX: 408 406 mov dx, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wFddAndHddLetters] 409 test BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags], FLG_HOTKEY_HD_FIRST 407 test BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags], FLG_HOTKEY_HD_FIRST 410 408 jnz .noflip 411 409 xchg dl, dh 412 .noflip: 410 .noflip: 413 411 call DriveXlate_ConvertDriveLetterInDLtoDriveNumber 414 412 xchg dl, dh 415 ; Fall to HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber 416 417 HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber: 418 413 ; Fall to HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber 414 415 HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber: 416
Note:
See TracChangeset
for help on using the changeset viewer.