]> git.sur5r.net Git - cc65/blob - include/cbm.h
Loading and saving memory areas on cbm platforms
[cc65] / include / cbm.h
1 /*****************************************************************************/
2 /*                                                                           */
3 /*                                   cbm.h                                   */
4 /*                                                                           */
5 /*                      CBM system specific definitions                      */
6 /*                                                                           */
7 /*                                                                           */
8 /*                                                                           */
9 /* (C) 1998-2000 Ullrich von Bassewitz                                       */
10 /*               Wacholderweg 14                                             */
11 /*               D-70597 Stuttgart                                           */
12 /* EMail:        uz@musoftware.de                                            */
13 /*                                                                           */
14 /*                                                                           */
15 /* This software is provided 'as-is', without any expressed or implied       */
16 /* warranty.  In no event will the authors be held liable for any damages    */
17 /* arising from the use of this software.                                    */
18 /*                                                                           */
19 /* Permission is granted to anyone to use this software for any purpose,     */
20 /* including commercial applications, and to alter it and redistribute it    */
21 /* freely, subject to the following restrictions:                            */
22 /*                                                                           */
23 /* 1. The origin of this software must not be misrepresented; you must not   */
24 /*    claim that you wrote the original software. If you use this software   */
25 /*    in a product, an acknowledgment in the product documentation would be  */
26 /*    appreciated but is not required.                                       */
27 /* 2. Altered source versions must be plainly marked as such, and must not   */
28 /*    be misrepresented as being the original software.                      */
29 /* 3. This notice may not be removed or altered from any source              */
30 /*    distribution.                                                          */
31 /*                                                                           */
32 /*****************************************************************************/
33
34
35
36 #ifndef _CBM_H
37 #define _CBM_H
38
39
40
41 /* Load the system specific files here, if needed */
42 #ifdef __C64__
43 #ifndef _C64_H
44 #include <c64.h>
45 #endif
46 #endif
47
48 #ifdef __C128__
49 #ifndef _C128_H
50 #include <c128.h>
51 #endif
52 #endif
53
54 #ifdef __PLUS4__
55 #ifndef _PLUS4_H
56 #include <plus4.h>
57 #endif
58 #endif
59
60 #ifdef __CBM610__
61 #ifndef _CBM610_H
62 #include <cbm610.h>
63 #endif
64 #endif
65
66 #ifdef __PET__
67 #ifndef _PET_H
68 #include <pet.h>
69 #endif
70 #endif
71
72
73
74 /* Characters codes (CBM charset) */
75 #define CH_HLINE                 96
76 #define CH_VLINE                125
77 #define CH_ULCORNER             176
78 #define CH_URCORNER             174
79 #define CH_LLCORNER             173
80 #define CH_LRCORNER             189
81 #define CH_TTEE                 178
82 #define CH_RTEE                 179
83 #define CH_BTEE                 177
84 #define CH_LTEE                 171
85 #define CH_CROSS                123
86 #define CH_CURS_UP              145
87 #define CH_CURS_DOWN             17
88 #define CH_CURS_LEFT            157
89 #define CH_CURS_RIGHT            29
90 #define CH_PI                   126
91 #define CH_DEL                   20
92 #define CH_INS                  148
93 #define CH_ESC                   95
94
95
96
97 /* Kernel level functions */
98 void __fastcall__ cbm_k_setlfs (unsigned char LFN, unsigned char DEV,
99                                 unsigned char SA);
100 void __fastcall__ cbm_k_setnam (const char* Name);
101 unsigned __fastcall__ cbm_k_load (unsigned char flag, unsigned addr);
102 unsigned __fastcall__ cbm_k_save(unsigned int start, unsigned int end);
103
104 /* BASIC-like functions */
105 unsigned int cbm_load(const char* name, char device, unsigned int addr);
106 unsigned int cbm_save(const char* name, char device,
107                       unsigned int start, unsigned int end);
108
109
110 /* End of cbm.h */
111 #endif
112
113
114