char * key_table_name[NUM_KEYS] = {"UP","DOWN","LEFT","RIGHT" }; int key_scan_code; // 键盘扫描码 int key_table[NUM_KEYS]; // 按键表
class INTERRUPT {// 定义中断类 int INT; void far interrupt ( *Old_Int)(__CPPARGS); public: void BEGIN_INT(int Int,void far interrupt(*New_Int)(__CPPARGS)); void END_INT(void); };
void INTERRUPT::BEGIN_INT(int Int,void far interrupt(*New_Int)(__CPPARGS)) {// 开始自定义中断处理 INT = Int; Old_Int = getvect(INT); setvect(INT,New_Int); }