]> git.sur5r.net Git - cc65/blob - asminc/pet.inc
Removed a "cc65_" prefix.
[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 ; 80-Column CBMs
30 KBDREPEAT80     := $E4
31 KBDRPTRATE80    := $E5
32 KBDRPTDELAY80   := $E6
33
34 BASIC_BUF       := $200         ; Location of command-line
35 BASIC_BUF_LEN   = 81            ; Maximum length of command-line
36
37 KEY_BUF         := $26F         ; Keyboard buffer
38
39 ; 40-Column PETs/CBMs
40 KBDRPTDELAY40   := $3E9
41 KBDRPTRATE40    := $3EA
42 KBDREPEAT40     := $3EE
43 KBDREPEAT40B    := $3F8
44
45 ;----------------------------------------------------------------------------
46 ; PET ROM type detection
47
48 PET_DETECT      := $FFFB
49 PET_2000        = $CA
50 PET_3000        = $FC
51 PET_4000        = $FD
52
53
54 ;----------------------------------------------------------------------------
55 ; Vector and other locations
56
57 IRQVec          := $0090
58 BRKVec          := $0092
59 NMIVec          := $0094
60
61 ; ---------------------------------------------------------------------------
62 ; I/O: 6522 VIA2
63
64 VIA             := $E840        ; VIA base address
65 VIA_PB          := VIA+$0       ; Port register B
66 VIA_PA1         := VIA+$1       ; Port register A
67 VIA_PRB         := VIA+$0       ; *** Deprecated ***
68 VIA_PRA         := VIA+$1       ; *** Deprecated ***
69 VIA_DDRB        := VIA+$2       ; Data direction register B
70 VIA_DDRA        := VIA+$3       ; Data direction register A
71 VIA_T1CL        := VIA+$4       ; Timer 1, low byte
72 VIA_T1CH        := VIA+$5       ; Timer 1, high byte
73 VIA_T1LL        := VIA+$6       ; Timer 1 latch, low byte
74 VIA_T1LH        := VIA+$7       ; Timer 1 latch, high byte
75 VIA_T2CL        := VIA+$8       ; Timer 2, low byte
76 VIA_T2CH        := VIA+$9       ; Timer 2, high byte
77 VIA_SR          := VIA+$A       ; Shift register
78 VIA_CR          := VIA+$B       ; Auxiliary control register
79 VIA_PCR         := VIA+$C       ; Peripheral control register
80 VIA_IFR         := VIA+$D       ; Interrupt flag register
81 VIA_IER         := VIA+$E       ; Interrupt enable register
82 VIA_PA2         := VIA+$F       ; Port register A w/o handshake