mirror of
https://github.com/cc65/cc65.git
synced 2025-02-09 17:33:00 +00:00
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:
parent
bee54df029
commit
839e2c4202
@ -148,7 +148,7 @@ Here is a description of all the command line options:
|
|||||||
|
|
||||||
Set the default for the CPU type. The option takes a parameter, which
|
Set the default for the CPU type. The option takes a parameter, which
|
||||||
may be one of
|
may be one of
|
||||||
|
|
||||||
6502, 65SC02, 65C02, 65816, sunplus, sweet16, HuC6280
|
6502, 65SC02, 65C02, 65816, sunplus, sweet16, HuC6280
|
||||||
|
|
||||||
The sunplus cpu is not available in the freeware version, because the
|
The sunplus cpu is not available in the freeware version, because the
|
||||||
@ -294,7 +294,7 @@ Here is a description of all the command line options:
|
|||||||
will take place. The assembler supports the same target systems as the
|
will take place. The assembler supports the same target systems as the
|
||||||
compiler, see there for a list.
|
compiler, see there for a list.
|
||||||
|
|
||||||
Depending on the target, the default CPU type is also set. This can be
|
Depending on the target, the default CPU type is also set. This can be
|
||||||
overriden by using the <tt/<ref id="option--cpu" name="--cpu">/ option.
|
overriden by using the <tt/<ref id="option--cpu" name="--cpu">/ option.
|
||||||
|
|
||||||
|
|
||||||
@ -2290,7 +2290,8 @@ Here's a list of all control commands and a description, what they do:
|
|||||||
<sect1><tt>.ERROR</tt><label id=".ERROR"><p>
|
<sect1><tt>.ERROR</tt><label id=".ERROR"><p>
|
||||||
|
|
||||||
Force an assembly error. The assembler will output an error message
|
Force an assembly error. The assembler will output an error message
|
||||||
preceded by "User error" and will <em/not/ produce an object file.
|
preceded by "User error". Assembly is continued but no object file will
|
||||||
|
generated.
|
||||||
|
|
||||||
This command may be used to check for initial conditions that must be
|
This command may be used to check for initial conditions that must be
|
||||||
set before assembling a source file.
|
set before assembling a source file.
|
||||||
@ -2307,8 +2308,9 @@ Here's a list of all control commands and a description, what they do:
|
|||||||
.endif
|
.endif
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
|
||||||
See also the <tt><ref id=".WARNING" name=".WARNING"></tt> and <tt><ref
|
See also: <tt><ref id=".FATAL" name=".FATAL"></tt>,
|
||||||
id=".OUT" name=".OUT"></tt> directives.
|
<tt><ref id=".OUT" name=".OUT"></tt>,
|
||||||
|
<tt><ref id=".WARNING" name=".WARNING"></tt>
|
||||||
|
|
||||||
|
|
||||||
<sect1><tt>.EXITMAC, .EXITMACRO</tt><label id=".EXITMACRO"><p>
|
<sect1><tt>.EXITMAC, .EXITMACRO</tt><label id=".EXITMACRO"><p>
|
||||||
@ -2374,6 +2376,32 @@ Here's a list of all control commands and a description, what they do:
|
|||||||
See: <tt><ref id=".ADDR" name=".ADDR"></tt>
|
See: <tt><ref id=".ADDR" name=".ADDR"></tt>
|
||||||
|
|
||||||
|
|
||||||
|
<sect1><tt>.FATAL</tt><label id=".FATAL"><p>
|
||||||
|
|
||||||
|
Force an assembly error and terminate assembly. The assembler will output an
|
||||||
|
error message preceded by "User error" and will terminate assembly
|
||||||
|
immediately.
|
||||||
|
|
||||||
|
This command may be used to check for initial conditions that must be
|
||||||
|
set before assembling a source file.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
<tscreen><verb>
|
||||||
|
.if foo = 1
|
||||||
|
...
|
||||||
|
.elseif bar = 1
|
||||||
|
...
|
||||||
|
.else
|
||||||
|
.fatal "Must define foo or bar!"
|
||||||
|
.endif
|
||||||
|
</verb></tscreen>
|
||||||
|
|
||||||
|
See also: <tt><ref id=".ERROR" name=".ERROR"></tt>,
|
||||||
|
<tt><ref id=".OUT" name=".OUT"></tt>,
|
||||||
|
<tt><ref id=".WARNING" name=".WARNING"></tt>
|
||||||
|
|
||||||
|
|
||||||
<sect1><tt>.FEATURE</tt><label id=".FEATURE"><p>
|
<sect1><tt>.FEATURE</tt><label id=".FEATURE"><p>
|
||||||
|
|
||||||
This directive may be used to enable one or more compatibility features
|
This directive may be used to enable one or more compatibility features
|
||||||
@ -3097,8 +3125,9 @@ Here's a list of all control commands and a description, what they do:
|
|||||||
.out "This code was written by the codebuster(tm)"
|
.out "This code was written by the codebuster(tm)"
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
|
||||||
See also the <tt><ref id=".WARNING" name=".WARNING"></tt> and <tt><ref
|
See also: <tt><ref id=".ERROR" name=".ERROR"></tt>,
|
||||||
id=".ERROR" name=".ERROR"></tt> directives.
|
<tt><ref id=".FATAL" name=".FATAL"></tt>,
|
||||||
|
<tt><ref id=".WARNING" name=".WARNING"></tt>
|
||||||
|
|
||||||
|
|
||||||
<sect1><tt>.P02</tt><label id=".P02"><p>
|
<sect1><tt>.P02</tt><label id=".P02"><p>
|
||||||
@ -3505,20 +3534,21 @@ Here's a list of all control commands and a description, what they do:
|
|||||||
|
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
.macro jne target
|
.macro jne target
|
||||||
.local L1
|
.local L1
|
||||||
.ifndef target
|
.ifndef target
|
||||||
.warning "Forward jump in jne, cannot optimize!"
|
.warning "Forward jump in jne, cannot optimize!"
|
||||||
beq L1
|
beq L1
|
||||||
jmp target
|
jmp target
|
||||||
L1:
|
L1:
|
||||||
.else
|
.else
|
||||||
...
|
...
|
||||||
.endif
|
.endif
|
||||||
.endmacro
|
.endmacro
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
|
||||||
See also the <tt><ref id=".ERROR" name=".ERROR"></tt> and <tt><ref id=".OUT"
|
See also: <tt><ref id=".ERROR" name=".ERROR"></tt>
|
||||||
name=".OUT"></tt> directives.
|
<tt><ref id=".FATAL" name=".FATAL"></tt>,
|
||||||
|
<tt><ref id=".OUT" name=".OUT"></tt>
|
||||||
|
|
||||||
|
|
||||||
<sect1><tt>.WORD</tt><label id=".WORD"><p>
|
<sect1><tt>.WORD</tt><label id=".WORD"><p>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 1998-2010, Ullrich von Bassewitz */
|
/* (C) 1998-2011, Ullrich von Bassewitz */
|
||||||
/* Roemerstrasse 52 */
|
/* Roemerstrasse 52 */
|
||||||
/* D-70794 Filderstadt */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@cc65.org */
|
/* 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)
|
static void DoFeature (void)
|
||||||
/* Switch the Feature option */
|
/* Switch the Feature option */
|
||||||
{
|
{
|
||||||
@ -1874,6 +1887,7 @@ static CtrlDesc CtrlCmdTab [] = {
|
|||||||
{ ccNone, DoExport },
|
{ ccNone, DoExport },
|
||||||
{ ccNone, DoExportZP },
|
{ ccNone, DoExportZP },
|
||||||
{ ccNone, DoFarAddr },
|
{ ccNone, DoFarAddr },
|
||||||
|
{ ccNone, DoFatal },
|
||||||
{ ccNone, DoFeature },
|
{ ccNone, DoFeature },
|
||||||
{ ccNone, DoFileOpt },
|
{ ccNone, DoFileOpt },
|
||||||
{ ccNone, DoForceImport },
|
{ ccNone, DoForceImport },
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 1998-2010, Ullrich von Bassewitz */
|
/* (C) 1998-2011, Ullrich von Bassewitz */
|
||||||
/* Roemerstrasse 52 */
|
/* Roemerstrasse 52 */
|
||||||
/* D-70794 Filderstadt */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@cc65.org */
|
/* EMail: uz@cc65.org */
|
||||||
@ -194,6 +194,7 @@ struct DotKeyword {
|
|||||||
{ ".EXPORT", TOK_EXPORT },
|
{ ".EXPORT", TOK_EXPORT },
|
||||||
{ ".EXPORTZP", TOK_EXPORTZP },
|
{ ".EXPORTZP", TOK_EXPORTZP },
|
||||||
{ ".FARADDR", TOK_FARADDR },
|
{ ".FARADDR", TOK_FARADDR },
|
||||||
|
{ ".FATAL", TOK_FATAL },
|
||||||
{ ".FEATURE", TOK_FEATURE },
|
{ ".FEATURE", TOK_FEATURE },
|
||||||
{ ".FILEOPT", TOK_FILEOPT },
|
{ ".FILEOPT", TOK_FILEOPT },
|
||||||
{ ".FOPT", TOK_FILEOPT },
|
{ ".FOPT", TOK_FILEOPT },
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 2007-2010, Ullrich von Bassewitz */
|
/* (C) 2007-2011, Ullrich von Bassewitz */
|
||||||
/* Roemerstrasse 52 */
|
/* Roemerstrasse 52 */
|
||||||
/* D-70794 Filderstadt */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@cc65.org */
|
/* EMail: uz@cc65.org */
|
||||||
@ -164,6 +164,7 @@ typedef enum Token {
|
|||||||
TOK_EXPORT,
|
TOK_EXPORT,
|
||||||
TOK_EXPORTZP,
|
TOK_EXPORTZP,
|
||||||
TOK_FARADDR,
|
TOK_FARADDR,
|
||||||
|
TOK_FATAL,
|
||||||
TOK_FEATURE,
|
TOK_FEATURE,
|
||||||
TOK_FILEOPT,
|
TOK_FILEOPT,
|
||||||
TOK_FORCEIMPORT,
|
TOK_FORCEIMPORT,
|
||||||
@ -220,7 +221,7 @@ typedef enum Token {
|
|||||||
TOK_POPCPU,
|
TOK_POPCPU,
|
||||||
TOK_POPSEG,
|
TOK_POPSEG,
|
||||||
TOK_PROC,
|
TOK_PROC,
|
||||||
TOK_PSC02,
|
TOK_PSC02,
|
||||||
TOK_PUSHCPU,
|
TOK_PUSHCPU,
|
||||||
TOK_PUSHSEG,
|
TOK_PUSHSEG,
|
||||||
TOK_REFERENCED,
|
TOK_REFERENCED,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user