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


Ignore:
Timestamp:
Oct 12, 2010, 6:51:07 PM (14 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to Assembly Library:
Completely rewritten line splitting (slower but no need to modify string).
Some changes to string processing functions.
Saved few bytes from CGA detection.

Location:
trunk/Assembly_Library/Src/Display
Files:
3 edited

Legend:

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

    r50 r52  
    22; Project name  :   Assembly Library
    33; Created date  :   8.10.2010
    4 ; Last update   :   9.10.2010
     4; Last update   :   12.10.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Functions for preventing CGA snow.
     
    2323    cmp     WORD [BDA.wVidPort], CGA_STATUS_REGISTER - OFFSET_TO_CGA_STATUS_REGISTER
    2424    jne     SHORT .CgaNotFound
    25     call    DisplayPage_GetColumnsToALandRowsToAH
    26     cmp     ah, [BDA.bVidRows]      ; Video rows stored only by EGA and later
    27     je      SHORT .CgaNotFound      ; Must be EGA or later
     25
     26    ; All standard CGA modes use 25 rows but only EGA and later store it to BDA.
     27    cmp     BYTE [BDA.bVidRows], 25
     28    jge     SHORT .CgaNotFound
    2829    stc
    2930    ret
     
    8384
    8485;--------------------------------------------------------------------
    85 ; CgaSnow_Scasb
    86 ;   Parameters:
    87 ;       AL:     Byte for comparison
    88 ;       DS:     BDA segment (zero)
    89 ;       ES:DI:  Ptr to video memory where to output
    90 ;   Returns:
    91 ;       DI:     Incremented for next character
    92 ;   Corrupts registers:
    93 ;       AX, DX
    94 ;--------------------------------------------------------------------
    95 ALIGN JUMP_ALIGN
    96 CgaSnow_Scasb:
    97     call    LoadCgaStatusRegisterAddressToDXifCgaPresent
    98     jz      SHORT .ScasbWithoutWaitSinceUnknownPort
    99 
    100     mov     ah, al
    101     cli             ; Interrupt request would mess up timing
    102     WAIT_UNTIL_SAFE_CGA_WRITE
    103     mov     al, ah
    104 .ScasbWithoutWaitSinceUnknownPort:
    105     scasb
    106     sti
    107     ret
    108 
    109 
    110 ;--------------------------------------------------------------------
    11186; CgaSnow_RepMovsb
    11287;   Parameters:
  • trunk/Assembly_Library/Src/Display/DisplayContext.asm

    r50 r52  
    22; Project name  :   Assembly Library
    33; Created date  :   25.6.2010
    4 ; Last update   :   9.10.2010
     4; Last update   :   11.10.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Functions for managing display context.
     
    119119
    120120;--------------------------------------------------------------------
    121 ; DisplayContext_PrepareOffScreenBufferInESBXtoESDI
    122 ;   Parameters:
    123 ;       BX:AX:  Ptr to off screen buffer
    124 ;   Returns:
    125 ;       Nothing
    126 ;   Corrupts registers:
    127 ;       AX
    128 ;--------------------------------------------------------------------
    129 ALIGN JUMP_ALIGN
    130 DisplayContext_PrepareOffScreenBufferInESBXtoESDI:
     121; DisplayContext_PrepareOffScreenBufferInESBXwithLengthInCX
     122;   Parameters:
     123;       CX:     Off screen buffer length in characters
     124;       ES:BX:  Ptr to off screen buffer
     125;   Returns:
     126;       Nothing
     127;   Corrupts registers:
     128;       AX, DI
     129;--------------------------------------------------------------------
     130ALIGN JUMP_ALIGN
     131DisplayContext_PrepareOffScreenBufferInESBXwithLengthInCX:
    131132    push    ds
    132133
     
    139140    mov     ax, BUFFER_OUTPUT_WITH_CHAR_ONLY
    140141    call    DisplayContext_SetCharOutputFunctionFromAXwithAttribFlagInBL
     142    mov     [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam], cx
    141143
    142144    mov     bx, di
  • trunk/Assembly_Library/Src/Display/DisplayPrint.asm

    r48 r52  
    22; Project name  :   Assembly Library
    33; Created date  :   26.6.2010
    4 ; Last update   :   27.9.2010
     4; Last update   :   11.10.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Functions for display output.
     
    326326ALIGN JUMP_ALIGN
    327327DisplayPrint_Newline:
     328    mov     al, LF
     329    call    DisplayPrint_CharacterFromAL
    328330    mov     al, CR
    329     call    DisplayPrint_CharacterFromAL
    330     mov     al, LF
    331331    ; Fall to DisplayPrint_CharacterFromAL
    332 
    333332
    334333;--------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.