]> git.sur5r.net Git - cc65/blob - asminc/telestrat.inc
Adding IRQVec
[cc65] / asminc / telestrat.inc
1 ;
2 ; Oric Telemon definition
3 ; Telemon 2.4 & Telemon 3.x
4 ; For telemon 3.x check http://orix.oric.org
5 ;
6
7
8 ; ---------------------------------------------------------------------------
9 ; Constants
10
11 SCREEN_XSIZE    = 40            ; screen columns
12 SCREEN_YSIZE    = 28            ; screen rows
13
14 FUNCTKEY        = $A5
15
16 FNAME_LEN       = 11            ; maximum length of file-name
17
18 ; ---------------------------------------------------------------------------
19 ; I/O Identifier
20 ; this identifers are used for channel management
21
22
23 XKBD            = $80           ; Keyboard
24 XRSE            = $83           ; RS232 in
25 XSCR            = $88           ; Screen
26 XRSS            = $90           ; RS232 out
27
28
29 ; ---------------------------------------------------------------------------
30 ; Zero page
31
32 ; ---------------------------------------------------------------------------
33 ; Page 00
34 RES             := $00
35 RESB            := $02
36
37 TR0             := $0C
38 TR1             := $0D
39 TR2             := $0E
40 TR3             := $0F
41 TR4             := $10
42 TR5             := $11
43 TR6             := $12
44 TR7             := $13
45
46 PTR_READ_DEST   := $2C           ; used for XFREAD and XWRITE only in telemon 3.x
47
48 HRSX            := $46
49 HRSY            := $47
50
51 HRS1            := $4D
52 HRS2            := $4F
53 HRS3            := $51
54 HRS4            := $53
55 HRS5            := $55
56
57
58
59 ; ---------------------------------------------------------------------------
60 ; Low memory
61 IRQVec          := $02fb        ; "fast" interrupt vector
62
63
64
65 ; ---------------------------------------------------------------------------
66 ; I/O locations
67
68 ; 6522
69 .struct VIA                     ; Versatile Interface Adapter
70         .res    $0300
71 PRB     .byte                   ; Port Register B
72 PRA     .byte                   ; Port Register A
73 DDRB    .byte                   ; Data Direction Register B
74 DDRA    .byte                   ; Data Direction Register A
75 T1      .word                   ; Timer 1
76 T1L     .word                   ; Timer 1 Latch
77 T2      .word                   ; Timer 2
78 SR      .byte                   ; Shift Register
79 ACR     .byte                   ; Auxiliary Control Register
80 PCR     .byte                   ; Peripheral Control Register
81 IFR     .byte                   ; Interrupt Flags Register
82 IER     .byte                   ; Interrupt Enable Register
83 PRA2    .byte                   ; Port Register A without handshaking
84 .endstruct
85
86
87 .struct VIA2                     ; Versatile Interface Adapter
88         .res    $0320
89 PRB     .byte                   ; Port Register B
90 PRA     .byte                   ; Port Register A
91 DDRB    .byte                   ; Data Direction Register B
92 DDRA    .byte                   ; Data Direction Register A
93 T1      .word                   ; Timer 1
94 T1L     .word                   ; Timer 1 Latch
95 T2      .word                   ; Timer 2
96 SR      .byte                   ; Shift Register
97 ACR     .byte                   ; Auxiliary Control Register
98 PCR     .byte                   ; Peripheral Control Register
99 IFR     .byte                   ; Interrupt Flags Register
100 IER     .byte                   ; Interrupt Enable Register
101 PRA2    .byte                   ; Port Register A without handshaking
102 .endstruct
103
104 ; 6551
105 .struct ACIA                    ; Asynchronous Communications Interface Adapter
106         .res    $031C
107 DATA    .byte
108 STATUS  .byte
109 CMD     .byte                   ; Command register
110 CTRL    .byte                   ; Control register
111 .endstruct
112
113 SCREEN          := $BB80
114
115
116 ; ---------------------------------------------------------------------------
117 ; ROM entries
118
119 ; primitives telemon 2.4 
120 XRD0             = $08
121 XRDW0            = $0C
122 XWR0             = $10 
123 XWSTR0           = $14 
124 XTEXT            = $19
125 XHIRES           = $1A
126 XFILLM           = $1C
127 XMINMA           = $1F
128 XVARS            = $24          ; only in TELEMON 3.x, in telemon 2.4, it's XNOMFI ($24)
129 XFREAD           = $27          ; only in TELEMON 3.x
130 XOPEN            = $30          ; only in TELEMON 3.x
131 XCOSCR           = $34          ; switch off cursor
132 XCSSCR           = $35          ; switch on cursor
133 XCLOSE           = $3A          ; only in TELEMON 3.x Close file
134 XFWRITE          = $3B          ; only in TELEMON 3.x write file
135 XSONPS           = $40
136 XOUPS            = $42
137 XPLAY            = $43
138 XSOUND           = $44 
139 XMUSIC           = $45 
140 XZAP             = $46
141 XSHOOT           = $47
142 XSOUT            = $67          ; Send A register to RS232, available in telemon 2.4 & 3.x
143 XCIRCL           = $8F
144 XCURSE           = $90
145 XPAPER           = $92
146 XINK             = $93
147 XEXPLO           = $9C 
148 XPING            = $9D
149
150 ; ---------------------------------------------------------------------------
151 ; ROM entries variables
152
153 PWD_PTR          = $00
154
155 ; ---------------------------------------------------------------------------
156 ; Page $200
157 SCRX             := $220
158 SCRY             := $224
159 ADSCRL           := $218
160 ADSCRH           := $21C
161 IRQVECTOR        := $2FA
162
163
164 ; ---------------------------------------------------------------------------
165 ; Page $500
166
167 BUFNOM           := $517
168 BUFEDT           := $590
169
170 MAX_BUFEDT_LENGTH=110
171
172 ; Hardware
173 CH376_DATA       := $340
174 CH376_COMMAND    := $341
175
176 ; MACRO 
177
178 .macro  BRK_TELEMON   value
179         .byte $00,value
180 .endmacro