Changeset 492 in xtideuniversalbios
- Timestamp:
- Dec 21, 2012, 1:01:55 AM (12 years ago)
- google:author:
- gregli@hotmail.com
- Location:
- trunk
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/MenuEvents.inc
r198 r492 50 50 ; DS:SI: Ptr to initialized MENUINIT struct 51 51 .InitializeMenuinitFromDSSI resb 2 52 %define MENUEVENT_InitializeMenuinitFromDSSIMENUEVENT.InitializeMenuinitFromDSSI52 MENUEVENT_InitializeMenuinitFromDSSI equ MENUEVENT.InitializeMenuinitFromDSSI 53 53 54 54 ; Parameters: … … 58 58 ; Clear to cancel exit 59 59 .ExitMenu resb 2 60 %define MENUEVENT_ExitMenuMENUEVENT.ExitMenu60 MENUEVENT_ExitMenu equ MENUEVENT.ExitMenu 61 61 62 62 %ifdef MENUEVENT_IDLEPROCESSING_ENABLE … … 65 65 ; See the definition of MENUEVENT_IDLEPROCESSING_ENABLE below. 66 66 .IdleProcessing resb 2 67 %define MENUEVENT_IdleProcessingMENUEVENT.IdleProcessing67 MENUEVENT_IdleProcessing equ MENUEVENT.IdleProcessing 68 68 %endif 69 69 … … 72 72 ; DX: Index of previously highlighted item or NO_ITEM_HIGHLIGHTED 73 73 .ItemHighlightedFromCX resb 2 74 %define MENUEVENT_ItemHighlightedFromCXMENUEVENT.ItemHighlightedFromCX74 MENUEVENT_ItemHighlightedFromCX equ MENUEVENT.ItemHighlightedFromCX 75 75 76 76 ; Parameters: 77 77 ; CX: Index of selected item 78 78 .ItemSelectedFromCX resb 2 79 %define MENUEVENT_ItemSelectedFromCXMENUEVENT.ItemSelectedFromCX79 MENUEVENT_ItemSelectedFromCX equ MENUEVENT.ItemSelectedFromCX 80 80 81 81 ; Parameters: … … 83 83 ; AH: Keyboard library scan code for the key 84 84 .KeyStrokeInAX resb 2 85 %define MENUEVENT_KeyStrokeInAXMENUEVENT.KeyStrokeInAX85 MENUEVENT_KeyStrokeInAX equ MENUEVENT.KeyStrokeInAX 86 86 87 87 ; Parameters: … … 90 90 .RefreshTitle resb 2 91 91 .RefreshInformation resb 2 92 %define MENUEVENT_RefreshTitleMENUEVENT.RefreshTitle93 %define MENUEVENT_RefreshInformationMENUEVENT.RefreshInformation92 MENUEVENT_RefreshTitle equ MENUEVENT.RefreshTitle 93 MENUEVENT_RefreshInformation equ MENUEVENT.RefreshInformation 94 94 95 95 ; Parameters: … … 97 97 ; Cursor has been positioned to the beginning of item line 98 98 .RefreshItemFromCX resb 2 99 %define MENUEVENT_RefreshItemFromCXMENUEVENT.RefreshItemFromCX99 MENUEVENT_RefreshItemFromCX equ MENUEVENT.RefreshItemFromCX 100 100 endstruc 101 101 -
trunk/Assembly_Library/Src/Display/DisplayPage.asm
r376 r492 41 41 42 42 43 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 44 %define EXCLUDE 45 %ifdef MODULE_HOTKEYS 46 %undef EXCLUDE 47 %endif 48 %ifdef MODULE_BOOT_MENU 49 %undef EXCLUDE 50 %endif 51 %endif 52 53 %ifndef EXCLUDE 43 54 ;-------------------------------------------------------------------- 44 55 ; DisplayPage_GetColumnsToALandRowsToAH … … 56 67 mov ah, 25 ; Always 25 rows on standard text modes 57 68 ret 58 69 %endif 70 %undef EXCLUDE 59 71 60 72 ;-------------------------------------------------------------------- -
trunk/Assembly_Library/Src/Display/DisplayPrint.asm
r491 r492 296 296 %endif 297 297 298 298 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 299 %define EXCLUDE 300 %ifdef MODULE_HOTKEYS 301 %undef EXCLUDE 302 %endif 303 %ifdef MODULE_BOOT_MENU 304 %undef EXCLUDE 305 %endif 306 %endif 307 308 %ifndef EXCLUDE 299 309 ;-------------------------------------------------------------------- 300 310 ; DisplayPrint_RepeatCharacterFromALwithCountInCX … … 324 334 .NothingToRepeat: 325 335 ret 326 336 %endif 337 %undef EXCLUDE 327 338 328 339 ;-------------------------------------------------------------------- -
trunk/Assembly_Library/Src/Keyboard/Keyboard.asm
r407 r492 289 289 ; Nothing 290 290 ;-------------------------------------------------------------------- 291 292 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 293 %define EXCLUDE 294 %ifdef MODULE_HOTKEYS 295 %undef EXCLUDE 296 %endif 297 %ifdef MODULE_BOOT_MENU 298 %undef EXCLUDE 299 %endif 300 %endif 301 302 %ifndef EXCLUDE 303 291 304 ALIGN KEYBOARD_JUMP_ALIGN 292 305 Keyboard_GetKeystrokeToAXandLeaveItToBuffer: … … 294 307 int BIOS_KEYBOARD_INTERRUPT_16h 295 308 ret 309 296 310 ALIGN KEYBOARD_JUMP_ALIGN 297 311 Keyboard_GetKeystrokeToAX: … … 306 320 Keyboard_GetKeystrokeToAXReturn: 307 321 ret 322 323 %endif 324 %undef EXCLUDE -
trunk/Assembly_Library/Src/Menu/MenuEvent.asm
r376 r492 52 52 ; AX, BX, DX 53 53 ;-------------------------------------------------------------------- 54 %ifndef MENU_NO_ESC 54 55 ALIGN MENU_JUMP_ALIGN 55 56 MenuEvent_ExitMenu: 56 57 mov bl, MENUEVENT_ExitMenu 57 58 jmp SHORT MenuEvent_SendFromBX 58 59 %endif 60 59 61 60 62 %ifdef MENUEVENT_IDLEPROCESSING_ENABLE … … 153 155 ; AX, BX, DX 154 156 ;-------------------------------------------------------------------- 157 %ifdef MENUEVENT_KeyStrokInAX 155 158 ALIGN MENU_JUMP_ALIGN 156 159 MenuEvent_KeyStrokeInAX: 157 160 mov bl, MENUEVENT_KeyStrokeInAX 158 161 SKIP2B dx ; mov dx, <next instruction> 159 162 %endif 160 163 161 164 ;-------------------------------------------------------------------- -
trunk/Assembly_Library/Src/Menu/MenuLoop.asm
r376 r492 85 85 xchg ax, cx 86 86 call .ProcessMenuSystemKeystrokeFromAX 87 %ifdef MENUEVENT_KeyStrokeInAX 87 88 jc SHORT NoKeystrokeToProcess 88 89 jmp MenuEvent_KeyStrokeInAX 89 90 %else 91 jmp SHORT NoKeystrokeToProcess 92 %endif 93 90 94 ;-------------------------------------------------------------------- 91 95 ; .ProcessMenuSystemKeystrokeFromAX … … 104 108 ALIGN MENU_JUMP_ALIGN 105 109 .ProcessMenuSystemKeystrokeFromAX: 110 %ifndef MENU_NO_ESC 106 111 cmp al, ESC 107 112 je SHORT .LeaveMenuWithoutSelectingItem 113 %endif 108 114 cmp al, CR 109 115 je SHORT .SelectItem … … 113 119 ret ; Return with CF cleared since keystroke not processed 114 120 121 %ifndef MENU_NO_ESC 115 122 ALIGN MENU_JUMP_ALIGN 116 123 .LeaveMenuWithoutSelectingItem: … … 122 129 stc 123 130 ret 124 131 %endif 132 125 133 ALIGN MENU_JUMP_ALIGN 126 134 .SelectItem: -
trunk/Tools/StringsCompress.pl
r376 r492 318 318 # looking ahead as needed for possible space and null optimizations, compiling formats 319 319 # 320 for( $g = 0; $g < $#v -1; $g++ ) # -1 for the guard byte320 for( $g = 0; $g < $#v; $g++ ) 321 321 { 322 322 # -
trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc
r473 r492 22 22 %define BOOTVARS_INC 23 23 24 ; Default drives 25 DEFAULT_FLOPPY_DRIVE_LETTER EQU 'A' 26 DEFAULT_HARD_DRIVE_LETTER EQU 'C' 27 24 28 ; Number of times to retry booting before accepting error 25 29 BOOT_READ_RETRY_TIMES EQU 3 … … 43 47 .clearToZeroFromThisPoint: 44 48 %ifdef MODULE_HOTKEYS 45 .hotkeyVars resb HOTKEYVARS_size49 .hotkeyVars resb HOTKEYVARS_size 46 50 %endif 47 51 … … 50 54 51 55 %ifdef MODULE_HOTKEYS 56 52 57 struc HOTKEYVARS 53 58 .wTimeToClose resb 2 ; Earliest system time when Hotkey Bar can be closed 54 .bScancode resb 1 ; Function hotkey scancode55 .bFlags resb 1 ; Must be just before .bHddLetter!56 59 .wHddAndFddLetters: 60 .bFddLetter resb 1 ; Floppy Drive letter hotkey (upper case) 57 61 .bHddLetter resb 1 ; Hard Drive letter hotkey (upper case) 58 .bFddLetter resb 1 ; Floppy Drive letter hotkey (upper case) 62 .bFlags resb 1 ; Must be just after .bHddLetter! (dependency in Hotkeybar.asm) 63 .bScancode resb 1 ; Function hotkey scancode, must be just after .bFlags! 59 64 endstruc 60 65 61 ; Bit defines for HOTKEYVARS.bFlags 66 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 67 %if HOTKEYVARS.bFddLetter+1 != HOTKEYVARS.bHddLetter || HOTKEYVARS.bHddLetter+1 != HOTKEYVARS.bFlags || HOTKEYVARS.bFlags+1 != HOTKEYVARS.bScancode 68 %error "HOTKEYVARS: bytes need to come in the order .bFddLetter, then .bHddLetter, then .bFlags, then .bScancode" 69 %endif 70 %endif 71 72 ; Bit defines for KEYBOARDVARS.bFlags 62 73 FLG_HOTKEY_HD_FIRST EQU (1<<0) ; First try to boot from HDD, then FDD 63 74 64 %endif ; MODULE_HOTKEY 65 66 75 %endif ; MODULE_HOTKEYS 67 76 68 77 struc DRVDETECTINFO -
trunk/XTIDE_Universal_BIOS/Inc/HotkeyBar.inc
r413 r492 23 23 MIN_TIME_TO_DISPLAY_HOTKEY_BAR EQU (5000/55) ; 5000 ms 24 24 25 26 ; Hotkeys27 BOOT_MENU_HOTKEY_SCANCODE EQU 3Ch ; F228 25 ROM_BOOT_HOTKEY_SCANCODE EQU 42h ; F8 29 26 30 ; Default drives 31 DEFAULT_FLOPPY_DRIVE_LETTER EQU 'A' 32 DEFAULT_HARD_DRIVE_LETTER EQU 'C' 27 %ifdef MODULE_BOOT_MENU 28 BOOT_MENU_HOTKEY_SCANCODE EQU 3Ch ; F2 29 %endif 33 30 31 %ifdef MODULE_SERIAL 32 COM_DETECT_HOTKEY_SCANCODE EQU 40h ; F6 33 %endif 34 34 35 35 %endif ; HOTKEYBAR_INC -
trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc
r491 r492 18 18 ; 19 19 20 ; Boot Menu requires Hotkey support21 %ifdef MODULE_BOOT_MENU22 %ifndef MODULE_HOTKEYS23 %define MODULE_HOTKEYS24 %endif25 %endif26 27 20 %ifdef MODULE_SERIAL_FLOPPY 28 21 %ifndef MODULE_SERIAL … … 30 23 %endif 31 24 %endif 32 33 25 34 26 ; Include module specific .INC files … … 50 42 %ifdef MODULE_HOTKEYS 51 43 %include "HotkeyBar.inc" ; For Hotkeys 52 %ifdef MODULE_BOOT_MENU 53 %include "BootMenu.inc" ; For Boot Menu 54 %endif 44 %endif 45 46 %ifdef MODULE_BOOT_MENU 47 %include "BootMenu.inc" ; For Boot Menu 48 %endif 49 50 %ifdef MODULE_BOOT_MENU OR MODULE_HOTKEYS 51 %define MODULE_DRIVEXLATE 55 52 %endif 56 53 -
trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc
r444 r492 26 26 %endif 27 27 28 %ifdef MODULE_SERIAL_FLOPPY 29 %define NEED_XLATEVARS 30 %endif 31 32 %ifdef MODULE_DRIVEXLATE 33 %define NEED_XLATEVARS 34 %endif 35 36 28 37 ; RAM Variables. 29 38 ; Variables should be kept to minimum since they might be located … … 50 59 51 60 ; Variables for drive number translation 52 %ifdef MODULE_HOTKEYS61 %ifdef NEED_XLATEVARS 53 62 .xlateVars resb XLATEVARS_size 54 63 %endif … … 60 69 61 70 62 71 %ifdef NEED_XLATEVARS 63 72 ; Variables for translating drive numbers. 64 %ifdef MODULE_HOTKEYS65 73 struc XLATEVARS 66 74 %ifdef MODULE_SERIAL_FLOPPY … … 69 77 ; and number of drives (low order bit, max 2 drives supported). 70 78 ; During initialization, until the end of DetectDrives_FromAllIDEControllers, 71 ; this byte contains the raw number of floppy drives seen (using .bFlopCreateCnt) 79 ; this byte contains the raw number of floppy drives seen 80 ; (using .bFlopCreateCnt) 72 81 %else 73 82 resb 1 ; alignment 74 83 %endif 84 85 %ifdef MODULE_DRIVEXLATE 75 86 .bXlatedDrv resb 1 ; Drive number after translation 76 87 .wFDandHDswap: 77 88 .bFDSwap resb 1 ; Floppy Drive to swap to 00h and vice versa 78 89 .bHDSwap resb 1 ; Hard Drive to swap to 80h and vice versa 90 %else 91 resb 1 ; alignment 92 %endif 79 93 endstruc 80 94 %endif 81 82 95 83 96 %ifdef MODULE_SERIAL_FLOPPY -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
r417 r492 104 104 ;-------------------------------------------------------------------- 105 105 SelectDriveToBootFrom: 106 %ifdef MODULE_HOTKEYS 107 call HotkeyBar_UpdateDuringDriveDetection 108 106 107 ; The following macro could be easily inlined below. Why a macro? Depending on the combination 108 ; of MODULE_HOTKEYS or MODULE_BOOT_MENU, this code needs to either come before or after the 109 ; call to the boot menu. 110 ; 111 %macro TRY_TO_BOOT_DL_AND_DH_DRIVES 0 112 push dx ; it's OK if this is left on the stack, if we are 113 ; are successful, the following call does not return 114 call TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot 115 pop dx 116 mov dl, dh 117 call TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot 118 %endmacro 119 120 %ifdef MODULE_HOTKEYS 121 call HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars 122 cmp al, ROM_BOOT_HOTKEY_SCANCODE 123 jz JumpToBootSector_or_RomBoot ; CF clear so ROM boot 109 124 %ifdef MODULE_BOOT_MENU 110 mov di, BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode 111 cmp BYTE [es:di], BOOT_MENU_HOTKEY_SCANCODE 112 jne SHORT .DoNotDisplayBootMenu 113 114 ; Stop blinking the Boot Menu hotkey and display menu 115 mov BYTE [es:di], 0 116 call HotkeyBar_DrawToTopOfScreen 117 call BootMenu_DisplayAndStoreSelectionAsHotkey 118 .DoNotDisplayBootMenu: 119 %endif 120 121 ; Check if ROM boot (INT 18h) wanted 122 cmp BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode], ROM_BOOT_HOTKEY_SCANCODE 123 je SHORT JumpToBootSector_or_RomBoot ; CF clear so ROM boot 124 125 ; Get Primary boot drive number to DL 126 call HotkeyBar_GetPrimaryBootDriveNumberToDL 125 cmp al, BOOT_MENU_HOTKEY_SCANCODE 126 jz .BootMenu 127 %endif 128 call HotkeyBar_GetBootDriveNumbersToDX 129 .TryUsingHotKeysCode: 130 TRY_TO_BOOT_DL_AND_DH_DRIVES 131 ;; falls through to boot menu, if it is present. If not present, falls through to rom boot. 132 %endif 133 134 %ifdef MODULE_BOOT_MENU 135 .BootMenu: 136 call BootMenu_DisplayAndReturnDriveInDLRomBootClearCF 137 jnc JumpToBootSector_or_RomBoot ; CF clear so ROM boot 138 139 mov dh, dl ; Setup for secondary drive 140 not dh ; Floppy goes to HD, or vice veras 141 and dh, 080h ; Go to first drive of the floppy or HD set 142 143 %ifdef MODULE_HOTKEYS 144 jmp .TryUsingHotKeysCode 127 145 %else 146 TRY_TO_BOOT_DL_AND_DH_DRIVES 147 jmp .BootMenu 148 %endif 149 %endif 150 151 %ifndef MODULE_HOTKEYS 152 %ifndef MODULE_BOOT_MENU 128 153 xor dl, dl ; Try to boot from Floppy Drive A 129 %endif ; MODULE_HOTKEYS 130 131 ; Try to boot from Primary boot drive (00h by default) 132 call TryToBootFromPrimaryOrSecondaryBootDevice 133 jc SHORT JumpToBootSector_or_RomBoot 134 135 ; Try to boot from Secondary boot device (80h by default) 136 %ifdef MODULE_HOTKEYS 137 call HotkeyBar_GetSecondaryBootDriveNumberToDL 138 %else 154 call TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot 139 155 mov dl, 80h ; Try to boot from Hard Drive C 140 %endif 141 call TryToBootFromPrimaryOrSecondaryBootDevice 142 143 %ifdef MODULE_BOOT_MENU 144 ; Force Boot Menu hotkey to display boot menu 145 mov BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode], BOOT_MENU_HOTKEY_SCANCODE 146 jnc SHORT SelectDriveToBootFrom 147 %endif 148 ; Fall to JumpToBootSector_or_RomBoot 149 156 call TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot 157 %endif 158 %endif 159 160 %ifndef MODULE_BOOT_MENU 161 clc ; fall through with flag for ROM boot. Boot Menu goes back to menu and doesn't fall through. 162 %endif 150 163 151 164 ;-------------------------------------------------------------------- … … 203 216 ; AX, CX, DH, SI, DI, (DL if failed to read boot sector) 204 217 ;-------------------------------------------------------------------- 205 %ifndef MODULE_ HOTKEYS206 TryToBootFromPrimaryOrSecondaryBootDevice EQU BootSector_TryToLoadFromDriveDL218 %ifndef MODULE_DRIVEXLATE 219 TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot EQU BootSector_TryToLoadFromDriveDL_AndBoot 207 220 208 221 %else 209 TryToBootFromPrimaryOrSecondaryBootDevice :222 TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot: 210 223 call DriveXlate_SetDriveToSwap 211 224 call DriveXlate_ToOrBack 212 jmp BootSector_TryToLoadFromDriveDL 213 %endif 225 ; fall through to TryToBoot_FallThroughTo_BootSector_TryToLoadFromDriveDL_AndBoot 226 227 TryToBoot_FallThroughTo_BootSector_TryToLoadFromDriveDL_AndBoot: 228 ; fall through to BootSector_TryToLoadFromDriveDL_AndBoot 229 %endif 230 231 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h/BootSector.asm
r428 r492 33 33 ; AX, CX, DH, SI, DI, (DL if failed to read boot sector) 34 34 ;-------------------------------------------------------------------- 35 BootSector_TryToLoadFromDriveDL :35 BootSector_TryToLoadFromDriveDL_AndBoot: 36 36 call DetectPrint_TryToBootFromDL 37 37 call LoadFirstSectorFromDriveDL … … 44 44 .AlwaysBootFromFloppyDriveForBooterGames: 45 45 stc 46 ret46 jmp SHORT JumpToBootSector_or_RomBoot 47 47 .FailedToLoadFirstSector: 48 48 call DetectPrint_FailedToLoadFirstSector 49 clc50 49 ret 51 50 .FirstHardDiskSectorNotBootable: 52 51 mov si, g_szBootSectorNotFound 53 52 call DetectPrint_NullTerminatedStringFromCSSIandSetCF 54 clc55 53 ret 54 55 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 56 %ifdef MODULE_DRIVEXLATE 57 %if TryToBoot_FallThroughTo_BootSector_TryToLoadFromDriveDL_AndBoot <> BootSector_TryToLoadFromDriveDL_AndBoot 58 %error "TryToBoot_FallThroughTo_BootSector_TryToLoadFromDriveDL_AndBoot <> BootSector_TryToLoadFromDriveDL_AndBoot, BootSector must come immediately after int19h.asm" 59 %endif 60 %endif 61 %endif 56 62 57 63 ;-------------------------------------------------------------------- -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r491 r492 48 48 call StartDetectionWithDriveSelectByteInBHandStringInCX 49 49 50 %ifdef MODULE_HOTKEYS 51 call HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars ; Done here while CX is still protected 52 %endif 53 50 54 pop cx 51 55 … … 62 66 ; if serial drive detected, do not scan (avoids duplicate drives and isn't needed - we already have a connection) 63 67 ; 64 call FindDPT_ToDSDIforSerialDevice 68 call FindDPT_ToDSDIforSerialDevice ; does not modify AX 65 69 jnc .AddHardDisks 66 70 67 71 mov bp, ROMVARS.ideVarsSerialAuto ; Point to our special IDEVARS structure, just for serial scans 72 73 %ifdef MODULE_HOTKEYS 74 cmp al, COM_DETECT_HOTKEY_SCANCODE ; Set by last call to HotkeyBar_UpdateDuringDriveDetection above 75 jz .DriveDetectLoop 76 %endif 68 77 69 78 mov al,[cs:ROMVARS.wFlags] ; Configurator set to always scan? … … 192 201 %ifdef MODULE_HOTKEYS 193 202 call HotkeyBar_UpdateDuringDriveDetection 194 %endif 203 %endif 204 195 205 %ifdef MODULE_8BIT_IDE 196 206 pop dx -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm
r489 r492 34 34 ret 35 35 36 36 37 %ifdef MODULE_HOTKEYS 37 38 ;-------------------------------------------------------------------- 38 39 ; DetectPrint_GetSoftwareCoordinatesToAX … … 47 48 CALL_DISPLAY_LIBRARY GetSoftwareCoordinatesToAX 48 49 ret 49 50 50 %endif 51 52 51 53 ;-------------------------------------------------------------------- 52 54 ; DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP … … 227 229 mov bp, sp 228 230 229 %ifdef MODULE_ HOTKEYS231 %ifdef MODULE_DRIVEXLATE 230 232 231 233 call DriveXlate_ToOrBack ; DL = Untranslated Drive number … … 233 235 call DriveXlate_ToOrBack ; DL = Translated Drive number 234 236 235 call HotkeyBar_ConvertDriveNumberFromDLtoDriveLetter ; DL = Translated letter237 call DriveXlate_ConvertDriveNumberFromDLtoDriveLetter ; DL = Translated letter 236 238 xchg dl, dh 237 call HotkeyBar_ConvertDriveNumberFromDLtoDriveLetter ; DL = Untranslated letter239 call DriveXlate_ConvertDriveNumberFromDLtoDriveLetter ; DL = Untranslated letter 238 240 push dx 239 241 xchg dl, dh 240 242 push dx 241 243 242 call HotkeyBar_ConvertDriveLetterInDLtoDriveNumber ; Restore DL244 call DriveXlate_ConvertDriveLetterInDLtoDriveNumber ; Restore DL 243 245 244 246 %else … … 254 256 push ax 255 257 256 %endif ; MODULE_ HOTKEYS258 %endif ; MODULE_DRIVEXLATE 257 259 258 260 mov si, g_szTryToBoot -
trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm
r491 r492 41 41 ; If no drives detected, leave system INT 13h and 40h handlers 42 42 ; in place. We need our INT 13h handler to swap drive letters. 43 %ifndef MODULE_ HOTKEYS43 %ifndef MODULE_DRIVEXLATE 44 44 cmp BYTE [RAMVARS.bDrvCnt], 0 45 45 je SHORT Interrupts_InstallHandlerToVectorInALFromCSSI.Interrupts_Return -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r491 r492 36 36 %define MENUEVENT_INLINE_OFFSETS ; Only one menu required, save space and inline offsets 37 37 %define INCLUDE_MENU_LIBRARY 38 38 %define MENU_NO_ESC ; User cannot 'esc' out of the menu 39 39 %else ; If no boot menu included 40 40 %define INCLUDE_DISPLAY_LIBRARY … … 197 197 %ifdef MODULE_HOTKEYS 198 198 %include "HotkeyBar.asm" ; For hotkeys during drive detection and boot menu 199 %include "DriveXlate.asm" ; For swapping drive numbers 199 %endif 200 %ifdef MODULE_DRIVEXLATE 201 %include "DriveXlate.asm" ; For swapping drive numbers, must come immediately after HotkeyBar.asm 200 202 %endif 201 203 … … 211 213 ; Boot loader 212 214 %include "Int19h.asm" ; For Int 19h, Boot Loader 215 %include "BootSector.asm" ; For loading boot sector 213 216 %include "Int19hReset.asm" ; INT 19h handler for proper system reset 214 %include "BootSector.asm" ; For loading boot sector215 217 216 218 ; For all device types -
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 -
trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuEvent.asm
r489 r492 21 21 SECTION .text 22 22 23 24 ;--------------------------------------------------------------------25 ; GetDefaultMenuitemToDL26 ; Parameters:27 ; DL: Drive number28 ; ES: Ptr to BDA (zero)29 ; Returns:30 ; DL: Menuitem index (assuming drive is available)31 ; Corrupts registers:32 ; AX, DH33 ;--------------------------------------------------------------------34 GetDefaultMenuitemToDX:35 mov dx, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wHddAndFddLetters]36 test BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags], FLG_HOTKEY_HD_FIRST37 eCMOVZ dl, dh38 call IsDriveDLinSystem39 jnc SHORT BootMenuEvent_Handler.DoNotSetDefaultMenuitem40 call DriveXlate_SetDriveToSwap41 ; Fall to GetMenuitemToDXforDriveInDL42 43 44 23 ;-------------------------------------------------------------------- 45 24 ; GetMenuitemToDXforDriveInDL … … 63 42 64 43 ;-------------------------------------------------------------------- 65 ; IsDriveDLinSystem66 ; Parameters:67 ; DL: Drive number68 ; DS: RAMVARS segment69 ; Returns:70 ; CF: Set if drive number is valid71 ; Clear if drive is not present in system72 ; Corrupts registers:73 ; AX, CX74 ;--------------------------------------------------------------------75 IsDriveDLinSystem:76 test dl, dl ; Floppy drive?77 jns SHORT .IsFloppyDriveInSystem78 call RamVars_GetHardDiskCountFromBDAtoAX ; Hard Disk count to AX79 or al, 80h ; Set Hard Disk bit to AX80 jmp SHORT .CompareDriveNumberToDriveCount81 .IsFloppyDriveInSystem:82 call FloppyDrive_GetCountToAX83 .CompareDriveNumberToDriveCount:84 cmp dl, al ; Set CF when DL is smaller85 ret86 87 88 ;--------------------------------------------------------------------89 44 ; BootMenuEvent_Handler 90 45 ; Common parameters for all events: … … 115 70 MENUEVENT_ItemHighlightedFromCX equ (EventItemHighlightedFromCX - FirstEvent) 116 71 MENUEVENT_ItemSelectedFromCX equ (EventItemSelectedFromCX - FirstEvent) 117 MENUEVENT_KeyStrokeInAX equ (EventKeyStrokeInAX - FirstEvent)118 72 MENUEVENT_RefreshTitle equ (BootMenuPrint_TitleStrings - FirstEvent) 119 73 MENUEVENT_RefreshInformation equ (BootMenuPrint_RefreshInformation - FirstEvent) … … 164 118 EventInitializeMenuinitFromSSBP: 165 119 ; Store default Menuitem (=default drive to boot from) 166 call GetDefaultMenuitemToDX120 xor dx, dx 167 121 mov [bp+MENUINIT.wHighlightedItem], dx 168 122 … … 172 126 call FloppyDrive_GetCountToAX 173 127 add ax, cx 128 inc ax ; extra entry for ROM Boot item 174 129 mov [bp+MENUINIT.wItems], ax 175 130 176 131 ; Store menu size 177 132 mov WORD [bp+MENUINIT.wTitleAndInfoLines], BOOT_MENU_TITLE_AND_INFO_LINES … … 180 135 xchg cx, ax 181 136 CALL_DISPLAY_LIBRARY GetColumnsToALandRowsToAH 182 sub ah, MENU_SCREEN_BOTTOM_LINES*2 ; Leave space for Hotkey Bar183 137 MIN_U ah, cl 184 138 mov [bp+MENUINIT.bHeight], ah … … 207 161 EventItemHighlightedFromCX: 208 162 push cx 163 call DriveXlate_Reset 209 164 call BootMenu_GetDriveToDXforMenuitemInCX 210 call DriveXlate_Reset165 jnc .noDriveSwap 211 166 call DriveXlate_SetDriveToSwap 212 213 ; We need to generate keystroke so selection two drives is possible. 214 ; The secondary boot drive is selected by highlighting it using menu keys 215 ; and the primary boot drive is selected by pressing drive letter hotkey. 216 call BootVars_StoreHotkeyForDriveNumberInDL 217 call RedrawHotkeyBarFromInsideMenuEventHandler 218 167 .noDriveSwap: 168 219 169 ; Redraw changes in drive numbers 220 170 xor ax, ax ; Update first floppy drive (for translated drive number) … … 230 180 ret 231 181 232 233 ;-------------------------------------------------------------------- 234 ; EventKeyStrokeInAX 235 ; Parameters 236 ; AL: ASCII character for the key 237 ; AH: Keyboard library scan code for the key 238 ; DS: Ptr to RAMVARS 239 ; ES: Ptr to BDA (zero) 240 ; SS:BP: Menu library handle 241 ; Returns: 242 ; CF: Set if event processed 243 ; Cleared if event not processed 244 ; Corrupts registers: 245 ; Does not matter 246 ;-------------------------------------------------------------------- 247 EventKeyStrokeInAX: 248 cmp ah, BOOT_MENU_HOTKEY_SCANCODE 249 je SHORT BootMenuEvent_Completed ; Ignore Boot Menu hotkey 250 call HotkeyBar_StoreHotkeyToBootvarsIfValidKeystrokeInAX 251 jnc SHORT BootMenuEvent_Completed 252 253 ; Hotkey is now stored to BOOTVARS and menu can be closed 254 jmp SHORT CloseBootMenu 255 256 182 257 183 ;-------------------------------------------------------------------- 258 184 ; EventItemSelectedFromCX … … 269 195 ;-------------------------------------------------------------------- 270 196 EventItemSelectedFromCX: 271 call BootMenu_GetDriveToDXforMenuitemInCX272 jnc SHORT BootMenuEvent_Completed ; No menuitem selected273 274 ; Convert selected drive to hotkey keystroke275 call HotkeyBar_StoreHotkeyToBootvarsForDriveLetterInDL276 197 ; Fall to CloseBootMenu 277 198 … … 290 211 call DriveXlate_Reset 291 212 CALL_MENU_LIBRARY Close 292 ; Fall to RedrawHotkeyBarFromInsideMenuEventHandler293 294 295 ;--------------------------------------------------------------------296 ; RedrawHotkeyBarFromInsideMenuEventHandler297 ; Parameters298 ; DS: RAMVARS segment299 ; ES: BDA segment (zero)300 ; Returns:301 ; Nothing302 ; Corrupts registers:303 ; AX, BX, CX, DX, SI, DI304 ;--------------------------------------------------------------------305 RedrawHotkeyBarFromInsideMenuEventHandler:306 mov al, MONO_NORMAL307 CALL_DISPLAY_LIBRARY SetCharacterAttributeFromAL308 309 mov bl, ATTRIBUTES_ARE_USED310 mov ax, TELETYPE_OUTPUT_WITH_ATTRIBUTE311 CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInBL312 call HotkeyBar_DrawToTopOfScreen313 213 ; Fall to BootMenuEvent_Completed 314 214 315 215 316 216 ;-------------------------------------------------------------------- 317 217 ; BootMenuEvent_Completed -
trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm
r491 r492 33 33 ;-------------------------------------------------------------------- 34 34 BootMenuPrint_RefreshItem: 35 call BootMenu_GetDriveToDXforMenuitemInCX36 jnc BootMenuEvent_Completed ; if no menu item selected, out we go37 38 35 push bp 39 36 mov bp, sp 37 38 call BootMenu_GetDriveToDXforMenuitemInCX 39 mov si, g_szRomBootDash ; Standard "Rom Boot" but with a "-" at the front 40 mov al, 20h ; The space between "Rom" and "Boot" 41 jnc .ROMBoot ; display "Rom Boot" option for last entry 40 42 41 43 call FindDPT_ForDriveNumberInDL … … 57 59 mov ax, dx ; preserve DL for the floppy drive letter addition 58 60 call DriveXlate_ToOrBack 61 62 test dl, 0f0h ; if there is a character in the upper nibble 63 jnz .noSpace 64 dec si ; backup a character to a leading space 65 .noSpace: 66 59 67 push dx ; translated drive number 60 68 push bx ; sub string 61 69 add al, 'A' ; floppy drive letter (we always push this although 62 push ax ; the hard disks don't ever use it, but it does no harm) 70 ; the hard disks don't ever use it, but it does no harm) 71 .ROMBoot: 72 push ax 63 73 64 74 jmp SHORT BootMenuPrint_RefreshInformation.FormatRelay … … 95 105 96 106 call BootMenu_GetDriveToDXforMenuitemInCX 97 jnc BootMenuEvent_Completed ; if no menu selection, abort107 jnc BootMenuEvent_Completed ; nothing to display if "Rom Boot" option 98 108 99 109 push bp -
trunk/XTIDE_Universal_BIOS/Src/Menus/DriveXlate.asm
r397 r492 20 20 ; Section containing code 21 21 SECTION .text 22 23 ;-------------------------------------------------------------------- 24 ; DriveXlate_ConvertDriveLetterInDLtoDriveNumber 25 ; Parameters: 26 ; DS: RAMVARS segment 27 ; DL: Drive letter ('A'...) 28 ; Returns: 29 ; DL: Drive number (0xh for Floppy Drives, 8xh for Hard Drives) 30 ; Corrupts registers: 31 ; AX 32 ;-------------------------------------------------------------------- 33 DriveXlate_ConvertDriveLetterInDLtoDriveNumber: 34 call DriveXlate_GetLetterForFirstHardDriveToAX 35 cmp dl, al 36 jb SHORT .ConvertLetterInDLtoFloppyDriveNumber 37 38 ; Convert letter in DL to Hard Drive number 39 sub dl, al 40 or dl, 80h 41 ret 42 43 .ConvertLetterInDLtoFloppyDriveNumber: 44 sub dl, DEFAULT_FLOPPY_DRIVE_LETTER 45 ret 46 47 %ifdef MODULE_HOTKEY 48 %if HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber <> DriveXlate_ConvertDriveLetterInDLtoDriveNumber 49 %error "DriveXlate_ConvertDriveLetterInDLtoDriveNumber must be at the top of DriveXlate.asm, and that file must immediately follow HotKeys.asm" 50 %endif 51 %endif 52 53 ;-------------------------------------------------------------------- 54 ; DriveXlate_ConvertDriveNumberFromDLtoDriveLetter 55 ; Parameters: 56 ; DL: Drive number (0xh for Floppy Drives, 8xh for Hard Drives) 57 ; DS: RAMVARS Segment 58 ; Returns: 59 ; DL: Drive letter ('A'...) 60 ; CF: Set if Hard Drive 61 ; Clear if Floppy Drive 62 ; Corrupts registers: 63 ; AX 64 ;-------------------------------------------------------------------- 65 DriveXlate_ConvertDriveNumberFromDLtoDriveLetter: 66 test dl, dl 67 jns SHORT .GetDefaultFloppyDrive 68 69 ; Store default hard drive to boot from 70 call DriveXlate_GetLetterForFirstHardDriveToAX 71 sub dl, 80h 72 add dl, al 73 stc 74 ret 75 76 .GetDefaultFloppyDrive: 77 add dl, DEFAULT_FLOPPY_DRIVE_LETTER ; Clears CF 78 ret 79 80 81 ;-------------------------------------------------------------------- 82 ; Returns letter for first hard disk. Usually it will be 'C' but it 83 ; can be higher if more than two floppy drives are found. 84 ; 85 ; DriveXlate_GetLetterForFirstHardDriveToAX 86 ; Parameters: 87 ; DS: RAMVARS segment 88 ; Returns: 89 ; AX: Upper case letter for first hard disk 90 ; Corrupts registers: 91 ; Nothing 92 ;-------------------------------------------------------------------- 93 DriveXlate_GetLetterForFirstHardDriveToAX: 94 call FloppyDrive_GetCountToAX 95 add al, DEFAULT_FLOPPY_DRIVE_LETTER 96 MAX_U al, DEFAULT_HARD_DRIVE_LETTER 97 ret 98 22 99 23 100 ;-------------------------------------------------------------------- -
trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm
r491 r492 32 32 ;-------------------------------------------------------------------- 33 33 HotkeyBar_UpdateDuringDriveDetection: 34 call ScanHotkeysFromKeyBufferAndStoreToBootvars34 call HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars 35 35 ; Fall to HotkeyBar_DrawToTopOfScreen 36 37 36 37 38 38 ;-------------------------------------------------------------------- 39 39 ; HotkeyBar_DrawToTopOfScreen … … 66 66 ;-------------------------------------------------------------------- 67 67 .PrintFloppyDriveHotkeys: 68 mov cx, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wHddAndFddLetters] 69 68 70 call FloppyDrive_GetCountToAX 69 71 test ax, ax ; Any Floppy Drives? 70 72 jz SHORT .SkipFloppyDriveHotkeys 71 73 72 mov di, DEFAULT_FLOPPY_DRIVE_LETTER | (ANGLE_QUOTE_RIGHT<<8) 73 mov cl, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFddLetter] 74 mov si, g_szFDD 74 mov ax, (ANGLE_QUOTE_RIGHT << 8) | DEFAULT_FLOPPY_DRIVE_LETTER 75 mov di, g_szFDD 75 76 call FormatDriveHotkeyString 76 77 … … 88 89 ; AX, CX, DX, SI, DI 89 90 ;-------------------------------------------------------------------- 90 call HotkeyBar_GetLetterForFirstHardDriveToAX91 call DriveXlate_GetLetterForFirstHardDriveToAX 91 92 mov ah, ANGLE_QUOTE_RIGHT 92 xchg di, ax 93 mov cl, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bHddLetter] 94 mov si, g_szHDD 93 mov cl, ch 94 mov di, g_szHDD 95 95 call FormatDriveHotkeyString 96 96 ; Fall to .PrintBootMenuHotkey … … 107 107 .PrintBootMenuHotkey: 108 108 %ifdef MODULE_BOOT_MENU 109 mov ah, BOOT_MENU_HOTKEY_SCANCODE 110 mov di, 'F' | ('2'<<8) ; F2 111 mov si, g_szBootMenu 109 mov ax, BOOT_MENU_HOTKEY_SCANCODE | ('2' << 8) 110 mov di, g_szBootMenu 112 111 call FormatFunctionHotkeyString 113 112 %endif 114 ; Fall to .PrintRomBootHotkey 113 ; Fall to .PrintComDetectHotkey 114 115 ;-------------------------------------------------------------------- 116 ; .PrintComDetectHotkey 117 ; Parameters: 118 ; ES: BDA segment (zero) 119 ; Returns: 120 ; Nothing 121 ; Corrupts registers: 122 ; AX, CX, DX, SI, DI 123 ;-------------------------------------------------------------------- 124 .PrintComDetectHotkey: 125 %ifdef MODULE_SERIAL 126 mov ax, COM_DETECT_HOTKEY_SCANCODE | ('6' << 8) 127 mov di, g_szHotComDetect 128 call FormatFunctionHotkeyString 129 %endif 130 ; Fall to .PrintRomBootHotkey 115 131 116 132 ;-------------------------------------------------------------------- … … 124 140 ;-------------------------------------------------------------------- 125 141 .PrintRomBootHotkey: 126 mov ah, ROM_BOOT_HOTKEY_SCANCODE 127 mov di, 'F' | ('8'<<8) ; F8 128 mov si, g_szRomBoot 142 mov ax, ROM_BOOT_HOTKEY_SCANCODE | ('8' << 8) 143 mov di, g_szRomBoot 129 144 call FormatFunctionHotkeyString 130 145 ; Fall to .EndHotkeyBarRendering … … 168 183 ; Parameters: 169 184 ; CL: Drive letter hotkey from BOOTVARS 170 ; DI low:First character for drive key string171 ; DI high:Second character for drive key string (ANGLE_QUOTE_RIGHT)185 ; AL: First character for drive key string 186 ; AH: Second character for drive key string (ANGLE_QUOTE_RIGHT) 172 187 ; SI: Offset to hotkey description string 173 188 ; ES: BDA segment (zero) … … 177 192 ; AX, CX, DX, SI, DI 178 193 ;-------------------------------------------------------------------- 179 FormatDriveHotkeyString: 180 ePUSH_T ax, PushHotkeyParamsAndFormat 181 jmp SHORT GetNonSelectedHotkeyDescriptionAttributeToDX 182 194 ;; No work to do before going into FormatFunctionHotkeyString 195 FormatDriveHotkeyString equ GetNonSelectedHotkeyDescriptionAttributeToDX 183 196 184 197 ;-------------------------------------------------------------------- 185 198 ; FormatFunctionHotkeyString 186 199 ; Parameters: 187 ; AH: Hotkey scancode to compare with BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode 200 ; AL: Scancode of function key, to know which if any to show as selected 201 ; Later replaced with an 'F' for the call to the output routine 202 ; AH: Second character for drive key string 188 203 ; SI: Offset to hotkey description string 189 ; DI low: First character for drive key string190 ; DI high: Second character for drive key string191 204 ; ES: BDA segment (zero) 192 205 ; Returns: … … 196 209 ;-------------------------------------------------------------------- 197 210 FormatFunctionHotkeyString: 198 ePUSH_T ax, PushHotkeyParamsAndFormat 199 mov cx, g_szBoot ; Description parameter string 200 cmp [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode], ah 201 jne SHORT GetNonSelectedHotkeyDescriptionAttributeToDX 202 ; Fall to GetSelectedHotkeyDescriptionAttributeToDX 203 204 205 ;-------------------------------------------------------------------- 206 ; GetSelectedHotkeyDescriptionAttributeToDX 207 ; GetNonSelectedHotkeyDescriptionAttributeToDX 208 ; Parameters: 209 ; CF: Set if selected hotkey 210 ; Cleared if unselected hotkey 211 ; ES: BDA segment (zero) 212 ; Returns: 213 ; DX: Description Attribute 214 ; Corrupts registers: 215 ; AX 216 ;-------------------------------------------------------------------- 211 xor cx, cx ; Null character, eaten in output routines 212 213 cmp [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode], al 214 mov al, 'F' ; Replace scancode with character for output 215 217 216 %ifdef MODULE_BOOT_MENU 218 GetSelectedHotkeyDescriptionAttributeToDX: 219 push si 217 220 218 mov si, ATTRIBUTE_CHARS.cHurryTimeout ; Selected hotkey 221 j mp SHORT GetDescriptionAttributeToDX219 jz SHORT GetDescriptionAttributeToDX ; From compare with bScancode above 222 220 223 221 GetNonSelectedHotkeyDescriptionAttributeToDX: 224 push si225 222 mov si, ATTRIBUTE_CHARS.cHighlightedItem ; Unselected hotkey 226 223 227 224 ; Display Library should not be called like this 228 225 GetDescriptionAttributeToDX: 226 xchg dx, ax 229 227 call MenuAttribute_GetToAXfromTypeInSI 230 pop si231 228 xchg dx, ax ; DX = Description attribute 232 ret 233 234 %else ; No boot menu so use simpler attributes 235 236 GetSelectedHotkeyDescriptionAttributeToDX: 229 ;; fall through to PushHotkeyParamsAndFormat 230 231 %else ; MODULE_BOOT_MENU - No boot menu so use simpler attributes 232 237 233 mov dx, (COLOR_ATTRIBUTE(COLOR_YELLOW, COLOR_CYAN) << 8) | MONO_REVERSE_BLINK 238 j mp SHORT SelectAttributeFromDHorDLbasedOnVideoMode234 jz SHORT SelectAttributeFromDHorDLbasedOnVideoMode ; From compare with bScancode above 239 235 240 236 GetNonSelectedHotkeyDescriptionAttributeToDX: 241 237 mov dx, (COLOR_ATTRIBUTE(COLOR_BLACK, COLOR_CYAN) << 8) | MONO_REVERSE 238 242 239 SelectAttributeFromDHorDLbasedOnVideoMode: 243 240 mov al, [es:BDA.bVidMode] … … 248 245 mov dl, dh 249 246 .AttributeLoadedToDL: 250 ret251 252 %endif 247 ;; fall through to PushHotkeyParamsAndFormat 248 249 %endif ; MODULE_BOOT_MENU 253 250 254 251 … … 256 253 ; PushHotkeyParamsAndFormat 257 254 ; Parameters: 258 ; DI low:First character259 ; DI high:Second character255 ; BL: First character 256 ; BH: Second character 260 257 ; DX: Description Attribute 261 258 ; CX: Description string parameter 262 ; CS: SI: Description string259 ; CS:DI: Description string 263 260 ; Returns: 264 261 ; Nothing … … 270 267 mov bp, sp 271 268 272 mov ax, MONO_BRIGHT273 push ax ; Key attribute 274 xchg ax, di275 push ax ; First character276 xchgal, ah277 push ax ; Second character269 mov si, MONO_BRIGHT 270 271 push si ; Key attribute 272 push ax ; First Character 273 mov al, ah 274 push ax ; Second Character 278 275 279 276 push dx ; Description attribute 280 push si ; Description string277 push di ; Description string 281 278 push cx ; Description string parameter 282 283 push di ; Key attribute for last space 279 280 push si ; Key attribute for last space 281 284 282 mov si, g_szHotkey 285 283 jmp DetectPrint_FormatCSSIfromParamsInSSBP … … 332 330 333 331 ;-------------------------------------------------------------------- 334 ; ScanHotkeysFromKeyBufferAndStoreToBootvars335 ; Parameters: 336 ; DS: RAMVARS segment 337 ; ES: BDA segment (zero) 338 ; Returns: 339 ; Nothing340 ; Corrupts registers: 341 ; A X, CX342 ;-------------------------------------------------------------------- 343 ScanHotkeysFromKeyBufferAndStoreToBootvars:332 ; HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars 333 ; Parameters: 334 ; DS: RAMVARS segment 335 ; ES: BDA segment (zero) 336 ; Returns: 337 ; AL: Last scancode value 338 ; Corrupts registers: 339 ; AH, CX 340 ;-------------------------------------------------------------------- 341 HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars: 344 342 call Keyboard_GetKeystrokeToAX 345 343 jz SHORT NoHotkeyToProcess 346 344 347 ePUSH_T cx, ScanHotkeysFromKeyBufferAndStoreToBootvars345 ePUSH_T cx, HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars 348 346 ; Fall to HotkeyBar_StoreHotkeyToBootvarsIfValidKeystrokeInAX 349 347 … … 357 355 ; ES: BDA segment (zero) 358 356 ; Returns: 359 ; CF: Set if valid keystroke 360 ; Clear if invalid keystroke 361 ; Corrupts registers: 362 ; AX, CX, DI 357 ; AL: Last scancode seen 358 ; Corrupts registers: 359 ; AH, CX, DI 363 360 ;-------------------------------------------------------------------- 364 361 HotkeyBar_StoreHotkeyToBootvarsIfValidKeystrokeInAX: 365 ; Boot menu 366 %ifdef MODULE_BOOT_MENU 367 cmp ah, BOOT_MENU_HOTKEY_SCANCODE ; Display Boot Menu? 368 je SHORT .StoreFunctionHotkeyFromAH 369 %endif 370 371 ; ROM Boot 372 cmp ah, ROM_BOOT_HOTKEY_SCANCODE ; ROM Boot? 373 je SHORT .StoreFunctionHotkeyFromAH 374 362 mov di, BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode 363 364 ; All scancodes are saved, even if it wasn't a drive letter, 365 ; 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) 367 mov [es:di], ah 368 375 369 ; Drive letter hotkeys remaining, allow 'a' to 'z' 376 370 call Char_IsLowerCaseLetterInAL 377 jnc SHORT .KeystrokeIsNotValid Hotkey371 jnc SHORT .KeystrokeIsNotValidDriveLetter 378 372 xor al, 32 ; We want to print upper case letters 379 373 380 374 ; Clear HD First flag to assume Floppy Drive hotkey 381 mov di, BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags375 dec di 382 376 and BYTE [es:di], ~FLG_HOTKEY_HD_FIRST 383 377 384 378 ; Determine if Floppy or Hard Drive hotkey 385 379 eMOVZX cx, al ; Clear CH to clear scancode 386 call HotkeyBar_GetLetterForFirstHardDriveToAX380 call DriveXlate_GetLetterForFirstHardDriveToAX 387 381 cmp cl, al 388 382 jb SHORT .StoreDriveLetter ; Store Floppy Drive letter … … 392 386 393 387 .StoreDriveLetter: 394 adc di, BYTE 1 ; AddCF if Floppy Drive388 sbb di, BYTE 1 ; Sub CF if Floppy Drive 395 389 xchg ax, cx 396 390 mov [es:di], al ; AH = zero to clear function hotkey 397 391 398 .StoreFunctionHotkeyFromAH: 399 mov [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode], ah 400 stc ; Valid hotkey 401 402 .KeystrokeIsNotValidHotkey: 392 .KeystrokeIsNotValidDriveLetter: 403 393 NoHotkeyToProcess: 394 mov al, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode] 404 395 ret 405 396 406 407 ;-------------------------------------------------------------------- 408 ; HotkeyBar_GetSecondaryBootDriveNumberToDL 409 ; HotkeyBar_GetPrimaryBootDriveNumberToDL 410 ; Parameters: 411 ; DS: RAMVARS segment 412 ; ES: BDA segment (zero) 413 ; Returns: 414 ; DL: Drive selected as boot device 415 ; Corrupts registers: 416 ; AX, DH 417 ;-------------------------------------------------------------------- 418 HotkeyBar_GetSecondaryBootDriveNumberToDL: 397 ;-------------------------------------------------------------------- 398 ; HotkeyBar_GetBootDriveNumbersToDX 399 ; Parameters: 400 ; DS: RAMVARS segment 401 ; ES: BDA segment (zero) 402 ; Returns: 403 ; DX: Drives selected as boot device, DL is primary 404 ; Corrupts registers: 405 ; AX 406 ;-------------------------------------------------------------------- 407 HotkeyBar_GetBootDriveNumbersToDX: 419 408 mov dx, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wHddAndFddLetters] 409 test BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags], FLG_HOTKEY_HD_FIRST 410 jnz .noflip 420 411 xchg dl, dh 421 jmp SHORT GetBootDriveNumberFromLettersInDX 422 423 HotkeyBar_GetPrimaryBootDriveNumberToDL: 424 mov dx, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wHddAndFddLetters] 425 GetBootDriveNumberFromLettersInDX: 426 test BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags], FLG_HOTKEY_HD_FIRST 427 eCMOVZ dl, dh 428 ; Fall to HotkeyBar_ConvertDriveLetterInDLtoDriveNumber 429 430 431 ;-------------------------------------------------------------------- 432 ; HotkeyBar_ConvertDriveLetterInDLtoDriveNumber 433 ; Parameters: 434 ; DS: RAMVARS segment 435 ; DL: Drive letter ('A'...) 436 ; Returns: 437 ; DL: Drive number (0xh for Floppy Drives, 8xh for Hard Drives) 438 ; Corrupts registers: 439 ; AX, DH 440 ;-------------------------------------------------------------------- 441 HotkeyBar_ConvertDriveLetterInDLtoDriveNumber: 442 call HotkeyBar_GetLetterForFirstHardDriveToAX 443 cmp dl, al 444 jb SHORT .ConvertLetterInDLtoFloppyDriveNumber 445 446 ; Convert letter in DL to Hard Drive number 447 sub dl, al 448 or dl, 80h 449 ret 450 451 .ConvertLetterInDLtoFloppyDriveNumber: 452 sub dl, DEFAULT_FLOPPY_DRIVE_LETTER 453 ret 454 455 456 ;-------------------------------------------------------------------- 457 ; HotkeyBar_ConvertDriveNumberFromDLtoDriveLetter 458 ; Parameters: 459 ; DL: Drive number (0xh for Floppy Drives, 8xh for Hard Drives) 460 ; DS: RAMVARS Segment 461 ; Returns: 462 ; DL: Drive letter ('A'...) 463 ; CF: Set if Hard Drive 464 ; Clear if Floppy Drive 465 ; Corrupts registers: 466 ; AX 467 ;-------------------------------------------------------------------- 468 HotkeyBar_ConvertDriveNumberFromDLtoDriveLetter: 469 test dl, dl 470 jns SHORT .GetDefaultFloppyDrive 471 472 ; Store default hard drive to boot from 473 call HotkeyBar_GetLetterForFirstHardDriveToAX 474 sub dl, 80h 475 add dl, al 476 stc 477 ret 478 479 .GetDefaultFloppyDrive: 480 add dl, DEFAULT_FLOPPY_DRIVE_LETTER ; Clears CF 481 ret 482 483 484 ;-------------------------------------------------------------------- 485 ; Returns letter for first hard disk. Usually it will be 'C' but it 486 ; can be higher if more than two floppy drives are found. 487 ; 488 ; HotkeyBar_GetLetterForFirstHardDriveToAX 489 ; Parameters: 490 ; DS: RAMVARS segment 491 ; Returns: 492 ; AX: Upper case letter for first hard disk 493 ; Corrupts registers: 494 ; Nothing 495 ;-------------------------------------------------------------------- 496 HotkeyBar_GetLetterForFirstHardDriveToAX: 497 call FloppyDrive_GetCountToAX 498 add al, DEFAULT_FLOPPY_DRIVE_LETTER 499 MAX_U al, DEFAULT_HARD_DRIVE_LETTER 500 ret 412 .noflip: 413 call DriveXlate_ConvertDriveLetterInDLtoDriveNumber 414 xchg dl, dh 415 ; Fall to HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber 416 417 HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber: 418 -
trunk/XTIDE_Universal_BIOS/Src/Strings.asm
r491 r492 65 65 ; Boot loader strings 66 66 g_szTryToBoot: db "Booting %c",ANGLE_QUOTE_RIGHT,"%c",LF,CR,NULL 67 g_szBootSectorNotFound: db "Boot sector " 67 g_szBootSectorNotFound: db "Boot sector " ; String fall through... 68 68 g_szNotFound: db "not found",LF,CR,NULL 69 69 g_szReadError: db "Error %x!",LF,CR,NULL … … 72 72 %ifdef MODULE_HOTKEYS 73 73 ; Hotkey Bar strings 74 g_szFDD: db "FDD [%c]",NULL ; "FDD [A]" 75 g_szHDD: db "HDD [%c]",NULL ; "HDD [C]" 76 g_szBootMenu: db "%sMnu",NULL ; "BootMnu" 77 g_szRomBoot: db "Rom%s",NULL ; "RomBoot" 78 g_szBoot: db "Boot",NULL 79 g_szHotkey: db "%A%c%c%A%s%A ",NULL ; "C»HDD [A] ", "F2BootMnu " or "F8RomBoot " 80 74 g_szFDD: db "FDD [%c]",NULL ; "FDD [A]" 75 g_szHDD: db "HDD [%c]",NULL ; "HDD [C]" 76 %ifdef MODULE_BOOT_MENU 77 g_szBootMenu: db "BootMnu%c",NULL ; "BootMnu", location of %c doesn't matter 78 %endif ; MODULE_BOOT_MENU 79 g_szHotkey: db "%A%c%c%A%s%A ",NULL ; "C»HDD [A] ", "F2BootMnu " or "F8RomBoot " 80 %ifdef MODULE_SERIAL 81 g_szHotComDetect: db "ComDtct%c",NULL ; "ComDtct", location of %c doesn't matter 82 %endif ; MODULE_SERIAL 83 %endif ; MODULE_HOTKEYS 84 85 %ifdef MODULE_BOOT_MENU 86 g_szRomBootDash: db " - " ; String fall through to g_szRomBoot 87 %endif 88 %ifdef MODULE_HOTKEYS OR MODULE_BOOT_MENU 89 g_szRomBoot: db "Rom%cBoot", NULL ; "RomBoot" or "Rom Boot" 90 %endif 91 81 92 82 93 %ifdef MODULE_BOOT_MENU … … 190 201 ; which is checked at assembly time below. 191 202 ; 203 g_szDriveNumSpace: db " " ; leading space, used if drive number is less than 0fh 204 ; must come immediately before g_szDriveNum! 192 205 g_szBootMenuPrintStart: 193 206 g_szDriveNum: db "%x %s",NULL 207 g_szDriveNumBNSpace: db " " ; leading space, used if drive number is less than 0fh 208 ; must come immediately before g_szDriveNumBOOTNFO! 194 209 g_szDriveNumBOOTNFO: db "%x %z",NULL 195 210 g_szFloppyDrv: db "Floppy Drive %c",NULL … … 201 216 %error "g_szBootMenuPrint* strings must start on the same 256 byte page, required by the BootMenuPrint_* routines. Please move this block up or down within Strings.asm" 202 217 %endif 218 %if g_szDriveNumSpace+1 != g_szDriveNum || g_szDriveNumBNSpace+1 != g_szDriveNumBOOTNFO 219 %error "g_szDriveNumSpace or g_szDriveNumBNSpace are out of position" 220 %endif 203 221 %endif 204 222 205 223 %endif ; MODULE_BOOT_MENU 206 %endif ; MODULE_HOTKEYS207 224 208 225 -
trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm
r491 r492 129 129 db 48h, 75h, 75h, 7ah, 6fh, 74h, 0edh, 3ch, 24h, 3ch, 19h ; compressed 130 130 131 g_szBootSectorNotFound: ; db "Boot sector " 131 g_szBootSectorNotFound: ; db "Boot sector " ; String fall through... 132 132 ; db 42h, 6fh, 6fh, 74h, 20h, 73h, 65h, 63h, 74h, 6fh, 72h, 20h ; uncompressed 133 133 db 48h, 75h, 75h, 0fah, 79h, 6bh, 69h, 7ah, 75h, 0f8h ; compressed … … 145 145 %ifdef MODULE_HOTKEYS 146 146 ; Hotkey Bar strings 147 g_szFDD: ; db "FDD [%c]",NULL ; "FDD [A]" 148 ; db 46h, 44h, 44h, 20h, 5bh, 25h, 63h, 5dh, 00h ; uncompressed 149 db 4ch, 4ah, 0cah, 61h, 3ch, 0a3h ; compressed 150 151 g_szHDD: ; db "HDD [%c]",NULL ; "HDD [C]" 152 ; db 48h, 44h, 44h, 20h, 5bh, 25h, 63h, 5dh, 00h ; uncompressed 153 db 4eh, 4ah, 0cah, 61h, 3ch, 0a3h ; compressed 154 155 g_szBootMenu: ; db "%sMnu",NULL ; "BootMnu" 156 ; db 25h, 73h, 4dh, 6eh, 75h, 00h ; uncompressed 157 db 3dh, 53h, 74h, 0bbh ; compressed 158 159 g_szRomBoot: ; db "Rom%s",NULL ; "RomBoot" 160 ; db 52h, 6fh, 6dh, 25h, 73h, 00h ; uncompressed 161 db 58h, 75h, 73h, 1dh ; compressed 162 163 g_szBoot: ; db "Boot",NULL 164 ; db 42h, 6fh, 6fh, 74h, 00h ; uncompressed 165 db 48h, 75h, 75h, 0bah ; compressed 166 167 g_szHotkey: ; db "%A%c%c%A%s%A ",NULL ; "C»HDD [A] ", "F2BootMnu " or "F8RomBoot " 168 ; db 25h, 41h, 25h, 63h, 25h, 63h, 25h, 41h, 25h, 73h, 25h, 41h, 20h, 00h ; uncompressed 169 db 3bh, 3ch, 3ch, 3bh, 3dh, 3bh, 00h ; compressed 170 147 g_szFDD: ; db "FDD [%c]",NULL ; "FDD [A]" 148 ; db 46h, 44h, 44h, 20h, 5bh, 25h, 63h, 5dh, 00h ; uncompressed 149 db 4ch, 4ah, 0cah, 61h, 3ch, 0a3h ; compressed 150 151 g_szHDD: ; db "HDD [%c]",NULL ; "HDD [C]" 152 ; db 48h, 44h, 44h, 20h, 5bh, 25h, 63h, 5dh, 00h ; uncompressed 153 db 4eh, 4ah, 0cah, 61h, 3ch, 0a3h ; compressed 154 155 %ifdef MODULE_BOOT_MENU 156 g_szBootMenu: ; db "BootMnu%c",NULL ; "BootMnu", location of %c doesn't matter 157 ; db 42h, 6fh, 6fh, 74h, 4dh, 6eh, 75h, 25h, 63h, 00h ; uncompressed 158 db 48h, 75h, 75h, 7ah, 53h, 74h, 7bh, 1ch ; compressed 159 160 %endif ; MODULE_BOOT_MENU 161 g_szHotkey: ; db "%A%c%c%A%s%A ",NULL ; "C»HDD [A] ", "F2BootMnu " or "F8RomBoot " 162 ; db 25h, 41h, 25h, 63h, 25h, 63h, 25h, 41h, 25h, 73h, 25h, 41h, 20h, 00h ; uncompressed 163 db 3bh, 3ch, 3ch, 3bh, 3dh, 3bh, 00h ; compressed 164 165 %ifdef MODULE_SERIAL 166 g_szHotComDetect: ; db "ComDtct%c",NULL ; "ComDtct", location of %c doesn't matter 167 ; db 43h, 6fh, 6dh, 44h, 74h, 63h, 74h, 25h, 63h, 00h ; uncompressed 168 db 49h, 75h, 73h, 4ah, 7ah, 69h, 7ah, 1ch ; compressed 169 170 %endif ; MODULE_SERIAL 171 %endif ; MODULE_HOTKEYS 172 173 %ifdef MODULE_BOOT_MENU 174 g_szRomBootDash: ; db " - " ; String fall through to g_szRomBoot 175 ; db 20h, 2dh, 20h, 20h ; uncompressed 176 db 20h, 28h, 20h, 20h ; compressed 177 178 %endif 179 %ifdef MODULE_HOTKEYS OR MODULE_BOOT_MENU 180 g_szRomBoot: ; db "Rom%cBoot", NULL ; "RomBoot" or "Rom Boot" 181 ; db 52h, 6fh, 6dh, 25h, 63h, 42h, 6fh, 6fh, 74h, 00h ; uncompressed 182 db 58h, 75h, 73h, 3ch, 48h, 75h, 75h, 0bah ; compressed 183 184 %endif 171 185 172 186 … … 353 367 ; which is checked at assembly time below. 354 368 ; 369 g_szDriveNumSpace: ; db " " ; leading space, used if drive number is less than 0fh 370 ; db 20h ; uncompressed 371 db 20h ; compressed 372 373 ; must come immediately before g_szDriveNum! 355 374 g_szBootMenuPrintStart: 356 375 g_szDriveNum: ; db "%x %s",NULL … … 358 377 db 37h, 20h, 1dh ; compressed 359 378 379 g_szDriveNumBNSpace: ; db " " ; leading space, used if drive number is less than 0fh 380 ; db 20h ; uncompressed 381 db 20h ; compressed 382 383 ; must come immediately before g_szDriveNumBOOTNFO! 360 384 g_szDriveNumBOOTNFO: ; db "%x %z",NULL 361 385 ; db 25h, 78h, 20h, 25h, 7ah, 00h ; uncompressed … … 376 400 %error "g_szBootMenuPrint* strings must start on the same 256 byte page, required by the BootMenuPrint_* routines. Please move this block up or down within Strings.asm" 377 401 %endif 402 %if g_szDriveNumSpace+1 != g_szDriveNum || g_szDriveNumBNSpace+1 != g_szDriveNumBOOTNFO 403 %error "g_szDriveNumSpace or g_szDriveNumBNSpace are out of position" 404 %endif 378 405 %endif 379 406 380 407 %endif ; MODULE_BOOT_MENU 381 %endif ; MODULE_HOTKEYS382 408 383 409 … … 528 554 ;; translated usage stats 529 555 ;; 33:1 530 ;; 32: 29556 ;; 32:34 531 557 ;; 181:1 532 558 ;; 53:2 … … 543 569 ;; 49:1 544 570 ;; 56:7 545 ;; 45: 1571 ;; 45:2 546 572 ;; 175:1 547 573 ;; 171:2 … … 554 580 ;; 5-u:2 555 581 ;; x:5 556 ;; s:1 6582 ;; s:14 557 583 ;; 5-x:1 558 584 ;; nl:12 559 585 ;; 2-I:1 560 586 ;; u:6 561 ;; c:1 0587 ;; c:13 562 588 ;; z:2 563 589 ;; total format: 11 … … 572 598 ;; 64,@:1 573 599 ;; 65,A:5 574 ;; 66,B: 8575 ;; 67,C: 2576 ;; 68,D:1 0600 ;; 66,B:9 601 ;; 67,C:3 602 ;; 68,D:11 577 603 ;; 69,E:3 578 604 ;; 70,F:3 … … 605 631 ;; 97,a:7 606 632 ;; 98,b: 607 ;; 99,c: 5633 ;; 99,c:6 608 634 ;; 100,d:6 609 635 ;; 101,e:15 … … 615 641 ;; 107,k:4 616 642 ;; 108,l:5 617 ;; 109,m: 1643 ;; 109,m:2 618 644 ;; 110,n:11 619 ;; 111,o: 17645 ;; 111,o:20 620 646 ;; 112,p:3 621 647 ;; 113,q: 622 648 ;; 114,r:11 623 649 ;; 115,s:7 624 ;; 116,t:1 2650 ;; 116,t:15 625 651 ;; 117,u:4 626 652 ;; 118,v:3 -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm
r491 r492 64 64 ;-------------------------------------------------------------------- 65 65 BootVars_StoreHotkeyForDriveNumberInDL: 66 mov WORD [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wHddAndFddLetters], DEFAULT_ HARD_DRIVE_LETTER | (DEFAULT_FLOPPY_DRIVE_LETTER<<8)67 call HotkeyBar_ConvertDriveNumberFromDLtoDriveLetter66 mov WORD [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wHddAndFddLetters], DEFAULT_FLOPPY_DRIVE_LETTER | (DEFAULT_HARD_DRIVE_LETTER<<8) 67 call DriveXlate_ConvertDriveNumberFromDLtoDriveLetter 68 68 jmp HotkeyBar_StoreHotkeyToBootvarsForDriveLetterInDL 69 69 -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
r489 r492 107 107 .InitializeDriveTranslationAndReturn: 108 108 pop es 109 %ifdef MODULE_ HOTKEYS109 %ifdef MODULE_DRIVEXLATE 110 110 jmp DriveXlate_Reset 111 111 %else … … 164 164 ; AX: Total hard disk count 165 165 ; Corrupts registers: 166 ; CX166 ; BX 167 167 ;-------------------------------------------------------------------- 168 168 %ifdef MODULE_BOOT_MENU … … 171 171 push ds 172 172 LOAD_BDA_SEGMENT_TO ds, cx 173 mov cl, [BDA.bHDCount]174 MAX_U al, cl173 mov bl, [BDA.bHDCount] 174 MAX_U al, bl 175 175 pop ds 176 176 ret
Note:
See TracChangeset
for help on using the changeset viewer.