]> git.sur5r.net Git - cc65/blobdiff - doc/funcref.sgml
Moved documentation to funcref.
[cc65] / doc / funcref.sgml
index 62413d6afd6a9eb727ec412a08faf9355668997e..f995d29821ce5ea301a770248b5df3c97a8b35b6 100644 (file)
@@ -4,7 +4,6 @@
 <title>cc65 function reference
 <author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">,<newline>
 <url url="mailto:greg.king5@verizon.net" name="Greg King">
-<date>2017-11-21
 
 <abstract>
 cc65 is a C compiler for 6502 based systems. This function reference describes
@@ -65,6 +64,30 @@ function.
 </itemize>
 
 
+<sect1><tt/accelerator.h/<label id="accelerator.h"><p>
+
+<itemize>
+<item><ref id="detect_c128" name="detect_c128">
+<item><ref id="detect_c64dtv" name="detect_c64dtv">
+<item><ref id="detect_c65" name="detect_c65">
+<item><ref id="detect_chameleon" name="detect_chameleon">
+<item><ref id="detect_scpu" name="detect_scpu">
+<item><ref id="detect_turbomaster" name="detect_turbomaster">
+<item><ref id="get_c128_speed" name="get_c128_speed">
+<item><ref id="get_c64dtv_speed" name="get_c64dtv_speed">
+<item><ref id="get_c65_speed" name="get_c65_speed">
+<item><ref id="get_chameleon_speed" name="get_chameleon_speed">
+<item><ref id="get_scpu_speed" name="get_scpu_speed">
+<item><ref id="get_turbomaster_speed" name="get_turbomaster_speed">
+<item><ref id="set_c128_speed" name="set_c128_speed">
+<item><ref id="set_c64dtv_speed" name="set_c64dtv_speed">
+<item><ref id="set_c65_speed" name="set_c65_speed">
+<item><ref id="set_chameleon_speed" name="set_chameleon_speed">
+<item><ref id="set_scpu_speed" name="set_scpu_speed">
+<item><ref id="set_turbomaster_speed" name="set_turbomaster_speed">
+</itemize>
+
+
 <sect1><tt/apple2.h/<label id="apple2.h"><p>
 
 <itemize>
@@ -80,8 +103,6 @@ function.
 <item>_dos_type
 <item><ref id="get_ostype" name="get_ostype">
 <item>rebootafterexit
-<item>textframe
-<item>textframexy
 <item><ref id="videomode" name="videomode">
 </itemize>
 
@@ -131,6 +152,7 @@ function.
 <itemize>
 <item><ref id="c64mode" name="c64mode">
 <item><ref id="fast" name="fast">
+<item><ref id="isfast" name="isfast">
 <item><ref id="slow" name="slow">
 <item><ref id="toggle_videomode" name="toggle_videomode">
 <item><ref id="videomode" name="videomode">
@@ -139,6 +161,12 @@ function.
 
 <sect1><tt/c16.h/<label id="c16.h"><p>
 
+<itemize>
+<item><ref id="fast" name="fast">
+<item><ref id="isfast" name="isfast">
+<item><ref id="slow" name="slow">
+</itemize>
+
 (incomplete)
 
 
@@ -169,11 +197,14 @@ function.
 <item><ref id="cbm_k_readst" name="cbm_k_readst">
 <item><ref id="cbm_k_save" name="cbm_k_save">
 <item><ref id="cbm_k_scnkey" name="cbm_k_scnkey">
+<item><ref id="cbm_k_second" name="cbm_k_second">
 <item><ref id="cbm_k_setlfs" name="cbm_k_setlfs">
 <item><ref id="cbm_k_setnam" name="cbm_k_setnam">
 <item><ref id="cbm_k_talk" name="cbm_k_talk">
+<item><ref id="cbm_k_tksa" name="cbm_k_tksa">
 <item><ref id="cbm_k_udtim" name="cbm_k_udtim">
 <item><ref id="cbm_k_unlsn" name="cbm_k_unlsn">
+<item><ref id="cbm_k_untlk" name="cbm_k_untlk">
 <!-- <item><ref id="cbm_load" name="cbm_load"> -->
 <!-- <item><ref id="cbm_open" name="cbm_open"> -->
 <!-- <item><ref id="cbm_opendir" name="cbm_opendir"> -->
@@ -182,6 +213,7 @@ function.
 <!-- <item><ref id="cbm_save" name="cbm_save"> -->
 <!-- <item><ref id="cbm_write" name="cbm_write"> -->
 <!-- <item><ref id="get_tv" name="get_tv"> -->
+<item><ref id="waitvsync" name="waitvsync">
 <item><ref id="kbrepeat" name="kbrepeat">
 </itemize>
 
@@ -237,6 +269,10 @@ function.
 <item><ref id="chline" name="chline">
 <item><ref id="chlinexy" name="chlinexy">
 <item><ref id="clrscr" name="clrscr">
+<item><ref id="cpeekc" name="cpeekc">
+<item><ref id="cpeekcolor" name="cpeekcolor">
+<item><ref id="cpeekrevers" name="cpeekrevers">
+<item><ref id="cpeeks" name="cpeeks">
 <item><ref id="cprintf" name="cprintf">
 <item><ref id="cputc" name="cputc">
 <item><ref id="cputcxy" name="cputcxy">
@@ -288,6 +324,16 @@ function.
 (incomplete)
 
 
+<sect1><tt/device.h/<label id="device.h"><p>
+
+<itemize>
+<item><ref id="getcurrentdevice" name="getcurrentdevice">
+<item><ref id="getdevicedir" name="getdevicedir">
+<item><ref id="getfirstdevice" name="getfirstdevice">
+<item><ref id="getnextdevice" name="getnextdevice">
+</itemize>
+
+
 <sect1><tt/dio.h/<label id="dio.h"><p>
 
 <url url="dio.html" name="Low-level disk I/O API">.
@@ -308,11 +354,12 @@ function.
 <item><ref id="telldir" name="telldir">
 </itemize>
 
-(incomplete)
-
 
 <sect1><tt/em.h/<label id="em.h"><p>
 
+This header file contains definitions for extended memory access,
+see also <tt>testcode/lib/em-test.c</tt> and <tt>samples/multidemo.c</tt>.
+
 <itemize>
 <item><ref id="em_commit" name="em_commit">
 <item><ref id="em_copyfrom" name="em_copyfrom">
@@ -360,7 +407,7 @@ function.
 
 <sect1><tt/geos.h/<label id="geos.h"><p>
 
-(incomplete)
+<url url="geos.html" name="GEOS API">.
 
 
 <sect1><tt/joystick.h/<label id="joystick.h"><p>
@@ -488,13 +535,19 @@ It does not declare any functions.
 
 <sect1><tt/plus4.h/<label id="plus4.h"><p>
 
