From b5f993ad72d32468c4ca4ef4eab8d7193182272b Mon Sep 17 00:00:00 2001 From: Yourtion Date: Wed, 10 Sep 2014 17:59:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 05_day/bootpack.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/05_day/bootpack.c b/05_day/bootpack.c index a710223..4aef240 100644 --- a/05_day/bootpack.c +++ b/05_day/bootpack.c @@ -36,10 +36,12 @@ struct BOOTINFO { void HariMain(void) { struct BOOTINFO *binfo = (struct BOOTINFO *) 0x0ff0; - extern char hankaku[4096]; + extern char hankaku[4096];/* DB各种数据(共4096字节) */ init_palette(); init_screen(binfo->vram, binfo->scrnx, binfo->scrny); + + /* A的字符编码是0x41,所以A的字体数据,放在自“hankaku+0x41*16”开始的16字节里 */ putfont8(binfo->vram, binfo->scrnx, 8, 8, COL8_FFFFFF, hankaku + 'A' * 16); putfont8(binfo->vram, binfo->scrnx, 16, 8, COL8_FFFFFF, hankaku + 'B' * 16); putfont8(binfo->vram, binfo->scrnx, 24, 8, COL8_FFFFFF, hankaku + 'C' * 16);