]> git.sur5r.net Git - cc65/blob - asminc/pet.inc
Merge branch 'master' into kbrepeat
[cc65] / asminc / pet.inc
1 ;
2 ; PET generic definitions.
3 ;
4
5
6 ; ---------------------------------------------------------------------------
7 ; Zero page, Commodore stuff
8
9 VARTAB          := $2A          ; Pointer to start of BASIC variables
10 MEMSIZE         := $34          ; Size of memory installed
11 TXTPTR          := $77          ; Pointer into BASIC source code
12 TIME            := $8D          ; 60HZ clock
13 KEY_COUNT       := $9E          ; Number of keys in input buffer
14 RVS             := $9F          ; Reverse flag
15 CURS_FLAG       := $A7          ; 1 = cursor off
16 CURS_BLINK      := $A8          ; Blink counter
17 CURS_CHAR       := $A9          ; Character under the cursor
18 CURS_STATE      := $AA          ; Cursor blink state
19 SCREEN_PTR      := $C4          ; Pointer to current char in text screen
20 CURS_X          := $C6          ; Cursor column
21 FNLEN           := $D1          ; Length of filename
22 LFN             := $D2          ; Current Logical File Number
23 SECADR          := $D3          ; Secondary address
24 DEVNUM          := $D4          ; Device number
25 SCR_LINELEN     := $D5          ; Screen line length
26 CURS_Y          := $D8          ; Cursor row
27 FNADR           := $DA          ; Pointer to file name
28
29 BASIC_BUF       := $200         ; Location of command-line
30 BASIC_BUF_LEN   = 81            ; Maximum length of command-line
31
32 KEY_BUF         := $26F         ; Keyboard buffer
33
34 ;FIXME: we must somehow handle the difference between the two - how?
35
36 ; 40-Column PETs
37 ;KBDREPEAT       := $3ee
38 ;KBDREPEATRATE   := $3ea
39 ;KBDREPEATDELAY  := $3e9
40
41 ; 80-Column PETs
42 KBDREPEAT       := $e4
43 KBDREPEATRATE   := $e5
44 KBDREPEATDELAY  := $e6
45
46 ;----------------------------------------------------------------------------
47 ; PET ROM type detection
48
49 PET_DETECT      := $FFFB
50 PET_2000        = $CA
51 PET_3000        = $FC
52 PET_4000        = $FD
53
54
55 ;----------------------------------------------------------------------------
56 ; Vector and other locations
57
58 IRQVec          := $0090
59 BRKVec          := $0092
60 NMIVec          := $0094
61
62 ; ---------------------------------------------------------------------------
63 ; I/O: 6522 VIA2
64
65 VIA             := $E840
66 VIA_PRB         := $E840
67 VIA_PRA         := $E841
68 VIA_DDRB        := $E842
69 VIA_DDRA        := $E843
70
71