Added new .FATAL pseudo op.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4903 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2011-01-09 11:00:22 +00:00
parent bee54df029
commit 839e2c4202
4 changed files with 66 additions and 20 deletions

View File

@@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 1998-2010, Ullrich von Bassewitz */
/* (C) 1998-2011, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@@ -882,6 +882,19 @@ static void DoFarAddr (void)
static void DoFatal (void)
/* Fatal user error */
{
if (Tok != TOK_STRCON) {
ErrorSkip ("String constant expected");
} else {
Fatal ("User error: %m%p", &SVal);
SkipUntilSep ();
}
}
static void DoFeature (void)
/* Switch the Feature option */
{
@@ -1874,6 +1887,7 @@ static CtrlDesc CtrlCmdTab [] = {
{ ccNone, DoExport },
{ ccNone, DoExportZP },
{ ccNone, DoFarAddr },
{ ccNone, DoFatal },
{ ccNone, DoFeature },
{ ccNone, DoFileOpt },
{ ccNone, DoForceImport },

View File

@@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 1998-2010, Ullrich von Bassewitz */
/* (C) 1998-2011, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@@ -194,6 +194,7 @@ struct DotKeyword {
{ ".EXPORT", TOK_EXPORT },
{ ".EXPORTZP", TOK_EXPORTZP },
{ ".FARADDR", TOK_FARADDR },
{ ".FATAL", TOK_FATAL },
{ ".FEATURE", TOK_FEATURE },
{ ".FILEOPT", TOK_FILEOPT },
{ ".FOPT", TOK_FILEOPT },

View File

@@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 2007-2010, Ullrich von Bassewitz */
/* (C) 2007-2011, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@@ -164,6 +164,7 @@ typedef enum Token {
TOK_EXPORT,
TOK_EXPORTZP,
TOK_FARADDR,
TOK_FATAL,
TOK_FEATURE,
TOK_FILEOPT,
TOK_FORCEIMPORT,
@@ -220,7 +221,7 @@ typedef enum Token {
TOK_POPCPU,
TOK_POPSEG,
TOK_PROC,
TOK_PSC02,
TOK_PSC02,
TOK_PUSHCPU,
TOK_PUSHSEG,
TOK_REFERENCED,