#include <console.h>
#include <string.h>
#include <x86/pio.h>
#include <x86/proc_reg.h>
Defines | |
#define | CONSOLE_CELL(x, y) ((char *) CONSOLE_MEM_BASE + 2 * ((y) * CONSOLE_WIDTH + (x))) |
Functions | |
void | console_erase (int row, int col, int w, int h, int overwrite) |
Erases a part of the console. | |
void | console_scroll (unsigned lines) |
Scrolls the console. | |
void | console_backspace (unsigned distance) |
Backs up the cursor. | |
int | putbyte (char ch) |
void | putbytes (const char *s, int len) |
void | set_term_color (int color) |
void | get_term_color (int *color) |
void | crtc_set_cursor (unsigned short pos) |
Set the CRTC cursor position. | |
void | set_cursor (int row, int col) |
void | get_cursor (int *row, int *col) |
void | hide_cursor () |
void | show_cursor () |
void | clear_console () |
void | draw_char (int row, int col, int ch, int color) |
char | get_char (int row, int col) |
Variables | |
int | consoleColor = FGND_LGRAY | BGND_BLACK |
int | cursorX = 0 |
int | cursorY = 0 |
int | cursorHidden = 1 |
This driver implements the console. The console maintains its own cursor position, term color, and cursor visibility, independent of the hardware cursor, so that the cursor can be freely moved despite the actual visibility status.
|
Backs up the cursor. Move the cursor backward a specified distance and clear the characters along the way.
|
|
Erases a part of the console. Overwrites the specified screen region with the current console color.
|
|
Scrolls the console. Scroll the console down a specified number of lines and clear the new space.
|
|
Set the CRTC cursor position. Outputs the position to the CRTC cursor register.
|