]> git.sur5r.net Git - cc65/blob - libsrc/apple2/rom.s
Improvements by Oliver Schmidt
[cc65] / libsrc / apple2 / rom.s
1 ;
2 ; Oliver Schmidt, 30.05.2004
3 ;
4 ; Apple2 ROM routines
5 ;
6
7         .export         TEXT
8         .export         HGR2
9         .export         HGR
10         .export         HCLR
11         .export         BKGND
12         .export         HPOSN
13         .export         HPLOT
14         .export         HLIN
15         .export         HFIND
16         .export         DRAW
17         .export         XDRAW
18         .export         SETHCOL
19
20 ; Graphics entry points, by cbmnut (applenut??) cbmnut@hushmail.com
21 TEXT    :=      $F399   ; Return to text screen
22 HGR2    :=      $F3D8   ; Initialize and clear hi-res page 2.
23 HGR     :=      $F3E2   ; Initialize and clear hi-res page 1.
24 HCLR    :=      $F3F2   ; Clear the current hi-res screen to black.
25 BKGND   :=      $F3F6   ; Clear the current hi-res screen to the
26                         ; last plotted color (from ($1C).
27 HPOSN   :=      $F411   ; Positions the hi-res cursor without
28                         ; plotting a point.
29                         ; Enter with (A) = Y-coordinate, and
30                         ; (Y,X) = X-coordinate.
31 HPLOT   :=      $F457   ; Calls HPOSN and tries to plot a dot at
32                         ; the cursor's position.  If you are
33                         ; trying to plot a non-white color at
34                         ; a complementary color position, no
35                         ; dot will be plotted.
36 HLIN    :=      $F53A   ; Draws a line from the last plotted
37                         ; point or line destination to:
38                         ; (X,A) = X-coordinate, and
39                         ; (Y) = Y-coordinate.
40 HFIND   :=      $F5CB   ; Converts the hi-res coursor's position
41                         ; back to X- and Y-coordinates; stores
42                         ; X-coordinate at $E0,E1 and Y-coordinate
43                         ; at $E2.
44 DRAW    :=      $F601   ; Draws a shape.  Enter with (Y,X) = the
45                         ; address of the shape table, and (A) =
46                         ; the rotation factor.  Uses the current
47                         ; color.
48 XDRAW   :=      $F65D   ; Draws a shape by inverting the existing
49                         ; color of the dots the shape draws over.
50                         ; Same entry parameters as DRAW.
51 SETHCOL :=      $F6EC   ; Set the hi-res color to (X), where (X)
52                         ; must be between 0 and 7.
53