]> git.sur5r.net Git - cc65/blob - libsrc/apple2/apple2.inc
Add ROM function defines
[cc65] / libsrc / apple2 / apple2.inc
1 ; Break vector
2 BRKVec  = $03F0
3
4 ; Goto Dos
5 RESTOR  =       $03D0
6
7 ; Soft switches
8 ;
9 ; write to USEROM to enable apple rom C000-CFFF
10 USEROM  =       $C007
11 ; 80 column card switches
12 C80ON   =       $C00C
13 C80OFF  =       $C00D
14 RD80COL =       $C01F
15 PG2OFF  =       $C054
16 PG2ON   =       $C055
17 RDPAGE2 =       $C01C
18
19 ; Text routines
20 MIN_X   =       $20
21 MAX_X   =       $21
22 MIN_Y   =       $22
23 MAX_Y   =       $23
24 CH      =       $24
25 CV      =       $25
26 BASL    =       $28
27 TEXTTYP =       $32
28 MEMSIZE =       $73             ; Highest free RAM location
29 HOME    =       $FC58
30 VTABZ   =       $FC24
31 COUT    =       $FDED
32
33 ; Keyboard entries
34 RDKEY   =       $FD0C
35 CLEAR_KEY_STROBE = $C010
36 KEY_STROBE       = $C000
37
38 ; Game controller
39 OPEN_APPLE = $C061
40 CLOSED_APPLE = $C062
41
42 ;Graphics entry points, by cbmnut (applenut??) cbmnut@hushmail.com
43 WHITE   = $01     ;white for $1c, I think...
44
45 COLOR   = $1C     ;Current plot color
46
47 HGR2    = $F3D8   ;Initialize and clear hi-res page 2.
48
49 HGR     = $F3E2   ;Initialize and clear hi-res page 1.
50
51 HCLR    = $F3F2   ;Clear the current hi-res screen to black.
52
53 BKGND   = $F3F6   ;Clear the current hi-res screen to the
54                  ;last plotted color (from ($1C).
55
56 HPOSN   = $F411  ;Positions the hi-res cursor without
57                  ;plotting a point.
58                  ;Enter with (A) = Y-coordinate, and
59                  ;(Y,X) = X-coordinate.
60
61 HPLOT   = $F457  ;Calls HPOSN and tries to plot a dot at
62                  ;the cursor's position.  If you are
63                  ;trying to plot a non-white color at
64                  ;a complementary color position, no
65                  ;dot will be plotted.
66
67 HLIN    = $F53A  ;Draws a line from the last plotted
68                  ;point or line destination to:
69                  ;(X,A) = X-coordinate, and
70                  ;(Y) = Y-coordinate.
71
72 HFIND   = $F5CB  ;Converts the hi-res coursor's position
73                  ;back to X- and Y-coordinates; stores
74                  ;X-coordinate at $E0,E1 and Y-coordinate
75                  ;at $E2.
76
77 DRAW    = $F601  ;Draws a shape.  Enter with (Y,X) = the
78                  ;address of the shape table, and (A) =
79                  ;the rotation factor.  Uses the current
80                  ;color.
81
82 XDRAW   = $F65D  ;Draws a shape by inverting the existing
83                  ;color of the dots the shape draws over.
84                  ;Same entry parameters as DRAW.
85
86 SETHCOL = $F6EC  ;Set the hi-res color to (X), where (X)
87                  ;must be between 0 and 7.