📄 traps.c
字号:
/***********************************************************************/
/* This file is part of the C166 Compiler package */
/* Copyright KEIL ELEKTRONIK GmbH 1996-1999 */
/***********************************************************************/
/* */
/* TRAPS.C: TRAP Handler for 166/167 hardware traps */
/* */
/* To translate this file use C166 with the following invocation: */
/* */
/* C166 TRAPS.C */
/* */
/* To link the modified TRAPS.OBJ file to your application use the */
/* following L166 invocation: */
/* */
/* L166 <your object file list>, TRAPS.OBJ <controls> */
/* */
/***********************************************************************/
/*
* Non-Maskable Interrupt
*/
#ifndef MONITOR // NMI is used by Monitor-166
void NMI_trap (void) interrupt 0x02 {
/* add your code here */
while (1); /* end-less loop */
}
#endif
/*
* Stack Overflow Interrupt
*/
void STKOF_trap (void) interrupt 0x04 {
/* add your code here */
while (1); /* end-less loop */
}
/*
* Stack Underflow Interrupt
*/
void STKUF_trap (void) interrupt 0x06 {
/* add your code here */
while (1); /* end-less loop */
}
/*
* Class B Hardware Trap:
* -> Undefined Opcode
* -> Protected Instruction Fault
* -> Illegal Word Operand Access
* -> Illegal Instruction Access
* -> Illegal External Bus Access
*/
void Class_B_trap (void) interrupt 0x0A {
/* add your code here */
while (1); /* end-less loop */
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -