mirror of
https://github.com/yourtion/30dayMakeOS.git
synced 2026-02-05 02:53:19 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d4706d26c | ||
|
|
94fa9878d6 |
@@ -26,22 +26,18 @@ void init_screen(char *vram, int x, int y);
|
||||
#define COL8_008484 14
|
||||
#define COL8_848484 15
|
||||
|
||||
struct BOOTINFO {
|
||||
char cyls, leds, vmode, reserve;
|
||||
short scrnx, scrny;
|
||||
char *vram;
|
||||
};
|
||||
|
||||
void HariMain(void)
|
||||
{
|
||||
char *vram;/* 声明变量vram、用于BYTE [...]地址 */
|
||||
int xsize, ysize;
|
||||
short *binfo_scrnx, *binfo_scrny;
|
||||
int *binfo_vram;
|
||||
struct BOOTINFO *binfo = (struct BOOTINFO *) 0x0ff0;
|
||||
|
||||
init_palette();
|
||||
binfo_scrnx = (short *) 0x0ff4;
|
||||
binfo_scrny = (short *) 0x0ff6;
|
||||
binfo_vram = (int *) 0x0ff8;
|
||||
xsize = *binfo_scrnx;
|
||||
ysize = *binfo_scrny;
|
||||
vram = (char *) *binfo_vram;
|
||||
|
||||
init_screen(vram, xsize, ysize);
|
||||
init_screen(binfo->vram, binfo->scrnx, binfo->scrny);
|
||||
|
||||
for (;;) {
|
||||
io_hlt();
|
||||
|
||||
Reference in New Issue
Block a user