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

16 lines
225 B
C
Raw Permalink 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 write_mem8(int addr, int data);
void HariMain(void)
{
int i; /* 声明变量i是32位整数 */
for (i = 0xa0000; i <= 0xaffff; i++) {
write_mem8(i, i & 0x0f);
}
for (;;) {
io_hlt();
}
}