]> git.sur5r.net Git - cc65/blob - asminc/pet.inc
Merge pull request #7 from cvemu/master
[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 ;----------------------------------------------------------------------------
35 ; PET ROM type detection
36
37 PET_DETECT      := $FFFB
38 PET_2000        = $CA
39 PET_3000        = $FC
40 PET_4000        = $FD
41
42
43 ;----------------------------------------------------------------------------
44 ; Vector and other locations
45
46 IRQVec          := $0090
47 BRKVec          := $0092
48 NMIVec          := $0094
49
50 ; ---------------------------------------------------------------------------
51 ; I/O: 6522 VIA2
52
53 VIA             := $E840
54 VIA_PRB         := $E840
55 VIA_PRA         := $E841
56 VIA_DDRB        := $E842
57 VIA_DDRA        := $E843
58
59