Merge remote-tracking branch 'upstream/master' into pcenginetarget
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
<article>
|
||||
<title>ca65 Users Guide
|
||||
<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">
|
||||
<date>2014-04-24
|
||||
<date>2015-08-01
|
||||
|
||||
<abstract>
|
||||
ca65 is a powerful macro assembler for the 6502, 65C02 and 65816 CPUs. It is
|
||||
ca65 is a powerful macro assembler for the 6502, 65C02, and 65816 CPUs. It is
|
||||
used as a companion assembler for the cc65 crosscompiler, but it may also be
|
||||
used as a standalone product.
|
||||
</abstract>
|
||||
@@ -430,24 +430,21 @@ The assembler accepts
|
||||
|
||||
<sect1>65816 mode<p>
|
||||
|
||||
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:
|
||||
|
||||
<tscreen><verb>
|
||||
BGE is an alias for BCS
|
||||
BLT is an alias for BCC
|
||||
CPA is an alias for CMP
|
||||
DEA is an alias for DEC A
|
||||
INA is an alias for INC A
|
||||
SWA is an alias for XBA
|
||||
TAD is an alias for TCD
|
||||
TAS is an alias for TCS
|
||||
TDA is an alias for TDC
|
||||
TSA is an alias for TSC
|
||||
CPA is an alias for CMP
|
||||
DEA is an alias for DEC A
|
||||
INA is an alias for INC A
|
||||
SWA is an alias for XBA
|
||||
TAD is an alias for TCD
|
||||
TAS is an alias for TCS
|
||||
TDA is an alias for TDC
|
||||
TSA is an alias for TSC
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
|
||||
<sect1>6502X mode<label id="6502X-mode"><p>
|
||||
|
||||
6502X mode is an extension to the normal 6502 mode. In this mode, several
|
||||
@@ -3330,8 +3327,8 @@ Here's a list of all control commands and a description, what they do:
|
||||
atari Defines the scrcode macro.
|
||||
cbm Defines the scrcode macro.
|
||||
cpu Defines constants for the .CPU variable.
|
||||
generic Defines generic macros like add and sub.
|
||||
longbranch Defines conditional long jump macros.
|
||||
generic Defines generic macroes like add, sub, and blt.
|
||||
longbranch Defines conditional long-jump macroes.
|
||||
</verb></tscreen>
|
||||
|
||||
Including a macro package twice, or including a macro package that
|
||||
@@ -3670,7 +3667,7 @@ Here's a list of all control commands and a description, what they do:
|
||||
segment, that is, a named section of data. The default segment is
|
||||
"CODE". There may be up to 254 different segments per object file
|
||||
(and up to 65534 per executable). There are shortcut commands for
|
||||
the most common segments ("CODE", "DATA" and "BSS").
|
||||
the most common segments ("ZEROPAGE", "CODE", "RODATA", "DATA", and "BSS").
|
||||
|
||||
The command is followed by a string containing the segment name (there are
|
||||
some constraints for the name - as a rule of thumb use only those segment
|
||||
@@ -3704,8 +3701,9 @@ Here's a list of all control commands and a description, what they do:
|
||||
</verb></tscreen>
|
||||
|
||||
See: <tt><ref id=".BSS" name=".BSS"></tt>, <tt><ref id=".CODE"
|
||||
name=".CODE"></tt>, <tt><ref id=".DATA" name=".DATA"></tt> and <tt><ref
|
||||
id=".RODATA" name=".RODATA"></tt>
|
||||
name=".CODE"></tt>, <tt><ref id=".DATA" name=".DATA"></tt>, <tt><ref
|
||||
id=".RODATA" name=".RODATA"></tt>, and <tt><ref id=".ZEROPAGE"
|
||||
name=".ZEROPAGE"></tt>
|
||||
|
||||
|
||||
<sect1><tt>.SET</tt><label id=".SET"><p>
|
||||
@@ -3866,7 +3864,7 @@ Here's a list of all control commands and a description, what they do:
|
||||
shortcut for
|
||||
|
||||
<tscreen><verb>
|
||||
.segment "ZEROPAGE", zeropage
|
||||
.segment "ZEROPAGE": zeropage
|
||||
</verb></tscreen>
|
||||
|
||||
Because of the "zeropage" attribute, labels declared in this segment are
|
||||
@@ -4317,48 +4315,47 @@ are:
|
||||
|
||||
<sect1><tt>.MACPACK generic</tt><p>
|
||||
|
||||
This macro package defines macros that are useful in almost any program.
|
||||
Currently defined macros are:
|
||||
This macro package defines macroes that are useful in almost any program.
|
||||
Currently defined macroes are:
|
||||
|
||||
<tscreen><verb>
|
||||
.macro add Arg
|
||||
.macro add Arg ; add without carry
|
||||
clc
|
||||
adc Arg
|
||||
.endmacro
|
||||
|
||||
.macro sub Arg
|
||||
.macro sub Arg ; subtract without borrow
|
||||
sec
|
||||
sbc Arg
|
||||
.endmacro
|
||||
|
||||
.macro bge Arg
|
||||
.macro bge Arg ; branch on greater-than or equal
|
||||
bcs Arg
|
||||
.endmacro
|
||||
|
||||
.macro blt Arg
|
||||
.macro blt Arg ; branch on less-than
|
||||
bcc Arg
|
||||
.endmacro
|
||||
|
||||
.macro bgt Arg
|
||||
.macro bgt Arg ; branch on greater-than
|
||||
.local L
|
||||
beq L
|
||||
bcs Arg
|
||||
L:
|
||||
.endmacro
|
||||
|
||||
.macro ble Arg
|
||||
.macro ble Arg ; branch on less-than or equal
|
||||
beq Arg
|
||||
bcc Arg
|
||||
.endmacro
|
||||
|
||||
.macro bnz Arg
|
||||
.macro bnz Arg ; branch on not zero
|
||||
bne Arg
|
||||
.endmacro
|
||||
|
||||
.macro bze Arg
|
||||
.macro bze Arg ; branch on zero
|
||||
beq Arg
|
||||
.endmacro
|
||||
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<article>
|
||||
<title>cc65 function reference
|
||||
<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">
|
||||
<date>2014-05-26
|
||||
<date>2015-07-21
|
||||
|
||||
<abstract>
|
||||
cc65 is a C compiler for 6502 based systems. This function reference describes
|
||||
@@ -840,6 +840,8 @@ the CBM systems are classified as being "regular" files, for example.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The minimum blocksize that can be added is 6 bytes; the function will
|
||||
ignore smaller blocks.
|
||||
<item>The function is available only as a fastcall function; so, it may be used
|
||||
only in the presence of a prototype.
|
||||
</itemize>
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
@@ -868,6 +870,8 @@ id="calloc" name="calloc">/ or <tt/<ref id="realloc" name="realloc">/.
|
||||
<tag/Notes/<itemize>
|
||||
<item>Passing a pointer to a block that was is not the result of one of the
|
||||
allocation functions, or that has been free'd will give unpredicable results.
|
||||
<item>The function is available only as a fastcall function; so, it may be used
|
||||
only in the presence of a prototype.
|
||||
</itemize>
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
@@ -912,7 +916,7 @@ be allocated from the heap using <tt/<ref id="malloc" name="malloc">/.
|
||||
<descrip>
|
||||
<tag/Function/Return the total available space on the heap.
|
||||
<tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
|
||||
<tag/Declaration/<tt/size_t __fastcall__ _heapmemavail (void);/
|
||||
<tag/Declaration/<tt/size_t _heapmemavail (void);/
|
||||
<tag/Description/The function returns the total number of bytes available on
|
||||
the heap.
|
||||
<tag/Notes/<itemize>
|
||||
@@ -1323,6 +1327,10 @@ used in presence of a prototype.
|
||||
<tag/Header/<tt/<ref id="atmos.h" name="atmos.h">/
|
||||
<tag/Declaration/<tt/void __fastcall__ atmos_load(const char* name);/
|
||||
<tag/Description/<tt/atmos_load/ reads a memory block from tape.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The function is available only as a fastcall function; so, it may be used
|
||||
only in the presence of a prototype.
|
||||
</itemize>
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
<ref id="atmos_save" name="atmos_save">
|
||||
@@ -1339,6 +1347,10 @@ used in presence of a prototype.
|
||||
<tag/Header/<tt/<ref id="atmos.h" name="atmos.h">/
|
||||
<tag/Declaration/<tt/void __fastcall__ atmos_save(const char* name, const void* start, const void* end);/
|
||||
<tag/Description/<tt/atmos_save/ writes a memory block to tape.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The function is available only as a fastcall function; so, it may be used
|
||||
only in the presence of a prototype.
|
||||
</itemize>
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
<ref id="atmos_load" name="atmos_load">
|
||||
@@ -1460,7 +1472,7 @@ be used in presence of a prototype.
|
||||
<tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
|
||||
<tag/Declaration/<tt/void* __fastcall__ bsearch (const void* key,
|
||||
const void* base, size_t n, size_t size,
|
||||
int (*cmp) (const void*, const void*));/
|
||||
int __fastcall__ (* cmp) (const void*, const void*));/
|
||||
<tag/Description/<tt/bsearch/ searches a sorted array for a member that
|
||||
matches the one pointed to by <tt/key/. <tt/base/ is the address of the array,
|
||||
<tt/n/ is the number of elements, <tt/size/ the size of an element and <tt/cmp/
|
||||
@@ -1473,6 +1485,8 @@ the compare function given.
|
||||
return one of the members.
|
||||
<item>The function is only available as fastcall function, so it may only
|
||||
be used in presence of a prototype.
|
||||
<item>The function to which <tt/cmp/ points must have the <tt/fastcall/ calling
|
||||
convention.
|
||||
</itemize>
|
||||
<tag/Availability/ISO 9899
|
||||
<tag/See also/
|
||||
@@ -4132,6 +4146,8 @@ the <tt/<ref id="mod_load" name="mod_load">/ function.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The pointer passed as parameter is the pointer to the module memory,
|
||||
not the pointer to the control structure.
|
||||
<item>The function is available only as a fastcall function; so, it may be used
|
||||
only in the presence of a prototype.
|
||||
</itemize>
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
@@ -4147,7 +4163,7 @@ not the pointer to the control structure.
|
||||
<descrip>
|
||||
<tag/Function/Load a relocatable module.
|
||||
<tag/Header/<tt/<ref id="modload.h" name="modload.h">/
|
||||
<tag/Declaration/<tt/unsigned char mod_load (struct mod_ctrl* ctrl);/
|
||||
<tag/Declaration/<tt/unsigned char __fastcall__ mod_load (struct mod_ctrl* ctrl);/
|
||||
<tag/Description/The function will load a code module into memory and relocate
|
||||
it. The function will return an error code. If <tt/MLOAD_OK/ is returned, the
|
||||
outgoing fields in the passed <tt/mod_ctrl/ struct contain information about
|
||||
@@ -4163,6 +4179,8 @@ the module just loaded. Possible error codes are:
|
||||
<tag/Notes/<itemize>
|
||||
<item>The <htmlurl url="ld65.html" name="ld65"> linker is needed to create
|
||||
relocatable o65 modules for use with this function.
|
||||
<item>The function is available only as a fastcall function; so, it may be used
|
||||
only in the presence of a prototype.
|
||||
</itemize>
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
@@ -4501,7 +4519,7 @@ from memory.
|
||||
<descrip>
|
||||
<tag/Function/Unload a mouse driver.
|
||||
<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
|
||||
<tag/Declaration/<tt/unsigned char __fastcall__ mouse_unload (void);/
|
||||
<tag/Declaration/<tt/unsigned char mouse_unload (void);/
|
||||
<tag/Description/The function unloads a loaded mouse driver and frees all
|
||||
memory allocated for the driver.
|
||||
<tag/Notes/<itemize>
|
||||
@@ -4726,7 +4744,7 @@ be used in presence of a prototype.
|
||||
<tag/Function/Sort an array.
|
||||
<tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
|
||||
<tag/Declaration/<tt/void __fastcall__ qsort (void* base, size_t count,
|
||||
size_t size, int (*compare) (const void*, const void*));/
|
||||
size_t size, int __fastcall__ (* compare) (const void*, const void*));/
|
||||
<tag/Description/<tt/qsort/ sorts an array according to a given compare
|
||||
function <tt/compare/. <tt/base/ is the address of the array, <tt/count/
|
||||
is the number of elements, <tt/size/ the size of an element and <tt/compare/
|
||||
@@ -4736,6 +4754,8 @@ the function used to compare the members.
|
||||
the function is undefined.
|
||||
<item>The function is only available as fastcall function, so it may only
|
||||
be used in presence of a prototype.
|
||||
<item>The function to which <tt/compare/ points must have the <tt/fastcall/
|
||||
calling convention.
|
||||
</itemize>
|
||||
<tag/Availability/ISO 9899
|
||||
<tag/See also/
|
||||
@@ -6919,6 +6939,8 @@ ratio for a loaded driver. The value is not reset by <ref id="tgi_init"
|
||||
name="tgi_init">, so if a driver is linked statically to an application,
|
||||
switching into and out of graphics mode will not restore the original aspect
|
||||
ratio.
|
||||
<item>The function is available only as a fastcall function; so, it may be used
|
||||
only in the presence of a prototype.
|
||||
</itemize>
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
|
||||
Reference in New Issue
Block a user