Changeset 189 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Boot
- Timestamp:
- Nov 16, 2011, 6:29:32 AM (13 years ago)
- google:author:
- gregli@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Boot
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm
r183 r189 4 4 ; Section containing code 5 5 SECTION .text 6 7 struc ITEM_TYPE_REFRESH8 .HardDisk resb 29 .FloppyDrive resb 210 endstruc11 12 6 13 7 ;-------------------------------------------------------------------- … … 29 23 add bx, BootMenuEvent_Handler 30 24 jmp bx 25 26 MENUEVENT_InitializeMenuinitFromDSSI equ (BootMenuEvent_Handler.InitializeMenuinitFromDSSI - BootMenuEvent_Handler) 27 MENUEVENT_ExitMenu equ (BootMenuEvent_Handler.EventCompleted - BootMenuEvent_Handler) 28 MENUEVENT_ItemHighlightedFromCX equ (BootMenuEvent_Handler.ItemHighlightedFromCX - BootMenuEvent_Handler) 29 MENUEVENT_ItemSelectedFromCX equ (BootMenuEvent_Handler.ItemSelectedFromCX - BootMenuEvent_Handler) 30 MENUEVENT_KeyStrokeInAX equ (BootMenuEvent_Handler.KeyStrokeInAX - BootMenuEvent_Handler) 31 MENUEVENT_RefreshTitle equ (BootMenuPrint_TitleStrings - BootMenuEvent_Handler) 32 MENUEVENT_RefreshInformation equ (BootMenuEvent_Handler.RefreshInformation - BootMenuEvent_Handler) 33 MENUEVENT_RefreshItemFromCX equ (BootMenuEvent_Handler.RefreshItemFromCX - BootMenuEvent_Handler) 34 ; 35 ; Note that there is no entry for MENUEVENT_IdleProcessing. If MENUEVENT_IDLEPROCESSING_ENABLE is not %defined, 36 ; then the entry point will not be called (saving memory on this end and at the CALL point). 37 ; 31 38 32 39 %else … … 35 42 ja SHORT .EventNotHandled 36 43 jmp [cs:bx+.rgfnEventSpecificHandlers] 37 38 %endif 39 44 40 45 .EventNotHandled: 41 46 clc 42 47 ret 43 44 %ifdef MENUEVENT_INLINE_OFFSETS45 46 MENUEVENT_InitializeMenuinitFromDSSI equ (BootMenuEvent_Handler.InitializeMenuinitFromDSSI - BootMenuEvent_Handler)47 MENUEVENT_ExitMenu equ (BootMenuEvent_Handler.EventCompleted - BootMenuEvent_Handler)48 MENUEVENT_IdleProcessing equ (BootMenuEvent_Handler.EventNotHandled - BootMenuEvent_Handler)49 MENUEVENT_ItemHighlightedFromCX equ (BootMenuEvent_Handler.ItemHighlightedFromCX - BootMenuEvent_Handler)50 MENUEVENT_ItemSelectedFromCX equ (BootMenuEvent_Handler.ItemSelectedFromCX - BootMenuEvent_Handler)51 MENUEVENT_KeyStrokeInAX equ (BootMenuEvent_Handler.KeyStrokeInAX - BootMenuEvent_Handler)52 MENUEVENT_RefreshTitle equ (BootMenuPrint_TitleStrings - BootMenuEvent_Handler)53 MENUEVENT_RefreshInformation equ (BootMenuEvent_Handler.RefreshInformation - BootMenuEvent_Handler)54 MENUEVENT_RefreshItemFromCX equ (BootMenuEvent_Handler.RefreshItemFromCX - BootMenuEvent_Handler)55 56 %else57 48 58 49 ALIGN WORD_ALIGN … … 162 153 ALIGN JUMP_ALIGN 163 154 .RefreshItemFromCX: 164 mov b x, .rgwItemTypeRefresh165 jmp SHORT .RefreshItemOrInformationWithJumpTableInCSBX166 167 155 mov bl,00h 156 SKIP2B dx ; dx corrupted below by BootMenu_GetDriveToDXforMenuitemInCX 157 ; Fall to .RefreshInformation 158 168 159 ; Parameters: 169 160 ; CX: Index of highlighted item 170 161 ; Cursor has been positioned to the beginning of first line 171 ALIGN JUMP_ALIGN172 162 .RefreshInformation: 173 mov b x, .rgwInformationItemTypeRefresh163 mov bl,040h 174 164 ; Fall to .RefreshItemOrInformationWithJumpTableInCSBX 175 165 … … 188 178 call RamVars_GetSegmentToDS 189 179 call BootMenu_GetDriveToDXforMenuitemInCX 190 test dl, dl ; Floppy drive? 191 jns SHORT .DrawFloppyDrive 192 jmp [cs:bx+ITEM_TYPE_REFRESH.HardDisk] 180 or bl,dl 181 shl bl,1 182 jc SHORT BootMenuPrint_HardDiskMenuitem 183 184 ;;; 185 ;;; Fall-through (to BootMenuPrint_FloppyMenuitem) 186 ;;; (checked at assembler time with the code after BootMenuPrint_FloppyMenuitem) 187 ;;; 193 188 ALIGN JUMP_ALIGN 194 .DrawFloppyDrive: 195 jmp [cs:bx+ITEM_TYPE_REFRESH.FloppyDrive] 189 BootMenuEvent_FallThroughToFloppyMenuitem: 196 190 197 ; Jump tables for .RefreshItemOrInformationWithJumpTableInCSBX198 ALIGN WORD_ALIGN199 .rgwItemTypeRefresh:200 istruc ITEM_TYPE_REFRESH201 at ITEM_TYPE_REFRESH.HardDisk, dw BootMenuPrint_HardDiskMenuitem202 at ITEM_TYPE_REFRESH.FloppyDrive, dw BootMenuPrint_FloppyMenuitem203 iend204 .rgwInformationItemTypeRefresh:205 istruc ITEM_TYPE_REFRESH206 at ITEM_TYPE_REFRESH.HardDisk, dw BootMenuPrint_HardDiskMenuitemInformation207 at ITEM_TYPE_REFRESH.FloppyDrive, dw BootMenuPrint_FloppyMenuitemInformation208 iend -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm
r186 r189 5 5 SECTION .text 6 6 7 ;;; 8 ;;; Fall-through from BootMenuEvent.asm! 9 ;;; BootMenuPrint_FloppyMenuitem must be the first routine in this file 10 ;;; (checked at assembler time with the code after BootMenuPrint_FloppyMenuitem) 11 ;;; 12 ;-------------------------------------------------------------------- 13 ; BootMenuPrint_FloppyMenuitem 14 ; Parameters: 15 ; DL: Untranslated Floppy Drive number 16 ; Returns: 17 ; Nothing 18 ; Corrupts registers: 19 ; AX, DX, SI, DI 20 ;-------------------------------------------------------------------- 21 ALIGN JUMP_ALIGN 22 BootMenuPrint_FloppyMenuitem: 23 js BootMenuPrint_FloppyMenuitemInformation 24 call PrintDriveNumberAfterTranslationFromDL 25 push bp 26 mov bp, sp 27 mov si, g_szFDLetter 28 ePUSH_T ax, g_szFloppyDrv 29 add dl, 'A' 30 push dx ; Drive letter 31 jmp BootMenuPrint_FormatCSSIfromParamsInSSBP 32 33 %if BootMenuPrint_FloppyMenuitem <> BootMenuEvent_FallThroughToFloppyMenuitem 34 %error "BootMenuPrint.asm must follow BootMenuEvent.asm, and BootMenuPrint_FloppyMenuitem must be the first routine in BootMenuPrint.asm" 35 %endif 36 7 37 ;-------------------------------------------------------------------- 8 38 ; BootMenuPrint_ClearScreen … … 81 111 82 112 ;-------------------------------------------------------------------- 83 ; BootMenuPrint_FloppyMenuitem84 ; Parameters:85 ; DL: Untranslated Floppy Drive number86 ; Returns:87 ; Nothing88 ; Corrupts registers:89 ; AX, DX, SI, DI90 ;--------------------------------------------------------------------91 ALIGN JUMP_ALIGN92 BootMenuPrint_FloppyMenuitem:93 call PrintDriveNumberAfterTranslationFromDL94 push bp95 mov bp, sp96 mov si, g_szFDLetter97 ePUSH_T ax, g_szFloppyDrv98 add dl, 'A'99 push dx ; Drive letter100 jmp BootMenuPrint_FormatCSSIfromParamsInSSBP101 102 103 ;--------------------------------------------------------------------104 113 ; BootMenuPrint_HardDiskMenuitem 105 114 ; Parameters: … … 113 122 ALIGN JUMP_ALIGN 114 123 BootMenuPrint_HardDiskMenuitem: 124 js BootMenuPrint_HardDiskMenuitemInformation 115 125 call PrintDriveNumberAfterTranslationFromDL 116 126 call RamVars_IsDriveHandledByThisBIOS
Note:
See TracChangeset
for help on using the changeset viewer.