]> git.sur5r.net Git - cc65/blobdiff - doc/funcref.sgml
Documented the new mouse_setbox() and mouse_getbox functions.
[cc65] / doc / funcref.sgml
index 8055285cb590b16fde96738de5d13df54f6dca81..ccb15df9b6945406d3f5802699b42c639805dd53 100644 (file)
@@ -64,12 +64,23 @@ function.
 
 <sect1><tt/apple2.h/<label id="apple2.h"><p>
 
-(incomplete)
+<itemize>
+<item>_dos_type
+<item><ref id="get_ostype" name="get_ostype">
+<item>rebootafterexit
+</itemize>
 
 
 <sect1><tt/apple2enh.h/<label id="apple2enh.h"><p>
 
-(incomplete)
+<itemize>
+<item>_dos_type
+<item><ref id="get_ostype" name="get_ostype">
+<item>rebootafterexit
+<item>textframe
+<item>textframexy
+<item><ref id="videomode" name="videomode">
+</itemize>
 
 
 <sect1><tt/assert.h/<label id="assert.h"><p>
@@ -81,6 +92,10 @@ function.
 
 <sect1><tt/atari.h/<label id="atari.h"><p>
 
+<itemize>
+<item><ref id="get_ostype" name="get_ostype">
+</itemize>
+
 (incomplete)
 
 
@@ -94,8 +109,9 @@ function.
 <itemize>
 <item><ref id="c64mode" name="c64mode">
 <item><ref id="fast" name="fast">
-<item><ref id="toggle_videomode" name="toggle_videomode">
 <item><ref id="slow" name="slow">
+<item><ref id="toggle_videomode" name="toggle_videomode">
+<item><ref id="videomode" name="videomode">
 </itemize>
 
 
@@ -106,17 +122,29 @@ function.
 
 <sect1><tt/c64.h/<label id="c64.h"><p>
 
-(incomplete)
+<itemize>
+<item><ref id="get_ostype" name="get_ostype">
+</itemize>
 
 
 <sect1><tt/cbm510.h/<label id="cbm510.h"><p>
 
-(incomplete)
+<itemize>
+<item><ref id="peekbsys" name="peekbsys">
+<item><ref id="peekwsys" name="peekwsys">
+<item><ref id="pokebsys" name="pokebsys">
+<item><ref id="pokewsys" name="pokewsys">
+</itemize>
 
 
 <sect1><tt/cbm610.h/<label id="cbm610.h"><p>
 
-(incomplete)
+<itemize>
+<item><ref id="peekbsys" name="peekbsys">
+<item><ref id="peekwsys" name="peekwsys">
+<item><ref id="pokebsys" name="pokebsys">
+<item><ref id="pokewsys" name="pokewsys">
+</itemize>
 
 
 <sect1><tt/conio.h/<label id="conio.h"><p>
@@ -188,9 +216,11 @@ function.
 <item><ref id="em_commit" name="em_commit">
 <item><ref id="em_copyfrom" name="em_copyfrom">
 <item><ref id="em_copyto" name="em_copyto">
+<item><ref id="em_install" name="em_install">
 <item><ref id="em_load_driver" name="em_load_driver">
 <item><ref id="em_map" name="em_map">
 <item><ref id="em_pagecount" name="em_pagecount">
+<item><ref id="em_uninstall" name="em_uninstall">
 <item><ref id="em_unload" name="em_unload">
 <item><ref id="em_use" name="em_use">
 </itemize>
@@ -245,23 +275,24 @@ 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_box" name="mouse_box"> -->
-<!-- <item><ref id="mouse_move" name="mouse_move"> -->
-<!-- <item><ref id="mouse_buttons" name="mouse_buttons"> -->
-<!-- <item><ref id="mouse_pos" name="mouse_pos"> -->
-<!-- <item><ref id="mouse_info" name="mouse_info"> -->
-<!-- <item><ref id="mouse_ioctl" name="mouse_ioctl"> -->
-<!-- </itemize> -->
+<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_info" name="mouse_info">
+<item><ref id="mouse_ioctl" name="mouse_ioctl">
+</itemize>
 
 (incomplete)
-
+                                          
 
 <sect1><tt/nes.h/<label id="nes.h"><p>
 
@@ -362,7 +393,6 @@ It does not declare any functions.
 <!-- <item><ref id="fgetpos" name="fgetpos"> -->
 <!-- <item><ref id="fgets" name="fgets"> -->
 <item><ref id="fileno" name="fileno">
