]> git.sur5r.net Git - cc65/blobdiff - doc/funcref.sgml
Switch for vice label file has changed
[cc65] / doc / funcref.sgml
index 8d416680a65dad02610837e9308dbeb4aa18c541..4c87a757f57ddb122ded1d0bd2495e36ca6f2db9 100644 (file)
@@ -64,11 +64,14 @@ function.
 
 <sect1><tt/apple2.h/<label id="apple2.h"><p>
 
+<itemize>
+<item><ref id="get_ostype" name="get_ostype">
+</itemize>
 
-<sect1><tt/atari.h/<label id="atari.h"><p>
 
+<sect1><tt/apple2enh.h/<label id="apple2enh.h"><p>
 
-<sect1><tt/atmos.h/<label id="atmos.h"><p>
+(incomplete)
 
 
 <sect1><tt/assert.h/<label id="assert.h"><p>
@@ -78,6 +81,20 @@ function.
 </itemize>
 
 
+<sect1><tt/atari.h/<label id="atari.h"><p>
+
+<itemize>
+<item><ref id="get_ostype" name="get_ostype">
+</itemize>
+
+(incomplete)
+
+
+<sect1><tt/atmos.h/<label id="atmos.h"><p>
+
+(incomplete)
+
+
 <sect1><tt/c128.h/<label id="c128.h"><p>
 
 <itemize>
@@ -90,9 +107,35 @@ function.
 
 <sect1><tt/c16.h/<label id="c16.h"><p>
 
+(incomplete)
+
 
 <sect1><tt/c64.h/<label id="c64.h"><p>
 
+<itemize>
+<item><ref id="get_ostype" name="get_ostype">
+</itemize>
+
+
+<sect1><tt/cbm510.h/<label id="cbm510.h"><p>
+
+<itemize>
+<item><ref id="peekbsys" name="peekbsys">
+<item><ref id="peekwsys" name="peekwsys">
+<item><ref id="pokebsys" name="pokebsys">
+<item><ref id="pokewsys" name="pokewsys">
+</itemize>
+
+
+<sect1><tt/cbm610.h/<label id="cbm610.h"><p>
+
+<itemize>
+<item><ref id="peekbsys" name="peekbsys">
+<item><ref id="peekwsys" name="peekwsys">
+<item><ref id="pokebsys" name="pokebsys">
+<item><ref id="pokewsys" name="pokewsys">
+</itemize>
+
 
 <sect1><tt/conio.h/<label id="conio.h"><p>
 
@@ -149,9 +192,13 @@ function.
 
 <sect1><tt/dbg.h/<label id="dbg.h"><p>
 
+(incomplete)
+
 
 <sect1><tt/dio.h/<label id="dio.h"><p>
 
+(incomplete)
+
 
 <sect1><tt/em.h/<label id="em.h"><p>
 
@@ -159,9 +206,11 @@ function.
 <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_install" name="em_install">
 <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_uninstall" name="em_uninstall">
 <item><ref id="em_unload" name="em_unload">
 <item><ref id="em_use" name="em_use">
 </itemize>
@@ -169,6 +218,8 @@ function.
 
 <sect1><tt/errno.h/<label id="errno.h"><p>
 
+(incomplete)
+
 
 <sect1><tt/fcntl.h/<label id="fcntl.h"><p>
 
@@ -181,9 +232,20 @@ function.
 
 <sect1><tt/geos.h/<label id="geos.h"><p>
 
+(incomplete)
+
 
 <sect1><tt/joystick.h/<label id="joystick.h"><p>
 
+<itemize>
+<item><ref id="joy_count" name="joy_count">
+<item><ref id="joy_install" name="joy_install">
+<item><ref id="joy_load_driver" name="joy_load_driver">
+<item><ref id="joy_read" name="joy_read">
+<item><ref id="joy_uninstall" name="joy_uninstall">
+<item><ref id="joy_unload" name="joy_unload">
+</itemize>
+
 
 <sect1><tt/locale.h/<label id="locale.h"><p>
 
@@ -195,12 +257,44 @@ function.
 
 <sect1><tt/modload.h/<label id="modload.h"><p>
 
+<itemize>
+<item><ref id="mod_load" name="mod_load">
+<item><ref id="mod_free" name="mod_free">
+</itemize>
+
+
+<sect1><tt/mouse.h/<label id="mouse.h"><p>
+
+<itemize>
+<item><ref id="mouse_load_driver" name="mouse_load_driver">
+<item><ref id="mouse_unload" name="mouse_unload">
+<item><ref id="mouse_install" name="mouse_install">
+<item><ref id="mouse_uninstall" name="mouse_uninstall">
+<item><ref id="mouse_hide" name="mouse_hide">
+<item><ref id="mouse_show" name="mouse_show">
+<item><ref id="mouse_box" name="mouse_box">
+<item><ref id="mouse_move" name="mouse_move">
+<item><ref id="mouse_buttons" name="mouse_buttons">
+<item><ref id="mouse_pos" name="mouse_pos">
+<item><ref id="mouse_info" name="mouse_info">
+<item><ref id="mouse_ioctl" name="mouse_ioctl">
+</itemize>
+
+(incomplete)
+
 
 <sect1><tt/nes.h/<label id="nes.h"><p>
 
+(incomplete)
+
 
 <sect1><tt/o65.h/<label id="o65.h"><p>
 
+The <tt/o65.h/ header file contains structure and constant definitions that
+may be used when dealing with files in <htmlurl
+url="http://www.6502.org/users/andre/o65/fileformat.html" name="o65 format">.
+It does not declare any functions.
+
 
 <sect1><tt/peekpoke.h/<label id="peekpoke.h"><p>
 
@@ -214,15 +308,41 @@ function.
 
 <sect1><tt/pet.h/<label id="pet.h"><p>
 
+(incomplete)
+
 
 <sect1><tt/plus4.h/<label id="plus4.h"><p>
 
+(incomplete)
+
 
 <sect1><tt/serial.h/<label id="serial.h"><p>
 
+<!--
+<itemize>
+<item><ref id="ser_load_driver" name="ser_load_driver">
+<item><ref id="ser_unload" name="ser_unload">
+<item><ref id="ser_install" name="ser_install">
+<item><ref id="ser_uninstall" name="ser_uninstall">
+<item><ref id="ser_open" name="ser_open">
+<item><ref id="ser_close" name="ser_close">
+<item><ref id="ser_get" name="ser_get">
+<item><ref id="ser_put" name="ser_put">
+<item><ref id="ser_status" name="ser_status">
+<item><ref id="ser_ioctl" name="ser_ioctl">
+</itemize>
+-->
+
+(incomplete)
+
 
 <sect1><tt/setjmp.h/<label id="setjmp.h"><p>
 
+<itemize>
+<item><ref id="setjmp" name="setjmp">
+<item><ref id="longjmp" name="longjmp">
+</itemize>
+
 
 <sect1><tt/signal.h/<label id="signal.h"><p>
 
@@ -234,9 +354,13 @@ function.
 
 <sect1><tt/stdarg.h/<label id="stdarg.h"><p>
 
+(incomplete)
+
 
 <sect1><tt/stdbool.h/<label id="stdbool.h"><p>
 
+(incomplete)
+
 
 <sect1><tt/stddef.h/<label id="stddef.h"><p>
 
@@ -247,43 +371,23 @@ function.
 
 <sect1><tt/stdio.h/<label id="stdio.h"><p>
 
-
-<sect1><tt/stdlib.h/<label id="stdlib.h"><p>
-
 <itemize>
-<item><ref id="_heapadd" name="_heapadd">
-<item><ref id="_heapblocksize" name="_heapblocksize">
-<item><ref id="_heapmaxavail" name="_heapmaxavail">
-<item><ref id="_heapmemavail" name="_heapmemavail">
-<item><ref id="_poserror" name="_poserror">
-<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="clearerr" name="clearerr"> -->
-<item><ref id="div" name="div">
-<item><ref id="exit" name="exit">
+<item><ref id="clearerr" name="clearerr">
 <!-- <item><ref id="fclose" name="fclose"> -->
 <!-- <item><ref id="fdopen" name="fdopen"> -->
-<!-- <item><ref id="feof" name="feof"> -->
-<!-- <item><ref id="ferror" name="ferror"> -->
+<item><ref id="feof" name="feof">
+<item><ref id="ferror" name="ferror">
 <!-- <item><ref id="fflush" name="fflush"> -->
 <!-- <item><ref id="fgetc" name="fgetc"> -->
 <!-- <item><ref id="fgetpos" name="fgetpos"> -->
 <!-- <item><ref id="fgets" name="fgets"> -->
-<!-- <item><ref id="fileno" name="fileno"> -->
+<item><ref id="fileno" name="fileno">
 <!-- <item><ref id="flushall" name="flushall"> -->
 <!-- <item><ref id="fopen" name="fopen"> -->
 <!-- <item><ref id="fprintf" name="fprintf"> -->
 <!-- <item><ref id="fputc" name="fputc"> -->
 <!-- <item><ref id="fputs" name="fputs"> -->
 <!-- <item><ref id="fread" name="fread"> -->
-<item><ref id="free" name="free">
 <!-- <item><ref id="freopen" name="freopen"> -->
 <!-- <item><ref id="fscanf" name="fscanf"> -->
 <!-- <item><ref id="fseek" name="fseek"> -->
@@ -293,28 +397,15 @@ function.
 <!-- <item><ref id="getc" name="getc"> -->
 <!-- <item><ref id="getchar" name="getchar"> -->
 <!-- <item><ref id="gets" name="gets"> -->
-<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="perror" name="perror">
 <!-- <item><ref id="printf" name="printf"> -->
 <!-- <item><ref id="putc" name="putc"> -->
 <!-- <item><ref id="putchar" name="putchar"> -->
 <!-- <item><ref id="puts" name="puts"> -->
-<item><ref id="qsort" name="qsort">
-<item><ref id="rand" name="rand">
-<item><ref id="realloc" name="realloc">
-<item><ref id="remove" name="remove">
 <!-- <item><ref id="rename" name="rename"> -->
 <!-- <item><ref id="rewind" name="rewind"> -->
 <!-- <item><ref id="scanf" name="scanf"> -->
 <!-- <item><ref id="sprintf" name="sprintf"> -->
-<item><ref id="srand" name="srand">
 <!-- <item><ref id="sscanf" name="sscanf"> -->
-<item><ref id="ultoa" name="ultoa">
-<item><ref id="utoa" name="utoa">
 <!-- <item><ref id="vfprintf" name="vfprintf"> -->
 <!-- <item><ref id="vfscanf" name="vfscanf"> -->
 <!-- <item><ref id="vprintf" name="vprintf"> -->
@@ -323,6 +414,44 @@ function.
 <!-- <item><ref id="vsscanf" name="vsscanf"> -->
 </itemize>
 
+(incomplete)
+
+
+<sect1><tt/stdlib.h/<label id="stdlib.h"><p>
+
+<itemize>
+<item><ref id="_heapadd" name="_heapadd">
+<item><ref id="_heapblocksize" name="_heapblocksize">
+<item><ref id="_heapmaxavail" name="_heapmaxavail">
+<item><ref id="_heapmemavail" name="_heapmemavail">
+<item><ref id="_poserror" name="_poserror">
+<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="perror" name="perror">
+<item><ref id="qsort" name="qsort">
+<item><ref id="rand" name="rand">
+<item><ref id="realloc" name="realloc">
+<item><ref id="remove" name="remove">
+<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>
 
@@ -346,37 +475,41 @@ function.
 <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="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="strtok" name="strtok">
 <!-- <item><ref id="strxfrm" name="strxfrm"> -->
 <item><ref id="strupper" name="strupper">
 <item><ref id="strupr" name="strupr">
 </itemize>
 
+(incomplete)
+
 
 <sect1><tt/tgi.h/<label id="tgi.h"><p>
 
+(incomplete)
+
 
 <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="ctime" name="ctime">
