]> git.sur5r.net Git - cc65/blob - libsrc/apple2/apple2.inc
Added an exit handler - code from Oliver Schmidt
[cc65] / libsrc / apple2 / apple2.inc
1
2 ;-----------------------------------------------------------------------------
3 ; Zero page stuff
4
5 WNDWDTH :=      $21     ; Right edge of text window
6 CH      :=      $24     ; Cursor horizontal position
7 CV      :=      $25     ; Cursor vertical position
8 BASL    :=      $28     ; Text base address
9 INVFLG  :=      $32     ; Normal/inverse(/flash)
10 RNDL    :=      $4E     ; Random counter low
11 RNDH    :=      $4F     ; Random counter high
12 HIMEM   :=      $73     ; Highest available memory address+1
13
14 ;-----------------------------------------------------------------------------
15 ; Vectors
16
17 SOFTEV  :=      $03F2   ; Vector for warm start
18 PWREDUP :=      $03F4   ; This must be = EOR #$A5 of SOFTEV+1
19 DOSWARM :=      $03D0   ; DOS warmstart vector
20 BRKVec  :=      $03F0   ; Break vector
21 MLI     :=      $BF00   ; ProDOS Machine Language Interface
22
23 ;-----------------------------------------------------------------------------
24 ; Hardware
25
26 ; Keyboard input
27 KBD     :=      $C000   ; Read keyboard
28 KBDSTRB :=      $C010   ; Clear keyboard strobe
29
30 ; 80 column card switches
31 CLRALTCHAR :=   $C00E   ; Normal Apple II char set
32 SETALTCHAR :=   $C00F   ; Norm/inv LC, no flash
33 ALTCHARSET :=   $C01E   ; >127 if alt charset switched in
34 RD80VID :=      $C01F   ; >127 if 80 column video enabled
35
36 ; Video soft switches
37 MIXCLR  :=      $C052   ; Disable 4 lines of text
38 MIXSET  :=      $C053   ; Enable 4 lines of text
39 LOWSCR  :=      $C054   ; Page 1
40 HISCR   :=      $C055   ; Page 2
41
42 ; Game controller
43 BUTN0   :=      $C061   ; Open-Apple Key
44 BUTN1   :=      $C062   ; Closed-Apple Key