-<!-- <item><ref id="flushall" name="flushall"> -->
 <!-- <item><ref id="fopen" name="fopen"> -->
 <!-- <item><ref id="fprintf" name="fprintf"> -->
 <!-- <item><ref id="fputc" name="fputc"> -->
@@ -381,7 +411,8 @@ It does not declare any functions.
 <!-- <item><ref id="putc" name="putc"> -->
 <!-- <item><ref id="putchar" name="putchar"> -->
 <!-- <item><ref id="puts" name="puts"> -->
-<!-- <item><ref id="rename" name="rename"> -->
+<item><ref id="rename" name="rename">
+<item><ref id="remove" name="remove">
 <!-- <item><ref id="rewind" name="rewind"> -->
 <!-- <item><ref id="scanf" name="scanf"> -->
 <!-- <item><ref id="sprintf" name="sprintf"> -->
@@ -426,7 +457,6 @@ It does not declare any functions.
 <item><ref id="qsort" name="qsort">
 <item><ref id="rand" name="rand">
 <item><ref id="realloc" name="realloc">
-<item><ref id="remove" name="remove">
 <item><ref id="srand" name="srand">
 <item><ref id="ultoa" name="ultoa">
 <item><ref id="utoa" name="utoa">
@@ -461,8 +491,8 @@ It does not declare any functions.
 <item><ref id="strrchr" name="strrchr">
 <item><ref id="strspn" name="strspn">
 <item><ref id="strstr" name="strstr">
-<!-- <item><ref id="strtok" name="strtok"> -->
-<!-- <item><ref id="strxfrm" name="strxfrm"> -->
+<item><ref id="strtok" name="strtok">
+<item><ref id="strxfrm" name="strxfrm">
 <item><ref id="strupper" name="strupper">
 <item><ref id="strupr" name="strupr">
 </itemize>
@@ -785,8 +815,8 @@ is present.
 <tag/Header/<tt/<ref id="6502.h" name="6502.h">/
 <tag/Declaration/<tt/void CLI (void);/
 <tag/Description/The function will insert a 6502 CLI instruction into the code,
-so interrupts are disabled. Note that non maskable interrupts cannot be
-disabled.
+so interrupts are enabled. Enabling interrupts has no effects if they are
+already enabled (the default).
 <tag/Limits/<itemize>
 <item>The function is actually a macro.
 <item>Disabling interrupts may lead to unexpected results.
@@ -906,10 +936,11 @@ depend of the address expression used.
 <tag/Header/<tt/<ref id="6502.h" name="6502.h">/
 <tag/Declaration/<tt/void SEI (void);/
 <tag/Description/The function will insert a 6502 SEI instruction into the code,
-so interrupts are enabled. Enabling interrupts has no effects if they are
-already enabled (the default).
+so interrupts are disabled. Note that non maskable interrupts cannot be
+disabled.
 <tag/Limits/<itemize>
 <item>The function is actually a macro.
+<item>Disabling interrupts may lead to unexpected results.
 </itemize>
 <tag/Availability/cc65
 <tag/See also/
@@ -1754,6 +1785,32 @@ loaded.
 </quote>
 
 
+<sect1>em_install<label id="em_install"><p>
+
+<quote>
+<descrip>
+<tag/Function/Install an already loaded extended memory driver.
+<tag/Header/<tt/<ref id="em.h" name="em.h">/
+<tag/Declaration/<tt/unsigned char _fastcall__ em_install (void* driver);/
+<tag/Description/The function installs an already loaded extended memory driver
+and returns an error code. The function may be used to install a driver linked
+statically to the program.
+<tag/Limits/<itemize>
+<item>Not all drivers are able to detect if the supported hardware is really
+present.
+<item>The function is only available as fastcall function, so it may only be
+used in presence of a prototype.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="em_load_driver" name="em_load_driver">,
+<ref id="em_uninstall" name="em_uninstall">,
+<ref id="em_unload" name="em_unload">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>em_load_driver<label id="em_load_driver"><p>
 
 <quote>
@@ -1791,7 +1848,7 @@ extended memory that should be supported. There is no autodetect capability.
 memory and returns a pointer to the page frame. Depending on the hardware
 and driver, the data is either mapped into the address space or transfered
 into a buffer. If you don't need the actual contents of the page (for example
-because you're going to overwrite it completely, it is better to call
+because you're going to overwrite it completely), it is better to call
 <tt/<ref id="em_use" name="em_use">/ instead. <tt/em_use/ will not transfer the
 data if it is possible to avoid that.
 <tag/Limits/<itemize>
