7 #include <native/task.h>
8 #include <native/timer.h>
9 #include <native/intr.h>
20 rt_intr_create(&intr
, "lpt1 handler", LPT1IRQ
, 0);
23 rt_intr_wait(&intr
, TM_INFINITE
);
24 outb(inb(0x378) & 0xFE, 0x378);
25 outb(inb(0x378) | 0x01, 0x378);
29 int main(int argc
, char* argv
[])
31 rt_print_auto_init(1);
32 mlockall(MCL_CURRENT
| MCL_FUTURE
);
35 outb(inb(0x37A) | 0x10, 0x37A);
37 outb(inb(0x378) | 0x01, 0x378);
39 rt_task_create(&task
, "task", 0, 50, 0);
40 rt_task_start(&task
, &taskf
, 0);
42 rt_printf("CRTL+C to quit\n");