-<item><ref id="gmtime" name="gmtime">
-<item><ref id="localtime" name="localtime">
-<item><ref id="mktime" name="mktime">
-<item><ref id="strftime" name="strftime">
+<!-- <item><ref id="_systime" name="_systime"> -->
+<!-- <item><ref id="asctime" name="asctime"> -->
+<!-- <item><ref id="clock" name="clock"> -->
+<!-- <item><ref id="ctime" name="ctime"> -->
+<!-- <item><ref id="gmtime" name="gmtime"> -->
+<!-- <item><ref id="localtime" name="localtime"> -->
+<!-- <item><ref id="mktime" name="mktime"> -->
+<!-- <item><ref id="strftime" name="strftime"> -->
 <item><ref id="time" name="time">
 </itemize>
--->
+
+(incomplete)
 
 
 <sect1><tt/unistd.h/<label id="unistd.h"><p>
@@ -393,13 +526,17 @@ function.
 <!-- <item><ref id="write" name="write"> -->
 </itemize>
 
+(incomplete)
+
 
 <sect1><tt/vic20.h/<label id="vic20.h"><p>
 
+(incomplete)
 
-<sect1><tt/zlib.h/<label id="zlib.h"><p>
 
+<sect1><tt/zlib.h/<label id="zlib.h"><p>
 
+(incomplete)
 
 
 <sect>Alphabetical function reference<p>
@@ -415,7 +552,7 @@ function.
 <tag/Limits/
 <itemize>
 <item>The minimum blocksize that can be added is 6 bytes; the function will
-ignore blocks with smaller sizes.
+ignore smaller blocks.
 </itemize>
 <tag/Availability/cc65
 <tag/See also/
@@ -443,7 +580,7 @@ previously been allocated by <tt/<ref id="malloc" name="malloc">/, <tt/<ref
 id="calloc" name="calloc">/ or <tt/<ref id="realloc" name="realloc">/.
 <tag/Limits/
 <itemize>
-<item>Passing a pointer to a block that was is not the result of one of the 
+<item>Passing a pointer to a block that was is not the result of one of the
 allocation functions, or that has been free'd will give unpredicable results.
 </itemize>
 <tag/Availability/cc65
@@ -954,8 +1091,9 @@ used in presence of a prototype.
 <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/Description/The function will set a new background color and return the
+old (current) one. The background color is valid for the whole text output
+area of the screen, not just for new text.
 <tag/Limits/<itemize>
 <item>Background colors are system dependent. The function may have no effect
 on systems where the background color cannot be changed.
@@ -1227,6 +1365,28 @@ used in presence of a prototype.
 </quote>
 
 
+<sect1>clearerr<label id="clearerr"><p>
+
+<quote>
+<descrip>
+<tag/Function/Clear error and end-of-file status of a stream.
+<tag/Header/<tt/<ref id="stdio.h" name="stdio.h">/
+<tag/Declaration/<tt/void __fastcall__ clearerr (FILE* f);/
+<tag/Description/<tt/clearerr/ clears the error and end-of-file status
+indicators for the stream <tt/f/.
+<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="feof" name="feof">,
+<ref id="ferror" name="ferror">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>clrscr<label id="clrscr"><p>
 
 <quote>
@@ -1259,7 +1419,7 @@ reading the <tt/errno/ variable.
 <item>The function is only available as fastcall function, so it may only
 be used in presence of a prototype.
 </itemize>
-<tag/Availability/POSIX
+<tag/Availability/POSIX 1003.1
 <tag/See also/
 <ref id="creat" name="creat">,
 <ref id="open" name="open">
@@ -1284,7 +1444,7 @@ associated with it. On error, -1 is returned and an error code is stored in
 <item>The function is only available as fastcall function, so it may only
 be used in presence of a prototype.
 </itemize>
-<tag/Availability/POSIX
+<tag/Availability/POSIX 1003.1
 <tag/See also/
 <ref id="close" name="close">,
 <ref id="open" name="open">
@@ -1614,6 +1774,32 @@ loaded.
 </quote>
 
 
+<sect1>em_install<label id="em_install"><p>
+
+<quote>
+<descrip>
+<tag/Function/Install an already loaded extended memory driver.
+<tag/Header/<tt/<ref id="em.h" name="em.h">/
+<tag/Declaration/<tt/unsigned char _fastcall__ em_install (void* driver);/
+<tag/Description/The function installs an already loaded extended memory driver
+and returns an error code. The function may be used to install a driver linked
+statically to the program.
+<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.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="em_load_driver" name="em_load_driver">,
+<ref id="em_uninstall" name="em_uninstall">,
+<ref id="em_unload" name="em_unload">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>em_load_driver<label id="em_load_driver"><p>
 
 <quote>
@@ -1694,13 +1880,40 @@ by the driver in 256 byte pages.
 </quote>
 
 
+<sect1>em_uninstall<label id="em_uninstall"><p>
+
+<quote>
+<descrip>
+<tag/Function/Uninstall an already loaded extended memory driver.
+<tag/Header/<tt/<ref id="em.h" name="em.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ em_install (void);/
+<tag/Description/The function uninstalls an already loaded extended memory
+driver but doesn't remove it from memory.
+<tag/Limits/<itemize>
+<item>If the driver has been loaded using <tt/<ref id="em_load_driver"
+name="em_load_driver">/, <tt/<ref id="em_unload" name="em_unload">/
+should be used instead of <tt/em_uninstall/ so the driver is also removed
+from memory.
+<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="em_install" name="em_install">,
+<ref id="em_load_driver" name="em_load_driver">,
+<ref id="em_unload" name="em_unload">
+<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/Declaration/<tt/unsigned char __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>
@@ -1795,6 +2008,79 @@ will nearly double the speed compared to slow mode.
 </quote>
 
 