+<itemize>
+<item><ref id="fast" name="fast">
+<item><ref id="isfast" name="isfast">
+<item><ref id="slow" name="slow">
+</itemize>
+
 (incomplete)
 
 
 <sect1><tt/serial.h/<label id="serial.h"><p>
 
-The <tt/serial.h/ header file contains definitions for initializing serial
-communication.
+This header file contains definitions for initializing serial
+communication, see also <tt>testcode/lib/ser-test.c</tt>.
 
 <itemize>
 <item><ref id="ser_close" name="ser_close">
@@ -525,6 +578,12 @@ communication.
 <item><ref id="signal" name="signal">
 </itemize>
 
+<sect1><tt/specialmath.h/<label id="specialmath.h"><p>
+
+<itemize>
+<item><ref id="_mul20" name="_mul20">
+<item><ref id="_mul40" name="_mul40">
+</itemize>
 
 <sect1><tt/stdarg.h/<label id="stdarg.h"><p>
 
@@ -656,9 +715,12 @@ communication.
 <item><ref id="strlen" name="strlen">
 <item><ref id="strlower" name="strlower">
 <item><ref id="strlwr" name="strlwr">
+<item><ref id="strncasecmp" name="strncasecmp">
 <item><ref id="strncat" name="strncat">
 <item><ref id="strncmp" name="strncmp">
 <item><ref id="strncpy" name="strncpy">
+<item><ref id="strnicmp" name="strnicmp">
+<item><ref id="strpbrk" name="strpbrk">
 <item><ref id="strqtok" name="strqtok">
 <item><ref id="strrchr" name="strrchr">
 <item><ref id="strspn" name="strspn">
@@ -669,8 +731,6 @@ communication.
 <item><ref id="strupr" name="strupr">
 </itemize>
 
-(incomplete)
-
 
 <sect1><tt/telestrat.h/<label id="telestrat.h"><p>
 
@@ -694,9 +754,11 @@ communication.
 <sect1><tt/time.h/<label id="time.h"><p>
 
 <itemize>
-<!-- <item><ref id="_systime" name="_systime"> -->
 <!-- <item><ref id="asctime" name="asctime"> -->
 <item><ref id="clock" name="clock">
+<item><ref id="clock_getres" name="clock_getres">
+<item><ref id="clock_gettime" name="clock_gettime">
+<item><ref id="clock_settime" name="clock_settime">
 <!-- <item><ref id="ctime" name="ctime"> -->
 <!-- <item><ref id="gmtime" name="gmtime"> -->
 <!-- <item><ref id="localtime" name="localtime"> -->
@@ -713,7 +775,7 @@ communication.
 <itemize>
 <!-- <item><ref id="chdir" name="chdir"> -->
 <item><ref id="exec" name="exec">
-<!-- <item><ref id="getcwd" name="getcwd"> -->
+<item><ref id="getcwd" name="getcwd">
 <item><ref id="getopt" name="getopt">
 <!-- <item><ref id="lseek" name="lseek"> -->
 <!-- <item><ref id="mkdir" name="mkdir"> -->
@@ -964,6 +1026,29 @@ It returns 1 if it does.
 </descrip>
 </quote>
 
+<sect1>_mul20<label id="_mul20"><p>
+
+<quote>
+<descrip>
+<tag/Function/Multiplies argument by 20.
+<tag/Header/<tt/<ref id="specialmath.h" name="specialmath.h">/
+<tag/Declaration/<tt/unsigned int __fastcall__ _mul20(unsigned char value);/
+<tag/Description/Speed optimized function to multiply an 8 bit unsigned value by 20 to get a 16 bit result.
+<tag/Availability/cc65
+</descrip>
+</quote>
+
+<sect1>_mul40<label id="_mul40"><p>
+
+<quote>
+<descrip>
+<tag/Function/Multiplies argument by 40.
+<tag/Header/<tt/<ref id="specialmath.h" name="specialmath.h">/
+<tag/Declaration/<tt/unsigned int __fastcall__ _mul40(unsigned char value);/
+<tag/Description/Speed optimized function to multiply an 8 bit unsigned value by 40 to get a 16 bit result.
+<tag/Availability/cc65
+</descrip>
+</quote>
 
 <sect1>_poserror<label id="_poserror"><p>
 
@@ -2037,7 +2122,7 @@ only be used in presence of a prototype.
 </itemize>
 <tag/Availability/cc65
 <tag/See also/
-<ref id="cbm_k_unlsn" name="cbm_k_unlsn">,
+<ref id="cbm_k_unlsn" name="cbm_k_unlsn">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -2169,6 +2254,31 @@ function, in order to provide input from the keyboard.
 </quote>
 
 
+<sect1>cmb_k_second<label id="cbm_k_second"><p>
+
+<quote>
+<descrip>
+<tag/Function/Send secondary address for LISTEN.
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/void __fastcall__ cbm_k_second (unsigned char addr);/
+<tag/Description/This function is used to send a secondary address to an I/O
+device after a call to LISTEN is made, and the device is commanded to LISTEN.
+<tag/Notes/<itemize>
+<item>The function is only available as fastcall function, so it may
+only be used in presence of a prototype.
+<item>The function can only be called after a call to LISTEN.
+<item>The function will not work after a TALK.
+<item>When a secondary address is to be sent to a device on the serial bus,
+the address must first be ORed with $60.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="cbm_k_listen" name="cbm_k_listen">
+<tag/Exampe/None.
+</descrip>
+</quote>
+
+
 <sect1>cbm_k_setlfs<label id="cbm_k_setlfs"><p>
 
 <quote>
@@ -2234,6 +2344,28 @@ only be used in presence of a prototype.
 </quote>
 
 
+<sect1>cbm_k_tksa<label id="cbm_k_tksa"><p>
+
+<quote>
+<descrip>
+<tag/Function/Send TALK secondary address to serial bus
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/void __fastcall__ cbm_k_tksa (unsigned char addr);/
+<tag/Description/This function transmits a secondary address on the serial bus for a TALK device.
+<tag/Notes/<itemize>
+<item>The function is only available as fastcall function, so it may
+only be used in presence of a prototype.
+<item>The function can only be called after a call to TALK.
+<item>The function will not work after a LISTEN.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="cbm_k_talk" name="cbm_k_talk">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>cbm_k_udtim<label id="cbm_k_udtim"><p>
 
 <quote>
@@ -2269,9 +2401,6 @@ bus. Only devices previously commanded to LISTEN are affected. This
 function is normally used after the host computer is finished sending data
 to external devices. Sending the UNLISTEN commands the listening devices
 to get off the serial bus so it can be used for other purposes.
-<tag/Notes/<itemize>
-<item>
-</itemize>
 <tag/Availability/cc65
 <tag/See also/
 <ref id="cbm_k_listen" name="cbm_k_listen">
