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


Ignore:
Timestamp:
Nov 13, 2011, 3:38:40 PM (13 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes to all parts of the project:

  • Size optimizations.
  • Added a define (EXCLUDE_FROM_XTIDECFG) to exclude unused library code from XTIDECFG.
  • Tried to minimize time spent with interrupts disabled.
  • Some minor attempts to improve speed (reordering instructions etc).
  • Tried to improve readability, did some cleanup and fixed some errors in comments.
Location:
trunk/Assembly_Library/Src/Display
Files:
4 edited

Legend:

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

    r177 r181  
    5757    jmp     ax
    5858
    59        
    60 %define InitializeDisplayContext                        DisplayContext_Initialize
     59
     60    %define InitializeDisplayContext                        DisplayContext_Initialize
    6161
    6262%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    63 %define SetCharacterPointerFromBXAX                     DisplayContext_SetCharacterPointerFromBXAX
     63    %define SetCharacterPointerFromBXAX                     DisplayContext_SetCharacterPointerFromBXAX
    6464%endif
    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
     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
    7272
    7373%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    74 %define GetCharacterPointerToBXAX                       DisplayContext_GetCharacterPointerToBXAX
     74    %define GetCharacterPointerToBXAX                       DisplayContext_GetCharacterPointerToBXAX
    7575%endif
    76 %define GetSoftwareCoordinatesToAX                      DisplayCursor_GetSoftwareCoordinatesToAX
    77 %define GetColumnsToALandRowsToAH                       DisplayPage_GetColumnsToALandRowsToAH
     76    %define GetSoftwareCoordinatesToAX                      DisplayCursor_GetSoftwareCoordinatesToAX
     77    %define GetColumnsToALandRowsToAH                       DisplayPage_GetColumnsToALandRowsToAH
    7878
    79 %define FormatNullTerminatedStringFromCSSI              Display_FormatNullTerminatedStringFromCSSI
     79    %define FormatNullTerminatedStringFromCSSI              Display_FormatNullTerminatedStringFromCSSI
    8080%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    81 %define PrintSignedWordFromAXWithBaseInBX               DisplayPrint_SignedWordFromAXWithBaseInBX
     81    %define PrintSignedWordFromAXWithBaseInBX               DisplayPrint_SignedWordFromAXWithBaseInBX
    8282%endif
    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
     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
    9090%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    91 %define ClearAreaWithHeightInAHandWidthInAL             DisplayPrint_ClearAreaWithHeightInAHandWidthInAL
     91    %define ClearAreaWithHeightInAHandWidthInAL             DisplayPrint_ClearAreaWithHeightInAHandWidthInAL
    9292%endif
    93 %define ClearScreenWithCharInALandAttrInAH              DisplayPrint_ClearScreenWithCharInALandAttributeInAH
     93    %define ClearScreenWithCharInALandAttrInAH              DisplayPrint_ClearScreenWithCharInALandAttributeInAH
    9494
  • trunk/Assembly_Library/Src/Display/DisplayContext.asm

    r162 r181  
    268268;       Nothing
    269269;--------------------------------------------------------------------
    270 ;%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS  ; This appears to be completely unused
    271 ;ALIGN JUMP_ALIGN
    272 ;DisplayContext_GetCharacterOutputParameterToDX:
    273 ;   mov     dx, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam]
    274 ;   ret
    275 ;%endif
     270%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG  ; This is currently unused (dead code)
     271ALIGN JUMP_ALIGN
     272DisplayContext_GetCharacterOutputParameterToDX:
     273    mov     dx, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam]
     274    ret
     275%endif
    276276
    277277
  • trunk/Assembly_Library/Src/Display/DisplayFormat.asm

    r134 r181  
    5252    dec     bp
    5353    dec     bp              ; SS:BP now points to next parameter
    54     test    cx, cx
    55     jnz     SHORT PrependOrAppendSpaces
     54    inc     cx
     55    loop    PrependOrAppendSpaces
    5656ReturnFromFormat:
    5757    ret
  • trunk/Assembly_Library/Src/Display/DisplayPrint.asm

    r162 r181  
    158158    loop    .PrintNextCharacter
    159159
    160     mov     ds, cx  ; Restore DS to BDA. Not needed unless DisplayPrint_CharacterFromAL changes DS.
     160    ;mov        ds, cx  ; Restore DS to BDA. Not needed unless DisplayPrint_CharacterFromAL changes DS.
    161161    pop     cx
    162162    pop     si
     
    304304;       DI:     Updated offset to video RAM
    305305;   Corrupts registers:
    306 ;       AX, DX
     306;       DX
    307307;--------------------------------------------------------------------
    308308ALIGN JUMP_ALIGN
Note: See TracChangeset for help on using the changeset viewer.