]> git.sur5r.net Git - cc65/blob - asminc/vic20.inc
Added the model-specific addresses that the CBM exec() needs.
[cc65] / asminc / vic20.inc
1 ;
2 ; Vic20 generic definitions. Stolen mostly from c64.inc - Steve Schmidtke
3 ;
4
5
6 ; ---------------------------------------------------------------------------
7 ; Zero page, Commodore stuff
8
9 TXTPTR          := $7A          ; Pointer into BASIC source code
10 TIME            := $A0          ; 60HZ clock
11 FNAM_LEN        := $B7          ; Length of filename
12 SECADR          := $B9          ; Secondary address
13 DEVNUM          := $BA          ; Device number
14 FNAM            := $BB          ; Pointer to filename
15 KEY_COUNT       := $C6          ; Number of keys in input buffer
16 RVS             := $C7          ; Reverse flag
17 CURS_FLAG       := $CC          ; 1 = cursor off
18 CURS_BLINK      := $CD          ; Blink counter
19 CURS_CHAR       := $CE          ; Character under the cursor
20 CURS_STATE      := $CF          ; Cursor blink state
21 SCREEN_PTR      := $D1          ; Pointer to current char in text screen
22 CURS_X          := $D3          ; Cursor column
23 CURS_Y          := $D6          ; Cursor row
24 CRAM_PTR        := $F3          ; Pointer to current char in color RAM
25
26 BASIC_BUF       := $200         ; Location of command-line
27 BASIC_BUF_LEN   = 89            ; Maximum length of command-line
28
29 CHARCOLOR       := $286
30 CURS_COLOR      := $287         ; Color under the cursor
31
32
33 ; ---------------------------------------------------------------------------
34 ; Screen size
35
36 XSIZE           = 22
37 YSIZE           = 23
38
39 ; ---------------------------------------------------------------------------
40 ; Kernal routines
41
42 ; Direct entries
43 CLRSCR          := $E55F
44 KBDREAD         := $E5CF
45
46 ; ---------------------------------------------------------------------------
47 ; Vector and other locations
48
49 IRQVec          := $0314
50 BRKVec          := $0316
51 NMIVec          := $0318
52
53 ; ---------------------------------------------------------------------------
54 ; I/O: 6560 VIC
55
56 VIC             := $9000
57 VIC_LINES       := $9003        ; Screen lines, bit 7 is bit 0 from VIC_HLINE
58 VIC_HLINE       := $9004        ; Rasterline, bits 1-8
59 VIC_COLOR       := $900F        ; Border and background color
60
61 ; ---------------------------------------------------------------------------
62 ; I/O: 6522 VIA1
63
64 VIA1            := $9110
65 VIA1_JOY        := $9111
66 VIA1_DDRB       := $9112
67 VIA1_DDRA       := $9113
68
69 ; ---------------------------------------------------------------------------
70 ; I/O: 6522 VIA2
71
72 VIA2            := $9120
73 VIA2_JOY        := $9120
74 VIA2_DDRB       := $9122
75 VIA2_DDRA       := $9123
76