Mail Archives: djgpp/1992/03/26/12:19:44
Maybe this helps you:
Remember that Int 0x16 returns ZF=(0|1) depending on the keyboard buffer
status, so don't use bioskey that way, maybe this works:
int readkey()
{
union REGS in, out;
in.h.ah = 0;
in.h.al = 0;
int86(0x16,&in,&out);
return out.h.al;
}
int kbhit ()
{
union REGS in, out;
in.h.ah = 1;
in.h.al = 0;
int86(0x16,&in,&out);
return out.flags.zero.flag == 0;
}
if (kbhit())
if (readkey() == CONTROL_Q)
abort_eval(2);
Hope this works.
Miguel de Icaza
Universidad Nacional Autonoma de Mexico
- Raw text -