@@ -2280,6 +2409,28 @@ to get off the serial bus so it can be used for other purposes.
 </quote>
 
 
+<sect1>cbm_k_untlk<label id="cbm_k_untlk"><p>
+
+<quote>
+<descrip>
+<tag/Function/Send an UNTALK command
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/void cbm_k_untlk (void);/
+<tag/Description/This function commands all devices on the serial bus to
+stop sending data to the host computer (i.e., UNTALK). Calling this
+function results in an UNTALK command being transmitted on the serial
+bus. Only devices previously commanded to TALK are affected. This
+function is normally used after the host computer is finished listening to data
+from an external device. Sending the UNTALK commands the sending devices
+to get off the serial bus so it can be used for other purposes.
+<tag/Availability/cc65
+<tag/See also/
+<ref id="cbm_k_talk" name="cbm_k_talk">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>cclear<label id="cclear"><p>
 
 <quote>
@@ -2454,6 +2605,89 @@ changing values.  (See the description of <tt/cbm_k_udtim()/.)
 </quote>
 
 
+<sect1>clock_getres<label id="clock_getres"><p>
+
+<quote>
+<descrip>
+<tag/Function/Determine the realtime clock resolution.
+<tag/Header/<tt/<ref id="time.h" name="time.h">/
+<tag/Declaration/<tt/int __fastcall__ clock_getres (clockid_t clock_id, struct timespec *res);/
+<tag/Description/The <tt/clock_getres/ function finds the resolution (precision)
+of the realtime clock. <tt/clock_id/ has to be <tt/CLOCK_REALTIME/. If <tt/res/
+is not <tt/NULL/, the resolution of the realtime clock is stored in the location
+pointed to by <tt/res/. If <tt/res/ is <tt/NULL/, the clock resolution is not returned.
+If the <tt/tp/ argument of <tt/<ref id="clock_settime" name="clock_settime">/ is not
+a multiple of <tt/res/, then the value is truncated to a multiple of <tt/res/. On
+success, zero is returned. On error, -1 is returned and <tt/errno/ is set to an
+error code describing the reason for the failure.
+<tag/Notes/<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+<item>Depending on the target either the <tt/tv_sec/ or the <tt/tv_nsec/
+field of the <tt/struct timespec/ returned is zero.
+</itemize>
+<tag/Availability/POSIX 1003.1
+<tag/See also/
+<ref id="clock_gettime" name="clock_gettime">,
+<ref id="clock_settime" name="clock_settime">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>clock_gettime<label id="clock_gettime"><p>
+
+<quote>
+<descrip>
+<tag/Function/Get the time from the realtime clock.
+<tag/Header/<tt/<ref id="time.h" name="time.h">/
+<tag/Declaration/<tt/int __fastcall__ clock_gettime (clockid_t clock_id, struct timespec *tp);/
+<tag/Description/The <tt/clock_gettime/ function retrieves the time since the 1970-01-01 00:00:00
+measured in nanoseconds. <tt/clock_id/ has to be <tt/CLOCK_REALTIME/. On success, zero is
+returned. On error, -1 is returned and <tt/errno/ is set to an error code describing the
+reason for the failure.
+<tag/Notes/<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+<item>Many platforms supported by cc65 do not have a realtime clock, so the
+retrieved value may not be valid. See also the platform-specific information.
+</itemize>
+<tag/Availability/POSIX 1003.1
+<tag/See also/
+<ref id="clock_getres" name="clock_getres">,
+<ref id="clock_settime" name="clock_settime">,
+<ref id="time" name="time">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>clock_settime<label id="clock_settime"><p>
+
+<quote>
+<descrip>
+<tag/Function/Set the time on the realtime clock.
+<tag/Header/<tt/<ref id="time.h" name="time.h">/
+<tag/Declaration/<tt/int __fastcall__ clock_settime (clockid_t clock_id, const struct timespec *tp);/
+<tag/Description/The <tt/clock_settime/ function sets the time since the 1970-01-01 00:00:00
+measured in nanoseconds. <tt/clock_id/ has to be <tt/CLOCK_REALTIME/. On success, zero is
+returned. On error, -1 is returned and <tt/errno/ is set to an error code describing the
+reason for the failure.
+<tag/Notes/<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+<item>Many platforms supported by cc65 do not have a realtime clock, so
+setting the time may not work. See also the platform-specific information.
+</itemize>
+<tag/Availability/POSIX 1003.1
+<tag/See also/
+<ref id="clock_getres" name="clock_getres">,
+<ref id="clock_gettime" name="clock_gettime">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>clrscr<label id="clrscr"><p>
 
 <quote>
@@ -2518,6 +2752,121 @@ be used in presence of a prototype.
 </quote>
 
 
+<sect1>cpeekc<label id="cpeekc"><p>
+
+<quote>
+<descrip>
+<tag/Function/Get a character from the display memory.
+<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
+<tag/Declaration/<tt/char cpeekc (void);/
+<tag/Description/The function gets the character that's at the current location
+of the cursor in the display screen RAM.  That character is converted, if
+needed, into the encoding that can be passed to <tt/cputc()/.
+<tag/Notes/<itemize>
+<item>Conio peek functions don't have <tt/cpeek...xy()/ versions.  That was
+done to make it obvious that peeking doesn't move the cursor in any way.  Your
+program must place the cursor where it wants to peek before it calls any of
+those functions.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="cpeekcolor" name="cpeekcolor">,
+<ref id="cpeekrevers" name="cpeekrevers">,
+<ref id="cpeeks" name="cpeeks">,
+<ref id="cputc" name="cputc">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cpeekcolor<label id="cpeekcolor"><p>
+
+<quote>
+<descrip>
+<tag/Function/Get a color from the display memory.
+<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
+<tag/Declaration/<tt/unsigned char cpeekcolor (void);/
+<tag/Description/The function gets the color number that's at the current
+location of the cursor in the display screen RAM.  That number can be passed to
+<tt/textcolor()/.
+<tag/Notes/<itemize>
+<item>Conio peek functions don't have <tt/cpeek...xy()/ versions.  That was
+done to make it obvious that peeking doesn't move the cursor in any way.  Your
+program must place the cursor where it wants to peek before it calls any of
+those functions.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="cpeekc" name="cpeekc">,
+<ref id="cpeekrevers" name="cpeekrevers">,
+<ref id="cpeeks" name="cpeeks">,
+<ref id="cputc" name="cputc">,
+<ref id="textcolor" name="textcolor">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cpeekrevers<label id="cpeekrevers"><p>
+
+<quote>
+<descrip>
+<tag/Function/Get a reverse-character attribute from the display memory.
+<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
+<tag/Declaration/<tt/unsigned char cpeekrevers (void);/
+<tag/Description/The function gets the "reverse-mode" attribute of the
+character that's at the current location of the cursor in the display screen
+RAM.  It returns a boolean value (0/1) that can be passed to <tt/revers()/.
+<tag/Notes/<itemize>
+<item>Conio peek functions don't have <tt/cpeek...xy()/ versions.  That was
+done to make it obvious that peeking doesn't move the cursor in any way.  Your
+program must place the cursor where it wants to peek before it calls any of
+those functions.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="cpeekc" name="cpeekc">,
+<ref id="cpeekcolor" name="cpeekcolor">,
+<ref id="cpeeks" name="cpeeks">,
+<ref id="cputc" name="cputc">,
+<ref id="revers" name="revers">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cpeeks<label id="cpeeks"><p>
+
+<quote>
+<descrip>
+<tag/Function/Get a string from the display memory.
+<tag/Header/<tt/<ref id="conio.h" name="conio.h">/
+<tag/Declaration/<tt/void __fastcall__ cpeeks (char* s, unsigned length);/
+<tag/Description/The function gets a fixed-length string ('\0'-terminated) of
+characters that start at the current location of the cursor in the display
+screen RAM.  Those characters are converted, if needed, into the encoding that
+can be passed to <tt/cputs()/.  The first argument must point to a RAM area
+that's large enough to hold "length + 1" bytes.
+<tag/Notes/<itemize>
+<item>Conio peek functions don't have <tt/cpeek...xy()/ versions.  That was
+done to make it obvious that peeking doesn't move the cursor in any way.  Your
+program must place the cursor where it wants to peek before it calls any of
+those functions.
+<item>The function is available as only a fastcall function;
+so, it may be used only in the presence of a prototype.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="cpeekc" name="cpeekc">,
+<ref id="cpeekcolor" name="cpeekcolor">,
+<ref id="cpeekrevers" name="cpeekrevers">,
+<ref id="cputc" name="cputc">,
+<ref id="cputs" name="cputs">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>creat<label id="creat"><p>
 
 <quote>
