Changeset 603 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Menus
- Timestamp:
- Nov 6, 2020, 2:49:32 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm
r601 r603 23 23 24 24 ;-------------------------------------------------------------------- 25 ; Handler for INT 1Ch SystemTimer Tick.25 ; Handler for INT 1Ch User Timer Tick. 26 26 ; Reads key presses and draws hotkey bar. 27 27 ; 28 28 ; HotkeyBar_TimerTickHandler 29 29 ; Parameters: 30 ; DS: RAMVARS segment 31 ; ES: BDA segment (zero) 30 ; Nothing 32 31 ; Returns: 33 32 ; Nothing … … 38 37 HotkeyBar_TimerTickHandler: 39 38 push es 39 %ifndef USE_186 ; LOAD_BDA_SEGMENT_TO will corrupt AX on 8088/8086 40 push ax 41 %endif 42 43 ;!!! Keep interrupts disabled so there won't be another 44 ; timer tick call before we are ready 45 46 LOAD_BDA_SEGMENT_TO es, ax 47 48 ; Call previous handler 49 pushf 50 call FAR [es:BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler] 51 52 ; Update Hotkeybar (process key input and draw) every fourth tick 53 test BYTE [es:BDA.dwTimerTicks], 11b 54 jnz SHORT .ReturnFromHandler 55 40 56 push ds 41 57 %ifdef USE_186 42 ePUSHA58 pusha 43 59 %else 44 60 push di … … 46 62 push dx 47 63 push cx 48 push ax 49 %endif 50 51 ;!!! Keep interrupts disabled so there won't be another 52 ; timer tick call before we are ready 53 54 LOAD_BDA_SEGMENT_TO es, ax 64 %endif 55 65 call RamVars_GetSegmentToDS 56 57 ; Call previous handler 58 pushf 59 call FAR [es:BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler] 60 61 ; Update Hotkeybar (process key input and draw) every fourth tick 62 test BYTE [es:BDA.dwTimerTicks], 11b 63 jnz SHORT .ReturnFromHandler 64 call UpdateDuringDriveDetection 65 66 .ReturnFromHandler: 66 call HotkeyBar_UpdateDuringDriveDetection 67 67 %ifdef USE_186 68 ePOPA68 popa 69 69 %else 70 pop ax71 70 pop cx 72 71 pop dx … … 75 74 %endif 76 75 pop ds 76 77 .ReturnFromHandler: 78 %ifndef USE_186 79 pop ax 80 %endif 77 81 pop es 78 82 iret … … 91 95 ; AX, CX, DX, SI, DI 92 96 ;-------------------------------------------------------------------- 93 UpdateDuringDriveDetection:97 HotkeyBar_UpdateDuringDriveDetection: 94 98 call ScanHotkeysFromKeyBufferAndStoreToBootvars 95 99 … … 113 117 ;-------------------------------------------------------------------- 114 118 HotkeyBar_DrawToTopOfScreen: 115 ; Store current screen coordinates to be restored116 ; when Hotkey Bar is rendered117 call DetectPrint_GetSoftwareCoordinatesToAX119 ; Store current screen coordinates to stack 120 ; (to be restored when Hotkey Bar is rendered) 121 CALL_DISPLAY_LIBRARY GetSoftwareCoordinatesToAX 118 122 push ax 119 123 120 call MoveCursorToScreenTopLeftCorner 124 ; Move cursor to top left corner (0, 0) 125 xor ax, ax 126 call HotkeyBar_SetCursorCoordinatesFromAX 121 127 ; Fall to .PrintFloppyDriveHotkeys 122 128 … … 230 236 ;-------------------------------------------------------------------- 231 237 .EndHotkeyBarRendering: 232 call HotkeyBar_ClearRestOfTopRow 233 pop ax 234 jmp SHORT HotkeyBar_RestoreCursorCoordinatesFromAX 235 236 237 ;-------------------------------------------------------------------- 238 ; HotkeyBar_ClearRestOfTopRow 239 ; Parameters: 240 ; Nothing 241 ; Returns: 242 ; Nothing 243 ; Corrupts registers: 244 ; AX, CX, DI 245 ;-------------------------------------------------------------------- 246 HotkeyBar_ClearRestOfTopRow: 238 ; Clear the rest of the top row 247 239 CALL_DISPLAY_LIBRARY GetColumnsToALandRowsToAH 248 240 eMOVZX cx, al … … 250 242 sub cl, al 251 243 mov al, ' ' 252 JMP_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX 244 CALL_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX 245 246 ; Restore the saved coordinates from stack 247 pop ax 248 ; Fall to HotkeyBar_SetCursorCoordinatesFromAX 249 250 251 ;-------------------------------------------------------------------- 252 ; HotkeyBar_SetCursorCoordinatesFromAX 253 ; Parameters: 254 ; Nothing 255 ; Returns: 256 ; Nothing 257 ; Corrupts registers: 258 ; AX, DI 259 ;-------------------------------------------------------------------- 260 HotkeyBar_SetCursorCoordinatesFromAX: 261 JMP_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 253 262 254 263 … … 373 382 374 383 ;-------------------------------------------------------------------- 375 ; MoveCursorToScreenTopLeftCorner376 ; Parameters:377 ; Nothing378 ; Returns:379 ; Nothing380 ; Corrupts registers:381 ; AX, DI382 ;--------------------------------------------------------------------383 MoveCursorToScreenTopLeftCorner:384 xor ax, ax ; Top left corner (0, 0)385 ; Fall to HotkeyBar_RestoreCursorCoordinatesFromAX386 387 388 ;--------------------------------------------------------------------389 ; HotkeyBar_RestoreCursorCoordinatesFromAX390 ; Parameters:391 ; Nothing392 ; Returns:393 ; Nothing394 ; Corrupts registers:395 ; AX, DI396 ;--------------------------------------------------------------------397 HotkeyBar_RestoreCursorCoordinatesFromAX:398 JMP_DISPLAY_LIBRARY SetCursorCoordinatesFromAX399 400 401 ;--------------------------------------------------------------------402 384 ; HotkeyBar_StoreDefaultDriveLettersToHotkeyVars 403 385 ; Parameters: … … 432 414 433 415 ; Store system 1Ch Timer Tick handler and install our hotkeybar handler 434 mov ax, [BIOS_ SYSTEM_TIMER_TICK_INTERRUPT_1Ch*4]416 mov ax, [BIOS_USER_TIMER_TICK_INTERRUPT_1Ch*4] 435 417 mov [BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler], ax 436 mov ax, [BIOS_ SYSTEM_TIMER_TICK_INTERRUPT_1Ch*4+2]418 mov ax, [BIOS_USER_TIMER_TICK_INTERRUPT_1Ch*4+2] 437 419 mov [BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler+2], ax 438 mov al, BIOS_ SYSTEM_TIMER_TICK_INTERRUPT_1Ch420 mov al, BIOS_USER_TIMER_TICK_INTERRUPT_1Ch 439 421 mov si, HotkeyBar_TimerTickHandler 440 422 call Interrupts_InstallHandlerToVectorInALFromCSSI
Note:
See TracChangeset
for help on using the changeset viewer.