Remove magic numbers
This commit is contained in:
parent
b50b32afa9
commit
a652bbb05e
@ -23,10 +23,10 @@ void vga_init()
|
|||||||
|
|
||||||
void movecursor()
|
void movecursor()
|
||||||
{
|
{
|
||||||
outb(0x3D4, 0x0F);
|
outb(VGA_ADDRESS_PORT, VGA_REGISTER_CURSOR_POS_LOW);
|
||||||
outb(0x3D5, (uint8_t)(cursor & 0xFF));
|
outb(VGA_DATA_PORT, (uint8_t)(cursor & 0xFF));
|
||||||
outb(0x3D4, 0x0E);
|
outb(VGA_ADDRESS_PORT, VGA_REGISTER_CURSOR_POS_HIGH);
|
||||||
outb(0x3D5, (uint8_t)((cursor >> 8) & 0xFF));
|
outb(VGA_DATA_PORT, (uint8_t)((cursor >> 8) & 0xFF));
|
||||||
}
|
}
|
||||||
|
|
||||||
void flush()
|
void flush()
|
||||||
|
@ -12,3 +12,8 @@
|
|||||||
|
|
||||||
void vga_init();
|
void vga_init();
|
||||||
void vga_write(char c);
|
void vga_write(char c);
|
||||||
|
|
||||||
|
#define VGA_ADDRESS_PORT 0x3D4
|
||||||
|
#define VGA_DATA_PORT 0x3D5
|
||||||
|
#define VGA_REGISTER_CURSOR_POS_LOW 0xF
|
||||||
|
#define VGA_REGISTER_CURSOR_POS_HIGH 0xE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user