Text Output Functions
From Archaic Pixels
Contents
Text Output Functions
All the text output functions have two forms, one where you directly specifying 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
void put_digit(char digit, int vaddr); |
---|
void 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
void put_char(char c, int vaddr); |
---|
void put_char(char c, char x, char y); |
Output an ASCII character. |
put_raw
void put_raw(int bat_val, int vaddr); |
---|
void put_raw(int bat_val, char x, char y); |
Output a raw bat-value. |
put_number
void put_number(int number, char width, int vaddr); |
---|
void 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
void put_hex(int number, char width, int vaddr); |
---|
void put_hex(int number, char width, char x, char y); |
Output an hexadecimal number. |
put_string
void put_string(char *string, int vaddr); |
---|
void put_string(char *string, char x, char y); |
Output a null terminated ASCII string. |