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