]> git.sur5r.net Git - cc65/blobdiff - doc/funcref.sgml
small doc update
[cc65] / doc / funcref.sgml
index 67b6ef633fe3e163745c533075a970ea118d4223..adfeaf4b21bad4568bd004ee76737353821f2415 100644 (file)
@@ -1,9 +1,9 @@
-<!doctype linuxdoc system>
+<!doctype linuxdoc system>      <!-- -*- text-mode -*- -->
 
 <article>
 <title>cc65 function reference
-<author>Ullrich von Bassewitz, <htmlurl url="mailto:uz@cc65.org" name="uz@cc65.org">
-<date>07.11.2002
+<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">
+<date>2014-04-10
 
 <abstract>
 cc65 is a C compiler for 6502 based systems. This function reference describes
@@ -23,7 +23,7 @@ just some of the supported machines. This function refrence describes the
 available functions together with any limitations.
 
 For an overview about the available libraries, their purpose, and any
-differences to the ISO standard, please have a look at the <htmlurl
+differences to the ISO standard, please have a look at the <url
 url="library.html" name="cc65 Library Overview">.
 
 <bf/Note:/ Standard C functions are listed here, but not described in detail.
@@ -58,7 +58,9 @@ function.
 <item><ref id="_sys" name="_sys">
 <item><ref id="getcpu" name="getcpu">
 <item><ref id="reset_brk" name="reset_brk">
+<item><ref id="reset_irq" name="reset_irq">
 <item><ref id="set_brk" name="set_brk">
+<item><ref id="set_irq" name="set_irq">
 </itemize>
 
 
@@ -93,7 +95,16 @@ function.
 <sect1><tt/atari.h/<label id="atari.h"><p>
 
 <itemize>
+<!-- <item><ref id="_getcolor" name="_getcolor"> -->
+<!-- <item><ref id="_getdefdev" name="_getdefdev"> -->
+<!-- <item><ref id="_graphics" name="_graphics"> -->
+<!-- <item><ref id="_rest_vecs" name="_rest_vecs"> -->
+<!-- <item><ref id="_save_vecs" name="_save_vecs"> -->
+<!-- <item><ref id="_scroll" name="_scroll"> -->
+<!-- <item><ref id="_setcolor" name="_setcolor"> -->
+<!-- <item><ref id="_setcolor_low" name="_setcolor_low"> -->
 <item><ref id="get_ostype" name="get_ostype">
+<!-- <item><ref id="get_tv" name="get_tv"> -->
 </itemize>
 
 (incomplete)
@@ -101,7 +112,10 @@ function.
 
 <sect1><tt/atmos.h/<label id="atmos.h"><p>
 
-(incomplete)
+<itemize>
+<item><ref id="atmos_load" name="atmos_load">
+<item><ref id="atmos_save" name="atmos_save">
+</itemize>
 
 
 <sect1><tt/c128.h/<label id="c128.h"><p>
@@ -127,6 +141,40 @@ function.
 </itemize>
 
 
+<sect1><tt/cbm.h/<label id="cbm.h"><p>
+
+<itemize>
+<item><ref id="cbm_k_acptr" name="cbm_k_acptr">
+<item><ref id="cbm_k_basin" name="cbm_k_basin">
+<item><ref id="cbm_k_bsout" name="cbm_k_bsout">
+<item><ref id="cbm_k_chkin" name="cbm_k_chkin">
+<item><ref id="cbm_k_ciout" name="cbm_k_ciout">
+<item><ref id="cbm_k_ckout" name="cbm_k_ckout">
+<item><ref id="cbm_k_clall" name="cbm_k_clall">
+<item><ref id="cbm_k_close" name="cbm_k_close">
+<item><ref id="cbm_k_clrch" name="cbm_k_clrch">
+<item><ref id="cbm_k_getin" name="cbm_k_getin">
+<item><ref id="cbm_k_iobase" name="cbm_k_iobase">
+<item><ref id="cbm_k_listen" name="cbm_k_listen">
+<item><ref id="cbm_k_load" name="cbm_k_load">
+<item><ref id="cbm_k_open" name="cbm_k_open">
+<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_setlfs" name="cbm_k_setlfs">
+<item><ref id="cbm_k_setnam" name="cbm_k_setnam">
+<item><ref id="cbm_k_unlsn" name="cbm_k_unlsn">
+<!-- <item><ref id="cbm_load" name="cbm_load"> -->
+<!-- <item><ref id="cbm_open" name="cbm_open"> -->
+<!-- <item><ref id="cbm_opendir" name="cbm_opendir"> -->
+<!-- <item><ref id="cbm_read" name="cbm_read"> -->
+<!-- <item><ref id="cbm_readdir" name="cbm_readdir"> -->
+<!-- <item><ref id="cbm_save" name="cbm_save"> -->
+<!-- <item><ref id="cbm_write" name="cbm_write"> -->
+</itemize>
+
+(incomplete)
+
+
 <sect1><tt/cbm510.h/<label id="cbm510.h"><p>
 
 <itemize>
@@ -147,6 +195,23 @@ function.
 </itemize>
 
 
+<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"> -->
+<!-- </itemize> -->
+
+(incomplete)
+
+
 <sect1><tt/conio.h/<label id="conio.h"><p>
 
 <itemize>
@@ -202,11 +267,33 @@ function.
 
 <sect1><tt/dbg.h/<label id="dbg.h"><p>
 
+<!-- <itemize> -->
+<!-- <item><ref id="DbgInit" name="DbgInit"> -->
+<!-- </itemize> -->
+
 (incomplete)
 
 
 <sect1><tt/dio.h/<label id="dio.h"><p>
 
+<url url="dio.html" name="Low-level disk I/O API">.
+
+
+<sect1><tt/dirent.h/<label id="dirent.h"><p>
+
+<itemize>
+<item><ref id="_DE_ISDIR" name="_DE_ISDIR">
+<item><ref id="_DE_ISLBL" name="_DE_ISLBL">
+<item><ref id="_DE_ISLNK" name="_DE_ISLNK">
+<item><ref id="_DE_ISREG" name="_DE_ISREG">
+<item><ref id="closedir" name="closedir">
+<item><ref id="opendir" name="opendir">
+<item><ref id="readdir" name="readdir">
+<item><ref id="rewinddir" name="rewinddir">
+<item><ref id="seekdir" name="seekdir">
+<item><ref id="telldir" name="telldir">
+</itemize>
+
 (incomplete)
 
 
@@ -228,6 +315,13 @@ function.
 
 <sect1><tt/errno.h/<label id="errno.h"><p>
 
+<!-- <itemize> -->
+<!-- <item><ref id="_directerrno" name="_directerrno"> -->
+<!-- <item><ref id="_mappederrno" name="_mappederrno"> -->
+<!-- <item><ref id="_osmaperrno" name="_osmaperrno"> -->
+<!-- <item><ref id="_seterrno" name="_seterrno"> -->
+<!-- </itemize> -->
+
 (incomplete)
 
 
@@ -265,6 +359,21 @@ function.
 </itemize>
 
 
+<sect1><tt/lynx.h/<label id="lynx.h"><p>
+
+<!-- <itemize> -->
+<!-- <item><ref id="lynx_eeprom_erase" name="lynx_eeprom_erase"> -->
+<!-- <item><ref id="lynx_eeprom_read" name="lynx_eeprom_read"> -->
+<!-- <item><ref id="lynx_eeprom_write" name="lynx_eeprom_write"> -->
+<!-- <item><ref id="lynx_eeread" name="lynx_eeread"> -->
+<!-- <item><ref id="lynx_eewrite" name="lynx_eewrite"> -->
+<!-- <item><ref id="lynx_exec" name="lynx_exec"> -->
+<!-- <item><ref id="lynx_load" name="lynx_load"> -->
+<!-- </itemize> -->
+
+(incomplete)
+
+
 <sect1><tt/modload.h/<label id="modload.h"><p>
 
 <itemize>
@@ -276,34 +385,38 @@ function.
 <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_setbox" name="mouse_setbox">
-<item><ref id="mouse_getbox" name="mouse_getbox">
-<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_getbox" name="mouse_getbox">
+<item><ref id="mouse_geterrormsg" name="mouse_geterrormsg">
+<item><ref id="mouse_hide" name="mouse_hide">
 <item><ref id="mouse_info" name="mouse_info">
+<item><ref id="mouse_install" name="mouse_install">
 <item><ref id="mouse_ioctl" name="mouse_ioctl">
+<item><ref id="mouse_load_driver" name="mouse_load_driver">
+<item><ref id="mouse_move" name="mouse_move">
+<item><ref id="mouse_pos" name="mouse_pos">
+<item><ref id="mouse_setbox" name="mouse_setbox">
+<item><ref id="mouse_show" name="mouse_show">
+<item><ref id="mouse_uninstall" name="mouse_uninstall">
+<item><ref id="mouse_unload" name="mouse_unload">
 </itemize>
 
-(incomplete)
-
 
 <sect1><tt/nes.h/<label id="nes.h"><p>
 
