1 /*
\83^
\83C
\83}
\8aÖ
\8cW */
9 #define PIT_CTRL 0x0043
10 #define PIT_CNT0 0x0040
16 io_out8(PIT_CTRL, 0x34);
18 //0x04A9
\82Å
\96ñ1ms
\82É
\88ê
\89ñint0x20
\82ª
\94
\8ds
\82³
\82ê
\82é
19 //
\82ªqemu
\82Å
\82Í10ms
\88È
\89º
\82Ì
\8eü
\8aú
\82É
\90Ý
\92è
\82Å
\82«
\82È
\82¢
\82ç
\82µ
\82¢
20 io_out8(PIT_CNT0, 0xA9);
21 io_out8(PIT_CNT0, 0x04);
22 //io_out8(PIT_CNT0, 0x0);
23 //io_out8(PIT_CNT0, 0x0);
25 timerctl.subcount = 0;
29 extern "C" void inthandler20(int *esp)
31 io_out8(PIC0_OCW2, 0x60); /* IRQ-00
\8eó
\95t
\8a®
\97¹
\82ðPIC
\82É
\92Ê
\92m */
33 if(timerctl.subcount >= 55){
34 timerctl.subcount = 0;
36 //Screen::Inst().printf("t, %d\n", timerctl.count);
38 if(timerctl.count == 50){
40 asm("str [eax]": :"a"(&tr));
41 Screen::Inst().printf("test, %d\n", tr);
42 ThreadMan::Inst().SwitchThread();
48 unsigned long long timer_getbiostimer(){
49 return timerctl.count;//
\96ñ55sm
\82²
\82Æ
\82É
\91\9d\82â
\82¹
\82Î
\82æ
\82¢