mirror of
https://github.com/cc65/cc65.git
synced 2025-08-08 06:25:17 +00:00
Add docs for new 65SC02 ops
git-svn-id: svn://svn.cc65.org/cc65/trunk@2245 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -130,10 +130,10 @@ 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, 65C02, 65816 and sunplus
|
6502, 65SC02, 65C02, 65816 and sunplus
|
||||||
|
|
||||||
The latter (sunplus) is not available in the freeware version, because the
|
The last one (sunplus) is not available in the freeware version, because the
|
||||||
instruction set of the sunplus CPU is "confidential".
|
instruction set of the sunplus CPU is "proprietary and confidential".
|
||||||
|
|
||||||
|
|
||||||
<label id="option--feature">
|
<label id="option--feature">
|
||||||
@@ -292,11 +292,20 @@ Here are some examples for valid input lines:
|
|||||||
MaSym = Label ; Another symbol
|
MaSym = Label ; Another symbol
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
|
||||||
The assembler accepts all valid 6502 mnemonics when in 6502 mode (the
|
The assembler accepts
|
||||||
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
|
<itemize>
|
||||||
assembler accepts all valid 65816 mnemonics with a few exceptions after a
|
<item>all valid 6502 mnemonics when in 6502 mode (the default or after the
|
||||||
.P816 command is found. These exceptions are listed below.
|
<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
|
In 65816 mode several aliases are accepted in addition to the official
|
||||||
mnemonics:
|
mnemonics:
|
||||||
@@ -425,7 +434,7 @@ Available operators sorted by precedence:
|
|||||||
.BITAND Bitwise and 2
|
.BITAND Bitwise and 2
|
||||||
^ Bitwise xor 2
|
^ Bitwise xor 2
|
||||||
.BITXOR Bitwise xor 2
|
.BITXOR Bitwise xor 2
|
||||||
<< Shift left operator 2
|
<< Shift left operator 2
|
||||||
.SHL Shift left operator 2
|
.SHL Shift left operator 2
|
||||||
>> Shift right operator
|
>> Shift right operator
|
||||||
.SHR Shift right operator 2
|
.SHR Shift right operator 2
|
||||||
@@ -926,8 +935,9 @@ Here's a list of all control commands and a description, what they do:
|
|||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
0 --> 6502
|
0 --> 6502
|
||||||
1 --> 65SC02
|
1 --> 65SC02
|
||||||
2 --> 65SC816
|
2 --> 65C02
|
||||||
3 --> SunPlus SPC
|
3 --> 65SC816
|
||||||
|
4 --> SunPlus SPC
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
|
||||||
It may be used to replace the .IFPxx pseudo instructions or to construct
|
It may be used to replace the .IFPxx pseudo instructions or to construct
|
||||||
@@ -936,14 +946,14 @@ Here's a list of all control commands and a description, what they do:
|
|||||||
Example:
|
Example:
|
||||||
|
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
.if (.cpu = 0) .or (.cpu = 1)
|
.if (.cpu = 0) .or (.cpu = 1) .or (.cpu = 2)
|
||||||
txa
|
txa
|
||||||
pha
|
pha
|
||||||
tya
|
tya
|
||||||
pha
|
pha
|
||||||
.else
|
.else
|
||||||
phx
|
phx
|
||||||
phy
|
phy
|
||||||
.endif
|
.endif
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
|
||||||
@@ -1478,6 +1488,12 @@ Here's a list of all control commands and a description, what they do:
|
|||||||
(see <tt><ref id=".PC02" name=".PC02"></tt> command).
|
(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>
|
<sect1><tt>.IFREF</tt><label id=".IFREF"><p>
|
||||||
|
|
||||||
Conditional assembly: Check if a symbol is referenced. Must be followed
|
Conditional assembly: Check if a symbol is referenced. Must be followed
|
||||||
@@ -1865,21 +1881,21 @@ Here's a list of all control commands and a description, what they do:
|
|||||||
|
|
||||||
<sect1><tt>.P02</tt><label id=".P02"><p>
|
<sect1><tt>.P02</tt><label id=".P02"><p>
|
||||||
|
|
||||||
Enable the 6502 instruction set, disable 65C02 and 65816 instructions.
|
Enable the 6502 instruction set, disable 65SC02, 65C02 and 65816
|
||||||
This is the default if not overridden by the <tt/--cpu/ command line
|
instructions. This is the default if not overridden by the
|
||||||
option.
|
<tt/--cpu/ command line option.
|
||||||
|
|
||||||
See: <tt><ref id=".PC02" name=".PC02"></tt> and <tt><ref id=".P816"
|
See: <tt><ref id=".PC02" name=".PC02"></tt>, <tt><ref id=".PSC02"
|
||||||
name=".P816"></tt>
|
name=".PSC02"></tt> and <tt><ref id=".P816" name=".P816"></tt>
|
||||||
|
|
||||||
|
|
||||||
<sect1><tt>.P816</tt><label id=".P816"><p>
|
<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.
|
6502 instruction sets.
|
||||||
|
|
||||||
See: <tt><ref id=".P02" name=".P02"></tt> and <tt><ref id=".PC02"
|
See: <tt><ref id=".P02" name=".P02"></tt>, <tt><ref id=".PSC02"
|
||||||
name=".PC02"></tt>
|
name=".PSC02"></tt> and <tt><ref id=".PC02" name=".PC02"></tt>
|
||||||
|
|
||||||
|
|
||||||
<sect1><tt>.PAGELEN, .PAGELENGTH</tt><label id=".PAGELENGTH"><p>
|
<sect1><tt>.PAGELEN, .PAGELENGTH</tt><label id=".PAGELENGTH"><p>
|
||||||
@@ -1923,10 +1939,10 @@ Here's a list of all control commands and a description, what they do:
|
|||||||
<sect1><tt>.PC02</tt><label id=".PC02"><p>
|
<sect1><tt>.PC02</tt><label id=".PC02"><p>
|
||||||
|
|
||||||
Enable the 65C02 instructions set. This instruction set includes all
|
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"
|
See: <tt><ref id=".P02" name=".P02"></tt>, <tt><ref id=".PSC02"
|
||||||
name=".P816"></tt>
|
name=".PSC02"></tt> and <tt><ref id=".P816" name=".P816"></tt>
|
||||||
|
|
||||||
|
|
||||||
<sect1><tt>.POPSEG</tt><label id=".POPSEG"><p>
|
<sect1><tt>.POPSEG</tt><label id=".POPSEG"><p>
|
||||||
@@ -1972,12 +1988,21 @@ Here's a list of all control commands and a description, what they do:
|
|||||||
dey
|
dey
|
||||||
bne L1 ; Reference local symbol
|
bne L1 ; Reference local symbol
|
||||||
rts
|
rts
|
||||||
.endproc ; Leave lexical level
|
.endproc ; Leave lexical level
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
|
||||||
See: <tt><ref id=".ENDPROC" name=".ENDPROC"></tt>
|
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>
|
<sect1><tt>.PUSHSEG</tt><label id=".PUSHSEG"><p>
|
||||||
|
|
||||||
Push the currently active segment onto a stack. The entries on the stack
|
Push the currently active segment onto a stack. The entries on the stack
|
||||||
@@ -2661,7 +2686,7 @@ don't like that, use classic macros instead:
|
|||||||
(This is an example where a problem can be solved with both macro types).
|
(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
|
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
|
into the target character set of the specific machine. However, this happens
|
||||||
|
Reference in New Issue
Block a user