@@ -1834,13 +1891,40 @@ by the driver in 256 byte pages.
 </quote>
 
 
+<sect1>em_uninstall<label id="em_uninstall"><p>
+
+<quote>
+<descrip>
+<tag/Function/Uninstall an already loaded extended memory driver.
+<tag/Header/<tt/<ref id="em.h" name="em.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ em_install (void);/
+<tag/Description/The function uninstalls an already loaded extended memory
+driver but doesn't remove it from memory.
+<tag/Limits/<itemize>
+<item>If the driver has been loaded using <tt/<ref id="em_load_driver"
+name="em_load_driver">/, <tt/<ref id="em_unload" name="em_unload">/
+should be used instead of <tt/em_uninstall/ so the driver is also removed
+from memory.
+<item>The function is only available as fastcall function, so it may only be
+used in presence of a prototype.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="em_install" name="em_install">,
+<ref id="em_load_driver" name="em_load_driver">,
+<ref id="em_unload" name="em_unload">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>em_unload<label id="em_unload"><p>
 
 <quote>
 <descrip>
 <tag/Function/Unload an extended memory driver.
 <tag/Header/<tt/<ref id="em.h" name="em.h">/
-<tag/Declaration/<tt/void __fastcall__ em_unload (void);/
+<tag/Declaration/<tt/unsigned char __fastcall__ em_unload (void);/
 <tag/Description/The function unloads a loaded extended memory driver and
 frees all memory allocated for the driver.
 <tag/Limits/<itemize>
@@ -1929,7 +2013,8 @@ will nearly double the speed compared to slow mode.
 <tag/Availability/C128
 <tag/See also/
 <ref id="slow" name="slow">,
-<ref id="toggle_videomode" name="toggle_videomode">
+<ref id="toggle_videomode" name="toggle_videomode">,
+<ref id="videomode" name="videomode">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -2040,6 +2125,28 @@ be used in presence of a prototype.
 </quote>
 
 
+<sect1>get_ostype<label id="get_ostype"><p>
+
+<quote>
+<descrip>
+<tag/Function/The function returns the operating system, the program runs on.
+<tag/Header/<tt/<ref id="apple2.h" name="apple2.h">,
+<ref id="atari.h" name="atari.h">, <ref id="c64.h" name="c64.h">/
+<tag/Declaration/<tt/unsigned char get_ostype (void);/
+<tag/Description/<tt/get_ostype/ is machine dependent and does not exist for
+all supported targets. If it exists, it returns a number that identifies the
+operating system or machine type, the program runs on. The machine dependent
+header files define constants that can be used to check the return code.
+<tag/Limits/<itemize>
+<item>The function does not exist on all platforms.
+<item>The return codes are platform dependent.
+</itemize>
+<tag/Availability/cc65 (not all platforms)
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>getenv<label id="getenv"><p>
 
 <quote>
@@ -2825,7 +2932,7 @@ used in presence of a prototype.
 <tag/Header/<tt/<ref id="joystick.h" name="joystick.h">/
 <tag/Declaration/<tt/unsigned char __fastcall__ joy_unload (void);/
 <tag/Description/The function uninstalls the currently installed joystick
-driver and removes it from memory. An error code is returned, which is 
+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"
@@ -3147,6 +3254,365 @@ relocatable o65 modules for use with this function.
 </quote>
 
 
