CS318 - Pintos
Pintos source browser for JHU CS318 course
|
Go to the documentation of this file.
22 #define GRAY_ON_BLACK 0x07
30 static void cls (
void);
153 outw (0x3d4, 0x0e | (cp & 0xff00));
154 outw (0x3d4, 0x0f | (cp << 8));
165 cp =
inb (0x3d5) << 8;
static void find_cursor(size_t *x, size_t *y)
Reads the current hardware cursor position into (*X,*Y).
#define COL_CNT
VGA text screen support.
static void cls(void)
Clears the screen and moves the cursor to the upper left.
intr_level
Interrupts on or off?
#define GRAY_ON_BLACK
Attribute value for gray text on a black background.
static size_t cx
Current cursor position.
enum intr_level intr_set_level(enum intr_level level)
Enables or disables interrupts as specified by LEVEL and returns the previous interrupt status.
static void * ptov(uintptr_t paddr)
Returns kernel virtual address at which physical address PADDR is mapped.
unsigned short int uint16_t
void speaker_beep(void)
Briefly beep the PC speaker.
static void move_cursor(void)
Moves the hardware cursor to (cx,cy).
static void init(void)
Initializes the VGA text display.
void * memmove(void *dst_, const void *src_, size_t size)
Copies SIZE bytes from SRC to DST, which are allowed to overlap.
static void newline(void)
Advances the cursor to the first column in the next line on the screen.
static void outw(uint16_t port, uint16_t data)
Writes the 16-bit DATA to PORT.
enum intr_level intr_disable(void)
Disables interrupts and returns the previous interrupt status.
static char x
Verifies that mapping over the data segment is disallowed.
static void outb(uint16_t port, uint8_t data)
Writes byte DATA to PORT.
void vga_putc(int c)
Writes C to the VGA text display, interpreting control characters in the conventional ways.
#define ROUND_UP(X, STEP)
Yields X rounded up to the nearest multiple of STEP.
static bool inited
Already initialized?
static uint8_t(* fb)[COL_CNT][2]
Framebuffer.
static void clear_row(size_t y)
Clears row Y to spaces.
static uint8_t inb(uint16_t port)
Reads and returns a byte from PORT.