Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.naic.edu/~phil/hardware/vertex/sharemegsvertex/lcu/pcr/user/v2_0/AUXMODE.LST
Дата изменения: Tue Mar 6 22:35:41 2001
Дата индексирования: Thu Jan 15 14:00:04 2009
Кодировка:

Поисковые слова: m 63


CP581 PAGE 1
auxmode 09-12-97
11:33:19

Line# Source Line Microsoft C Compiler Version 6.00A

1 /* AUXMODE.C LCU/CP581 S1095034L-1.5 27.06.1997 */
2 #include "prog.h"
3 void auxmode(void)
4 {
5 #include "extern.c"
6 char at1[12];
7 int overr,sp,v,ze,kn1,kn,flag,flag2;
8
9 auxm = 1;
10 outram(15,25,1,80,0x1700,0,1," ");
11 outram(15,15,1,80,0x1c00,0,1,"д");
12 outram(16,16,25,25,0x1f00,0,27,"A U X I L I A R Y M O D E");
13 outram(17,17,1,80,0x1c00,0,1,"д");
14
15 outram(23,23,53,53,0x3f00,0,8," F1 ");
16 outram(24,24,53,53,0x3f00,0,8," Execute");
17
18 outram(23,23,63,63,0x3f00,0,8," F2 ");
19 outram(24,24,63,63,0x3f00,0,8," AUX off");
20
21 outram(23,23,73,73,0x3f00,0,8," F3 ");
22 outram(24,24,73,73,0x3f00,0,8,"MainMenu");
23
24 if ((mode_sel[0]&dev_name)==0) axis = axis&0x0006;
25 if ((mode_sel[2]&dev_name)==0) axis = axis&0x0005;
26 if ((mode_sel[4]&dev_name)==0) axis = axis&0x0003;
27 if (axis == 0){
28 outram(19,25,1,80,0x1100,0,1," ");
29 screen();
30 auxm = 0;
31 return;
32 }
33
34 overr = 0;
35
36 ze = 0;
37
38 switch(axis)
39 {
40
41 case 1: /* AZ */
42 outram(16,16,55,55,0x1f00,0,3,"A Z");
43 outram(18,18,1,1,0x1700,0,15,"motor/group 1 :");
44 outram(19,19,1,1,0x1700,0,15,"motor/group 2 :");
45 kn = 1;
46 kn1 = 1;
47 break;
48 case 2: /* GD */
49 outram(16,16,55,55,0x1f00,0,3,"G D");
50 outram(18,18,1,1,0x1700,0,15,"motor 11 :");
51 outram(19,19,1,1,0x1700,0,15,"motor 12 :");
52 outram(20,20,1,1,0x1700,0,15,"motor 21 :");
53 outram(21,21,1,1,0x1700,0,15,"motor 22 :");
54 outram(22,22,1,1,0x1700,0,15,"motor 31 :");
55 outram(23,23,1,1,0x1700,0,15,"motor 32 :");
56 outram(24,24,1,1,0x1700,0,15,"motor 41 :");


CP581 PAGE 2
auxmode 09-12-97
11:33:19

Line# Source Line Microsoft C Compiler Version 6.00A

57 outram(25,25,1,1,0x1700,0,15,"motor 42 :");
58 kn= 3;
59 kn1 = 7;
60 break;
61 case 4: /* CH */
62 outram(16,16,55,55,0x1f00,0,3,"C H");
63 outram(18,18,1,1,0x1700,0,15,"motor/group 1 :");
64 outram(19,19,1,1,0x1700,0,15,"motor/group 2 :");
65 kn = 5;
66 kn1 = 13;
67 break;
68 default:
69 auxm = 0;
70 return;
71 break;
72 }
73
74 /* --------------------------------------------------- */
75
76 at1[0] = 'O';
77 at1[1] = 'F';
78 at1[2] = 'F';
79
80
81 A: taste();
82 moni();
83
84 if ((stat1[kn1]&0x0001)==0) overr =1;
85
86 at1[0] = 'O';
87 at1[1] = 'F';
88 at1[2] = 'F';
89 switch(stat1[kn1] & 0xff00)
90 {
91
92 case 0x0100:
93 outram(18,18,32,32,0x1700,0,3,at1);
94 outram(19,25,32,32,0x1700,0,3," ");
95 at1[0] = 0;
96 at1[1] = 0;
97 at1[2] = 0;
98 break;
99
100 case 0x0200:
101 outram(19,19,32,32,0x1700,0,3,at1);
102 outram(18,18,32,32,0x1700,0,3," ");
103 outram(20,25,32,32,0x1700,0,3," ");
104 at1[0] = 0;
105 at1[1] = 0;
106 at1[2] = 0;
107 break;
108
109 case 0x0400:
110 outram(20,20,32,32,0x1700,0,3,at1);
111 outram(21,25,32,32,0x1700,0,3," ");
112 outram(18,19,32,32,0x1700,0,3," ");


CP581 PAGE 3
auxmode 09-12-97
11:33:19

Line# Source Line Microsoft C Compiler Version 6.00A

113
114
115 at1[0] = 0;
116 at1[1] = 0;
117 at1[2] = 0;
118 break;
119
120 case 0x0800:
121 outram(21,21,32,32,0x1700,0,3,at1);
122 outram(22,25,32,32,0x1700,0,3," ");
123 outram(18,20,32,32,0x1700,0,3," ");
124 at1[0] = 0;
125 at1[1] = 0;
126 at1[2] = 0;
127 break;
128
129 case 0x1000:
130 outram(22,22,32,32,0x1700,0,3,at1);
131 outram(23,25,32,32,0x1700,0,3," ");
132 outram(18,21,32,32,0x1700,0,3," ");
133 at1[0] = 0;
134 at1[1] = 0;
135 at1[2] = 0;
136 break;
137
138 case 0x2000:
139 outram(23,23,32,32,0x1700,0,3,at1);
140 outram(24,25,32,32,0x1700,0,3," ");
141 outram(18,22,32,32,0x1700,0,3," ");
142 at1[0] = 0;
143 at1[1] = 0;
144 at1[2] = 0;
145 break;
146
147 case 0x4000:
148 outram(24,24,32,32,0x1700,0,3,at1);
149 outram(25,25,32,32,0x1700,0,3," ");
150 outram(18,23,32,32,0x1700,0,3," ");
151 at1[0] = 0;
152 at1[1] = 0;
153 at1[2] = 0;
154 break;
155
156 case 0x8000:
157 outram(25,25,32,32,0x1700,0,3,at1);
158 outram(18,24,32,32,0x1700,0,3," ");
159 at1[0] = 0;
160 at1[1] = 0;
161 at1[2] = 0;
162 break;
163 default:
164 outram(18,25,32,32,0x1700,0,3," ");
165 break;
166 }
167
168


CP581 PAGE 4
auxmode 09-12-97
11:33:19

Line# Source Line Microsoft C Compiler Version 6.00A

169
170
171 if(itaste == 5 && ze < 7 && (axis ==2)) /* Pfeil nach unten */
172 {
173 flag = 0;
174 flag2 = 0;
175 ze = ze +1;
176 if (ze >=8) ze = 0;
177 sp = 0;
178 for(v=0;v<12;v++)
179 at1[v] = ' ';
180
181 }
182
183 if(itaste == 5 && ze < 1 && (axis ==1 || axis == 4)) /* Pfeil nach u
nten */
184 {
185 flag = 0;
186 flag2 = 0;
187 ze = ze +1;
188 if (ze >=2) ze = 0;
189 sp = 0;
190 for(v=0;v<12;v++)
191 at1[v] = ' ';
192
193 }
194
195 if(itaste == 6 && ze > 0) /* Pfeil nach o
ben */
196 {
197 flag = 0;
198 flag2 = 0;
199 ze = ze -1;
200 sp = 0;
201 for(v=0;v<12;v++)
202 at1[v] = ' ';
203 }
204
205 if(itaste == 157 ) goto E; /* Taste F3 */
206 if(itaste == 27) {
207 outram(19,25,1,80,0x1100,0,1," ");
208 screen();
209 auxm = 0;
210 return;
211 }
212
213
214
215 //if(itaste==155) goto ST; /* Taste F1 */
216
217
218
219 at1[0] = 'O';
220 at1[1] = 'F';
221 at1[2] = 'F';
222


CP581 PAGE 5
auxmode 09-12-97
11:33:19

Line# Source Line Microsoft C Compiler Version 6.00A

223 switch(ze)
224 {
225 case 0:
226 outram(18,18,45,45,0x1700,0x008,3,at1);
227 outram(19,19,45,45,0x1700,0,3," ");
228 break;
229
230 case 1:
231 outram(18,18,45,45,0x1700,0,3," ");
232 outram(19,19,45,45,0x1700,0x008,3,at1);
233 outram(20,20,45,45,0x1700,0,3," ");
234 break;
235
236 case 2:
237 outram(19,19,45,45,0x1700,0,3," ");
238 outram(20,20,45,45,0x1700,0x008,3,at1);
239 outram(21,21,45,45,0x1700,0,3," ");
240 break;
241
242 case 3:
243 outram(20,20,45,45,0x1700,0,3," ");
244 outram(21,21,45,45,0x1700,0x008,3,at1);
245 outram(22,22,45,45,0x1700,0,3," ");
246 break;
247
248 case 4:
249 outram(21,21,45,45,0x1700,0,3," ");
250 outram(22,22,45,45,0x1700,0x008,3,at1);
251 outram(23,23,45,45,0x1700,0,3," ");
252 break;
253
254 case 5:
255 outram(22,22,45,45,0x1700,0,3," ");
256 outram(23,23,45,45,0x1700,0x008,3,at1);
257 outram(24,24,45,45,0x1700,0,3," ");
258 break;
259
260 case 6:
261 outram(23,23,45,45,0x1700,0,3," ");
262 outram(24,24,45,45,0x1700,0x008,3,at1);
263 outram(25,25,45,45,0x1700,0,3," ");
264 break;
265
266 case 7:
267 outram(24,24,45,45,0x1700,0,3," ");
268 outram(25,25,45,45,0x1700,0x008,3,at1);
269 break;
270
271 default: outram(18,24,45,45,0x1700,0,3," ");
272 break;
273 }
274
275 if (itaste == 156)
276 { mode_sel[kn] = 0; schreib(5); goto A; }
277
278 if(itaste==155) /* Taste F1 */


CP581 PAGE 6
auxmode 09-12-97
11:33:19

Line# Source Line Microsoft C Compiler Version 6.00A

279 {
280
281 outram(18,25,32,34,0x1700,0,1," ");
282 if (overr ==1){
283 outram(20,20,50,50,0x1700,0,27,"No brake interlock override
");
284 outram(21,21,50,50,0x1700,0,27,"No AUX mode selectable
");
285 goto A;
286 }
287 else{
288 outram(20,20,50,50,0x1700,0,27,"
");
289 outram(21,21,50,50,0x1700,0,27,"
");
290 }
291 switch(ze)
292 {
293 case 0:
294 mode_sel[kn] = 0x0100;
295 schreib(5);
296 break;
297
298 case 1:
299 mode_sel[kn] = 0x0200;
300 schreib(5);
301 break;
302
303 case 2:
304 mode_sel[kn] = 0x0400;
305 schreib(5);
306 break;
307
308 case 3:
309 mode_sel[kn] = 0x0800;
310 schreib(5);
311 break;
312
313 case 4:
314 mode_sel[kn] = 0x1000;
315 schreib(5);
316 break;
317
318 case 5:
319 mode_sel[kn] = 0x2000;
320 schreib(5);
321 break;
322
323 case 6:
324 mode_sel[kn] = 0x4000;
325 schreib(5);
326 break;
327
328 case 7:
329 mode_sel[kn] = 0x8000;
330 schreib(5);


CP581 PAGE 7
auxmode 09-12-97
11:33:19

Line# Source Line Microsoft C Compiler Version 6.00A

331 break;
332 }
333
334 goto A;
335 }
336
337
338 goto A;
339 E: cursor(1); /* Cursor ausschalten */
340 outram(19,25,1,80,0x1100,0,1," ");
341 auxm = 0;
342
343 }


auxmode Local Symbols

Name Class Type Size Offset Register

ze. . . . . . . . . . . . auto -001c
overr . . . . . . . . . . auto -001a
flag2 . . . . . . . . . . auto -0018
kn1 . . . . . . . . . . . auto -0016
flag. . . . . . . . . . . auto -0014
kn. . . . . . . . . . . . auto -0012
at1 . . . . . . . . . . . auto -0010
v . . . . . . . . . . . . auto -0004
sp. . . . . . . . . . . . auto -0002
mode_sel. . . . . . . . . extern struct/array 12 ***
stat1 . . . . . . . . . . extern struct/array 36 ***
axis. . . . . . . . . . . extern unsigned int 2 ***
auxm. . . . . . . . . . . extern unsigned char 1 ***
dev_name. . . . . . . . . extern int 2 ***
itaste. . . . . . . . . . extern int 2 ***


Global Symbols

Name Class Type Size Offset

auxmode . . . . . . . . . global far function *** 0000
cursor. . . . . . . . . . extern far function *** ***
moni. . . . . . . . . . . extern far function *** ***
outram. . . . . . . . . . extern far function *** ***
schreib . . . . . . . . . extern far function *** ***
screen. . . . . . . . . . extern far function *** ***
taste . . . . . . . . . . extern far function *** ***

Code size = 0b98 (2968)
Data size = 0220 (544)
Bss size = 0000 (0)

No errors detected