+<sect1>feof<label id="feof"><p>
+
+<quote>
+<descrip>
+<tag/Function/Return the end-of-file indicator of a stream.
+<tag/Header/<tt/<ref id="stdio.h" name="stdio.h">/
+<tag/Declaration/<tt/int __fastcall__ feof (FILE* f);/
+<tag/Description/<tt/feof/ tests the end-of-file indicator ofthe stream
+<tt/f/, and returns a non zero value if it is set.
+<tag/Limits/<itemize>
+<item>The indicator is set only after a read past the end of a file is
+attempted.
+<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="feof" name="clearerr">,
+<ref id="ferror" name="ferror">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>ferror<label id="ferror"><p>
+
+<quote>
+<descrip>
+<tag/Function/Return the error indicator of a stream.
+<tag/Header/<tt/<ref id="stdio.h" name="stdio.h">/
+<tag/Declaration/<tt/int __fastcall__ ferror (FILE* f);/
+<tag/Description/<tt/ferror/ tests the error indicator of the stream
+<tt/f/, and returns a non zero value if it is set.
+<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="feof" name="clearerr">,
+<ref id="ferror" name="feof">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>fileno<label id="fileno"><p>
+
+<quote>
+<descrip>
+<tag/Function/Return the file handle used by a stream.
+<tag/Header/<tt/<ref id="stdio.h" name="stdio.h">/
+<tag/Declaration/<tt/int __fastcall__ fileno (FILE* f);/
+<tag/Description/The <tt/fileno/ function returns the file handle used
+internally by a C stream. This file handle (an integer) can be used as a
+handle for the POSIX input/output functions.
+<tag/Limits/<itemize>
+<item>The function is only available as fastcall function, so it may only be
+used in presence of a prototype.
+<item>Mixing C file I/O functions and POSIX file I/O functions for the same
+file may have unpredictable results.
+</itemize>
+<tag/Availability/POSIX 1003.1
+<tag/See also/
+<ref id="creat" name="creat">,
+<ref id="open" name="open"> <!-- , -->
+<!-- <ref id="read" name="read">, -->
+<!-- <ref id="write" name="write"> -->
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>free<label id="free"><p>
 
 <quote>
@@ -1827,6 +2113,28 @@ be used in presence of a prototype.
 </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/Limits/<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>getenv<label id="getenv"><p>
 
 <quote>
@@ -2478,23 +2786,173 @@ used in presence of a prototype.
 </quote>
 
 
-<sect1>kbhit<label id="kbhit"><p>
+<sect1>joy_count<label id="joy_count"><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/Function/Return the number of joysticks supported by the current driver.
+<tag/Header/<tt/<ref id="joystick.h" name="joystick.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ joy_count (void);/
+<tag/Description/The function returns a the number of joysticks supported
+by the current joystick driver.
 <tag/Limits/<itemize>
-<item>If the system does not support a keyboard buffer (most systems
-do), the function is rather useless.
+<item>A joystick driver must be loaded using <ref id="joy_load_driver"
+name="joy_load_driver"> before calling this function.
+<item>The function returns the number of joysticks supported by the driver.
+There's no way to check for the number of actually connected joysticks.
+<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="cursor" name="cursor">
+<ref id="joy_load_driver" name="joy_load_driver">,
+<ref id="joy_read" name="joy_read">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>joy_install<label id="joy_install"><p>
+
+<quote>
+<descrip>
+<tag/Function/Install an already loaded driver and return an error code.
+<tag/Header/<tt/<ref id="joystick.h" name="joystick.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ joy_install (void* driver);/
+<tag/Description/The function installs a driver that was already loaded into
+memory (or linked statically to the program). It returns an error code
+(<tt/JOY_ERR_OK/ in case of success).
+<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="joy_load_driver" name="joy_load_driver">,
+<ref id="joy_uninstall" name="joy_uninstall">,
+<ref id="joy_unload" name="joy_unload">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>joy_load_driver<label id="joy_load_driver"><p>
+
+<quote>
+<descrip>
+<tag/Function/Load a driver from disk and install it.
+<tag/Header/<tt/<ref id="joystick.h" name="joystick.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ joy_load_driver (const char* driver);/
+<tag/Description/The function loads a driver with the given name from disk
+and installs it. An error code is returned, which is <tt/JOY_ERR_OK/ if the
+driver was successfully loaded and installed.
+<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="joy_install" name="joy_install">,
+<ref id="joy_uninstall" name="joy_uninstall">,
+<ref id="joy_unload" name="joy_unload">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>joy_read<label id="joy_read"><p>
+
+<quote>
+<descrip>
+<tag/Function/Read the status of a joystick.
+<tag/Header/<tt/<ref id="joystick.h" name="joystick.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ joy_read (unsigned char joystick);/
+<tag/Description/The function reads the status bits for a joystick. The number
+of the joystick is passed as parameter. The result may be examined by using one
+of the <tt/JOY_xxx/ macros from <ref id="joystick.h" name="joystick.h">.
+<tag/Limits/<itemize>
+<item>A joystick driver must be loaded using <ref id="joy_load_driver"
+name="joy_load_driver"> before calling this function.
+<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="joy_count" name="joy_count">,
+<ref id="joy_load_driver" name="joy_load_driver">,
+<ref id="joy_unload" name="joy_unload">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>joy_uninstall<label id="joy_uninstall"><p>
+
+<quote>
+<descrip>
+<tag/Function/Uninstall the current joystick driver.
+<tag/Header/<tt/<ref id="joystick.h" name="joystick.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ joy_uninstall (void);/
+<tag/Description/The function uninstalls the currently installed joystick
+driver. It does not remove the driver from memory. The function returns an
+error code, which is <tt/JOY_ERR_OK/ if the driver was successfully uninstalled.
+<tag/Limits/<itemize>
+<item>A joystick driver must be installed using <ref id="joy_install"
+name="joy_install"> before calling this function.
+<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="joy_install" name="joy_install">,
+<ref id="joy_load_driver" name="joy_load_driver">,
+<ref id="joy_unload" name="joy_unload">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>joy_unload<label id="joy_unload"><p>
+
+<quote>
+<descrip>
+<tag/Function/Uninstall, then unload the current joystick driver.
+<tag/Header/<tt/<ref id="joystick.h" name="joystick.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ joy_unload (void);/
+<tag/Description/The function uninstalls the currently installed joystick
+driver and removes it from memory. An error code is returned, which is
+<tt/JOY_ERR_OK/ if the driver was successfully uninstalled.
+<tag/Limits/<itemize>
+<item>A joystick driver must be loaded using <ref id="joy_load_driver"
+name="joy_load_driver"> before calling this function.
+<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="joy_load_driver" name="joy_load_driver">
+<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>
@@ -2573,6 +3031,33 @@ always be the same.
 </quote>
 
 