+<sect1>mouse_setbox<label id="mouse_setbox"><p>
+
+<quote>
+<descrip>
+<tag/Function/Specify a bounding box for the mouse cursor.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/void __fastcall__ mouse_setbox (const struct mouse_box* box);/
+<tag/Description/The function allows to set a bounding box for mouse movement.
+<tag/Limits/<itemize>
+<item>The function does not check if the mouse cursor is currently within the
+given rectangle. Placing the mouse cursor within the bounding box is the
+responsibility of the programmer.
+<item>While the bounding box may be larger than the actual screen size, the
+standard mouse cursor draw routines may fail to set the cursor to coordinates
+outside of the screen area. Depending on the platform, you may have to supply
+your own mouse cursor routines.
+<item>The function is only available as fastcall function, so it may only be
+used in presence of a prototype.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="mouse_getbox" name="mouse_getbox">,
+<ref id="mouse_move" name="mouse_move">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_getbox<label id="mouse_getbox"><p>
+
+<quote>
+<descrip>
+<tag/Function/Return the current bounding box for the mouse cursor.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/void __fastcall__ mouse_getbox (struct mouse_box* box);/
+<tag/Description/The function queries the current bounding box for mouse 
+movement.
+<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_move" name="mouse_move">,
+<ref id="mouse_setbox" name="mouse_setbox">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_buttons<label id="mouse_buttons"><p>
+
+<quote>
+<descrip>
+<tag/Function/Return a bit mask encoding the state of the mouse buttons.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ mouse_buttons (void);/
+<tag/Description/The function returns a bit mask that encodes the state of the
+mouse buttons. You may use the <tt/MOUSE_BTN_XXX/ flags to decode the function
+return value.
+<tag/Limits/<itemize>
+<item>The function is only available as fastcall function, so it may only be
+used in presence of a prototype.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="mouse_info" name="mouse_info">,
+<ref id="mouse_pos" name="mouse_pos">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_geterrormsg<label id="mouse_geterrormsg"><p>
+
+<quote>
+<descrip>
+<tag/Function/Return a readable error message for an error code.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/const char* __fastcall__ mouse_geterrormsg (unsigned char
+code);/
+<tag/Description/The function returns an error message (in english) for the
+error code passed parameter.
+<tag/Limits/<itemize>
+<item>The function will return "Unknown error" for invalid error codes.
+<item>The function is only available as fastcall function, so it may only be
+used in presence of a prototype.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="mouse_load_driver" name="mouse_load_driver">,
+<ref id="mouse_uninstall" name="mouse_uninstall">,
+<ref id="mouse_unload" name="mouse_unload">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_hide<label id="mouse_hide"><p>
+
+<quote>
+<descrip>
+<tag/Function/Hide the mouse pointer.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/void __fastcall__ mouse_hide (void);/
+<tag/Description/The function hides the mouse pointer. It manages a counter
+that is shared between <tt/<ref id="mouse_show" name="mouse_show">/ and
+<tt/mouse_hide/ so that every call call to <tt/mouse_hide/ must be followed by
+a call to <tt/<ref id="mouse_show" name="mouse_show">/ to make the mouse cursor
+visible.
+<tag/Limits/<itemize>
+<item>The function is only available as fastcall function, so it may only be
+used in presence of a prototype.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="mouse_show" name="mouse_show">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_info<label id="mouse_info"><p>
+
+<quote>
+<descrip>
+<tag/Function/Return the state of the mouse buttons and the position of the
+mouse.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/void __fastcall__ mouse_info (struct mouse_info* info);/
+<tag/Description/The function returns the state of the mouse buttons and the
+position of the mouse in the <tt/mouse_info/ structure passed as parameter.
+<tag/Limits/<itemize>
+<item>The <tt/mouse_info/ struct is a superset of the <tt/mouse_pos/ struct,
+so if you just need the mouse position, call <tt/<ref id="mouse_pos"
+name="mouse_pos">/ instead.
+<item>The function is only available as fastcall function, so it may only be
+used in presence of a prototype.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="mouse_buttons" name="mouse_buttons">,
+<ref id="mouse_pos" name="mouse_pos">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_install<label id="mouse_install"><p>
+
+<quote>
+<descrip>
+<tag/Function/Install an already loaded mouse driver.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ mouse_install (const struct
+mouse_callbacks* c, void* driver);/
+<tag/Description/The function installs an already loaded mouse driver and
+returns an error code. The <tt/mouse_callbacks/ structure passed as first
+parameter contains pointers to routines needed to move or hide/show the mouse
+pointer. Defaults for these routines are supplied by the library, so if you
+can live with these defaults (which are platform specific), just pass a
+pointer to <tt/mouse_def_callbacks/. The function may be used to install a
+driver linked statically to the program.
+<tag/Limits/<itemize>
+<item>Not all drivers are able to detect if the supported hardware is really
+present.
+<item>After installing a driver, the mouse cursor is hidden.
+<item>The function is only available as fastcall function, so it may only be
+used in presence of a prototype.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="mouse_load_driver" name="mouse_load_driver">,
+<ref id="mouse_uninstall" name="mouse_uninstall">,
+<ref id="mouse_unload" name="mouse_unload">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_ioctl<label id="mouse_ioctl"><p>
+
+<quote>
+<descrip>
+<tag/Function/Call the driver specific ioctl function.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ mouse_ioctl (unsigned char code, void* data);/
+<tag/Description/The function calls the IOCTL entry in the mouse driver,
+which is driver specific. The <tt/code/ parameter will choose between
+different IOCTL functions, and the <tt/data/ depends on code. The
+function returns an error code. The purpose of this function is to allow
+for driver specific extensions. See the documentation for a specific mouse
+driver for supported ioctl calls.
+<tag/Limits/<itemize>
+<item>Calling this function is non portable, because each driver may
+implement different ioctl calls (or none at all).
+<item>The function is only available as fastcall function, so it may only be
+used in presence of a prototype.
+</itemize>
+<tag/Availability/cc65
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_load_driver<label id="mouse_load_driver"><p>
+
+<quote>
+<descrip>
+<tag/Function/Load and initialize a mouse driver.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ mouse_load_driver (const struct
+mouse_callbacks* c, const char* driver);/
+<tag/Description/Load a mouse driver into memory and initialize it. The
+function returns an error code that tells if the call has been successful. The
+<tt/mouse_callbacks/ structure passed as first parameter contains pointers to
+routines needed to move or hide/show the mouse pointer. Defaults for these
+routines are supplied by the library, so if you can live with these defaults
+(which are platform specific), just pass a pointer to <tt/mouse_def_callbacks/.
+<tag/Limits/<itemize>
+<item>The driver is loaded by name, so currently you must know the type of
+mouse that should be supported. There is no autodetect capability.
+<item>Not all drivers are able to detect if the supported hardware is really
+present.
+<item>After installing a driver, the mouse cursor is hidden.
+<item>The function is only available as fastcall function, so it may only be
+used in presence of a prototype.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="mouse_install" name="mouse_install">,
+<ref id="mouse_uninstall" name="mouse_uninstall">,
+<ref id="mouse_unload" name="mouse_unload">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_move<label id="mouse_move"><p>
+
+<quote>
+<descrip>
+<tag/Function/Move the mouse cursor to a specific position.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/void __fastcall__ mouse_move (int x, int y);/
+<tag/Description/The function updates the mouse position. If the mouse cursor
+is visible, it is shown at the new position.
+<tag/Limits/<itemize>
+<item>The function does not check if the new position is within the bounding
+box specified with <tt/<ref id="mouse_setbox" name="mouse_setbox">/.
+<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_getbox" name="mouse_getbox">,
+<ref id="mouse_setbox" name="mouse_setbox">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_pos<label id="mouse_pos"><p>
+
+<quote>
+<descrip>
+<tag/Function/Return the position of the mouse.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/void __fastcall__ mouse_pos (struct mouse_pos* pos);/
+<tag/Description/The function returns the position of the mouse in the
+<tt/mouse_pos/ structure passed as parameter.
+<tag/Limits/<itemize>
+<item>The <tt/mouse_pos/ struct is a subset of the <tt/mouse_info/ struct,
+so if you do also need the mouse buttons, call <tt/<ref id="mouse_info"
+name="mouse_info">/ instead.
+<item>The function is only available as fastcall function, so it may only be
+used in presence of a prototype.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="mouse_buttons" name="mouse_buttons">,
+<ref id="mouse_info" name="mouse_info">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_show<label id="mouse_show"><p>
+
+<quote>
+<descrip>
+<tag/Function/Show the mouse pointer.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/void __fastcall__ mouse_show (void);/
+<tag/Description/The function shows the mouse pointer. It manages a counter
+that is shared between <tt/<ref id="mouse_hide" name="mouse_hide">/ and
+<tt/mouse_show/. The mouse cursor is visible if there was one more call to
+<tt/mouse_show/ than to <tt/<ref id="mouse_hide" name="mouse_hide">/.
+<tag/Limits/<itemize>
+<item>The function is only available as fastcall function, so it may only be
+used in presence of a prototype.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="mouse_hide" name="mouse_hide">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_uninstall<label id="mouse_uninstall"><p>
+
+<quote>
+<descrip>
+<tag/Function/Uninstall an already loaded mouse driver.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ mouse_install (void);/
+<tag/Description/The function uninstalls an already loaded mouse driver but
+don't removes it from memory.
+<tag/Limits/<itemize>
+<item>If the driver has been loaded using <tt/<ref id="mouse_load_driver"
+name="mouse_load_driver">/, <tt/<ref id="mouse_unload" name="mouse_unload">/
+should be used instead of <tt/mouse_uninstall/ so the driver is also removed
+from memory.
+<item>The function is only available as fastcall function, so it may only be
+used in presence of a prototype.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="mouse_install" name="mouse_install">,
+<ref id="mouse_load_driver" name="mouse_load_driver">,
+<ref id="mouse_unload" name="mouse_unload">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>mouse_unload<label id="mouse_unload"><p>
+
+<quote>
+<descrip>
+<tag/Function/Unload a mouse driver.
+<tag/Header/<tt/<ref id="mouse.h" name="mouse.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ mouse_unload (void);/
+<tag/Description/The function unloads a loaded mouse driver and frees all
+memory allocated for the driver.
+<tag/Limits/<itemize>
+<item>The function does nothing if no driver is loaded.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="mouse_install" name="mouse_install">,
+<ref id="mouse_load_driver" name="mouse_load_driver">,
+<ref id="mouse_uninstall" name="mouse_uninstall">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>offsetof<label id="offsetof"><p>
 
 <quote>
