Changeset 177 in xtideuniversalbios for trunk/Assembly_Library/Src/Display


Ignore:
Timestamp:
Oct 22, 2011, 9:31:12 PM (13 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Optimiztion, replaced the jump tables for MENU_LIB and DISPLAY_LIB with direct jump offsets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/Display/Display.asm

    r134 r177  
    2424    cld
    2525    LOAD_BDA_SEGMENT_TO ds, dx
    26     mov     dx, [cs:di+.rgfnDisplayLibraryFunctions]
     26    mov     dx, di
    2727    les     di, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fpCursorPosition]
    2828    call    dx
     
    3535
    3636;--------------------------------------------------------------------
    37 ; .FormatNullTerminatedStringFromCSSI
     37; Display_FormatNullTerminatedStringFromCSSI
    3838;   Parameters:
    3939;       Same as DisplayPrint_FormattedNullTerminatedStringFromCSSI
     
    4444;--------------------------------------------------------------------
    4545ALIGN JUMP_ALIGN
    46 .FormatNullTerminatedStringFromCSSI:
     46Display_FormatNullTerminatedStringFromCSSI:
    4747    pop     ax                  ; Discard return address to inside Display_FunctionFromDI
    4848    call    DisplayPrint_FormattedNullTerminatedStringFromCSSI
     
    5757    jmp     ax
    5858
    59 
    60 ALIGN WORD_ALIGN
    61 .rgfnDisplayLibraryFunctions:
    62 istruc DISPLAY_LIB
    63     at  DISPLAY_LIB.InitializeDisplayContext,                       dw  DisplayContext_Initialize
     59       
     60%define InitializeDisplayContext                        DisplayContext_Initialize
    6461
    6562%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    66     at  DISPLAY_LIB.SetCharacterPointerFromBXAX,                    dw  DisplayContext_SetCharacterPointerFromBXAX
     63%define SetCharacterPointerFromBXAX                     DisplayContext_SetCharacterPointerFromBXAX
    6764%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
     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
     70%define SetNewPageFromAL                                DisplayPage_SetFromAL
     71%define SynchronizeDisplayContextToHardware             DisplayContext_SynchronizeToHardware
    7572
    7673%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    77     at  DISPLAY_LIB.GetCharacterPointerToBXAX,                      dw  DisplayContext_GetCharacterPointerToBXAX
     74%define GetCharacterPointerToBXAX                       DisplayContext_GetCharacterPointerToBXAX
    7875%endif
    79     at  DISPLAY_LIB.GetSoftwareCoordinatesToAX,                     dw  DisplayCursor_GetSoftwareCoordinatesToAX
    80     at  DISPLAY_LIB.GetColumnsToALandRowsToAH,                      dw  DisplayPage_GetColumnsToALandRowsToAH
     76%define GetSoftwareCoordinatesToAX                      DisplayCursor_GetSoftwareCoordinatesToAX
     77%define GetColumnsToALandRowsToAH                       DisplayPage_GetColumnsToALandRowsToAH
    8178
    82     at  DISPLAY_LIB.FormatNullTerminatedStringFromCSSI,             dw  .FormatNullTerminatedStringFromCSSI
     79%define FormatNullTerminatedStringFromCSSI              Display_FormatNullTerminatedStringFromCSSI
    8380%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    84     at  DISPLAY_LIB.PrintSignedWordFromAXWithBaseInBX,              dw  DisplayPrint_SignedWordFromAXWithBaseInBX
     81%define PrintSignedWordFromAXWithBaseInBX               DisplayPrint_SignedWordFromAXWithBaseInBX
    8582%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
     83%define PrintWordFromAXwithBaseInBX                     DisplayPrint_WordFromAXWithBaseInBX
     84%define PrintCharBufferFromBXSIwithLengthInCX           DisplayPrint_CharacterBufferFromBXSIwithLengthInCX
     85%define PrintNullTerminatedStringFromBXSI               DisplayPrint_NullTerminatedStringFromBXSI
     86%define PrintNullTerminatedStringFromCSSI               DisplayPrint_NullTerminatedStringFromCSSI
     87%define PrintRepeatedCharacterFromALwithCountInCX       DisplayPrint_RepeatCharacterFromALwithCountInCX
     88%define PrintCharacterFromAL                            DisplayPrint_CharacterFromAL
     89%define PrintNewlineCharacters                          DisplayPrint_Newline
    9390%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    94     at  DISPLAY_LIB.ClearAreaWithHeightInAHandWidthInAL,            dw  DisplayPrint_ClearAreaWithHeightInAHandWidthInAL
     91%define ClearAreaWithHeightInAHandWidthInAL             DisplayPrint_ClearAreaWithHeightInAHandWidthInAL
    9592%endif
    96     at  DISPLAY_LIB.ClearScreenWithCharInALandAttrInAH,             dw  DisplayPrint_ClearScreenWithCharInALandAttributeInAH
    97 iend
     93%define ClearScreenWithCharInALandAttrInAH              DisplayPrint_ClearScreenWithCharInALandAttributeInAH
     94
Note: See TracChangeset for help on using the changeset viewer.