]> git.sur5r.net Git - cc65/blobdiff - doc/funcref.sgml
Added '_' prefix to sin and cos.
[cc65] / doc / funcref.sgml
index 55701cf55d9bad493208389b004bec13c35a7690..030c726cc46d16df10f1ebda16c64f3e277934f0 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>2018-02-07
 
 <abstract>
 cc65 is a C compiler for 6502 based systems. This function reference describes
@@ -70,13 +69,22 @@ function.
 <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>
 
 
@@ -95,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>
 
@@ -191,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"> -->
@@ -234,16 +243,19 @@ function.
 <sect1><tt/cc65.h/<label id="cc65.h"><p>
 
 <itemize>
-<!-- <item><ref id="cc65_cos" name="cc65_cos"> -->
-<!-- <item><ref id="cc65_idiv32by16r16" name="cc65_idiv32by16r16"> -->
-<!-- <item><ref id="cc65_imul16x16r32" name="cc65_imul16x16r32"> -->
-<!-- <item><ref id="cc65_imul8x8r16" name="cc65_imul8x8r16"> -->
-<!-- <item><ref id="cc65_sin" name="cc65_sin"> -->
-<!-- <item><ref id="cc65_udiv32by16r16" name="cc65_udiv32by16r16"> -->
-<!-- <item><ref id="cc65_umul16x16r32" name="cc65_umul16x16r32"> -->
-<!-- <item><ref id="cc65_umul16x8r32" name="cc65_umul16x8r32"> -->
-<!-- <item><ref id="cc65_umul8x8r16" name="cc65_umul8x8r16"> -->
+
+<!-- <item><ref id="_cos" name="_cos"> -->
+<!-- <item><ref id="idiv32by16r16" name="idiv32by16r16"> -->
+<!-- <item><ref id="imul16x16r32" name="imul16x16r32"> -->
+<!-- <item><ref id="imul8x8r16" name="imul8x8r16"> -->
+<!-- <item><ref id="_sin" name="_sin"> -->
+<!-- <item><ref id="udiv32by16r16" name="udiv32by16r16"> -->
+<!-- <item><ref id="umul16x16r32" name="umul16x16r32"> -->
+<!-- <item><ref id="umul16x8r32" name="umul16x8r32"> -->
+<!-- <item><ref id="umul8x8r16" name="umul8x8r16"> -->
 <item><ref id="doesclrscrafterexit" name="doesclrscrafterexit">
+<item><ref id="mul20" name="mul20">
+<item><ref id="mul40" name="mul40">
 </itemize>
 
 (incomplete)
@@ -348,6 +360,9 @@ function.
 
 <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">
@@ -534,8 +549,8 @@ It does not declare any functions.
 
 <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">
@@ -566,7 +581,6 @@ communication.
 <item><ref id="signal" name="signal">
 </itemize>
 
-
 <sect1><tt/stdarg.h/<label id="stdarg.h"><p>
 
 (incomplete)
@@ -702,6 +716,7 @@ communication.
 <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">
@@ -735,9 +750,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"> -->
@@ -1005,7 +1022,6 @@ It returns 1 if it does.
 </descrip>
 </quote>
 
-
 <sect1>_poserror<label id="_poserror"><p>
 
 <quote>
@@ -2078,7 +2094,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>
@@ -2210,6 +2226,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>
@@ -2275,6 +2316,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>
@@ -2310,9 +2373,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">
@@ -2321,6 +2381,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>
@@ -2495,6 +2577,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>
@@ -2966,6 +3131,46 @@ used in presence of a prototype.
 </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>
@@ -2986,6 +3191,26 @@ used in presence of a prototype.
 </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>
@@ -3162,7 +3387,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.
@@ -3569,6 +3794,50 @@ header files define constants that can be used to check the return code.
 </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>
@@ -3591,6 +3860,27 @@ header files define constants that can be used to check the return code.
 </quote>
 
 
+<sect1>get_turbomaster_speed<label id="get_turbomaster_speed"><p>
+
+<quote>
+<descrip>
+<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 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>
@@ -5269,6 +5559,29 @@ memory allocated for the driver.
 </descrip>
 </quote>
 
+<sect1>mul20<label id="mul20"><p>
+
+<quote>
+<descrip>
+<tag/Function/Multiplies argument by 20.
+<tag/Header/<tt/<ref id="cc65.h" name="cc65.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="cc65.h" name="cc65.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>offsetof<label id="offsetof"><p>
 
@@ -5709,7 +6022,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/
@@ -5731,7 +6044,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/
@@ -6092,7 +6405,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/
@@ -6130,7 +6443,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/
@@ -6186,6 +6499,50 @@ clean-up when exitting the program.
 </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>
@@ -6208,6 +6565,28 @@ clean-up when exitting the program.
 </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>
@@ -6530,6 +6909,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">,
@@ -6820,6 +7200,32 @@ be used in presence of a prototype.
 </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>
@@ -6844,7 +7250,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.
@@ -6892,6 +7298,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>
@@ -6944,7 +7351,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.
@@ -7074,7 +7481,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.
@@ -7083,7 +7490,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>