Changeset 505 in xtideuniversalbios for trunk/Assembly_Library
- Timestamp:
- Feb 25, 2013, 4:23:09 PM (12 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/Assembly_Library
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/Display.inc
r407 r505 6 6 %ifndef MODULE_STRINGS_COMPRESSED_PRECOMPRESS 7 7 ;-------------------------------------------------------------------- 8 ; Display Library users need to use th is macrosince it will provide8 ; Display Library users need to use these macros since it will provide 9 9 ; compatibility with future library versions. 10 10 ; 11 11 ; CALL_DISPLAY_LIBRARY 12 ; JMP_DISPLAY_LIBRARY 12 13 ; Parameters: 13 14 ; %1: Function to call (functionName from DISPLAY_LIB) … … 28 29 mov di, %1 29 30 call Display_FunctionFromDI 31 %endif 32 %endmacro 33 34 %macro JMP_DISPLAY_LIBRARY 1 35 %ifidn %1, PushDisplayContext 36 jmp DisplayContext_Push 37 %elifidn %1, PopDisplayContext 38 call DisplayContext_Pop 39 ret 40 %elifidn %1, PrepareOffScreenBufferInESBXwithLengthInCX 41 jmp DisplayContext_PrepareOffScreenBufferInESBXwithLengthInCX 42 %elifidn %1, FormatNullTerminatedStringFromCSSI 43 mov di, %1 44 call Display_FunctionFromDI 45 ret 46 %else 47 mov di, %1 48 jmp Display_FunctionFromDI 30 49 %endif 31 50 %endmacro -
trunk/Assembly_Library/Inc/MenuEvents.inc
r492 r505 1 ; File name : MenuEvents.inc2 1 ; Project name : Assembly Library 3 ; Created date : 13.7.20104 ; Last update : 18.10.20105 ; Author : Tomi Tilli6 2 ; Description : Defines for Menu events send to the user. 7 3 %ifndef MENUEVENTS_INC … … 27 23 ; 28 24 ; 2. If the program needs only one menu, %define MENUEVENT_INLINE_OFFSETS before this include file, 29 ; and define (through EQU statements) each of the entry points as offsets from a base address. 30 ; 25 ; and define (through EQU statements) each of the entry points as offsets from a base address. 26 ; 31 27 32 28 ; … … 49 45 ; Returns: 50 46 ; DS:SI: Ptr to initialized MENUINIT struct 51 .InitializeMenuinitFromDSSI 52 MENUEVENT_InitializeMenuinitFromDSSI equMENUEVENT.InitializeMenuinitFromDSSI47 .InitializeMenuinitFromDSSI resb 2 48 %define MENUEVENT_InitializeMenuinitFromDSSI MENUEVENT.InitializeMenuinitFromDSSI 53 49 54 50 ; Parameters: … … 57 53 ; CF: Set to exit menu 58 54 ; Clear to cancel exit 59 .ExitMenu 60 MENUEVENT_ExitMenu equMENUEVENT.ExitMenu55 .ExitMenu resb 2 56 %define MENUEVENT_ExitMenu MENUEVENT.ExitMenu 61 57 62 58 %ifdef MENUEVENT_IDLEPROCESSING_ENABLE … … 64 60 ; None 65 61 ; See the definition of MENUEVENT_IDLEPROCESSING_ENABLE below. 66 .IdleProcessing 67 MENUEVENT_IdleProcessing equMENUEVENT.IdleProcessing62 .IdleProcessing resb 2 63 %define MENUEVENT_IdleProcessing MENUEVENT.IdleProcessing 68 64 %endif 69 65 … … 71 67 ; CX: Index of new highlighted item 72 68 ; DX: Index of previously highlighted item or NO_ITEM_HIGHLIGHTED 73 .ItemHighlightedFromCX 74 MENUEVENT_ItemHighlightedFromCX equMENUEVENT.ItemHighlightedFromCX69 .ItemHighlightedFromCX resb 2 70 %define MENUEVENT_ItemHighlightedFromCX MENUEVENT.ItemHighlightedFromCX 75 71 76 72 ; Parameters: 77 73 ; CX: Index of selected item 78 .ItemSelectedFromCX 79 MENUEVENT_ItemSelectedFromCX equMENUEVENT.ItemSelectedFromCX74 .ItemSelectedFromCX resb 2 75 %define MENUEVENT_ItemSelectedFromCX MENUEVENT.ItemSelectedFromCX 80 76 81 77 ; Parameters: 82 78 ; AL: ASCII character for the key 83 79 ; AH: Keyboard library scan code for the key 84 .KeyStrokeInAX 85 MENUEVENT_KeyStrokeInAX equMENUEVENT.KeyStrokeInAX80 .KeyStrokeInAX resb 2 81 %define MENUEVENT_KeyStrokeInAX MENUEVENT.KeyStrokeInAX 86 82 87 83 ; Parameters: 88 84 ; CX: Index of highlighted item 89 85 ; Cursor has been positioned to the beginning of first line 90 .RefreshTitle 91 .RefreshInformation 92 MENUEVENT_RefreshTitle equMENUEVENT.RefreshTitle93 MENUEVENT_RefreshInformation equMENUEVENT.RefreshInformation86 .RefreshTitle resb 2 87 .RefreshInformation resb 2 88 %define MENUEVENT_RefreshTitle MENUEVENT.RefreshTitle 89 %define MENUEVENT_RefreshInformation MENUEVENT.RefreshInformation 94 90 95 91 ; Parameters: 96 92 ; CX: Index of item to refresh 97 93 ; Cursor has been positioned to the beginning of item line 98 .RefreshItemFromCX 99 MENUEVENT_RefreshItemFromCX equMENUEVENT.RefreshItemFromCX94 .RefreshItemFromCX resb 2 95 %define MENUEVENT_RefreshItemFromCX MENUEVENT.RefreshItemFromCX 100 96 endstruc 101 97 102 %endif ; MENUEVENT S_INLINE_OFFSETS98 %endif ; MENUEVENT_INLINE_OFFSETS 103 99 104 100 %endif ; MENUEVENTS_INC -
trunk/Assembly_Library/Src/Display/DisplayFormatCompressed.asm
r445 r505 139 139 140 140 .PrintDigit: 141 add al, 90h ; Convert binary digit in AL to ASCII hex digit (0 - 9 or A - F) 142 daa 143 adc al, 40h 144 daa 141 cmp al, 10 ; Convert binary digit in AL to ASCII hex digit ('0'-'9' or 'A'-'F') 142 sbb al, 69h 143 das 145 144 146 145 call DisplayPrint_CharacterFromAL -
trunk/Assembly_Library/Src/Display/DisplayPrint.asm
r492 r505 306 306 %endif 307 307 308 %ifndef EXCLUDE 308 %ifndef EXCLUDE 309 309 ;-------------------------------------------------------------------- 310 310 ; DisplayPrint_RepeatCharacterFromALwithCountInCX … … 397 397 ; Parameters: 398 398 ; AL: Character to display 399 ; Zero value is ignored (no charac er is printed)399 ; Zero value is ignored (no character is printed) 400 400 ; DS: BDA segment (zero) 401 401 ; ES:DI: Ptr to cursor location in video RAM … … 407 407 ALIGN DISPLAY_JUMP_ALIGN 408 408 DisplayPrint_CharacterFromAL: 409 test al, al409 test al, al 410 410 jz DisplayPrint_Ret 411 411 -
trunk/Assembly_Library/Src/Menu/CharOutLineSplitter.asm
r445 r505 45 45 xchg ax, dx ; AL = First text line column offset 46 46 mov ah, dl ; AH = Last text line column offset 47 CALL_DISPLAY_LIBRARY SetCharacterOutputParameterFromAX 48 ret 47 JMP_DISPLAY_LIBRARY SetCharacterOutputParameterFromAX 49 48 50 49 -
trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm
r376 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 ; … … 197 197 call .FindMatchingFilesAndPrintThemToOffScreenBuffer 198 198 199 CALL_DISPLAY_LIBRARY PopDisplayContext 200 ret 199 JMP_DISPLAY_LIBRARY PopDisplayContext 201 200 202 201 ;-------------------------------------------------------------------- … … 372 371 ALIGN JUMP_ALIGN 373 372 .FormatStringInCSSIandReturn: 374 CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI 375 ret 373 JMP_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI 376 374 377 375 … … 755 753 call MenuText_PrepareToDrawInformationArea 756 754 mov si, g_szLoadingPleaseWait 757 CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI 758 ret 755 JMP_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI 759 756 760 757 -
trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm
r491 r505 216 216 ALIGN JUMP_ALIGN 217 217 .RepeatProgressCharacterCXtimesFromAL: 218 jcxz .NothingToRepeat 219 CALL_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX 220 ALIGN JUMP_ALIGN, ret 221 .NothingToRepeat: 222 ret 218 jcxz NothingToRepeat 219 JMP_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX 223 220 224 221 … … 236 233 mov bx, [si+PROGRESS_DIALOG_IO.wMaxProgressValue] 237 234 sub bx, [si+PROGRESS_DIALOG_IO.wMinProgressValue] 235 NothingToRepeat: 238 236 ret 239 237 -
trunk/Assembly_Library/Src/Menu/Dialog/DialogWord.asm
r376 r505 1 ; File name : DialogWord.asm2 1 ; Project name : Assembly Library 3 ; Created date : 10.8.20104 ; Last update : 18.11.20105 ; Author : Tomi Tilli6 2 ; Description : Displays word input dialog. 7 3 8 4 ; 9 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 10 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 11 7 ; … … 14 10 ; the Free Software Foundation; either version 2 of the License, or 15 11 ; (at your option) any later version. 16 ; 12 ; 17 13 ; This program is distributed in the hope that it will be useful, 18 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 19 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 21 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 22 18 ; 23 19 24 20 25 21 ; Section containing code … … 142 138 143 139 xchg ax, dx 144 CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX145 ret 140 JMP_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 141 -
trunk/Assembly_Library/Src/Menu/MenuAttributes.asm
r376 r505 4 4 5 5 ; 6 ; XTIDE Universal BIOS and Associated Tools 6 ; XTIDE Universal BIOS and Associated Tools 7 7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 8 8 ; … … 11 11 ; the Free Software Foundation; either version 2 of the License, or 12 12 ; (at your option) any later version. 13 ; 13 ; 14 14 ; This program is distributed in the hope that it will be useful, 15 15 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 16 16 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 ; GNU General Public License for more details. 17 ; GNU General Public License for more details. 18 18 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 19 19 ; 20 20 21 21 22 22 ; Struct containing border characters for different types of menu window lines … … 48 48 MenuAttribute_SetToDisplayContextFromTypeInSI: 49 49 call MenuAttribute_GetToAXfromTypeInSI 50 CALL_DISPLAY_LIBRARY SetCharacterAttributeFromAL 51 ret 50 JMP_DISPLAY_LIBRARY SetCharacterAttributeFromAL 52 51 53 52 -
trunk/Assembly_Library/Src/Menu/MenuBorders.asm
r376 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 21 21 ; Struct containing border characters for different types of menu window lines … … 296 296 ALIGN MENU_JUMP_ALIGN 297 297 PrintNewlineToEndBorderLine: 298 CALL_DISPLAY_LIBRARY PrintNewlineCharacters 299 ret 298 JMP_DISPLAY_LIBRARY PrintNewlineCharacters 300 299 301 300 … … 325 324 call MenuBorders_PrintMultipleBorderCharactersFromAL ; AL does not matter 326 325 327 CALL_DISPLAY_LIBRARY PopDisplayContext 328 ret 326 JMP_DISPLAY_LIBRARY PopDisplayContext 329 327 330 328 … … 365 363 ALIGN MENU_JUMP_ALIGN 366 364 MenuBorders_PrintSingleBorderCharacterFromAL: 367 CALL_DISPLAY_LIBRARY PrintCharacterFromAL 368 ret 365 JMP_DISPLAY_LIBRARY PrintCharacterFromAL 369 366 370 367 ALIGN MENU_JUMP_ALIGN -
trunk/Assembly_Library/Src/Menu/MenuEvent.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 ; 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 21 21 ; Section containing code … … 58 58 jmp SHORT MenuEvent_SendFromBX 59 59 %endif 60 60 61 61 62 62 %ifdef MENUEVENT_IDLEPROCESSING_ENABLE … … 155 155 ; AX, BX, DX 156 156 ;-------------------------------------------------------------------- 157 %ifdef MENUEVENT_KeyStrok InAX157 %ifdef MENUEVENT_KeyStrokeInAX 158 158 ALIGN MENU_JUMP_ALIGN 159 159 MenuEvent_KeyStrokeInAX: -
trunk/Assembly_Library/Src/Menu/MenuText.asm
r376 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 21 21 ; Section containing code … … 40 40 jmp SHORT MenuText_ClearInformationArea.ClearCLlinesOfText 41 41 %endif 42 42 43 43 ALIGN MENU_JUMP_ALIGN 44 44 MenuText_ClearInformationArea: … … 53 53 mov al, ' ' 54 54 CALL_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX 55 CALL_DISPLAY_LIBRARY PopDisplayContext 56 ret 55 JMP_DISPLAY_LIBRARY PopDisplayContext 57 56 58 57 … … 220 219 221 220 xchg ax, bx 222 CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 223 ret 221 JMP_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 224 222 225 223 -
trunk/Assembly_Library/Src/TimerTest.asm
r376 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 ; Include .inc files … … 109 109 ; Parameters: 110 110 ; AX: Difference in register and memory access durations 111 ; (Precise Event Timer Ticks) 111 ; (Precise Event Timer Ticks) 112 112 ; Returns: 113 113 ; AX: Duration for single BYTE in nanosecs … … 182 182 push dx 183 183 push ax 184 CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI 185 ret 184 JMP_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI 186 185 187 186
Note:
See TracChangeset
for help on using the changeset viewer.