+<sect1>longjmp<label id="longjmp"><p>
+
+<quote>
+<descrip>
+<tag/Function/Non local goto.
+<tag/Header/<tt/<ref id="setjmp.h" name="setjmp.h">/
+<tag/Declaration/<tt/void __fastcall__ longjmp (jmp_buf buf, int retval);/
+<tag/Description/The <tt/longjmp/ function restores a program context from the
+data in <tt/buf/, which must have been set by a preceeding call to
+<tt/<ref id="setjmp" name="setjmp">/. Program execution continues as if the
+call to <tt/<ref id="setjmp" name="setjmp">/ has just returned the value
+<tt/retval/.
+<tag/Limits/
+<itemize>
+<item>If the parameter <tt/retval/ is zero, the function will behave as if it
+was called with a value of one.
+<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="setjmp" name="setjmp">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>malloc<label id="malloc"><p>
 
 <quote>
@@ -2705,6 +3190,394 @@ be used in presence of a prototype.
 </quote>
 
 
+<sect1>mod_free<label id="mod_free"><p>
+
+<quote>
+<descrip>
+<tag/Function/Free a relocatable module.
+<tag/Header/<tt/<ref id="modload.h" name="modload.h">/
+<tag/Declaration/<tt/void __fastcall__ mod_free (void* module);/
+<tag/Description/The function will free a module loaded into memory by use of
+the <tt/<ref id="mod_load" name="mod_load">/ function.
+<tag/Limits/<itemize>
+<item>The pointer passed as parameter is the pointer to the module memory,
+not the pointer to the control structure.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="mod_load" name="mod_load">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mod_load<label id="mod_load"><p>
+
+<quote>
+<descrip>
+<tag/Function/Load a relocatable module.
+<tag/Header/<tt/<ref id="modload.h" name="modload.h">/
+<tag/Declaration/<tt/unsigned char mod_load (struct mod_ctrl* ctrl);/
+<tag/Description/The function will load a code module into memory and relocate
+it. The function will return an error code. If <tt/MLOAD_OK/ is returned, the
+outgoing fields in the passed <tt/mod_ctrl/ struct contain information about
+the module just loaded. Possible error codes are:
+<itemize>
+<item><tt/MLOAD_OK/ - Module load successful
+<item><tt/MLOAD_ERR_READ/ - Read error
+<item><tt/MLOAD_ERR_HDR/ - Header error
+<item><tt/MLOAD_ERR_OS/ - Wrong operating system
+<item><tt/MLOAD_ERR_FMT/ - Data format error
+<item><tt/MLOAD_ERR_MEM/ - Not enough memory
+</itemize>
+<tag/Limits/<itemize>
+<item>The <htmlurl url="ld65.html" name="ld65"> linker is needed to create
+relocatable o65 modules for use with this function.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="mod_free" name="mod_free">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_box<label id="mouse_box"><p>
+
+<quote>
+<descrip>
+<tag/Function/Specify a bounding box for the mouse cursor.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/void __fastcall__ mouse_box (int minx, int miny,
+int maxx, int maxy);/
+<tag/Description/The function allows to set a bounding box for mouse movement.
+<tag/Limits/<itemize>
+<item>The function does not check if the mouse cursor is currently within the
+given rectangle. Placing the mouse cursor within the bounding box is the
+responsibility of the programmer.
+<item>While the bounding box may be larger than the actual screen size, the
+standard mouse cursor draw routines may fail to set the cursor to coordinates
+outside of the screen area. Depending on the platform, you may have to supply
+your own mouse cursor routines.
+<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="mouse_move" name="mouse_move">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_buttons<label id="mouse_buttons"><p>
+
+<quote>
+<descrip>
+<tag/Function/Return a bit mask encoding the state of the mouse buttons.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ mouse_buttons (void);/
+<tag/Description/The function returns a bit mask that encodes the state of the
+mouse buttons. You may use the <tt/MOUSE_BTN_XXX/ flags to decode the function
+return value.
+<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="mouse_info" name="mouse_info">,
+<ref id="mouse_pos" name="mouse_pos">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_geterrormsg<label id="mouse_geterrormsg"><p>
+
+<quote>
+<descrip>
+<tag/Function/Return a readable error message for an error code.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/const char* __fastcall__ mouse_geterrormsg (unsigned char
+code);/
+<tag/Description/The function returns an error message (in english) for the
+error code passed parameter.
+<tag/Limits/<itemize>
+<item>The function will return "Unknown error" for invalid error codes.
+<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="mouse_load_driver" name="mouse_load_driver">,
+<ref id="mouse_uninstall" name="mouse_uninstall">,
+<ref id="mouse_unload" name="mouse_unload">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_hide<label id="mouse_hide"><p>
+
+<quote>
+<descrip>
+<tag/Function/Hide the mouse pointer.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/void __fastcall__ mouse_hide (void);/
+<tag/Description/The function hides the mouse pointer. It manages a counter
+that is shared between <tt/<ref id="mouse_show" name="mouse_show">/ and
+<tt/mouse_hide/ so that every call call to <tt/mouse_hide/ must be followed by
+a call to <tt/<ref id="mouse_show" name="mouse_show">/ to make the mouse cursor
+visible.
+<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="mouse_show" name="mouse_show">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_info<label id="mouse_info"><p>
+
+<quote>
+<descrip>
+<tag/Function/Return the state of the mouse buttons and the position of the
+mouse.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/void __fastcall__ mouse_info (struct mouse_info* info);/
+<tag/Description/The function returns the state of the mouse buttons and the
+position of the mouse in the <tt/mouse_info/ structure passed as parameter.
+<tag/Limits/<itemize>
+<item>The <tt/mouse_info/ struct is a superset of the <tt/mouse_pos/ struct,
+so if you just need the mouse position, call <tt/<ref id="mouse_pos"
+name="mouse_pos">/ instead.
+<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="mouse_buttons" name="mouse_buttons">,
+<ref id="mouse_pos" name="mouse_pos">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_install<label id="mouse_install"><p>
+
+<quote>
+<descrip>
+<tag/Function/Install an already loaded mouse driver.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ mouse_install (const struct
+mouse_callbacks* c, void* driver);/
+<tag/Description/The function installs an already loaded mouse driver and
+returns an error code. The <tt/mouse_callbacks/ structure passed as first
+parameter contains pointers to routines needed to move or hide/show the mouse
+pointer. Defaults for these routines are supplied by the library, so if you
+can live with these defaults (which are platform specific), just pass a
+pointer to <tt/mouse_def_callbacks/. The function may be used to install a
+driver linked statically to the program.
+<tag/Limits/<itemize>
+<item>Not all drivers are able to detect if the supported hardware is really
+present.
+<item>After installing a driver, the mouse cursor is hidden.
+<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="mouse_load_driver" name="mouse_load_driver">,
+<ref id="mouse_uninstall" name="mouse_uninstall">,
+<ref id="mouse_unload" name="mouse_unload">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_ioctl<label id="mouse_ioctl"><p>
+
+<quote>
+<descrip>
+<tag/Function/Call the driver specific ioctl function.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ mouse_ioctl (unsigned char code, void* data);/
+<tag/Description/The function calls the IOCTL entry in the mouse driver,
+which is driver specific. The <tt/code/ parameter will choose between
+different IOCTL functions, and the <tt/data/ depends on code. The
+function returns an error code. The purpose of this function is to allow
+for driver specific extensions. See the documentation for a specific mouse
+driver for supported ioctl calls.
+<tag/Limits/<itemize>
+<item>Calling this function is non portable, because each driver may
+implement different ioctl calls (or none at all).
+<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>mouse_load_driver<label id="mouse_load_driver"><p>
+
+<quote>
+<descrip>
+<tag/Function/Load and initialize a mouse driver.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ mouse_load_driver (const struct
+mouse_callbacks* c, const char* driver);/
+<tag/Description/Load a mouse driver into memory and initialize it. The
+function returns an error code that tells if the call has been successful. The
+<tt/mouse_callbacks/ structure passed as first parameter contains pointers to
+routines needed to move or hide/show the mouse pointer. Defaults for these
+routines are supplied by the library, so if you can live with these defaults
+(which are platform specific), just pass a pointer to <tt/mouse_def_callbacks/.
+<tag/Limits/<itemize>
+<item>The driver is loaded by name, so currently you must know the type of
+mouse that should be supported. There is no autodetect capability.
+<item>Not all drivers are able to detect if the supported hardware is really
+present.
+<item>After installing a driver, the mouse cursor is hidden.
+<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="mouse_install" name="mouse_install">,
+<ref id="mouse_uninstall" name="mouse_uninstall">,
+<ref id="mouse_unload" name="mouse_unload">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_move<label id="mouse_move"><p>
+
+<quote>
+<descrip>
+<tag/Function/Move the mouse cursor to a specific position.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/void __fastcall__ mouse_move (int x, int y);/
+<tag/Description/The function updates the mouse position. If the mouse cursor
+is visible, it is shown at the new position.
+<tag/Limits/<itemize>
+<item>The function does not check if the new position is within the bounding
+box specified with <tt/<ref id="mouse_box" name="mouse_box">/.
+<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="mouse_box" name="mouse_box">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_pos<label id="mouse_pos"><p>
+
+<quote>
+<descrip>
+<tag/Function/Return the position of the mouse.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/void __fastcall__ mouse_pos (struct mouse_pos* pos);/
+<tag/Description/The function returns the position of the mouse in the
+<tt/mouse_pos/ structure passed as parameter.
+<tag/Limits/<itemize>
+<item>The <tt/mouse_pos/ struct is a subset of the <tt/mouse_info/ struct,
+so if you do also need the mouse buttons, call <tt/<ref id="mouse_info"
+name="mouse_info">/ instead.
+<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="mouse_buttons" name="mouse_buttons">,
+<ref id="mouse_info" name="mouse_info">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_show<label id="mouse_show"><p>
+
+<quote>
+<descrip>
+<tag/Function/Show the mouse pointer.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/void __fastcall__ mouse_show (void);/
+<tag/Description/The function shows the mouse pointer. It manages a counter
+that is shared between <tt/<ref id="mouse_hide" name="mouse_hide">/ and
+<tt/mouse_show/. The mouse cursor is visible if there was one more call to
+<tt/mouse_show/ than to <tt/<ref id="mouse_hide" name="mouse_hide">/.
+<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="mouse_hide" name="mouse_hide">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_uninstall<label id="mouse_uninstall"><p>
+
+<quote>
+<descrip>
+<tag/Function/Uninstall an already loaded mouse driver.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ mouse_install (void);/
+<tag/Description/The function uninstalls an already loaded mouse driver but
+don't removes it from memory.
+<tag/Limits/<itemize>
+<item>If the driver has been loaded using <tt/<ref id="mouse_load_driver"
+name="mouse_load_driver">/, <tt/<ref id="mouse_unload" name="mouse_unload">/
+should be used instead of <tt/mouse_uninstall/ so the driver is also removed
+from memory.
+<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="mouse_install" name="mouse_install">,
+<ref id="mouse_load_driver" name="mouse_load_driver">,
+<ref id="mouse_unload" name="mouse_unload">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_unload<label id="mouse_unload"><p>
+
+<quote>
+<descrip>
+<tag/Function/Unload a mouse driver.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ mouse_unload (void);/
+<tag/Description/The function unloads a loaded mouse 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="mouse_install" name="mouse_install">,
+<ref id="mouse_load_driver" name="mouse_load_driver">,
+<ref id="mouse_uninstall" name="mouse_uninstall">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>offsetof<label id="offsetof"><p>
 
 <quote>
