Changeset 369 in xtideuniversalbios
- Timestamp:
- Mar 29, 2012, 9:29:28 AM (13 years ago)
- google:author:
- gregli@hotmail.com
- Location:
- trunk
- Files:
-
- 48 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/AssemblyLibrary.asm
r280 r369 7 7 8 8 %ifdef INCLUDE_DISPLAY_LIBRARY 9 %ifndef DISPLAY_JUMP_ALIGN 10 %define DISPLAY_JUMP_ALIGN 1 11 %endif 9 12 %include "CgaSnow.asm" 10 13 %include "Display.asm" … … 29 32 30 33 %ifdef INCLUDE_KEYBOARD_LIBRARY 34 %ifndef KEYBOARD_JUMP_ALIGN 35 %define KEYBOARD_JUMP_ALIGN 1 36 %endif 31 37 %include "Keyboard.asm" 32 38 %endif 33 39 34 40 %ifdef INCLUDE_MENU_LIBRARY 41 %ifndef MENU_JUMP_ALIGN 42 %define MENU_JUMP_ALIGN 1 43 %endif 35 44 %include "CharOutLineSplitter.asm" 36 45 %include "Menu.asm" … … 61 70 62 71 %ifdef INCLUDE_STRING_LIBRARY 72 %ifndef STRING_JUMP_ALIGN 73 %define STRING_JUMP_ALIGN 1 74 %endif 63 75 %include "Char.asm" 64 76 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS … … 86 98 87 99 %ifdef INCLUDE_UTIL_LIBRARY 100 %ifndef UTIL_SIZE_JUMP_ALIGN 101 %define UTIL_SIZE_JUMP_ALIGN 1 102 %endif 88 103 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 89 104 %include "Bit.asm" -
trunk/Assembly_Library/Src/Display/CgaSnow.asm
r223 r369 15 15 ; AX 16 16 ;-------------------------------------------------------------------- 17 ALIGN JUMP_ALIGN17 ALIGN DISPLAY_JUMP_ALIGN 18 18 CgaSnow_IsCgaPresent: 19 19 cmp WORD [BDA.wVidPort], CGA_STATUS_REGISTER - OFFSET_TO_CGA_STATUS_REGISTER … … 25 25 stc 26 26 ret 27 ALIGN JUMP_ALIGN27 ALIGN DISPLAY_JUMP_ALIGN 28 28 .CgaNotFound: 29 29 clc … … 48 48 ; AX, DX 49 49 ;-------------------------------------------------------------------- 50 ALIGN JUMP_ALIGN50 ALIGN DISPLAY_JUMP_ALIGN 51 51 CgaSnow_Stosb: 52 52 call LoadCgaStatusRegisterAddressToDXifCgaPresent … … 62 62 ret 63 63 64 ALIGN JUMP_ALIGN64 ALIGN DISPLAY_JUMP_ALIGN 65 65 CgaSnow_Stosw: 66 66 push bx … … 91 91 ; AX, CX, DX 92 92 ;-------------------------------------------------------------------- 93 ALIGN JUMP_ALIGN93 ALIGN DISPLAY_JUMP_ALIGN 94 94 CgaSnow_RepMovsb: 95 95 call LoadCgaStatusRegisterAddressToDXifCgaPresent … … 119 119 ; Nothing 120 120 ;-------------------------------------------------------------------- 121 ALIGN JUMP_ALIGN121 ALIGN DISPLAY_JUMP_ALIGN 122 122 LoadCgaStatusRegisterAddressToDXifCgaPresent: 123 123 test BYTE [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.bFlags], FLG_CONTEXT_CGA 124 124 jz SHORT .NoCgaDetected 125 125 mov dx, CGA_STATUS_REGISTER 126 ALIGN JUMP_ALIGN, ret126 ALIGN DISPLAY_JUMP_ALIGN, ret 127 127 .NoCgaDetected: 128 128 ret -
trunk/Assembly_Library/Src/Display/Display.asm
r341 r369 16 16 ; AX (unless used as a return register), DI 17 17 ;-------------------------------------------------------------------- 18 ALIGN JUMP_ALIGN18 ALIGN DISPLAY_JUMP_ALIGN 19 19 Display_FunctionFromDI: 20 20 push es … … 43 43 ; AX 44 44 ;-------------------------------------------------------------------- 45 ALIGN JUMP_ALIGN45 ALIGN DISPLAY_JUMP_ALIGN 46 46 Display_FormatNullTerminatedStringFromCSSI: 47 47 pop ax ; Discard return address to inside Display_FunctionFromDI -
trunk/Assembly_Library/Src/Display/DisplayCharOut.asm
r101 r369 21 21 ; AX, DX 22 22 ;-------------------------------------------------------------------- 23 ALIGN JUMP_ALIGN23 ALIGN DISPLAY_JUMP_ALIGN 24 24 DisplayCharOut_TeletypeOutputWithAttribute: 25 25 cmp al, ' ' ; Printable character? … … 28 28 ret 29 29 30 ALIGN JUMP_ALIGN30 ALIGN DISPLAY_JUMP_ALIGN 31 31 DisplayCharOut_TeletypeOutput: 32 32 cmp al, ' ' ; Printable character? … … 45 45 ; AX, DX 46 46 ;-------------------------------------------------------------------- 47 ALIGN JUMP_ALIGN47 ALIGN DISPLAY_JUMP_ALIGN 48 48 DisplayCharOut_BiosTeletypeOutput: 49 49 push ax … … 76 76 ; AX, DX 77 77 ;-------------------------------------------------------------------- 78 ALIGN JUMP_ALIGN78 ALIGN DISPLAY_JUMP_ALIGN 79 79 DisplayCharOut_Attribute: 80 80 xchg al, ah ; Swap character and attribute … … 83 83 ret 84 84 85 ALIGN JUMP_ALIGN85 ALIGN DISPLAY_JUMP_ALIGN 86 86 DisplayCharOut_Character: 87 87 WAIT_RETRACE_IF_NECESSARY_THEN stosb … … 89 89 ret 90 90 91 ALIGN JUMP_ALIGN91 ALIGN DISPLAY_JUMP_ALIGN 92 92 DisplayCharOut_CharacterWithAttribute: 93 93 WAIT_RETRACE_IF_NECESSARY_THEN stosw … … 107 107 ; AX, DX 108 108 ;-------------------------------------------------------------------- 109 ALIGN JUMP_ALIGN109 ALIGN DISPLAY_JUMP_ALIGN 110 110 DisplayCharOut_WriteCharacterToBuffer: 111 111 cmp WORD [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam], BYTE 0 -
trunk/Assembly_Library/Src/Display/DisplayContext.asm
r287 r369 14 14 ; AX, DX, DI 15 15 ;-------------------------------------------------------------------- 16 ALIGN JUMP_ALIGN16 ALIGN DISPLAY_JUMP_ALIGN 17 17 DisplayContext_Initialize: 18 18 mov WORD [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fnCharOut], DEFAULT_CHARACTER_OUTPUT … … 79 79 ; AX, DX 80 80 ;-------------------------------------------------------------------- 81 ALIGN JUMP_ALIGN81 ALIGN DISPLAY_JUMP_ALIGN 82 82 DisplayContext_SynchronizeToHardware: 83 83 call DisplayPage_SynchronizeToHardware … … 95 95 ; AX, DI 96 96 ;-------------------------------------------------------------------- 97 ALIGN JUMP_ALIGN97 ALIGN DISPLAY_JUMP_ALIGN 98 98 DisplayContext_Push: 99 99 mov di, ds ; Backup DS … … 121 121 ; AX, DI 122 122 ;-------------------------------------------------------------------- 123 ALIGN JUMP_ALIGN123 ALIGN DISPLAY_JUMP_ALIGN 124 124 DisplayContext_Pop: 125 125 mov di, ds ; Backup DS … … 154 154 ;-------------------------------------------------------------------- 155 155 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 156 ALIGN JUMP_ALIGN156 ALIGN DISPLAY_JUMP_ALIGN 157 157 DisplayContext_PrepareOffScreenBufferInESBXwithLengthInCX: 158 158 push ds … … 185 185 ;-------------------------------------------------------------------- 186 186 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 187 ALIGN JUMP_ALIGN187 ALIGN DISPLAY_JUMP_ALIGN 188 188 DisplayContext_SetCharacterPointerFromBXAX: 189 189 mov [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fpCursorPosition], ax … … 205 205 ;-------------------------------------------------------------------- 206 206 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 207 ALIGN JUMP_ALIGN207 ALIGN DISPLAY_JUMP_ALIGN 208 208 DisplayContext_GetCharacterPointerToBXAX: 209 209 mov ax, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fpCursorPosition] … … 224 224 ; BL 225 225 ;-------------------------------------------------------------------- 226 ALIGN JUMP_ALIGN226 ALIGN DISPLAY_JUMP_ALIGN 227 227 DisplayContext_SetCharOutputFunctionFromAXwithAttribFlagInBL: 228 228 and bl, FLG_CONTEXT_ATTRIBUTES … … 243 243 ; Nothing 244 244 ;-------------------------------------------------------------------- 245 ALIGN JUMP_ALIGN245 ALIGN DISPLAY_JUMP_ALIGN 246 246 DisplayContext_SetCharacterAttributeFromAL: 247 247 mov [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.bAttribute], al … … 259 259 ; Nothing 260 260 ;-------------------------------------------------------------------- 261 ALIGN JUMP_ALIGN261 ALIGN DISPLAY_JUMP_ALIGN 262 262 DisplayContext_SetCharacterOutputParameterFromAX: 263 263 mov [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam], ax … … 275 275 ;-------------------------------------------------------------------- 276 276 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG ; This is currently unused (dead code) 277 ALIGN JUMP_ALIGN277 ALIGN DISPLAY_JUMP_ALIGN 278 278 DisplayContext_GetCharacterOutputParameterToDX: 279 279 mov dx, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam] … … 293 293 ;-------------------------------------------------------------------- 294 294 %ifndef MODULE_STRINGS_COMPRESSED 295 ALIGN JUMP_ALIGN295 ALIGN DISPLAY_JUMP_ALIGN 296 296 DisplayContext_GetCharacterOffsetToAXfromByteOffsetInAX: 297 297 test BYTE [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.bFlags], FLG_CONTEXT_ATTRIBUTES … … 313 313 ;-------------------------------------------------------------------- 314 314 %ifndef MODULE_STRINGS_COMPRESSED 315 ALIGN JUMP_ALIGN315 ALIGN DISPLAY_JUMP_ALIGN 316 316 DisplayContext_GetByteOffsetToAXfromCharacterOffsetInAX: 317 317 test BYTE [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.bFlags], FLG_CONTEXT_ATTRIBUTES 318 318 jz SHORT ReturnOffsetInAX 319 319 sal ax, 1 ; WORD count to BYTE count 320 ALIGN JUMP_ALIGN, ret320 ALIGN DISPLAY_JUMP_ALIGN, ret 321 321 ReturnOffsetInAX: 322 322 ret -
trunk/Assembly_Library/Src/Display/DisplayCursor.asm
r101 r369 15 15 ; Nothing 16 16 ;-------------------------------------------------------------------- 17 ALIGN JUMP_ALIGN17 ALIGN DISPLAY_JUMP_ALIGN 18 18 DisplayCursor_SetShapeFromAX: 19 19 mov [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCursorShape], ax … … 32 32 ; AX, DX 33 33 ;-------------------------------------------------------------------- 34 ALIGN JUMP_ALIGN34 ALIGN DISPLAY_JUMP_ALIGN 35 35 DisplayCursor_SetCoordinatesFromAX: 36 36 xchg dx, ax … … 57 57 ; Nothing 58 58 ;-------------------------------------------------------------------- 59 ALIGN JUMP_ALIGN59 ALIGN DISPLAY_JUMP_ALIGN 60 60 DisplayCursor_GetSoftwareCoordinatesToAX: 61 61 mov ax, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fpCursorPosition] … … 77 77 ; DX 78 78 ;-------------------------------------------------------------------- 79 ALIGN JUMP_ALIGN79 ALIGN DISPLAY_JUMP_ALIGN 80 80 DisplayCursor_GetHardwareCoordinatesToAX: 81 81 push cx … … 101 101 ; AX, DX 102 102 ;-------------------------------------------------------------------- 103 ALIGN JUMP_ALIGN103 ALIGN DISPLAY_JUMP_ALIGN 104 104 DisplayCursor_SynchronizeShapeToHardware: 105 105 mov dx, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCursorShape] … … 138 138 ; AX, DX 139 139 ;-------------------------------------------------------------------- 140 ALIGN JUMP_ALIGN140 ALIGN DISPLAY_JUMP_ALIGN 141 141 DisplayCursor_SynchronizeCoordinatesToHardware: 142 142 call DisplayCursor_GetSoftwareCoordinatesToAX -
trunk/Assembly_Library/Src/Display/DisplayFormat.asm
r341 r369 18 18 ; AX, BX, CX, DX, BP 19 19 ;-------------------------------------------------------------------- 20 ALIGN JUMP_ALIGN20 ALIGN DISPLAY_JUMP_ALIGN 21 21 DisplayFormat_ParseCharacters: 22 22 call ReadCharacterAndTestForNull … … 69 69 ; AX 70 70 ;-------------------------------------------------------------------- 71 ALIGN JUMP_ALIGN71 ALIGN DISPLAY_JUMP_ALIGN 72 72 ParsePlaceholderSizeDigitFromALtoCX: 73 73 mov [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fpCursorPosition], di … … 90 90 ; Nothing 91 91 ;-------------------------------------------------------------------- 92 ALIGN JUMP_ALIGN92 ALIGN DISPLAY_JUMP_ALIGN 93 93 ReadCharacterAndTestForNull: 94 94 cs lodsb ; Load from CS:SI to AL … … 106 106 ; AX, BX 107 107 ;-------------------------------------------------------------------- 108 ALIGN JUMP_ALIGN108 ALIGN DISPLAY_JUMP_ALIGN 109 109 GetFormatSpecifierParserToAX: 110 110 mov bx, .rgcFormatCharToLookupIndex 111 ALIGN JUMP_ALIGN111 ALIGN DISPLAY_JUMP_ALIGN 112 112 .CheckForNextSpecifierParser: 113 113 cmp al, [cs:bx] … … 118 118 mov ax, c_FormatCharacter 119 119 ret 120 ALIGN JUMP_ALIGN120 ALIGN DISPLAY_JUMP_ALIGN 121 121 .ConvertIndexToFunctionOffset: 122 122 sub bx, .rgcFormatCharToLookupIndex … … 171 171 ; AX, BX, CX, DX 172 172 ;-------------------------------------------------------------------- 173 ALIGN JUMP_ALIGN173 ALIGN DISPLAY_JUMP_ALIGN 174 174 PrependOrAppendSpaces: 175 175 mov ax, di … … 210 210 ; AX, BX, CX, DX 211 211 ;-------------------------------------------------------------------- 212 ALIGN JUMP_ALIGN212 ALIGN DISPLAY_JUMP_ALIGN 213 213 .PrependWithSpaces: 214 214 xchg ax, cx … … 248 248 ; AX, CX, DX, SI 249 249 ;-------------------------------------------------------------------- 250 ALIGN JUMP_ALIGN250 ALIGN DISPLAY_JUMP_ALIGN 251 251 .ReverseCopyCXbytesFromESSItoESDI: 252 252 test BYTE [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.bFlags], FLG_CONTEXT_ATTRIBUTES … … 256 256 dec di ; Point to preceeding character instead of attribute 257 257 ret 258 ALIGN JUMP_ALIGN258 ALIGN DISPLAY_JUMP_ALIGN 259 259 .CopyWithoutDisplayProcessing: 260 260 eSEG_STR rep, es, movsb … … 271 271 ; Corrupts registers: 272 272 ; AX, CX, DX 273 ALIGN JUMP_ALIGN273 ALIGN DISPLAY_JUMP_ALIGN 274 274 .ReversePrintAXspacesStartingFromESDI: 275 275 call DisplayContext_GetCharacterOffsetToAXfromByteOffsetInAX … … 292 292 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 293 293 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 294 ALIGN JUMP_ALIGN294 ALIGN DISPLAY_JUMP_ALIGN 295 295 a_FormatAttributeForNextCharacter: 296 296 mov bl, [bp] … … 307 307 %endif 308 308 309 ALIGN JUMP_ALIGN309 ALIGN DISPLAY_JUMP_ALIGN 310 310 A_FormatAttributeForRemainingString: 311 311 mov al, [bp] … … 314 314 315 315 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 316 ALIGN JUMP_ALIGN316 ALIGN DISPLAY_JUMP_ALIGN 317 317 d_FormatSignedDecimalWord: 318 318 mov ax, [bp] … … 321 321 %endif 322 322 323 ALIGN JUMP_ALIGN323 ALIGN DISPLAY_JUMP_ALIGN 324 324 u_FormatUnsignedDecimalWord: 325 325 mov ax, [bp] … … 327 327 jmp DisplayPrint_WordFromAXWithBaseInBX 328 328 329 ALIGN JUMP_ALIGN329 ALIGN DISPLAY_JUMP_ALIGN 330 330 x_FormatHexadecimalWord: 331 331 mov ax, [bp] … … 335 335 jmp DisplayPrint_CharacterFromAL 336 336 337 ALIGN JUMP_ALIGN337 ALIGN DISPLAY_JUMP_ALIGN 338 338 I_FormatDashForZero: 339 339 mov ax, [bp] … … 343 343 ;;; fall-through 344 344 345 ALIGN JUMP_ALIGN345 ALIGN DISPLAY_JUMP_ALIGN 346 346 s_FormatStringFromSegmentCS: 347 347 push si … … 367 367 ret 368 368 369 ALIGN JUMP_ALIGN369 ALIGN DISPLAY_JUMP_ALIGN 370 370 z_FormatStringFromSegmentZero: 371 371 xchg si, [bp] … … 376 376 377 377 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 378 ALIGN JUMP_ALIGN378 ALIGN DISPLAY_JUMP_ALIGN 379 379 S_FormatStringFromFarPointer: 380 380 mov bx, [bp-2] … … 387 387 %endif 388 388 389 ALIGN JUMP_ALIGN389 ALIGN DISPLAY_JUMP_ALIGN 390 390 c_FormatCharacter: 391 391 mov al, [bp] … … 393 393 394 394 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 395 ALIGN JUMP_ALIGN395 ALIGN DISPLAY_JUMP_ALIGN 396 396 t_FormatRepeatCharacter: 397 397 push cx … … 404 404 ret 405 405 406 ALIGN JUMP_ALIGN406 ALIGN DISPLAY_JUMP_ALIGN 407 407 percent_FormatPercent: 408 408 mov al, '%' … … 410 410 %endif 411 411 412 ALIGN JUMP_ALIGN412 ALIGN DISPLAY_JUMP_ALIGN 413 413 PrepareToPrependParameterWithSpaces: 414 414 neg cx 415 415 ; Fall to PrepareToAppendSpacesAfterParameter 416 416 417 ALIGN JUMP_ALIGN417 ALIGN DISPLAY_JUMP_ALIGN 418 418 PrepareToAppendSpacesAfterParameter: 419 419 add sp, BYTE 2 ; Remove return offset -
trunk/Assembly_Library/Src/Display/DisplayFormatCompressed.asm
r241 r369 151 151 ; fall through to DisplayFormat_ParseCharacters 152 152 153 ALIGN JUMP_ALIGN153 ALIGN DISPLAY_JUMP_ALIGN 154 154 DisplayFormat_ParseCharacters: 155 155 ; … … 184 184 185 185 186 ALIGN JUMP_ALIGN186 ALIGN DISPLAY_JUMP_ALIGN 187 187 DisplayFormatCompressed_TranslatesAndFormats: 188 188 ; -
trunk/Assembly_Library/Src/Display/DisplayPage.asm
r194 r369 16 16 ;-------------------------------------------------------------------- 17 17 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 18 ALIGN JUMP_ALIGN18 ALIGN DISPLAY_JUMP_ALIGN 19 19 DisplayPage_SetFromAL: 20 20 xor ah, ah … … 35 35 ; Nothing 36 36 ;-------------------------------------------------------------------- 37 ALIGN JUMP_ALIGN37 ALIGN DISPLAY_JUMP_ALIGN 38 38 DisplayPage_GetColumnsToALandRowsToAH: 39 39 mov al, [VIDEO_BDA.wColumns] ; 40 or 80 … … 51 51 ; AX, DX 52 52 ;-------------------------------------------------------------------- 53 ALIGN JUMP_ALIGN53 ALIGN DISPLAY_JUMP_ALIGN 54 54 DisplayPage_SynchronizeToHardware: 55 55 xor dx, dx -
trunk/Assembly_Library/Src/Display/DisplayPrint.asm
r341 r369 42 42 ; AX, DX 43 43 ;-------------------------------------------------------------------- 44 ALIGN JUMP_ALIGN44 ALIGN DISPLAY_JUMP_ALIGN 45 45 DisplayPrint_FormattedNullTerminatedStringFromCSSI: 46 46 push bp … … 79 79 ;-------------------------------------------------------------------- 80 80 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 81 ALIGN JUMP_ALIGN81 ALIGN DISPLAY_JUMP_ALIGN 82 82 DisplayPrint_SignedWordFromAXWithBaseInBX: 83 83 test ax, ax … … 106 106 ; AX, DX 107 107 ;-------------------------------------------------------------------- 108 ALIGN JUMP_ALIGN108 ALIGN DISPLAY_JUMP_ALIGN 109 109 DisplayPrint_WordFromAXWithBaseInBX: 110 110 push cx … … 112 112 113 113 xor cx, cx 114 ALIGN JUMP_ALIGN114 ALIGN DISPLAY_JUMP_ALIGN 115 115 .DivideLoop: 116 116 xor dx, dx ; DX:AX now holds the integer … … 123 123 PrintAllPushedDigits: 124 124 mov bx, g_rgcDigitToCharacter 125 ALIGN JUMP_ALIGN125 ALIGN DISPLAY_JUMP_ALIGN 126 126 .PrintNextDigit: 127 127 pop ax ; Pop digit … … 149 149 ;-------------------------------------------------------------------- 150 150 %ifndef EXCLUDE_FROM_XTIDECFG ; Not used in XTIDECFG 151 ALIGN JUMP_ALIGN151 ALIGN DISPLAY_JUMP_ALIGN 152 152 DisplayPrint_QWordFromSSBPwithBaseInBX: 153 153 push cx … … 156 156 mov cx, bx ; CX = Integer base 157 157 xor bx, bx ; BX = Character count 158 ALIGN JUMP_ALIGN158 ALIGN DISPLAY_JUMP_ALIGN 159 159 .DivideLoop: 160 160 call Math_DivQWatSSBPbyCX; Divide by base … … 183 183 ;-------------------------------------------------------------------- 184 184 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 185 ALIGN JUMP_ALIGN185 ALIGN DISPLAY_JUMP_ALIGN 186 186 DisplayPrint_CharacterBufferFromBXSIwithLengthInCX: 187 187 jcxz .NothingToPrintSinceZeroLength … … 189 189 push cx 190 190 191 ALIGN JUMP_ALIGN191 ALIGN DISPLAY_JUMP_ALIGN 192 192 .PrintNextCharacter: 193 193 mov ds, bx … … 216 216 ; AX, DX 217 217 ;-------------------------------------------------------------------- 218 ALIGN JUMP_ALIGN218 ALIGN DISPLAY_JUMP_ALIGN 219 219 DisplayPrint_ClearScreenWithCharInALandAttributeInAH: 220 220 push di … … 248 248 ;-------------------------------------------------------------------- 249 249 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 250 ALIGN JUMP_ALIGN250 ALIGN DISPLAY_JUMP_ALIGN 251 251 DisplayPrint_ClearAreaWithHeightInAHandWidthInAL: 252 252 push si … … 259 259 xor cx, cx 260 260 261 ALIGN JUMP_ALIGN261 ALIGN DISPLAY_JUMP_ALIGN 262 262 .ClearRowLoop: 263 263 mov cl, bl ; Area width now in CX … … 291 291 ; DX 292 292 ;-------------------------------------------------------------------- 293 ALIGN JUMP_ALIGN293 ALIGN DISPLAY_JUMP_ALIGN 294 294 DisplayPrint_RepeatCharacterFromALwithCountInCX: 295 295 jcxz .NothingToRepeat 296 296 push cx 297 297 298 ALIGN JUMP_ALIGN298 ALIGN DISPLAY_JUMP_ALIGN 299 299 .RepeatCharacter: 300 300 push ax … … 324 324 ;;; All strings in CSSI should go through the DisplayFormatCompressed code to be decoded. 325 325 ;;; 326 ALIGN JUMP_ALIGN326 ALIGN DISPLAY_JUMP_ALIGN 327 327 DisplayPrint_NullTerminatedStringFromCSSI: 328 328 push bx … … 350 350 ;-------------------------------------------------------------------- 351 351 %ifdef MODULE_STRINGS_COMPRESSED 352 ALIGN JUMP_ALIGN352 ALIGN DISPLAY_JUMP_ALIGN 353 353 DisplayPrint_Newline_FormatAdjustBP: 354 354 inc bp ; we didn't need a parameter after all, readjust BP … … 357 357 %endif 358 358 359 ALIGN JUMP_ALIGN359 ALIGN DISPLAY_JUMP_ALIGN 360 360 DisplayPrint_Newline: 361 361 mov al, LF … … 376 376 ; AX, DX 377 377 ;-------------------------------------------------------------------- 378 ALIGN JUMP_ALIGN378 ALIGN DISPLAY_JUMP_ALIGN 379 379 DisplayPrint_CharacterFromAL: 380 380 test al,al … … 396 396 ; AX, DX 397 397 ;-------------------------------------------------------------------- 398 ALIGN JUMP_ALIGN398 ALIGN DISPLAY_JUMP_ALIGN 399 399 DisplayPrint_NullTerminatedStringFromBXSI: 400 400 push si … … 402 402 403 403 xor cx, cx 404 ALIGN JUMP_ALIGN404 ALIGN DISPLAY_JUMP_ALIGN 405 405 .PrintNextCharacter: 406 406 mov ds, bx ; String segment to DS … … 412 412 jmp SHORT .PrintNextCharacter 413 413 414 ALIGN JUMP_ALIGN414 ALIGN DISPLAY_JUMP_ALIGN 415 415 .EndOfString: 416 416 pop cx -
trunk/Assembly_Library/Src/Keyboard/Keyboard.asm
r145 r369 21 21 ;-------------------------------------------------------------------- 22 22 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 23 ALIGN JUMP_ALIGN23 ALIGN KEYBOARD_JUMP_ALIGN 24 24 Keyboard_ReadUserInputtedWordWhilePrinting: 25 25 push ds … … 71 71 ;-------------------------------------------------------------------- 72 72 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 73 ALIGN JUMP_ALIGN73 ALIGN KEYBOARD_JUMP_ALIGN 74 74 Keyboard_ReadUserInputtedStringToESDIWhilePrinting: 75 75 push di … … 82 82 dec cx ; Decrement buffer size for NULL 83 83 cld 84 ALIGN JUMP_ALIGN84 ALIGN KEYBOARD_JUMP_ALIGN 85 85 .GetCharacterFromUser: 86 86 call Keyboard_GetKeystrokeToAXandWaitIfNecessary ; Get ASCII to AL … … 121 121 ; AX, BX, SI 122 122 ;-------------------------------------------------------------------- 123 ALIGN JUMP_ALIGN123 ALIGN KEYBOARD_JUMP_ALIGN 124 124 .PrepareDisplayContextForKeyboardInput: 125 125 pop bx ; Pop return address to BX … … 150 150 ; AH 151 151 ;-------------------------------------------------------------------- 152 ALIGN JUMP_ALIGN152 ALIGN KEYBOARD_JUMP_ALIGN 153 153 .ProcessControlCharacter: 154 154 cmp al, CR ; ENTER to terminate string? … … 193 193 ;-------------------------------------------------------------------- 194 194 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 195 ALIGN JUMP_ALIGN195 ALIGN KEYBOARD_JUMP_ALIGN 196 196 Keyboard_PrintBackspace: 197 197 mov al, BS … … 214 214 ;-------------------------------------------------------------------- 215 215 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 216 ALIGN JUMP_ALIGN216 ALIGN KEYBOARD_JUMP_ALIGN 217 217 Keyboard_PlayBellForUnwantedKeystroke: 218 218 mov al, BELL … … 230 230 ;-------------------------------------------------------------------- 231 231 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 232 ALIGN JUMP_ALIGN232 ALIGN KEYBOARD_JUMP_ALIGN 233 233 Keyboard_PrintInputtedCharacter: 234 234 push di … … 250 250 ;-------------------------------------------------------------------- 251 251 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS ; Only used when debugging 252 ALIGN JUMP_ALIGN252 ALIGN KEYBOARD_JUMP_ALIGN 253 253 Keyboard_RemoveAllKeystrokesFromBuffer: 254 254 call Keyboard_GetKeystrokeToAX … … 272 272 ; Nothing 273 273 ;-------------------------------------------------------------------- 274 ALIGN JUMP_ALIGN274 ALIGN KEYBOARD_JUMP_ALIGN 275 275 Keyboard_GetKeystrokeToAXandLeaveItToBuffer: 276 276 mov ah, CHECK_FOR_KEYSTROKE 277 277 int BIOS_KEYBOARD_INTERRUPT_16h 278 278 ret 279 ALIGN JUMP_ALIGN279 ALIGN KEYBOARD_JUMP_ALIGN 280 280 Keyboard_GetKeystrokeToAX: 281 281 call Keyboard_GetKeystrokeToAXandLeaveItToBuffer 282 282 jz SHORT Keyboard_GetKeystrokeToAXReturn 283 283 ; Fall to Keyboard_GetKeystrokeToAXandWaitIfNecessary 284 ALIGN JUMP_ALIGN284 ALIGN KEYBOARD_JUMP_ALIGN 285 285 Keyboard_GetKeystrokeToAXandWaitIfNecessary: 286 286 xor ah, ah ; GET_KEYSTROKE -
trunk/Assembly_Library/Src/Menu/CharOutLineSplitter.asm
r181 r369 14 14 ; AX, DX, DI 15 15 ;-------------------------------------------------------------------- 16 ALIGN JUMP_ALIGN16 ALIGN MENU_JUMP_ALIGN 17 17 CharOutLineSplitter_PrepareForPrintingTextLines: 18 18 ; Get first text line column offset to DX … … 41 41 ; Nothing 42 42 ;-------------------------------------------------------------------- 43 ALIGN JUMP_ALIGN43 ALIGN MENU_JUMP_ALIGN 44 44 CharOutLineSplitter_GetFirstBorderLineColumnOffsetToAX: 45 45 call MenuLocation_GetTitleBordersTopLeftCoordinatesToAX … … 60 60 ; DX 61 61 ;-------------------------------------------------------------------- 62 ALIGN JUMP_ALIGN62 ALIGN MENU_JUMP_ALIGN 63 63 CharOutLineSplitter_IsCursorAtTheEndOfTextLine: 64 64 push ax … … 86 86 ; AX, DX 87 87 ;-------------------------------------------------------------------- 88 ALIGN JUMP_ALIGN88 ALIGN MENU_JUMP_ALIGN 89 89 CharOutLineSplitter_MovePartialWordToNewTextLine: 90 90 push si … … 106 106 mov cx, di 107 107 mov si, di 108 ALIGN JUMP_ALIGN108 ALIGN MENU_JUMP_ALIGN 109 109 .ScanNextCharacter: ; Space will always be found since one comes after border 110 110 dec si -
trunk/Assembly_Library/Src/Menu/Menu.asm
r181 r369 17 17 ; AX (unless used as a return register), DI 18 18 ;-------------------------------------------------------------------- 19 ALIGN JUMP_ALIGN19 ALIGN MENU_JUMP_ALIGN 20 20 Menu_FunctionFromDI: 21 21 push si -
trunk/Assembly_Library/Src/Menu/MenuAttributes.asm
r223 r369 28 28 ; AX, SI, DI 29 29 ;-------------------------------------------------------------------- 30 ALIGN JUMP_ALIGN30 ALIGN MENU_JUMP_ALIGN 31 31 MenuAttribute_SetToDisplayContextFromTypeInSI: 32 32 call MenuAttribute_GetToAXfromTypeInSI … … 44 44 ; SI 45 45 ;-------------------------------------------------------------------- 46 ALIGN JUMP_ALIGN46 ALIGN MENU_JUMP_ALIGN 47 47 MenuAttribute_GetToAXfromTypeInSI: 48 48 push ds … … 59 59 jmp SHORT .LoadAttributeAndReturn 60 60 61 ALIGN JUMP_ALIGN61 ALIGN MENU_JUMP_ALIGN 62 62 .LoadMonoAttribute: 63 63 add si, .rgcMonochromeAttributes 64 64 jmp SHORT .LoadAttributeAndReturn 65 65 66 ALIGN JUMP_ALIGN66 ALIGN MENU_JUMP_ALIGN 67 67 .LoadColorAttribute: 68 68 add si, .rgcColorAttributes -
trunk/Assembly_Library/Src/Menu/MenuBorders.asm
r293 r369 22 22 ; AX, BX, CX, DX, SI, DI 23 23 ;-------------------------------------------------------------------- 24 ALIGN JUMP_ALIGN24 ALIGN MENU_JUMP_ALIGN 25 25 MenuBorders_RefreshAll: 26 26 %ifndef USE_186 … … 52 52 ; AX, BX, DX, SI, DI 53 53 ;-------------------------------------------------------------------- 54 ALIGN JUMP_ALIGN54 ALIGN MENU_JUMP_ALIGN 55 55 MenuBorders_RedrawBottomBorderLine: 56 56 call MenuBorders_AdjustDisplayContextForDrawingBorders … … 71 71 ;-------------------------------------------------------------------- 72 72 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 73 ALIGN JUMP_ALIGN73 ALIGN MENU_JUMP_ALIGN 74 74 MenuBorders_RefreshItemBorders: 75 75 call MenuBorders_AdjustDisplayContextForDrawingBorders … … 91 91 ; AX, BX, SI, DI 92 92 ;-------------------------------------------------------------------- 93 ALIGN JUMP_ALIGN93 ALIGN MENU_JUMP_ALIGN 94 94 MenuBorders_AdjustDisplayContextForDrawingBorders: 95 95 mov bl, ATTRIBUTES_ARE_USED … … 116 116 ; Nothing 117 117 ;-------------------------------------------------------------------- 118 ALIGN JUMP_ALIGN118 ALIGN MENU_JUMP_ALIGN 119 119 MenuBorders_GetNumberOfMiddleCharactersToDX: 120 120 eMOVZX dx, [bp+MENUINIT.bWidth] … … 133 133 ; AX, BX, CX, SI, DI 134 134 ;-------------------------------------------------------------------- 135 ALIGN JUMP_ALIGN135 ALIGN MENU_JUMP_ALIGN 136 136 RefreshTitleBorders: 137 137 call DrawTopBorderLine … … 149 149 ; AX, BX, CX, SI, DI 150 150 ;-------------------------------------------------------------------- 151 ALIGN JUMP_ALIGN151 ALIGN MENU_JUMP_ALIGN 152 152 RefreshInformationBorders: 153 153 call DrawSeparationBorderLine … … 165 165 ; AX, BX, CX, SI, DI 166 166 ;-------------------------------------------------------------------- 167 ALIGN JUMP_ALIGN167 ALIGN MENU_JUMP_ALIGN 168 168 RefreshItemBorders: 169 169 call DrawSeparationBorderLine … … 184 184 DrawTextBorderLinesByCXtimes: 185 185 jcxz .NoBorderLinesToDraw 186 ALIGN JUMP_ALIGN186 ALIGN MENU_JUMP_ALIGN 187 187 .DrawBordersWithFunctionInBX: 188 188 call DrawTextBorderLine … … 207 207 ; AX, SI, DI 208 208 ;-------------------------------------------------------------------- 209 ALIGN JUMP_ALIGN209 ALIGN MENU_JUMP_ALIGN 210 210 DrawTopBorderLine: 211 211 mov si, g_rgbTopBorderCharacters … … 213 213 jmp SHORT PrintNewlineToEndBorderLine 214 214 215 ALIGN JUMP_ALIGN215 ALIGN MENU_JUMP_ALIGN 216 216 DrawSeparationBorderLine: 217 217 mov si, g_rgbSeparationBorderCharacters 218 218 jmp SHORT PrintBorderCharactersFromCSSIandShadowCharacter 219 219 220 ALIGN JUMP_ALIGN220 ALIGN MENU_JUMP_ALIGN 221 221 DrawBottomBorderLine: 222 222 mov si, g_rgbBottomBorderCharacters … … 231 231 ret 232 232 233 ALIGN JUMP_ALIGN233 ALIGN MENU_JUMP_ALIGN 234 234 DrawBottomShadowLine: 235 235 CALL_DISPLAY_LIBRARY GetSoftwareCoordinatesToAX … … 243 243 ret 244 244 245 ALIGN JUMP_ALIGN245 ALIGN MENU_JUMP_ALIGN 246 246 DrawTextBorderLine: 247 247 mov si, g_rgbTextBorderCharacters … … 259 259 ; AX, SI, DI 260 260 ;-------------------------------------------------------------------- 261 ALIGN JUMP_ALIGN261 ALIGN MENU_JUMP_ALIGN 262 262 PrintBorderCharactersFromCSSIandShadowCharacter: 263 263 call PrintBorderCharactersFromCSSI … … 277 277 ; AX, DI 278 278 ;-------------------------------------------------------------------- 279 ALIGN JUMP_ALIGN279 ALIGN MENU_JUMP_ALIGN 280 280 PrintNewlineToEndBorderLine: 281 281 CALL_DISPLAY_LIBRARY PrintNewlineCharacters … … 293 293 ; AX, SI, DI 294 294 ;-------------------------------------------------------------------- 295 ALIGN JUMP_ALIGN295 ALIGN MENU_JUMP_ALIGN 296 296 PrintShadowCharactersByDXtimes: 297 297 CALL_DISPLAY_LIBRARY PushDisplayContext … … 323 323 ; AX, SI, DI 324 324 ;-------------------------------------------------------------------- 325 ALIGN JUMP_ALIGN325 ALIGN MENU_JUMP_ALIGN 326 326 PrintBorderCharactersFromCSSI: 327 327 cs lodsb ; Load from [cs:si+BORDER_CHARS.cLeft] to AL … … 346 346 ; AX, DI 347 347 ;-------------------------------------------------------------------- 348 ALIGN JUMP_ALIGN348 ALIGN MENU_JUMP_ALIGN 349 349 MenuBorders_PrintSingleBorderCharacterFromAL: 350 350 CALL_DISPLAY_LIBRARY PrintCharacterFromAL 351 351 ret 352 352 353 ALIGN JUMP_ALIGN353 ALIGN MENU_JUMP_ALIGN 354 354 MenuBorders_PrintMultipleBorderCharactersFromAL: 355 355 push cx … … 369 369 ; AX, SI, DI 370 370 ;-------------------------------------------------------------------- 371 ALIGN JUMP_ALIGN371 ALIGN MENU_JUMP_ALIGN 372 372 DrawTimeoutCounterString: 373 373 call MenuTime_GetTimeoutSecondsLeftToAX -
trunk/Assembly_Library/Src/Menu/MenuCharOut.asm
r293 r369 21 21 ; AX, DX 22 22 ;-------------------------------------------------------------------- 23 ALIGN JUMP_ALIGN23 ALIGN MENU_JUMP_ALIGN 24 24 MenuCharOut_MenuTeletypeOutputWithAutomaticLineChange: 25 25 call CharOutLineSplitter_IsCursorAtTheEndOfTextLine … … 30 30 ; Fall to MenuCharOut_MenuTextTeletypeOutputWithAttribute 31 31 32 ALIGN JUMP_ALIGN32 ALIGN MENU_JUMP_ALIGN 33 33 MenuCharOut_MenuTeletypeOutput: 34 34 cmp al, CR … … 51 51 ; AX, DX 52 52 ;-------------------------------------------------------------------- 53 ALIGN JUMP_ALIGN53 ALIGN MENU_JUMP_ALIGN 54 54 MenuCharOut_PrintLFCRandAdjustOffsetForStartOfLine: 55 55 mov al, LF … … 57 57 ; Fall to PrintCRandAdjustOffsetForStartOfLine 58 58 59 ALIGN JUMP_ALIGN59 ALIGN MENU_JUMP_ALIGN 60 60 PrintCRandAdjustOffsetForStartOfLine: 61 61 mov al, CR -
trunk/Assembly_Library/Src/Menu/MenuEvent.asm
r189 r369 16 16 ; AX, BX, DX 17 17 ;-------------------------------------------------------------------- 18 ALIGN JUMP_ALIGN18 ALIGN MENU_JUMP_ALIGN 19 19 MenuEvent_InitializeMenuinit: 20 20 push ss … … 35 35 ; AX, BX, DX 36 36 ;-------------------------------------------------------------------- 37 ALIGN JUMP_ALIGN37 ALIGN MENU_JUMP_ALIGN 38 38 MenuEvent_ExitMenu: 39 39 mov bl, MENUEVENT_ExitMenu … … 52 52 ; AX, BX, DX 53 53 ;-------------------------------------------------------------------- 54 ALIGN JUMP_ALIGN54 ALIGN MENU_JUMP_ALIGN 55 55 MenuEvent_IdleProcessing: 56 56 mov bl, MENUEVENT_IdleProcessing … … 70 70 ; AX, CX, BX, DX 71 71 ;-------------------------------------------------------------------- 72 ALIGN JUMP_ALIGN72 ALIGN MENU_JUMP_ALIGN 73 73 MenuEvent_RefreshTitle: 74 74 mov bl, MENUEVENT_RefreshTitle … … 93 93 ; AX, BX, DX 94 94 ;-------------------------------------------------------------------- 95 ALIGN JUMP_ALIGN95 ALIGN MENU_JUMP_ALIGN 96 96 MenuEvent_RefreshItemFromCX: 97 97 mov bl, MENUEVENT_RefreshItemFromCX … … 109 109 ; AX, BX, DX, SI, DI 110 110 ;-------------------------------------------------------------------- 111 ALIGN JUMP_ALIGN111 ALIGN MENU_JUMP_ALIGN 112 112 MenuEvent_HighlightItemFromCX: 113 113 mov dx, cx … … 136 136 ; AX, BX, DX 137 137 ;-------------------------------------------------------------------- 138 ALIGN JUMP_ALIGN138 ALIGN MENU_JUMP_ALIGN 139 139 MenuEvent_KeyStrokeInAX: 140 140 mov bl, MENUEVENT_KeyStrokeInAX … … 171 171 ; BX 172 172 ;-------------------------------------------------------------------- 173 ALIGN JUMP_ALIGN173 ALIGN MENU_JUMP_ALIGN 174 174 MenuEvent_SendFromBX: 175 175 push es -
trunk/Assembly_Library/Src/Menu/MenuInit.asm
r289 r369 15 15 ; All except segments 16 16 ;-------------------------------------------------------------------- 17 ALIGN JUMP_ALIGN17 ALIGN MENU_JUMP_ALIGN 18 18 MenuInit_DisplayMenuWithHandlerInBXandUserDataInDXAX: 19 19 push es … … 49 49 ; All, except SS:BP 50 50 ;-------------------------------------------------------------------- 51 ALIGN JUMP_ALIGN51 ALIGN MENU_JUMP_ALIGN 52 52 MenuInit_EnterMenuWithHandlerInBXandUserDataInDXAX: 53 53 mov [bp+MENU.fnEventHandler], bx … … 76 76 ; AX, BX, CX, DX, SI, DI 77 77 ;-------------------------------------------------------------------- 78 ALIGN JUMP_ALIGN78 ALIGN MENU_JUMP_ALIGN 79 79 MenuInit_RefreshMenuWindow: 80 80 call MenuBorders_RefreshAll ; Draw borders … … 94 94 ;-------------------------------------------------------------------- 95 95 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 96 ALIGN JUMP_ALIGN96 ALIGN MENU_JUMP_ALIGN 97 97 MenuInit_CloseMenuIfExitEventAllows: 98 98 call MenuEvent_ExitMenu … … 111 111 ; Nothing 112 112 ;-------------------------------------------------------------------- 113 ALIGN JUMP_ALIGN113 ALIGN MENU_JUMP_ALIGN 114 114 MenuInit_CloseMenuWindow: 115 115 or BYTE [bp+MENU.bFlags], FLG_MENU_EXIT … … 127 127 ; AX, BX, CX, DX, SI, DI 128 128 ;-------------------------------------------------------------------- 129 ALIGN JUMP_ALIGN129 ALIGN MENU_JUMP_ALIGN 130 130 MenuInit_HighlightItemFromAX: 131 131 sub ax, [bp+MENUINIT.wHighlightedItem] … … 142 142 ;-------------------------------------------------------------------- 143 143 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 144 ALIGN JUMP_ALIGN144 ALIGN MENU_JUMP_ALIGN 145 145 MenuInit_GetHighlightedItemToAX: 146 146 mov ax, [bp+MENUINIT.wHighlightedItem] … … 162 162 ;-------------------------------------------------------------------- 163 163 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 164 ALIGN JUMP_ALIGN164 ALIGN MENU_JUMP_ALIGN 165 165 MenuInit_SetTitleHeightFromAL: 166 166 mov [bp+MENUINIT.bTitleLines], al 167 167 ret 168 168 169 ALIGN JUMP_ALIGN169 ALIGN MENU_JUMP_ALIGN 170 170 MenuInit_SetInformationHeightFromAL: 171 171 mov [bp+MENUINIT.bInfoLines], al 172 172 ret 173 173 174 ALIGN JUMP_ALIGN174 ALIGN MENU_JUMP_ALIGN 175 175 MenuInit_SetTotalItemsFromAX: 176 176 mov [bp+MENUINIT.wItems], ax … … 191 191 ;-------------------------------------------------------------------- 192 192 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 193 ALIGN JUMP_ALIGN193 ALIGN MENU_JUMP_ALIGN 194 194 MenuInit_SetUserDataFromDSSI: 195 195 mov [bp+MENU.dwUserData], si … … 197 197 ret 198 198 199 ALIGN JUMP_ALIGN199 ALIGN MENU_JUMP_ALIGN 200 200 MenuInit_GetUserDataToDSSI: 201 201 lds si, [bp+MENU.dwUserData] -
trunk/Assembly_Library/Src/Menu/MenuLocation.asm
r293 r369 16 16 ; Nothing 17 17 ;-------------------------------------------------------------------- 18 ALIGN JUMP_ALIGN18 ALIGN MENU_JUMP_ALIGN 19 19 MenuLocation_GetTextCoordinatesToAXforItemInAX: 20 20 sub ax, [bp+MENU.wFirstVisibleItem] ; Item to line … … 42 42 jmp SHORT AddItemBordersTopLeftCoordinatesToAX 43 43 44 ALIGN JUMP_ALIGN44 ALIGN MENU_JUMP_ALIGN 45 45 MenuLocation_GetTitleTextTopLeftCoordinatesToAX: 46 46 mov ax, (MENU_TEXT_ROW_OFFSET<<8) | MENU_TEXT_COLUMN_OFFSET … … 50 50 jmp SHORT MenuLocation_AddTitleBordersTopLeftCoordinatesToAX 51 51 52 ALIGN JUMP_ALIGN52 ALIGN MENU_JUMP_ALIGN 53 53 MenuLocation_GetInformationTextTopLeftCoordinatesToAX: 54 54 mov ax, (MENU_TEXT_ROW_OFFSET<<8) | MENU_TEXT_COLUMN_OFFSET 55 55 jmp SHORT AddInformationBordersTopLeftCoordinatesToAX 56 56 57 ALIGN JUMP_ALIGN57 ALIGN MENU_JUMP_ALIGN 58 58 MenuLocation_GetBottomBordersTopLeftCoordinatesToAX: 59 59 xor ax, ax … … 77 77 stc ; Compensate for Information top border 78 78 adc ah, [bp+MENUINIT.bInfoLines] 79 ALIGN JUMP_ALIGN79 ALIGN MENU_JUMP_ALIGN 80 80 AddInformationBordersTopLeftCoordinatesToAX: 81 81 push cx … … 84 84 add ah, cl 85 85 pop cx 86 ALIGN JUMP_ALIGN86 ALIGN MENU_JUMP_ALIGN 87 87 AddItemBordersTopLeftCoordinatesToAX: 88 88 stc ; Compensate for Title top border 89 89 adc ah, [bp+MENUINIT.bTitleLines] 90 ALIGN JUMP_ALIGN90 ALIGN MENU_JUMP_ALIGN 91 91 MenuLocation_AddTitleBordersTopLeftCoordinatesToAX: 92 92 push di … … 112 112 ; Nothing 113 113 ;-------------------------------------------------------------------- 114 ALIGN JUMP_ALIGN114 ALIGN MENU_JUMP_ALIGN 115 115 MenuLocation_GetMaxTextLineLengthToAX: 116 116 eMOVZX ax, [bp+MENUINIT.bWidth] -
trunk/Assembly_Library/Src/Menu/MenuLoop.asm
r189 r369 14 14 ; AX, BX, CX, DX, SI, DI 15 15 ;-------------------------------------------------------------------- 16 ALIGN JUMP_ALIGN16 ALIGN MENU_JUMP_ALIGN 17 17 MenuLoop_Enter: 18 18 call KeystrokeProcessing … … 36 36 ; All, except SS:BP 37 37 ;-------------------------------------------------------------------- 38 ALIGN JUMP_ALIGN38 ALIGN MENU_JUMP_ALIGN 39 39 KeystrokeProcessing: 40 40 call Keyboard_GetKeystrokeToAX … … 43 43 ret 44 44 45 ALIGN JUMP_ALIGN45 ALIGN MENU_JUMP_ALIGN 46 46 TimeoutProcessing: 47 47 call MenuTime_UpdateSelectionTimeout … … 62 62 ; AX, BX, CX, DX, SI, DI 63 63 ;-------------------------------------------------------------------- 64 ALIGN JUMP_ALIGN64 ALIGN MENU_JUMP_ALIGN 65 65 ProcessKeystrokeFromAX: 66 66 xchg cx, ax … … 85 85 ; BX, CX, DX, SI, DI 86 86 ;-------------------------------------------------------------------- 87 ALIGN JUMP_ALIGN87 ALIGN MENU_JUMP_ALIGN 88 88 .ProcessMenuSystemKeystrokeFromAX: 89 89 cmp al, ESC … … 96 96 ret ; Return with CF cleared since keystroke not processed 97 97 98 ALIGN JUMP_ALIGN98 ALIGN MENU_JUMP_ALIGN 99 99 .LeaveMenuWithoutSelectingItem: 100 100 call MenuEvent_ExitMenu … … 106 106 ret 107 107 108 ALIGN JUMP_ALIGN108 ALIGN MENU_JUMP_ALIGN 109 109 .SelectItem: 110 110 mov cx, [bp+MENUINIT.wHighlightedItem] … … 128 128 ; BX, CX, DX, SI, DI 129 129 ;-------------------------------------------------------------------- 130 ALIGN JUMP_ALIGN130 ALIGN MENU_JUMP_ALIGN 131 131 MenuLoop_ProcessScrollingKeysFromAX: 132 132 xchg ah, al … … 148 148 ret 149 149 150 ALIGN JUMP_ALIGN150 ALIGN MENU_JUMP_ALIGN 151 151 .ChangeToPreviousPage: 152 152 call MenuScrollbars_GetMaxVisibleItemsOnPageToCX … … 157 157 jge SHORT .MoveHighlightedItemByAX ; No rotation for PgUp 158 158 ; Fall to .SelectFirstItem 159 ALIGN JUMP_ALIGN159 ALIGN MENU_JUMP_ALIGN 160 160 .SelectFirstItem: 161 161 mov ax, [bp+MENUINIT.wHighlightedItem] … … 163 163 jmp SHORT .MoveHighlightedItemByAX 164 164 165 ALIGN JUMP_ALIGN165 ALIGN MENU_JUMP_ALIGN 166 166 .ChangeToNextPage: 167 167 call MenuScrollbars_GetMaxVisibleItemsOnPageToCX … … 172 172 jb SHORT .MoveHighlightedItemByAX ; No rotation for PgDn 173 173 ; Fall to .SelectLastItem 174 ALIGN JUMP_ALIGN174 ALIGN MENU_JUMP_ALIGN 175 175 .SelectLastItem: 176 176 stc … … 179 179 jmp SHORT .MoveHighlightedItemByAX 180 180 181 ALIGN JUMP_ALIGN181 ALIGN MENU_JUMP_ALIGN 182 182 .DecrementSelectedItem: 183 183 mov ax, -1 … … 185 185 .IncrementSelectedItem: 186 186 mov al, 1 ; AH is already 0 187 ALIGN JUMP_ALIGN187 ALIGN MENU_JUMP_ALIGN 188 188 .MoveHighlightedItemByAX: 189 189 call MenuScrollbars_MoveHighlightedItemByAX -
trunk/Assembly_Library/Src/Menu/MenuScrollbars.asm
r293 r369 15 15 ; AX 16 16 ;-------------------------------------------------------------------- 17 ALIGN JUMP_ALIGN17 ALIGN MENU_JUMP_ALIGN 18 18 MenuScrollbars_AreScrollbarsNeeded: 19 19 xchg ax, cx … … 34 34 ; AH, CX, DX 35 35 ;-------------------------------------------------------------------- 36 ALIGN JUMP_ALIGN36 ALIGN MENU_JUMP_ALIGN 37 37 MenuScrollbars_GetScrollCharacterToALForLineInDI: 38 38 call MenuScrollbars_GetMaxVisibleItemsOnPageToCX … … 45 45 call .GetLastThumbLineToAX 46 46 cmp ax, di ; After last thumb line? 47 ALIGN JUMP_ALIGN47 ALIGN MENU_JUMP_ALIGN 48 48 .ReturnTrackCharacter: 49 49 mov al, SCROLL_TRACK_CHARACTER 50 50 jb SHORT .Return 51 51 mov al, SCROLL_THUMB_CHARACTER 52 ALIGN JUMP_ALIGN, ret52 ALIGN MENU_JUMP_ALIGN, ret 53 53 .Return: 54 54 ret … … 64 64 ; CX, DX 65 65 ;-------------------------------------------------------------------- 66 ALIGN JUMP_ALIGN66 ALIGN MENU_JUMP_ALIGN 67 67 .GetLastThumbLineToAX: 68 68 call MenuScrollbars_GetLastVisibleItemOnPageToAX … … 80 80 ; CX, DX 81 81 ;-------------------------------------------------------------------- 82 ALIGN JUMP_ALIGN82 ALIGN MENU_JUMP_ALIGN 83 83 .CalculateFirstOrLastThumbLineToAX: 84 84 mul cx … … 97 97 ; AX, BX, CX, DX, SI, DI 98 98 ;-------------------------------------------------------------------- 99 ALIGN JUMP_ALIGN99 ALIGN MENU_JUMP_ALIGN 100 100 MenuScrollbars_MoveHighlightedItemByAX: 101 101 mov cx, [bp+MENUINIT.wHighlightedItem] … … 120 120 jae SHORT .ScrollPageForNewItemInCX 121 121 122 ALIGN JUMP_ALIGN122 ALIGN MENU_JUMP_ALIGN 123 123 .RotateNegativeItemInCX: 124 124 add cx, dx … … 135 135 ; AX, BX, CX, DX, SI, DI 136 136 ;-------------------------------------------------------------------- 137 ALIGN JUMP_ALIGN137 ALIGN MENU_JUMP_ALIGN 138 138 .ScrollPageForNewItemInCX: 139 139 call MenuScrollbars_IsItemInCXonVisiblePage … … 154 154 cwd ; This won't work if MaxFirstVisibleItem > 32767 155 155 156 ALIGN JUMP_ALIGN156 ALIGN MENU_JUMP_ALIGN 157 157 .DXisPositive: 158 158 cmp ax, dx … … 160 160 xchg dx, ax 161 161 162 ALIGN JUMP_ALIGN162 ALIGN MENU_JUMP_ALIGN 163 163 .AXisLessThanDX: 164 164 mov [bp+MENU.wFirstVisibleItem], ax 165 165 call MenuText_RefreshAllItems 166 166 167 ALIGN JUMP_ALIGN167 ALIGN MENU_JUMP_ALIGN 168 168 .HighlightNewItemOnCX: 169 169 jmp MenuEvent_HighlightItemFromCX … … 181 181 ; AX 182 182 ;-------------------------------------------------------------------- 183 ALIGN JUMP_ALIGN183 ALIGN MENU_JUMP_ALIGN 184 184 MenuScrollbars_IsItemInCXonVisiblePage: 185 185 cmp [bp+MENU.wFirstVisibleItem], cx … … 190 190 ja SHORT .ItemIsNotVisible 191 191 stc ; Item is visible 192 ALIGN JUMP_ALIGN, ret192 ALIGN MENU_JUMP_ALIGN, ret 193 193 .ItemIsNotVisible: 194 194 ret … … 204 204 ; Nothing 205 205 ;-------------------------------------------------------------------- 206 ALIGN JUMP_ALIGN206 ALIGN MENU_JUMP_ALIGN 207 207 MenuScrollbars_GetLastVisibleItemOnPageToAX: 208 208 xchg cx, ax … … 223 223 ; Nothing 224 224 ;-------------------------------------------------------------------- 225 ALIGN JUMP_ALIGN225 ALIGN MENU_JUMP_ALIGN 226 226 MenuScrollbars_GetActualVisibleItemsOnPageToCX: 227 227 call MenuScrollbars_GetMaxVisibleItemsOnPageToCX … … 229 229 jb SHORT .Return 230 230 mov cx, [bp+MENUINIT.wItems] 231 ALIGN JUMP_ALIGN, ret231 ALIGN MENU_JUMP_ALIGN, ret 232 232 .Return: 233 233 ret … … 243 243 ; Nothing 244 244 ;-------------------------------------------------------------------- 245 ALIGN JUMP_ALIGN245 ALIGN MENU_JUMP_ALIGN 246 246 MenuScrollbars_GetMaxVisibleItemsOnPageToCX: 247 247 eMOVZX cx, [bp+MENUINIT.bHeight] -
trunk/Assembly_Library/Src/Menu/MenuText.asm
r194 r369 16 16 ;-------------------------------------------------------------------- 17 17 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 18 ALIGN JUMP_ALIGN18 ALIGN MENU_JUMP_ALIGN 19 19 MenuText_ClearTitleArea: 20 20 CALL_DISPLAY_LIBRARY PushDisplayContext ; Save cursor coordinates … … 24 24 %endif 25 25 26 ALIGN JUMP_ALIGN26 ALIGN MENU_JUMP_ALIGN 27 27 MenuText_ClearInformationArea: 28 28 CALL_DISPLAY_LIBRARY PushDisplayContext ; Save cursor coordinates … … 50 50 ; AX, BX, CX, DX, SI, DI 51 51 ;-------------------------------------------------------------------- 52 ALIGN JUMP_ALIGN52 ALIGN MENU_JUMP_ALIGN 53 53 MenuText_RefreshTitle: 54 54 cmp BYTE [bp+MENUINIT.bTitleLines], 0 … … 57 57 jmp MenuEvent_RefreshTitle 58 58 59 ALIGN JUMP_ALIGN59 ALIGN MENU_JUMP_ALIGN 60 60 MenuText_RefreshInformation: 61 61 cmp BYTE [bp+MENUINIT.bInfoLines], 0 … … 74 74 ; AX, BX, DX, SI, DI 75 75 ;-------------------------------------------------------------------- 76 ALIGN JUMP_ALIGN76 ALIGN MENU_JUMP_ALIGN 77 77 PrepareToDrawTitleArea: 78 78 mov si, ATTRIBUTE_CHARS.cTitle … … 80 80 jmp SHORT FinishPreparationsToDrawTitleOrInformationArea 81 81 82 ALIGN JUMP_ALIGN82 ALIGN MENU_JUMP_ALIGN 83 83 MenuText_PrepareToDrawInformationArea: 84 84 mov si, ATTRIBUTE_CHARS.cInformation … … 98 98 ; AX, BX, DX, SI, DI 99 99 ;-------------------------------------------------------------------- 100 ALIGN JUMP_ALIGN100 ALIGN MENU_JUMP_ALIGN 101 101 MenuText_RefreshAllItems: 102 102 push cx … … 104 104 call MenuScrollbars_GetActualVisibleItemsOnPageToCX 105 105 mov ax, [bp+MENU.wFirstVisibleItem] 106 ALIGN JUMP_ALIGN106 ALIGN MENU_JUMP_ALIGN 107 107 .ItemRefreshLoop: 108 108 call MenuText_RefreshItemFromAX … … 124 124 ; BX, DX, SI, DI 125 125 ;-------------------------------------------------------------------- 126 ALIGN JUMP_ALIGN126 ALIGN MENU_JUMP_ALIGN 127 127 MenuText_RefreshItemFromAX: 128 128 push cx … … 151 151 ; AX, BX, DX, SI, DI 152 152 ;-------------------------------------------------------------------- 153 ALIGN JUMP_ALIGN153 ALIGN MENU_JUMP_ALIGN 154 154 MenuText_AdjustDisplayContextForDrawingItemFromCX: 155 155 mov ax, cx … … 171 171 ; AX, BX, DX, SI, DI 172 172 ;-------------------------------------------------------------------- 173 ALIGN JUMP_ALIGN173 ALIGN MENU_JUMP_ALIGN 174 174 AdjustDisplayContextForDrawingTextsAtCoordsInAXwithAttrTypeInSIandCharOutFunctionInDX: 175 175 CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX … … 192 192 ; AX, BX, DX, DI 193 193 ;-------------------------------------------------------------------- 194 ALIGN JUMP_ALIGN194 ALIGN MENU_JUMP_ALIGN 195 195 ClearPreviousItem: 196 196 CALL_DISPLAY_LIBRARY GetSoftwareCoordinatesToAX … … 217 217 ; Nothing 218 218 ;-------------------------------------------------------------------- 219 ALIGN JUMP_ALIGN219 ALIGN MENU_JUMP_ALIGN 220 220 GetItemTextAttributeTypeToSIforItemInCX: 221 221 mov si, ATTRIBUTE_CHARS.cItem … … 226 226 jne SHORT .ReturnAttributeTypeInSI 227 227 sub si, BYTE ATTRIBUTE_CHARS.cItem - ATTRIBUTE_CHARS.cHighlightedItem 228 ALIGN JUMP_ALIGN, ret228 ALIGN MENU_JUMP_ALIGN, ret 229 229 .ReturnAttributeTypeInSI: 230 230 ret … … 241 241 ; AX, CX, BX, DX, SI, DI 242 242 ;-------------------------------------------------------------------- 243 ALIGN JUMP_ALIGN243 ALIGN MENU_JUMP_ALIGN 244 244 DrawScrollbarCharacterForItemInCXifNecessary: 245 245 call MenuScrollbars_AreScrollbarsNeeded … … 247 247 ret 248 248 249 ALIGN JUMP_ALIGN249 ALIGN MENU_JUMP_ALIGN 250 250 .DrawScrollbarCharacter: 251 251 call MenuBorders_AdjustDisplayContextForDrawingBorders -
trunk/Assembly_Library/Src/Menu/MenuTime.asm
r133 r369 15 15 ; AX, BX 16 16 ;-------------------------------------------------------------------- 17 ALIGN JUMP_ALIGN17 ALIGN MENU_JUMP_ALIGN 18 18 MenuTime_StartSelectionTimeoutWithTicksInAX: 19 19 push ds … … 34 34 ; AX, BX, DX, SI, DI 35 35 ;-------------------------------------------------------------------- 36 ALIGN JUMP_ALIGN36 ALIGN MENU_JUMP_ALIGN 37 37 MenuTime_StopSelectionTimeout: 38 38 test BYTE [bp+MENU.bFlags], FLG_MENU_TIMEOUT_COUNTDOWN … … 52 52 ; AX, BX, SI, DI 53 53 ;-------------------------------------------------------------------- 54 ALIGN JUMP_ALIGN54 ALIGN MENU_JUMP_ALIGN 55 55 MenuTime_UpdateSelectionTimeout: 56 56 test BYTE [bp+MENU.bFlags], FLG_MENU_TIMEOUT_COUNTDOWN … … 66 66 ret 67 67 68 ALIGN JUMP_ALIGN68 ALIGN MENU_JUMP_ALIGN 69 69 .RedrawSinceNoTimeout: 70 70 call MenuBorders_RedrawBottomBorderLine … … 84 84 ; AX 85 85 ;-------------------------------------------------------------------- 86 ALIGN JUMP_ALIGN86 ALIGN MENU_JUMP_ALIGN 87 87 MenuTime_GetTimeoutSecondsLeftToAX: 88 88 push ds … … 117 117 ; Nothing 118 118 ;-------------------------------------------------------------------- 119 ALIGN JUMP_ALIGN119 ALIGN MENU_JUMP_ALIGN 120 120 PointDSBXtoTimeoutCounter: 121 121 push ss -
trunk/Assembly_Library/Src/Serial/SerialServerScan.asm
r277 r369 25 25 ; AL, BX, CX, DX, DI 26 26 ;-------------------------------------------------------------------- 27 ALIGN JUMP_ALIGN28 27 SerialServerScan_ScanForServer: 29 28 mov cx, 1 ; one sector, not scanning (default) … … 117 116 ; AL, BX 118 117 ;-------------------------------------------------------------------- 119 ALIGN JUMP_ALIGN120 118 SerialServerScan_CheckForServer_PortAndBaudInDX: 121 119 push bp ; setup fake SerialServer_Command -
trunk/Assembly_Library/Src/String/Char.asm
r201 r369 35 35 ; Nothing 36 36 ;-------------------------------------------------------------------- 37 ALIGN JUMP_ALIGN37 ALIGN STRING_JUMP_ALIGN 38 38 Char_IsLowerCaseLetterInAL: 39 39 IS_BETWEEN_IMMEDIATES al, 'a', 'z' … … 51 51 ;-------------------------------------------------------------------- 52 52 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 53 ALIGN JUMP_ALIGN53 ALIGN STRING_JUMP_ALIGN 54 54 Char_IsUpperCaseLetterInAL: 55 55 IS_BETWEEN_IMMEDIATES al, 'A', 'Z' … … 69 69 ;-------------------------------------------------------------------- 70 70 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 71 ALIGN JUMP_ALIGN71 ALIGN STRING_JUMP_ALIGN 72 72 Char_IsHexadecimalDigitInAL: 73 73 call Char_IsDecimalDigitInAL … … 89 89 ;-------------------------------------------------------------------- 90 90 %ifndef MODULE_STRINGS_COMPRESSED 91 ALIGN JUMP_ALIGN91 ALIGN STRING_JUMP_ALIGN 92 92 Char_IsDecimalDigitInAL: 93 93 IS_BETWEEN_IMMEDIATES al, '0', '9' … … 108 108 ;-------------------------------------------------------------------- 109 109 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 110 ALIGN JUMP_ALIGN110 ALIGN STRING_JUMP_ALIGN 111 111 Char_ConvertIntegerToALfromDigitInALwithBaseInBX: 112 112 push dx … … 119 119 jbe SHORT .ConvertToDecimalDigit 120 120 sub al, 'a'-'0'-10 ; Convert to hexadecimal integer 121 ALIGN JUMP_ALIGN121 ALIGN STRING_JUMP_ALIGN 122 122 .ConvertToDecimalDigit: 123 123 sub al, '0' ; Convert to decimal integer … … 137 137 ;-------------------------------------------------------------------- 138 138 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 139 ALIGN JUMP_ALIGN139 ALIGN STRING_JUMP_ALIGN 140 140 Char_CharIsValid: 141 141 stc … … 143 143 %endif 144 144 145 ALIGN JUMP_ALIGN145 ALIGN STRING_JUMP_ALIGN 146 146 Char_CharIsNotValid: 147 147 clc … … 159 159 ;-------------------------------------------------------------------- 160 160 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 161 ALIGN JUMP_ALIGN161 ALIGN STRING_JUMP_ALIGN 162 162 Char_ALtoLowerCaseLetter: 163 163 call Char_IsUpperCaseLetterInAL ; Is upper case character? … … 174 174 ; Nothing 175 175 ;-------------------------------------------------------------------- 176 ALIGN JUMP_ALIGN176 ALIGN STRING_JUMP_ALIGN 177 177 Char_ALtoUpperCaseLetter: 178 178 call Char_IsLowerCaseLetterInAL ; Is lower case character? … … 205 205 ;-------------------------------------------------------------------- 206 206 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 207 ALIGN JUMP_ALIGN207 ALIGN STRING_JUMP_ALIGN 208 208 Char_GetFilterFunctionToDXforNumericBaseInBX: 209 209 mov dx, Char_IsDecimalDigitInAL -
trunk/Assembly_Library/Src/String/String.asm
r293 r369 15 15 ; Nothing 16 16 ;-------------------------------------------------------------------- 17 ALIGN JUMP_ALIGN17 ALIGN STRING_JUMP_ALIGN 18 18 String_ConvertDSSItoLowerCase: 19 19 push dx … … 42 42 ; Nothing 43 43 ;-------------------------------------------------------------------- 44 ALIGN JUMP_ALIGN44 ALIGN STRING_JUMP_ALIGN 45 45 String_ConvertWordToAXfromStringInDSSIwithBaseInBX: 46 46 push di … … 68 68 ; Nothing 69 69 ;-------------------------------------------------------------------- 70 ALIGN JUMP_ALIGN70 ALIGN STRING_JUMP_ALIGN 71 71 String_CopyDSSItoESDIandGetLengthToCX: 72 72 push ax 73 73 74 74 xor cx, cx 75 ALIGN JUMP_ALIGN75 ALIGN STRING_JUMP_ALIGN 76 76 .CopyNextCharacter: 77 77 lodsb ; Load from DS:SI to AL … … 82 82 jmp SHORT .CopyNextCharacter 83 83 84 ALIGN JUMP_ALIGN84 ALIGN STRING_JUMP_ALIGN 85 85 .EndOfString: 86 86 pop ax … … 97 97 ; Nothing 98 98 ;-------------------------------------------------------------------- 99 ALIGN JUMP_ALIGN99 ALIGN STRING_JUMP_ALIGN 100 100 String_GetLengthFromDSSItoCX: 101 101 push ax -
trunk/Assembly_Library/Src/String/StringProcess.asm
r162 r369 33 33 ; Nothing (processing function can corrupt BX,DI,ES) 34 34 ;-------------------------------------------------------------------- 35 ALIGN JUMP_ALIGN35 ALIGN STRING_JUMP_ALIGN 36 36 StringProcess_DSSIwithFunctionInDX: 37 37 push si … … 39 39 40 40 xor cx, cx 41 ALIGN JUMP_ALIGN41 ALIGN STRING_JUMP_ALIGN 42 42 .ProcessNextCharacter: 43 43 lodsb … … 48 48 jnc SHORT .ProcessNextCharacter 49 49 50 ALIGN JUMP_ALIGN50 ALIGN STRING_JUMP_ALIGN 51 51 .EndOfString: 52 52 pop ax … … 65 65 ; AL 66 66 ;-------------------------------------------------------------------- 67 ALIGN JUMP_ALIGN67 ALIGN STRING_JUMP_ALIGN 68 68 StringProcess_ConvertToLowerCase: 69 69 call Char_ALtoLowerCaseLetter … … 84 84 ; AX 85 85 ;-------------------------------------------------------------------- 86 ALIGN JUMP_ALIGN86 ALIGN STRING_JUMP_ALIGN 87 87 StringProcess_ConvertToWordInDIWithBaseInBX: 88 88 call Char_ConvertIntegerToALfromDigitInALwithBaseInBX -
trunk/Assembly_Library/Src/Util/Size.asm
r142 r369 30 30 ; BX, DH 31 31 ;-------------------------------------------------------------------- 32 ALIGN JUMP_ALIGN32 ALIGN UTIL_SIZE_JUMP_ALIGN 33 33 Size_GetSizeToAXAndCharToDLfromBXDXAXwithMagnitudeInCX: 34 34 %ifndef USE_186 ; If 8086/8088 … … 37 37 push si 38 38 39 ALIGN JUMP_ALIGN39 ALIGN UTIL_SIZE_JUMP_ALIGN 40 40 .MagnitudeConversionLoop: 41 41 ePUSH_T di, .MagnitudeConversionLoop; DI corrupted only on 8086/8088 build … … 80 80 ; Nothing 81 81 ;-------------------------------------------------------------------- 82 ALIGN JUMP_ALIGN82 ALIGN UTIL_SIZE_JUMP_ALIGN 83 83 Size_DivideSizeInBXDXAXby1024andIncrementMagnitudeInCX: 84 84 push cx 85 85 xor si, si ; Zero remainder 86 86 mov cl, 10 ; Divide by 1024 87 ALIGN JUMP_ALIGN87 ALIGN UTIL_SIZE_JUMP_ALIGN 88 88 .ShiftLoop: 89 89 call Size_DivideBXDXAXbyTwo … … 107 107 ; Nothing 108 108 ;-------------------------------------------------------------------- 109 ALIGN JUMP_ALIGN109 ALIGN UTIL_SIZE_JUMP_ALIGN 110 110 Size_ConvertSectorCountInBXDXAXtoKiB: 111 111 Size_DivideBXDXAXbyTwo: -
trunk/Serial_Server/win32/Win32.cpp
r338 r369 17 17 #include "../library/flatimage.h" 18 18 19 void usage(void) 20 { 21 char *usageStrings[] = { 22 "SerDrive - XTIDE Universal BIOS Serial Drive Server", 23 "Version 2.0.0 Beta1, Built " __DATE__, 24 "", 25 "SerDrive is released under the GNU GPL v2. SerDrive comes with ABSOLUTELY", 26 "NO WARRANTY. This is free software, and you are welcome to redistribute it", 27 "under certain conditions. See LICENSE.TXT (included with this distribution)", 28 "for more details, or visit http://www.gnu.org/licenses/gpl-2.0.html.", 29 "", 30 "Usage: SerDrive [options] imagefile [[slave-options] slave-imagefile]", 31 "", 32 " -g [cyl:head:sect] Geometry in cylinders, sectors per cylinder, and heads", 33 " -g also implies CHS addressing mode (default is LBA28)", 34 "", 35 " -n [megabytes] Create new disk with given size or use -g geometry", 36 " Maximum size is " USAGE_MAXSECTORS, 37 " Floppy images can also be created, such as \"360K\"", 38 " (default is a 32 MB disk, with CHS geometry 65:16:63)", 39 "", 40 " -p [pipename] Named Pipe mode for emulators", 41 " (must begin with \"\\\\\", default is \"" PIPENAME "\")", 42 "", 43 " -c COMPortNumber COM Port to use (default is first found)", 44 " Available COM ports on this system are:", 45 "COM ", 46 "", 47 " -b BaudRate Baud rate to use on the COM port, with client machine", 48 " rate multiplier in effect:", 49 " None: 2400, 4800, 9600, 28.8K, 57.6K, 115.2K", 50 " 2x: 4800, 9600, 19200, 57.6K, 115.2K, 230.4K", 51 " 4x: 9600, 19200, 38400, 115.2K, 230.4K, 460.8K", 52 " and for completeness: 76.8K, 153.6K", 53 " (default is 9600, 115.2K when in named pipe mode)", 54 "", 55 " -t Disable timeout, useful for long delays when debugging", 56 "", 57 " -r Read Only disk, do not allow writes", 58 "", 59 " -v [level] Reporting level 1-6, with increasing information", 60 "", 61 "On the client computer, a serial port can be configured for use as a hard disk", 62 "with xtidecfg.com. Or one can hold down the ALT key at the end of the normal", 63 "IDE hard disk scan and the XTIDE Universal BIOS will scan COM1-7, at each of", 64 "the six speeds given above for BaudRate. Note that hardware rate multipliers", 65 "must be taken into account on the server end, but are invisible on the client.", 66 "", 67 "Floppy images may also be used. Image size must be exactly the same size", 68 "as a 2.88MB, 1.44MB, 1.2MB, 720KB, 360KB, 320KB, 180KB, or 160KB disk.", 69 "Floppy images must be the last disks discovered by the BIOS, and only", 70 "two floppy drives are supported by the BIOS at a time.", 71 NULL }; 72 73 for( int t = 0; usageStrings[t]; t++ ) 74 { 75 if( !strncmp( usageStrings[t], "COM", 3 ) ) 19 char *bannerStrings[] = { 20 "SerDrive - XTIDE Universal BIOS Serial Drive Server", 21 "Copyright (C) 2012 by XTIDE Universal BIOS Team", 22 "Released under GNU GPL v2, with ABSOLUTELY NO WARRANTY", 23 "Version 2.0.0 Beta1, Built " __DATE__, 24 "", 25 NULL }; 26 27 char *usageStrings[] = { 28 "This is free software, and you are welcome to redistribute it under certain", 29 "conditions. For more license details, see the LICENSE.TXT file included with", 30 "this distribution, visit the XTIDE Universal BIOS wiki (address below), or", 31 "http://www.gnu.org/licenses/gpl-2.0.html", 32 "", 33 "Visit the wiki on http://code.google.com/p/xtideuniversalbios for detailed", 34 "serial drive usage directions.", 35 "", 36 "Usage: SerDrive [options] imagefile [[slave-options] slave-imagefile]", 37 "", 38 " -g [cyl:head:sect] Geometry in cylinders, sectors per cylinder, and heads", 39 " -g also implies CHS addressing mode (default is LBA28)", 40 "", 41 " -n [megabytes] Create new disk with given size or use -g geometry", 42 " Maximum size is " USAGE_MAXSECTORS, 43 " Floppy images can also be created, such as \"360K\"", 44 " (default is a 32 MB disk, with CHS geometry 65:16:63)", 45 "", 46 " -p [pipename] Named Pipe mode for emulators", 47 " (must begin with \"\\\\\", default is \"" PIPENAME "\")", 48 "", 49 " -c COMPortNumber COM Port to use (default is first found)", 50 " Available COM ports on this system are:", 51 "COM ", 52 "", 53 " -b BaudRate Baud rate to use on the COM port, with client machine", 54 " rate multiplier in effect:", 55 " None: 2400, 4800, 9600, 28.8K, 57.6K, 115.2K", 56 " 2x: 4800, 9600, 19200, 57.6K, 115.2K, 230.4K", 57 " 4x: 9600, 19200, 38400, 115.2K, 230.4K, 460.8K", 58 " and for completeness: 76.8K, 153.6K", 59 " (default is 9600, 115.2K when in named pipe mode)", 60 "", 61 " -t Disable timeout, useful for long delays when debugging", 62 "", 63 " -r Read Only disk, do not allow writes", 64 "", 65 " -v [level] Reporting level 1-6, with increasing information", 66 "", 67 "On the client computer, a serial port can be configured for use as a hard disk", 68 "with xtidecfg.com. Or one can hold down the ALT key at the end of the normal", 69 "IDE hard disk scan and the XTIDE Universal BIOS will scan COM1-7, at each of", 70 "the six speeds given above for BaudRate. Note that hardware rate multipliers", 71 "must be taken into account on the server end, but are invisible on the client.", 72 "", 73 "Floppy images may also be used. Image size must be exactly the same size", 74 "as a 2.88MB, 1.44MB, 1.2MB, 720KB, 360KB, 320KB, 180KB, or 160KB disk.", 75 "Floppy images must be the last disks discovered by the BIOS, and only", 76 "two floppy drives are supported by the BIOS at a time.", 77 NULL }; 78 79 void usagePrint( char *strings[] ) 80 { 81 for( int t = 0; strings[t]; t++ ) 82 { 83 if( !strncmp( strings[t], "COM", 3 ) ) 76 84 { 77 85 char logbuff[ 1024 ]; 78 86 79 87 SerialAccess::EnumerateCOMPorts( logbuff, 1024 ); 80 fprintf( stderr, "%s%s\n", usageStrings[t]+3, logbuff );88 fprintf( stderr, "%s%s\n", strings[t]+3, logbuff ); 81 89 } 82 90 else 83 fprintf( stderr, "%s\n", usageStrings[t] );84 } 85 86 exit( 1 ); 87 }91 fprintf( stderr, "%s\n", strings[t] ); 92 } 93 } 94 95 #define usage() { usagePrint( usageStrings ); exit(1); } 88 96 89 97 int verbose = 0; … … 115 123 Image *images[2] = { NULL, NULL }; 116 124 125 usagePrint( bannerStrings ); 126 117 127 for( int t = 1; t < argc; t++ ) 118 128 { 129 char *next = (t+1 < argc ? argv[t+1] : NULL ); 130 119 131 if( argv[t][0] == '/' || argv[t][0] == '-' ) 120 132 { … … 128 140 { 129 141 case 'c': case 'C': 130 a = atol( argv[++t] ); 142 if( !next ) 143 usage(); 144 t++; 145 a = atol( next ); 131 146 if( a < 1 ) 132 147 usage(); … … 135 150 break; 136 151 case 'v': case 'V': 137 if( atol(argv[t+1]) != 0 ) 138 verbose = atol(argv[++t]); 152 if( next && atol(next) != 0 ) 153 { 154 t++; 155 verbose = atol(next); 156 } 139 157 else 140 158 verbose = 1; … … 144 162 break; 145 163 case 'p': case 'P': 146 if( argv[t+1][0] == '\\' && argv[t+1][1] == '\\' ) 147 ComPort = argv[++t]; 164 if( next && next[0] == '\\' && next[1] == '\\' ) 165 { 166 t++; 167 ComPort = next; 168 } 148 169 else 149 170 ComPort = PIPENAME; … … 152 173 break; 153 174 case 'g': case 'G': 154 if( atol(argv[t+1]) != 0 )175 if( next && atol(next) != 0 ) 155 176 { 156 if( !Image::parseGeometry( argv[++t], &cyl, &head, § ) ) 177 t++; 178 if( !Image::parseGeometry( next, &cyl, &head, § ) ) 157 179 usage(); 158 180 } … … 164 186 case 'n': case 'N': 165 187 createFile = 1; 166 if( atol(argv[t+1]) != 0 )188 if( next && atol(next) != 0 ) 167 189 { 168 double size = atof( argv[++t]);190 double size = atof(next); 169 191 struct floppyInfo *fi; 170 192 char *c; 193 194 t++; 171 195 172 196 size *= 2; … … 193 217 break; 194 218 case 'b': case 'B': 195 if( !(baudRate = baudRateMatchString( argv[++t] )) || !baudRate->rate ) 196 log( -2, "Unknown Baud Rate \"%s\"", argv[t] ); 219 if( !next ) 220 usage(); 221 t++; 222 if( !(baudRate = baudRateMatchString( next )) || !baudRate->rate ) 223 log( -2, "Unknown Baud Rate \"%s\"", next ); 197 224 break; 198 225 default: -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm
r294 r369 16 16 ; All General Purpose Registers 17 17 ;-------------------------------------------------------------------- 18 ALIGN JUMP_ALIGN19 18 BootMenu_DisplayAndReturnSelectionInDX: 20 19 call DriveXlate_Reset … … 39 38 ; AX, DI 40 39 ;-------------------------------------------------------------------- 41 ALIGN JUMP_ALIGN42 40 BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS: 43 41 call RamVars_GetSegmentToDS 44 42 ;;; fall-through 45 43 46 ALIGN JUMP_ALIGN47 44 BootMenu_GetDriveToDXforMenuitemInCX: 48 45 cmp cl, NO_ITEM_HIGHLIGHTED … … 73 70 ; AX, BX, DI 74 71 ;-------------------------------------------------------------------- 75 ALIGN JUMP_ALIGN76 72 BootMenu_Enter: 77 73 mov bx, BootMenuEvent_Handler … … 92 88 ; CX 93 89 ;-------------------------------------------------------------------- 94 ALIGN JUMP_ALIGN95 90 BootMenu_GetMenuitemCountToAX: 96 91 call RamVars_GetHardDiskCountFromBDAtoAX … … 110 105 ; AL, CX, DI 111 106 ;-------------------------------------------------------------------- 112 ALIGN JUMP_ALIGN113 107 BootMenu_GetHeightToAHwithItemCountInAL: 114 108 add al, BOOT_MENU_HEIGHT_WITHOUT_ITEMS … … 119 113 jb SHORT .Return 120 114 mov ah, cl 121 ALIGN JUMP_ALIGN, ret 115 122 116 .Return: 123 117 ret … … 133 127 ; CX 134 128 ;-------------------------------------------------------------------- 135 ALIGN JUMP_ALIGN136 129 BootMenu_GetMenuitemToAXforAsciiHotkeyInAL: 137 130 call Char_ALtoUpperCaseLetter … … 144 137 sub al, 'A' ; Letter to Floppy Drive menuitem 145 138 ret 146 ALIGN JUMP_ALIGN 139 147 140 .StartFromHardDiskLetter: 148 141 sub cl, al ; Hard Disk index … … 165 158 ; AX 166 159 ;-------------------------------------------------------------------- 167 ALIGN JUMP_ALIGN168 160 BootMenu_GetLetterForFirstHardDiskToAL: 169 161 call FloppyDrive_GetCountToAX … … 172 164 ja .Return 173 165 mov al, 'C' 174 ALIGN JUMP_ALIGN, ret 166 175 167 .Return: 176 168 ret … … 186 178 ; AX 187 179 ;-------------------------------------------------------------------- 188 ALIGN JUMP_ALIGN189 180 BootMenu_GetMenuitemToDXforDriveInDL: 190 181 xor dh, dh ; Drive number now in DX … … 211 202 ; AX, CX 212 203 ;-------------------------------------------------------------------- 213 ALIGN JUMP_ALIGN214 204 BootMenu_IsDriveInSystem: 215 205 test dl, dl ; Floppy drive? -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm
r258 r369 16 16 ; All 17 17 ;-------------------------------------------------------------------- 18 ALIGN JUMP_ALIGN19 18 BootMenuEvent_Handler: 20 19 … … 66 65 ; Returns: 67 66 ; DS:SI: Ptr to initialized MENUINIT struct 68 ALIGN JUMP_ALIGN69 67 .FirstEvent: 70 68 .InitializeMenuinitFromDSSI: … … 85 83 ret 86 84 87 ALIGN JUMP_ALIGN88 85 .GetDefaultMenuitemToDX: 89 86 mov dl, [cs:ROMVARS.bBootDrv] ; Default boot drive … … 92 89 call DriveXlate_SetDriveToSwap 93 90 jmp BootMenu_GetMenuitemToDXforDriveInDL 94 ALIGN JUMP_ALIGN 91 95 92 .DoNotSetDefaultMenuitem: 96 93 xor dx, dx ; Whatever appears first on boot menu … … 101 98 ; CX: Index of new highlighted item 102 99 ; DX: Index of previously highlighted item or NO_ITEM_HIGHLIGHTED 103 ALIGN JUMP_ALIGN104 100 .ItemHighlightedFromCX: 105 101 push cx … … 124 120 ; AL: ASCII character for the key 125 121 ; AH: Keyboard library scan code for the key 126 ALIGN JUMP_ALIGN127 122 .KeyStrokeInAX: 128 123 cmp ah, ROM_BOOT_HOTKEY_SCANCODE … … 130 125 ;; NOTE: carry flag will be clear after compare above that resulted in zero 131 126 jmp Int19hMenu_JumpToBootSector_or_RomBoot 132 ALIGN JUMP_ALIGN 127 133 128 .CheckDriveHotkeys: 134 129 call BootMenu_GetMenuitemToAXforAsciiHotkeyInAL … … 147 142 ; Parameters: 148 143 ; CX: Index of selected item 149 ALIGN JUMP_ALIGN150 144 .ItemSelectedFromCX: 151 145 CALL_MENU_LIBRARY Close -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuInfo.asm
r365 r369 55 55 ; CX 56 56 ;-------------------------------------------------------------------- 57 ALIGN JUMP_ALIGN58 57 BootMenuInfo_GetTotalSectorCount: 59 58 test BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm
r294 r369 15 15 ; AX, BX, DX, SI, DI 16 16 ;-------------------------------------------------------------------- 17 ALIGN JUMP_ALIGN18 17 BootMenuPrint_RefreshItem: 19 18 call BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS … … 59 58 ; AX, SI, DI 60 59 ;-------------------------------------------------------------------- 61 ALIGN JUMP_ALIGN62 60 BootMenuPrint_TitleStrings: 63 61 mov si, ROMVARS.szTitle … … 76 74 ; AX, DI 77 75 ;-------------------------------------------------------------------- 78 ALIGN JUMP_ALIGN79 76 BootMenuPrint_NullTerminatedStringFromCSSIandSetCF: 80 77 ; … … 99 96 ; AX, BX, CX, DX, SI, DI, ES 100 97 ;-------------------------------------------------------------------- 101 ALIGN JUMP_ALIGN102 98 BootMenuPrint_RefreshInformation: 103 99 CALL_MENU_LIBRARY ClearInformationArea … … 188 184 ; BX, CX, DX, SI, DI, ES 189 185 ;-------------------------------------------------------------------- 190 ALIGN JUMP_ALIGN191 186 .HardDiskRefreshInformation: 192 187 jc .HardDiskMenuitemInfoForForeignDrive ; Based on CF from FindDPT_ForDriveNumberInDL (way) above … … 229 224 ; AX, DI 230 225 ;-------------------------------------------------------------------- 231 ALIGN JUMP_ALIGN232 226 BootMenuPrint_FormatCSSIfromParamsInSSBP: 233 227 CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI … … 246 240 ; AX, DI 247 241 ;-------------------------------------------------------------------- 248 ALIGN JUMP_ALIGN249 242 BootMenuPrint_ClearScreen: 250 243 call BootMenuPrint_InitializeDisplayContext … … 265 258 ; AX, BX, CX, DX, SI, DI 266 259 ;-------------------------------------------------------------------- 267 ALIGN JUMP_ALIGN268 260 BootMenuPrint_TheBottomOfScreen: 269 261 call FloppyDrive_GetCountToAX … … 351 343 ; AX, SI, DI 352 344 ;-------------------------------------------------------------------- 353 ALIGN JUMP_ALIGN354 345 PushHotkeyParamsAndFormat: 355 346 push bp … … 378 369 ; AX, DI 379 370 ;-------------------------------------------------------------------- 380 ALIGN JUMP_ALIGN381 371 BootMenuPrint_InitializeDisplayContext: 382 372 CALL_DISPLAY_LIBRARY InitializeDisplayContext -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootPrint.asm
r241 r369 14 14 ; AX, CX, SI, DI 15 15 ;-------------------------------------------------------------------- 16 ALIGN JUMP_ALIGN17 16 BootPrint_FailedToLoadFirstSector: 18 17 push bp … … 35 34 ; AX, SI, DI 36 35 ;-------------------------------------------------------------------- 37 ALIGN JUMP_ALIGN38 36 BootPrint_TryToBootFromDL: 39 37 push bp -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootSector.asm
r294 r369 17 17 ; AX, CX, DH, SI, DI, (DL if failed to read boot sector) 18 18 ;-------------------------------------------------------------------- 19 ALIGN JUMP_ALIGN20 19 BootSector_TryToLoadFromDriveDL: 21 20 call BootPrint_TryToBootFromDL … … 52 51 ; AL, CX, DH, DI 53 52 ;-------------------------------------------------------------------- 54 ALIGN JUMP_ALIGN55 53 LoadFirstSectorFromDriveDL: 56 54 LOAD_BDA_SEGMENT_TO es, bx ; ES:BX now points to... 57 55 mov bx, BOOTVARS.rgbBootSect ; ...boot sector location 58 56 mov di, BOOT_READ_RETRY_TIMES ; Initialize retry counter 59 ALIGN JUMP_ALIGN 57 60 58 .ReadRetryLoop: 61 59 call .ResetBootDriveFromDL … … 78 76 ; AL 79 77 ;-------------------------------------------------------------------- 80 ALIGN JUMP_ALIGN81 78 .ResetBootDriveFromDL: 82 79 xor ax, ax ; AH=0h, Disk Controller Reset … … 101 98 ; AL, CX, DH 102 99 ;-------------------------------------------------------------------- 103 ALIGN JUMP_ALIGN104 100 .LoadFirstSectorFromDLtoESBX: 105 101 mov ax, 0201h ; Read 1 sector -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm
r316 r369 21 21 ; CF: 0 if successful, 1 if error 22 22 ;-------------------------------------------------------------------- 23 ALIGN JUMP_ALIGN24 23 AH0h_HandlerForDiskControllerReset: 25 24 eMOVZX bx, dl ; Copy requested drive to BL, zero BH to assume no errors -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH11h_HRecal.asm
r294 r369 17 17 ; CF: 0 if successful, 1 if error 18 18 ;-------------------------------------------------------------------- 19 ALIGN JUMP_ALIGN20 19 AH11h_HandlerForRecalibrate: 21 20 %ifndef USE_186 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH15h_HSize.asm
r294 r369 24 24 ; CF: 1 25 25 ;-------------------------------------------------------------------- 26 ALIGN JUMP_ALIGN27 26 AH15h_HandlerForReadDiskDriveSize: 28 27 %ifdef MODULE_SERIAL_FLOPPY -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm
r294 r369 26 26 ; CF: 0 if successful, 1 if error 27 27 ;-------------------------------------------------------------------- 28 ALIGN JUMP_ALIGN29 28 AH23h_HandlerForSetControllerFeatures: 30 29 xchg si, ax ; SI = Feature Number … … 55 54 ; AL, BX, CX, DX 56 55 ;-------------------------------------------------------------------- 57 ;ALIGN JUMP_ALIGN58 56 AH23h_SetControllerFeatures: 59 57 mov al, COMMAND_SET_FEATURES -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm
r322 r369 20 20 ; CF: 0 if successful, 1 if error 21 21 ;-------------------------------------------------------------------- 22 ALIGN JUMP_ALIGN23 22 AH25h_HandlerForGetDriveInformation: 24 23 mov ax, (COMMAND_IDENTIFY_DEVICE << 8 | 1) ; Read 1 sector -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm
r363 r369 17 17 ; CF: 0 if successful, 1 if error 18 18 ;-------------------------------------------------------------------- 19 ALIGN JUMP_ALIGN20 19 AHDh_HandlerForResetHardDisk: 21 20 %ifndef USE_186 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm
r294 r369 21 21 ; CF: 0 if successful, 1 if error 22 22 ;-------------------------------------------------------------------- 23 ALIGN JUMP_ALIGN24 23 AH41h_HandlerForCheckIfExtensionsPresent: 25 24 cmp WORD [bp+IDEPACK.intpack+INTPACK.bx], 55AAh -
trunk/XTIDE_Universal_BIOS/Src/Initialization/FloppyDrive.asm
r294 r369 109 109 ; AX, CX, DX, DI, ES 110 110 ;-------------------------------------------------------------------- 111 ALIGN JUMP_ALIGN112 111 FloppyDrive_GetType: 113 112 mov ah, 08h ; Get Drive Parameters … … 126 125 ; AX: Number of Floppy Drives 127 126 ;-------------------------------------------------------------------- 128 ALIGN JUMP_ALIGN129 127 FloppyDrive_GetCountToAX: 130 128 %ifdef MODULE_SERIAL_FLOPPY … … 146 144 ret 147 145 148 ALIGN JUMP_ALIGN149 146 FloppyDrive_GetCountFromBIOS_or_BDA: 150 147 push es … … 166 163 ;-------------------------------------------------------------------- 167 164 %ifdef USE_AT 168 ALIGN JUMP_ALIGN169 165 .GetCountFromBIOS: 170 166 push di … … 197 193 ;-------------------------------------------------------------------- 198 194 %ifndef USE_AT 199 ALIGN JUMP_ALIGN200 195 .GetCountFromBDA: 201 196 LOAD_BDA_SEGMENT_TO es, ax -
trunk/XTIDE_Universal_BIOS/makefile
r366 r369 193 193 @perl ..\tools\checksum.pl $(TARGET)_xt.bin $(ROMSIZE) 194 194 @perl ..\tools\checksum.pl $(TARGET)_jr8k.bin $(ROMSIZE) 195 @perl ..\tools\checksum.pl $(TARGET)_386.bin $(ROMSIZE) 195 196 196 197 xt_unused: xt -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Buffers.asm
r293 r369 107 107 and WORD [g_cfgVars+CFGVARS.wFlags], ~FLG_CFGVARS_UNSAVED 108 108 ret 109 110 ;-------------------------------------------------------------------- 111 ; Buffers_TestLoaded 112 ; Parameters: 113 ; SS:BP: Menu handle 114 ; Returns: 115 ; CF: Set = BIOS Loaded 116 ; Corrupts registers: 117 ; AX 118 ;-------------------------------------------------------------------- 119 ALIGN JUMP_ALIGN 120 Buffers_TestLoaded: 121 test word [cs:g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_FILELOADED ; Clears CF 122 jz .done 123 stc 124 .done: 125 ret 109 126 110 127 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menuitem.asm
r293 r369 152 152 call GetConfigurationBufferToESDIforMenuitemInDSSI 153 153 add di, [si+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] 154 155 push bx 156 mov bx,[si+MENUITEM.itemValue+ITEM_VALUE.fnValueWriter] 157 test bx,bx 158 jz SHORT .NoWriter 159 call bx 160 .NoWriter: 161 pop bx 162 154 163 jmp [cs:bx+.rgfnJumpToStoreValueBasedOnItemType] 155 164 .InvalidItemType: … … 231 240 ALIGN JUMP_ALIGN 232 241 .StoreByteOrWordValueFromAXtoESDIwithItemInDSSI: 233 push bx234 mov bx,[si+MENUITEM.itemValue+ITEM_VALUE.fnValueWriter]235 test bx,bx236 jz SHORT .NoWriter237 238 call bx239 240 .NoWriter:241 pop bx242 242 test BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_MASKVALUE 243 243 jz SHORT .StoreByteOrWord -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MasterSlaveMenu.asm
r360 r369 70 70 at MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup, dw g_rgszValueToStringLookupForFlagBooleans 71 71 at MENUITEM.itemValue + ITEM_VALUE.wValueBitmask, dw FLG_DRVPARAMS_USERCHS 72 at MENUITEM.itemValue + ITEM_VALUE.fnValueWriter, dw MasterSlaveMenu_WriteCHSFlag 72 73 iend 73 74 … … 85 86 at MENUITEM.itemValue + ITEM_VALUE.wMinValue, dw 1 86 87 at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw 16383 88 %define MASTERSLAVE_CYLINDERS_DEFAULT 65 87 89 iend 88 90 … … 100 102 at MENUITEM.itemValue + ITEM_VALUE.wMinValue, dw 1 101 103 at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw 16 104 %define MASTERSLAVE_HEADS_DEFAULT 16 102 105 iend 103 106 … … 115 118 at MENUITEM.itemValue + ITEM_VALUE.wMinValue, dw 1 116 119 at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw 63 120 %define MASTERSLAVE_SECTORS_DEFAULT 63 117 121 iend 118 122 … … 131 135 at MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup, dw g_rgszValueToStringLookupForFlagBooleans 132 136 at MENUITEM.itemValue + ITEM_VALUE.wValueBitmask, dw FLG_DRVPARAMS_USERLBA 137 at MENUITEM.itemValue + ITEM_VALUE.fnValueWriter, dw MasterSlaveMenu_WriteLBAFlag 133 138 iend 134 139 … … 148 153 at MENUITEM.itemValue + ITEM_VALUE.fnValueReader, dw ValueReaderForUserLbaValue 149 154 at MENUITEM.itemValue + ITEM_VALUE.fnValueWriter, dw ValueWriterForUserLbaValue 155 %define MASTERSLAVE_USERLBA_DEFAULT 1 150 156 iend 151 157 … … 384 390 pop dx 385 391 ret ; AX will be stored by our menu system 392 393 ; 394 ; No change to CHS flag, but we use this opportunity to change defaults stored in the CHS values if we are 395 ; changing in/out of user CHS settings (since we use these bytes in different ways with the LBA setting). 396 ; 397 ALIGN JUMP_ALIGN 398 MasterSlaveMenu_WriteCHSFlag: 399 test word [es:di], FLG_DRVPARAMS_USERCHS 400 jnz .alreadySet 401 402 push ax 403 push di 404 push si 405 406 mov ax, MASTERSLAVE_CYLINDERS_DEFAULT 407 mov si, g_MenuitemMasterSlaveCylinders 408 call Menuitem_StoreValueFromAXtoMenuitemInDSSI 409 410 mov ax, MASTERSLAVE_HEADS_DEFAULT 411 mov si, g_MenuitemMasterSlaveHeads 412 call Menuitem_StoreValueFromAXtoMenuitemInDSSI 413 414 mov ax, MASTERSLAVE_SECTORS_DEFAULT 415 mov si, g_MenuitemMasterSlaveSectors 416 call Menuitem_StoreValueFromAXtoMenuitemInDSSI 417 418 pop si 419 pop di 420 pop ax 421 422 .alreadySet: 423 ret 424 425 ; 426 ; No change to LBA flag, but we use this opportunity to change defaults stored in the LBA value if we are 427 ; changing in/out of user LBA settings (since we use these bytes in different ways with the CHS setting). 428 ; 429 ALIGN JUMP_ALIGN 430 MasterSlaveMenu_WriteLBAFlag: 431 test word [es:di], FLG_DRVPARAMS_USERLBA 432 jnz .alreadySet 433 434 push ax 435 push di 436 push si 437 438 mov ax, MASTERSLAVE_USERLBA_DEFAULT 439 mov si, g_MenuitemMasterSlaveUserLbaValue 440 call Menuitem_StoreValueFromAXtoMenuitemInDSSI 441 442 pop si 443 pop di 444 pop ax 445 446 .alreadySet: 447 ret -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm
r362 r369 74 74 g_szNfoMainConfigure: db "Configure XTIDE Universal BIOS settings.",NULL 75 75 g_szNfoMainFlash: db "Flash loaded BIOS image to EEPROM.",NULL 76 g_szNfoMainLicense: db "XTIDE Universal BIOS and XTIDECFG (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. Released under GNU GPL v2, with ABSOLUTELY NO WARRANTY. Details...",NULL76 g_szNfoMainLicense: db "XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. Released under GNU GPL v2, with ABSOLUTELY NO WARRANTY. Press ENTER for more details...",NULL 77 77 g_szNfoMainHomePage: db "Visit http://code.google.com/p/ xtideuniversalbios (home page) and http://vintage-computer.com/ vcforum (support)",NULL 78 78
Note:
See TracChangeset
for help on using the changeset viewer.