diff --git a/13_day/bootpack.c b/13_day/bootpack.c index 4a39b35..837bffb 100644 --- a/13_day/bootpack.c +++ b/13_day/bootpack.c @@ -12,7 +12,7 @@ void HariMain(void) struct FIFO8 timerfifo, timerfifo2, timerfifo3; char s[40], keybuf[32], mousebuf[128], timerbuf[8], timerbuf2[8], timerbuf3[8]; struct TIMER *timer, *timer2, *timer3; - int mx, my, i, count = 0; + int mx, my, i; unsigned int memtotal; struct MOUSE_DEC mdec; struct MEMMAN *memman = (struct MEMMAN *) MEMMAN_ADDR; @@ -75,7 +75,8 @@ void HariMain(void) putfonts8_asc_sht(sht_back, 0, 32, COL8_FFFFFF, COL8_008484, s, 40); for (;;) { - count++; + sprintf(s, "%010d", timerctl.count); + putfonts8_asc_sht(sht_win, 40, 28, COL8_000000, COL8_C6C6C6, s, 10); io_cli(); if (fifo8_status(&keyfifo) + fifo8_status(&mousefifo) + fifo8_status(&timerfifo) == 0) { @@ -126,10 +127,7 @@ void HariMain(void) io_sti(); if (i == 10) { putfonts8_asc_sht(sht_back, 0, 64, COL8_FFFFFF, COL8_008484, "10[sec]", 7); - sprintf(s, "%010d", count); - putfonts8_asc_sht(sht_win, 40, 28, COL8_000000, COL8_C6C6C6, s, 10); } else if (i == 3) { - count = 0; /* 开始测定 */ putfonts8_asc_sht(sht_back, 0, 80, COL8_FFFFFF, COL8_008484, "3[sec]", 6); } else { /* 0还是1 */