summaryrefslogtreecommitdiff
path: root/v4.0/src/SELECT/PANEL.MAC
diff options
context:
space:
mode:
Diffstat (limited to 'v4.0/src/SELECT/PANEL.MAC')
-rw-r--r--v4.0/src/SELECT/PANEL.MAC440
1 files changed, 440 insertions, 0 deletions
diff --git a/v4.0/src/SELECT/PANEL.MAC b/v4.0/src/SELECT/PANEL.MAC
new file mode 100644
index 0000000..dc37545
--- /dev/null
+++ b/v4.0/src/SELECT/PANEL.MAC
@@ -0,0 +1,440 @@
1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2;
3; PANEL.MAC
4;
5; This file contains the MACROS defined for the
6; screen management and a number of other macros
7; identified with CAS services.
8;
9; This file is included with the control flow files
10; for the creation of SELECT.EXE!
11;
12; DATE: July 3, 1987
13;
14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
15 ;
16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
17;
18; MACRO: PREPARE_CHILDREN
19;
20; This routine takes the Child panels associated with the
21; QM_ACTIVEPAN and adds them to the display queue - pushed
22; on as Children.
23;
24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
25PREPARE_CHILDREN MACRO ;;AN000;
26 CALL HANDLE_CHILDREN ;;AN000;
27 ENDM ;;AN000;
28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29;
30; MACRO: INIT_PQUEUE
31;
32; This flushes both the Parent/Child queues, clears the
33; refresh field table, initializes the refresh field to
34; the new Parent panel (with 0 entries), and sets the break
35; ON for the parent panel. Also it pushes the parent onto
36; the display queue.
37;
38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
39INIT_PQUEUE MACRO panel ;;AN000;
40 MOV AX,panel ;;AN000;
41 CALL INIT_PQUEUE_CALL ;;AN000;
42 ENDM ;;AN000;
43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
44;
45; MACRO: PREPARE_PANEL
46;
47; This will put the specified panel into the Parent queue
48; for display. The QM_OPT2 is already set to break OFF.
49;
50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
51PREPARE_PANEL MACRO panel ;;AN000;
52 MOV AX,panel ;;AN000;
53 CALL PREPARE_PANEL_CALL ;;AN000;
54 ENDM ;;AN000;
55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
56;
57; MACRO: DISPLAY_PANEL
58;
59; Display panel causes the Parent/Children on the display
60; queues to be displayed on the screen. If there are any
61; entries in the entry field table, then the break ON is set
62; to automatically display these panels.
63;
64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
65DISPLAY_PANEL MACRO ;;AN000;
66 CALL DISPLAY_PANEL_CALL ;;AN000;
67 ENDM ;;AN000;
68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
69;
70; MACRO: DEALLOCATE_MEMORY
71;
72;
73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
74DEALLOCATE_MEMORY MACRO ;;AN000;
75 CALL DEALLOCATE_MEMORY_CALL ;;AN000;
76 ENDM ;;AN000;
77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
78;
79; MACRO: ALLOCATE_MEMORY
80;
81;
82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
83ALLOCATE_MEMORY MACRO ;;AN000;
84 CALL ALLOCATE_MEMORY_CALL ;;AN000;allocate segment
85 ENDM ;;AN000;
86;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
87;
88; MACRO: GET_SCROLL
89;
90; The scroll field becomes the active field assuming a default
91; colour index, and the cursor keys become active. The only
92; keys valid for return are specified in the 'fkeys' list.
93;
94;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
95GET_SCROLL MACRO input,index,f_keys ;;AN000;
96 MOV AX,input ;;AN000;
97 MOV BX,index ;;AN000;
98 MOV CX,f_keys&_LEN ;;AN000;
99 LEA DX,f_keys ;;AN000;
100 CALL EXEC_SCROLL_CALL ;;AN000;
101 ENDM ;;AN000;
102;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
103;
104; MACRO: INIT_SCROLL
105;
106; Sets up the scroll field with the specified index onto the
107; refresh field table. The colour index table is set to a
108; different colour to indicate that it is not the active field.
109;
110;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
111INIT_SCROLL MACRO input,index ;;AN000;
112 MOV AX,input ;;AN000;
113 MOV BX,index ;;AN000;
114 CALL INIT_SCROLL_CALL ;;AN000;
115 ENDM ;;AN000;
116;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
117;
118; MACRO: INIT_SCROLL_W_LIST
119;
120; Sets up the scroll field with the specified index onto the
121; refresh field table. The colour index table is set to a
122; different colour to indicate that it is not the active field.
123;
124;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
125INIT_SCROLL_W_LIST MACRO input,list_seg,list_off,num_ele,max_width,max_title,index ;;AN000;
126 MOV AX,input ;;AN000;
127 MOV BX,max_title ;;AN000;
128 MOV CX,num_ele ;;AN000;
129 MOV DX,max_width ;;AN000;
130 MOV SI,list_seg ;;AN000;
131 MOV DI,list_off ;;AN000;
132 CALL INIT_SCROLL_W_LIST_CALL ;;AN000;
133 MOV AX,input ;;AN000;
134 MOV BX,index ;;AN000;
135 CALL INIT_SCROLL_CALL ;;AN000;
136 ENDM ;;AN000;
137;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
138;
139; MACRO: INIT_SCROLL_W_NUM
140;
141; Sets up the scroll field with the specified index onto the
142; refresh field table. The colour index table is set to a
143; different colour to indicate that it is not the active field.
144;
145;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
146INIT_SCROLL_W_NUM MACRO input,num_ele,index ;;AN000;
147 MOV AX,input ;;AN000;
148 MOV CX,num_ele ;;AN000;
149 CALL INIT_SCROLL_W_NUM_CALL ;;AN000;
150 MOV AX,input ;;AN000;
151 MOV BX,index ;;AN000;
152 CALL INIT_SCROLL_CALL ;;AN000;
153 ENDM ;;AN000;
154;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
155;
156; MACRO: INIT_SCROLL_COLOUR
157;
158;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
159INIT_SCROLL_COLOUR MACRO input,colour ;;AN000;
160 MOV BX,input ;;AN000;get PCSLCTP field
161 MOV AX,colour ;;AN000;
162 CALL SET_SCROLL_COLOUR ;;AN000;
163 ENDM ;;AN000;
164;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
165;
166; MACRO: SET_SCROLL
167;
168; The SET_SCROLL will set a scroll field specified to the required
169; index in a different colour index to indicate it is NOT the
170; active field.
171;
172;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
173SET_SCROLL MACRO input,index ;;AN000;
174 MOV AX,input ;;AN000;
175 MOV BX,index ;;AN000;
176 CALL SET_SCROLL_CALL ;;AN000;
177 ENDM ;;AN000;
178;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
179;
180; MACRO: GET_FUNCTION
181;
182; This routine is used to process screens with NO scroll fields
183; or input fields. The valid keys are specified in the 'fkeys'
184; list.
185;
186;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
187GET_FUNCTION MACRO fkeys ;;AN000;
188 MOV CX,fkeys&_LEN ;;AN000;
189 LEA DX,fkeys ;;AN000;
190 CALL GET_FUNCTION_CALL ;;AN000;
191 ENDM ;;AN000;
192;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
193;
194; MACRO: INIT_STRING
195;
196; INIT_STRING is used to add the input entry field onto the
197; refresh field table. Unlike the scroll fields, the colour
198; index is maintained for the input field.
199;
200;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
201INIT_STRING MACRO input,string,max_string ;;AN000;
202 MOV AX,input ;;AN000;
203 LEA BX,string ;;AN000;
204 MOV SI,max_string ;;AN000;
205 CALL INIT_STRING_CALL ;;AN000;
206 ENDM ;;AN000;
207;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
208;
209; MACRO: SET_STRING
210;
211; This set an input field (already contained in the refresh
212; field table) on the logical buffer to the defined string.
213;
214;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
215SET_STRING MACRO input,string,max_string ;;AN000;
216 MOV AX,input ;;AN000;
217 LEA BX,string ;;AN000;
218 MOV SI,max_string ;;AN000;
219 CALL SET_STRING_CALL ;;AN000;
220 ENDM ;;AN000;
221;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
222;
223; MACRO: GET_STRING
224;
225; Causes the input field specified to become the active input
226; field. The keys that will exit this input field are defined
227; in the 'fkeys' list. The other characters valid for this
228; input field are contained in the ICB.
229;
230;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
231GET_STRING MACRO input,string,max_string,fkeys ;;AN000;
232 MOV AX,input ;;AN000;
233 LEA BX,string ;;AN000;
234 MOV CX,fkeys&_LEN ;;AN000;
235 LEA DX,fkeys ;;AN000;
236 MOV SI,max_string ;;AN000;
237 CALL GET_STRING_CALL ;;AN000;
238 ENDM ;;AN000;
239;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
240;
241; MACRO: GET_NUMERIC
242;
243;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
244GET_NUMERIC MACRO input,value,minimum,maximum,fkeys,string ;;AN000;
245 LOCAL GN_0 ;;AN000;
246 LOCAL GN_1 ;;AN000;
247 MOV AX,maximum ;;AN000;
248 LEA BX,P_USER_STRING ;;AN000;
249 CALL CONVERT_ASCII ;;AN000;
250 MOV SI,AX ;;AN000;
251 ;;
252 MOV AX,value ;;AN000;
253GN_0: LEA BX,string+2 ;;AN000;
254 CALL CONVERT_ASCII ;;AN000;
255 MOV string,AX ;;AN000;
256 ;;
257 LEA BX,string ;;AN000;
258 MOV AX,input ;;AN000;
259 MOV CX,fkeys&_LEN ;;AN000;
260 LEA DX,fkeys ;;AN000;
261 CALL GET_STRING_CALL ;;AN000;
262 ;;
263 LEA BX,P_USER_STRING ;;AN000;
264 MOV CX,S_USER_STRING ;;AN000;
265 CALL CONVERT_NUMERIC ;;AN000;
266 ;;
267 CMP N_USER_FUNC,ESCAPE ;;AN000;
268 JE GN_1 ;;AN000;
269 ;;
270 MOV BX,minimum ;;AN000;
271 MOV CX,maximum ;;AN000;
272 CALL CHECK_MIN_MAX ;;AN000;
273 JC GN_0 ;;AN000;
274 ;;
275GN_1: MOV N_USER_NUMERIC,AX ;;AN000;
276 ENDM ;;AN000;
277;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
278;
279; MACRO: INIT_NUMERIC
280;
281;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
282INIT_NUMERIC MACRO input,value,maximum,string ;;AN000;
283 MOV AX,maximum ;;AN000;
284 LEA BX,P_USER_STRING ;;AN000;
285 CALL CONVERT_ASCII ;;AN000;
286 MOV SI,AX ;;AN000;
287 ;;
288 MOV AX,value ;;AN000;
289 LEA BX,string+2 ;;AN000;
290 CALL CONVERT_ASCII ;;AN000;
291 MOV string,AX ;;AN000;
292 ;;
293 LEA BX,string ;;AN000;
294 MOV AX,input ;;AN000;
295 CALL INIT_STRING_CALL ;;AN000;
296 ENDM ;;AN000;
297;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
298;
299; MACRO: SET_NUMERIC
300;
301;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
302SET_NUMERIC MACRO input,value,maximum,string ;;AN000;
303 MOV AX,maximum ;;AN000;
304 LEA BX,P_USER_STRING ;;AN000;
305 CALL CONVERT_ASCII ;;AN000;
306 MOV SI,AX ;;AN000;
307 ;;
308 MOV AX,value ;;AN000;
309 LEA BX,string ;;AN000;
310 CALL CONVERT_ASCII ;;AN000;
311 MOV string,AX ;;AN000;
312 ;;
313 LEA BX,string ;;AN000;
314 MOV AX,input ;;AN000;
315 CALL SET_STRING_CALL ;;AN000;
316 ENDM ;;AN000;
317;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
318;
319; MACRO: GET_SUPPORT
320;
321;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
322INIT_SCROLL_STATUS MACRO input,status_id ;;AN000;
323 MOV AX,input ;;AN000;
324 LEA SI,status_id ;;AN000;
325 CALL INIT_SCROLL_STATUS_CALL ;;AN000;
326 ENDM ;;AN000;
327;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
328;
329; MACRO: INIT_SUPPORT
330;
331;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
332INIT_SUPPORT MACRO table,index,status ;;AN000;
333 PUSH SI ;;AN000;
334 LEA SI,table ;;AN000;
335 MOV BX,index ;;AN000;
336 DEC BX ;;AN000;
337 SHL BX,1 ;;AN000;
338 MOV AX,status ;;AN000;
339 MOV [SI+BX],AX ;;AN000;
340 POP SI ;;AN000;
341 ENDM ;;AN000;
342;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
343;
344; MACRO: RET_SUPPORT
345;
346;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
347RET_SUPPORT MACRO table,index,status ;;AN000;
348 PUSH SI ;;AN000;
349 LEA SI,table ;;AN000;
350 MOV BX,index ;;AN000;
351 DEC BX ;;AN000;
352 SHL BX,1 ;;AN000;
353 MOV AX,[SI+BX] ;;AN000;
354 MOV status,AX ;;AN000;
355 POP SI ;;AN000;
356 ENDM ;;AN000;
357;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
358;
359; MACRO: TOGGLE_SUPPORT
360;
361;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
362TOGGLE_SUPPORT MACRO table,index ;;AN000;
363 MOV BX,index ;;AN000;
364 LEA DX,table ;;AN000;
365 CALL TOGGLE_SUPPORT_CALL ;;AN000;
366 ENDM ;;AN000;
367;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
368;
369; MACROS: INITIALIZE_BCHAR
370;
371; One needs to initialize the background panel colour index
372; to match the colour attributes of the Parent panels. The
373; index is based on panel #1 (which is assumed to be a good
374; sample of the remaining panel colours.
375;
376;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
377INITIALIZE_BCHAR MACRO character ;;AN000;
378 MOV AL,character ;;AN000;Background character
379 MOV PM_BASECHAR,AL ;;AN000;
380 PUSH DI ;;AN000;
381 PUSH DX ;;AN000;
382 PUSH ES ;;AN000;
383 MOV BX,1 ;;AN000;get ES:DI pointer to panel #1
384 CALL GET_PCB ;;AN000;
385 PUSH ES:[DI]+PCB_CCBID ;;AN000;get panel's color index
386 POP AX ;;AN000;
387 DEC AX ;;AN000;normalize index
388 POP ES ;;AN000;
389 PUSH ES ;;AN000;
390 MOV DI,CRD_CCBVECOFF ;;AN000;
391 PUSH CRD_CCBVECSEG ;;AN000;
392 POP ES ;;AN000;
393 MOV DX,12 ;;AN000;12 entries per colour index
394 MUL DX ;;AN000;
395 ADD DI,AX ;;AN000;
396 MOV AL,ES:[DI] ;;AN000;
397 POP ES ;;AN000;
398 POP DX ;;AN000;
399 POP DI ;;AN000;
400 MOV PM_BASEATTR,AL ;;AN000;set color attribute of background characters
401 ENDM ;;AN000;
402;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
403;
404; MACRO: RETURN_STRING
405;
406;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
407RETURN_STRING MACRO input,string,maximum ;;AN000;
408 MOV AX,input ;;AN000;
409 MOV DX,maximum ;;AN000;
410 LEA SI,string ;;AN000;
411 CALL RETURN_STRING_CALL ;;AN000;
412 ENDM ;;AN000;
413;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
414;
415; MACRO: HANDLE_ERROR
416;
417;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
418HANDLE_ERROR MACRO input,action ;;AN000;
419 LOCAL CONTINUE ;;AN000;
420 MOV BX,input ;;AN000;
421 MOV CX,action ;;AN000;
422 CALL HANDLE_ERROR_CALL ;;AN000;
423 JNC CONTINUE ;;AN000;
424 CLEAR_SCREEN2 ;;AC027;SEH ;AN000;
425 JMP EXIT_SELECT ;;AN000;
426CONTINUE: ;;AN000;
427 ENDM ;;AN000;
428;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
429;
430; MACRO: INIT_CHAR ;;AN000;JW
431;
432;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
433INIT_CHAR MACRO character,row,column,panid ;;AN000;JW
434 MOV AX,row ;;AN000;JW
435 MOV CX,column ;;AN000;JW
436 MOV DL,character ;;AN000;JW
437 MOV BX,panid ;;AN000;JW
438 CALL INIT_CHAR_CALL ;;AN000;JW
439 ENDM ;;AN000;JW
440;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;