Changeset 52 in xtideuniversalbios for trunk/Assembly_Library/Src/Display/CgaSnow.asm


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.

File:
1 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:
Note: See TracChangeset for help on using the changeset viewer.