mirror of
https://github.com/yourtion/30dayMakeOS.git
synced 2026-02-05 19:13:21 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30c62ffbd0 |
@@ -123,6 +123,7 @@ void HariMain(void)
|
||||
tss_b.ds = 1 * 8;
|
||||
tss_b.fs = 1 * 8;
|
||||
tss_b.gs = 1 * 8;
|
||||
*((int *) 0x0fec) = (int) sht_back;
|
||||
|
||||
for (;;) {
|
||||
io_cli();
|
||||
@@ -285,16 +286,23 @@ void task_b_main(void)
|
||||
{
|
||||
struct FIFO32 fifo;
|
||||
struct TIMER *timer_ts;
|
||||
int i, fifobuf[128];
|
||||
int i, fifobuf[128], count = 0;
|
||||
char s[11];
|
||||
struct SHEET *sht_back;
|
||||
|
||||
fifo32_init(&fifo, 128, fifobuf);
|
||||
timer_ts = timer_alloc();
|
||||
timer_init(timer_ts, &fifo, 1);
|
||||
timer_settime(timer_ts, 2);
|
||||
sht_back = (struct SHEET *) *((int *) 0x0fec);
|
||||
|
||||
for (;;) {
|
||||
count++;
|
||||
sprintf(s, "%10d", count);
|
||||
putfonts8_asc_sht(sht_back, 0, 144, COL8_FFFFFF, COL8_008484, s, 10);
|
||||
io_cli();
|
||||
if (fifo32_status(&fifo) == 0) {
|
||||
io_stihlt();
|
||||
io_sti();
|
||||
} else {
|
||||
i = fifo32_get(&fifo);
|
||||
io_sti();
|
||||
|
||||
Reference in New Issue
Block a user