Changeset 47 in xtideuniversalbios for trunk/Assembly_Library/Src/Display/DisplayCharOut.asm


Ignore:
Timestamp:
Oct 4, 2010, 7:22:40 PM (14 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Assembly Library:
CGA snow prevention now works when copying strings on formatted printing.

File:
1 edited

Legend:

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

    r44 r47  
    22; Project name  :   Assembly Library
    33; Created date  :   26.6.2010
    4 ; Last update   :   22.9.2010
     4; Last update   :   4.10.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Functions for outputting characters to video memory.
     
    169169;       DX:     CGA Status Register Address (3DAh)
    170170;   Returns:
    171 ;       Interrupts disabled
     171;       Nothing
    172172;   Corrupts registers:
    173173;       AL
    174174;--------------------------------------------------------------------
    175175%macro WAIT_UNTIL_SAFE_CGA_WRITE 0
    176     cli             ; Interrupt request would mess up timing
    177176%%WaitUntilNotInRetrace:
    178177    in      al, dx
     
    201200ALIGN JUMP_ALIGN
    202201StosbWithoutCgaSnow:
    203     call    LoadAndVerifyStatusRegisterFromBDA
     202    call    DisplayCharOut_LoadAndVerifyStatusRegisterFromBDA
    204203    jne     SHORT .StosbWithoutWaitSinceUnknownPort
    205204
    206205    mov     ah, al
     206    cli             ; Interrupt request would mess up timing
    207207    WAIT_UNTIL_SAFE_CGA_WRITE
    208208    mov     al, ah
     209.StosbWithoutWaitSinceUnknownPort:
    209210    stosb
    210211    sti
    211212    ret
    212 ALIGN JUMP_ALIGN
    213 .StosbWithoutWaitSinceUnknownPort:
    214     stosb
    215     ret
    216213
    217214ALIGN JUMP_ALIGN
    218215StoswWithoutCgaSnow:
    219     call    LoadAndVerifyStatusRegisterFromBDA
     216    push    bx
     217    call    DisplayCharOut_LoadAndVerifyStatusRegisterFromBDA
    220218    jne     SHORT .StoswWithoutWaitSinceUnknownPort
    221219
    222     push    bx
    223220    xchg    bx, ax
     221    cli             ; Interrupt request would mess up timing
    224222    WAIT_UNTIL_SAFE_CGA_WRITE
    225223    xchg    ax, bx
     224.StoswWithoutWaitSinceUnknownPort:
    226225    stosw
    227226    pop     bx
    228227    sti
    229228    ret
    230 ALIGN JUMP_ALIGN
    231 .StoswWithoutWaitSinceUnknownPort:
    232     stosw
    233     ret
    234 
    235 ;--------------------------------------------------------------------
    236 ; LoadAndVerifyStatusRegisterFromBDA
     229
     230
     231;--------------------------------------------------------------------
     232; DisplayCharOut_LoadAndVerifyStatusRegisterFromBDA
    237233;   Parameters:
    238234;       DS:     BDA segment (zero)
     
    244240;--------------------------------------------------------------------
    245241ALIGN JUMP_ALIGN
    246 LoadAndVerifyStatusRegisterFromBDA:
     242DisplayCharOut_LoadAndVerifyStatusRegisterFromBDA:
    247243    mov     dx, [BDA.wVidPort]
    248244    add     dl, OFFSET_TO_CGA_STATUS_REGISTER
Note: See TracChangeset for help on using the changeset viewer.