mirror of
https://github.com/yourtion/30dayMakeOS.git
synced 2026-05-11 10:35:59 +08:00
bug fix
This commit is contained in:
@@ -429,18 +429,6 @@ int *hrb_api(int edi, int esi, int ebp, int esp, int ebx, int edx, int ecx, int
|
|||||||
timer_settime((struct TIMER *) ebx, eax);
|
timer_settime((struct TIMER *) ebx, eax);
|
||||||
} else if (edx == 19) {
|
} else if (edx == 19) {
|
||||||
timer_free((struct TIMER *) ebx);
|
timer_free((struct TIMER *) ebx);
|
||||||
} else if (edx == 20) {
|
|
||||||
if (eax == 0) {
|
|
||||||
i = io_in8(0x61);
|
|
||||||
io_out8(0x61, i & 0x0d);
|
|
||||||
} else {
|
|
||||||
i = 1193180000 / eax;
|
|
||||||
io_out8(0x43, 0xb6);
|
|
||||||
io_out8(0x42, i & 0xff);
|
|
||||||
io_out8(0x42, i >> 8);
|
|
||||||
i = io_in8(0x61);
|
|
||||||
io_out8(0x61, (i | 0x03) & 0x0f);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -429,6 +429,18 @@ int *hrb_api(int edi, int esi, int ebp, int esp, int ebx, int edx, int ecx, int
|
|||||||
timer_settime((struct TIMER *) ebx, eax);
|
timer_settime((struct TIMER *) ebx, eax);
|
||||||
} else if (edx == 19) {
|
} else if (edx == 19) {
|
||||||
timer_free((struct TIMER *) ebx);
|
timer_free((struct TIMER *) ebx);
|
||||||
|
} else if (edx == 20) {
|
||||||
|
if (eax == 0) {
|
||||||
|
i = io_in8(0x61);
|
||||||
|
io_out8(0x61, i & 0x0d);
|
||||||
|
} else {
|
||||||
|
i = 1193180000 / eax;
|
||||||
|
io_out8(0x43, 0xb6);
|
||||||
|
io_out8(0x42, i & 0xff);
|
||||||
|
io_out8(0x42, i >> 8);
|
||||||
|
i = io_in8(0x61);
|
||||||
|
io_out8(0x61, (i | 0x03) & 0x0f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user