Files
30dayMakeOS/04_day/bootpack.c
2014-09-10 15:56:47 +08:00

18 lines
278 B
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
void io_hlt(void);
void HariMain(void)
{
int i; /* 声明变量ii是32位整数 */
char *p; /* 声明变量p、用于BYTE [...]地址 */
p = (char *) 0xa0000; /* 地址变量赋值 */
for (i = 0; i <= 0xffff; i++) {
p[i] = i & 0x0f;
}
for (;;) {
io_hlt();
}
}