@@ -2738,7 +3611,7 @@ associated with it. On error, -1 is returned and an error code is stored in
 open, which is used as the permission mask when a new file is created. While
 cc65 allows to pass this argument, it is ignored.
 </itemize>
-<tag/Availability/POSIX
+<tag/Availability/POSIX 1003.1
 <tag/See also/
 <ref id="close" name="close">,
 <ref id="creat" name="creat">
@@ -2747,6 +3620,65 @@ cc65 allows to pass this argument, it is ignored.
 </quote>
 
 
+<sect1>peekbsys<label id="peekbsys"><p>
+
+<quote>
+<descrip>
+<tag/Function/Read one byte from a location in the system bank.
+<tag/Header/<tt/<ref id="cbm610.h" name="cbm610.h">/,
+<tt/<ref id="cbm510.h" name="cbm510.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ peekbsys (unsigned addr);/
+<tag/Description/<tt/peekbsys/ reads one byte from the given address in the
+system bank (bank 15) of the CBM PET-II machines and returns it.
+<tag/Limits/
+<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+<item>This function may be a macro depending on the compiler options. The
+actual function is accessible by #undef'ing the macro.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="PEEK" name="PEEK">,
+<ref id="PEEKW" name="PEEKW">,
+<ref id="peekwsys" name="peekwsys">,
+<ref id="pokebsys" name="pokebsys">,
+<ref id="pokewsys" name="pokewsys">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>peekwsys<label id="peekwsys"><p>
+
+<quote>
+<descrip>
+<tag/Function/Read one word from a location in the system bank.
+<tag/Header/<tt/<ref id="cbm610.h" name="cbm610.h">/,
+<tt/<ref id="cbm510.h" name="cbm510.h">/
+<tag/Declaration/<tt/unsigned __fastcall__ peekwsys (unsigned addr);/
+<tag/Description/<tt/peekwsys/ reads one word from the given address in the
+system bank (bank 15) of the CBM PET-II machines and returns it. Following
+the usual 6502 conventions, the low byte is read from <tt/addr/, and the
+high byte is read from <tt/addr+1/.
+<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 order in which the two bytes are read is undefined.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="PEEK" name="PEEK">,
+<ref id="PEEKW" name="PEEKW">,
+<ref id="peekbsys" name="peekbsys">,
+<ref id="pokebsys" name="pokebsys">,
+<ref id="pokewsys" name="pokewsys">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>perror<label id="perror"><p>
 
 <quote>
