From 1b91f073c0edd4d125cf588e32a1b806f558a2ca Mon Sep 17 00:00:00 2001 From: Yourtion Date: Wed, 10 Sep 2014 18:25:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 05_day/bootpack.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/05_day/bootpack.c b/05_day/bootpack.c index 470ab0a..44c2974 100644 --- a/05_day/bootpack.c +++ b/05_day/bootpack.c @@ -1,3 +1,5 @@ +#include + void io_hlt(void); void io_cli(void); void io_out8(int port, int data); @@ -38,14 +40,18 @@ struct BOOTINFO { void HariMain(void) { struct BOOTINFO *binfo = (struct BOOTINFO *) 0x0ff0; + char s[40]; init_palette(); init_screen(binfo->vram, binfo->scrnx, binfo->scrny); - + putfonts8_asc(binfo->vram, binfo->scrnx, 8, 8, COL8_FFFFFF, "ABC 123"); putfonts8_asc(binfo->vram, binfo->scrnx, 31, 31, COL8_000000, "Haribote OS."); putfonts8_asc(binfo->vram, binfo->scrnx, 30, 30, COL8_FFFFFF, "Haribote OS."); + sprintf(s, "scrnx = %d", binfo->scrnx); + putfonts8_asc(binfo->vram, binfo->scrnx, 16, 64, COL8_FFFFFF, s); + for (;;) { io_hlt(); }