@@ -2770,6 +3119,126 @@ used in presence of a prototype.
 </quote>
 
 
+<sect1>detect_c128<label id="detect_c128"><p>
+
+<quote>
+<descrip>
+<tag/Function/Check if a C128 CPU is the current CPU.
+<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
+<tag/Declaration/<tt/unsigned char detect_c128 (void);/
+<tag/Description/The function returns a 1 if a C128 CPU is the current CPU.
+<tag/Notes/<itemize>
+<item>The function is specific to the C64 and C128.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/See also/
+<ref id="get_c128_speed" name="get_c128_speed">,
+<ref id="set_c128_speed" name="set_c128_speed">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>detect_c64dtv<label id="detect_c64dtv"><p>
+
+<quote>
+<descrip>
+<tag/Function/Check for the presence of the C64DTV.
+<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
+<tag/Declaration/<tt/unsigned char detect_c64dtv (void);/
+<tag/Description/The function returns a 1 if a C64DTV has been detected.
+<tag/Notes/<itemize>
+<item>The function is specific to the C64.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/See also/
+<ref id="get_c64dtv_speed" name="get_c64dtv_speed">,
+<ref id="set_c64dtv_speed" name="set_c64dtv_speed">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>detect_c65<label id="detect_c65"><p>
+
+<quote>
+<descrip>
+<tag/Function/Check for the presence of a C65/C64DX in C64 mode.
+<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
+<tag/Declaration/<tt/unsigned char detect_c65 (void);/
+<tag/Description/The function returns a 1 if a C65/C64DX in C64 mode has been detected.
+<tag/Notes/<itemize>
+<item>The function is specific to the C64.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/See also/
+<ref id="get_c65_speed" name="get_c65_speed">,
+<ref id="set_c65_speed" name="set_c65_speed">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>detect_chameleon<label id="detect_chameleon"><p>
+
+<quote>
+<descrip>
+<tag/Function/Check for the presence of the C64 Chameleon cartridge.
+<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
+<tag/Declaration/<tt/unsigned char detect_chameleon (void);/
+<tag/Description/The function returns a 1 if a C64 Chameleon cartridge has been detected.
+<tag/Notes/<itemize>
+<item>The function is specific to the C64.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/See also/
+<ref id="get_chameleon_speed" name="get_chameleon_speed">,
+<ref id="set_chameleon_speed" name="set_chameleon_speed">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>detect_scpu<label id="detect_scpu"><p>
+
+<quote>
+<descrip>
+<tag/Function/Check for the presence of the C64/C128 SuperCPU cartridge.
+<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
+<tag/Declaration/<tt/unsigned char detect_scpu (void);/
+<tag/Description/The function returns a 1 if a SuperCPU cartridge has been detected.
+<tag/Notes/<itemize>
+<item>The function is specific to the C128 and C64.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/See also/
+<ref id="get_scpu_speed" name="get_scpu_speed">,
+<ref id="set_scpu_speed" name="set_scpu_speed">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>detect_turbomaster<label id="detect_turbomaster"><p>
+
+<quote>
+<descrip>
+<tag/Function/Check for the presence of the C64 Turbo Master cartridge.
+<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
+<tag/Declaration/<tt/unsigned char detect_turbomaster (void);/
+<tag/Description/The function returns a 1 if a C64 Turbo Master cartridge has been detected.
+<tag/Notes/<itemize>
+<item>The function is specific to the C64.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/See also/
+<ref id="get_turbomaster_speed" name="get_turbomaster_speed">,
+<ref id="set_turbomaster_speed" name="set_turbomaster_speed">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>div<label id="div"><p>
 
 <quote>
@@ -2810,9 +3279,9 @@ exits.
 <tag/Availability/cc65
 <tag/Example/<verb>
 /* Hello World */