@@ -3189,6 +3655,65 @@ cc65 allows to pass this argument, it is ignored.
 </quote>
 
 
+<sect1>peekbsys<label id="peekbsys"><p>
+
+<quote>
+<descrip>
+<tag/Function/Read one byte from a location in the system bank.
+<tag/Header/<tt/<ref id="cbm610.h" name="cbm610.h">/,
+<tt/<ref id="cbm510.h" name="cbm510.h">/
+<tag/Declaration/<tt/unsigned char __fastcall__ peekbsys (unsigned addr);/
+<tag/Description/<tt/peekbsys/ reads one byte from the given address in the
+system bank (bank 15) of the CBM PET-II machines and returns it.
+<tag/Limits/
+<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+<item>This function may be a macro depending on the compiler options. The
+actual function is accessible by #undef'ing the macro.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="PEEK" name="PEEK">,
+<ref id="PEEKW" name="PEEKW">,
+<ref id="peekwsys" name="peekwsys">,
+<ref id="pokebsys" name="pokebsys">,
+<ref id="pokewsys" name="pokewsys">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>peekwsys<label id="peekwsys"><p>
+
+<quote>
+<descrip>
+<tag/Function/Read one word from a location in the system bank.
+<tag/Header/<tt/<ref id="cbm610.h" name="cbm610.h">/,
+<tt/<ref id="cbm510.h" name="cbm510.h">/
+<tag/Declaration/<tt/unsigned __fastcall__ peekwsys (unsigned addr);/
+<tag/Description/<tt/peekwsys/ reads one word from the given address in the
+system bank (bank 15) of the CBM PET-II machines and returns it. Following
+the usual 6502 conventions, the low byte is read from <tt/addr/, and the
+high byte is read from <tt/addr+1/.
+<tag/Limits/
+<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+<item>The order in which the two bytes are read is undefined.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="PEEK" name="PEEK">,
+<ref id="PEEKW" name="PEEKW">,
+<ref id="peekbsys" name="peekbsys">,
+<ref id="pokebsys" name="pokebsys">,
+<ref id="pokewsys" name="pokewsys">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>perror<label id="perror"><p>
 
 <quote>
