[41] | 1 | ; Project name : Assembly Library
|
---|
| 2 | ; Description : Display Library functions for CALL_DISPLAY_LIBRARY macro
|
---|
| 3 | ; that users should use to make library call.
|
---|
| 4 |
|
---|
| 5 | ; Section containing code
|
---|
| 6 | SECTION .text
|
---|
| 7 |
|
---|
| 8 | ;--------------------------------------------------------------------
|
---|
| 9 | ; DisplayFunctionFromDI
|
---|
| 10 | ; Parameters:
|
---|
| 11 | ; DI: Function to call (DISPLAY_LIB.functionName)
|
---|
| 12 | ; Others: Depends on function to call (DX cannot be parameter)
|
---|
| 13 | ; Returns:
|
---|
| 14 | ; Depends on function to call
|
---|
| 15 | ; Corrupts registers:
|
---|
| 16 | ; AX (unless used as a return register), DI
|
---|
| 17 | ;--------------------------------------------------------------------
|
---|
[369] | 18 | ALIGN DISPLAY_JUMP_ALIGN
|
---|
[41] | 19 | Display_FunctionFromDI:
|
---|
| 20 | push es
|
---|
| 21 | push ds
|
---|
| 22 | push dx
|
---|
| 23 |
|
---|
| 24 | cld
|
---|
| 25 | LOAD_BDA_SEGMENT_TO ds, dx
|
---|
[177] | 26 | mov dx, di
|
---|
[41] | 27 | les di, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fpCursorPosition]
|
---|
| 28 | call dx
|
---|
| 29 | mov [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fpCursorPosition], di
|
---|
| 30 |
|
---|
| 31 | pop dx
|
---|
| 32 | pop ds
|
---|
| 33 | pop es
|
---|
| 34 | ret
|
---|
| 35 |
|
---|
| 36 | ;--------------------------------------------------------------------
|
---|
[177] | 37 | ; Display_FormatNullTerminatedStringFromCSSI
|
---|
[41] | 38 | ; Parameters:
|
---|
| 39 | ; Same as DisplayPrint_FormattedNullTerminatedStringFromCSSI
|
---|
| 40 | ; Returns:
|
---|
| 41 | ; Stack variables will be cleaned
|
---|
| 42 | ; Corrupts registers:
|
---|
| 43 | ; AX
|
---|
| 44 | ;--------------------------------------------------------------------
|
---|
[369] | 45 | ALIGN DISPLAY_JUMP_ALIGN
|
---|
[177] | 46 | Display_FormatNullTerminatedStringFromCSSI:
|
---|
[101] | 47 | pop ax ; Discard return address to inside Display_FunctionFromDI
|
---|
[41] | 48 | call DisplayPrint_FormattedNullTerminatedStringFromCSSI
|
---|
| 49 | mov [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fpCursorPosition], di
|
---|
| 50 |
|
---|
| 51 | pop dx
|
---|
| 52 | pop ds
|
---|
| 53 | pop es
|
---|
| 54 |
|
---|
| 55 | pop ax ; Pop return address
|
---|
| 56 | mov sp, bp ; Clean stack variables
|
---|
| 57 | jmp ax
|
---|
| 58 |
|
---|
| 59 |
|
---|
[181] | 60 | %define InitializeDisplayContext DisplayContext_Initialize
|
---|
| 61 |
|
---|
[133] | 62 | %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
|
---|
[181] | 63 | %define SetCharacterPointerFromBXAX DisplayContext_SetCharacterPointerFromBXAX
|
---|
[133] | 64 | %endif
|
---|
[181] | 65 | %define SetCharOutputFunctionFromAXwithAttribFlagInBL DisplayContext_SetCharOutputFunctionFromAXwithAttribFlagInBL
|
---|
| 66 | %define SetCharacterOutputParameterFromAX DisplayContext_SetCharacterOutputParameterFromAX
|
---|
| 67 | %define SetCharacterAttributeFromAL DisplayContext_SetCharacterAttributeFromAL
|
---|
| 68 | %define SetCursorShapeFromAX DisplayCursor_SetShapeFromAX
|
---|
| 69 | %define SetCursorCoordinatesFromAX DisplayCursor_SetCoordinatesFromAX
|
---|
[370] | 70 | %ifndef EXCLUDE_FROM_XTIDECFG
|
---|
[181] | 71 | %define SetNewPageFromAL DisplayPage_SetFromAL
|
---|
[370] | 72 | %endif
|
---|
[181] | 73 | %define SynchronizeDisplayContextToHardware DisplayContext_SynchronizeToHardware
|
---|
[41] | 74 |
|
---|
[133] | 75 | %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
|
---|
[181] | 76 | %define GetCharacterPointerToBXAX DisplayContext_GetCharacterPointerToBXAX
|
---|
[133] | 77 | %endif
|
---|
[181] | 78 | %define GetSoftwareCoordinatesToAX DisplayCursor_GetSoftwareCoordinatesToAX
|
---|
| 79 | %define GetColumnsToALandRowsToAH DisplayPage_GetColumnsToALandRowsToAH
|
---|
[41] | 80 |
|
---|
[181] | 81 | %define FormatNullTerminatedStringFromCSSI Display_FormatNullTerminatedStringFromCSSI
|
---|
[134] | 82 | %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
|
---|
[181] | 83 | %define PrintSignedWordFromAXWithBaseInBX DisplayPrint_SignedWordFromAXWithBaseInBX
|
---|
[134] | 84 | %endif
|
---|
[181] | 85 | %define PrintWordFromAXwithBaseInBX DisplayPrint_WordFromAXWithBaseInBX
|
---|
[341] | 86 | %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
|
---|
[323] | 87 | %define PrintQWordFromSSBPwithBaseInBX DisplayPrint_QWordFromSSBPwithBaseInBX
|
---|
| 88 | %endif
|
---|
[181] | 89 | %define PrintCharBufferFromBXSIwithLengthInCX DisplayPrint_CharacterBufferFromBXSIwithLengthInCX
|
---|
| 90 | %define PrintNullTerminatedStringFromBXSI DisplayPrint_NullTerminatedStringFromBXSI
|
---|
| 91 | %define PrintNullTerminatedStringFromCSSI DisplayPrint_NullTerminatedStringFromCSSI
|
---|
| 92 | %define PrintRepeatedCharacterFromALwithCountInCX DisplayPrint_RepeatCharacterFromALwithCountInCX
|
---|
| 93 | %define PrintCharacterFromAL DisplayPrint_CharacterFromAL
|
---|
| 94 | %define PrintNewlineCharacters DisplayPrint_Newline
|
---|
[134] | 95 | %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
|
---|
[181] | 96 | %define ClearAreaWithHeightInAHandWidthInAL DisplayPrint_ClearAreaWithHeightInAHandWidthInAL
|
---|
[134] | 97 | %endif
|
---|
[181] | 98 | %define ClearScreenWithCharInALandAttrInAH DisplayPrint_ClearScreenWithCharInALandAttributeInAH
|
---|
[177] | 99 |
|
---|