?? handle.c
字號:
#include <dos.h>
#include <process.h>
#include <def.inc>
#include <func.inc>
#include <menufunc.inc>
#define IGNORE 0
#define RETRY 1
#define ABORT 2
static char *infor[14] =
{ "A驅動器錯誤:目標盤已被寫保護!",
"A驅動器錯誤:非法的驅動器指定!",
"A驅動器錯誤:驅動器未準備好!",
"軟件錯誤:錯誤的設備驅動命令!",
"A驅動器錯誤:磁盤數據校驗錯誤!",
"軟件錯誤:設備驅動命令格式錯誤!",
"A驅動器錯誤:磁盤尋道錯誤!",
"A驅動器錯誤:未知的磁盤介質!",
"A驅動器錯誤:扇區未找到!",
"打印機錯誤:打印機無紙!",
"A驅動器錯誤:一般性寫錯誤!",
"A驅動器錯誤:一般性讀錯誤!",
"A驅動器錯誤:一般性磁盤錯誤!",
"軟件內部錯誤:建議重新啟動計算機!"
};
static UC *item[3] =
{
" 重試 ",
" 忽略 ",
" 返回 "
};
extern UC Cursor_on;
int handler(int Err_code, int keep_ax, int keep_bp, int keep_si)
{
static old_cursor_stat;
UC drive;
UC answer;
Err_code &= 0x00ff;
if (Err_code>0x0C)
Err_code = 0x0D;
if ( keep_ax>0 )
{
drive = keep_ax&0x00FF;
switch(Err_code)
{
case 3:
case 5:
case 9:
case 13:
break;
default:
infor[Err_code][1] = drive+193;
}
}
old_cursor_stat = Cursor_on;
cursor_off();
flash_pause();
set_bell(950, 4);
answer = t_menu(3, infor[Err_code], item);
reset_bell();
flash_continue();
if (old_cursor_stat==TRUE)
cursor_on();
switch(answer)
{
case 1:
hardresume(RETRY);
case 2:
hardresume(IGNORE);
default:
hardretn(-1);
}
return 1; /*This is added by Yu WeiHua to avoid compiling error.*/
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -