Some old programs will spin on a clock/keyboard call with irqs
disabled. They assume the BIOS will enable irqs and allow key events
and clock events to occur.
So, enable irqs in those functions that a caller might "spin" on.
static void
handle_1a00(struct bregs *regs)
{
+ yield();
u32 ticks = GET_BDA(timer_counter);
regs->cx = ticks >> 16;
regs->dx = ticks;
static void
dequeue_key(struct bregs *regs, int incr, int extended)
{
+ yield();
u16 buffer_head;
u16 buffer_tail;
for (;;) {
static void
handle_1602(struct bregs *regs)
{
+ yield();
regs->al = GET_BDA(kbd_flag0);
}
static void
handle_1612(struct bregs *regs)
{
+ yield();
regs->al = GET_BDA(kbd_flag0);
regs->ah = ((GET_BDA(kbd_flag1) & ~(KF2_RCTRL|KF2_RALT))
| (GET_BDA(kbd_flag2) & (KF2_RCTRL|KF2_RALT)));