]> git.sur5r.net Git - cc65/blobdiff - include/em.h
Fixed isgraph() and ispunct() (macroes and library functions).
[cc65] / include / em.h
index 5064d137f1574abc5ca0871fb59b1684b42545fc..8b409cac2d1845f162f14d36937a1f6947a9a188 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2002      Ullrich von Bassewitz                                       */
-/*               Wacholderweg 14                                             */
-/*               D-70597 Stuttgart                                           */
-/* EMail:        uz@musoftware.de                                            */
+/* (C) 2002-2012, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
@@ -53,6 +53,7 @@
 #define EM_ERR_CANNOT_LOAD      2       /* Error loading driver */
 #define EM_ERR_INV_DRIVER       3       /* Invalid driver */
 #define EM_ERR_NO_DEVICE        4       /* Device (hardware) not found */
+#define EM_ERR_INSTALLED        5       /* A driver is already installed */
 
 /* Parameters for the em_copy_... functions. NOTE: The first seven bytes
  * have the same order and alignment as needed for the Commodore REU, so
@@ -76,12 +77,20 @@ struct em_copy {
 
 
 unsigned char __fastcall__ em_load_driver (const char* driver);
-/* Load an extended memory driver and return an error code */
+/* Load and install an extended memory driver. Return an error code. */
 
-unsigned char __fastcall__ em_unload (void);
-/* Unload the currently loaded driver. */
+unsigned char em_unload (void);
+/* Uninstall, then unload the currently loaded driver. */
 
-unsigned __fastcall__ em_pagecount (void);
+unsigned char __fastcall__ em_install (void* driver);
+/* Install an already loaded driver. Return an error code. */
+
+unsigned char em_uninstall (void);
+/* Uninstall the currently loaded driver and return an error code.
+ * Note: This call does not free allocated memory.
+ */
+
+unsigned em_pagecount (void);
 /* Return the total number of 256 byte pages available in extended memory. */
 
 void* __fastcall__ em_map (unsigned page);
@@ -91,7 +100,7 @@ void* __fastcall__ em_map (unsigned page);
  */
 
 void* __fastcall__ em_use (unsigned page);
-/* Tell the driver that the memory window is associated with a given page. 
+/* Tell the driver that the memory window is associated with a given page.
  * This call is very similar to em_map. The difference is that the driver
  * does not necessarily transfer the current contents of the extended
  * memory into the returned window. If you're going to just write to the
@@ -99,7 +108,7 @@ void* __fastcall__ em_use (unsigned page);
  * use, this call may perform better than em_map.
  */
 
-void __fastcall__ em_commit (void);
+void em_commit (void);
 /* 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
  * em_map, em_copyfrom or em_copyto are called without calling em_commit