Changeset 55 in xtideuniversalbios


Ignore:
Timestamp:
Nov 16, 2010, 4:52:12 PM (12 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to Assembly Library:

  • Character output to buffer now checks buffer length properly.
File:
1 edited

Legend:

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

    r48 r55  
    22; Project name  :   Assembly Library
    33; Created date  :   26.6.2010
    4 ; Last update   :   8.10.2010
     4; Last update   :   24.10.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Functions for outputting characters to video memory.
     
    117117;       DS:     BDA segment (zero)
    118118;       ES:DI:  Ptr to destination string buffer
    119 ;       DISPLAY_CONTEXT.wCharOutParam:  Offset to end of buffer (one past last)
     119;       DISPLAY_CONTEXT.wCharOutParam:  Characters left in buffer
    120120;   Returns:
    121121;       ES:DI:  Updated for next character
     
    125125ALIGN JUMP_ALIGN
    126126DisplayCharOut_WriteCharacterToBuffer:
    127     cmp     di, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam]
    128     jae     SHORT .BufferFull
     127    cmp     WORD [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam], BYTE 0
     128    je      SHORT .BufferFull
    129129    stosb
     130    dec     WORD [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam]
    130131.BufferFull:
    131132    ret
Note: See TracChangeset for help on using the changeset viewer.