]> git.sur5r.net Git - cc65/blob - asminc/telestrat.inc
Correcting some code from github comments
[cc65] / asminc / telestrat.inc
1 ;
2 ; Oric Telemon definition
3 ; Telemon 2.4 & Telemon 3.0
4 ; For telemon 3.0 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 ; ---------------------------------------------------------------------------
20 ; Zero page
21
22 ; ---------------------------------------------------------------------------
23 ; Page 00
24 RES             := $00
25 RESB            := $02
26
27 TR0             := $0C
28 TR1             := $0D
29
30 PTR_READ_DEST   := $2C           ; used for XFREAD and XWRITE only in telemon 3.0
31
32 HRSX            := $46
33 HRSY            := $47
34
35 HRS1            := $4D
36 HRS2            := $4F
37 HRS3            := $51
38 HRS4            := $53
39 HRS5            := $55
40
41
42
43 ; ---------------------------------------------------------------------------
44 ; Low memory
45
46
47
48
49 ; ---------------------------------------------------------------------------
50 ; I/O locations
51
52 ; 6522
53 .struct VIA                     ; Versatile Interface Adapter
54         .res    $0300
55 PRB     .byte                   ; Port Register B
56 PRA     .byte                   ; Port Register A
57 DDRB    .byte                   ; Data Direction Register B
58 DDRA    .byte                   ; Data Direction Register A
59 T1      .word                   ; Timer 1
60 T1L     .word                   ; Timer 1 Latch
61 T2      .word                   ; Timer 2
62 SR      .byte                   ; Shift Register
63 ACR     .byte                   ; Auxiliary Control Register
64 PCR     .byte                   ; Peripheral Control Register
65 IFR     .byte                   ; Interrupt Flags Register
66 IER     .byte                   ; Interrupt Enable Register
67 PRA2    .byte                   ; Port Register A without handshaking
68 .endstruct
69
70
71 .struct VIA2                     ; Versatile Interface Adapter
72         .res    $0320
73 PRB     .byte                   ; Port Register B
74 PRA     .byte                   ; Port Register A
75 DDRB    .byte                   ; Data Direction Register B
76 DDRA    .byte                   ; Data Direction Register A
77 T1      .word                   ; Timer 1
78 T1L     .word                   ; Timer 1 Latch
79 T2      .word                   ; Timer 2
80 SR      .byte                   ; Shift Register
81 ACR     .byte                   ; Auxiliary Control Register
82 PCR     .byte                   ; Peripheral Control Register
83 IFR     .byte                   ; Interrupt Flags Register
84 IER     .byte                   ; Interrupt Enable Register
85 PRA2    .byte                   ; Port Register A without handshaking
86 .endstruct
87
88 ; 6551
89 .struct ACIA                    ; Asynchronous Communications Interface Adapter
90         .res    $031C
91 DATA    .byte
92 STATUS  .byte
93 CMD     .byte                   ; Command register
94 CTRL    .byte                   ; Control register
95 .endstruct
96
97 SCREEN          := $BB80
98
99
100 ; ---------------------------------------------------------------------------
101 ; ROM entries
102
103 ; primitives telemon 2.4 
104 XRD0             = $08
105 XRDW0            = $0C
106 XWR0             = $10 
107 XWSTR0           = $14 
108 XTEXT            = $19
109 XHIRES           = $1A
110 XMINMA           = $1F
111 XFREAD           = $27          ; only in TELEMON 3.0
112 XOPEN            = $30          ; only in TELEMON 3.0
113 XCOSCR           = $34          ; switch off cursor
114 XCSSCR           = $35          ; switch on cursor
115 XCLOSE           = $3A          ; only in TELEMON 3.0 Close file
116 XFWRITE          = $3B          ; only in TELEMON 3.0 write file
117 XSONPS           = $40
118 XOUPS            = $42
119 XPLAY            = $43
120 XSOUND           = $44 
121 XMUSIC           = $45 
122 XZAP             = $46
123 XSHOOT           = $47
124 XCIRCL           = $8F
125 XCURSE           = $90
126 XPAPER           = $92
127 XINK             = $93
128 XEXPLO           = $9C 
129 XPING            = $9D
130
131
132 ; ---------------------------------------------------------------------------
133 ; Page $500
134
135 BUFNOM           := $517
136 BUFEDT           := $590
137
138 MAX_BUFEDT_LENGTH=110
139
140 ; Hardware
141 CH376_DATA       :=$340
142 CH376_COMMAND    :=$341
143
144 ; MACRO 
145
146 .macro  BRK_TELEMON   value
147         .byte $00,value
148 .endmacro