1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 06:31:31 +00:00

Merge pull request #255 from polluks/master

Some missing docu.
This commit is contained in:
Oliver Schmidt 2016-01-05 17:26:31 +01:00
commit 22348e2f07
4 changed files with 143 additions and 13 deletions

0
doc/chrcvt.sgml Executable file → Normal file
View File

View File

@ -18,6 +18,9 @@
<tag><htmlurl url="cc65.html" name="cc65.html"></tag>
Describes the cc65 C compiler.
<tag><htmlurl url="chrcvt.html" name="chrcvt.html"></tag>
Describes the vector font converter.
<tag><htmlurl url="cl65.html" name="cl65.html"></tag>
Describes the cl65 compile &amp; link utility.
@ -36,6 +39,9 @@
<tag><htmlurl url="od65.html" name="od65.html"></tag>
Describes the od65 object-file analyzer.
<tag><htmlurl url="sim65.html" name="sim65.html"></tag>
Describes the 6502 and 65C02 simulator.
<tag><htmlurl url="sp65.html" name="sp65.html"></tag>
Describes the sprite and bitmap utility.
@ -147,7 +153,7 @@
Topics specific to the Commodore Plus/4.
<tag><htmlurl url="supervision.html" name="supervision.html"></tag>
Topics specific to the Supervision Console.
Topics specific to the Watara Supervision Console.
<tag><htmlurl url="vic20.html" name="vic20.html"></tag>
Topics specific to the Commodore VIC20.
@ -156,4 +162,3 @@
</article>

125
doc/sim65.sgml Normal file
View File