@@ -3209,7 +3734,64 @@ be used in presence of a prototype.
 <tag/Availability/ISO 9899
 <tag/See also/
 <ref id="_poserror" name="_poserror">,
-<ref id="strerror" name="strerror">,
+<ref id="strerror" name="strerror">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>pokebsys<label id="pokebsys"><p>
+
+<quote>
+<descrip>
+<tag/Function/Write one byte to a location in the system bank.
+<tag/Header/<tt/<ref id="cbm610.h" name="cbm610.h">/,
+<tt/<ref id="cbm510.h" name="cbm510.h">/
+<tag/Declaration/<tt/void __fastcall__ pokebsys (unsigned addr, unsigned char val);/
+<tag/Description/<tt/pokebsys/ writes one byte to the given address in the
+system bank (bank 15) of the CBM PET-II machines.
+<tag/Limits/
+<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="POKE" name="POKE">,
+<ref id="POKEW" name="POKEW">,
+<ref id="peekbsys" name="peekbsys">,
+<ref id="peekwsys" name="peekwsys">,
+<ref id="pokewsys" name="pokewsys">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>pokewsys<label id="pokewsys"><p>
+
+<quote>
+<descrip>
+<tag/Function/Write one word to a location in the system bank.
+<tag/Header/<tt/<ref id="cbm610.h" name="cbm610.h">/,
+<tt/<ref id="cbm510.h" name="cbm510.h">/
+<tag/Declaration/<tt/void __fastcall__ pokewsys (unsigned addr, unsigned val);/
+<tag/Description/<tt/pokewsys/ writes one word to the given address in the
+system bank (bank 15) of the CBM PET-II machines. Following the usual 6502
+conventions, the low byte of <tt/val/ is written to <tt/addr/, and the
+high byte is written to <tt/addr+1/.
+<tag/Limits/
+<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+<item>The order in which the two bytes are written is undefined.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/
+<ref id="POKE" name="POKE">,
+<ref id="POKEW" name="POKEW">,
+<ref id="peekbsys" name="peekbsys">,
+<ref id="peekwsys" name="peekwsys">,
+<ref id="pokebsys" name="pokebsys">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -3349,8 +3931,10 @@ be used in presence of a prototype.
 </itemize>
 <tag/Availability/ISO 9899
 <tag/See also/
