|
@@ -29,7 +29,7 @@ int printk_init(const int char_size_x, const int char_size_y)
|
|
|
{
|
|
|
struct multiboot_tag_framebuffer_info_t info;
|
|
|
int reserved;
|
|
|
-
|
|
|
+
|
|
|
multiboot2_iter(multiboot2_get_Framebuffer_info, &info, &reserved);
|
|
|
|
|
|
pos.width = info.framebuffer_width;
|
|
@@ -112,16 +112,20 @@ void auto_newline()
|
|
|
* @brief 超过每行最大字符数,自动换行
|
|
|
*
|
|
|
*/
|
|
|
-
|
|
|
+
|
|
|
if (pos.x > pos.max_x)
|
|
|
{
|
|
|
- uart_send(COM1, '\n');
|
|
|
+#ifdef DEBUG
|
|
|
+ uart_send(COM1, '\n');
|
|
|
+#endif
|
|
|
pos.x = 0;
|
|
|
++pos.y;
|
|
|
}
|
|
|
if (pos.y > pos.max_y)
|
|
|
{
|
|
|
+#ifdef DEBUG
|
|
|
uart_send(COM1, '\n');
|
|
|
+#endif
|
|
|
pos.y = pos.max_y;
|
|
|
int lines_to_scroll = 1;
|
|
|
scroll(true, lines_to_scroll * pos.char_size_y, false);
|
|
@@ -630,8 +634,10 @@ static void putchar(uint *fb, int Xsize, int x, int y, unsigned int FRcolor, uns
|
|
|
* @param BKcolor 背景颜色
|
|
|
* @param font 字符的bitmap
|
|
|
*/
|
|
|
-
|
|
|
+
|
|
|
+#ifdef DEBUG
|
|
|
uart_send(COM1, font);
|
|
|
+#endif
|
|
|
|
|
|
unsigned char *font_ptr = font_ascii[font];
|
|
|
unsigned int *addr;
|