VGA Text Display Library
v0.85
Display text on a VGA monitor
|
Displays text on a VGA monitor. More...
Functions | |
INLINE__ int32_t | Rotl__ (uint32_t a, uint32_t b) |
INLINE__ int32_t | Rotr__ (uint32_t a, uint32_t b) |
INLINE__ int32_t | Shr__ (uint32_t a, uint32_t b) |
INLINE__ int32_t | Between__ (int32_t x, int32_t a, int32_t b) |
INLINE__ int32_t | Lookup__ (int32_t x, int32_t b, int32_t a[], int32_t n) |
int32_t | vga_text_start (int32_t Basepin) |
Start the VGA text display. More... | |
int32_t | vga_text_stop (void) |
Stop the VGA display and free up a cog. | |
int32_t | vga_text_str (char *Stringptr) |
Display a string. More... | |
int32_t | vga_text_dec (int32_t Value) |
Display a value as decimal text. More... | |
int32_t | vga_text_hex (int32_t Value, int32_t Digits) |
Display a value as hexadecimal text. More... | |
int32_t | vga_text_bin (int32_t Value, int32_t Digits) |
Display a value as binary text. More... | |
int32_t | vga_text_out (int32_t C) |
Display a character. More... | |
int32_t | vga_text_setcolors (int32_t Colorptr) |
Override color palette. More... | |
Displays text on a VGA monitor.
int32_t vga_text_bin | ( | int32_t | Value, |
int32_t | Digits | ||
) |
Display a value as binary text.
Value | The value to display. |
Digits | The number of digits to display. |
int32_t vga_text_dec | ( | int32_t | Value) |
Display a value as decimal text.
Value | The value to display. |
int32_t vga_text_hex | ( | int32_t | Value, |
int32_t | Digits | ||
) |
Display a value as hexadecimal text.
Value | The value to display. |
Digits | The number of digits to display |
int32_t vga_text_out | ( | int32_t | C) |
Display a character.
C | Character to print. This could be a printable character like 'a', 'b', 'Z', '&', '~', or non-printable control characters |
Non-Printable Control Characters (with simpletools constants when they match.)
CLS = 0 HOME = 1 BKSPC = 8 10 (next character should be a position number) 11 (next character should be a position number) 12 set color (color pointer value follows) CR = 13
int32_t vga_text_setcolors | ( | int32_t | Colorptr) |
Override color palette.
Colorptr | Points to a list of up to 8 colors. |
Each color is two bytes: foreground, background. Red, green and blue can each be values from 0 to 3. char foreground = (red << 4) | (green << 2) | blue Example: If you want the foreground to have a red value of 2, a green value of 1 and a blue value of 3, use char foreground = (2 << 4) | (1 << 2) | 3
int32_t vga_text_start | ( | int32_t | Basepin) |
Start the VGA text display.
Basepin | pin connected to VGA's V (vertical sync) input. Must be P0, P8, P16, or P24. Counting upward from this pin, the connections are: H, B0, B1, G0, G1, R0, R1. Example: if the Basepin is set to 8, P8 is connected to H, P9 to V, P10 to B0, and so on, up through P15 to R1. |
int32_t vga_text_str | ( | char * | Stringptr) |
Display a string.
Stringptr | A pointer to a text string. |