#include <stdio.h> #include <conio.h> #include <signal.h> #include <bios.h> void handler(void); void main () { int x; if (signal(SIGINT,SIG_IGN) == SIG_ERR) printf("Couldn't set signal()\n\n\n"); while ((x=_bios_keybrd(_KEYBRD_READ)) != 255) { putchar(x); printf(" %d\n", (char) x); } } void handler() { printf("Ctrl-C Pressed!\n\n\n"); signal(SIGINT,handler); }