Set the default for the CPU type. The option takes a parameter, which
may be one of
- 6502, 65C02, 65816 and sunplus
+ 6502, 65SC02, 65C02, 65816 and sunplus
- The latter (sunplus) is not available in the freeware version, because the
- instruction set of the sunplus CPU is "confidential".
+ The last one (sunplus) is not available in the freeware version, because the
+ instruction set of the sunplus CPU is "proprietary and confidential".
<label id="option--feature">
MaSym = Label ; Another symbol
</verb></tscreen>
-The assembler accepts all valid 6502 mnemonics when in 6502 mode (the
-default). The assembler accepts all valid 65SC02 mnemonics when in 65SC02 mode
-(after a <tt><ref id=".PC02" name=".PC02"></tt> command is found). The
-assembler accepts all valid 65816 mnemonics with a few exceptions after a
-.P816 command is found. These exceptions are listed below.
+The assembler accepts
+
+<itemize>
+<item>all valid 6502 mnemonics when in 6502 mode (the default or after the
+ <tt><ref id=".P02" name=".P02"></tt> command was given).
+<item>all valid 65SC02 mnemonics when in 65SC02 mode (after the
+ <tt><ref id=".PSC02" name=".PSC02"></tt> command was given).
+<item>all valid 65C02 mnemonics when in 65C02 mode (after the
+ <tt><ref id=".PC02" name=".PC02"></tt> command was given).
+<item>all valid 65618 mnemonics when in 65816 mode (after the
+ <tt><ref id=".P816" name=".P816"></tt> command was given).
+<item>all valid SunPlus mnemonics when in SunPlus mode (after the
+ <tt><ref id=".SUNPLUS" name=".SUNPLUS"></tt> command was given).
+</itemize>
In 65816 mode several aliases are accepted in addition to the official
mnemonics:
.BITAND Bitwise and 2
^ Bitwise xor 2
.BITXOR Bitwise xor 2
- << Shift left operator 2
+ << Shift left operator 2
.SHL Shift left operator 2
>> Shift right operator
.SHR Shift right operator 2
<tscreen><verb>
0 --> 6502
1 --> 65SC02
- 2 --> 65SC816
- 3 --> SunPlus SPC
+ 2 --> 65C02
+ 3 --> 65SC816
+ 4 --> SunPlus SPC
</verb></tscreen>
It may be used to replace the .IFPxx pseudo instructions or to construct
Example:
<tscreen><verb>
- .if (.cpu = 0) .or (.cpu = 1)
- txa
- pha
- tya
- pha
+ .if (.cpu = 0) .or (.cpu = 1) .or (.cpu = 2)
+ txa
+ pha
+ tya
+ pha
.else
- phx
- phy
+ phx
+ phy
.endif
</verb></tscreen>
(see <tt><ref id=".PC02" name=".PC02"></tt> command).
+<sect1><tt>.IFPSC02</tt><label id=".IFPSC02"><p>
+
+ Conditional assembly: Check if the assembler is currently in 65SC02 mode
+ (see <tt><ref id=".PSC02" name=".PSC02"></tt> command).
+
+
<sect1><tt>.IFREF</tt><label id=".IFREF"><p>
Conditional assembly: Check if a symbol is referenced. Must be followed
<sect1><tt>.P02</tt><label id=".P02"><p>
- Enable the 6502 instruction set, disable 65C02 and 65816 instructions.
- This is the default if not overridden by the <tt/--cpu/ command line
- option.
+ Enable the 6502 instruction set, disable 65SC02, 65C02 and 65816
+ instructions. This is the default if not overridden by the
+ <tt/--cpu/ command line option.
- See: <tt><ref id=".PC02" name=".PC02"></tt> and <tt><ref id=".P816"
- name=".P816"></tt>
+ See: <tt><ref id=".PC02" name=".PC02"></tt>, <tt><ref id=".PSC02"
+ name=".PSC02"></tt> and <tt><ref id=".P816" name=".P816"></tt>
<sect1><tt>.P816</tt><label id=".P816"><p>
- Enable the 65816 instruction set. This is a superset of the 65C02 and
+ Enable the 65816 instruction set. This is a superset of the 65SC02 and
6502 instruction sets.
- See: <tt><ref id=".P02" name=".P02"></tt> and <tt><ref id=".PC02"
- name=".PC02"></tt>
+ See: <tt><ref id=".P02" name=".P02"></tt>, <tt><ref id=".PSC02"
+ name=".PSC02"></tt> and <tt><ref id=".PC02" name=".PC02"></tt>
<sect1><tt>.PAGELEN, .PAGELENGTH</tt><label id=".PAGELENGTH"><p>
<sect1><tt>.PC02</tt><label id=".PC02"><p>
Enable the 65C02 instructions set. This instruction set includes all
- 6502 instructions.
+ 6502 and 65SC02 instructions.
- See: <tt><ref id=".P02" name=".P02"></tt> and <tt><ref id=".P816"
- name=".P816"></tt>
+ See: <tt><ref id=".P02" name=".P02"></tt>, <tt><ref id=".PSC02"
+ name=".PSC02"></tt> and <tt><ref id=".P816" name=".P816"></tt>
<sect1><tt>.POPSEG</tt><label id=".POPSEG"><p>
dey
bne L1 ; Reference local symbol
rts
- .endproc ; Leave lexical level
+ .endproc ; Leave lexical level
</verb></tscreen>
See: <tt><ref id=".ENDPROC" name=".ENDPROC"></tt>
+<sect1><tt>.PSC02</tt><label id=".PSC02"><p>
+
+ Enable the 65SC02 instructions set. This instruction set includes all
+ 6502 instructions.
+
+ See: <tt><ref id=".P02" name=".P02"></tt>, <tt><ref id=".PC02"
+ name=".PC02"></tt> and <tt><ref id=".P816" name=".P816"></tt>
+
+
<sect1><tt>.PUSHSEG</tt><label id=".PUSHSEG"><p>
Push the currently active segment onto a stack. The entries on the stack
(This is an example where a problem can be solved with both macro types).
-<sect1>Characters in macros<p>
+<sect1>Characters in macros<p>
When using the <ref id="option-t" name="-t"> option, characters are translated
into the target character set of the specific machine. However, this happens