source: xtideuniversalbios/trunk/Assembly_Library/Src/Display/Display.asm@ 174

Last change on this file since 174 was 134, checked in by Tomi Tilli, 14 years ago

Changes to Assembly Library:

  • Excluded some format specifiers and related printing functions not used by XTIDE Universal BIOS.
File size: 4.1 KB
Line 
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
6SECTION .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;--------------------------------------------------------------------
18ALIGN JUMP_ALIGN
19Display_FunctionFromDI:
20 push es
21 push ds
22 push dx
23
24 cld
25 LOAD_BDA_SEGMENT_TO ds, dx
26 mov dx, [cs:di+.rgfnDisplayLibraryFunctions]
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;--------------------------------------------------------------------
37; .FormatNullTerminatedStringFromCSSI
38; Parameters:
39; Same as DisplayPrint_FormattedNullTerminatedStringFromCSSI
40; Returns:
41; Stack variables will be cleaned
42; Corrupts registers:
43; AX
44;--------------------------------------------------------------------
45ALIGN JUMP_ALIGN
46.FormatNullTerminatedStringFromCSSI:
47 pop ax ; Discard return address to inside Display_FunctionFromDI
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
60ALIGN WORD_ALIGN
61.rgfnDisplayLibraryFunctions:
62istruc DISPLAY_LIB
63 at DISPLAY_LIB.InitializeDisplayContext, dw DisplayContext_Initialize
64
65%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
66 at DISPLAY_LIB.SetCharacterPointerFromBXAX, dw DisplayContext_SetCharacterPointerFromBXAX
67%endif
68 at DISPLAY_LIB.SetCharOutputFunctionFromAXwithAttribFlagInBL, dw DisplayContext_SetCharOutputFunctionFromAXwithAttribFlagInBL
69 at DISPLAY_LIB.SetCharacterOutputParameterFromAX, dw DisplayContext_SetCharacterOutputParameterFromAX
70 at DISPLAY_LIB.SetCharacterAttributeFromAL, dw DisplayContext_SetCharacterAttributeFromAL
71 at DISPLAY_LIB.SetCursorShapeFromAX, dw DisplayCursor_SetShapeFromAX
72 at DISPLAY_LIB.SetCursorCoordinatesFromAX, dw DisplayCursor_SetCoordinatesFromAX
73 at DISPLAY_LIB.SetNewPageFromAL, dw DisplayPage_SetFromAL
74 at DISPLAY_LIB.SynchronizeDisplayContextToHardware, dw DisplayContext_SynchronizeToHardware
75
76%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
77 at DISPLAY_LIB.GetCharacterPointerToBXAX, dw DisplayContext_GetCharacterPointerToBXAX
78%endif
79 at DISPLAY_LIB.GetSoftwareCoordinatesToAX, dw DisplayCursor_GetSoftwareCoordinatesToAX
80 at DISPLAY_LIB.GetColumnsToALandRowsToAH, dw DisplayPage_GetColumnsToALandRowsToAH
81
82 at DISPLAY_LIB.FormatNullTerminatedStringFromCSSI, dw .FormatNullTerminatedStringFromCSSI
83%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
84 at DISPLAY_LIB.PrintSignedWordFromAXWithBaseInBX, dw DisplayPrint_SignedWordFromAXWithBaseInBX
85%endif
86 at DISPLAY_LIB.PrintWordFromAXwithBaseInBX, dw DisplayPrint_WordFromAXWithBaseInBX
87 at DISPLAY_LIB.PrintCharBufferFromBXSIwithLengthInCX, dw DisplayPrint_CharacterBufferFromBXSIwithLengthInCX
88 at DISPLAY_LIB.PrintNullTerminatedStringFromBXSI, dw DisplayPrint_NullTerminatedStringFromBXSI
89 at DISPLAY_LIB.PrintNullTerminatedStringFromCSSI, dw DisplayPrint_NullTerminatedStringFromCSSI
90 at DISPLAY_LIB.PrintRepeatedCharacterFromALwithCountInCX, dw DisplayPrint_RepeatCharacterFromALwithCountInCX
91 at DISPLAY_LIB.PrintCharacterFromAL, dw DisplayPrint_CharacterFromAL
92 at DISPLAY_LIB.PrintNewlineCharacters, dw DisplayPrint_Newline
93%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
94 at DISPLAY_LIB.ClearAreaWithHeightInAHandWidthInAL, dw DisplayPrint_ClearAreaWithHeightInAHandWidthInAL
95%endif
96 at DISPLAY_LIB.ClearScreenWithCharInALandAttrInAH, dw DisplayPrint_ClearScreenWithCharInALandAttributeInAH
97iend
Note: See TracBrowser for help on using the repository browser.