mirror of
https://github.com/yourtion/30dayMakeOS.git
synced 2026-02-03 01:53:24 +08:00
显示变量
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#include <stdio.h>
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user