@@ -2767,7 +3699,64 @@ be used in presence of a prototype.
 <tag/Availability/ISO 9899
 <tag/See also/
 <ref id="_poserror" name="_poserror">,
-<ref id="strerror" name="strerror">,
+<ref id="strerror" name="strerror">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>pokebsys<label id="pokebsys"><p>
+
+<quote>
+<descrip>
+<tag/Function/Write one byte to a location in the system bank.
+<tag/Header/<tt/<ref id="cbm610.h" name="cbm610.h">/,
+<tt/<ref id="cbm510.h" name="cbm510.h">/
+<tag/Declaration/<tt/void __fastcall__ pokebsys (unsigned addr, unsigned char val);/
+<tag/Description/<tt/pokebsys/ writes one byte to the given address in the
+system bank (bank 15) of the CBM PET-II machines.
+<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="POKE" name="POKE">,
+<ref id="POKEW" name="POKEW">,
+<ref id="peekbsys" name="peekbsys">,
+<ref id="peekwsys" name="peekwsys">,
+<ref id="pokewsys" name="pokewsys">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>pokewsys<label id="pokewsys"><p>
+
+<quote>
+<descrip>
+<tag/Function/Write one word to a location in the system bank.
+<tag/Header/<tt/<ref id="cbm610.h" name="cbm610.h">/,
+<tt/<ref id="cbm510.h" name="cbm510.h">/
+<tag/Declaration/<tt/void __fastcall__ pokewsys (unsigned addr, unsigned val);/
+<tag/Description/<tt/pokewsys/ writes one word to the given address in the
+system bank (bank 15) of the CBM PET-II machines. Following the usual 6502
+conventions, the low byte of <tt/val/ is written to <tt/addr/, and the
+high byte is written to <tt/addr+1/.
+<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 order in which the two bytes are written is undefined.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="POKE" name="POKE">,
+<ref id="POKEW" name="POKEW">,
+<ref id="peekbsys" name="peekbsys">,
+<ref id="peekwsys" name="peekwsys">,
+<ref id="pokebsys" name="pokebsys">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -3028,6 +4017,31 @@ the program terminates.
 </quote>
 
 
+<sect1>setjmp<label id="setjmp"><p>
+
+<quote>
+<descrip>
+<tag/Function/Save the context for use with <tt/longjmp/.
+<tag/Header/<tt/<ref id="setjmp.h" name="setjmp.h">/
+<tag/Declaration/<tt/int __fastcall__ setjmp (jmp_buf buf);/
+<tag/Description/The <tt/setjmp/ function saves the current context in <tt/buf/
+for subsequent use by the <tt/<ref id="longjmp" name="longjmp">/ function and
+returns zero.
+<tag/Limits/
+<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+<item><tt/setjmp/ is actually a macro as required by the ISO standard.
+<item><tt/setjmp/ will not save the signal context.
+</itemize>
+<tag/Availability/ISO 9899
+<tag/See also/
+<ref id="longjmp" name="longjmp">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>setlocale<label id="setlocale"><p>
 
 <quote>
@@ -3090,7 +4104,7 @@ seconds have elapsed.
 <item>The function is only available as fastcall function, so it may only
 be used in presence of a prototype.
 </itemize>
-<tag/Availability/POSIX
+<tag/Availability/POSIX 1003.1
 <tag/Example/None.
 </descrip>
 </quote>
@@ -3160,7 +4174,8 @@ be used in presence of a prototype.
 <tag/See also/
 <ref id="strcmp" name="strcmp">,
 <ref id="strcoll" name="strcoll">,
-<ref id="stricmp" name="stricmp">
+<ref id="stricmp" name="stricmp">,
+<ref id="strncmp" name="strncmp">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -3180,12 +4195,13 @@ 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
+<item>If copying takes place between objects that overlap, the behaviour
 is undefined.
 </itemize>
 <tag/Availability/ISO 9899
 <tag/See also/
-<ref id="strcpy" name="strcpy">
+<ref id="strcpy" name="strcpy">,
+<ref id="strncat" name="strncat">,
 <ref id="strncpy" name="strncpy">
 <tag/Example/None.
 </descrip>
@@ -3235,7 +4251,8 @@ be used in presence of a prototype.
 <tag/See also/
 <ref id="strcasecmp" name="strcasecmp">,
 <ref id="strcoll" name="strcoll">,
-<ref id="stricmp" name="stricmp">
+<ref id="stricmp" name="stricmp">,
+<ref id="strncmp" name="strncmp">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -3262,7 +4279,8 @@ be used in presence of a prototype.
 <ref id="setlocale" name="setlocale">,
 <ref id="strcasecmp" name="strcasecmp">,
 <ref id="strcmp" name="strcmp">,