+<ref id="rename" name="rename">,
 <ref id="unlink" name="unlink">
 <tag/Example/
+<verb>
 #include &lt;stdio.h&gt;
 
 #define FILENAME "helloworld"
@@ -3360,6 +3944,44 @@ if (remove (FILENAME) == 0) {
 } else {
     printf ("There was a problem deleting %s\n", FILENAME);
 }
+</verb>
+</descrip>
+</quote>
+
+
+<sect1>rename<label id="rename"><p>
+
+<quote>
+<descrip>
+<tag/Function/Rename a file.
+<tag/Header/<tt/<ref id="stdio.h" name="stdio.h">/
+<tag/Declaration/<tt/int __fastcall__ rename (const char* oldname, const char* newname);/
+<tag/Description/<tt/rename/ renames a file (gives it a new name). On success,
+zero is returned. On error, -1 is returned and <tt/errno/ is set to an error
+code describing the reason for the failure.
+<tag/Limits/
+<itemize>
+<item>This function is not available on all cc65 targets (depends on the
+capabilities of the storage devices).
+<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="remove" name="remove">
+<tag/Example/
+<verb>
+#include &lt;stdio.h&gt;
+
+#define OLDNAME "textfile.txt"
+#define NEWNAME "textfile.bak"
+
+if (rename (OLDNAME, NEWNAME) == 0) {
+    printf ("Renamed %s to %s\n", OLDNAME, NEWNAME);
+} else {
+    printf ("Error renaming %s to %s\n", OLDNAME, NEWNAME);
+}
+</verb>
 </descrip>
 </quote>
 
@@ -3514,6 +4136,7 @@ different locale has no effect.
 <tag/See also/
 <ref id="localeconv" name="localeconv">,
 <ref id="strcoll" name="strcoll">
+<ref id="strxfrm" name="strxfrm">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -3578,7 +4201,8 @@ will halve the speed compared to fast mode.
 <tag/Availability/C128
 <tag/See also/
 <ref id="fast" name="fast">,
-<ref id="toggle_videomode" name="toggle_videomode">
+<ref id="toggle_videomode" name="toggle_videomode">,
+<ref id="videomode" name="videomode">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -3629,6 +4253,7 @@ be used in presence of a prototype.
 <ref id="strcoll" name="strcoll">,
 <ref id="stricmp" name="stricmp">,
 <ref id="strncmp" name="strncmp">
+<ref id="strxfrm" name="strxfrm">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -3706,6 +4331,7 @@ be used in presence of a prototype.
 <ref id="strcoll" name="strcoll">,
 <ref id="stricmp" name="stricmp">,
 <ref id="strncmp" name="strncmp">
+<ref id="strxfrm" name="strxfrm">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -3734,6 +4360,7 @@ be used in presence of a prototype.
 <ref id="strcmp" name="strcmp">,
 <ref id="stricmp" name="stricmp">,
 <ref id="strncmp" name="strncmp">
+<ref id="strxfrm" name="strxfrm">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -3789,7 +4416,8 @@ be used in presence of a prototype.
 <tag/Availability/ISO 9899
 <tag/See also/
 <ref id="strspn" name="strspn">,
-<ref id="strstr" name="strstr">
+<ref id="strstr" name="strstr">,
+<ref id="strtok" name="strtok">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -3867,6 +4495,7 @@ be used in presence of a prototype.
 <ref id="strcmp" name="strcmp">,
 <ref id="strcoll" name="strcoll">,
 <ref id="strncmp" name="strncmp">
+<ref id="strxfrm" name="strxfrm">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -3975,6 +4604,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="strxfrm" name="strxfrm">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -4086,6 +4716,66 @@ be used in presence of a prototype.
 </quote>
 
 
