annotate code_part1/OSTC_code_asm_part1/alt_wait.asm @ 330:447390289f47 ScreenDump

NEW screen_dump serial command (l)
author JeanDo
date Tue, 10 May 2011 03:18:20 +0200
parents 96a35aeda5f2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1 ; OSTC - diving computer code
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2 ; Copyright (C) 2008 HeinrichsWeikamp GbR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3 ; This program is free software: you can redistribute it and/or modify
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
4 ; it under the terms of the GNU General Public License as published by
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
5 ; the Free Software Foundation, either version 3 of the License, or
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
6 ; (at your option) any later version.
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
7 ; This program is distributed in the hope that it will be useful,
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
8 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
9 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
10 ; GNU General Public License for more details.
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
11 ; You should have received a copy of the GNU General Public License
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
12 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
13 ; Wait routines
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
14 ; written by: chsw, info@heinrichsweikamp.com
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
15 ; written: 01/31/04
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
16 ; last updated: 11/05/07
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
17 ; known bugs:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
18 ; ToDo:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
19 IFDEF Clk_4_MHZ
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
20 MESSG "wait_v2i: switched to 4 MHZ operation"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
21 ELSE
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
22 IFDEF Clk_8_MHZ
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
23 MESSG "wait_v2i: switched to 8 MHZ operation"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
24 ELSE
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
25 IFDEF Clk_16_MHZ
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
26 MESSG "wait_v2i: switched to 16 MHZ operation"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
27 ELSE
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
28 IFDEF Clk_20_MHZ
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
29 MESSG "wait_v2i: switched to 20 MHZ operation"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
30 ELSE
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
31 ERROR "wait_v2i: Operating Frequency has to be specified by #DEFINE Clk_4_MHZ or Clk_8_MHZ"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
32 ENDIF
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
33 ENDIF
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
34 ENDIF
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
35 IFDEF Clk_16_MHZ
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
36 ; ==========================================================
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
37 ; WAIT 10 MICROSECONDS - 16 MHZ
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
38 ; ==========================================================
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
39 WAIT10US macro wait_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
40 movlw wait_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
41 IFNDEF DEBUG
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
42 call WAIT10USX
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
43 ENDIF
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
44 endm
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
45
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
46 WAIT10USX movwf wait_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
47 goto JumpIn10us
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
48 WAIT10USX2 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
49 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
50 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
51 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
52 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
53 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
54 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
55 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
56 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
57 JumpIn10us:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
58 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
59 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
60 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
61 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
62 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
63 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
64 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
65 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
66 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
67 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
68 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
69 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
70 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
71 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
72 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
73 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
74 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
75 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
76 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
77 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
78 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
79 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
80 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
81 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
82 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
83 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
84 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
85 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
86 decfsz wait_temp,1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
87 goto WAIT10USX2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
88 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
89 ; ==========================================================
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
90 ; WAIT 1 MILLISECOND - 16 MHZ
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
91 ; ==========================================================
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
92 WAITMS macro waitms_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
93 movlw waitms_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
94 IFNDEF DEBUG
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
95 call WAITMSX
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
96 ENDIF
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
97 endm
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
98 WAITMSX movwf waitms_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
99 goto JumpInMSX
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
100 WAITMSX2 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
101 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
102 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
103 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
104 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
105 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
106 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
107 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
108 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
109 JumpInMSX:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
110 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
111 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
112 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
113 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
114 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
115 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
116 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
117 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
118 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
119 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
120 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
121 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
122 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
123 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
124 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
125 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
126 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
127 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
128 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
129 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
130 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
131 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
132 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
133 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
134 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
135 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
136 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
137 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
138 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
139 WAIT10US d'99'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
140 decfsz waitms_temp,1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
141 goto WAITMSX2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
142 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
143 ELSE
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
144 IFDEF Clk_8_MHZ
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
145 ; ==========================================================
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
146 ; WAIT 10 MICROSECONDS - 8 MHZ
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
147 ; ==========================================================
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
148 WAIT10US macro wait_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
149 movlw wait_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
150 IFNDEF DEBUG
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
151 call WAIT10USX
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
152 ENDIF
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
153 endm
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
154 WAIT10USX movwf wait_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
155 goto JumpIn10us
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
156 WAIT10USX2 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
157 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
158 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
159 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
160 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
161 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
162 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
163 JumpIn10us:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
164 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
165 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
166 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
167 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
168 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
169 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
170 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
171 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
172 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
173 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
174 decfsz wait_temp,1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
175 goto WAIT10USX2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
176 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
177 ; ==========================================================
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
178 ; WAIT 1 MILLISECOND - 8 MHZ
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
179 ; ==========================================================
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
180 WAITMS macro waitms_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
181 movlw waitms_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
182 IFNDEF DEBUG
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
183 call WAITMSX
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
184 ENDIF
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
185 endm
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
186 WAITMSX movwf waitms_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
187 goto JumpInMSX
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
188
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
189 WAITMSX2 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
190 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
191 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
192 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
193 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
194 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
195 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
196 JumpInMSX:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
197 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
198 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
199 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
200 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
201 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
202 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
203 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
204 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
205 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
206 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
207 WAIT10US d'99'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
208 decfsz waitms_temp,1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
209 goto WAITMSX2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
210 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
211 ELSE
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
212 IFDEF Clk_4_MHZ
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
213 ; ==========================================================
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
214 ; WAIT 10 MICROSECONDS - 4 MHZ
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
215 ; ==========================================================
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
216 WAIT10US macro wait_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
217 movlw wait_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
218 IFNDEF DEBUG
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
219 call WAIT10USX
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
220 ENDIF
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
221 endm
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
222 WAIT10USX movwf wait_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
223 goto JumpIn10us
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
224 WAIT10USX2 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
225 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
226 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
227 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
228 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
229 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
230 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
231 JumpIn10us:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
232 decfsz wait_temp,1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
233 goto WAIT10USX2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
234 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
235 ; ==========================================================
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
236 ; WAIT 1 MILLISECOND - 4 MHZ
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
237 ; ==========================================================
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
238 WAITMS macro waitms_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
239 movlw waitms_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
240 IFNDEF DEBUG
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
241 call WAITMSX
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
242 ENDIF
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
243 endm
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
244 WAITMSX movwf waitms_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
245 goto JumpInMSX
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
246
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
247 WAITMSX2 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
248 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
249 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
250 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
251 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
252 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
253 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
254 JumpInMSX:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
255 WAIT10US d'99'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
256 decfsz waitms_temp,1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
257 goto WAITMSX2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
258 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
259 ELSE
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
260 IFDEF Clk_20_MHZ
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
261 ==========================================================
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
262 ; WAIT 10 MICROSECONDS - 20 MHZ
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
263 ; ==========================================================
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
264 WAIT10US macro wait_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
265 movlw wait_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
266 IFNDEF DEBUG
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
267 call WAIT10USX
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
268 ENDIF
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
269 endm
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
270 WAIT10USX movwf wait_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
271 goto JumpIn10us
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
272 WAIT10USX2 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
273 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
274 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
275 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
276 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
277 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
278 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
279 JumpIn10us:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
280 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
281 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
282 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
283 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
284 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
285 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
286 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
287 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
288 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
289 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
290 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
291 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
292 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
293 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
294 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
295 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
296 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
297 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
298 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
299 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
300 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
301 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
302 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
303 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
304 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
305 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
306 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
307 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
308 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
309 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
310 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
311 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
312 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
313 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
314 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
315 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
316 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
317 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
318 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
319 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
320 decfsz wait_temp,1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
321 goto WAIT10USX2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
322 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
323 ; ==========================================================
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
324 ; WAIT 1 MILLISECOND - 20 MHZ
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
325 ; ==========================================================
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
326 WAITMS macro waitms_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
327 movlw waitms_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
328 IFNDEF DEBUG
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
329 call WAITMSX
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
330 ENDIF
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
331 endm
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
332 WAITMSX movwf waitms_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
333 goto JumpInMSX
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
334
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
335 WAITMSX2 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
336 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
337 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
338 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
339 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
340 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
341 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
342 JumpInMSX:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
343 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
344 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
345 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
346 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
347 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
348 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
349 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
350 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
351 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
352 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
353 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
354 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
355 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
356 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
357 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
358 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
359 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
360 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
361 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
362 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
363 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
364 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
365 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
366 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
367 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
368 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
369 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
370 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
371 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
372 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
373 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
374 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
375 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
376 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
377 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
378 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
379 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
380 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
381 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
382 nop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
383 WAIT10US d'99'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
384 decfsz waitms_temp,1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
385 goto WAITMSX2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
386 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
387 ENDIF
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
388 ENDIF
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
389 ENDIF
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
390 ENDIF
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
391 ENDIF
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
392
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
393
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
394 wait_one_second:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
395 WAITMS d'250'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
396 WAITMS d'250'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
397 WAITMS d'250'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
398 WAITMS d'250'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
399 return