+<!-- <itemize> -->
+<!-- <item><ref id="get_tv" name="get_tv"> -->
+<!-- <item><ref id="waitvblank" name="waitvblank"> -->
+<!-- </itemize> -->
+
 (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">.
+may be used when dealing with files in <url
+url="http://www.6502.org/users/andre/o65/fileformat.html" name="the o65 format">.
 It does not declare any functions.
 
 
@@ -329,22 +442,21 @@ 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.
+
 <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_install" name="ser_install">
+<item><ref id="ser_ioctl" name="ser_ioctl">
+<item><ref id="ser_load_driver" name="ser_load_driver">
+<item><ref id="ser_open" name="ser_open">
 <item><ref id="ser_put" name="ser_put">
 <item><ref id="ser_status" name="ser_status">
-<item><ref id="ser_ioctl" name="ser_ioctl">
+<item><ref id="ser_uninstall" name="ser_uninstall">
+<item><ref id="ser_unload" name="ser_unload">
 </itemize>
--->
-
-(incomplete)
 
 
 <sect1><tt/setjmp.h/<label id="setjmp.h"><p>
@@ -383,6 +495,7 @@ It does not declare any functions.
 <sect1><tt/stdio.h/<label id="stdio.h"><p>
 
 <itemize>
+<item><ref id="_poserror" name="_poserror">
 <item><ref id="clearerr" name="clearerr">
 <!-- <item><ref id="fclose" name="fclose"> -->
 <!-- <item><ref id="fdopen" name="fdopen"> -->
@@ -437,7 +550,6 @@ It does not declare any functions.
 <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">
@@ -456,14 +568,19 @@ It does not declare any functions.
 <item><ref id="ltoa" name="ltoa">
 <item><ref id="malloc" name="malloc">
 <item><ref id="perror" name="perror">
+<!-- <item><ref id="posix_memalign" name="posix_memalign"> -->
+<!-- <item><ref id="putenv" name="putenv"> -->
 <item><ref id="qsort" name="qsort">
 <item><ref id="rand" name="rand">
 <item><ref id="realloc" name="realloc">
 <item><ref id="srand" name="srand">
+<!-- <item><ref id="system" name="system"> -->
 <item><ref id="ultoa" name="ultoa">
 <item><ref id="utoa" name="utoa">
 </itemize>
 
+(incomplete)
+
 
 <sect1><tt/string.h/<label id="string.h"><p>
 
@@ -471,6 +588,7 @@ It does not declare any functions.
 <item><ref id="_stroserror" name="_stroserror">
 <item><ref id="bzero" name="bzero">
 <item><ref id="memchr" name="memchr">
+<item><ref id="memcmp" name="memcmp">
 <item><ref id="memcpy" name="memcpy">
 <item><ref id="memmove" name="memmove">
 <item><ref id="memset" name="memset">
@@ -505,14 +623,17 @@ It does not declare any functions.
 <sect1><tt/tgi.h/<label id="tgi.h"><p>
 
 <itemize>
+<item><ref id="tgi_arc" name="tgi_arc">
 <item><ref id="tgi_bar" name="tgi_bar">
 <item><ref id="tgi_circle" name="tgi_circle">
 <item><ref id="tgi_clear" name="tgi_clear">
+<item><ref id="tgi_done" name="tgi_done">
+<item><ref id="tgi_ellipse" name="tgi_ellipse">
+<item><ref id="tgi_free_vectorfont" name="tgi_free_vectorfont">
+<item><ref id="tgi_getaspectratio" name="tgi_getaspectratio">
 <item><ref id="tgi_getcolor" name="tgi_getcolor">
 <item><ref id="tgi_getcolorcount" name="tgi_getcolorcount">
 <item><ref id="tgi_getdefpalette" name="tgi_getdefpalette">
-<item><ref id="tgi_done" name="tgi_done">
-<item><ref id="tgi_ellipse" name="tgi_ellipse">
 <item><ref id="tgi_geterror" name="tgi_geterror">
 <item><ref id="tgi_geterrormsg" name="tgi_geterrormsg">
 <item><ref id="tgi_getmaxcolor" name="tgi_getmaxcolor">
@@ -521,26 +642,29 @@ It does not declare any functions.
 <item><ref id="tgi_getpagecount" name="tgi_getpagecount">
 <item><ref id="tgi_getpalette" name="tgi_getpalette">
 <item><ref id="tgi_getpixel" name="tgi_getpixel">
+<item><ref id="tgi_gettextheight" name="tgi_gettextheight">
+<item><ref id="tgi_gettextwidth" name="tgi_gettextwidth">
 <item><ref id="tgi_getxres" name="tgi_getxres">
 <item><ref id="tgi_getyres" name="tgi_getyres">
 <item><ref id="tgi_gotoxy" name="tgi_gotoxy">
 <item><ref id="tgi_init" name="tgi_init">
 <item><ref id="tgi_install" name="tgi_install">
+<item><ref id="tgi_install_vectorfont" name="tgi_install_vectorfont">
 <item><ref id="tgi_ioctl" name="tgi_ioctl">
 <item><ref id="tgi_line" name="tgi_line">
 <item><ref id="tgi_lineto" name="tgi_lineto">
-<item><ref id="tgi_load" name="tgi_load">
 <item><ref id="tgi_load_driver" name="tgi_load_driver">
+<item><ref id="tgi_load_vectorfont" name="tgi_load_vectorfont">
 <item><ref id="tgi_outtext" name="tgi_outtext">
 <item><ref id="tgi_outtextxy" name="tgi_outtextxy">
+<item><ref id="tgi_setaspectratio" name="tgi_setaspectratio">
 <item><ref id="tgi_setcolor" name="tgi_setcolor">
 <item><ref id="tgi_setdrawpage" name="tgi_setdrawpage">
 <item><ref id="tgi_setpalette" name="tgi_setpalette">
 <item><ref id="tgi_setpixel" name="tgi_setpixel">
 <item><ref id="tgi_setviewpage" name="tgi_setviewpage">
-<item><ref id="tgi_textheight" name="tgi_textheight">
-<item><ref id="tgi_textstyle" name="tgi_textstyle">
-<item><ref id="tgi_textwidth" name="tgi_textwidth">
+<item><ref id="tgi_settextscale" name="tgi_settextscale">
+<item><ref id="tgi_settextstyle" name="tgi_settextstyle">
 <item><ref id="tgi_uninstall" name="tgi_uninstall">
 <item><ref id="tgi_unload" name="tgi_unload">
 </itemize>
@@ -550,7 +674,7 @@ It does not declare any functions.
 <itemize>
 <!-- <item><ref id="_systime" name="_systime"> -->
 <!-- <item><ref id="asctime" name="asctime"> -->
-<!-- <item><ref id="clock" name="clock"> -->
+<item><ref id="clock" name="clock">
 <!-- <item><ref id="ctime" name="ctime"> -->
 <!-- <item><ref id="gmtime" name="gmtime"> -->
 <!-- <item><ref id="localtime" name="localtime"> -->
@@ -566,7 +690,9 @@ It does not declare any functions.
 
 <itemize>
 <!-- <item><ref id="chdir" name="chdir"> -->
+<item><ref id="exec" name="exec">
 <!-- <item><ref id="getcwd" name="getcwd"> -->
+<item><ref id="getopt" name="getopt">
 <!-- <item><ref id="lseek" name="lseek"> -->
 <!-- <item><ref id="mkdir" name="mkdir"> -->
 <!-- <item><ref id="read" name="read"> -->
@@ -586,11 +712,117 @@ It does not declare any functions.
 
 <sect1><tt/zlib.h/<label id="zlib.h"><p>
 
+<!-- <itemize> -->
+<!-- <item><ref id="adler32" name="adler32"> -->
+<!-- <item><ref id="crc32" name="crc32"> -->
+<!-- <item><ref id="inflatemem" name="inflatemem"> -->
+<!-- <item><ref id="uncompress" name="uncompress"> -->
+<!-- </itemize> -->
+
 (incomplete)
 
 
 <sect>Alphabetical function reference<p>
 
+<sect1>_DE_ISDIR<label id="_DE_ISDIR"><p>
+
+<quote>
+<descrip>
+<tag/Function/Determine if a directory entry specifies a directory.
+<tag/Header/<tt/<ref id="dirent.h" name="dirent.h">/
+<tag/Declaration/<tt/int _DE_ISDIR(unsigned char type);/
+<tag/Description/The function is called with the type of a directory entry
+taken from a <tt/struct dirent/ and returns true if the entry designates
+a directory.
+<tag/Limits/
+<itemize>
+<item>The function is actually a macro.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="_DE_ISLBL" name="_DE_ISLBL">,
+<ref id="_DE_ISLNK" name="_DE_ISLNK">,
+<ref id="_DE_ISREG" name="_DE_ISREG">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>_DE_ISLBL<label id="_DE_ISLBL"><p>
+
+<quote>
+<descrip>
+<tag/Function/Determine if a directory entry specifies a disk label.
+<tag/Header/<tt/<ref id="dirent.h" name="dirent.h">/
+<tag/Declaration/<tt/int _DE_ISLBL(unsigned char type);/
+<tag/Description/The function is called with the type of a directory entry
+taken from a <tt/struct dirent/ and returns true if the entry designates
+a disk label.
+<tag/Limits/
+<itemize>
+<item>The function is actually a macro.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="_DE_ISDIR" name="_DE_ISDIR">,
+<ref id="_DE_ISLNK" name="_DE_ISLNK">,
+<ref id="_DE_ISREG" name="_DE_ISREG">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>_DE_ISLNK<label id="_DE_ISLNK"><p>
+
+<quote>
+<descrip>
+<tag/Function/Determine if a directory entry specifies a link.
+<tag/Header/<tt/<ref id="dirent.h" name="dirent.h">/
+<tag/Declaration/<tt/int _DE_ISLNK(unsigned char type);/
+<tag/Description/The function is called with the type of a directory entry
+taken from a <tt/struct dirent/ and returns true if the entry designates
+a link.
+<tag/Limits/
+<itemize>
+<item>The function is actually a macro.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="_DE_ISDIR" name="_DE_ISDIR">,
+<ref id="_DE_ISLBL" name="_DE_ISLBL">,
+<ref id="_DE_ISREG" name="_DE_ISREG">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>_DE_ISREG<label id="_DE_ISREG"><p>
+
+<quote>
+<descrip>
+<tag/Function/Determine if a directory entry specifies a regular file.
+<tag/Header/<tt/<ref id="dirent.h" name="dirent.h">/
+<tag/Declaration/<tt/int _DE_ISREG(unsigned char type);/
+<tag/Description/The function is called with the type of a directory entry
+taken from a <tt/struct dirent/ and returns true if the entry designates
+a regular file.
+<tag/Limits/
+<itemize>
+<item>The function is actually a macro.
+<item>A "regular file" means anything with data in it. This might still mean
+that special processing is needed, when accessing the file. Relative files of
+the CBM systems are classified as being "regular" files, for example.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="_DE_ISDIR" name="_DE_ISDIR">,
+<ref id="_DE_ISLBL" name="_DE_ISLBL">,
+<ref id="_DE_ISLNK" name="_DE_ISLNK">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>_heapadd<label id="_heapadd"><p>
 
 <quote>
@@ -653,7 +885,7 @@ allocation functions, or that has been free'd will give unpredicable results.
 <descrip>
 <tag/Function/Return the largest block that is available on the heap.
 <tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
-<tag/Declaration/<tt/size_t __fastcall__ _heapmaxavail (void);/
+<tag/Declaration/<tt/size_t _heapmaxavail (void);/
 <tag/Description/The function returns the size of the largest block that may
 be allocated from the heap using <tt/<ref id="malloc" name="malloc">/.
 <tag/Availability/cc65
@@ -704,20 +936,20 @@ id="malloc" name="malloc"> may still return <tt/NULL/.
 
 <quote>
 <descrip>
-<tag/Function/Print an error message for the error in <tt/_oserrno/.
+<tag/Function/Print an error message for the error in <tt/_oserror/.
 <tag/Header/<tt/<ref id="stdio.h" name="stdio.h">/
 <tag/Declaration/<tt/void __fastcall__ _poserror (const char* msg);/
 <tag/Description/<tt/_poserror/ prints an error message to <tt/stderr/. If
 <tt/msg/ is not <tt/NULL/ and not an empty string, it is printed followed by
 a colon and a blank. Then the error message for the current contents of
-<tt/_oserrno/ are printed followed by a newline. The message output is the
+<tt/_oserror/ are printed followed by a newline. The message output is the
 same as returned by <tt/<ref id="_stroserror" name="_stroserror">/ with an
-argument of <tt/_oserrno/.
+argument of <tt/_oserror/.
 <tag/Limits/
 <itemize>
 <item>Since operating system specific error code are - you guessed it -
 operating system specific, the value in <tt/_oserror/ and the message that is
-printed depend on the cc65 target.
+printed depends on the cc65 target.
 <item>The function is only available as fastcall function, so it may only
 be used in presence of a prototype.
 </itemize>
@@ -1081,6 +1313,40 @@ used in presence of a prototype.
 </quote>
 
 
+<sect1>atmos_load<label id="atmos_load"><p>
+
+<quote>
+<descrip>
+<tag/Function/Load Atmos tape.
+<tag/Header/<tt/<ref id="atmos.h" name="atmos.h">/
+<tag/Declaration/<tt/void __fastcall__ atmos_load(const char* name);/
+<tag/Description/<tt/atmos_load/ reads a memory block from tape.
+<tag/Availability/cc65
+<tag/See also/
+<ref id="atmos_save" name="atmos_save">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>atmos_save<label id="atmos_save"><p>
+
+<quote>
+<descrip>
+<tag/Function/Save Atmos tape.
+<tag/Header/<tt/<ref id="atmos.h" name="atmos.h">/
+<tag/Declaration/<tt/void __fastcall__ atmos_save(const char* name, const void* start, const void* end);/
+<tag/Description/<tt/atmos_save/ writes a memory block to tape.
+<tag/Availability/cc65
+<tag/See also/
+<ref id="atmos_load" name="atmos_load">
+<tag/Example/<verb>
+atmos_save("hires", 0xa000, 0xc000);
+</verb>
+</descrip>
+</quote>
+
+
 <sect1>atoi<label id="atoi"><p>
 
 <quote>
@@ -1294,6 +1560,497 @@ be used in presence of a prototype.
 </quote>
 
 
+<sect1>cbm_k_acptr<label id="cbm_k_acptr"><p>
+
+<quote>
+<descrip>
+<tag/Function/Input byte from serial bus
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/unsigned char cbm_k_acptr (void);/
+<tag/Description/The function returns a byte of data, which it
+gets from the current TALKer on the serial bus.
+In order to receive the data, the device must have previously been
+sent a command to TALK and a secondary address if it needs one.
+<tag/Limits/<itemize>
+<item>
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="cbm_k_talk" name="cbm_k_talk">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_basin<label id="cbm_k_basin"><p>
+
+<quote>
+<descrip>
+<tag/Function/Input a Character from the Current Device
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/unsigned char cbm_k_basin (void);/
+<tag/Description/The function returns a character from the current input device.
+Device must first have been OPENed and then designated as the input channel by the CHKIN routine.
+When this function is called, the next byte of data available from the device is returned.
+Exception is the routine for the keyboard device (which is the default input device).
+<tag/Limits/<itemize>
+<item>
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="cbm_k_open" name="cbm_k_open">,
+<ref id="cbm_k_chkin" name="cbm_k_chkin">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_bsout<label id="cbm_k_bsout"><p>
+
+<quote>
+<descrip>
+<tag/Function/Output a byte
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/void __fastcall__ cbm_k_bsout (unsigned char C);/
+<tag/Description/Function sends the character to the current output device.
+Unless a device has been OPENed and designated as the
+current output channel using the CHKOUT routine, the character is
+printed to the screen, which is the default output device.  If the
+cassette is the current device, outputting a byte will only add it to
+the buffer. No actual transmission of data will occur until the
+192-byte buffer is full.
+<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="cbm_k_open" name="cbm_k_open">,
+<ref id="cbm_k_chkin" name="cbm_k_chkout">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_chkin<label id="cbm_k_chkin"><p>
+
+<quote>
+<descrip>
+<tag/Function/Designate a Logical File As the Current Input Channel
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ cbm_k_chkin (unsigned char FN);/
+<tag/Description/If you wish to
+get data from any device other than the keyboard, this function must be
+called after OPENing the device, before you can get a data byte with
+the cbm_k_basin or cbm_k_getin routine.  When called, the routine will designate
+the logical file whose file number was supplied as the
+current file, its device as the current device, and its secondary
+address as the current secondary address.  If the device on the
+channel is a serial device, which requires a TALK command and
+sometimes a secondary address, function will send them over the
+serial bus.
+<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="cbm_k_open" name="cbm_k_open">,
+<ref id="cbm_k_basin" name="cbm_k_basin">,
+<ref id="cbm_k_getin" name="cbm_k_getin">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_ciout<label id="cbm_k_ciout"><p>
+
+<quote>
+<descrip>
+<tag/Function/Transmit a byte over the serial bus
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/void __fastcall__ cbm_k_ciout (unsigned char C);/
+<tag/Description/Purpose of this function is to send a byte of data over
+the serial bus.  In order for the data to be received, the serial
+device must have first been commanded to LISTEN and been given a
+secondary address if necessary.  This routine always buffers the
+current character, and defers sending it until the next byte is
+buffered.  When the UNLISTEN command is sent, the last byte will be
+sent with an End or Identify (EOI).
+<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="cbm_k_listen" name="cbm_k_listen">,
+<ref id="cbm_k_unlsn" name="cbm_k_unlsn">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_ckout<label id="cbm_k_ckout"><p>
+
+<quote>
+<descrip>
+<tag/Function/Designate a Logical File As the Current Output Channel
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ cbm_k_ckout (unsigned char FN);/
+<tag/Description/If you wish to
+output data to any device other than the screen, this routine must be
+called after OPENing the device, and before you output a data byte
+with the cbm_k_bsout() function.  When called, the function will designate the
+logical file whose file number was supplied as the current
+file, its device as the current device, and its secondary address as
+the current secondary address.  If the device on the channel uses the
+serial bus, and therefore requires a LISTEN command and possibly a
+secondary address, this information will be sent on the bus.
+<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="cbm_k_bsout" name="cbm_k_bsout">,
+<ref id="cbm_k_listen" name="cbm_k_listen">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_clall<label id="cbm_k_clall"><p>
+
+<quote>
+<descrip>
+<tag/Function/Close All Logical I/O Files
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/void cbm_k_clall (void);/
+<tag/Description/It closes all
+open files, by resetting the index into open files to
+zero and restores the default I/O devices.
+<tag/Limits/<itemize>
+<item>
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="cbm_k_open" name="cbm_k_open">,
+<ref id="cbm_k_close" name="cbm_k_close">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_close<label id="cbm_k_close"><p>
+
+<quote>
+<descrip>
+<tag/Function/Close a Logical I/O File
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/void __fastcall__ cbm_k_close (unsigned char FN);/
+<tag/Description/It is used to
+close a logical file after all I/O operations involving that file have
+been completed.
+<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="cbm_k_open" name="cbm_k_open">,
+<ref id="cbm_k_clall" name="cbm_k_clall">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_clrch<label id="cbm_k_clrch"><p>
+
+<quote>
+<descrip>
+<tag/Function/Restore Current Input and Output Devices to the Default Devices
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/void cbm_k_clrch (void);/
+<tag/Description/It sets the
+current input device to the keyboard, and the current output device to
+the screen.  Also, if the current input device was formerly a serial
+device, the routine sends it an UNTALK command on the serial bus, and
+if a serial device was formerly the current output device, the routine
+sends it an UNLISTEN command.
+<tag/Limits/<itemize>
+<item>
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="cbm_k_chkin" name="cbm_k_chkin">,
+<ref id="cbm_k_ckout" name="cbm_k_ckout">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_getin<label id="cbm_k_getin"><p>
+
+<quote>
+<descrip>
+<tag/Function/Get One Byte from the Input Device
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/unsigned char cbm_k_getin (void);/
+<tag/Description/Function gets a character from the current input device.
+<tag/Limits/<itemize>
+<item>
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="cbm_k_basin" name="cbm_k_basin">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_iobase<label id="cbm_k_iobase"><p>
+
+<quote>
+<descrip>
+<tag/Function/Return Base Address of Memory-Mapped I/O Devices
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/unsigned cbm_k_iobase (void);/
+<tag/Description/This function returns the address of
+the memory section where the memory mapped I/O devices are located. This
+address can then be used with an offset to access the memory mapped I/O
+devices in the Commodore 64. The offset is the number of locations from
+the beginning of the page on which the I/O register you want is located.
+This function exists to provide compatibility between the Commodore 64,
+VIC-20, and future models of the Commodore 64. If the I/O locations for
+a program are set by a call to this function, they should
+still remain compatible with future versions of the Commodore 64, the
+KERNAL and BASIC.
+<tag/Limits/<itemize>
+<item>
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_listen<label id="cbm_k_listen"><p>
+
+<quote>
+<descrip>
+<tag/Function/Command a device on the serial bus to LISTEN
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/void __fastcall__ cbm_k_listen (unsigned char dev);/
+<tag/Description/This function will command a device on the serial bus to
+receive data. The KERNAL routine will OR the supplied device number bit by bit
+to convert it to a listen address, then transmits this data as a command on
+the serial bus. The specified device will then go into listen mode, and
+be ready to accept information.
+<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="cbm_k_unlsn" name="cbm_k_unlsn">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_load<label id="cbm_k_load"><p>
+
+<quote>
+<descrip>
+<tag/Function/Load RAM from a Device
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/unsigned int __fastcall__ cbm_k_load(unsigned char flag, unsigned addr);/
+<tag/Description/This function LOADs data bytes from any input device directly into the memory.
+It can also be used for a verify operation, comparing data from a device with the data already in
+memory, while leaving the data stored in RAM unchanged.
+The flag must be set to 0 for a LOAD operation, or 1 for a
+verify, If the input device is OPENed with a secondary address (SA) of 0
+the header information from the device is ignored. In this case, the starting address for the load must be supplied.
+If the device is addressed with a secondary address of 1, then the data is
+loaded into memory starting at the location specified by the header.
+Function returns the address of the highest RAM location loaded.
+Before this function can be called, the KERNAL SETLFS, and SETNAM
+routines must be called.
+<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="cbm_k_save" name="cbm_k_save">,
+<ref id="cbm_k_setlfs" name="cbm_k_setlfs">,
+<ref id="cbm_k_setnam" name="cbm_k_setnam">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_open<label id="cbm_k_open"><p>
+
+<quote>
+<descrip>
+<tag/Function/Open a Logical I/O File
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/unsigned char cbm_k_open (void);/
+<tag/Description/This function assigns a logical file to a device, so that it can be used for
+Input/Output operations. In order to specify the logical file number,
+the device number, and the secondary address if any, the cbm_k_setlfs() function must first be called.
+Likewise, in order to designate the filename, the cbm_k_setnam() function must be used first.  After these two
+functions are called, cbm_k_open() is then called.
+<tag/Limits/<itemize>
+<item>
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="cbm_k_close" name="cbm_k_close">,
+<ref id="cbm_k_setlfs" name="cbm_k_setlfs">,
+<ref id="cbm_k_setnam" name="cbm_k_setnam">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_readst<label id="cbm_k_readst"><p>
+
+<quote>
+<descrip>
+<tag/Function/Read status word
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/unsigned char cbm_k_readst (void);/
+<tag/Description/This function returns the current status of the I/O devices. It is usually called after new communication to an I/O device and gives information about device status, or errors that have occurred during the I/O operation.
+<tag/Limits/<itemize>
+<item>
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_save<label id="cbm_k_save"><p>
+
+<quote>
+<descrip>
+<tag/Function/Save RAM to a Device
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ cbm_k_save(unsigned int start, unsigned int end)/
+<tag/Description/This function saves a section of memory. The cbm_k_setlfs() and cbm_k_setnam() functions must be
+used before calling this function. However, a file name is not required to
+SAVE to device 1 (the Datassette(TM) recorder). Any attempt to save to
+other devices without using a file name results in an error. NOTE: Device 0 (the keyboard), device 2 (RS-232), and device 3 (the screen) cannot be SAVEd to. If the attempt is made, an error occurs, and the SAVE is stopped.
+<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="cbm_k_load" name="cbm_k_load">,
+<ref id="cbm_k_setlfs" name="cbm_k_setlfs">,
+<ref id="cbm_k_setnam" name="cbm_k_setnam">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_setlfs<label id="cbm_k_setlfs"><p>
+
+<quote>
+<descrip>
+<tag/Function/Set up a logical file
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/void __fastcall__ cbm_k_setlfs (unsigned char LFN, unsigned char DEV, unsigned char SA);/
+<tag/Description/This functions sets up the logical file by setting its number, device address,
+and secondary address.
+<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="cbm_k_setnam" name="cbm_k_setnam">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_setnam<label id="cbm_k_setnam"><p>
+
+<quote>
+<descrip>
+<tag/Function/Set Filename Parameters
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/void __fastcall__ cbm_k_setnam (const char* Name);/
+<tag/Description/This function is used to set up the file name for the OPEN,
+SAVE, or LOAD operations.
+<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="cbm_k_open" name="cbm_k_open">,
+<ref id="cbm_k_load" name="cbm_k_load">,
+<ref id="cbm_k_save" name="cbm_k_save">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_talk<label id="cbm_k_talk"><p>
+
+<quote>
+<descrip>
+<tag/Function/Commands device to TALK
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/void __fastcall__ cbm_k_talk (unsigned char dev);/
+<tag/Description/When called, it ORs the device number with the TALK code (64, $40) and sends it on the serial
+bus. This commands the device to TALK.
+<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="cbm_k_acptr" name="cbm_k_acptr">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>cbm_k_unlsn<label id="cbm_k_unlsn"><p>
+
+<quote>
+<descrip>
+<tag/Function/Send an UNLISTEN command
+<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
+<tag/Declaration/<tt/void cbm_k_unlsn (void);/
+<tag/Description/This function commands all devices on the serial bus to
+stop receiving data from the host computer (i.e., UNLISTEN). Calling this
+function results in an UNLISTEN command being transmitted on the serial
+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/Limits/<itemize>
+<item>
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="cbm_k_listen" name="cbm_k_listen">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>cclear<label id="cclear"><p>
 
 <quote>
@@ -1438,6 +2195,30 @@ used in presence of a prototype.
 </quote>
 
 
+<sect1>clock<label id="clock"><p>
+
+<quote>
+<descrip>
+<tag/Function/Determine the processor time used.
+<tag/Header/<tt/<ref id="time.h" name="time.h">/
+<tag/Declaration/<tt/clock_t clock (void);/
+<tag/Description/The <tt/clock/ function returns an approximaton of processor
+time used by the program. The time is returned in implementation defined
+units. It can be converted to seconds by dividing by the value of the macro
+<tt/CLOCKS_PER_SEC/.
+<tag/Limits/<itemize>
+<item>Since the machines, cc65 generated programs run on, cannot run multiple
+processes, the function will actually return the time since some
+implementation defined point in the past.
+</itemize>
+<tag/Availability/ISO 9899
+<tag/See also/
+<ref id="time" name="time">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>clrscr<label id="clrscr"><p>
 
 <quote>
@@ -1479,6 +2260,29 @@ be used in presence of a prototype.
 </quote>
 
 
+<sect1>closedir<label id="closedir"><p>
+
+<quote>
+<descrip>
+<tag/Function/Close a directory.
+<tag/Header/<tt/<ref id="dirent.h" name="dirent.h">/
+<tag/Declaration/<tt/int __fastcall__ closedir (DIR* dir);/
+<tag/Description/The function closes the given directory descriptor. It returns
+zero on success and -1 on error. If an error occurs, the cause can be determined
+by reading the <tt/errno/ variable.
+<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/POSIX 1003.1
+<tag/See also/
+<ref id="opendir" name="opendir">,
+<ref id="readdir" name="readdir">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>creat<label id="creat"><p>
 
 <quote>
@@ -1742,7 +2546,7 @@ ldiv
 <descrip>
 <tag/Function/Commit changes into extended memory.
 <tag/Header/<tt/<ref id="em.h" name="em.h">/
-<tag/Declaration/<tt/void __fastcall__ em_commit (void);/
+<tag/Declaration/<tt/void em_commit (void);/
 <tag/Description/Commit changes in the memory window to extended storage. If
 the contents of the memory window have been changed, these changes may be lost
 if <tt/<ref id="em_map" name="em_map">/, <tt/<ref id="em_use" name="em_use">/,
@@ -1916,7 +2720,7 @@ loaded.
 <descrip>
 <tag/Function/Return the number of available extended memory pages.
 <tag/Header/<tt/<ref id="em.h" name="em.h">/
-<tag/Declaration/<tt/unsigned __fastcall__ em_pagecount (void);/
+<tag/Declaration/<tt/unsigned em_pagecount (void);/
 <tag/Description/The function returns the size of the extended memory supported
 by the driver in 256 byte pages.
 <tag/Limits/<itemize>
@@ -1937,7 +2741,7 @@ by the driver in 256 byte pages.
 <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/Declaration/<tt/unsigned char em_uninstall (void);/
 <tag/Description/The function uninstalls an already loaded extended memory
 driver but doesn't remove it from memory.
 <tag/Limits/<itemize>
@@ -1945,8 +2749,6 @@ driver but doesn't remove it from memory.
 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/
@@ -1964,7 +2766,7 @@ used in presence of a prototype.
 <descrip>
 <tag/Function/Unload an extended memory driver.
 <tag/Header/<tt/<ref id="em.h" name="em.h">/
-<tag/Declaration/<tt/unsigned char __fastcall__ em_unload (void);/
+<tag/Declaration/<tt/unsigned char em_unload (void);/
 <tag/Description/The function unloads a loaded extended memory driver and
 frees all memory allocated for the driver.
 <tag/Limits/<itemize>
@@ -2037,6 +2839,41 @@ evaluated or is ignored.
 </quote>
 
 
+<sect1>exec<label id="exec"><p>
+
+<quote>
+<descrip>
+<tag/Function/Execute a program file.
+<tag/Header/<tt/<ref id="unistd.h" name="unistd.h">/
+<tag/Declaration/<tt/int __fastcall__ exec (const char* progname, const char* cmdline);/
+<tag/Description/<tt/exec/ replaces the currently running program by a new one.
+Calling <tt/exec()/ is identical to calling <tt/<ref id="exit" name="exit()">/,
+then loading and starting the program named in the first argument, passing
+the command line specified as second argument. Instead of an empty string,
+a <tt/NULL/ pointer may be passed as second parameter.
+On success, the function does not return. On failure, -1 is returned and
+<tt/errno/ contains an error code.
+<tag/Limits/<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+<item>On most platforms, the function needs to copy a small stub loader to
+some memory area outside the program space. This may collide with other
+programs. See the platform specific docs on this.
+<item>Because it is necessary to terminate the running program before the
+memory can be reused to load the new one, there is a high chance that the
+function may not be able to return on errors.
+<item>The command line is passed to the new program in the same way as cc65
+programs expect the command line. If the new program is not a cc65 generated
+program, it may not be able to read it.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="exit" name="exit">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>fast<label id="fast"><p>
 
 <quote>
@@ -2187,6 +3024,28 @@ header files define constants that can be used to check the return code.
 </quote>
 
 
+<sect1>getcpu<label id="getcpu"><p>
+
+<quote>
+<descrip>
+<tag/Function/Determine on which CPU the program is running.
+<tag/Header/<tt/<ref id="6502.h" name="6502.h">/
+<tag/Declaration/<tt/unsigned char getcpu (void);/
+<tag/Description/The function checks on which CPU the code is running. It
+returns one of the constants<itemize>
+<item><tt/CPU_6502/
+<item><tt/CPU_65C02/
+<item><tt/CPU_65816/
+</itemize>
+<tag/Limits/<itemize>
+<item>Other, more exotic CPU types are not disinguished.
+</itemize>
+<tag/Availability/cc65
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>getenv<label id="getenv"><p>
 
 <quote>
@@ -2210,23 +3069,32 @@ be used in presence of a prototype.
 </quote>
 
 
-<sect1>getcpu<label id="getcpu"><p>
+<sect1>getopt<label id="getopt"><p>
 
 <quote>
 <descrip>
-<tag/Function/Determine on which CPU the program is running.
-<tag/Header/<tt/<ref id="6502.h" name="6502.h">/
-<tag/Declaration/<tt/unsigned char getcpu (void);/
-<tag/Description/The function checks on which CPU the code is running. It
-returns one of the constants<itemize>
-<item><tt/CPU_6502/
-<item><tt/CPU_65C02/
-<item><tt/CPU_65816/
-</itemize>
-<tag/Limits/<itemize>
-<item>Other, more exotic CPU types are not disinguished.
+<tag/Function/Parse command line options.
+<tag/Header/<tt/<ref id="unistd.h" name="unistd.h">/
+<tag/Declaration/<tt/int __fastcall__ getopt (int argc, char* const* argv,
+const char* optstring);/
+<tag/Description/The function parses command line arguments, <tt/argc/ and
+<tt/argv/ are the argument count and array passed to <tt/main/. <tt/optstring/
+is a string that contains command line option characters. If a character in
+<tt/optstring/ is followed by a colon, the option requires an argument. An
+option on the command line is recognized if it is one of the option characters
+preceeded by a '-'.
+<tt/getopt/ must be called repeatedly. It will return each option character
+found on the command line and <tt/EOF/ (-1) if there is no other option. An
+option argument is placed in <tt/optarg/, the index of the next element on the
+command line to be processed is placed in <tt/optind/.
+<tag/Limits/<itemize>
+<item>The implementation will not reorder options. A non option on the command
+line will terminate option processing. All remaining arguments are not
+recognized as options, even if the start with a '-' character.
+<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/Availability/POSIX.2
 <tag/Example/None.
 </descrip>
 </quote>
@@ -2320,9 +3188,9 @@ to undefined behaviour.
 <tag/Function/Check if a given character is a letter or digit.
 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
 <tag/Declaration/<tt/int __fastcall__ isalnum (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is a letter or digit. The return value is non zero if the character
-is anything else.
+<tag/Description/The function returns a non zero value if the given argument
+is a letter or digit. The return value is zero if the character is anything
+else.
 <tag/Limits/<itemize>
 <item>When compiling with <tt/-Os/ the function is actually a macro. The
 inline sequence generated by the macro will not work correctly for values
@@ -2358,8 +3226,8 @@ fastcall function, so it may only be used in presence of a prototype.
 <tag/Function/Check if a given character is a letter.
 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
 <tag/Declaration/<tt/int __fastcall__ isalpha (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is a letter. The return value is non zero if the character is anything else.
+<tag/Description/The function returns a non zero value if the given argument
+is a letter. The return value is zero if the character is anything else.
 <tag/Limits/<itemize>
 <item>When compiling with <tt/-Os/ the function is actually a macro. The
 inline sequence generated by the macro will not work correctly for values
@@ -2395,9 +3263,8 @@ fastcall function, so it may only be used in presence of a prototype.
 <tag/Function/Check if a given character is in the ASCII (0..127) range.
 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
 <tag/Declaration/<tt/int __fastcall__ isascii (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is in the range 0..127 (the range of valid ASCII characters) and a non zero
-value if not.
+<tag/Description/The function returns a non zero value if the given argument
+is in the range 0..127 (the range of valid ASCII characters) and zero if not.
 <tag/Limits/<itemize>
 <item>When compiling with <tt/-Os/ the function is actually a macro. The
 inline sequence generated by the macro will not work correctly for values
@@ -2433,9 +3300,9 @@ fastcall function, so it may only be used in presence of a prototype.
 <tag/Function/Check if a given character is a space or tab.
 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
 <tag/Declaration/<tt/int __fastcall__ isblank (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is a space or tab character. The return value is non zero if the character
-is anything else.
+<tag/Description/The function returns a non zero value if the given argument
+is a space or tab character. The return value is zero if the character is
+anything else.
 <tag/Limits/<itemize>
 <item>When compiling with <tt/-Os/ the function is actually a macro. The
 inline sequence generated by the macro will not work correctly for values
@@ -2471,9 +3338,9 @@ fastcall function, so it may only be used in presence of a prototype.
 <tag/Function/Check if a given character is a control character.
 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
 <tag/Declaration/<tt/int __fastcall__ iscntrl (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is a control character. The return value is non zero if the character
-is anything else.
+<tag/Description/The function returns a non zero value if the given argument
+is a control character. The return value is zero if the character is anything
+else.
 <tag/Limits/<itemize>
 <item>When compiling with <tt/-Os/ the function is actually a macro. The
 inline sequence generated by the macro will not work correctly for values
@@ -2509,8 +3376,8 @@ fastcall function, so it may only be used in presence of a prototype.
 <tag/Function/Check if a given character is a digit.
 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
 <tag/Declaration/<tt/int __fastcall__ isdigit (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is a digit. The return value is non zero if the character is anything else.
+<tag/Description/The function returns a non zero value if the given argument
+is a digit. The return value is zero if the character is anything else.
 <tag/Limits/<itemize>
 <item>When compiling with <tt/-Os/ the function is actually a macro. The
 inline sequence generated by the macro will not work correctly for values
@@ -2547,9 +3414,9 @@ fastcall function, so it may only be used in presence of a prototype.
 space).
 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
 <tag/Declaration/<tt/int __fastcall__ isgraph (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is a printable character with the exception of space. The return value is non
-zero if the character is anything else.
+<tag/Description/The function returns a non zero value if the given argument
+is a printable character with the exception of space. The return value is zero
+if the character is anything else.
 <tag/Limits/<itemize>
 <item>When compiling with <tt/-Os/ the function is actually a macro. The
 inline sequence generated by the macro will not work correctly for values
@@ -2585,9 +3452,9 @@ fastcall function, so it may only be used in presence of a prototype.
 <tag/Function/Check if a given character is a lower case letter.
 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
 <tag/Declaration/<tt/int __fastcall__ islower (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is a lower case letter. The return value is non zero if the character is
-anything else.
+<tag/Description/The function returns a non zero value if the given argument
+is a lower case letter. The return value is zero if the character is anything
+else.
 <tag/Limits/<itemize>
 <item>When compiling with <tt/-Os/ the function is actually a macro. The
 inline sequence generated by the macro will not work correctly for values
@@ -2623,9 +3490,9 @@ fastcall function, so it may only be used in presence of a prototype.
 <tag/Function/Check if a given character is a printable character.
 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
 <tag/Declaration/<tt/int __fastcall__ isprint (int c);/
-<tag/Description/The function returns a value of zero if the given argument
+<tag/Description/The function returns a non zero value if the given argument
 is a printable character (this includes the space character). The return value
-is non zero if the character is anything else.
+is zero if the character is anything else.
 <tag/Limits/<itemize>
 <item>When compiling with <tt/-Os/ the function is actually a macro. The
 inline sequence generated by the macro will not work correctly for values
@@ -2662,9 +3529,9 @@ fastcall function, so it may only be used in presence of a prototype.
 space or an alphanumeric character.
 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
 <tag/Declaration/<tt/int __fastcall__ ispunct (int c);/
-<tag/Description/The function returns a value of zero if the given argument
+<tag/Description/The function returns a non zero value if the given argument
 is a printable character, but not a space or anything alphanumeric. The return
-value is non zero if the character is anything else.
+value is zero if the character is anything else.
 <tag/Limits/<itemize>
 <item>When compiling with <tt/-Os/ the function is actually a macro. The
 inline sequence generated by the macro will not work correctly for values
@@ -2700,8 +3567,8 @@ fastcall function, so it may only be used in presence of a prototype.
 <tag/Function/Check if a given character is a a white-space character.
 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
 <tag/Declaration/<tt/int __fastcall__ isspace (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is a white space character. The return value is non zero if the character is
+<tag/Description/The function returns a non zero value if the given argument
+is a white space character. The return value is zero if the character is
 anything else. The standard white space characters are: space, formfeed ('\f'),
 newline ('\n'), carriage return ('\r'), horizontal tab ('\t'), and vertical tab
 ('\v').
@@ -2740,9 +3607,9 @@ fastcall function, so it may only be used in presence of a prototype.
 <tag/Function/Check if a given character is an upper case letter.
 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
 <tag/Declaration/<tt/int __fastcall__ isupper (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is an upper case letter. The return value is non zero if the character is
-anything else.
+<tag/Description/The function returns a non zero value if the given argument
+is an upper case letter. The return value is zero if the character is anything
+else.
 <tag/Limits/<itemize>
 <item>When compiling with <tt/-Os/ the function is actually a macro. The
 inline sequence generated by the macro will not work correctly for values
@@ -2778,9 +3645,9 @@ fastcall function, so it may only be used in presence of a prototype.
 <tag/Function/Check if a given character is a hexadecimal digit.
 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
 <tag/Declaration/<tt/int __fastcall__ isxdigit (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is a hexadecimal digit (0..9, a..f and A..F). The return value is non zero
-if the character is anything else.
+<tag/Description/The function returns a non zero value if the given argument
+is a hexadecimal digit (0..9, a..f and A..F). The return value is zero if the
+character is anything else.
 <tag/Limits/<itemize>
 <item>When compiling with <tt/-Os/ the function is actually a macro. The
 inline sequence generated by the macro will not work correctly for values
@@ -2844,7 +3711,7 @@ used in presence of a prototype.
 <descrip>
 <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/Declaration/<tt/unsigned char joy_count (void);/
 <tag/Description/The function returns a the number of joysticks supported
 by the current joystick driver.
 <tag/Limits/<itemize>
@@ -2852,8 +3719,6 @@ by the current joystick 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/
@@ -2944,15 +3809,13 @@ used in presence of a prototype.
 <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/Declaration/<tt/unsigned char 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/
@@ -2970,15 +3833,13 @@ used in presence of a prototype.
 <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/Declaration/<tt/unsigned char 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/
@@ -3163,6 +4024,32 @@ be used in presence of a prototype.
 </quote>
 
 
+<sect1>memcmp<label id="memcmp"><p>
+
+<quote>
+<descrip>
+<tag/Function/Compare two memory areas.
+<tag/Header/<tt/<ref id="string.h" name="string.h">/
+<tag/Declaration/<tt/int __fastcall__ memcmp (const void* p1, const void* p2, size_t count);/
+<tag/Description/<tt/memcmp/ compares <tt/count/ bytes from the memory area
+pointed to by <tt/p1/ into the memory area pointed to by <tt/p2/. It returns a value that is less than
+zero if <tt/p1/ is less than <tt/p2/, zero if <tt/p1/ is the same as <tt/p2/,
+and a value greater than zero if <tt/p1/ is greater than <tt/p2/.
+<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="strcmp" name="strcmp">,
+<ref id="memmove" name="memmove">,
+<ref id="memset" name="memset">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>memcpy<label id="memcpy"><p>
 
 <quote>
@@ -3350,14 +4237,10 @@ used in presence of a prototype.
 <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/Declaration/<tt/unsigned char 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">,
@@ -3398,16 +4281,12 @@ used in presence of a prototype.
 <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/Declaration/<tt/void 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">
@@ -3587,15 +4466,11 @@ used in presence of a prototype.
 <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/Declaration/<tt/void 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">
@@ -3610,7 +4485,7 @@ used in presence of a prototype.
 <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/Declaration/<tt/unsigned char mouse_uninstall (void);/
 <tag/Description/The function uninstalls an already loaded mouse driver but
 don't removes it from memory.
 <tag/Limits/<itemize>
@@ -3618,8 +4493,6 @@ don't removes it from memory.
 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/
@@ -3695,6 +4568,29 @@ cc65 allows to pass this argument, it is ignored.
 </quote>
 
 
+<sect1>opendir<label id="opendir"><p>
+
+<quote>
+<descrip>
+<tag/Function/Open a directory.
+<tag/Header/<tt/<ref id="dirent.h" name="dirent.h">/
+<tag/Declaration/<tt/DIR* __fastcall__ opendir (const char* name);/
+<tag/Description/<tt/opendir/ opens a directory and returns the direcory
+descriptor associated with it. On error, NULL is returned and an error code is
+stored in <tt/errno/.
+<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/POSIX 1003.1
+<tag/See also/
+<ref id="closedir" name="closedir">,
+<ref id="readdir" name="readdir">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>peekbsys<label id="peekbsys"><p>
 
 <quote>
@@ -3913,6 +4809,45 @@ had been used with an argument of 1.
 </quote>
 
 
+<sect1>readdir<label id="readdir"><p>
+
+<quote>
+<descrip>
+<tag/Function/Read a directory.
+<tag/Header/<tt/<ref id="dirent.h" name="dirent.h">/
+<tag/Declaration/<tt/struct dirent* __fastcall__ readdir (DIR* dir);/
+<tag/Description/<tt/readdir/ reads the next directory entry from the directory
+stream pointed to by <tt/dir/. It stores the data in a <tt/dirent/ structure
+and returns a pointer to it. If the end of directory is reached, or an error
+occurs, NULL is returned. In case of errors, an error code is stored into
+<tt/errno/.
+<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 returned pointer may point to a statically allocated instance of
+<tt/struct dirent/, so it may get overwritten by subsequent calls to
+<tt/readdir/.
+<item>On several platforms, namely the CBMs and the Atari, the disk drives get
+confused when opening/closing files between directory reads. So for example a
+program that reads the list of files on a disk, and after each call to
+<tt/readdir/, opens the file to process it, will fail.<newline>
+Possible solutions are reading the directory into memory before processing the
+file list, or to reset the directory by seeking to the correct position after
+opening/closing a file:
+<verb>
+        seekdir (DIR, telldir (DIR));
+</verb>
+Platforms known to work without problems are: Apple.
+</itemize>
+<tag/Availability/POSIX 1003.1
+<tag/See also/
+<ref id="closedir" name="closedir">,
+<ref id="opendir" name="opendir">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>realloc<label id="realloc"><p>
 
 <quote>
@@ -4032,7 +4967,7 @@ if (rename (OLDNAME, NEWNAME) == 0) {
 <descrip>
 <tag/Function/Resets the break vector to its original value.
 <tag/Header/<tt/<ref id="6502.h" name="6502.h">/
-<tag/Declaration/<tt/void __fastcall__ reset_brk (void);/
+<tag/Declaration/<tt/void reset_brk (void);/
 <tag/Description/<tt/reset_brk/ resets the break vector to the value it had
 before a call to <tt/set_brk/.
 <tag/Limits/
@@ -4043,7 +4978,32 @@ the program ends.
 </itemize>
 <tag/Availability/cc65
 <tag/See also/
-<ref id="set_brk" name="set_brk">
+<ref id="reset_irq" name="reset_irq">,
+<ref id="set_brk" name="set_brk">,
+<ref id="set_irq" name="set_irq">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>reset_irq<label id="reset_irq"><p>
+
+<quote>
+<descrip>
+<tag/Function/Resets the C level interrupt request vector.
+<tag/Header/<tt/<ref id="6502.h" name="6502.h">/
+<tag/Declaration/<tt/void reset_irq (void);/
+<tag/Description/<tt/reset_irq/ resets the C level interrupt request vector.
+<tag/Limits/
+<itemize>
+<item>The original IRQ vector is restored on program termination even without
+calling this function.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="reset_brk" name="reset_brk">,
+<ref id="set_brk" name="set_brk">,
+<ref id="set_irq" name="set_irq">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -4073,6 +5033,28 @@ be used in presence of a prototype.
 </quote>
 
 
+<sect1>rewinddir<label id="rewinddir"><p>
+
+<quote>
+<descrip>
+<tag/Function/Reset a directory stream.
+<tag/Header/<tt/<ref id="dirent.h" name="dirent.h">/
+<tag/Declaration/<tt/void __fastcall__ rewinddir (DIR* dir);/
+<tag/Description/<tt/rewinddir/ sets the position of the directory stream
+pointed to by <tt/dir/ to the start of the directory.
+<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/POSIX 1003.1
+<tag/See also/
+<ref id="seekdir" name="seekdir">,
+<ref id="telldir" name="telldir">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>screensize<label id="screensize"><p>
 
 <quote>
@@ -4086,12 +5068,267 @@ be used in presence of a prototype.
 be used in presence of a prototype.
 </itemize>
 <tag/Availability/cc65
-<tag/See also/
-<ref id="gotox" name="gotox">,
-<ref id="gotoxy" name="gotoxy">,
-<ref id="gotoy" name="gotoy">,
-<ref id="wherex" name="wherex">,
-<ref id="wherey" name="wherey">
+<tag/See also/
+<ref id="gotox" name="gotox">,
+<ref id="gotoxy" name="gotoxy">,
+<ref id="gotoy" name="gotoy">,
+<ref id="wherex" name="wherex">,
+<ref id="wherey" name="wherey">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>seekdir<label id="seekdir"><p>
+
+<quote>
+<descrip>
+<tag/Function/Set the position of a directory stream.
+<tag/Header/<tt/<ref id="dirent.h" name="dirent.h">/
+<tag/Declaration/<tt/void __fastcall__ seekdir (DIR* dir, long offset);/
+<tag/Description/<tt/seekdir/ sets the position of the directory stream
+pointed to by <tt/dir/ to the value given in <tt/offset/, which should be a
+value returned by <tt/<ref id="telldir" name="telldir">/.
+<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/POSIX 1003.1
+<tag/See also/
+<ref id="rewinddir" name="rewinddir">,
+<ref id="telldir" name="telldir">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>ser_close<label id="ser_close"><p>
+
+<quote>
+<descrip>
+<tag/Function/Close the port and disable interrupts
+<tag/Header/<tt/<ref id="serial.h" name="serial.h">/
+<tag/Declaration/<tt/unsigned char ser_close (void);/
+<tag/Description/Close the port by clearing buffers and disable interrupts.
+<tag/Availability/cc65
+<tag/See also/Other serial functions.
+<tag/Example/
+<verb>
+#include <serial.h>
+
+static void initialize(){
+  struct ser_params params = {
+    SER_BAUD_9600,
+    SER_BITS_8,
+    SER_STOP_1,
+    SER_PAR_MARK,
+    SER_HS_NONE
+  };
+  ser_install(lynx_comlynx); // This will activate the ComLynx
+  CLI();
+  ser_open(&amp;params);
+}
+</verb>
+</descrip>
+</quote>
+
+
+<sect1>ser_get<label id="ser_get"><p>
+
+<quote>
+<descrip>
+<tag/Function/Read a character from serial port.
+<tag/Header/<tt/<ref id="serial.h" name="serial.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ ser_get (char* b);/
+<tag/Description/Get a character from the serial port. If no characters are
+available, the function will return SER_ERR_NO_DATA, so this is not a fatal
+error.
+<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/Other serial functions.
+<tag/Example/
+Wait for a character to be available from a serial port.
+<verb>
+char ch;
+while (ser_get(&amp;ch) == SER_ERR_NO_DATA)
+  ;
+</verb>
+</descrip>
+</quote>
+
+
+<sect1>ser_install<label id="ser_install"><p>
+
+<quote>
+<descrip>
+<tag/Function/Install an already loaded driver and return an error code.
+<tag/Header/<tt/<ref id="serial.h" name="serial.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ ser_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/SER_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="ser_load_driver" name="ser_load_driver">,
+<ref id="ser_uninstall" name="ser_uninstall">,
+<ref id="ser_unload" name="ser_unload">
+<tag/Example/<verb>
+ser_install(lynx_comlynx); //Include the driver statically instead of loading it.
+</verb>
+</descrip>
+</quote>
+
+
+<sect1>ser_ioctl<label id="ser_ioctl"><p>
+
+<quote>
+<descrip>
+<tag/Function/Platform dependent code extensions.
+<tag/Header/<tt/<ref id="serial.h" name="serial.h">/
+<tag/Declaration/<tt/unsigned __fastcall__ ser_ioctl (unsigned char code, void* data);/
+<tag/Description/Some platforms have extra serial functions that are not
+supported by standard serial driver functions. You can extend the driver to support
+this extra functionality bt using ser_ioctl 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>These functions are not easily portable to other cc65 platforms.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/Other serial functions.
+<tag/Example/None
+</descrip>
+</quote>
+
+<sect1>ser_load_driver<label id="ser_load_driver"><p>
+
+<quote>
+<descrip>
+<tag/Function/Load and install a serial driver.
+<tag/Header/<tt/<ref id="serial.h" name="serial.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ ser_load_driver (const char *name);/
+<tag/Description/Load and install the driver by name.
+Will just load the driver and check if loading was successful.
+<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/Other serial functions.
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>ser_open<label id="ser_open"><p>
+
+<quote>
+<descrip>
+<tag/Function/Open the port by setting the port parameters and enable interrupts
+<tag/Header/<tt/<ref id="serial.h" name="serial.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ ser_open (const struct ser_params* params);/
+<tag/Description/Open the port by setting the port parameters and enable interrupts.
+<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/Other serial functions.
+<tag/Example/
+<verb>
+#include <serial.h>
+
+static void initialize(){
+  struct ser_params params = {
+    SER_BAUD_9600,
+    SER_BITS_8,
+    SER_STOP_1,
+    SER_PAR_MARK,
+    SER_HS_NONE
+  };
+  ser_install(lynx_comlynx); // This will activate the ComLynx
+  CLI();
+  ser_open(&amp;params);
+}
+</verb>
+</descrip>
+</quote>
+
+
+<sect1>ser_put<label id="ser_put"><p>
+
+<quote>
+<descrip>
+<tag/Function/Write a character to a serial port.
+<tag/Header/<tt/<ref id="serial.h" name="serial.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ ser_put (char b);/
+<tag/Description/Send a character via the serial port. There is a transmit
+buffer, but transmitting is not done via interrupt. The function returns
+SER_ERR_OVERFLOW if there is no space left in the transmit buffer.
+<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/Other serial functions.
+<tag/Example/
+<verb>
+ser_put('A');
+</verb>
+</descrip>
+</quote>
+
+
+<sect1>ser_status<label id="ser_status"><p>
+
+<quote>
+<descrip>
+<tag/Function/Return the serial port status.
+<tag/Header/<tt/<ref id="serial.h" name="serial.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ ser_status (unsigned char* status);/
+<tag/Description/Return the serial port status.
+<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/Other serial functions.
+<tag/Example/None
+</descrip>
+</quote>
+
+
+<sect1>ser_uninstall<label id="ser_uninstall"><p>
+
+<quote>
+<descrip>
+<tag/Function/Uninstall the currently loaded driver but do not unload it.
+<tag/Header/<tt/<ref id="serial.h" name="serial.h">/
+<tag/Declaration/<tt/unsigned char ser_uninstall (void);/
+<tag/Description/Uninstall the currently loaded driver but do not unload it.
+<tag/Availability/cc65
+<tag/See also/Other serial functions.
+<tag/Example/None.
+</descrip>
+</quote>
+
+<sect1>ser_unload<label id="ser_unload"><p>
+
+<quote>
+<descrip>
+<tag/Function/Uninstall, then unload the currently loaded driver.
+<tag/Header/<tt/<ref id="serial.h" name="serial.h">/
+<tag/Declaration/<tt/unsigned char ser_unload (void);/
+<tag/Description/Uninstall, then unload the currently loaded driver.
+<tag/Availability/cc65
+<tag/See also/Other serial functions.
 <tag/Example/None.
 </descrip>
 </quote>
@@ -4132,6 +5369,47 @@ the program terminates.
 </quote>
 
 
+<sect1>set_irq<label id="set_irq"><p>
+
+<quote>
+<descrip>
+<tag/Function/Set the C level interrupt request vector to the given address.
+<tag/Header/<tt/<ref id="6502.h" name="6502.h">/
+<tag/Declaration/<tt/void __fastcall__ set_irq (irq_handler f, void *stack_addr, size_t stack_size);/
+<tag/Description/<tt/set_irq/ allows a user program to handle interrupt requests
+(IRQs) within the program code by letting the vector point to a user written C
+function. The runtime library installs a small stub that saves the zero page
+registers used by the C runtime before calling the handler function and restores
+them after the handler function returns. Additionally the stub temporarily switches
+the C runtime stack to the stack area provided as parameter. If the handler function
+was set up to handle a "private", "exclusive" interrupt request source it must
+return the value <tt/IRQ_HANDLED/ if and only if it has verified that the current
+interrupt request actually stems from that source. In all other cases it must return
+the value <tt/IRQ_NOT_HANDLED/.
+<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 stub saves the registers and zero page locations used by the C runtime
+and switches to the provided stack area. As a consequence, there is some
+runtime overhead, but it it is safe to execute C code, even if other C code
+was interrupted. Be careful however not to call C library functions, and do not
+enable stack checks for the handler function or any other function called from
+it.
+<item>The interrupt vector is reset on function termination, so it's not
+strictly necessary to call <tt/<ref id="reset_irq" name="reset_irq">/ as part
+of the cleanup when the program terminates.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="reset_brk" name="reset_brk">,
+<ref id="reset_irq" name="reset_irq">,
+<ref id="set_brk" name="set_brk">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>setjmp<label id="setjmp"><p>
 
 <quote>
@@ -4292,7 +5570,7 @@ be used in presence of a prototype.
 <ref id="strcmp" name="strcmp">,
 <ref id="strcoll" name="strcoll">,
 <ref id="stricmp" name="stricmp">,
-<ref id="strncmp" name="strncmp">
+<ref id="strncmp" name="strncmp">,
 <ref id="strxfrm" name="strxfrm">
 <tag/Example/None.
 </descrip>
@@ -4399,7 +5677,7 @@ be used in presence of a prototype.
 <ref id="strcasecmp" name="strcasecmp">,
 <ref id="strcmp" name="strcmp">,
 <ref id="stricmp" name="stricmp">,
-<ref id="strncmp" name="strncmp">
+<ref id="strncmp" name="strncmp">,
 <ref id="strxfrm" name="strxfrm">
 <tag/Example/None.
 </descrip>
@@ -4534,7 +5812,7 @@ be used in presence of a prototype.
 <ref id="strcasecmp" name="strcasecmp">,
 <ref id="strcmp" name="strcmp">,
 <ref id="strcoll" name="strcoll">,
-<ref id="strncmp" name="strncmp">
+<ref id="strncmp" name="strncmp">,
 <ref id="strxfrm" name="strxfrm">
 <tag/Example/None.
 </descrip>
@@ -4643,7 +5921,7 @@ be used in presence of a prototype.
 <ref id="strcasecmp" name="strcasecmp">,
 <ref id="strcmp" name="strcmp">,
 <ref id="strcoll" name="strcoll">,
-<ref id="stricmp" name="stricmp">
+<ref id="stricmp" name="stricmp">,
 <ref id="strxfrm" name="strxfrm">
 <tag/Example/None.
 </descrip>
@@ -4810,7 +6088,7 @@ just copy s2 to s1 using <tt><ref id="strncpy" name="strncpy"></tt>.
 <tag/See also/
 <ref id="strcmp" name="strcmp">,
 <ref id="strcoll" name="strcoll">,
-<ref id="strncpy" name="strncpy">,
+<ref id="strncpy" name="strncpy">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -4847,6 +6125,29 @@ See <tt/strupper/.
 </quote>
 
 
+<sect1>telldir<label id="telldir"><p>
+
+<quote>
+<descrip>
+<tag/Function/Return the current position of a directory stream.
+<tag/Header/<tt/<ref id="dirent.h" name="dirent.h">/
+<tag/Declaration/<tt/long __fastcall__ telldir (DIR* dir);/
+<tag/Description/<tt/telldir/ returns the current position of a directory
+stream. The return value may be used in subsequent calls to
+<tt/<ref id="seekdir" name="seekdir">/.
+<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/POSIX 1003.1
+<tag/See also/
+<ref id="seekdir" name="seekdir">,
+<ref id="telldir" name="telldir">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>textcolor<label id="textcolor"><p>
 
 <quote>
@@ -4872,6 +6173,40 @@ be used in presence of a prototype.
 </quote>
 
 
+<sect1>tgi_arc<label id="tgi_arc"><p>
+
+<quote>
+<descrip>
+<tag/Function/Draw an elliptic arc in the current color.
+<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
+<tag/Declaration/<tt/void __fastcall__ tgi_arc (int x, int y,
+unsigned char rx, unsigned char ry, unsigned sa, unsigned ea);/
+<tag/Description/The function draws an elliptic arc with center at x/y and
+radii rx/ry using the current drawing color. The arc covers the angle
+between sa and ea (startangle and endangle), which must be in the range
+0..360.
+<tag/Limits/<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+<item>The function behaves unexpectedly or may crash if the angles are out
+of range.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="tgi_bar" name="tgi_bar">,
+<ref id="tgi_circle" name="tgi_circle">,
+<ref id="tgi_ellipse" name="tgi_ellipse">,
+<ref id="tgi_pieslice" name="tgi_pieslice">,
+<ref id="tgi_setcolor" name="tgi_setcolor">
+<tag/Example/<verb>
+/* Draw the upper half of an ellipse */
+tgi_setcolor(TGI_COLOR_BLUE);
+tgi_arc (50, 50, 40, 20, 0, 180);
+</verb>
+</descrip>
+</quote>
+
+
 <sect1>tgi_bar<label id="tgi_bar"><p>
 
 <quote>
@@ -4910,8 +6245,10 @@ be used in presence of a prototype.
 </itemize>
 <tag/Availability/cc65
 <tag/See also/
+<ref id="tgi_arc" name="tgi_arc">,
 <ref id="tgi_bar" name="tgi_bar">,
 <ref id="tgi_ellipse" name="tgi_ellipse">,
+<ref id="tgi_pieslice" name="tgi_pieslice">,
 <ref id="tgi_setcolor" name="tgi_setcolor">
 <tag/Example/<verb>
 tgi_setcolor(TGI_COLOR_BLACK);
@@ -4927,18 +6264,15 @@ tgi_circle(50, 40, 40);
 <descrip>
 <tag/Function/Clear the drawpage
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/void __fastcall__ tgi_clear (void);/
+<tag/Declaration/<tt/void tgi_clear (void);/
 <tag/Description/Clear the drawpage
-<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/Other tgi functions
 <tag/Example/None.
 </descrip>
 </quote>
 
+
 <sect1>tgi_done<label id="tgi_done"><p>
 
 <quote>
@@ -4946,13 +6280,9 @@ be used in presence of a prototype.
 <tag/Function/End graphics mode, switch back to text mode.
 Will NOT uninstall or unload the driver!
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/void __fastcall__ tgi_done (void);/
+<tag/Declaration/<tt/void tgi_done (void);/
 <tag/Description/End graphics mode, switch back to text mode.
 Will NOT uninstall or unload the driver!
-<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/Other tgi functions
 <tag/Example/None.
@@ -4975,8 +6305,10 @@ be used in presence of a prototype.
 </itemize>
 <tag/Availability/cc65
 <tag/See also/
+<ref id="tgi_arc" name="tgi_arc">,
 <ref id="tgi_bar" name="tgi_bar">,
 <ref id="tgi_circle" name="tgi_circle">,
+<ref id="tgi_pieslice" name="tgi_pieslice">,
 <ref id="tgi_setcolor" name="tgi_setcolor">
 <tag/Example/<verb>
 tgi_setcolor(TGI_COLOR_RED);
@@ -4986,23 +6318,70 @@ tgi_ellipse (50, 40, 40, 20);
 </quote>
 
 
+<sect1>tgi_free_vectorfont<label id="tgi_free_vectorfont"><p>
+
+<quote>
+<descrip>
+<tag/Function/Free a vector font that was previously loaded into memory.
+<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
+<tag/Declaration/<tt/void __fastcall__ tgi_free_vectorfont (const tgi_vectorfont* font);/
+<tag/Description/Free a vector font that was previously loaded into memory.
+<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="tgi_load_vectorfont" name="tgi_load_vectorfont">,
+<ref id="tgi_install_vectorfont" name="tgi_install_vectorfont">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>tgi_getaspectratio<label id="tgi_getaspectratio"><p>
+
+<quote> <descrip> <tag/Function/Return the pixel aspect ratio.
+<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
+<tag/Declaration/<tt/unsigned tgi_getaspectratio (void);/
+<tag/Description/The function returns the pixel aspect ratio for the current
+driver and display as an 8.8 fixed point value. It may be used to correct
+geometric shapes so they look correct on the display. As an example, a circle
+with a radius of 100 pixels may look elliptic on some driver/display
+combinations if the aspect ratio is not 1.00.
+<tag/Limits/<itemize>
+<item>The aspect ratio is encoded in the TGI driver which assumes a "standard"
+monitor for the given platform. The aspect ratio may be wrong if another
+monitor is used.
+<item>No TGI function will use the aspect ratio. It is up to the programmer to
+make use of it.
+<item>The <ref id="tgi_setaspectratio" name="tgi_setaspectratio"> function can
+be used to change the aspect ratio for a loaded driver. The value is not reset
+by <ref id="tgi_init" name="tgi_init">, so if a driver is linked statically to
+an application, switching into and out of graphics mode will not restore the
+original aspect ratio.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="tgi_setaspectratio" name="tgi_setaspectratio">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>tgi_getcolor<label id="tgi_getcolor"><p>
 
 <quote>
 <descrip>
 <tag/Function/Return the current drawing color.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/unsigned char __fastcall__ tgi_getcolor (void);/
+<tag/Declaration/<tt/unsigned char tgi_getcolor (void);/
 <tag/Description/The actual color is an index to a palette. During tgi_init
 you will get a default palette. The number of colors depend on the platform.
 All platforms recognize at least TGI_COLOR_BLACK and TGI_COLOR_WHITE. But some
 platforms have many more predefined colors. If you paint using TGI_COLOR_GREEN
 and then you change the green of the palette to blue using tgi_setpalette then
 after this painting in TGI_COLOR_GREEN will actually be blue.
-<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/Other tgi functions
 <tag/Example/<verb>
@@ -5011,19 +6390,16 @@ color = tgi_getcolor();
 </descrip>
 </quote>
 
+
 <sect1>tgi_getcolorcount<label id="tgi_getcolorcount"><p>
 
 <quote>
 <descrip>
 <tag/Function/Get the number of available colors.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/unsigned char __fastcall__ tgi_getcolorcount (void);/
+<tag/Declaration/<tt/unsigned char tgi_getcolorcount (void);/
 <tag/Description/Tgi platforms use indexed color palettes. This function
 returns the number of entries we can use in the palette.
-<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/Other tgi functions
 <tag/Example/<verb>
@@ -5034,26 +6410,24 @@ if (tgi_getcolorcount() == 2) {
 </descrip>
 </quote>
 
+
 <sect1>tgi_getdefpalette<label id="tgi_getdefpalette"><p>
 
 <quote>
 <descrip>
 <tag/Function/Get the palette installed by default.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/const unsigned char* __fastcall__ tgi_getdefpalette (void);/
+<tag/Declaration/<tt/const unsigned char* tgi_getdefpalette (void);/
 <tag/Description/The tgi driver has a default palette that is active at startup.
-The named colors TGI_COLOR_BLACK, TGI_COLOR_WHITE, TGI_COLOR_RED... need this 
+The named colors TGI_COLOR_BLACK, TGI_COLOR_WHITE, TGI_COLOR_RED... need this
 palette to work correctly.
-<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/Other tgi functions
 <tag/Example/None.
 </descrip>
 </quote>
 
+
 <sect1>tgi_geterror<label id="tgi_geterror"><p>
 
 <quote>
@@ -5061,19 +6435,16 @@ be used in presence of a prototype.
 <tag/Function/Return the error code for the last operation.
 This will also clear the error.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/unsigned char __fastcall__ tgi_geterror (void);/
+<tag/Declaration/<tt/unsigned char tgi_geterror (void);/
 <tag/Description/Return the error code for the last operation.
 This will also clear the error.
-<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/Other tgi functions
 <tag/Example/None.
 </descrip>
 </quote>
 
+
 <sect1>tgi_geterrormsg<label id="tgi_geterrormsg"><p>
 
 <quote>
@@ -5092,73 +6463,60 @@ be used in presence of a prototype.
 </descrip>
 </quote>
 
+
 <sect1>tgi_getmaxcolor<label id="tgi_getmaxcolor"><p>
 
 <quote>
 <descrip>
 <tag/Function/Get the highest index of the palette.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/unsigned char __fastcall__ tgi_getmaxcolor (void);/
+<tag/Declaration/<tt/unsigned char tgi_getmaxcolor (void);/
 <tag/Description/Get the highest index of the palette.
-<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/Other tgi functions
 <tag/Example/None.
 </descrip>
 </quote>
 
+
 <sect1>tgi_getmaxx<label id="tgi_getmaxx"><p>
 
 <quote>
 <descrip>
 <tag/Function/Get the maximum x coordinate that can be used on this screen.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/unsigned __fastcall__ tgi_getmaxx (void);/
+<tag/Declaration/<tt/unsigned tgi_getmaxx (void);/
 <tag/Description/Get the maximum x coordinate that can be used on this screen.
-<tag/Limits/<itemize>
-<item>The function is only available as fastcall function, so it may only
-be used in presence of a prototype.
-</itemize>
-<tag/Availability/cc65
 <tag/Availability/cc65
 <tag/See also/Other tgi functions
 <tag/Example/None.
 </descrip>
 </quote>
 
+
 <sect1>tgi_getmaxy<label id="tgi_getmaxy"><p>
 
 <quote>
 <descrip>
 <tag/Function/Get the maximum y coordinate that can be used on this screen.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/unsigned __fastcall__ tgi_getmaxy (void);/
+<tag/Declaration/<tt/unsigned tgi_getmaxy (void);/
 <tag/Description/Get the maximum y coordinate that can be used on this screen.
-<tag/Limits/<itemize>
-<item>The function is only available as fastcall function, so it may only
-be used in presence of a prototype.
-</itemize>
 <tag/Availability/cc65
 <tag/See also/Other tgi functions
 <tag/Example/None.
 </descrip>
 </quote>
 
+
 <sect1>tgi_getpagecount<label id="tgi_getpagecount"><p>
 
 <quote>
 <descrip>
 <tag/Function/Return the number of screen pages available.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/unsigned __fastcall__ tgi_getpagecount (void);/
+<tag/Declaration/<tt/unsigned tgi_getpagecount (void);/
 <tag/Description/Return the number of screen pages available.
-<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="tgi_setdrawpage" name="tgi_setdrawpage">,
@@ -5167,24 +6525,22 @@ be used in presence of a prototype.
 </descrip>
 </quote>
 
+
 <sect1>tgi_getpalette<label id="tgi_getpalette"><p>
 
 <quote>
 <descrip>
 <tag/Function/Get the palette installed.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/const unsigned char* __fastcall__ tgi_getpalette (void);/
+<tag/Declaration/<tt/const unsigned char* tgi_getpalette (void);/
 <tag/Description/Get the palette 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/Other tgi functions
 <tag/Example/None.
 </descrip>
 </quote>
 
+
 <sect1>tgi_getpixel<label id="tgi_getpixel"><p>
 
 <quote>
@@ -5203,44 +6559,39 @@ be used in presence of a prototype.
 </descrip>
 </quote>
 
+
 <sect1>tgi_getxres<label id="tgi_getxres"><p>
 
 <quote>
 <descrip>
 <tag/Function/Get number of horisontal pixels on the screen.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/unsigned __fastcall__ tgi_getxres (void);/
+<tag/Declaration/<tt/unsigned tgi_getxres (void);/
 <tag/Description/Get number of horisontal pixels on the screen.
 This is same as tgi_maxx()+1.
-<tag/Limits/<itemize>
-<item>The function is only available as fastcall function, so it may only
-be used in presence of a prototype.
-</itemize>
 <tag/Availability/cc65
 <tag/See also/Other tgi functions.
 <tag/Example/None.
 </descrip>
 </quote>
 
+
 <sect1>tgi_getyres<label id="tgi_getyres"><p>
 
 <quote>
 <descrip>
 <tag/Function/Get number of vertical pixels on the screen.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/unsigned __fastcall__ tgi_getyres (void);/
+<tag/Declaration/<tt/unsigned tgi_getyres (void);/
 <tag/Description/Get number of vertical pixels on the screen.
 This is same as tgi_maxy()+1.
-<tag/Limits/<itemize>
-<item>The function is only available as fastcall function, so it may only
-be used in presence of a prototype.
-</itemize>
 <tag/Availability/cc65
 <tag/See also/Other tgi functions.
 <tag/Example/None.
 </descrip>
 </quote>
 
+
 <sect1>tgi_gotoxy<label id="tgi_gotoxy"><p>
 
 <quote>
@@ -5259,29 +6610,32 @@ be used in presence of a prototype.
 </descrip>
 </quote>
 
+
 <sect1>tgi_init<label id="tgi_init"><p>
 
 <quote>
 <descrip>
 <tag/Function/Initialize the already loaded graphics driver.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/void __fastcall__ tgi_init (void);/
+<tag/Declaration/<tt/void tgi_init (void);/
 <tag/Description/The tgi_init function will set the default palette to the
-hardware and clear the screen.
+hardware.
 <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/tgi_init/ will not clear the screen. This allows switching between
+text and graphics mode on platforms that have separate memory areas for the
+screens. If you want the screen cleared, call <tt/<ref id="tgi_clear"
+name="tgi_clear">/ after <tt/tgi_init/.
 </itemize>
 <tag/Availability/cc65
 <tag/See also/Other tgi functions.
 <tag/Example/<verb>
-extern char lynxtgi[]; //Include the driver statically instead of loading it.
-tgi_install(&amp;lynxtgi);
+tgi_install(tgi_static_stddrv); //Include the driver statically instead of loading it.
 tgi_init(); //Set up the default palette and clear the screen.
 </verb>
 </descrip>
 </quote>
 
+
 <sect1>tgi_install<label id="tgi_install"><p>
 
 <quote>
@@ -5302,21 +6656,44 @@ used in presence of a prototype.
 <ref id="tgi_uninstall" name="tgi_uninstall">,
 <ref id="tgi_unload" name="tgi_unload">
 <tag/Example/<verb>
-extern char lynxtgi[]; //Include the driver statically instead of loading it.
-
-tgi_install(&amp;lynxtgi);
+tgi_install(tgi_static_stddrv); //Include the driver statically instead of loading it.
 tgi_init(); //Set up the default palette and clear the screen.
 </verb>
 </descrip>
 </quote>
 
+
+<sect1>tgi_install_vectorfont<label id="tgi_install_vectorfont"><p>
+
+<quote>
+<descrip>
+<tag/Function/Install an already loaded driver and return an error code.
+<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
+<tag/Declaration/<tt/void __fastcall__ tgi_install_vectorfont (const tgi_vectorfont* font);/
+<tag/Description/
+Install a vector font for use. More than one vector font can be loaded,
+but only one can be active. This function is used to tell which one. Call
+with a NULL pointer to uninstall the currently installed font.
+<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="tgi_load_vectorfont" name="tgi_load_vectorfont">,
+<ref id="tgi_free_vectorfont" name="tgi_free_vectorfont">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>tgi_ioctl<label id="tgi_ioctl"><p>
 
 <quote>
 <descrip>
 <tag/Function/Platform dependent code extensions.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/unsigned __fastcall__ tgi_ioctl (unsigned char code, unsigned val);/
+<tag/Declaration/<tt/unsigned __fastcall__ tgi_ioctl (unsigned char code, void* data);/
 <tag/Description/Some platforms have extra display hardware that is not
 supported by standard tgi functions. You can extend the driver to support
 this extra hardware using tgi_ioctl functions.
@@ -5328,12 +6705,12 @@ be used in presence of a prototype.
 <tag/Availability/cc65
 <tag/See also/Other tgi functions.
 <tag/Example/<verb>
-#define tgi_sprite(spr) tgi_ioctl(0, (unsigned)(spr))
-#define tgi_flip() tgi_ioctl(1, 0)
-#define tgi_setbgcolor(bgcol) tgi_ioctl(2, (unsigned)(bgcol))
-#define tgi_setframerate(rate) tgi_ioctl(3, (unsigned)(rate))
-#define tgi_busy() tgi_ioctl(4, 0)
-#define tgi_updatedisplay() tgi_ioctl(4, 1)
+#define tgi_sprite(spr) tgi_ioctl(0, (void*)(spr))
+#define tgi_flip() tgi_ioctl(1, (void*)0)
+#define tgi_setbgcolor(bgcol) tgi_ioctl(2, (void*)(bgcol))
+#define tgi_setframerate(rate) tgi_ioctl(3, (void*)(rate))
+#define tgi_busy() tgi_ioctl(4, (void*)0)
+#define tgi_updatedisplay() tgi_ioctl(4, (void*)1)
 if (!tgi_busy()) {
   tgi_sprite(&amp;background);
   tgi_setcolor(TGI_COLOR_BLUE);
@@ -5344,6 +6721,7 @@ if (!tgi_busy()) {
 </descrip>
 </quote>
 
+
 <sect1>tgi_line<label id="tgi_line"><p>
 
 <quote>
@@ -5364,6 +6742,7 @@ be used in presence of a prototype.
 </descrip>
 </quote>
 
+
 <sect1>tgi_lineto<label id="tgi_lineto"><p>
 
 <quote>
@@ -5384,15 +6763,16 @@ be used in presence of a prototype.
 </descrip>
 </quote>
 
-<sect1>tgi_load<label id="tgi_load"><p>
+
+<sect1>tgi_load_driver<label id="tgi_load_driver"><p>
 
 <quote>
 <descrip>
-<tag/Function/Load and install the matching driver for the given mode.
+<tag/Function/Load and install the given driver.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/void __fastcall__ tgi_load (unsigned char mode);/
-<tag/Description/Load and install the matching driver for the given mode.
-Will just load the driver and check if loading was successul.
+<tag/Declaration/<tt/void __fastcall__ tgi_load_driver (const char *name);/
+<tag/Description/Load and install the driver by name.
+Will just load the driver and check if loading was successful.
 Will not switch to graphics mode.
 <tag/Limits/<itemize>
 <item>The function is only available as fastcall function, so it may only
@@ -5404,28 +6784,31 @@ be used in presence of a prototype.
 </descrip>
 </quote>
 
-<sect1>tgi_load_driver<label id="tgi_load_driver"><p>
+
+<sect1>tgi_load_vectorfont<label id="tgi_load_vectorfont"><p>
 
 <quote>
 <descrip>
-<tag/Function/Load and install the given driver. This function is identical
-to tgi_load with the only difference that the name of the driver is specified
-explicitly.
+<tag/Function/Load the given vector font.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/void __fastcall__ tgi_load_driver (const char *name);/
-<tag/Description/Load and install the driver by name.
-Will just load the driver and check if loading was successul.
-Will not switch to graphics mode.
+<tag/Declaration/<tt/const tgi_vectorfont* __fastcall__ tgi_load_vectorfont (const char* name);/
+<tag/Description/
+Load a vector font into memory and return it. In case of errors, NULL is
+returned and an error is set, which can be retrieved using tgi_geterror.
+To use the font, it has to be installed using tgi_install_vectorfont.
 <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/Other tgi functions.
+<tag/See also/
+<ref id="tgi_install_vectorfont" name="tgi_install_vectorfont">,
+<ref id="tgi_free_vectorfont" name="tgi_free_vectorfont">
 <tag/Example/None.
 </descrip>
 </quote>
 
+
 <sect1>tgi_outtext<label id="tgi_outtext"><p>
 
 <quote>
@@ -5446,6 +6829,7 @@ be used in presence of a prototype.
 </descrip>
 </quote>
 
+
 <sect1>tgi_outtextxy<label id="tgi_outtextxy"><p>
 
 <quote>
@@ -5466,6 +6850,71 @@ be used in presence of a prototype.
 </descrip>
 </quote>
 
+
+<sect1>tgi_pieslice<label id="tgi_pieslice"><p>
+
+<quote>
+<descrip>
+<tag/Function/Draw an elliptic pie slice in the current color.
+<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
+<tag/Declaration/<tt/void __fastcall__ tgi_pie slice (int x, int y,
+unsigned char rx, unsigned char ry, unsigned sa, unsigned ea);/
+<tag/Description/The function draws an elliptic pie slice with center at x/y
+and radii rx/ry using the current drawing color. The pie slice covers the angle
+between sa and ea (startangle and endangle), which must be in the range
+0..360.
+<tag/Limits/<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+<item>The function behaves unexpectedly or may crash if the angles are out
+of range.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="tgi_bar" name="tgi_arc">,
+<ref id="tgi_bar" name="tgi_bar">,
+<ref id="tgi_circle" name="tgi_circle">,
+<ref id="tgi_ellipse" name="tgi_ellipse">,
+<ref id="tgi_setcolor" name="tgi_setcolor">
+<tag/Example/<verb>
+/* Draw the closed upper half of an ellipse */
+tgi_setcolor(TGI_COLOR_BLUE);
+tgi_pieslice (50, 50, 40, 20, 0, 180);
+</verb>
+</descrip>
+</quote>
+
+
+<sect1>tgi_setaspectratio<label id="tgi_setaspectratio"><p>
+
+<quote> <descrip> <tag/Function/Set the pixel aspect ratio.
+<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
+<tag/Declaration/<tt/void __fastcall__ tgi_setaspectratio (unsigned ratio);/
+<tag/Description/The function sets the pixel aspect ratio for the current
+driver and display. The argument is an 8.8 fixed point value. The aspect ratio
+may be used to correct geometric shapes so they look correct on a given
+display. As an example, a circle with a radius of 100 pixels may look elliptic
+on some driver/display combinations if the aspect ratio is not 1.00.
+<tag/Limits/<itemize>
+<item>The aspect ratio is encoded in the TGI driver which assumes a "standard"
+monitor for the given platform. The aspect ratio may be wrong if another
+monitor is used.
+<item>No TGI function will use the aspect ratio. It is up to the programmer to
+make use of it.
+<item>The <tt/tgi_setaspectratio/ function can be used to change the aspect
+ratio for a loaded driver. The value is not reset by <ref id="tgi_init"
+name="tgi_init">, so if a driver is linked statically to an application,
+switching into and out of graphics mode will not restore the original aspect
+ratio.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="tgi_getaspectratio" name="tgi_getaspectratio">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>tgi_setcolor<label id="tgi_setcolor"><p>
 
 <quote>
@@ -5585,14 +7034,14 @@ tgi_setviewpage(0); // Show page 0
 </descrip>
 </quote>
 
-<sect1>tgi_textheight<label id="tgi_textheight"><p>
+<sect1>tgi_gettextheight<label id="tgi_gettextheight"><p>
 
 <quote>
 <descrip>
 <tag/Function/Calculate the height of the text in pixels according to
 the current text style.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/unsigned __fastcall__ tgi_textheight (const char* s);/
+<tag/Declaration/<tt/unsigned __fastcall__ tgi_gettextheight (const char* s);/
 <tag/Description/Calculate the height of the text in pixels according to
 the current text style.
 <tag/Limits/<itemize>
@@ -5605,35 +7054,54 @@ be used in presence of a prototype.
 </descrip>
 </quote>
 
-<sect1>tgi_textstyle<label id="tgi_textstyle"><p>
+<sect1>tgi_settextscale<label id="tgi_settextscale"><p>
+
+<quote>
+<descrip>
+<tag/Function/Set the scaling for text output.
+<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
+<tag/Declaration/<tt/void __fastcall__ tgi_settextscale (unsigned width, unsigned height);/
+<tag/Description/
+Set the scaling for text output. The scaling factors for width and height
+are 8.8 fixed point values. This means that $100 = 1 $200 = 2 etc.
+<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="tgi_settextstyle" name="tgi_settextstyle">
+<tag/Example/None.
+</descrip>
+</quote>
+
+<sect1>tgi_settextstyle<label id="tgi_settextstyle"><p>
 
 <quote>
 <descrip>
 <tag/Function/Set the style for text output.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/void __fastcall__ tgi_textstyle (unsigned char magx, unsigned char magy, unsigned char dir);/
+<tag/Declaration/<tt/void __fastcall__ tgi_settextstyle (unsigned char magx, unsigned char magy, unsigned char dir, unsigned char font);/
 <tag/Description/Set the style for text output.
 <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/Other tgi functions.
+<tag/See also/
+<ref id="tgi_settextscale" name="tgi_settextscale">
 <tag/Example/None.
 </descrip>
 </quote>
 
-<sect1>tgi_textwidth<label id="tgi_textwidth"><p>
+<sect1>tgi_gettextwidth<label id="tgi_gettextwidth"><p>
 
 <quote>
 <descrip>
 <tag/Function/Calculate the width of the text in pixels according to the current text style.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/unsigned __fastcall__ tgi_textwidth (const char* s);/
-<tag/Function/Calculate the width of the text in pixels according to the current text style.
-<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
+<tag/Declaration/<tt/unsigned __fastcall__ tgi_gettextwidth (const char* s);/
 <tag/Description/Calculate the width of the text in pixels according to the current text style.
-<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
 <tag/Limits/<itemize>
 <item>The function is only available as fastcall function, so it may only
 be used in presence of a prototype.
@@ -5651,13 +7119,9 @@ be used in presence of a prototype.
 <tag/Function/Uninstall the currently loaded driver but do not unload it.
 Will call tgi_done if necessary.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/void __fastcall__ tgi_uninstall (void);/
+<tag/Declaration/<tt/void tgi_uninstall (void);/
 <tag/Description/Uninstall the currently loaded driver but do not unload it.
 Will call tgi_done if necessary.
-<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/Other tgi functions.
 <tag/Example/None.
@@ -5671,13 +7135,9 @@ be used in presence of a prototype.
 <tag/Function/Uninstall, then unload the currently loaded driver.
 Will call tgi_done if necessary.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/void __fastcall__ tgi_unload (void);/
+<tag/Declaration/<tt/void tgi_unload (void);/
 <tag/Description/Uninstall, then unload the currently loaded driver.
 Will call tgi_done if necessary.
-<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/Other tgi functions.
 <tag/Example/None.
@@ -5702,6 +7162,8 @@ only be used in presence of a prototype.
 returned value may not be valid.
 </itemize>
 <tag/Availability/ISO 9899
+<tag/See also/
+<ref id="clock" name="clock">
 <tag/Example/None.
 </descrip>
 </quote>