-<ref id="stricmp" name="stricmp">
+<ref id="stricmp" name="stricmp">,
+<ref id="strncmp" name="strncmp">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -3281,12 +4299,13 @@ be used in presence of a prototype.
 <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
+<item>If copying takes place between objects that overlap, the behaviour
 is undefined.
 </itemize>
 <tag/Availability/ISO 9899
 <tag/See also/
 <ref id="strcat" name="strcat">,
+<ref id="strncat" name="strncat">,
 <ref id="strncpy" name="strncpy">
 <tag/Example/
 <verb>
@@ -3317,7 +4336,8 @@ be used in presence of a prototype.
 <tag/Availability/ISO 9899
 <tag/See also/
 <ref id="strspn" name="strspn">,
-<ref id="strstr" name="strstr">
+<ref id="strstr" name="strstr">,
+<ref id="strtok" name="strtok">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -3393,7 +4413,8 @@ be used in presence of a prototype.
 <tag/See also/
 <ref id="strcasecmp" name="strcasecmp">,
 <ref id="strcmp" name="strcmp">,
-<ref id="strcoll" name="strcoll">
+<ref id="strcoll" name="strcoll">,
+<ref id="strncmp" name="strncmp">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -3439,7 +4460,7 @@ be used in presence of a prototype.
 </itemize>
 <tag/Availability/cc65
 <tag/See also/
-<ref id="strupper" name="strupper">
+<ref id="strupper" name="strupper">,
 <ref id="tolower" name="tolower">
 <tag/Example/None.
 </descrip>
@@ -3453,6 +4474,60 @@ See <tt/strlower/.
 </quote>
 
 
+<sect1>strncat<label id="strncat"><p>
+
+<quote>
+<descrip>
+<tag/Function/Concatentate two strings.
+<tag/Header/<tt/<ref id="string.h" name="string.h">/
+<tag/Declaration/<tt/char* __fastcall__ strncat (char* s1, const char* s2, size_t n);/
+<tag/Description/The <tt/strncat/ function appends not more than n characters
+of the string pointed to by s2 to the end of the string pointed to by s1. The
+terminating null character at the end of s1 is overwritten. A terminating null
+character is appended to the result, even if not all of s2 is appended to 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 behaviour
+is undefined.
+</itemize>
+<tag/Availability/ISO 9899
+<tag/See also/
+<ref id="strcpy" name="strcpy">,
+<ref id="strncat" name="strncat">,
+<ref id="strncpy" name="strncpy">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>strncmp<label id="strncmp"><p>
+
+<quote>
+<descrip>
+<tag/Function/Compare two strings.
+<tag/Header/<tt/<ref id="string.h" name="string.h">/
+<tag/Declaration/<tt/int __fastcall__ strncmp (const char* s1, const char* s2, size_t count);/
+<tag/Description/The <tt/strncmp/ function compares not more than <tt/count/
+characters of the two strings passed as parameters. It returns a value that is
+less than zero if the first <tt/count/ characters of <tt/s1/ are less than
+<tt/s2/, zero if they are identical, and a value greater than zero they are
+greater.
+<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="strcasecmp" name="strcasecmp">,
+<ref id="strcmp" name="strcmp">,
+<ref id="strcoll" name="strcoll">,
+<ref id="stricmp" name="stricmp">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>strncpy<label id="strncpy"><p>
 
 <quote>
@@ -3469,13 +4544,14 @@ written. The function will always return <tt/s1/.
 <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
+<item>If copying takes place between objects that overlap, the behaviour is
 undefined.
 </itemize>
 <tag/Availability/ISO 9899
 <tag/See also/
-<ref id="strcat" name="strcat">
-<ref id="strcpy" name="strcpy">
+<ref id="strcat" name="strcat">,
+<ref id="strcpy" name="strcpy">,
+<ref id="strncat" name="strncat">
 <tag/Example/
 <verb>
 #include <string.h>
@@ -3558,6 +4634,33 @@ be used in presence of a prototype.
 </quote>
 
 
+<sect1>strtok<label id="strtok"><p>
+
+<quote>
+<descrip>
+<tag/Function/Break a string into tokens.
+<tag/Header/<tt/<ref id="string.h" name="string.h">/
+<tag/Declaration/<tt/char* __fastcall__ strtok (char* s1, const char* s2);/
+<tag/Description/<tt/strtok/ will break the string s1 into a sequence of
+tokens, which are delimited by characters from the string s2. The first call
+to <tt/strtok/ will return a pointer to the first token in the string s1.
+Following calls must pass a <tt/NULL/ pointer as s1 in order to get the next
+token in the string. Different sets of delimiters may be used for the
+subsequent calls to <tt/strtok/.
+<tag/Limits/<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+<item><tt/strtok/ will modify the string s1.
+</itemize>
+<tag/Availability/ISO 9899
+<tag/See also/
+<ref id="strcspn" name="strcspn">,
+<!-- <ref id="strpbrk" name="strpbrk"> -->
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>strupper<label id="strupper"><p>
 
 <quote>
@@ -3614,6 +4717,29 @@ be used in presence of a prototype.
 </quote>
 
 
+<sect1>time<label id="time"><p>
+
+<quote>
+<descrip>
+<tag/Function/Get the time.
+<tag/Header/<tt/<ref id="time.h" name="time.h">/
+<tag/Declaration/<tt/time_t __fastcall__ time (time_t* t);/
+<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/.
+<tag/Limits/<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
+returned value may not be valid.
+</itemize>
+<tag/Availability/ISO 9899
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>toggle_videomode<label id="toggle_videomode"><p>
 
 <quote>
@@ -3728,8 +4854,11 @@ name="remove">/ instead, which is a native ANSI C function and does the same.
 availability of file I/O).
 <item>The function is only available as fastcall function, so it may only
 be used in presence of a prototype.
+<item>Instead of <tt/unlink/, <tt/<ref id="remove" name="remove">/ should be
+used, which has the same semantics, but is more portable, because it conforms
+to the ISO C standard.
 </itemize>
-<tag/Availability/POSIX
+<tag/Availability/POSIX 1003.1
 <tag/See also/
 <ref id="remove" name="remove">
 <tag/Example/