-#include <stdio.h>
-#include <unistd.h>
-#include <cc65.h>
+#include &lt;stdio.h&gt;
+#include &lt;unistd.h&gt;
+#include &lt;cc65.h&gt;
 int main(void)
 {
     printf("Hello World\n");
@@ -2946,7 +3415,7 @@ used in presence of a prototype.
 <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/Declaration/<tt/unsigned char __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.
@@ -3163,20 +3632,21 @@ program, it may not be able to read it.
 
 <quote>
 <descrip>
-<tag/Function/Switch the C128 into 2MHz mode.
-<tag/Header/<tt/<ref id="c128.h" name="c128.h">/
+<tag/Function/Switch the CPU into fast mode (C128: 2MHz mode, C16/Plus4: double clock mode).
+<tag/Header/<tt/<ref id="c128.h" name="c128.h">,
+<ref id="c16.h" name="c16.h">, <ref id="plus4.h" name="plus4.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/Description/The function will switch the clock of the CPU to fast mode. For the C128
+target it means switching the CPU into 2MHz mode. For the C16/Plus4 target it means
+switching the CPU into double clock mode.
 <tag/Notes/<itemize>
-<item>The function is specific to the C128.
-<item>2MHz clock will not work in 40 column mode.
+<item>The function is specific to the C128, C16 and Plus4.
+<item>On the C128 the 2MHz clock will not work in 40 column mode.
 </itemize>
-<tag/Availability/C128
+<tag/Availability/cc65 (not all platforms)
 <tag/See also/
+<ref id="isfast" name="isfast">,
 <ref id="slow" name="slow">,
-<ref id="toggle_videomode" name="toggle_videomode">,
-<ref id="videomode" name="videomode">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -3267,47 +3737,178 @@ file may have unpredictable results.
 or <tt/<ref id="realloc" name="realloc">/. As an exception, if the passed
 pointer is <tt/NULL/, no action is performed.
 <tag/Notes/<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.
+<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="_heapblocksize" name="_heapblocksize">,
+<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>get_ostype<label id="get_ostype"><p>
+
+<quote>
+<descrip>
+<tag/Function/The function returns the operating system, the program runs on.
+<tag/Header/<tt/<ref id="apple2.h" name="apple2.h">,
+<ref id="atari.h" name="atari.h">, <ref id="c64.h" name="c64.h">/
+<tag/Declaration/<tt/unsigned char get_ostype (void);/
+<tag/Description/<tt/get_ostype/ is machine dependent and does not exist for
+all supported targets. If it exists, it returns a number that identifies the
+operating system or machine type, the program runs on. The machine dependent
+header files define constants that can be used to check the return code.
+<tag/Notes/<itemize>
+<item>The function does not exist on all platforms.
+<item>The return codes are platform dependent.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>get_c128_speed<label id="get_c128_speed"><p>
+
+<quote>
+<descrip>
+<tag/Function/Get the current speed of the C128 CPU.
+<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
+<tag/Declaration/<tt/unsigned char get_c128_speed (void);/
+<tag/Description/The function returns the current speed of the C128 CPU.
+<tag/Notes/<itemize>
+<item>The function is specific to the C64 and C128.
+<item>The function does not check if the C128 CPU is the current CPU.
+<item>See the accelerator.h header for the speed definitions.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/See also/
+<ref id="detect_c128" name="detect_c128">,
+<ref id="set_c128_speed" name="set_c128_speed">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>get_c64dtv_speed<label id="get_c64dtv_speed"><p>
+
+<quote>
+<descrip>
+<tag/Function/Get the current speed of the C64DTV.
+<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
+<tag/Declaration/<tt/unsigned char get_c64dtv_speed (void);/
+<tag/Description/The function returns the current speed of the C64DTV.
+<tag/Notes/<itemize>
+<item>The function is specific to the C64.
+<item>The function does not check for the presence of the C64DTV.
+<item>See the accelerator.h header for the speed definitions.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/See also/
+<ref id="detect_c64dtv" name="detect_c64dtv">,
+<ref id="set_c64dtv_speed" name="set_c64dtv_speed">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>get_c65_speed<label id="get_c65_speed"><p>
+
+<quote>
+<descrip>
+<tag/Function/Get the current speed of the C65/C64DX in C64 mode.
+<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
+<tag/Declaration/<tt/unsigned char get_c65_speed (void);/
+<tag/Description/The function returns the current speed of the C65/C64DX in C64 mode.
+<tag/Notes/<itemize>
+<item>The function is specific to the C64.
+<item>The function does not check for the presence of a C65/C64DX in C64 mode.
+<item>See the accelerator.h header for the speed definitions.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/See also/
+<ref id="detect_c65" name="detect_c65">,
+<ref id="set_c65_speed" name="set_c65_speed">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>get_chameleon_speed<label id="get_chameleon_speed"><p>
+
+<quote>
+<descrip>
+<tag/Function/Get the current speed of the C64 Chameleon cartridge.
+<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
+<tag/Declaration/<tt/unsigned char get_chameleon_speed (void);/
+<tag/Description/The function returns the current speed of the C64 Chameleon cartridge.
+<tag/Notes/<itemize>
+<item>The function is specific to the C64.
+<item>The function does not check for the presence of the C64 Chameleon cartridge.
+<item>See the accelerator.h header for the speed definitions.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/See also/
+<ref id="detect_chameleon" name="detect_chameleon">,
+<ref id="set_chameleon_speed" name="set_chameleon_speed">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>get_scpu_speed<label id="get_scpu_speed"><p>
+
+<quote>
+<descrip>
+<tag/Function/Get the current speed of the C64/C128 SuperCPU cartridge.
+<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
+<tag/Declaration/<tt/unsigned char get_scpu_speed (void);/
+<tag/Description/The function returns the current speed of the SuperCPU cartridge.
+<tag/Notes/<itemize>
+<item>The function is specific to the C128 and C64.
+<item>The function does not check for the presence of the cartridge.
+<item>See the accelerator.h header for the speed definitions.
 </itemize>
-<tag/Availability/ISO 9899
+<tag/Availability/cc65 (not all platforms)
 <tag/See also/
-<ref id="_heapadd" name="_heapadd">,
-<ref id="_heapblocksize" name="_heapblocksize">,
-<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">
+<ref id="detect_scpu" name="detect_scpu">,
+<ref id="set_scpu_speed" name="set_scpu_speed">,
 <tag/Example/None.
 </descrip>
 </quote>
 
 
-<sect1>get_ostype<label id="get_ostype"><p>
+<sect1>get_turbomaster_speed<label id="get_turbomaster_speed"><p>
 
 <quote>
 <descrip>
-<tag/Function/The function returns the operating system, the program runs on.
-<tag/Header/<tt/<ref id="apple2.h" name="apple2.h">,
-<ref id="atari.h" name="atari.h">, <ref id="c64.h" name="c64.h">/
-<tag/Declaration/<tt/unsigned char get_ostype (void);/
-<tag/Description/<tt/get_ostype/ is machine dependent and does not exist for
-all supported targets. If it exists, it returns a number that identifies the
-operating system or machine type, the program runs on. The machine dependent
-header files define constants that can be used to check the return code.
+<tag/Function/Get the current speed of the C64 Turbo Master cartridge.
+<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
+<tag/Declaration/<tt/unsigned char get_turbomaster_speed (void);/
+<tag/Description/The function returns the current speed of the C64 Turbo Master cartridge.
 <tag/Notes/<itemize>
-<item>The function does not exist on all platforms.
-<item>The return codes are platform dependent.
+<item>The function is specific to the C64.
+<item>The function does not check for the presence of the C64 Turbo Master cartridge.
+<item>See the accelerator.h header for the speed definitions.
 </itemize>
 <tag/Availability/cc65 (not all platforms)
+<tag/See also/
+<ref id="detect_turbomaster" name="detect_turbomaster">,
+<ref id="set_turbomaster_speed" name="set_turbomaster_speed">,
 <tag/Example/None.
 </descrip>
 </quote>
 
-
 <sect1>getcpu<label id="getcpu"><p>
 
 <quote>
@@ -3320,6 +3921,11 @@ returns one of the constants<itemize>
 <item><tt/CPU_6502/
 <item><tt/CPU_65C02/
 <item><tt/CPU_65816/
+<item><tt/CPU_4510/
+<item><tt/CPU_65SC02/
+<item><tt/CPU_65CE02/
+<item><tt/CPU_HUC6280/
+<item><tt/CPU_2A0x/
 </itemize>
 <tag/Notes/<itemize>
 <item>Other, more exotic CPU types are not disinguished.
@@ -3330,6 +3936,77 @@ returns one of the constants<itemize>
 </quote>
 
 
+<sect1>getcurrentdevice<label id="getcurrentdevice"><p>
+
+<quote>
+<descrip>
+<tag/Function/Get current device.
+<tag/Header/<tt/<ref id="device.h" name="device.h">/
+<tag/Declaration/<tt/unsigned char getcurrentdevice (void);/
+<tag/Description/The function returns the current device.
+It allows to access the current device with the <ref id="dio.h"
+name="Low-level disk I/O API"> or <ref id="cbm.h" name="cbm_* I/O
+functions"> requiring a 'device' parameter.
+<tag/Availability/cc65
+<tag/See also/
+<ref id="getdevicedir" name="getdevicedir">,
+<ref id="getfirstdevice" name="getfirstdevice">,
+<ref id="getnextdevice" name="getnextdevice">
+<tag/Example/<verb>
+dio_open (getcurrentdevice ());
+</verb>
+</descrip>
+</quote>
+
+
+<sect1>getcwd<label id="getcwd"><p>
+
+<quote>
+<descrip>
+<tag/Function/Get current working directory.
+<tag/Header/<tt/<ref id="unistd.h" name="unistd.h">/
+<tag/Declaration/<tt/char* __fastcall__ getcwd (char* buf, size_t size);/
+<tag/Description/The function will return the current working directory.
+<tag/Notes/<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+</itemize>
+<tag/Availability/POSIX 1003.1
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>getdevicedir<label id="getdevicedir"><p>
+
+<quote>
+<descrip>
+<tag/Function/Get device directory.
+<tag/Header/<tt/<ref id="device.h" name="device.h">/
+<tag/Declaration/<tt/char* __fastcall__ getdevicedir (unsigned char device, char* buf, size_t size);/
+<tag/Description/The function returns the directory representing <tt/device/.
+It allows to access the device on filesystem level by calling chdir() with
+the directory returned.
+<tag/Notes/<itemize>
+<item>Calling getdevicedir() <em/does/ check for a (formatted) disk in a
+floppy-disk-type device and returns NULL if that check fails.
+<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="getcwd" name="getcwd">,
+<ref id="getcurrentdevice" name="getcurrentdevice">,
+<ref id="getfirstdevice" name="getfirstdevice">,
+<ref id="getnextdevice" name="getnextdevice">
+<tag/Example/<verb>
+chdir (getdevicedir (device, buf, sizeof buf));
+</verb>
+cf. <tt/samples/enumdevdir.c/
+</descrip>
+</quote>
+
+
 <sect1>getenv<label id="getenv"><p>
 
 <quote>
@@ -3353,6 +4030,66 @@ be used in presence of a prototype.
 </quote>
 
 
+<sect1>getfirstdevice<label id="getfirstdevice"><p>
+
+<quote>
+<descrip>
+<tag/Function/Get first device.
+<tag/Header/<tt/<ref id="device.h" name="device.h">/
+<tag/Declaration/<tt/unsigned char getfirstdevice (void);/
+<tag/Description/The function returns the first device.
+The constant <tt/INVALID_DEVICE/ indicates no device.
+<tag/Notes/<itemize>
+<item>Calling getfirstdevice() does <em/not/ turn on the motor of a
+drive-type device and does <em/not/ check for a disk in the drive.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="getcurrentdevice" name="getcurrentdevice">,
+<ref id="getdevicedir" name="getdevicedir">,
+<ref id="getnextdevice" name="getnextdevice">
+<tag/Example/<verb>
+unsigned char dev = getfirstdevice ();
+while (dev != INVALID_DEVICE) {
+        printf ("%d\n", dev);
+        dev = getnextdevice (dev);
+        }
+</verb>
+</descrip>
+</quote>
+
+
+<sect1>getnextdevice<label id="getnextdevice"><p>
+
+<quote>
+<descrip>
+<tag/Function/Get next device.
+<tag/Header/<tt/<ref id="device.h" name="device.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ getnextdevice (unsigned char device);/
+<tag/Description/The function returns the next device after <tt/device/.
+The constant <tt/INVALID_DEVICE/ indicates no further device.
+<tag/Notes/<itemize>
+<item>Calling getnextdevice() does <em/not/ turn on the motor of a
+drive-type device and does <em/not/ check for a disk in the drive.
+<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="getcurrentdevice" name="getcurrentdevice">,
+<ref id="getdevicedir" name="getdevicedir">,
+<ref id="getfirstdevice" name="getfirstdevice">
+<tag/Example/<verb>
+unsigned char dev = getfirstdevice ();
+while (dev != INVALID_DEVICE) {
+        printf ("%d\n", dev);
+        dev = getnextdevice (dev);
+        }
+</verb>
+</descrip>
+</quote>
+
+
 <sect1>getopt<label id="getopt"><p>
 
 <quote>
@@ -3690,6 +4427,27 @@ fastcall function, so it may only be used in presence of a prototype.
 </quote>
 
 
+<sect1>isfast<label id="isfast"><p>
+
+<quote>
+<descrip>
+<tag/Function/Check if the CPU is in fast mode (C128: 2MHz mode, C16/Plus4: double clock mode).
+<tag/Header/<tt/<ref id="c128.h" name="c128.h">,
+<ref id="c16.h" name="c16.h">, <ref id="plus4.h" name="plus4.h">/
+<tag/Declaration/<tt/unsigned char isfast (void);/
+<tag/Description/The function returns a 1 if the CPU is in fast mode (C128: 2MHz mode, C16/Plus4: double clock mode).
+<tag/Notes/<itemize>
+<item>The function is specific to the C128, C16 and Plus4.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/See also/
+<ref id="fast" name="fast">,
+<ref id="slow" name="slow">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>isgraph<label id="isgraph"><p>
 
 <quote>
@@ -5269,7 +6027,7 @@ if (rename (OLDNAME, NEWNAME) == 0) {
 before a call to <tt/set_brk/.
 <tag/Notes/<itemize>
 <item>The break vector is reset on program termination, so it's not strictly
-necessary to call this function as a part of your clean-up when exitting the program.
+necessary to call this function as a part of your clean-up when exiting the program.
 </itemize>
 <tag/Availability/cc65
 <tag/See also/
@@ -5291,7 +6049,7 @@ necessary to call this function as a part of your clean-up when exitting the pro
 <tag/Description/<tt/reset_irq/ resets the C level interrupt request vector.
 <tag/Notes/<itemize>
 <item>The interrupt vector is reset on program termination, so it's not strictly
-necessary to call this function as a part of your clean-up when exitting the program.
+necessary to call this function as a part of your clean-up when exiting the program.
 </itemize>
 <tag/Availability/cc65
 <tag/See also/
@@ -5652,7 +6410,7 @@ the continue with the interrupted code, you have to adjust <tt/brk_pc/,
 otherwise the <tt/BRK/ instruction will get executed over and over again.
 <item>The break vector is reset on program termination, so it's not strictly
 necessary to call <tt/<ref id="reset_brk" name="reset_brk">/ as a part of your
-clean-up when exitting the program.
+clean-up when exiting the program.
 </itemize>
 <tag/Availability/cc65
 <tag/See also/
@@ -5690,7 +6448,7 @@ enable stack checks for the handler function or any other function called from
 it.
 <item>The interrupt vector is reset on program termination, so it's not strictly
 necessary to call <tt/<ref id="reset_irq" name="reset_irq">/ as a part of your
-clean-up when exitting the program.
+clean-up when exiting the program.
 </itemize>
 <tag/Availability/cc65
 <tag/See also/
@@ -5702,6 +6460,138 @@ clean-up when exitting the program.
 </quote>
 
 
+<sect1>set_c128_speed<label id="set_c128_speed"><p>
+
+<quote>
+<descrip>
+<tag/Function/Set the current speed of a C128 CPU.
+<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ set_c128_speed (unsigned char speed);/
+<tag/Description/The function returns the speed after trying to set the speed of the C128 CPU.
+<tag/Notes/<itemize>
+<item>The function is specific to the C64 and C128.
+<item>The function does not check if the C128 CPU is the current CPU.
+<item>See the accelerator.h header for the speed definitions.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/See also/
+<ref id="detect_c128" name="detect_c128">,
+<ref id="get_c128_speed" name="get_c128_speed">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>set_c64dtv_speed<label id="set_c64dtv_speed"><p>
+
+<quote>
+<descrip>
+<tag/Function/Set the current speed of the C64DTV.
+<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ set_c64dtv_speed (unsigned char speed);/
+<tag/Description/The function returns the speed after trying to set the speed of the C64DTV.
+<tag/Notes/<itemize>
+<item>The function is specific to the C64.
+<item>The function does not check for the presence of the C64DTV.
+<item>See the accelerator.h header for the speed definitions.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/See also/
+<ref id="detect_c64dtv" name="detect_c64dtv">,
+<ref id="get_c64dtv_speed" name="get_c64dtv_speed">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>set_c65_speed<label id="set_c65_speed"><p>
+
+<quote>
+<descrip>
+<tag/Function/Set the current speed of the C65/C64DX in C64 mode.
+<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ set_c65_speed (unsigned char speed);/
+<tag/Description/The function returns the speed after trying to set the speed of the C65/C64DX in C64 mode.
+<tag/Notes/<itemize>
+<item>The function is specific to the C64.
+<item>The function does not check for the presence of a C65/C64DX in C64 mode.
+<item>See the accelerator.h header for the speed definitions.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/See also/
+<ref id="detect_c65" name="detect_c65">,
+<ref id="get_c65_speed" name="get_c65_speed">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>set_chameleon_speed<label id="set_chameleon_speed"><p>
+
+<quote>
+<descrip>
+<tag/Function/Set the current speed of the C64 Chameleon cartridge.
+<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ set_chameleon_speed (unsigned char speed);/
+<tag/Description/The function returns the speed after trying to set the speed of the C64 Chameleon cartridge.
+<tag/Notes/<itemize>
+<item>The function is specific to the C64.
+<item>The function does not check for the presence of the C64 Chameleon cartridge.
+<item>See the accelerator.h header for the speed definitions.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/See also/
+<ref id="detect_chameleon" name="detect_chameleon">,
+<ref id="get_chameleon_speed" name="get_chameleon_speed">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>set_scpu_speed<label id="set_scpu_speed"><p>
+
+<quote>
+<descrip>
+<tag/Function/Set the current speed of the C64/C128 SuperCPU cartridge.
+<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ set_scpu_speed (unsigned char speed);/
+<tag/Description/The function returns the speed after trying to set the speed of the SuperCPU cartridge.
+<tag/Notes/<itemize>
+<item>The function is specific to the C128 and C64.
+<item>The function does not check for the presence of the cartridge.
+<item>See the accelerator.h header for the speed definitions.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/See also/
+<ref id="detect_scpu" name="detect_scpu">,
+<ref id="get_scpu_speed" name="get_scpu_speed">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>set_turbomaster_speed<label id="set_turbomaster_speed"><p>
+
+<quote>
+<descrip>
+<tag/Function/Set the current speed of the C64 Turbo Master cartridge.
+<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ set_turbomaster_speed (unsigned char speed);/
+<tag/Description/The function returns the speed after trying to set the speed of the C64 Turbo Master cartridge.
+<tag/Notes/<itemize>
+<item>The function is specific to the C64.
+<item>The function does not check for the presence of the C64 Turbo Master cartridge.
+<item>See the accelerator.h header for the speed definitions.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/See also/
+<ref id="detect_turbomaster" name="detect_turbomaster">,
+<ref id="get_turbomaster_speed" name="get_turbomaster_speed">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>setjmp<label id="setjmp"><p>
 
 <quote>
@@ -5798,19 +6688,20 @@ be used in presence of a prototype.
 
 <quote>
 <descrip>
-<tag/Function/Switch the C128 into 1MHz mode.
-<tag/Header/<tt/<ref id="c128.h" name="c128.h">/
+<tag/Function/Switch the CPU into slow mode (C128: 1MHz mode, C16/Plus4: single clock mode).
+<tag/Header/<tt/<ref id="c128.h" name="c128.h">,
+<ref id="c16.h" name="c16.h">, <ref id="plus4.h" name="plus4.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/Description/The function will switch the clock of the CPU to slow mode. for the C128
+target it means switching the CPU into 1MHz mode. for the C16/Plus4 target it means
+switching the CPU into single clock mode.
 <tag/Notes/<itemize>
-<item>The function is specific to the C128.
+<item>The function is specific to the C128, C16 and Plus4.
 </itemize>
-<tag/Availability/C128
+<tag/Availability/cc65 (not all platforms)
 <tag/See also/
 <ref id="fast" name="fast">,
-<ref id="toggle_videomode" name="toggle_videomode">,
-<ref id="videomode" name="videomode">
+<ref id="isfast" name="isfast">,
 <tag/Example/None.
 </descrip>
 </quote>
@@ -6023,6 +6914,7 @@ be used in presence of a prototype.
 </itemize>
 <tag/Availability/ISO 9899
 <tag/See also/
+<ref id="strpbrk" name="strpbrk">,
 <ref id="strqtok" name="strqtok">,
 <ref id="strspn" name="strspn">,
 <ref id="strstr" name="strstr">,
@@ -6164,6 +7056,34 @@ See <tt/strlower/.
 </quote>
 
 
+<sect1>strncasecmp<label id="strncasecmp"><p>
+
+<quote>
+<descrip>
+<tag/Function/Compare two strings case insensitive.
+<tag/Header/<tt/<ref id="string.h" name="string.h">/
+<tag/Declaration/<tt/int __fastcall__ strncasecmp (const char* s1, const char* s2, size_t count);/
+<tag/Description/The <tt/strncasecmp/ function compares the two strings passed
+as parameters without case sensitivity. It returns a value that is less than
+zero if <tt/s1/ is less than <tt/s2/, zero if <tt/s1/ is the same as <tt/s2/,
+and a value greater than zero if <tt/s1/ is greater than <tt/s2/.
+<tag/Notes/<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+<item>The function is not available in strict ANSI mode.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="strcmp" name="strcmp">,
+<ref id="strcoll" name="strcoll">,
+<ref id="stricmp" name="stricmp">,
+<ref id="strncmp" name="strncmp">,
+<ref id="strxfrm" name="strxfrm">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>strncat<label id="strncat"><p>
 
 <quote>
@@ -6257,6 +7177,60 @@ strncpy (hello, "Hello world!\n", sizeof hello - 1)[5] = '\0';
 </quote>
 
 
+<sect1>strnicmp<label id="strnicmp"><p>
+
+<quote>
+<descrip>
+<tag/Function/Compare two strings case insensitive.
+<tag/Header/<tt/<ref id="string.h" name="string.h">/
+<tag/Declaration/<tt/int __fastcall__ strnicmp (const char* s1, const char* s2, size_t count);/
+<tag/Description/The <tt/strnicmp/ function compares the two strings passed as
+parameters without case sensitivity. It returns a value that is less than zero
+if <tt/s1/ is less than <tt/s2/, zero if <tt/s1/ is the same as <tt/s2/, and a
+value greater than zero if <tt/s1/ is greater than <tt/s2/.
+<tag/Notes/<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+<item>The function is not available in strict ANSI mode.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="strcasecmp" name="strcasecmp">,
+<ref id="strcmp" name="strcmp">,
+<ref id="strcoll" name="strcoll">,
+<ref id="strncmp" name="strncmp">,
+<ref id="strxfrm" name="strxfrm">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>strpbrk<label id="strpbrk"><p>
+
+<quote>
+<descrip>
+<tag/Function/Find a character in a string, from a set of characters.
+<tag/Header/<tt/<ref id="string.h" name="string.h">/
+<tag/Declaration/<tt/char* __fastcall__ strpbrk (const char* str, const char* set);/
+<tag/Description/<tt/strpbrk()/ searches within <tt/str/ for the first
+occurance of any character from <tt/set/.  It returns a pointer to that
+character if found; otherwise, it returns <tt/NULL/.
+<tag/Notes/<itemize>
+<item>The function is available only as a fastcall function;
+so, it should be used only in the presence of a prototype.
+</itemize>
+<tag/Availability/ISO 9899
+<tag/See also/
+<ref id="strchr" name="strchr">,
+<ref id="strcspn" name="strcspn">,
+<ref id="strqtok" name="strqtok">,
+<ref id="strspn" name="strspn">,
+<ref id="strtok" name="strtok">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>strqtok<label id="strqtok"><p>
 
 <quote>
@@ -6281,7 +7255,7 @@ a second <tt/s1/ string before it finishes the first one.
 <tag/Availability/cc65
 <tag/See also/
 <ref id="strcspn" name="strcspn">,
-<!-- <ref id="strpbrk" name="strpbrk">, -->
+<ref id="strpbrk" name="strpbrk">,
 <ref id="strspn" name="strspn">,
 <ref id="strtok" name="strtok">
 <tag/Example/None.
@@ -6329,6 +7303,7 @@ be used in presence of a prototype.
 <tag/Availability/ISO 9899
 <tag/See also/
 <ref id="strcspn" name="strcspn">,
+<ref id="strpbrk" name="strpbrk">,
 <ref id="strstr" name="strstr">
 <tag/Example/None.
 </descrip>
@@ -6381,7 +7356,7 @@ a second <tt/s1/ string before it finishes the first one.
 <tag/Availability/ISO 9899
 <tag/See also/
 <ref id="strcspn" name="strcspn">,
-<!-- <ref id="strpbrk" name="strpbrk">, -->
+<ref id="strpbrk" name="strpbrk">,
 <ref id="strqtok" name="strqtok">,
 <ref id="strspn" name="strspn">
 <tag/Example/None.
@@ -6511,7 +7486,7 @@ be used in presence of a prototype.
 <tag/Description/The function returns the time since the 1970-01-01 00:00:00
 measured in seconds. If the pointer <tt/t/ is not <tt/NULL/, the function
 result will also be stored there. If no time is available, <tt/(time_t)-1/ is
-returned and <tt/errno/ is set to <tt/ENOSYS/.
+returned and an error code is stored in <tt/errno/.
 <tag/Notes/<itemize>
 <item>The function is only available as fastcall function, so it may
 only be used in presence of a prototype.
@@ -6520,7 +7495,8 @@ returned value may not be valid.
 </itemize>
 <tag/Availability/ISO 9899
 <tag/See also/
-<ref id="clock" name="clock">
+<ref id="clock" name="clock">,
+<ref id="clock_gettime" name="clock_gettime">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -6544,6 +7520,7 @@ name="videomode"> instead!
 <tag/Availability/C128
 <tag/See also/
 <ref id="fast" name="fast">,
+<ref id="isfast" name="isfast">,
 <ref id="slow" name="slow">,
 <ref id="videomode" name="videomode">
 <tag/Example/None.
@@ -6744,6 +7721,7 @@ used in presence of a prototype.
 <tag/Availability/C128 and enhanced Apple //e
 <tag/See also/
 <ref id="fast" name="fast">,
+<ref id="isfast" name="isfast">,
 <ref id="slow" name="slow">,
 <ref id="toggle_videomode" name="toggle_videomode">
 <tag/Example/None.
@@ -6757,6 +7735,7 @@ used in presence of a prototype.
 <descrip>
 <tag/Function/Wait until the start of the next frame.
 <tag/Header/
+<tt/<ref id="cbm.h" name="cbm.h">/,
 <tt/<ref id="gamate.h" name="gamate.h">/,
 <tt/<ref id="nes.h" name="nes.h">/,
 <tt/<ref id="pce.h" name="pce.h">/