]> git.sur5r.net Git - cc65/blob - asminc/cbm610.inc
Merge pull request #494 from jedeoric/master
[cc65] / asminc / cbm610.inc
1 ;
2 ; Zero page variables and I/O definitions for the CBM 610
3 ;
4 ; Taken from a kernal disassembly done by myself in 1987.
5 ;
6 ; 1998-09-28, Ullrich von Bassewitz
7 ; 2014-04-02, Greg King
8
9
10 ; ---------------------------------------------------------------------------
11 ; Zeropage stuff
12
13 ExecReg         := $00          ; Controls execution memory bank
14 IndReg          := $01          ; Controls indirect indexed load-store bank
15
16 TXTPTR          := $85          ; Far pointer into BASIC source code
17 FNAM            := $90          ; Far pointer to LOAD/SAVE file-name
18 FNAM_LEN        := $9D          ; Holds length of file-name
19
20 ; ---------------------------------------------------------------------------
21 ; Screen size
22
23 XSIZE           = 80
24 YSIZE           = 25
25
26 ; ---------------------------------------------------------------------------
27 ; I/O definitions
28
29
30 ; I/O  $d800: CRTC 6545
31
32 .struct CRTC
33         ADDR    .byte
34         DATA    .byte
35 .endstruct
36
37
38 ; I/O  $db00: CIA 6526, Inter Process Communication
39 ;
40 ;       IPCcia          =       $db00
41
42 .struct CIA
43         PRA     .byte
44         PRB     .byte
45         DDRA    .byte
46         DDRB    .byte
47         .union
48             .struct
49                 TALO    .byte
50                 TAHI    .byte
51             .endstruct
52             TA          .word
53         .endunion
54         .union
55             .struct
56                 TBLO    .byte
57                 TBHI    .byte
58             .endstruct
59             TB          .word
60         .endunion
61         TOD10   .byte
62         TODSEC  .byte
63         TODMIN  .byte
64         TODHR   .byte
65         SDR     .byte
66         ICR     .byte
67         CRA     .byte
68         CRB     .byte
69 .endstruct
70
71
72 ; I/O  $dc00: CIA 6526
73 ;
74 ;       cia             =       $dc00
75
76
77 ; I/O  $dd00: ACIA 6551
78 ;
79 ;       acia            =       $dd00
80
81 .struct ACIA
82         DATA    .byte
83         STATUS  .byte
84         CMD     .byte
85         CTRL    .BYTE
86 .endstruct
87
88
89 ; I/O  $de00: Triport #1 6525
90 ;
91 ;       tpi1            =       $de00
92
93 .struct TPI
94         PRA     .byte
95         PRB     .byte
96         .union
97                 PRC     .byte
98                 INT     .byte
99         .endunion
100         DDRA    .byte
101         DDRB    .byte
102         .union
103                 DDRC    .byte
104                 IMR     .byte
105         .endunion
106         CR      .byte
107         AIR     .byte
108 .endstruct
109
110
111 ; I/O  $df00: Triport #2 6525
112
113 ;       tpi2            =       $df00
114
115
116 ;-----------------------------------------------------------------------------
117
118 BASIC_BUF       := $FA5E        ; Bank 1 location of command-line
119 BASIC_BUF_LEN   = 162           ; Maximum length of command-line