@ -0,0 +1,125 @@
<!doctype linuxdoc system> <!-- -*- text-mode -*- -->
<article>
<title>sim65 Users Guide
<author><url url="mailto:polluks@sdf.lonestar.org" name="Stefan A. Haubenthal">
<date>2016-01-05
<abstract>
sim65 is a simulator for 6502 and 65C02 CPUs. It allows to test target
independed code.
</abstract>
<!-- Table of contents -->
<toc>
<!-- Begin the document -->
<sect>Overview<p>
sim65 is the only solution as part of the toolchain to execute code. The
binary needs to be compiled with <tt/--target sim6502/ or <tt/--target sim65c02/.
<sect>Usage<p>
The simulator is called as follows:
<tscreen><verb>
Usage: sim65 [options] file [arguments]
Short options:
-h Help (this text)
-v Increase verbosity
-V Print the simulator version number
-x <num> Exit simulator after <num> cycles
Long options:
--help Help (this text)
--verbose Increase verbosity
--version Print the simulator version number
</verb></tscreen>
<sect1>Command line options in detail<p>
Here is a description of all the command line options:
<descrip>
<tag><tt>-h, --help</tt></tag>
Print the short option summary shown above.
<tag><tt>-v, --verbose</tt></tag>
Increase the simulator verbosity.
<tag><tt>-V, --version</tt></tag>
Print the version number of the utility. When submitting a bug report,
please include the operating system you're using, and the compiler
version.
<tag><tt>-x num</tt></tag>
Exit simulator after num cycles.
</descrip>
<sect>Input and output<p>
The simulator will read one binary file per invocation and can log some
library calls.
Example output for the command
<tscreen><verb>
sim65 --verbose --verbose samples/gunzip65
</verb></tscreen>
<tscreen><verb>
Loaded `samples/gunzip65' at $0200-$151F
PVWrite ($0001, $13C9, $000F)
GZIP file name:PVWrite ($0001, $151F, $0001)
PVRead ($0000, $FFD7, $0001)
PVOpen ("", $0001)
PVRead ($0003, $1520, $6590)
PVClose ($0003)
PVWrite ($0001, $13D9, $000F)
Not GZIP formatPVWrite ($0001, $151F, $0001)
PVExit ($01)
</verb></tscreen>
<sect>Copyright<p>
sim65 (and all cc65 binutils) are (C) Copyright 1998-2000 Ullrich von
Bassewitz. For usage of the binaries and/or sources the following conditions
do apply:
This software is provided 'as-is', without any expressed or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
<enum>
<item> The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
<item> Altered source versions must be plainly marked as such, and must not
be misrepresented as being the original software.
<item> This notice may not be removed or altered from any source
distribution.
</enum>
</article>

View File

@ -224,7 +224,7 @@ These marcos are determined to get, set and change arguments of instructions:
<label id="Change branch">
<tag><tt>SMC_ChangeBranch label, destination (, register)</tt></tag>
Used to modify the destination of a branch instruction. If the adress offset
Used to modify the destination of a branch instruction. If the address offset
exceeds the supported range of 8-bit of the 6502, a error will be thrown.
Example:
@ -296,7 +296,7 @@ SMC GetK, { LDX #SMC_Value }
<tag><tt>SMC_TransferLowByte label, value (, register)</tt></tag>
Does the same as '<tt>SMC_TransferValue</tt>' but should be used for
low-bytes of adresses for better readability.
low-bytes of addresses for better readability.
Example:
<tscreen><verb>
@ -312,7 +312,7 @@ SMC LoadData, { LDA $2000 }
<tag><tt>SMC_LoadLowByte label (, register)</tt></tag>
Does the same as '<tt>SMC_LoadValue</tt>' but should be used for low-bytes
of adresses for better readability.
of addresses for better readability.
Example:
<tscreen><verb>
@ -329,7 +329,7 @@ SMC LoadData, { LDA $2000 }
<tag><tt>SMC_StoreLowByte label (, register)</tt></tag>
Does the same as '<tt>SMC_StoreValue</tt>' but should be used for low-bytes
of adresses for better readability.
of addresses for better readability.
Example:
<tscreen><verb>
@ -352,7 +352,7 @@ SMC StoreCollisionData, { STY $2200 }
<tag><tt>SMC_TransferHighByte label, value (, register)</tt></tag>
Loads and stores the given value via the named register to the high-byte
adress portion of an SMC-instruction.
address portion of an SMC-instruction.
Example:
<tscreen><verb>
@ -370,7 +370,7 @@ PlayOtherSound:
<label id="Load high-byte">
<tag><tt>SMC_LoadHighByte label (, register)</tt></tag>
Loads the high-byte part of an SMC-instruction adress to the given register.
Loads the high-byte part of an SMC-instruction address to the given register.
Example:
<tscreen><verb>
@ -387,7 +387,7 @@ SMC GetVolume { LDA $3200,x }
<label id="Store high-byte">
<tag><tt>SMC_StoreHighByte label (, register)</tt></tag>
Stores the high-byte adress part of an SMC-instruction from the given
Stores the high-byte address part of an SMC-instruction from the given
register.
Example:
@ -407,7 +407,7 @@ SMC GetSoundData, { LDA Level1Base+Sound, y }
</verb></tscreen>
<label id="Transfer single adress">
<label id="Transfer single address">
<tag><tt>SMC_TransferAddressSingle label, address (, register)</tt></tag>
Transfers the contents of the given address via the given register to the
@ -428,7 +428,7 @@ SMC GetChar, { LDA SMC_AbsAdr, x }
</verb></tscreen>
<label id="Transfer adress">
<label id="Transfer address">
<tag><tt>SMC_TransferAddress label, address</tt></tag>
Loads contents of given address to A/X and stores the result to SMC
@ -559,11 +559,11 @@ allowing reuse of some instructions.
8: SMC FirstIncHighByte, { SMC_OperateOnHighByte inc, StoreAccuFirstSection } ; code will be overwritten to 'beq RestoreCode' (*)
9: ...
10: SMC_TransferOpcode FirstIncHighByte, OPC_BEQ , x ; change code marked above with (*)
11: SMC_TransferValue FirstIncHighByte, #(restoreCode - RestoreCodeBranchBaseAdr-2), x ; set relative adress to 'RestoreCode'
11: SMC_TransferValue FirstIncHighByte, #(restoreCode - RestoreCodeBranchBaseAdr-2), x ; set relative address to 'RestoreCode'
12: ...
13: restoreCode:
14: SMC_TransferOpcode FirstIncHighByte, OPC_INC_abs , x ; restore original code...
15: SMC_TransferValue FirstIncHighByte, #(<(StoreToFirstSection+2)), x ; (second byte of inc contained low-byte of adress)
15: SMC_TransferValue FirstIncHighByte, #(<(StoreToFirstSection+2)), x ; (second byte of inc contained low-byte of address)
16: ...
</verb></tscreen>