[vga] Fix serial background colors
This commit is contained in:
parent
0e43b3007f
commit
488d6bc8ca
@ -6,7 +6,9 @@ void halt_and_catch_fire(char * error_message, const char * file, int line) {
|
|||||||
kprintf("PANIC! %s\n", error_message);
|
kprintf("PANIC! %s\n", error_message);
|
||||||
kprintf("File: %s\n", file);
|
kprintf("File: %s\n", file);
|
||||||
kprintf("Line: %d\n", line);
|
kprintf("Line: %d\n", line);
|
||||||
__asm__ __volatile__ ("hlt");
|
while (1) {
|
||||||
|
__asm__ __volatile__ ("hlt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void assert_failed(const char *file, uint32_t line, const char *desc) {
|
void assert_failed(const char *file, uint32_t line, const char *desc) {
|
||||||
@ -15,5 +17,7 @@ void assert_failed(const char *file, uint32_t line, const char *desc) {
|
|||||||
kprintf("ASSERTION FAILED! %s\n", desc);
|
kprintf("ASSERTION FAILED! %s\n", desc);
|
||||||
kprintf("File: %s\n", file);
|
kprintf("File: %s\n", file);
|
||||||
kprintf("Line: %d\n", line);
|
kprintf("Line: %d\n", line);
|
||||||
__asm__ __volatile__ ("hlt");
|
while (1) {
|
||||||
|
__asm__ __volatile__ ("hlt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
/*
|
||||||
|
* vim:tabstop=4
|
||||||
|
* vim:noexpandtab
|
||||||
|
*/
|
||||||
#include <system.h>
|
#include <system.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -228,6 +232,13 @@ settextcolor(
|
|||||||
serial_send('[');
|
serial_send('[');
|
||||||
serial_send('3');
|
serial_send('3');
|
||||||
serial_send(forecolor % 8 + '0');
|
serial_send(forecolor % 8 + '0');
|
||||||
|
serial_send(';');
|
||||||
|
serial_send('4');
|
||||||
|
serial_send(backcolor % 8 + '0');
|
||||||
|
if (forecolor > 7) {
|
||||||
|
serial_send(';');
|
||||||
|
serial_send('1');
|
||||||
|
}
|
||||||
serial_send('m');
|
serial_send('m');
|
||||||
}
|
}
|
||||||
bochs_set_colors(forecolor, backcolor);
|
bochs_set_colors(forecolor, backcolor);
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
/*
|
||||||
|
* vim:tabstop=4
|
||||||
|
* vim:noexpandtab
|
||||||
|
*/
|
||||||
/* This is the default VGA 8 x 12 font */
|
/* This is the default VGA 8 x 12 font */
|
||||||
#include <system.h>
|
#include <system.h>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user