errors.c
来自「COP8 CPU的一个解释型BASIC源码」· C语言 代码 · 共 39 行
C
39 行
////////////////////////////////////////////////////////////////
//
// S C R I P T H E R M
// A SCRIPTABLE THERMOMETER
//
// entry of the National Semiconductor COP8FLASH Design Contest
// submitted by Alberto Ricci Bitti (C) 2001
// a.riccibitti@ra.nettuno.it
//
//--------------------------------------------------------------
// FOR A BETTER VIEW SET TAB SIZE=4, INDENT SIZE=4
//--------------------------------------------------------------
// FILE : errors.c
// PURPOSE: prints error message and aborts current task
// using a setjmp
// See also the #defines in error.h
//
////////////////////////////////////////////////////////////////
#include <setjmp.h>
#include "memory.h"
#include "lcd.h"
#include "errors.h"
extern jmp_buf error_mark;
char __cptr *error_messages[] = error_messages_initilializer;
#include "tokenizer.h"
// prints the error and restarts system
void syntax_error(type_error error)
{
LCD_puts("\nERROR: ");
LCD_puts( error_messages[error] );
longjmp(error_mark, 1);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?