Changeset 181 in xtideuniversalbios for trunk/Configurator/Src/Libraries/print.asm


Ignore:
Timestamp:
Nov 13, 2011, 3:38:40 PM (12 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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Configurator/Src/Libraries/print.asm

    r78 r181  
    1 ; File name     :   print.asm
    21; Project name  :   Print library
    3 ; Created date  :   6.10.2009
    4 ; Last update   :   4.1.2011
    5 ; Author        :   Tomi Tilli,
    6 ;               :   Krister Nordvall (optimizations)
    72; Description   :   ASM library for character and string
    83;                   printing related functions.
     
    9590;--------------------------------------------------------------------
    9691; Debugging macro that prints wanted character and newline.
    97 ; 
     92;
    9893; PRINT_DBG_CH
    9994;   Parameters:
     
    141136;
    142137;   NOTE! Caller must clean the stack variables!
    143 ; 
     138;
    144139; Print_Format
    145140;   Parameters:
     
    341336;--------------------------------------------------------------------
    342337; Prints newline character to change line.
    343 ; 
     338;
    344339; Print_Newline
    345340;   Parameters:
     
    363358    ret
    364359%endif
    365    
     360
    366361
    367362;--------------------------------------------------------------------
    368363; Prints wanted number of characters.
    369 ; 
     364;
    370365; Print_CharBuffer
    371366;   Parameters:
     
    404399;--------------------------------------------------------------------
    405400; Repeats wanted character.
    406 ; 
     401;
    407402; Print_Repeat
    408403;   Parameters:
     
    429424;--------------------------------------------------------------------
    430425; Prints boolean value.
    431 ; 
     426;
    432427; Print_Bool
    433428;   Parameters:
     
    455450;--------------------------------------------------------------------
    456451; Prints signed or unsigned 16-bit integer.
    457 ; 
     452;
    458453; Print_IntSW   Prints signed 16-bit word
    459454; Print_IntUW   Prints unsigned 16-bit word
     
    506501    PRINT_CHAR                  ; Print character
    507502    inc     di                  ; Increment chars printed
    508     test    cx, cx              ; Characters left
    509     jnz     .PrintLoop          ;  If so, loop
     503    inc     cx                  ; Characters left
     504    loop    .PrintLoop          ;  If so, loop
    510505    mov     dx, di              ; Copy chars printed to DX
    511506    pop     cx
     
    518513;--------------------------------------------------------------------
    519514; Prints unsigned 32-bit integer.
    520 ; 
     515;
    521516; Print_IntUDW
    522517;   Parameters:
     
    552547    PRINT_CHAR                  ; Print character
    553548    inc     di                  ; Increment chars printed
    554     test    cx, cx              ; Characters left
    555     jnz     .PrintLoop          ;  If so, loop
     549    inc     cx                  ; Characters left
     550    loop    .PrintLoop          ;  If so, loop
    556551    mov     dx, di              ; Copy characters printed to DX
    557552    pop     cx
     
    565560;--------------------------------------------------------------------
    566561; Prints 8-bit byte as hexadecimal string.
    567 ; 
     562;
    568563; Print_IntHexB
    569564;   Parameters:
     
    593588;--------------------------------------------------------------------
    594589; Prints 16-bit word as hexadecimal string.
    595 ; 
     590;
    596591; Print_IntHexW
    597592;   Parameters:
     
    621616;--------------------------------------------------------------------
    622617; Prints 32-bit dword as hexadecimal string.
    623 ; 
     618;
    624619; Print_IntHexDW
    625620;   Parameters:
     
    658653;--------------------------------------------------------------------
    659654; Prints hexadecimal character for every nybble for WORD.
    660 ; 
     655;
    661656; Print_HexString
    662657;   Parameters:
Note: See TracChangeset for help on using the changeset viewer.