mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-16 08:04:37 +00:00
Print error messages to stderr, redirect debug messages to file
This commit is contained in:
parent
1cc877717a
commit
1ef4cfc25d
2
common.c
2
common.c
@ -13,7 +13,7 @@
|
||||
/* Error - Print Input File name & position and exit */
|
||||
void exterr(int errnum)
|
||||
{
|
||||
printf("Line %d Column %d of File %s\n", curlin, curcol, inpnam);
|
||||
fprintf(stderr, "Line %d Column %d of File %s\n", curlin, curcol, inpnam);
|
||||
exit(errnum);
|
||||
}
|
||||
|
||||
|
2
common.h
2
common.h
@ -35,7 +35,7 @@
|
||||
|
||||
#define DEBUG(fmt, val) if (debug) {prtpos(); printf(fmt, val);}
|
||||
#define DETAIL(fmt, val) if (debug) {printf(fmt, val);}
|
||||
#define ERROR(fmt, val, err) if (debug) {printf(fmt, val);exterr(err);}
|
||||
#define ERROR(fmt, val, err) if (debug) {fprintf(stderr, fmt, val);exterr(err);}
|
||||
#define SCMNT(str) if (gencmt) {setcmt(str);}
|
||||
#define ACMNT(str) if (gencmt) {addcmt(str);}
|
||||
#define CCMNT(chr) if (gencmt) {chrcmt(chr);}
|
||||
|
5
py65/c02.bat
Normal file
5
py65/c02.bat
Normal file
@ -0,0 +1,5 @@
|
||||
@ECHO Compiling File %1.c02
|
||||
..\c02.exe %1 >%1.dbg
|
||||
|
||||
@ECHO Assembling File %1.asm
|
||||
C:\Programs\dasm %1.asm -f3 -o%1.bin -l%1.lst -s%1.sym
|
Loading…
Reference in New Issue
Block a user