So kbhit() can detect arrows?
Also, my compiler is going nuts when I use your code, I'm no good with the (dos.h) library :/. (Borland c++ compiler.)
My Code: (Noob to dos)
Code:
#include <dos.h>
void getkey();
int main() {
return 0;
}
void getkey() {
union REGS i,o;
while(!kbhit());
i.h.ah=0;
int86(22,&i,&o);
return(o.h.ah);
}
Errors:
Code:
Error E2450 C:\Burn.cpp 10: Undefined structure 'REGS' in function getkey()
Error E2449 C:\Burn.cpp 10: Size of 'i' is unknown or zero in function getkey()
Error E2450 C:\Burn.cpp 10: Undefined structure 'REGS' in function getkey()
Error E2450 C:\Burn.cpp 10: Undefined structure 'REGS' in function getkey()
Error E2449 C:\Burn.cpp 10: Size of 'o' is unknown or zero in function getkey()
Error E2450 C:\Burn.cpp 10: Undefined structure 'REGS' in function getkey()
Error E2268 C:\Burn.cpp 11: Call to undefined function 'kbhit' in function getke
y()
Error E2315 C:\Burn.cpp 12: 'h' is not a member of 'REGS', because the type is n
ot yet defined in function getkey()
Error E2268 C:\Burn.cpp 13: Call to undefined function 'int86' in function getke
y()
Error E2315 C:\Burn.cpp 14: 'h' is not a member of 'REGS', because the type is n
ot yet defined in function getkey()
Error E2467 C:\Burn.cpp 14: 'getkey()' cannot return a value in function getkey(
)
*** 11 errors in Compile ***