+unsigned int __fastcall__ cbm_k_load(unsigned char flag, unsigned addr);
+unsigned char __fastcall__ cbm_k_save(unsigned int start, unsigned int end);
+unsigned char __fastcall__ cbm_k_open (void);
+void __fastcall__ cbm_k_close (unsigned char FN);
+unsigned char __fastcall__ cbm_k_readst (void);
+unsigned char __fastcall__ cbm_k_chkin (unsigned char FN);
+unsigned char __fastcall__ cbm_k_ckout (unsigned char FN);
+unsigned char __fastcall__ cbm_k_basin (void);
+void __fastcall__ cbm_k_bsout (unsigned char C);
+void __fastcall__ cbm_k_clrch (void);
+
+
+
+/*****************************************************************************/
+/* BASIC-like file I/O functions */
+/*****************************************************************************/
+
+
+
+/* All cbm_* IO functions set _oserror (see errno.h) in case of an
+ * error.
+ *
+ * errorcode BASIC error
+ * 1 = too many files
+ * 2 = file open
+ * 3 = file not open
+ * 4 = file not found
+ * 5 = device not present
+ * 6 = not input file
+ * 7 = not output file
+ * 8 = missing filename
+ * 9 = illegal device number
+ */
+
+
+
+unsigned int cbm_load (const char* name, unsigned char device, void* data);
+/* Loads file "name" from given device to given address or to the load
+ * address of the file if "data" is the null pointer (like load"name",8,1
+ * in BASIC).
+ * Returns number of bytes that where loaded if loading was successful
+ * otherwise 0. "_oserror" contains an errorcode then (see table below).
+ */
+
+unsigned char cbm_save (const char* name, unsigned char device,
+ const void* data, unsigned int size);
+/* Saves "size" bytes starting at "data" to a file.
+ * Returns 0 if saving was successful, otherwise an errorcode (see table
+ * below).
+ */
+
+unsigned char __fastcall__ cbm_open (unsigned char lfn,
+ unsigned char device,
+ unsigned char sec_addr,
+ const char* name);
+/* Opens a file. Works just like the BASIC command.
+ * Returns 0 if opening was successful, otherwise an errorcode (see table
+ * below).
+ */
+
+void __fastcall__ cbm_close (unsigned char lfn);
+/* Closes a file */
+
+int __fastcall__ cbm_read (unsigned char lfn, void* buffer, unsigned int size);
+/* Reads up to "size" bytes from a file to "buffer".
+ * Returns the number of actually read bytes, 0 if there are no bytes left
+ * (EOF) or -1 in case of an error. _oserror contains an errorcode then (see
+ * table below).
+ */
+
+int __fastcall__ cbm_write (unsigned char lfn, void* buffer, unsigned int size);
+/* Writes up to "size" bytes from "buffer" to a file.
+ * Returns the number of actually written bytes or -1 in case of an error.
+ * _oserror contains an errorcode then (see above table).
+ */
+
+unsigned char __fastcall__ cbm_opendir (unsigned char lfn, unsigned char device);
+/* Opens directory listing.
+ * Returns 0 if opening directory was successful,
+ * othervise errorcode corresponding to cbm_open()
+ */
+
+unsigned char __fastcall__ cbm_readdir (unsigned char lfn, struct cbm_dirent* l_dirent);
+/* Reads one directory line into cbm_dirent structure.
+ * Returns 0 if reading directory line was successful.
+ * Returns 'true' if reading directory failed or no more files to read.
+ */
+
+void __fastcall__ cbm_closedir (unsigned char lfn);
+/* Closes directory by cbm_close (unsigned char lfn) */