上QQ阅读APP看书,第一时间看更新
8 今天的成果(harib01h)
我们已经努力到现在了,再加最后一把劲儿。这次我们只修改HariMain程序。让我们看看执行结果会是什么样呢?
本次的HariMain
void HariMain(void) { char *vram; int xsize, ysize; init_palette(); vram = (char *) 0xa0000; xsize = 320; ysize = 200; boxfill8(vram, xsize, COL8_008484, 0, 0, xsize - 1, ysize -29); boxfill8(vram, xsize, COL8_C6C6C6, 0, ysize -28, xsize - 1, ysize -28); boxfill8(vram, xsize, COL8_FFFFFF, 0, ysize -27, xsize - 1, ysize -27); boxfill8(vram, xsize, COL8_C6C6C6, 0, ysize -26, xsize - 1, ysize - 1); boxfill8(vram, xsize, COL8_FFFFFF, 3, ysize -24, 59, ysize -24); boxfill8(vram, xsize, COL8_FFFFFF, 2, ysize -24, 2, ysize - 4); boxfill8(vram, xsize, COL8_848484, 3, ysize - 4, 59, ysize - 4); boxfill8(vram, xsize, COL8_848484, 59, ysize -23, 59, ysize - 5); boxfill8(vram, xsize, COL8_000000, 2, ysize - 3, 59, ysize - 3); boxfill8(vram, xsize, COL8_000000, 60, ysize -24, 60, ysize - 3); boxfill8(vram, xsize, COL8_848484, xsize -47, ysize -24, xsize - 4, ysize -24); boxfill8(vram, xsize, COL8_848484, xsize -47, ysize -23, xsize -47, ysize - 4); boxfill8(vram, xsize, COL8_FFFFFF, xsize -47, ysize - 3, xsize - 4, ysize - 3); boxfill8(vram, xsize, COL8_FFFFFF, xsize - 3, ysize -24, xsize - 3, ysize - 3); for (; ; ) { io_hlt(); } }
任务条(task bar)有点大了,这是因为像素数太少的缘故吧。但很有进步,已经有点操作系统的样子了。总算到了这一步。从什么都不会开始,到现在只用了四天。嗯,干得不错嘛。现在的haribote.sys是1216字节,大概是1.2KB吧。虽然这个操作系统很小,但已经有这么多功能了。好,今天先到此为止,明天再见啦。