Changeset 162 in xtideuniversalbios for trunk/Assembly_Library
- Timestamp:
- May 28, 2011, 7:34:42 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/Assembly_Library
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/Emulate.inc
r146 r162 376 376 db 01100101b 377 377 %else 378 %error "Invalid segment overri edpassed to eSEG!"378 %error "Invalid segment override passed to eSEG!" 379 379 %endif 380 380 %endmacro -
trunk/Assembly_Library/Src/AssemblyLibrary.asm
r139 r162 60 60 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 61 61 %include "String.asm" 62 %include "StringProcess.asm" 62 63 %endif 63 %include "StringProcess.asm"64 64 %endif 65 65 -
trunk/Assembly_Library/Src/Display/CgaSnow.asm
r101 r162 31 31 32 32 33 ; CGA snow preventi ng must be kept optional so unnecerrasy overhead34 ; can be prevented when building program ment for non-CGA systems.33 ; CGA snow prevention must be kept optional to avoid unnecessary 34 ; overhead when building programs meant for non-CGA systems. 35 35 %ifdef ELIMINATE_CGA_SNOW 36 36 … … 74 74 .StoswWithoutWaitSinceUnknownPort: 75 75 stosw 76 sti 76 77 pop bx 77 sti78 78 ret 79 79 -
trunk/Assembly_Library/Src/Display/DisplayContext.asm
r133 r162 268 268 ; Nothing 269 269 ;-------------------------------------------------------------------- 270 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS ; This appears to be completely unused271 ALIGN JUMP_ALIGN272 DisplayContext_GetCharacterOutputParameterToDX:273 mov dx, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam]274 ret275 %endif270 ;%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS ; This appears to be completely unused 271 ;ALIGN JUMP_ALIGN 272 ;DisplayContext_GetCharacterOutputParameterToDX: 273 ; mov dx, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam] 274 ; ret 275 ;%endif 276 276 277 277 -
trunk/Assembly_Library/Src/Display/DisplayPrint.asm
r134 r162 25 25 ; For example %8-d would prepend integer with spaces so that at least 26 26 ; 8 characters would be printed. 27 ; 27 ; 28 28 ; DisplayPrint_FormattedNullTerminatedStringFromCSSI 29 29 ; Parameters: … … 158 158 loop .PrintNextCharacter 159 159 160 LOAD_BDA_SEGMENT_TO ds, dx160 mov ds, cx ; Restore DS to BDA. Not needed unless DisplayPrint_CharacterFromAL changes DS. 161 161 pop cx 162 162 pop si -
trunk/Assembly_Library/Src/Menu/Dialog/Dialog.asm
r60 r162 1 ; File name : Dialog.asm2 1 ; Project name : Assembly Library 3 ; Created date : 6.8.20104 ; Last update : 22.11.20105 ; Author : Tomi Tilli6 2 ; Description : Common functions for many dialogs. 7 3 … … 235 231 call MenuLocation_GetTitleBordersTopLeftCoordinatesToAX 236 232 cmp ah, dh ; Dialog taller than parent? 237 jb SHORT .RedrawDialogAreaAndWholeParentWindow 238 jmp SHORT .RedrawWholeParentWindow 239 240 ;-------------------------------------------------------------------- 241 ; .GetParentTitleBorderCoordinatesToDX 242 ; Parameters: 243 ; SS:SI: Ptr to parent MENU 244 ; SS:BP: Ptr to DIALOG 245 ; Returns: 246 ; DL: Parent border column (X) 247 ; DH: Parent border row (Y) 248 ; Corrupts: 249 ; AX 250 ;-------------------------------------------------------------------- 251 ALIGN JUMP_ALIGN 252 .GetParentTitleBorderCoordinatesToDX: 253 xchg si, bp 254 call MenuLocation_GetTitleBordersTopLeftCoordinatesToAX 255 xchg bp, si 256 xchg dx, ax 257 ret 233 jnb SHORT .RedrawWholeParentWindow 234 ; Fall to .RedrawDialogAreaAndWholeParentWindow 258 235 259 236 ;-------------------------------------------------------------------- … … 268 245 ; AX, BX, CX, DX, SI, DI 269 246 ;-------------------------------------------------------------------- 270 ALIGN JUMP_ALIGN271 247 .RedrawDialogAreaAndWholeParentWindow: 272 248 push si … … 286 262 pop bp 287 263 ret 264 265 ;-------------------------------------------------------------------- 266 ; .GetParentTitleBorderCoordinatesToDX 267 ; Parameters: 268 ; SS:SI: Ptr to parent MENU 269 ; SS:BP: Ptr to DIALOG 270 ; Returns: 271 ; DL: Parent border column (X) 272 ; DH: Parent border row (Y) 273 ; Corrupts: 274 ; AX 275 ;-------------------------------------------------------------------- 276 ALIGN JUMP_ALIGN 277 .GetParentTitleBorderCoordinatesToDX: 278 xchg si, bp 279 call MenuLocation_GetTitleBordersTopLeftCoordinatesToAX 280 xchg bp, si 281 xchg dx, ax 282 ret -
trunk/Assembly_Library/Src/String/Char.asm
r145 r162 1 ; File name : Char.asm2 1 ; Project name : Assembly Library 3 ; Created date : 28.6.20104 ; Last update : 7.9.20105 ; Author : Tomi Tilli6 2 ; Description : Functions for handling characters. 7 3 … … 18 14 ; Returns: 19 15 ; CF: Set if character is range 20 ; (Jumps to Char IsNotValid if before range)16 ; (Jumps to Char_CharIsNotValid if before range) 21 17 ; Corrupts registers: 22 18 ; Nothing … … 24 20 %macro IS_BETWEEN_IMMEDIATES 3 25 21 cmp %1, %2 26 jb SHORT Char IsNotValid22 jb SHORT Char_CharIsNotValid 27 23 cmp %1, (%3)+1 ; Set CF if %1 is lesser 28 24 %endmacro … … 54 50 ; Nothing 55 51 ;-------------------------------------------------------------------- 52 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 56 53 ALIGN JUMP_ALIGN 57 54 Char_IsUpperCaseLetterInAL: 58 55 IS_BETWEEN_IMMEDIATES al, 'A', 'Z' 59 56 ret 57 %endif 60 58 61 59 ;-------------------------------------------------------------------- … … 70 68 ; Nothing 71 69 ;-------------------------------------------------------------------- 70 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 72 71 ALIGN JUMP_ALIGN 73 72 Char_IsHexadecimalDigitInAL: … … 77 76 IS_BETWEEN_IMMEDIATES al, 'a', 'f' 78 77 ret 78 %endif 79 79 80 80 ;-------------------------------------------------------------------- … … 106 106 ; Nothing 107 107 ;-------------------------------------------------------------------- 108 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 108 109 ALIGN JUMP_ALIGN 109 110 Char_ConvertIntegerToALfromDigitInALwithBaseInBX: … … 112 113 call dx ; Converts to lower case 113 114 pop dx 114 jnc SHORT Char IsNotValid115 jnc SHORT Char_CharIsNotValid 115 116 116 117 cmp al, '9' ; Decimal digit … … 120 121 .ConvertToDecimalDigit: 121 122 sub al, '0' ; Convert to decimal integer 122 ; Fall to CharIsValid 123 124 ;-------------------------------------------------------------------- 125 ; CharIsValid 126 ; CharIsNotValid 127 ; Parameters: 128 ; Nothing 129 ; Returns: 130 ; CF: Set for CharIsValid 131 ; Cleared for CharIsNotValid 132 ; Corrupts registers: 133 ; Nothing 134 ;-------------------------------------------------------------------- 123 ; Fall to Char_CharIsValid 124 %endif 125 126 ;-------------------------------------------------------------------- 127 ; Char_CharIsValid 128 ; Char_CharIsNotValid 129 ; Parameters: 130 ; Nothing 131 ; Returns: 132 ; CF: Set for Char_CharIsValid 133 ; Cleared for Char_CharIsNotValid 134 ; Corrupts registers: 135 ; Nothing 136 ;-------------------------------------------------------------------- 137 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 135 138 ALIGN JUMP_ALIGN 136 139 Char_CharIsValid: 137 140 stc 138 141 ret 139 140 ALIGN JUMP_ALIGN 141 CharIsNotValid: 142 %endif 143 144 ALIGN JUMP_ALIGN 145 Char_CharIsNotValid: 142 146 clc 143 147 ret … … 153 157 ; Nothing 154 158 ;-------------------------------------------------------------------- 159 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 155 160 ALIGN JUMP_ALIGN 156 161 Char_ALtoLowerCaseLetter: … … 160 165 .Return: 161 166 ret 167 %endif 162 168 163 169 ;-------------------------------------------------------------------- … … 188 194 ; Nothing 189 195 ;-------------------------------------------------------------------- 196 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 190 197 ALIGN JUMP_ALIGN 191 198 Char_GetFilterFunctionToDXforNumericBaseInBX: … … 193 200 cmp bl, 10 194 201 je SHORT .Return 195 sub dx, BYTE Char_IsDecimalDigitInAL -Char_IsHexadecimalDigitInAL202 mov dx, Char_IsHexadecimalDigitInAL 196 203 .Return: 197 204 ret 205 %endif -
trunk/Assembly_Library/Src/String/StringProcess.asm
r67 r162 1 ; File name : StringProcess.asm2 1 ; Project name : Assembly Library 3 ; Created date : 12.10.20104 ; Last update : 7.12.20105 ; Author : Tomi Tilli6 2 ; Description : Functions for processing characters in a string. 7 3 … … 33 29 ; CX: Number of characters processed 34 30 ; CF: Clear if all characters processed 35 ; Set if terminated by processing function 31 ; Set if terminated by processing function 36 32 ; Corrupts registers: 37 33 ; Nothing (processing function can corrupt BX,DI,ES) … … 91 87 StringProcess_ConvertToWordInDIWithBaseInBX: 92 88 call Char_ConvertIntegerToALfromDigitInALwithBaseInBX 93 jnc SHORT .InvalidCharacter 89 cmc 90 jc SHORT .InvalidCharacter 94 91 push dx 95 92 … … 99 96 jc SHORT .Overflow 100 97 add di, ax ; Add old WORD to new integer 101 jc SHORT .Overflow102 98 103 pop dx104 ret105 99 .Overflow: 106 100 pop dx 107 101 .InvalidCharacter: 108 stc ; Set CF to stop processing109 102 ret
Note:
See TracChangeset
for help on using the changeset viewer.