Set the default for the CPU type. The option takes a parameter, which
may be one of
-
+
6502, 65SC02, 65C02, 65816, sunplus, sweet16, HuC6280
The sunplus cpu is not available in the freeware version, because the
will take place. The assembler supports the same target systems as the
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.
<sect1><tt>.ERROR</tt><label id=".ERROR"><p>
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
set before assembling a source file.
.endif
</verb></tscreen>
- See also the <tt><ref id=".WARNING" name=".WARNING"></tt> and <tt><ref
- id=".OUT" name=".OUT"></tt> directives.
+ See also: <tt><ref id=".FATAL" name=".FATAL"></tt>,
+ <tt><ref id=".OUT" name=".OUT"></tt>,
+ <tt><ref id=".WARNING" name=".WARNING"></tt>
<sect1><tt>.EXITMAC, .EXITMACRO</tt><label id=".EXITMACRO"><p>
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>
This directive may be used to enable one or more compatibility features
.out "This code was written by the codebuster(tm)"
</verb></tscreen>
- See also the <tt><ref id=".WARNING" name=".WARNING"></tt> and <tt><ref
- id=".ERROR" name=".ERROR"></tt> directives.
+ See also: <tt><ref id=".ERROR" name=".ERROR"></tt>,
+ <tt><ref id=".FATAL" name=".FATAL"></tt>,
+ <tt><ref id=".WARNING" name=".WARNING"></tt>
<sect1><tt>.P02</tt><label id=".P02"><p>
<tscreen><verb>
.macro jne target
- .local L1
- .ifndef target
- .warning "Forward jump in jne, cannot optimize!"
- beq L1
- jmp target
+ .local L1
+ .ifndef target
+ .warning "Forward jump in jne, cannot optimize!"
+ beq L1
+ jmp target
L1:
.else
- ...
- .endif
+ ...
+ .endif
.endmacro
</verb></tscreen>
- See also the <tt><ref id=".ERROR" name=".ERROR"></tt> and <tt><ref id=".OUT"
- name=".OUT"></tt> directives.
+ See also: <tt><ref id=".ERROR" name=".ERROR"></tt>
+ <tt><ref id=".FATAL" name=".FATAL"></tt>,
+ <tt><ref id=".OUT" name=".OUT"></tt>
<sect1><tt>.WORD</tt><label id=".WORD"><p>
/* */
/* */
/* */
-/* (C) 1998-2010, Ullrich von Bassewitz */
+/* (C) 1998-2011, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
+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 */
{
{ ccNone, DoExport },
{ ccNone, DoExportZP },
{ ccNone, DoFarAddr },
+ { ccNone, DoFatal },
{ ccNone, DoFeature },
{ ccNone, DoFileOpt },
{ ccNone, DoForceImport },
/* */
/* */
/* */
-/* (C) 1998-2010, Ullrich von Bassewitz */
+/* (C) 1998-2011, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
{ ".EXPORT", TOK_EXPORT },
{ ".EXPORTZP", TOK_EXPORTZP },
{ ".FARADDR", TOK_FARADDR },
+ { ".FATAL", TOK_FATAL },
{ ".FEATURE", TOK_FEATURE },
{ ".FILEOPT", TOK_FILEOPT },
{ ".FOPT", TOK_FILEOPT },