- Timestamp:
- Mar 14, 2013, 9:45:07 PM (12 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/Menu.inc
r370 r525 5 5 6 6 ;-------------------------------------------------------------------- 7 ; Menu Library users need to use th is macrosince it will provide7 ; Menu Library users need to use these macros since it will provide 8 8 ; compatibility with future library versions. 9 9 ; 10 10 ; CALL_MENU_LIBRARY 11 ; JMP_MENU_LIBRARY 11 12 ; Parameters: 12 13 ; %1: Function to call (functionName from MENU_LIB) … … 21 22 %ifidn %1, CloseMenuIfExitEventAllows 22 23 call MenuInit_CloseMenuIfExitEventAllows 23 24 24 %elifidn %1, Close 25 25 call MenuInit_CloseMenuWindow 26 27 26 %elifidn %1, SetUserDataFromDSSI 28 27 call MenuInit_SetUserDataFromDSSI 29 30 28 %elifidn %1, GetUserDataToDSSI 31 29 call MenuInit_GetUserDataToDSSI 32 33 30 %elifidn %1, SetTitleHeightFromAL 34 31 call MenuInit_SetTitleHeightFromAL 35 36 32 %elifidn %1, GetHighlightedItemToAX 37 33 call MenuInit_GetHighlightedItemToAX 38 39 34 %elifidn %1, SetTotalItemsFromAX 40 35 call MenuInit_SetTotalItemsFromAX 41 42 36 %elifidn %1, SetInformationHeightFromAL 43 37 call MenuInit_SetInformationHeightFromAL 44 45 38 %elifidn %1, SetTimeoutValueFromAX 46 39 call MenuTime_SetSelectionTimeoutValueFromAX 47 48 40 %else 49 41 mov di, %1 50 42 call Menu_FunctionFromDI 43 %endif 44 %endmacro 45 46 %macro JMP_MENU_LIBRARY 1 47 %ifidn %1, CloseMenuIfExitEventAllows 48 jmp MenuInit_CloseMenuIfExitEventAllows 49 %elifidn %1, Close 50 jmp MenuInit_CloseMenuWindow 51 %elifidn %1, SetUserDataFromDSSI 52 jmp MenuInit_SetUserDataFromDSSI 53 %elifidn %1, GetUserDataToDSSI 54 jmp MenuInit_GetUserDataToDSSI 55 %elifidn %1, SetTitleHeightFromAL 56 jmp MenuInit_SetTitleHeightFromAL 57 %elifidn %1, GetHighlightedItemToAX 58 jmp MenuInit_GetHighlightedItemToAX 59 %elifidn %1, SetTotalItemsFromAX 60 jmp MenuInit_SetTotalItemsFromAX 61 %elifidn %1, SetInformationHeightFromAL 62 jmp MenuInit_SetInformationHeightFromAL 63 %elifidn %1, SetTimeoutValueFromAX 64 jmp MenuTime_SetSelectionTimeoutValueFromAX 65 %else 66 mov di, %1 67 jmp Menu_FunctionFromDI 51 68 %endif 52 69 %endmacro -
trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm
r505 r525 714 714 call InitializeNullStringsToDialogInputInDSSI 715 715 mov WORD [si+DIALOG_INPUT.fszTitle], g_szSelectNewDrive 716 CALL_MENU_LIBRARY GetDriveWithIoInDSSI 717 ret 716 JMP_MENU_LIBRARY GetDriveWithIoInDSSI 718 717 719 718 ;-------------------------------------------------------------------- -
trunk/BIOS_Drive_Information_Tool/Src/Print.asm
r505 r525 210 210 loop .ReverseNextWord 211 211 dec di 212 x or ax, ax212 xchg cx, ax 213 213 stosb ; Terminate with NULL 214 214 -
trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc
r522 r525 37 37 struc RAMVARS 38 38 %ifdef RELOCATE_INT13H_STACK 39 resb 256 ; Size of our stack 40 .rgbTopOfStack: 39 resb 252 40 .dwStackChangeDSDI: 41 .wStackChangeDI resb 2 ; Used during stack 42 .wStackChangeDS resb 2 ; switching only 43 .rgbTopOfStack: ; 256 bytes of stack 41 44 .fpInt13hEntryStack resb 4 42 .dwStackChangeDSDI:43 .wStackChangeDI resb 244 .wStackChangeDS resb 245 45 %endif 46 46 .wDrvDetectSignature: ; Signature when BIOS is in drive detection mode -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
r522 r525 37 37 ALIGN JUMP_ALIGN 38 38 Int13h_DiskFunctionsHandlerWithStackChange: 39 push ds 39 sti ; Enable interrupts 40 ; TODO: Maybe we need to save Flags (DF) as well? 41 push ds ; Save DS:DI on the original stack 40 42 push di 41 43 call RamVars_GetSegmentToDS 42 44 43 45 ; Store entry registers to RAMVARS 46 %ifdef USE_386 47 pop DWORD [RAMVARS.dwStackChangeDSDI] 48 %else 49 pop WORD [RAMVARS.wStackChangeDI] ; Pop DS:DI to the top of what 50 pop WORD [RAMVARS.wStackChangeDS] ; is to become the new stack 51 %endif 44 52 mov [RAMVARS.fpInt13hEntryStack], sp 45 53 mov [RAMVARS.fpInt13hEntryStack+2], ss 46 pop WORD [RAMVARS.wStackChangeDI]47 pop WORD [RAMVARS.wStackChangeDS]48 54 49 55 ; Load new stack and restore DS and DI 50 mov di, ds ; We do not want to overwrite DS and DI in stack 51 mov ss, di 52 mov sp, RAMVARS.rgbTopOfStack 53 lds di, [RAMVARS.dwStackChangeDSDI] 56 mov di, ds ; We can save 2 bytes by using PUSH/POP but it's slower 57 mov ss, di ; No need to wrap with CLI/STI since this is for AT only (286+) 58 mov sp, RAMVARS.rgbTopOfStack-4 59 pop di ; DI before stack change 60 pop ds ; DS before stack change 54 61 55 62 ; Call INT 13h … … 59 66 60 67 ; Restore stack (we must not corrupt FLAGS!) 61 cli62 68 %ifdef USE_386 63 69 lss sp, [ss:RAMVARS.fpInt13hEntryStack] 64 70 %else 71 cli 65 72 mov sp, [ss:RAMVARS.fpInt13hEntryStack] 66 73 mov ss, [ss:RAMVARS.fpInt13hEntryStack+2] 67 %endif 68 pop di ; DI before stack change 69 pop ds ; DS before stack change 74 sti 75 %endif 70 76 retf 2 ; Skip FLAGS from stack 71 77 %endif ; RELOCATE_INT13H_STACK … … 88 94 ALIGN JUMP_ALIGN 89 95 Int13h_DiskFunctionsHandler: 96 %ifndef RELOCATE_INT13H_STACK 90 97 sti ; Enable interrupts 98 %endif 91 99 cld ; String instructions to increment pointers 92 100 CREATE_FRAME_INTPACK_TO_SSBP SIZE_OF_IDEPACK_WITHOUT_INTPACK … … 398 406 dw AH1Eh_HandlerForXTCFfeatures ; 1Eh, Lo-tech XT-CF features (XTIDE Universal BIOS) 399 407 %else 400 dw UnsupportedFunction ; 1Eh, 408 dw UnsupportedFunction ; 1Eh, 401 409 %endif 402 410 dw UnsupportedFunction ; 1Fh, -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1Eh_XTCF.asm
r505 r525 112 112 jae SHORT .SetMemoryMappedMode 113 113 114 ; We need to limit block size here. Consider this scenario;115 ; 1. While in PIO mode or memory mapped mode, the drive is set to do116 ; block transfers larger than XTCF_DMA_MODE_MAX_BLOCK_SIZE.117 ; 2. A call is subsequently made to change device mode to DEVICE_8BIT_XTCF_DMA.118 ; 3. The call to AH24h_SetBlockSize fails but the change in device mode has been made.119 120 114 ; Set DMA Mode 121 115 mov BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_DMA 122 116 mov al, [di+DPT_ATA.bBlockSize] 123 MIN_U al, XTCF_DMA_MODE_MAX_BLOCK_SIZE 124 jmp SHORT AH24h_SetBlockSize ; Returns via AH23h_Enable8bitPioMode 117 cmp al, XTCF_DMA_MODE_MAX_BLOCK_SIZE 118 jbe SHORT AH24h_SetBlockSize 119 mov al, XTCF_DMA_MODE_MAX_BLOCK_SIZE 120 jmp SHORT AH24h_SetBlockSize 125 121 126 122 .SetMemoryMappedMode: -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/AutoConfigure.asm
r523 r525 174 174 ALIGN JUMP_ALIGN 175 175 StoreAndDisplayNumberOfControllers: 176 mov ax, 1 177 MAX_U al, cl ; Cannot store zero 176 xor ax, ax 177 or al, cl 178 jnz SHORT .AtLeastOneController 179 inc ax ; Cannot store zero 180 .AtLeastOneController: 178 181 test BYTE [di+ROMVARS.wFlags], FLG_ROMVARS_FULLMODE 179 182 jnz SHORT .FullModeSoNoNeedToLimit -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Dialogs.asm
r376 r525 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 … … 190 190 mov dx, ds 191 191 mov ax, bx 192 CALL_MENU_LIBRARY StartProgressTaskWithIoInDSSIandParamInDXAX 193 ret 192 JMP_MENU_LIBRARY StartProgressTaskWithIoInDSSIandParamInDXAX 194 193 195 194 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Main.asm
r505 r525 1 ; Project name : XTIDE Univer al BIOS Configurator v21 ; Project name : XTIDE Universal BIOS Configurator v2 2 2 ; Description : Program start and exit. 3 3 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuEvents.asm
r505 r525 33 33 MenuEvents_DisplayMenu: 34 34 mov bx, MenuEventHandler 35 CALL_MENU_LIBRARY DisplayWithHandlerInBXandUserDataInDXAX 36 ret 35 JMP_MENU_LIBRARY DisplayWithHandlerInBXandUserDataInDXAX 37 36 38 37 … … 218 217 jnz SHORT .PrintNameOfLoadedFile 219 218 test ax, FLG_CFGVARS_ROMLOADED 220 jnz SHORT .PrintLoadedEeprom 219 mov si, g_szEEPROM 220 jnz SHORT .PrintNameOfLoadedFileOrEeprom 221 221 ; Fall to .PrintNothingLoaded 222 222 … … 228 228 .PrintNameOfLoadedFile: 229 229 mov si, g_cfgVars+CFGVARS.szOpenedFile 230 CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI 231 jmp SHORT .PrintTypeOfLoadedBios 232 233 ALIGN JUMP_ALIGN 234 .PrintLoadedEeprom: 235 mov si, g_szEEPROM 230 ; Fall to .PrintNameOfLoadedFileOrEeprom 231 232 ALIGN JUMP_ALIGN 233 .PrintNameOfLoadedFileOrEeprom: 236 234 CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI 237 235 ; Fall to .PrintTypeOfLoadedBios 238 236 239 ALIGN JUMP_ALIGN240 237 .PrintTypeOfLoadedBios: 241 238 mov si, g_szSourceAndTypeSeparator -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menuitem.asm
r425 r525 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 … … 168 168 call GetConfigurationBufferToESDIforMenuitemInDSSI 169 169 add di, [si+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] 170 170 171 171 push bx 172 172 mov bx,[si+MENUITEM.itemValue+ITEM_VALUE.fnValueWriter] … … 176 176 .NoWriter: 177 177 pop bx 178 178 179 179 jmp [cs:bx+.rgfnJumpToStoreValueBasedOnItemType] 180 180 .InvalidItemType: … … 295 295 CALL_MENU_LIBRARY RefreshTitle 296 296 CALL_MENU_LIBRARY GetHighlightedItemToAX 297 CALL_MENU_LIBRARY RefreshItemFromAX 298 ret 297 JMP_MENU_LIBRARY RefreshItemFromAX 299 298 300 299 ALIGN JUMP_ALIGN -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupage.asm
r376 r525 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 … … 39 39 xor ax, ax 40 40 CALL_MENU_LIBRARY HighlightItemFromAX 41 CALL_MENU_LIBRARY RefreshWindow 42 ret 41 JMP_MENU_LIBRARY RefreshWindow 43 42 44 43 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MainMenu.asm
r376 r525 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 initialized data … … 29 29 iend 30 30 31 g_MenuitemMainMenuLicense: 31 g_MenuitemMainMenuLicense: 32 32 istruc MENUITEM 33 33 at MENUITEM.fnActivate, dw Menuitem_DisplayHelpMessageFromDSSI … … 35 35 at MENUITEM.szQuickInfo, dw g_szNfoMainLicense 36 36 at MENUITEM.szHelp, dw g_szHelpMainLicense 37 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE 38 at MENUITEM.bType, db TYPE_MENUITEM_ACTION 39 iend 40 37 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE 38 at MENUITEM.bType, db TYPE_MENUITEM_ACTION 39 iend 40 41 41 g_MenuitemMainMenuLoadBiosFromFile: 42 42 istruc MENUITEM … … 89 89 iend 90 90 91 g_MenuitemMainMenuSaveFile: 91 g_MenuitemMainMenuSaveFile: 92 92 istruc MENUITEM 93 93 at MENUITEM.fnActivate, dw BiosFile_SaveUnsavedChanges … … 97 97 at MENUITEM.bFlags, db NULL 98 98 at MENUITEM.bType, db TYPE_MENUITEM_ACTION 99 iend 99 iend 100 100 101 101 g_MenuitemMainMenuExitToDos: … … 109 109 iend 110 110 111 g_MenuitemMainMenuHomePage: 111 g_MenuitemMainMenuHomePage: 112 112 istruc MENUITEM 113 113 at MENUITEM.fnActivate, dw Menuitem_DisplayHelpMessageFromDSSI … … 115 115 at MENUITEM.szQuickInfo, dw g_szNfoMainHomePage 116 116 at MENUITEM.szHelp, dw g_szNfoMainHomePage 117 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE 118 at MENUITEM.bType, db TYPE_MENUITEM_ACTION 119 iend 117 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE 118 at MENUITEM.bType, db TYPE_MENUITEM_ACTION 119 iend 120 120 121 121 … … 139 139 call .EnableOrDisableConfigureXtideUniversalBios 140 140 call .EnableOrDisableFlashEeprom 141 call .EnableOrDisableSave 141 call .EnableOrDisableSave 142 142 mov si, g_MenupageForMainMenu 143 143 jmp Menupage_ChangeToNewMenupageInDSSI … … 220 220 ; Nothing 221 221 ;-------------------------------------------------------------------- 222 ALIGN JUMP_ALIGN 223 .EnableOrDisableSave: 222 ALIGN JUMP_ALIGN 223 .EnableOrDisableSave: 224 224 test WORD [g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_FILELOADED 225 225 jz SHORT .DisableSave … … 227 227 ret 228 228 229 ALIGN JUMP_ALIGN 229 ALIGN JUMP_ALIGN 230 230 .DisableSave: 231 231 and BYTE [g_MenuitemMainMenuSaveFile+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE 232 232 ret 233 233 234 234 ;-------------------------------------------------------------------- 235 235 ; MENUITEM activation functions (.fnActivate) … … 243 243 ALIGN JUMP_ALIGN 244 244 ExitToDosSelectedFromMenu: 245 CALL_MENU_LIBRARY CloseMenuIfExitEventAllows 246 ExitToDosFromBackButton: 247 ret 245 JMP_MENU_LIBRARY CloseMenuIfExitEventAllows 248 246 249 247 … … 262 260 .CancelFileLoading: 263 261 add sp, BYTE FILE_DIALOG_IO_size 262 ExitToDosFromBackButton: 264 263 ret 265 264 … … 284 283 jmp Dialogs_DisplayNotificationFromCSDX 285 284 286 287
Note:
See TracChangeset
for help on using the changeset viewer.