+<sect1>strtok<label id="strtok"><p>
+
+<quote>
+<descrip>
+<tag/Function/Break a string into tokens.
+<tag/Header/<tt/<ref id="string.h" name="string.h">/
+<tag/Declaration/<tt/char* __fastcall__ strtok (char* s1, const char* s2);/
+<tag/Description/<tt/strtok/ will break the string s1 into a sequence of
+tokens, which are delimited by characters from the string s2. The first call
+to <tt/strtok/ will return a pointer to the first token in the string s1.
+Following calls must pass a <tt/NULL/ pointer as s1 in order to get the next
+token in the string. Different sets of delimiters may be used for the
+subsequent calls to <tt/strtok/.
+<tag/Limits/<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+<item><tt/strtok/ will modify the string s1.
+</itemize>
+<tag/Availability/ISO 9899
+<tag/See also/
+<ref id="strcspn" name="strcspn">,
+<!-- <ref id="strpbrk" name="strpbrk"> -->
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>strxfrm<label id="strxfrm"><p>
+
+<quote>
+<descrip>
+<tag/Function/Transform a string.
+<tag/Header/<tt/<ref id="string.h" name="string.h">/
+<tag/Declaration/<tt/size_t __fastcall__ strxfrm (char* s1, const char* s2, size_t n);/
+<tag/Description/The <tt/strxfrm/ function transforms the string pointed to by
+s2 and places the resulting string into the string pointed to by s1. The
+transformation is such that if the <tt/strcmp/ function is applied to two
+transformed strings, it returns a value greater than, equal to, or less than
+zero, corresponding to the result of the <tt/strcoll/ function applied to the
+same two original strings. No more than n characters are placed into the
+resulting array pointed to by s1, including the terminating null character.
+<tag/Limits/<itemize>
+<item><tt/s1/ and <tt/s2/ must not point to the same memory area, otherwise
+the behaviour is undefined.
+<item>If <tt/n/ is zero, <tt/s1/ may be a NULL pointer.
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+<item>Since cc65 doesn't support different charcter sets, <tt/strxfrm/ will
+just copy s2 to s1 using <tt><ref id="strncpy" name="strncpy"></tt>.
+</itemize>
+<tag/Availability/ISO 9899
+<tag/See also/
+<ref id="strcmp" name="strcmp">,
+<ref id="strcoll" name="strcoll">,
+<ref id="strncpy" name="strncpy">,
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>strupper<label id="strupper"><p>
 
 <quote>
@@ -4177,11 +4867,14 @@ old mode (cursor position, color and so on) are saved and restored together
 with the mode.
 <tag/Limits/<itemize>
 <item>The function is specific to the C128.
+<item>This function is deprecated. Please use <ref id="videomode"
+name="videomode"> instead!
 </itemize>
 <tag/Availability/C128
 <tag/See also/
 <ref id="fast" name="fast">,
-<ref id="slow" name="slow">
+<ref id="slow" name="slow">,
+<ref id="videomode" name="videomode">
 <tag/Example/None.
 </descrip>
 </quote>
@@ -4287,6 +4980,7 @@ to the ISO C standard.
 <tag/See also/
 <ref id="remove" name="remove">
 <tag/Example/
+<verb>
 #include &lt;stdio.h&gt;
 #include &lt;unistd.h&gt;
 
@@ -4297,6 +4991,7 @@ if (unlink (FILENAME) == 0) {
 } else {
     printf ("There was a problem deleting %s\n", FILENAME);
 }
+</verb>
 </descrip>
 </quote>
 
@@ -4358,6 +5053,34 @@ used in presence of a prototype.
 </quote>
 
 
+<sect1>videomode<label id="videomode"><p>
+
+<quote>
+<descrip>
+<tag/Function/Switch to either 40 or 80 column mode.
+<tag/Header/<tt/<ref id="apple2enh.h" name="apple2enh.h">,
+<ref id="c128.h" name="c128.h">/
+<tag/Declaration/<tt/unsigned __fastcall__ videomode (unsigned Mode);/
+<tag/Description/Switch to 40 or 80 column mode depending on the argument. If
+the requested mode is already active, nothing happens. The old mode is returned
+from the call.
+<tag/Limits/<itemize>
+<item>The function is specific to the C128 and enhanced Apple //e.
+<item>This function replaces <ref id="toggle_videomode"
+name="toggle_videomode">.
+<item>The function is only available as fastcall function, so it may only be
+used in presence of a prototype.
+</itemize>
+<tag/Availability/C128 and enhanced Apple //e
+<tag/See also/
+<ref id="fast" name="fast">,
+<ref id="slow" name="slow">,
+<ref id="toggle_videomode" name="toggle_videomode">
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>wherex<label id="wherex"><p>
 
 <quote>
@@ -4399,5 +5122,3 @@ cursor. Zero is returned for the uppermost screen position.
 
 
 </article>
-
-