mirror of
https://github.com/cc65/cc65.git
synced 2024-12-22 12:30:41 +00:00
e9484094e4
git-svn-id: svn://svn.cc65.org/cc65/trunk@2152 b7a2c559-68d2-44c3-8de9-860c34a00d81
2301 lines
74 KiB
Plaintext
2301 lines
74 KiB
Plaintext
<!doctype linuxdoc system>
|
|
|
|
<article>
|
|
<title>cc65 function reference
|
|
<author>Ullrich von Bassewitz, <htmlurl url="mailto:uz@cc65.org" name="uz@cc65.org">
|
|
<date>07.11.2002
|
|
|
|
<abstract>
|
|
cc65 is a C compiler for 6502 based systems. This function reference describes
|
|
the available C functions supplied by the library.
|
|
</abstract>
|
|
|
|
<!-- Table of contents -->
|
|
<toc>
|
|
|
|
<!-- Begin the document -->
|
|
|
|
<sect>Introduction<p>
|
|
|
|
cc65 is a C compiler for 6502 based systems. It implements a subset of the ISO
|
|
C standard plus additional functions specially crafted for 6502 systems or
|
|
just some of the supported machines. This function refrence describes the
|
|
available functions together with any limitations.
|
|
|
|
For an overview about the available libraries, their purpose, and any
|
|
differences to the ISO standard, please have a look at the <htmlurl
|
|
url="library.html" name="cc65 Library Overview">.
|
|
|
|
<bf/Note:/ Standard C functions are listed here, but not described in detail.
|
|
Since these functions behave identical on all standard compliant systems, they
|
|
are described in any book covering standard C.
|
|
|
|
Each entry for a function contains a detailed description
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Summary of what <bf/function/ does.
|
|
<tag/Header/The header file that contains the declaration.
|
|
<tag/Declaration/Describes the needed header files and declaration of the
|
|
function.
|
|
<tag/Description/Description of the function.
|
|
<tag/Limits/Limits.
|
|
<tag/Availability/The availability of the function.
|
|
<tag/See also/Other related functions.
|
|
<tag/Example/A piece of actual code using the function.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect>Functions by header file<p>
|
|
|
|
<sect1><tt/6502.h/<label id="6502.h"><p>
|
|
|
|
<itemize>
|
|
<item><ref id="BRK" name="BRK">
|
|
<item><ref id="CLI" name="CLI">
|
|
<item><ref id="SEI" name="SEI">
|
|
<item><ref id="_sys" name="_sys">
|
|
<item><ref id="getcpu" name="getcpu">
|
|
<!-- <item><ref id="reset_brk" name="reset_brk"> -->
|
|
<!-- <item><ref id="set_brk" name="set_brk"> -->
|
|
</itemize>
|
|
|
|
|
|
<sect1><tt/assert.h/<label id="assert.h"><p>
|
|
|
|
<itemize>
|
|
<item><ref id="assert" name="assert">
|
|
</itemize>
|
|
|
|
|
|
<sect1><tt/c128.h/<label id="c128.h"><p>
|
|
|
|
<itemize>
|
|
<item><ref id="c64mode" name="c64mode">
|
|
<item><ref id="fast" name="fast">
|
|
<item><ref id="toggle_videomode" name="toggle_videomode">
|
|
<item><ref id="slow" name="slow">
|
|
</itemize>
|
|
|
|
|
|
<sect1><tt/conio.h/<label id="conio.h"><p>
|
|
|
|
<itemize>
|
|
<item><ref id="bgcolor" name="bgcolor">
|
|
<item><ref id="bordercolor" name="bordercolor">
|
|
<item><ref id="cclear" name="cclear">
|
|
<item><ref id="cclearxy" name="cclearxy">
|
|
<item><ref id="cgetc" name="cgetc">
|
|
<item><ref id="chline" name="chline">
|
|
<item><ref id="chlinexy" name="chlinexy">
|
|
<item><ref id="clrscr" name="clrscr">
|
|
<!-- <item><ref id="cprintf" name="cprintf"> -->
|
|
<!-- <item><ref id="cputc" name="cputc"> -->
|
|
<!-- <item><ref id="cputcxy" name="cputcxy"> -->
|
|
<!-- <item><ref id="cputs" name="cputs"> -->
|
|
<!-- <item><ref id="cputsxy" name="cputsxy"> -->
|
|
<item><ref id="cursor" name="cursor">
|
|
<item><ref id="cvline" name="cvline">
|
|
<item><ref id="cvlinexy" name="cvlinexy">
|
|
<item><ref id="gotox" name="gotox">
|
|
<item><ref id="gotoxy" name="gotoxy">
|
|
<item><ref id="gotoy" name="gotoy">
|
|
<item><ref id="kbhit" name="kbhit">
|
|
<item><ref id="revers" name="revers">
|
|
<item><ref id="screensize" name="screensize">
|
|
<item><ref id="textcolor" name="textcolor">
|
|
<!-- <item><ref id="vcprintf" name="vcprintf"> -->
|
|
<item><ref id="wherex" name="wherex">
|
|
<item><ref id="wherey" name="wherey">
|
|
</itemize>
|
|
|
|
|
|
<sect1><tt/ctype.h/<label id="ctype.h"><p>
|
|
|
|
<itemize>
|
|
<item><ref id="isalnum" name="isalnum">
|
|
<item><ref id="isalpha" name="isalpha">
|
|
<item><ref id="isascii" name="isascii">
|
|
<item><ref id="isblank" name="isblank">
|
|
<item><ref id="iscntrl" name="iscntrl">
|
|
<item><ref id="isdigit" name="isdigit">
|
|
<item><ref id="isgraph" name="isgraph">
|
|
<item><ref id="islower" name="islower">
|
|
<item><ref id="isprint" name="isprint">
|
|
<item><ref id="ispunct" name="ispunct">
|
|
<item><ref id="isspace" name="isspace">
|
|
<item><ref id="isupper" name="isupper">
|
|
<item><ref id="isxdigit" name="isxdigit">
|
|
<item><ref id="tolower" name="tolower">
|
|
<item><ref id="toupper" name="toupper">
|
|
</itemize>
|
|
|
|
|
|
<sect1><tt/em.h/<label id="em.h"><p>
|
|
|
|
<itemize>
|
|
<item><ref id="em_commit" name="em_commit">
|
|
<item><ref id="em_copyfrom" name="em_copyfrom">
|
|
<item><ref id="em_copyto" name="em_copyto">
|
|
<item><ref id="em_load_driver" name="em_load_driver">
|
|
<item><ref id="em_map" name="em_map">
|
|
<item><ref id="em_pagecount" name="em_pagecount">
|
|
<item><ref id="em_unload" name="em_unload">
|
|
<item><ref id="em_use" name="em_use">
|
|
</itemize>
|
|
|
|
|
|
<sect1><tt/stdlib.h/<label id="stdlib.h"><p>
|
|
|
|
<itemize>
|
|
<item><ref id="_heapadd" name="_heapadd">
|
|
<item><ref id="_heapmaxavail" name="_heapmaxavail">
|
|
<item><ref id="_heapmemavail" name="_heapmemavail">
|
|
<item><ref id="_randomize" name="_randomize">
|
|
<!-- <item><ref id="_swap" name="_swap"> -->
|
|
<item><ref id="abort" name="abort">
|
|
<item><ref id="abs" name="abs">
|
|
<item><ref id="atexit" name="atexit">
|
|
<!-- <item><ref id="atoi" name="atoi"> -->
|
|
<!-- <item><ref id="atol" name="atol"> -->
|
|
<!-- <item><ref id="bsearch" name="bsearch"> -->
|
|
<item><ref id="calloc" name="calloc">
|
|
<!-- <item><ref id="div" name="div"> -->
|
|
<item><ref id="exit" name="exit">
|
|
<item><ref id="free" name="free">
|
|
<!-- <item><ref id="getenv" name="getenv"> -->
|
|
<!-- <item><ref id="itoa" name="itoa"> -->
|
|
<item><ref id="labs" name="labs">
|
|
<!-- <item><ref id="ltoa" name="ltoa"> -->
|
|
<item><ref id="malloc" name="malloc">
|
|
<!-- <item><ref id="qsort" name="qsort"> -->
|
|
<item><ref id="rand" name="rand">
|
|
<item><ref id="realloc" name="realloc">
|
|
<item><ref id="srand" name="srand">
|
|
<!-- <item><ref id="ultoa" name="ultoa"> -->
|
|
<!-- <item><ref id="utoa" name="utoa"> -->
|
|
</itemize>
|
|
|
|
|
|
<sect1><tt/string.h/<label id="string.h"><p>
|
|
|
|
<itemize>
|
|
<!-- <item><ref id="_stroserror" name="_stroserror"> -->
|
|
<!-- <item><ref id="bzero" name="bzero"> -->
|
|
<!-- <item><ref id="memchr" name="memchr"> -->
|
|
<!-- <item><ref id="memcpy" name="memcpy"> -->
|
|
<!-- <item><ref id="memmove" name="memmove"> -->
|
|
<!-- <item><ref id="memset" name="memset"> -->
|
|
<!-- <item><ref id="strcasecmp" name="strcasecmp"> -->
|
|
<item><ref id="strcat" name="strcat">
|
|
<item><ref id="strchr" name="strchr">
|
|
<!-- <item><ref id="strcmp" name="strcmp"> -->
|
|
<!-- <item><ref id="strcoll" name="strcoll"> -->
|
|
<item><ref id="strcpy" name="strcpy">
|
|
<!-- <item><ref id="strcspn" name="strcspn"> -->
|
|
<!-- <item><ref id="strdup" name="strdup"> -->
|
|
<!-- <item><ref id="strerror" name="strerror"> -->
|
|
<!-- <item><ref id="stricmp" name="stricmp"> -->
|
|
<item><ref id="strlen" name="strlen">
|
|
<item><ref id="strlower" name="strlower">
|
|
<item><ref id="strlwr" name="strlwr">
|
|
<!-- <item><ref id="strncat" name="strncat"> -->
|
|
<!-- <item><ref id="strncmp" name="strncmp"> -->
|
|
<item><ref id="strncpy" name="strncpy">
|
|
<item><ref id="strrchr" name="strrchr">
|
|
<!-- <item><ref id="strspn" name="strspn"> -->
|
|
<!-- <item><ref id="strstr" name="strstr"> -->
|
|
<!-- <item><ref id="strtok" name="strtok"> -->
|
|
<!-- <item><ref id="strxfrm" name="strxfrm"> -->
|
|
<item><ref id="strupper" name="strupper">
|
|
<item><ref id="strupr" name="strupr">
|
|
</itemize>
|
|
|
|
|
|
|
|
|
|
<sect>Alphabetical function reference<p>
|
|
|
|
<sect1>_heapadd<label id="_heapadd"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Add a block to the heap.
|
|
<tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ _heapadd (void* mem, size_t size);/
|
|
<tag/Description/The function adds a block of raw memory to the heap.
|
|
<tag/Limits/
|
|
<itemize>
|
|
<item>The minimum blocksize that can be added is 6 bytes; the function will
|
|
ignore blocks with smaller sizes.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="_heapmaxavail" name="_heapmaxavail">,
|
|
<ref id="_heapmemavail" name="_heapmemavail">,
|
|
<ref id="calloc" name="calloc">,
|
|
<ref id="free" name="free">,
|
|
<ref id="malloc" name="malloc">,
|
|
<ref id="realloc" name="realloc">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>_heapmaxavail<label id="_heapmaxavail"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Return the largest block that is available on the heap.
|
|
<tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
|
|
<tag/Declaration/<tt/size_t __fastcall__ _heapmaxavail (void);/
|
|
<tag/Description/The function returns the size of the largest block that may
|
|
be allocated from the heap using <tt/<ref id="malloc" name="malloc">/.
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="_heapadd" name="_heapadd">,
|
|
<ref id="_heapmemavail" name="_heapmemavail">,
|
|
<ref id="calloc" name="calloc">,
|
|
<ref id="free" name="free">,
|
|
<ref id="malloc" name="malloc">,
|
|
<ref id="realloc" name="realloc">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>_heapmemavail<label id="_heapmemavail"><p>
|
|
|
|
<quote>
|
|
<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/Description/The function returns the total number of bytes available on
|
|
the heap.
|
|
<tag/Limits/
|
|
<itemize>
|
|
<item>This function is of less use than usually assumed, since the returned
|
|
heap space may be available but not in one block. So even if this function
|
|
says that several times more heap space is available than needed, <ref
|
|
id="malloc" name="malloc"> may still return <tt/NULL/.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="_heapadd" name="_heapadd">,
|
|
<ref id="_heapmaxavail" name="_heapmaxavail">,
|
|
<ref id="calloc" name="calloc">,
|
|
<ref id="free" name="free">,
|
|
<ref id="malloc" name="malloc">,
|
|
<ref id="realloc" name="realloc">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>_randomize<label id="_randomize"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Initialize the pseudo random number generator.
|
|
<tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
|
|
<tag/Declaration/<tt/void _randomize (void);/
|
|
<tag/Description/The function initializes the random number generator with
|
|
a seed derived from fast changing hardware events, so the seed itself can be
|
|
considered random to a certain degree.
|
|
<tag/Limits/<itemize>
|
|
<item>The randomness of the seed depends on the machine hardware.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="rand" name="rand">,
|
|
<ref id="srand" name="srand">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>_sys<label id="_sys"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Call a subroutine passing register values.
|
|
<tag/Header/<tt/<ref id="6502.h" name="6502.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ _sys (struct regs* r);/
|
|
<tag/Description/The function will call the subroutine at the address
|
|
specified in the <tt/pc/ member of the passed <tt/regs/ structure. All
|
|
registers and the CPU flags are set to the values given in the <tt/regs/
|
|
structure. On return from the subroutine, the new values of the registers and
|
|
flags are stored back overwriting the old values.
|
|
<tag/Limits/<itemize>
|
|
<item>Bits 4 and 5 of the flags value in the <tt/regs/ structure are ignored
|
|
when calling the subroutine (they are unchanged from their current values).
|
|
<item>The function is only available as fastcall function, so it may only be
|
|
used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>BRK<label id="BRK"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Insert a 6502 BRK instrunction into the code.
|
|
<tag/Header/<tt/<ref id="6502.h" name="6502.h">/
|
|
<tag/Declaration/<tt/void BRK (void);/
|
|
<tag/Description/The function will insert a 6502 BRK instruction into the code
|
|
which may be used to trigger a debugger.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is actually a macro.
|
|
<item>The inserted instruction may lead to unexpected results if no debugger
|
|
is present.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="CLI" name="CLI">,
|
|
<ref id="SEI" name="SEI">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>CLI<label id="CLI"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Insert a 6502 CLI instrunction into the code.
|
|
<tag/Header/<tt/<ref id="6502.h" name="6502.h">/
|
|
<tag/Declaration/<tt/void CLI (void);/
|
|
<tag/Description/The function will insert a 6502 CLI instruction into the code,
|
|
so interrupts are disabled. Note that non maskable interrupts cannot be
|
|
disabled.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is actually a macro.
|
|
<item>Disabling interrupts may lead to unexpected results.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="BRK" name="BRK">,
|
|
<ref id="SEI" name="SEI">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>SEI<label id="SEI"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Insert a 6502 SEI instrunction into the code.
|
|
<tag/Header/<tt/<ref id="6502.h" name="6502.h">/
|
|
<tag/Declaration/<tt/void SEI (void);/
|
|
<tag/Description/The function will insert a 6502 SEI instruction into the code,
|
|
so interrupts are enabled. Enabling interrupts has no effects if they are
|
|
already enabled (the default).
|
|
<tag/Limits/<itemize>
|
|
<item>The function is actually a macro.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="BRK" name="BRK">,
|
|
<ref id="CLI" name="CLI">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>abort<label id="abort"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Terminates a program abnormally.
|
|
<tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
|
|
<tag/Declaration/<tt/void abort (void);/
|
|
<tag/Description/<tt/abort/ writes a termination message on stderr, then
|
|
terminates the program with an exit code of 3.
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="assert" name="assert">,
|
|
<ref id="exit" name="exit">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>abs<label id="abs"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Returns the absolute value of an integer.
|
|
<tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
|
|
<tag/Declaration/<tt/int __fastcall__ abs (int v);/
|
|
<tag/Description/<tt/abs/ returns the absolute value of the argument passed to
|
|
the function.
|
|
<tag/Limits/<itemize>
|
|
<item>The return value is undefined if <tt/INT_MIN/ is passed to the function.
|
|
<item>The function is only available as fastcall function, so it may only be
|
|
used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="labs" name="labs">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>assert<label id="assert"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Test a condition and possibly abort.
|
|
<tag/Header/<tt/<ref id="assert.h" name="assert.h">/
|
|
<tag/Declaration/<tt/void assert (int cond);/
|
|
<tag/Description/<tt/assert/ is a macro that expands to a <tt/id/
|
|
statement. If the condition evaluates t zero (false), assert prints a message
|
|
on stderr and aborts the program.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is actually a macro.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="abort" name="abort">,
|
|
<ref id="exit" name="exit">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>atexit<label id="atexit"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Register an exit function.
|
|
<tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
|
|
<tag/Declaration/<tt/int __fastcall__ atexit (void (*exitfunc) (void));/
|
|
<tag/Description/<tt/atexit/ registers the function pointed to by
|
|
<tt/exitfunc/ as an exit function. Exit functions are called when the program
|
|
terminates, they are called in LIFO order (the last function registered is
|
|
called first). <tt/atexit/ returns zero on success and a nonzero value on
|
|
failure.
|
|
<tag/Limits/<itemize>
|
|
<item>A maximum of 5 exit functions can be registered.
|
|
<item>There is no way to unregister an exit function.
|
|
<item>The function is only available as fastcall function, so it may only be
|
|
used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="abort" name="abort">,
|
|
<ref id="exit" name="exit">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>bgcolor<label id="bgcolor"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Set the background text color.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/unsigned char __fastcall__ bgcolor (unsigned char color);/
|
|
<tag/Description/The function will set a new background text color. It returns
|
|
the old (current) background color.
|
|
<tag/Limits/<itemize>
|
|
<item>Background colors are system dependent. The function may have no effect
|
|
on systems where the background color cannot be changed.
|
|
<item>The function is only available as fastcall function, so it may only be
|
|
used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="bordercolor" name="bordercolor">,
|
|
<ref id="textcolor" name="textcolor">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>bordercolor<label id="bordercolor"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Set the border (frame) color.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/unsigned char __fastcall__ bordercolor (unsigned char color);/
|
|
<tag/Description/The function will set a new border color. It returns the old
|
|
(current) border color.
|
|
<tag/Limits/<itemize>
|
|
<item>Border colors are system dependent. The function may have no effect
|
|
on systems where the border color cannot be changed.
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="bgcolor" name="bgcolor">,
|
|
<ref id="textcolor" name="textcolor">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>c64mode<label id="c64mode"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Switch the C128 into C64 compatible mode.
|
|
<tag/Header/<tt/<ref id="c128.h" name="c128.h">/
|
|
<tag/Declaration/<tt/void c64mode (void);/
|
|
<tag/Description/The function will cause the machine to reboot into C64 mode.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is specific to the C128.
|
|
<item>The function will not return to the caller.
|
|
</itemize>
|
|
<tag/Availability/C128
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>calloc<label id="calloc"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Allocate and clear memory.
|
|
<tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
|
|
<tag/Declaration/<tt/void* __fastcall__ calloc (size_t n, size_t size);/
|
|
<tag/Description/<tt/calloc/ allocates memory for an array of <tt/n/ elements
|
|
of size <tt/size/, clears the whole block with binary zeroes and returns a
|
|
pointer to it. On error (not enough memory available), <tt/calloc/ returns
|
|
<tt/NULL/.
|
|
<tag/Limits/
|
|
<itemize>
|
|
<item>Clearing the memory may not have the expected effect on all platforms:
|
|
pointers in the block may not be <tt/NULL/ and floating point variables may
|
|
not be zero (0.0). In other words: The "clearing" effect of this function
|
|
should be used with care for portable programs.
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="_heapadd" name="_heapadd">,
|
|
<ref id="_heapmaxavail" name="_heapmaxavail">,
|
|
<ref id="_heapmemavail" name="_heapmemavail">,
|
|
<ref id="free" name="free">,
|
|
<ref id="malloc" name="malloc">,
|
|
<ref id="realloc" name="realloc">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>cclear<label id="cclear"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Clear part of a line (write a given amount of spaces).
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ cclear (unsigned char length);/
|
|
<tag/Description/The function clears part of a line by writing <tt/length/
|
|
spaces in the current text color.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may
|
|
only be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="cclearxy" name="cclearxy">,
|
|
<ref id="clrscr" name="clrscr">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>cclearxy<label id="cclearxy"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Clear part of a line (write a given amount of spaces) starting
|
|
at a specific screen position.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ cclearxy (unsigned char length);/
|
|
<tag/Description/The function moves the cursor to a specific position, and
|
|
will then clear part of the line by writing <tt/length/ spaces in the current
|
|
text color.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may
|
|
only be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="cclear" name="cclear">,
|
|
<ref id="clrscr" name="clrscr">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>cgetc<label id="cgetc"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Read a character from the keyboard.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/char cgetc (void);/
|
|
<tag/Description/The function reads a character from the keyboard. If there is
|
|
no character available, <tt/cgetc/ waits until the user presses a key. If the
|
|
cursor is enabled by use of the <tt/cursor/ function, a blinking cursor is
|
|
displayed while waiting.
|
|
<tag/Limits/<itemize>
|
|
<item>If the system supports a keyboard buffer, <tt/cgetc/ will fetch a key
|
|
from this buffer and wait only if the buffer is empty.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="cursor" name="cursor">,
|
|
<ref id="kbhit" name="kbhit">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>chline<label id="chline"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Output a horizontal line in text mode.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ chline (unsigned char length);/
|
|
<tag/Description/The function outputs a horizontal line with the given length
|
|
starting at the current cursor position.
|
|
<tag/Limits/<itemize>
|
|
<item>The character used to draw the horizontal line is system dependent.
|
|
If available, a line drawing character is used. Drawing a line that is partially
|
|
off screen leads to undefined behaviour.
|
|
<item>The function is only available as fastcall function, so it may only be
|
|
used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="chlinexy" name="chlinexy">,
|
|
<ref id="cvline" name="cvline">,
|
|
<ref id="cvlinexy" name="cvlinexy">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>chlinexy<label id="chlinexy"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Output a horizontal line at a given position in text mode.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ chlinexy (unsigned char x, unsigned char y, unsigned char length);/
|
|
<tag/Description/The function outputs a horizontal line with the given length
|
|
starting at a given position.
|
|
<tag/Limits/<itemize>
|
|
<item>The character used to draw the horizontal line is system dependent.
|
|
If available, a line drawing character is used. Drawing a line that is partially
|
|
off screen leads to undefined behaviour.
|
|
<item>The function is only available as fastcall function, so it may only be
|
|
used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="chline" name="chline">,
|
|
<ref id="cvline" name="cvline">,
|
|
<ref id="cvlinexy" name="cvlinexy">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>clrscr<label id="clrscr"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Clear the text screen.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/void clrscr (void);/
|
|
<tag/Description/The function clears the text screen and moves the cursor to
|
|
the upper left corner.
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="cclear" name="cclear">,
|
|
<ref id="cclearxy" name="cclearxy">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>cursor<label id="cursor"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Enable/disable a blinking cursor when waiting for keyboard input.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/unsigned char __fastcall__ cursor (unsigned char onoff);/
|
|
<tag/Description/If the argument to the function is non zero, a blinking cursor
|
|
will be enabled when the <tt/cgetc/ function waits for input from the keyboard.
|
|
If the argument is zero, <tt/cgetc/ will wait without a blinking cursor.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="cgetc" name="cgetc">,
|
|
<ref id="kbhit" name="kbhit">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>cvline<label id="cvline"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Output a vertical line in text mode.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ cvline (unsigned char length);/
|
|
<tag/Description/The function outputs a vertical line with the given length
|
|
starting at the current cursor position.
|
|
<tag/Limits/<itemize>
|
|
<item>The character used to draw the vertical line is system dependent.
|
|
If available, a line drawing character is used. Drawing a line that is partially
|
|
off screen leads to undefined behaviour.
|
|
<item>The function is only available as fastcall function, so it may only be
|
|
used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="chline" name="chline">,
|
|
<ref id="chlinexy" name="chlinexy">,
|
|
<ref id="cvlinexy" name="cvlinexy">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>cvlinexy<label id="cvlinexy"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Output a vertical line at a given position in text mode.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ cvlinexy (unsigned char x, unsigned char y, unsigned char length);/
|
|
<tag/Description/The function outputs a vertical line with the given length
|
|
starting at a given position.
|
|
<tag/Limits/<itemize>
|
|
<item>The character used to draw the vertical line is system dependent.
|
|
If available, a line drawing character is used. Drawing a line that is partially
|
|
off screen leads to undefined behaviour.
|
|
<item>The function is only available as fastcall function, so it may only be
|
|
used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="chline" name="chline">,
|
|
<ref id="chlinexy" name="chlinexy">,
|
|
<ref id="cvline" name="cvline">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>em_commit<label id="em_commit"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Commit changes into extended memory.
|
|
<tag/Header/<tt/<ref id="em.h" name="em.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ em_commit (void);/
|
|
<tag/Description/Commit changes in the memory window to extended storage. If
|
|
the contents of the memory window have been changed, these changes may be lost
|
|
if <tt/<ref id="em_map" name="em_map">/, <tt/<ref id="em_use" name="em_use">/,
|
|
<tt/<ref id="em_copyfrom" name="em_copyfrom">/ or <tt/<ref id="em_copyto"
|
|
name="em_copyto">/ are called without calling <tt/em_commit/ first.
|
|
<tag/Limits/<itemize>
|
|
<item>Calling <tt/em_commit/ does not necessarily mean that changes to the
|
|
memory window are discarded, it does just mean that the drivers is allowed
|
|
to discard it.
|
|
<item>The function is only available as fastcall function, so it may only be
|
|
used in presence of a prototype.
|
|
<item>The function produces undefined results if no extended memory driver is
|
|
loaded.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="em_load_driver" name="em_load_driver">,
|
|
<ref id="em_map" name="em_map">,
|
|
<ref id="em_use" name="em_use">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>em_copyfrom<label id="em_copyfrom"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Copy from extended into normal memory.
|
|
<tag/Header/<tt/<ref id="em.h" name="em.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ em_copyfrom (const struct em_copy* copy_data);/
|
|
<tag/Description/Copy data from extended memory into linear memory. Source and
|
|
target addresses as well as the number of bytes to transfer are specified in
|
|
the <tt/em_copy/ structure that is passed as a parameter.
|
|
<tag/Limits/<itemize>
|
|
<item>Calling <tt/em_copyfrom/ will invalidate the memory window, so if you
|
|
made any changes to the data in the window, call <tt/<ref id="em_commit"
|
|
name="em_commit">/ first, or the changes are lost.
|
|
<item>The function is only available as fastcall function, so it may only be
|
|
used in presence of a prototype.
|
|
<item>The function produces undefined results if no extended memory driver is
|
|
loaded.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="em_commit" name="em_commit">,
|
|
<ref id="em_copyto" name="em_copyto">,
|
|
<ref id="em_load_driver" name="em_load_driver">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>em_copyto<label id="em_copyto"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Copy from normal into extended memory.
|
|
<tag/Header/<tt/<ref id="em.h" name="em.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ em_copyto (const struct em_copy* copy_data);/
|
|
<tag/Description/Copy data from linear into extended memory. Source and
|
|
target addresses as well as the number of bytes to transfer are specified in
|
|
the <tt/em_copy/ structure that is passed as a parameter.
|
|
<tag/Limits/<itemize>
|
|
<item>Calling <tt/em_copyto/ will invalidate the memory window, so if you
|
|
made any changes to the data in the window, call <tt/<ref id="em_commit"
|
|
name="em_commit">/ first, or the changes are lost.
|
|
<item>The function is only available as fastcall function, so it may only be
|
|
used in presence of a prototype.
|
|
<item>The function produces undefined results if no extended memory driver is
|
|
loaded.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="em_commit" name="em_commit">,
|
|
<ref id="em_copyfrom" name="em_copyfrom">,
|
|
<ref id="em_load_driver" name="em_load_driver">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>em_load_driver<label id="em_load_driver"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Load and initialize an extended memory driver.
|
|
<tag/Header/<tt/<ref id="em.h" name="em.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ em_load_driver (const char* name);/
|
|
<tag/Description/Load an extended memory driver into memory and initialize
|
|
it. The function returns an error code that tells if all this has been
|
|
successful.
|
|
<tag/Limits/<itemize>
|
|
<item>Not all drivers are able to detect if the supported hardware is really
|
|
present.
|
|
<item>The function is only available as fastcall function, so it may only be
|
|
used in presence of a prototype.
|
|
<item>The driver is loaded by name, so currently you must know the type of
|
|
extended memory that should be supported. There is no autodetect capability.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="em_unload" name="em_unload">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>em_map<label id="em_map"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Make a page of extended memory accessible.
|
|
<tag/Header/<tt/<ref id="em.h" name="em.h">/
|
|
<tag/Declaration/<tt/void* __fastcall__ em_map (unsigned page);/
|
|
<tag/Description/The function maps one page of extended memory into linear
|
|
memory and returns a pointer to the page frame. Depending on the hardware
|
|
and driver, the data is either mapped into the address space or transfered
|
|
into a buffer. If you don't need the actual contents of the page (for example
|
|
because you're going to overwrite it completely, it is better to call
|
|
<tt/<ref id="em_use" name="em_use">/ instead. <tt/em_use/ will not transfer the
|
|
data if it is possible to avoid that.
|
|
<tag/Limits/<itemize>
|
|
<item>Calling <tt/em_map/ will invalidate the memory window, so if you
|
|
made any changes to the data in the window, call <tt/<ref id="em_commit"
|
|
name="em_commit">/ first, or the changes are lost.
|
|
<item>The function is only available as fastcall function, so it may only be
|
|
used in presence of a prototype.
|
|
<item>The function produces undefined results if no extended memory driver is
|
|
loaded.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="em_commit" name="em_commit">,
|
|
<ref id="em_load_driver" name="em_load_driver">,
|
|
<ref id="em_use" name="em_use">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>em_pagecount<label id="em_pagecount"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Return the number of available extended memory pages.
|
|
<tag/Header/<tt/<ref id="em.h" name="em.h">/
|
|
<tag/Declaration/<tt/unsigned __fastcall__ em_pagecount (void);/
|
|
<tag/Description/The function returns the size of the extended memory supported
|
|
by the driver in 256 byte pages.
|
|
<tag/Limits/<itemize>
|
|
<item>The function returns zero if no extended memory driver is loaded.
|
|
<item>The function may return zero if the supported hardware was not detected.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="em_load_driver" name="em_load_driver">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>em_unload<label id="em_unload"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Unload an extended memory driver.
|
|
<tag/Header/<tt/<ref id="em.h" name="em.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ em_unload (void);/
|
|
<tag/Description/The function unloads a loaded extended memory driver and
|
|
frees all memory allocated for the driver.
|
|
<tag/Limits/<itemize>
|
|
<item>The function does nothing if no driver is loaded.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="em_load_driver" name="em_load_driver">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>em_use<label id="em_use"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Prepare an extended memory page for use.
|
|
<tag/Header/<tt/<ref id="em.h" name="em.h">/
|
|
<tag/Declaration/<tt/void* __fastcall__ em_use (unsigned page);/
|
|
<tag/Description/The function maps one page of extended memory into linear
|
|
memory and returns a pointer to the page frame. This function is similar to
|
|
<tt/<ref id="em_map" name="em_map">/, but will not transfer data into the
|
|
actual memory window in the assumption that the existing data is wrong or
|
|
will get overwritten.
|
|
<tag/Limits/<itemize>
|
|
<item>Calling <tt/em_use/ will invalidate the memory window, so if you
|
|
made any changes to the data in the window, call <tt/<ref id="em_commit"
|
|
name="em_commit">/ first, or the changes are lost.
|
|
<item>The function is only available as fastcall function, so it may only be
|
|
used in presence of a prototype.
|
|
<item>The function produces undefined results if no extended memory driver is
|
|
loaded.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="em_commit" name="em_commit">,
|
|
<ref id="em_load_driver" name="em_load_driver">,
|
|
<ref id="em_map" name="em_map">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>exit<label id="exit"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Terminate the program.
|
|
<tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ exit (int status);/
|
|
<tag/Description/<tt/exit/ terminates the program. The argument specifies the
|
|
return code of the program. Before termination, all files are closed, buffered
|
|
output is written and any functions registered with <tt/<ref id="atexit"
|
|
name="atexit">/ are called. Common values for status are <tt/EXIT_SUCCESS/ and
|
|
<tt/EXIT_FAILURE/ which are also defined in <tt/<ref id="stdlib.h"
|
|
name="stdlib.h">/.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype.
|
|
<item>It depends on the host machine if the program return code can be
|
|
evaluated or is ignored.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="abort" name="abort">,
|
|
<ref id="exit" name="exit">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>fast<label id="fast"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Switch the C128 into 2MHz mode.
|
|
<tag/Header/<tt/<ref id="c128.h" name="c128.h">/
|
|
<tag/Declaration/<tt/void fast (void);/
|
|
<tag/Description/The function will switch the clock of the C128 to 2MHz. This
|
|
will nearly double the speed compared to slow mode.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is specific to the C128.
|
|
<item>2MHz clock will not work in 40 column mode.
|
|
</itemize>
|
|
<tag/Availability/C128
|
|
<tag/See also/
|
|
<ref id="slow" name="slow">,
|
|
<ref id="toggle_videomode" name="toggle_videomode">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>free<label id="free"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Free a block of dynamic memory.
|
|
<tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ free (void* block);/
|
|
<tag/Description/Free a block of dynamic memory previously allocated with
|
|
<tt/<ref id="malloc" name="malloc">/, <tt/<ref id="calloc" name="calloc">/
|
|
or <tt/<ref id="realloc" name="realloc">/. As an exception, if the passed
|
|
pointer is <tt/NULL/, no action is performed.
|
|
<tag/Limits/
|
|
<itemize>
|
|
<item>Passing an already free'd block to <tt/free/ again will cause undefined
|
|
behaviour and may crash your program.
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="_heapadd" name="_heapadd">,
|
|
<ref id="_heapmaxavail" name="_heapmaxavail">,
|
|
<ref id="_heapmemavail" name="_heapmemavail">,
|
|
<ref id="calloc" name="calloc">,
|
|
<ref id="malloc" name="malloc">,
|
|
<ref id="realloc" name="realloc">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>getcpu<label id="getcpu"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Determine on which CPU the program is running.
|
|
<tag/Header/<tt/<ref id="6502.h" name="6502.h">/
|
|
<tag/Declaration/<tt/unsigned char getcpu (void);/
|
|
<tag/Description/The function checks on which CPU the code is running. It
|
|
returns one of the constants<itemize>
|
|
<item><tt/CPU_6502/
|
|
<item><tt/CPU_65C02/
|
|
<item><tt/CPU_65816/
|
|
</itemize>
|
|
<tag/Limits/<itemize>
|
|
<item>Other, more exotic CPU types are not disinguished.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>gotox<label id="gotox"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Move the text mode cursor to a new X position.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ gotox (unsigned char x);/
|
|
<tag/Description/The function moves the text mode cursor to the specified X
|
|
position while leaving the Y position untouched. The leftmost position on the
|
|
screen has the coordinate 0.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may
|
|
only be used in presence of a prototype.
|
|
<item>Invalid values for the X position (out of screen coordinates) may
|
|
lead to undefined behaviour.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="gotoy" name="gotoy">,
|
|
<ref id="gotoxy" name="gotoxy">,
|
|
<ref id="wherex" name="wherex">,
|
|
<ref id="wherey" name="wherey">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>gotoxy<label id="gotoxy"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Move the text mode cursor to a new position.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ gotoxy (unsigned char x, unsigned char y);/
|
|
<tag/Description/The function moves the text mode cursor to the specified
|
|
position. The leftmost position on the screen has the X coordinate 0, the
|
|
topmost line has the Y coordinate 0.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may only be
|
|
used in presence of a prototype.
|
|
<item>Invalid values for any of both coordinates (out of screen positions) may
|
|
lead to undefined behaviour.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="gotox" name="gotox">,
|
|
<ref id="gotoy" name="gotoy">,
|
|
<ref id="wherex" name="wherex">,
|
|
<ref id="wherey" name="wherey">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>gotoy<label id="gotoy"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Move the text mode cursor to a new Y position.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ gotoy (unsigned char x);/
|
|
<tag/Description/The function moves the text mode cursor to the specified Y
|
|
position while leaving the X position untouched. The uppermost position on the
|
|
screen has the coordinate 0.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may
|
|
only be used in presence of a prototype.
|
|
<item>Invalid values for the Y position (out of screen coordinates) may lead
|
|
to undefined behaviour.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="gotox" name="gotox">,
|
|
<ref id="gotoxy" name="gotoxy">,
|
|
<ref id="wherex" name="wherex">,
|
|
<ref id="wherey" name="wherey">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>isalnum<label id="isalnum"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Check if a given character is a letter or digit.
|
|
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
|
|
<tag/Declaration/<tt/int __fastcall__ isalnum (int c);/
|
|
<tag/Description/The function returns a value of zero if the given argument
|
|
is a letter or digit. The return value is non zero if the character
|
|
is anything else.
|
|
<tag/Limits/<itemize>
|
|
<item>When compiling with <tt/-Os/ the function is actually a macro. The
|
|
inline sequence generated by the macro will not work correctly for values
|
|
outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
|
|
this range. The non inline function may be accessed by <tt/#undef/'ing
|
|
the macro.
|
|
<item>When compiling without <tt/-Os/, the function is only available as
|
|
fastcall function, so it may only be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="isalpha" name="isalpha">,
|
|
<ref id="isascii" name="isascii">,
|
|
<ref id="isblank" name="isblank">,
|
|
<ref id="iscntrl" name="iscntrl">,
|
|
<ref id="isdigit" name="isdigit">,
|
|
<ref id="isgraph" name="isgraph">,
|
|
<ref id="islower" name="islower">,
|
|
<ref id="isprint" name="isprint">,
|
|
<ref id="ispunct" name="ispunct">,
|
|
<ref id="isspace" name="isspace">,
|
|
<ref id="isupper" name="isupper">,
|
|
<ref id="isxdigit" name="isxdigit">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>isalpha<label id="isalpha"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Check if a given character is a letter.
|
|
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
|
|
<tag/Declaration/<tt/int __fastcall__ isalpha (int c);/
|
|
<tag/Description/The function returns a value of zero if the given argument
|
|
is a letter. The return value is non zero if the character is anything else.
|
|
<tag/Limits/<itemize>
|
|
<item>When compiling with <tt/-Os/ the function is actually a macro. The
|
|
inline sequence generated by the macro will not work correctly for values
|
|
outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
|
|
this range. The non inline function may be accessed by <tt/#undef/'ing the
|
|
macro.
|
|
<item>When compiling without <tt/-Os/, the function is only available as
|
|
fastcall function, so it may only be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="isalnum" name="isalnum">,
|
|
<ref id="isascii" name="isascii">,
|
|
<ref id="isblank" name="isblank">,
|
|
<ref id="iscntrl" name="iscntrl">,
|
|
<ref id="isdigit" name="isdigit">,
|
|
<ref id="isgraph" name="isgraph">,
|
|
<ref id="islower" name="islower">,
|
|
<ref id="isprint" name="isprint">,
|
|
<ref id="ispunct" name="ispunct">,
|
|
<ref id="isspace" name="isspace">,
|
|
<ref id="isupper" name="isupper">,
|
|
<ref id="isxdigit" name="isxdigit">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>isascii<label id="isascii"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Check if a given character is in the ASCII (0..127) range.
|
|
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
|
|
<tag/Declaration/<tt/int __fastcall__ isascii (int c);/
|
|
<tag/Description/The function returns a value of zero if the given argument
|
|
is in the range 0..127 (the range of valid ASCII characters) and a non zero
|
|
value if not.
|
|
<tag/Limits/<itemize>
|
|
<item>When compiling with <tt/-Os/ the function is actually a macro. The
|
|
inline sequence generated by the macro will not work correctly for values
|
|
outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
|
|
this range. The non inline function may be accessed by <tt/#undef/'ing the
|
|
macro.
|
|
<item>When compiling without <tt/-Os/, the function is only available as
|
|
fastcall function, so it may only be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="isalnum" name="isalnum">,
|
|
<ref id="isalpha" name="isalpha">,
|
|
<ref id="isblank" name="isblank">,
|
|
<ref id="iscntrl" name="iscntrl">,
|
|
<ref id="isdigit" name="isdigit">,
|
|
<ref id="isgraph" name="isgraph">,
|
|
<ref id="islower" name="islower">,
|
|
<ref id="isprint" name="isprint">,
|
|
<ref id="ispunct" name="ispunct">,
|
|
<ref id="isspace" name="isspace">,
|
|
<ref id="isupper" name="isupper">,
|
|
<ref id="isxdigit" name="isxdigit">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>isblank<label id="isblank"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Check if a given character is a space or tab.
|
|
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
|
|
<tag/Declaration/<tt/int __fastcall__ isblank (int c);/
|
|
<tag/Description/The function returns a value of zero if the given argument
|
|
is a blank or space character. The return value is non zero if the character
|
|
is anything else.
|
|
<tag/Limits/<itemize>
|
|
<item>When compiling with <tt/-Os/ the function is actually a macro. The
|
|
inline sequence generated by the macro will not work correctly for values
|
|
outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
|
|
this range. The non inline function may be accessed by <tt/#undef/'ing the
|
|
macro.
|
|
<item>When compiling without <tt/-Os/, the function is only available as
|
|
fastcall function, so it may only be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="isalnum" name="isalnum">,
|
|
<ref id="isalpha" name="isalpha">,
|
|
<ref id="isascii" name="isascii">,
|
|
<ref id="iscntrl" name="iscntrl">,
|
|
<ref id="isdigit" name="isdigit">,
|
|
<ref id="isgraph" name="isgraph">,
|
|
<ref id="islower" name="islower">,
|
|
<ref id="isprint" name="isprint">,
|
|
<ref id="ispunct" name="ispunct">,
|
|
<ref id="isspace" name="isspace">,
|
|
<ref id="isupper" name="isupper">,
|
|
<ref id="isxdigit" name="isxdigit">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>iscntrl<label id="iscntrl"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Check if a given character is a control character.
|
|
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
|
|
<tag/Declaration/<tt/int __fastcall__ iscntrl (int c);/
|
|
<tag/Description/The function returns a value of zero if the given argument
|
|
is a control character. The return value is non zero if the character
|
|
is anything else.
|
|
<tag/Limits/<itemize>
|
|
<item>When compiling with <tt/-Os/ the function is actually a macro. The
|
|
inline sequence generated by the macro will not work correctly for values
|
|
outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
|
|
this range. The non inline function may be accessed by <tt/#undef/'ing the
|
|
macro.
|
|
<item>When compiling without <tt/-Os/, the function is only available as
|
|
fastcall function, so it may only be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="isalnum" name="isalnum">,
|
|
<ref id="isalpha" name="isalpha">,
|
|
<ref id="isascii" name="isascii">,
|
|
<ref id="isblank" name="isblank">,
|
|
<ref id="isdigit" name="isdigit">,
|
|
<ref id="isgraph" name="isgraph">,
|
|
<ref id="islower" name="islower">,
|
|
<ref id="isprint" name="isprint">,
|
|
<ref id="ispunct" name="ispunct">,
|
|
<ref id="isspace" name="isspace">,
|
|
<ref id="isupper" name="isupper">,
|
|
<ref id="isxdigit" name="isxdigit">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>isdigit<label id="isdigit"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Check if a given character is a digit.
|
|
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
|
|
<tag/Declaration/<tt/int __fastcall__ isdigit (int c);/
|
|
<tag/Description/The function returns a value of zero if the given argument
|
|
is a digit. The return value is non zero if the character is anything else.
|
|
<tag/Limits/<itemize>
|
|
<item>When compiling with <tt/-Os/ the function is actually a macro. The
|
|
inline sequence generated by the macro will not work correctly for values
|
|
outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
|
|
this range. The non inline function may be accessed by <tt/#undef/'ing the
|
|
macro.
|
|
<item>When compiling without <tt/-Os/, the function is only available as
|
|
fastcall function, so it may only be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="isalnum" name="isalnum">,
|
|
<ref id="isalpha" name="isalpha">,
|
|
<ref id="isascii" name="isascii">,
|
|
<ref id="isblank" name="isblank">,
|
|
<ref id="iscntrl" name="iscntrl">,
|
|
<ref id="isgraph" name="isgraph">,
|
|
<ref id="islower" name="islower">,
|
|
<ref id="isprint" name="isprint">,
|
|
<ref id="ispunct" name="ispunct">,
|
|
<ref id="isspace" name="isspace">,
|
|
<ref id="isupper" name="isupper">,
|
|
<ref id="isxdigit" name="isxdigit">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>isgraph<label id="isgraph"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Check if a given character is a printable character (except
|
|
space).
|
|
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
|
|
<tag/Declaration/<tt/int __fastcall__ isgraph (int c);/
|
|
<tag/Description/The function returns a value of zero if the given argument
|
|
is a printable character with the exception of space. The return value is non
|
|
zero if the character is anything else.
|
|
<tag/Limits/<itemize>
|
|
<item>When compiling with <tt/-Os/ the function is actually a macro. The
|
|
inline sequence generated by the macro will not work correctly for values
|
|
outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
|
|
this range. The non inline function may be accessed by <tt/#undef/'ing the
|
|
macro.
|
|
<item>When compiling without <tt/-Os/, the function is only available as
|
|
fastcall function, so it may only be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="isalnum" name="isalnum">,
|
|
<ref id="isalpha" name="isalpha">,
|
|
<ref id="isascii" name="isascii">,
|
|
<ref id="isblank" name="isblank">,
|
|
<ref id="iscntrl" name="iscntrl">,
|
|
<ref id="isdigit" name="isdigit">,
|
|
<ref id="islower" name="islower">,
|
|
<ref id="isprint" name="isprint">,
|
|
<ref id="ispunct" name="ispunct">,
|
|
<ref id="isspace" name="isspace">,
|
|
<ref id="isupper" name="isupper">,
|
|
<ref id="isxdigit" name="isxdigit">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>islower<label id="islower"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Check if a given character is a lower case letter.
|
|
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
|
|
<tag/Declaration/<tt/int __fastcall__ islower (int c);/
|
|
<tag/Description/The function returns a value of zero if the given argument
|
|
is a lower case letter. The return value is non zero if the character is
|
|
anything else.
|
|
<tag/Limits/<itemize>
|
|
<item>When compiling with <tt/-Os/ the function is actually a macro. The
|
|
inline sequence generated by the macro will not work correctly for values
|
|
outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
|
|
this range. The non inline function may be accessed by <tt/#undef/'ing the
|
|
macro.
|
|
<item>When compiling without <tt/-Os/, the function is only available as
|
|
fastcall function, so it may only be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="isalnum" name="isalnum">,
|
|
<ref id="isalpha" name="isalpha">,
|
|
<ref id="isascii" name="isascii">,
|
|
<ref id="isblank" name="isblank">,
|
|
<ref id="iscntrl" name="iscntrl">,
|
|
<ref id="isdigit" name="isdigit">,
|
|
<ref id="isgraph" name="isgraph">,
|
|
<ref id="isprint" name="isprint">,
|
|
<ref id="ispunct" name="ispunct">,
|
|
<ref id="isspace" name="isspace">,
|
|
<ref id="isupper" name="isupper">,
|
|
<ref id="isxdigit" name="isxdigit">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>isprint<label id="isprint"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Check if a given character is a printable character.
|
|
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
|
|
<tag/Declaration/<tt/int __fastcall__ isprint (int c);/
|
|
<tag/Description/The function returns a value of zero if the given argument
|
|
is a printable character (this includes the space character). The return value
|
|
is non zero if the character is anything else.
|
|
<tag/Limits/<itemize>
|
|
<item>When compiling with <tt/-Os/ the function is actually a macro. The
|
|
inline sequence generated by the macro will not work correctly for values
|
|
outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
|
|
this range. The non inline function may be accessed by <tt/#undef/'ing the
|
|
macro.
|
|
<item>When compiling without <tt/-Os/, the function is only available as
|
|
fastcall function, so it may only be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="isalnum" name="isalnum">,
|
|
<ref id="isalpha" name="isalpha">,
|
|
<ref id="isascii" name="isascii">,
|
|
<ref id="isblank" name="isblank">,
|
|
<ref id="iscntrl" name="iscntrl">,
|
|
<ref id="isdigit" name="isdigit">,
|
|
<ref id="isgraph" name="isgraph">,
|
|
<ref id="islower" name="islower">,
|
|
<ref id="ispunct" name="ispunct">,
|
|
<ref id="isspace" name="isspace">,
|
|
<ref id="isupper" name="isupper">,
|
|
<ref id="isxdigit" name="isxdigit">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>ispunct<label id="ispunct"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Check if a given character is a printable character but not a
|
|
space or an alphanumeric character.
|
|
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
|
|
<tag/Declaration/<tt/int __fastcall__ ispunct (int c);/
|
|
<tag/Description/The function returns a value of zero if the given argument
|
|
is a printable character, but not a space or anything alphanumeric. The return
|
|
value is non zero if the character is anything else.
|
|
<tag/Limits/<itemize>
|
|
<item>When compiling with <tt/-Os/ the function is actually a macro. The
|
|
inline sequence generated by the macro will not work correctly for values
|
|
outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
|
|
this range. The non inline function may be accessed by <tt/#undef/'ing the
|
|
macro.
|
|
<item>When compiling without <tt/-Os/, the function is only available as
|
|
fastcall function, so it may only be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="isalnum" name="isalnum">,
|
|
<ref id="isalpha" name="isalpha">,
|
|
<ref id="isascii" name="isascii">,
|
|
<ref id="isblank" name="isblank">,
|
|
<ref id="iscntrl" name="iscntrl">,
|
|
<ref id="isdigit" name="isdigit">,
|
|
<ref id="isgraph" name="isgraph">,
|
|
<ref id="islower" name="islower">,
|
|
<ref id="isprint" name="isprint">,
|
|
<ref id="isspace" name="isspace">,
|
|
<ref id="isupper" name="isupper">,
|
|
<ref id="isxdigit" name="isxdigit">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>isspace<label id="isspace"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Check if a given character is a a white-space character.
|
|
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
|
|
<tag/Declaration/<tt/int __fastcall__ isspace (int c);/
|
|
<tag/Description/The function returns a value of zero if the given argument
|
|
is a white space character. The return value is non zero if the character is
|
|
anything else. The standard white space characters are: space, formfeed ('\f'),
|
|
newline ('\n'), carriage return ('\r'), horizontal tab ('\t'), and vertical tab
|
|
('\v').
|
|
<tag/Limits/<itemize>
|
|
<item>When compiling with <tt/-Os/ the function is actually a macro. The
|
|
inline sequence generated by the macro will not work correctly for values
|
|
outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
|
|
this range. The non inline function may be accessed by <tt/#undef/'ing the
|
|
macro.
|
|
<item>When compiling without <tt/-Os/, the function is only available as
|
|
fastcall function, so it may only be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="isalnum" name="isalnum">,
|
|
<ref id="isalpha" name="isalpha">,
|
|
<ref id="isascii" name="isascii">,
|
|
<ref id="isblank" name="isblank">,
|
|
<ref id="iscntrl" name="iscntrl">,
|
|
<ref id="isdigit" name="isdigit">,
|
|
<ref id="isgraph" name="isgraph">,
|
|
<ref id="islower" name="islower">,
|
|
<ref id="isprint" name="isprint">,
|
|
<ref id="ispunct" name="ispunct">,
|
|
<ref id="isupper" name="isupper">,
|
|
<ref id="isxdigit" name="isxdigit">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>isupper<label id="isupper"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Check if a given character is an upper case letter.
|
|
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
|
|
<tag/Declaration/<tt/int __fastcall__ isupper (int c);/
|
|
<tag/Description/The function returns a value of zero if the given argument
|
|
is an upper case letter. The return value is non zero if the character is
|
|
anything else.
|
|
<tag/Limits/<itemize>
|
|
<item>When compiling with <tt/-Os/ the function is actually a macro. The
|
|
inline sequence generated by the macro will not work correctly for values
|
|
outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
|
|
this range. The non inline function may be accessed by <tt/#undef/'ing the
|
|
macro.
|
|
<item>When compiling without <tt/-Os/, the function is only available as
|
|
fastcall function, so it may only be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="isalnum" name="isalnum">,
|
|
<ref id="isalpha" name="isalpha">,
|
|
<ref id="isascii" name="isascii">,
|
|
<ref id="isblank" name="isblank">,
|
|
<ref id="iscntrl" name="iscntrl">,
|
|
<ref id="isdigit" name="isdigit">,
|
|
<ref id="isgraph" name="isgraph">,
|
|
<ref id="islower" name="islower">,
|
|
<ref id="isprint" name="isprint">,
|
|
<ref id="ispunct" name="ispunct">,
|
|
<ref id="isspace" name="isspace">,
|
|
<ref id="isxdigit" name="isxdigit">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>isxdigit<label id="isxdigit"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Check if a given character is a hexadecimal digit.
|
|
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
|
|
<tag/Declaration/<tt/int __fastcall__ isxdigit (int c);/
|
|
<tag/Description/The function returns a value of zero if the given argument
|
|
is a hexadecimal digit (0..9, a..f and A..F). The return value is non zero
|
|
if the character is anything else.
|
|
<tag/Limits/<itemize>
|
|
<item>When compiling with <tt/-Os/ the function is actually a macro. The
|
|
inline sequence generated by the macro will not work correctly for values
|
|
outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
|
|
this range. The non inline function may be accessed by <tt/#undef/'ing the
|
|
macro.
|
|
<item>When compiling without <tt/-Os/, the function is only available as
|
|
fastcall function, so it may only be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="isalnum" name="isalnum">,
|
|
<ref id="isalpha" name="isalpha">,
|
|
<ref id="isascii" name="isascii">,
|
|
<ref id="isblank" name="isblank">,
|
|
<ref id="iscntrl" name="iscntrl">,
|
|
<ref id="isdigit" name="isdigit">,
|
|
<ref id="isgraph" name="isgraph">,
|
|
<ref id="islower" name="islower">,
|
|
<ref id="isprint" name="isprint">,
|
|
<ref id="ispunct" name="ispunct">,
|
|
<ref id="isspace" name="isspace">,
|
|
<ref id="isupper" name="isupper">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>kbhit<label id="kbhit"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Check if there's a key waiting in the keyboard buffer.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/unsigned char kbhit (void);/
|
|
<tag/Description/The function returns a value of zero if there is no character
|
|
waiting to be read from the keyboard. It returns non zero otherwise.
|
|
<tag/Limits/<itemize>
|
|
<item>If the system does not support a keyboard buffer (most systems
|
|
do), the function is rather useless.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="cgetc" name="cgetc">,
|
|
<ref id="cursor" name="cursor">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>labs<label id="labs"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Returns the absolute value of a long integer.
|
|
<tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
|
|
<tag/Declaration/<tt/long __fastcall__ labs (long v);/
|
|
<tag/Description/<tt/labs/ returns the absolute value of the argument passed to
|
|
the function.
|
|
<tag/Limits/<itemize>
|
|
<item>The return value is undefined if <tt/LONG_MIN/ is passed to the function.
|
|
<item>The function is only available as fastcall function, so it may only be
|
|
used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="abs" name="abs">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>malloc<label id="malloc"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Allocate dynamic memory.
|
|
<tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
|
|
<tag/Declaration/<tt/void* __fastcall__ malloc (size_t size);/
|
|
<tag/Description/<tt/malloc/ allocates size bytes on the heap and returns a
|
|
pointer to the allocated memory block. On error (not enough memory available),
|
|
<tt/malloc/ returns <tt/NULL/.
|
|
<tag/Limits/
|
|
<itemize>
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="_heapadd" name="_heapadd">,
|
|
<ref id="_heapmaxavail" name="_heapmaxavail">,
|
|
<ref id="_heapmemavail" name="_heapmemavail">,
|
|
<ref id="calloc" name="calloc">,
|
|
<ref id="free" name="free">,
|
|
<ref id="realloc" name="realloc">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>rand<label id="rand"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Return a pseudo random number.
|
|
<tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
|
|
<tag/Declaration/<tt/int rand (void);/
|
|
<tag/Description/The function returns a pseudo random number
|
|
between 0 and <tt/RAND_MAX/ (exclusive).
|
|
<tag/Limits/<itemize>
|
|
<item>Without using <tt><ref id="srand" name="srand"></tt>, always the same
|
|
flow of numbers is generated.
|
|
<item>On startup, the function behaves as if <ref id="srand" name="srand">
|
|
had been used with an argument of 1.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="_randomize" name="_randomize">,
|
|
<ref id="srand" name="srand">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>realloc<label id="realloc"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Change the size of an allocated memory block.
|
|
<tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
|
|
<tag/Declaration/<tt/void* __fastcall__ realloc (void* block, size_t size);/
|
|
<tag/Description/<tt/realloc/ changes the size of the memory block pointed to
|
|
by <tt/block/ to <tt/size/ bytes. If <tt/block/ is <tt/NULL/, <tt/realloc/
|
|
behaves as if <tt/malloc/ had been called. If <tt/size/ is zero, <tt/realloc/
|
|
behaves as if <tt/free/ had been called. On error (not enough memory
|
|
available), <tt/realloc/ returns <tt/NULL/.
|
|
<tag/Limits/
|
|
<itemize>
|
|
<item>The part of the memory block that is returned will have its contents
|
|
unchanged.
|
|
<item>This function is somewhat dangerous to use. Be careful to save the
|
|
pointer you're passing somewhere else, otherwise
|
|
<tscreen><verb>
|
|
ptr = realloc (ptr, size);
|
|
</verb></tscreen>
|
|
will loose your only copy of <tt/ptr/ if <tt/realloc/ returns <tt/NULL/.
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="_heapadd" name="_heapadd">,
|
|
<ref id="_heapmaxavail" name="_heapmaxavail">,
|
|
<ref id="_heapmemavail" name="_heapmemavail">,
|
|
<ref id="calloc" name="calloc">,
|
|
<ref id="free" name="free">,
|
|
<ref id="realloc" name="realloc">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>revers<label id="revers"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Control revers character display.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/unsigned char __fastcall__ revers (unsigned char onoff);/
|
|
<tag/Description/If the argument is non zero, the function enables reverse
|
|
character display. If the argument is zero, reverse character display is
|
|
switched off. The old value of the setting is returned.
|
|
<tag/Limits/<itemize>
|
|
<item>The function may not be supported by the hardware, in which case
|
|
the call is ignored.
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="textcolor" name="textcolor">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>screensize<label id="screensize"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Return the dimensions of the text mode screen.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ screensize (unsigned char* x, unsigned char* y);/
|
|
<tag/Description/The function returns the dimensions of the text mode screen.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="gotox" name="gotox">,
|
|
<ref id="gotoxy" name="gotoxy">,
|
|
<ref id="gotoy" name="gotoy">,
|
|
<ref id="wherex" name="wherex">,
|
|
<ref id="wherey" name="wherey">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>slow<label id="slow"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Switch the C128 into 1MHz mode.
|
|
<tag/Header/<tt/<ref id="c128.h" name="c128.h">/
|
|
<tag/Declaration/<tt/void slow (void);/
|
|
<tag/Description/The function will switch the clock of the C128 to 1MHz. This
|
|
will halve the speed compared to fast mode.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is specific to the C128.
|
|
</itemize>
|
|
<tag/Availability/C128
|
|
<tag/See also/
|
|
<ref id="fast" name="fast">,
|
|
<ref id="toggle_videomode" name="toggle_videomode">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>srand<label id="srand"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Initialize the pseudo random number generator.
|
|
<tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
|
|
<tag/Declaration/<tt/void __fastcall__ srand (unsigned seed);/
|
|
<tag/Description/The function initializes the random number generator using
|
|
the given seed. On program startup, the generator behaves as if <tt/srand/ has
|
|
been called with an argument of 1.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="_randomize" name="_randomize">,
|
|
<ref id="rand" name="rand">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>strcat<label id="strcat"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Concatentate two strings.
|
|
<tag/Header/<tt/<ref id="string.h" name="string.h">/
|
|
<tag/Declaration/<tt/char* __fastcall__ strcat (char* s1, const char* s2);/
|
|
<tag/Description/The <tt/strcat/ function appends a copy of the string
|
|
pointed to by s2 (including the terminating null byte) to the end of the
|
|
string pointed to by s1. The initial byte of s2 overwrites the null byte at
|
|
the end of s1.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype.
|
|
<item>If copying takes place between objects that overlap, the behavior
|
|
is undefined.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="strcpy" name="strcpy">
|
|
<ref id="strncpy" name="strncpy">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>strchr<label id="strchr"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Search for a character in a string.
|
|
<tag/Header/<tt/<ref id="string.h" name="string.h">/
|
|
<tag/Declaration/<tt/char* __fastcall__ strchr (const char* s, int c);/
|
|
<tag/Description/The <tt/strchr/ function locates the first occurrence of <tt/c/
|
|
(converted to a char) in the string pointed to by <tt/s/. The terminating null
|
|
byte is considered to be part of the string. Upon completion, the function
|
|
returns a pointer to the byte, or a null pointer if the byte was not found.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="strrchr" name="strrchr">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>strcpy<label id="strcpy"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Copy a string.
|
|
<tag/Header/<tt/<ref id="string.h" name="string.h">/
|
|
<tag/Declaration/<tt/char* __fastcall__ strcpy (char* s1, const char* s2);/
|
|
<tag/Description/The <tt/strcpy/ function copies the string pointed to by
|
|
<tt/s2/ (including the terminating null byte) into the array pointed to by
|
|
<tt/s1/. The function will always return <tt/s1/.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype.
|
|
<item>If copying takes place between objects that overlap, the behavior
|
|
is undefined.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="strcat" name="strcat">
|
|
<ref id="strncpy" name="strncpy">
|
|
<tag/Example/
|
|
<verb>
|
|
#include <string.h>
|
|
|
|
static char hello[14];
|
|
|
|
strcpy (hello, "Hello world!\n");
|
|
</verb>
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>strlen<label id="strlen"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Return the length of a string.
|
|
<tag/Header/<tt/<ref id="string.h" name="string.h">/
|
|
<tag/Declaration/<tt/size_t __fastcall__ strlen (const char* s);/
|
|
<tag/Description/The <tt/strlen/ function computes the number of bytes in the
|
|
string to which s points, not including the terminating null byte.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype.
|
|
<item>When compiling with <tt/-Os/ (inline known standard functions), the
|
|
function does not work correctly for strings with more than 255 characters.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="strcpy" name="strcpy">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>strlower<label id="strlower"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Make a string lower case.
|
|
<tag/Header/<tt/<ref id="string.h" name="string.h">/
|
|
<tag/Declaration/<tt/char* __fastcall__ strlower (char* s);/
|
|
<tag/Description/The <tt/strlower/ function will apply the <tt/tolower/
|
|
function to each character of a string. The function will always return <tt/s/.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype.
|
|
<item>The function prototype is unavailable when compiling in strict ANSI mode.
|
|
<item>An alias name for this function is <tt/strlwr/.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="strupper" name="strupper">
|
|
<ref id="tolower" name="tolower">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>strlwr<label id="strlwr"><p>
|
|
|
|
<quote>
|
|
See <tt/strlower/.
|
|
</quote>
|
|
|
|
|
|
<sect1>strncpy<label id="strncpy"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Copy part of a string.
|
|
<tag/Header/<tt/<ref id="string.h" name="string.h">/
|
|
<tag/Declaration/<tt/char* __fastcall__ strcpy (char* s1, const char* s2, size_t n);/
|
|
<tag/Description/The <tt/strncpy/ function copies not more than n bytes from
|
|
the array pointed to by <tt/s2/ to the array pointed to by <tt/s1/. If the array
|
|
pointed to by <tt/s2/ is a string that is shorter than n bytes, null bytes are
|
|
appended to the copy in the array pointed to by <tt/s1/, until <tt/n/ bytes are
|
|
written. The function will always return <tt/s1/.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype. If there is no null byte in the first <tt/n/
|
|
bytes of the array pointed to by <tt/s2/, the result is not null-terminated.
|
|
<item>If copying takes place between objects that overlap, the behavior is
|
|
undefined.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="strcat" name="strcat">
|
|
<ref id="strcpy" name="strcpy">
|
|
<tag/Example/
|
|
<verb>
|
|
#include <string.h>
|
|
|
|
static char hello[6];
|
|
|
|
strcpy (hello, "Hello world!\n", sizeof (hello) - 1);
|
|
hello[5] = '\0';
|
|
</verb>
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>strrchr<label id="strrchr"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Search for a character in a string.
|
|
<tag/Header/<tt/<ref id="string.h" name="string.h">/
|
|
<tag/Declaration/<tt/char* __fastcall__ strrchr (const char* s, int c);/
|
|
<tag/Description/The <tt/strrchr/ function locates the last occurrence of <tt/c/
|
|
(converted to a char) in the string pointed to by <tt/s/. The terminating null
|
|
byte is considered to be part of the string. Upon completion, the function
|
|
returns a pointer to the byte, or a null pointer if the byte was not found.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="strchr" name="strchr">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>strupper<label id="strupper"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Make a string upper case.
|
|
<tag/Header/<tt/<ref id="string.h" name="string.h">/
|
|
<tag/Declaration/<tt/char* __fastcall__ strupper (char* s);/
|
|
<tag/Description/The <tt/strupper/ function will apply the <tt/toupper/
|
|
function to each character of a string. The function will always return <tt/s/.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype.
|
|
<item>The function prototype is unavailable when compiling in strict ANSI mode.
|
|
<item>An alias name for this function is <tt/strupr/.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="strlower" name="strlower">
|
|
<ref id="toupper" name="toupper">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>strupr<label id="strupr"><p>
|
|
|
|
<quote>
|
|
See <tt/strupper/.
|
|
</quote>
|
|
|
|
|
|
<sect1>textcolor<label id="textcolor"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Set the text color.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/unsigned char __fastcall__ textcolor (unsigned char color);/
|
|
<tag/Description/The function will set a new text color. It returns the old
|
|
(current) text color. Text output using any <tt/conio.h/ function will use
|
|
the color set by this function.
|
|
<tag/Limits/<itemize>
|
|
<item>Text colors are system dependent. The function may have no effect
|
|
on systems where the text color cannot be changed.
|
|
<item>The function is only available as fastcall function, so it may only
|
|
be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="bgcolor" name="bgcolor">,
|
|
<ref id="bordercolor" name="bordercolor">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>toggle_videomode<label id="toggle_videomode"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Toggle between 40 and 80 column mode.
|
|
<tag/Header/<tt/<ref id="c128.h" name="c128.h">/
|
|
<tag/Declaration/<tt/void toggle_videomode (void);/
|
|
<tag/Description/Toggle between 40 and 80 column mode. The settings for the
|
|
old mode (cursor position, color and so on) are saved and restored together
|
|
with the mode.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is specific to the C128.
|
|
</itemize>
|
|
<tag/Availability/C128
|
|
<tag/See also/
|
|
<ref id="fast" name="fast">,
|
|
<ref id="slow" name="slow">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>tolower<label id="tolower"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Convert a character into its lower case representation.
|
|
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
|
|
<tag/Declaration/<tt/int __fastcall__ tolower (int c);/
|
|
<tag/Description/The function returns the given character converted to lower
|
|
case. If the given character is not a letter, it is returned unchanged.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may
|
|
only be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="islower" name="islower">,
|
|
<ref id="isupper" name="isupper">,
|
|
<ref id="toupper" name="toupper">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>toupper<label id="toupper"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Convert a character into its upper case representation.
|
|
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
|
|
<tag/Declaration/<tt/int __fastcall__ toupper (int c);/
|
|
<tag/Description/The function returns the given character converted to upper
|
|
case. If the given character is not a letter, it is returned unchanged.
|
|
<tag/Limits/<itemize>
|
|
<item>The function is only available as fastcall function, so it may
|
|
only be used in presence of a prototype.
|
|
</itemize>
|
|
<tag/Availability/ISO 9899
|
|
<tag/See also/
|
|
<ref id="islower" name="islower">,
|
|
<ref id="isupper" name="isupper">,
|
|
<ref id="tolower" name="tolower">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>wherex<label id="wherex"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Return the current X position of the text mode cursor.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/unsigned char wherex (void);/
|
|
<tag/Description/The function returns the current X position of the text mode
|
|
cursor. Zero is returned for the leftmost screen position.
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="gotox" name="gotox">,
|
|
<ref id="gotoy" name="gotoy">,
|
|
<ref id="gotoxy" name="gotoxy">,
|
|
<ref id="wherey" name="wherey">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
<sect1>wherey<label id="wherey"><p>
|
|
|
|
<quote>
|
|
<descrip>
|
|
<tag/Function/Return the current Y position of the text mode cursor.
|
|
<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
|
|
<tag/Declaration/<tt/unsigned char wherey (void);/
|
|
<tag/Description/The function returns the current Y position of the text mode
|
|
cursor. Zero is returned for the uppermost screen position.
|
|
<tag/Availability/cc65
|
|
<tag/See also/
|
|
<ref id="gotox" name="gotox">,
|
|
<ref id="gotoy" name="gotoy">,
|
|
<ref id="gotoxy" name="gotoxy">,
|
|
<ref id="wherex" name="wherex">
|
|
<tag/Example/None.
|
|
</descrip>
|
|
</quote>
|
|
|
|
|
|
</article>
|
|
|
|
|