Text Output Functions

From Archaic Pixels
Revision as of 00:56, 13 September 2010 by Gravis (Talk | contribs) (Created page with "** TEXT OUTPUT FUNCTIONS ** --------------------------- All the text output functions have two forms, one where you directly specify the video memory address, an...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
    • TEXT OUTPUT FUNCTIONS **


     All the text output functions have two forms, one where
     you directly specify the video memory address, and another
     one where you specify x/y coordinates (in character unit).
     The second form is a bit slower but more user-friendly.


 put_digit(char digit, int vaddr);
 put_digit(char digit, char x, char y);


     Output a digit character '0'-'9' given its numeric
     value. Hexa digits ('A'-'F') are also supported,
     a value of 10 will output 'A', a value of 11 will
     output 'B', and so on...


 put_char(char c, int vaddr);
 put_char(char c, char x, char y);


     Output an ASCII character.


 put_raw(int bat_val, int vaddr);
 put_raw(int bat_val, char x, char y);


     Output a raw bat-value.


 put_number(int number, char width, int vaddr);
 put_number(int number, char width, char x, char y);


     Output a signed number. The 'width' argument is used
     to format the number. As much as 'width' digit(s)
     will be displayed. If the number has less than 'width'
     digit(s), blank spaces will be added at its left.
     If the number is negative, a '-' sign is added.


 put_hex(int number, char width, int vaddr);
 put_hex(int number, char width, char x, char y);


     Output an hexa number.


 put_string(char *string, int vaddr);
 put_string(char *string, char x, char y);


     Output a null terminated ASCII string.