summaryrefslogtreecommitdiff
path: root/v4.0/src/CMD/COMMAND/TSPC.ASM
diff options
context:
space:
mode:
Diffstat (limited to 'v4.0/src/CMD/COMMAND/TSPC.ASM')
-rw-r--r--v4.0/src/CMD/COMMAND/TSPC.ASM488
1 files changed, 488 insertions, 0 deletions
diff --git a/v4.0/src/CMD/COMMAND/TSPC.ASM b/v4.0/src/CMD/COMMAND/TSPC.ASM
new file mode 100644
index 0000000..10e5758
--- /dev/null
+++ b/v4.0/src/CMD/COMMAND/TSPC.ASM
@@ -0,0 +1,488 @@
1 page 80,132
2; SCCSID = @(#)tspc.asm 4.1 85/09/22
3; SCCSID = @(#)tspc.asm 4.1 85/09/22
4TITLE COMMAND Transient Uninitialized DATA
5
6 INCLUDE comsw.asm
7.xlist
8.xcref
9 INCLUDE DOSSYM.INC
10 INCLUDE comequ.asm
11 INCLUDE comseg.asm
12 INCLUDE EA.inc ;AN030;
13.list
14.cref
15
16; Uninitialized transient data
17TRANSPACE SEGMENT PUBLIC BYTE
18
19 PUBLIC ALLSWITCH
20 PUBLIC append_exec ;AN041;
21 PUBLIC arg
22 PUBLIC argbufptr
23 PUBLIC ARGC
24 PUBLIC ARG1S
25 PUBLIC ARG2S
26 PUBLIC ARGTS
27 PUBLIC arg_buf
28 PUBLIC ASCII
29 PUBLIC BatBuf
30 PUBLIC BatBufEnd
31 PUBLIC BatBufPos
32 PUBLIC BATHAND
33 PUBLIC BINARY
34 PUBLIC BITS
35 PUBLIC BWDBUF
36 PUBLIC BYTCNT
37 PUBLIC bytes_free
38 PUBLIC CFLAG
39 PUBLIC CHARBUF
40 PUBLIC CHKDRV
41 PUBLIC COM
42 PUBLIC COMBUF
43 PUBLIC comma
44 PUBLIC comptr
45 PUBLIC comspec_flag
46 PUBLIC COMSW
47 PUBLIC CONCAT
48 PUBLIC concat_xa ;AN000;
49 PUBLIC copy_Num
50 PUBLIC CPDATE
51 PUBLIC CPTIME
52 PUBLIC cpyflag
53 PUBLIC CURDRV
54 PUBLIC DATE_DAY ;AN000;
55 PUBLIC DATE_MONTH ;AN000;
56 PUBLIC DATE_OUTPUT ;AN000;
57 PUBLIC DATE_TYPE ;AN000;
58 PUBLIC DATE_YEAR ;AN000;
59 PUBLIC DEST
60 PUBLIC DESTBUF
61 PUBLIC DestClosed
62 PUBLIC DESTDIR
63 PUBLIC DESTFCB
64 PUBLIC DESTFCB2
65 PUBLIC DESTHAND
66 PUBLIC DESTINFO
67 PUBLIC DESTISDEV
68 PUBLIC DESTISDIR
69 PUBLIC DESTNAME
70 PUBLIC DESTSIZ
71 PUBLIC DESTSWITCH
72 PUBLIC DESTTAIL
73 PUBLIC DESTVARS
74 PUBLIC DIRBUF
75 PUBLIC DIRCHAR
76 PUBLIC dirflag ;AN015;
77 PUBLIC Dir_Num
78 PUBLIC display_ioctl ;AN000;
79 PUBLIC display_mode ;AN000;
80 PUBLIC display_width ;AN000;
81 PUBLIC DRIVE_NUMBER ;AN000;
82 PUBLIC DRIVE_OUTPUT ;AN000;
83 PUBLIC DRIVE_TYPE ;AN000;
84 PUBLIC DRIVE_VALUE ;AN000;
85 PUBLIC ELCNT
86 PUBLIC ELPOS
87 PUBLIC EXECPATH
88 PUBLIC EXEC_ADDR
89 PUBLIC EXEFCB
90 PUBLIC expand_star
91 PUBLIC ext_entered ;AN005;
92 PUBLIC ext_open_off ;AN000;
93 PUBLIC ext_open_parms ;AN000;
94 PUBLIC ext_open_seg ;AN000;
95 PUBLIC FBUF
96 PUBLIC FILECNT
97 PUBLIC file_size_high
98 PUBLIC file_size_low
99 PUBLIC FILTYP
100 PUBLIC FIRSTDEST
101 PUBLIC FRSTSRCH
102 PUBLIC FULLSCR
103 PUBLIC GOTOLEN
104 PUBLIC HEADCALL
105 PUBLIC ID
106 PUBLIC IDLEN
107 PUBLIC IFNOTFLAG
108 PUBLIC if_not_count
109 PUBLIC INEXACT
110 PUBLIC INTERNATVARS
111 PUBLIC KPARSE
112 PUBLIC last_arg
113 PUBLIC LINCNT
114 PUBLIC LINLEN
115 PUBLIC linperpag ;AN000;
116 PUBLIC major_ver_num
117 PUBLIC MELCOPY
118 PUBLIC MELSTART
119 PUBLIC minor_ver_num
120 PUBLIC msg_flag ;AN022;
121 PUBLIC msg_numb ;AN022;
122 PUBLIC NOWRITE
123 PUBLIC NXTADD
124 PUBLIC objcnt
125 PUBLIC one_char_val
126 PUBLIC PARM1
127 PUBLIC PARM2
128 PUBLIC parse_last ;AN018;
129 PUBLIC PARSE1_ADDR ;AN000;
130 PUBLIC PARSE1_CODE ;AN000;
131 PUBLIC PARSE1_OUTPUT ;AN000;
132 PUBLIC PARSE1_SYN ;AN000;
133 PUBLIC PARSE1_TYPE ;AN000;
134 PUBLIC PATHCNT
135 PUBLIC pathinfo
136 PUBLIC PATHPOS
137 PUBLIC PATHSW
138 PUBLIC PLUS
139 PUBLIC plus_comma
140 PUBLIC print_err_flag ;AN000;
141 PUBLIC psep_char
142 PUBLIC RCH_ADDR
143 PUBLIC RDEOF
144 PUBLIC RE_INSTR
145 PUBLIC RESSEG
146 PUBLIC SCANBUF
147 PUBLIC SDIRBUF
148 PUBLIC search_best
149 PUBLIC search_best_buf
150 PUBLIC search_curdir_buf
151 PUBLIC search_error
152 PUBLIC SKPDEL
153 PUBLIC SOURCE
154 PUBLIC SPECDRV
155 PUBLIC SRCBUF
156 PUBLIC SRCHAND
157 PUBLIC SRCINFO
158 PUBLIC SRCISDEV
159 PUBLIC SRCISDIR
160 PUBLIC SRCPT
161 PUBLIC SRCSIZ
162 PUBLIC SRCTAIL
163 PUBLIC SRCVARS
164 PUBLIC srcxname
165 PUBLIC src_xa_seg ;AN000;
166 PUBLIC src_xa_size ;AN000;
167 PUBLIC STACK
168 PUBLIC STARTEL
169 PUBLIC string_ptr_2
170;AD061; PUBLIC string_ptr_2_sb ;AN000;
171 PUBLIC subst_buffer ;AN061;
172 PUBLIC SWITCHAR
173 PUBLIC system_cpage
174 PUBLIC TERMREAD
175 PUBLIC TIME_FRACTION ;AN000;
176 PUBLIC TIME_HOUR ;AN000;
177 PUBLIC TIME_MINUTES ;AN000;
178 PUBLIC TIME_OUTPUT ;AN000;
179 PUBLIC TIME_SECONDS ;AN000;
180 PUBLIC TIME_TYPE ;AN000;
181 PUBLIC TPA
182 PUBLIC tpbuf
183 PUBLIC TRANSPACEEND
184 PUBLIC TRAN_TPA
185 PUBLIC trgxname
186 PUBLIC UCOMBUF
187 PUBLIC USERDIR1
188 PUBLIC vol_drv
189 PUBLIC vol_ioctl_buf ;AC030;
190 PUBLIC vol_serial ;AC030;
191 PUBLIC vol_label ;AC030;
192 PUBLIC WRITTEN
193 PUBLIC xa_cp_length ;AN030;
194 PUBLIC xa_cp_out ;AN030;
195 PUBLIC xa_list_attr ;AN030;
196 PUBLIC zflag
197
198 IF IBM
199 PUBLIC ROM_CALL
200 PUBLIC ROM_CS
201 PUBLIC ROM_IP
202 ENDIF
203
204
205 ORG 0
206ZERO = $
207SRCXNAME DB DIRSTRLEN + 20 DUP (?) ;g buffer for name translate
208TRGXNAME DB DIRSTRLEN + 20 DUP (?) ;g buffer for name translate
209UCOMBUF DB COMBUFLEN+3 DUP(?) ; Raw console buffer
210COMBUF DB COMBUFLEN+3 DUP(?) ; Cooked console buffer
211USERDIR1 DB DIRSTRLEN+3 DUP(?) ; Storage for users current directory
212EXECPATH DB COMBUFLEN+3 DUP(?) ; Path for external command
213RE_INSTR DB DIRSTRLEN+3+13 DUP (?) ; path for input to redirection
214
215; Variables passed up from resident
216HEADCALL LABEL DWORD
217 DW ?
218RESSEG DW ?
219TPA DW ?
220SWITCHAR DB ?
221DIRCHAR DB ?
222EXEC_ADDR DD ?
223RCH_ADDR DD ?
224fTest DW ?
225TRAN_TPA DW ?
226
227CHKDRV DB ?
228RDEOF LABEL BYTE ; Misc flags
229IFNOTFLAG LABEL BYTE
230FILTYP DB ?
231CURDRV DB ?
232concat_xa db 0 ;AN000; flag for XA on file concatenations
233CONCAT LABEL BYTE
234PARM1 DB ?
235ARGC LABEL BYTE
236PARM2 DB ?
237COMSW DW ? ; Switches between command and 1st arg
238ARG1S DW ? ; Switches between 1st and 2nd arg
239DESTSWITCH LABEL WORD
240ARG2S DW ? ; Switches after 2nd arg
241ALLSWITCH LABEL WORD
242ARGTS DW ? ; ALL switches except for COMSW
243CFLAG DB ?
244DESTCLOSED LABEL BYTE
245SPECDRV DB ?
246BYTCNT DW ? ; Size of buffer between RES and TRANS
247NXTADD DW ?
248FRSTSRCH DB ?
249LINCNT DB ?
250LINLEN DB ?
251FILECNT DW ?
252CHARBUF DB 80 DUP (?) ;line byte character buffer for xenix write
253DESTFCB2 LABEL BYTE
254IDLEN DB ?
255ID DB 8 DUP(?)
256COM DB 3 DUP(?)
257DEST DB 37 DUP(?)
258DESTNAME DB 11 DUP(?)
259DESTFCB LABEL BYTE
260DESTDIR DB DIRSTRLEN DUP(?) ; Directory for PATH searches
261GOTOLEN LABEL WORD
262BWDBUF LABEL BYTE
263EXEFCB LABEL WORD
264DIRBUF DB DIRSTRLEN+3 DUP(?)
265SDIRBUF DB 12 DUP(?)
266BITS DW ?
267PATHCNT DW ?
268PATHPOS DW ?
269PATHSW DW ?
270FULLSCR DW ?
271comma db 0 ;g flag set if +,, occurs
272plus_comma db 0 ;g flag set if +,, occurs
273dirflag db 0 ;AN015; set when pathcrunch called from DIR
274parse_last dw 0 ;AN018; used to hold parsing position
275
276system_cpage DW 0 ;AC001; used for CHCP variable
277src_XA_size DW 0 ;AN000; size of extended attributes
278src_XA_seg DW 0 ;AN000; segment of extended attributes
279
280ext_open_parms label byte ;AN000; extended open parameter list
281;emg340 ext_open_off dw offset trangroup:srcbuf ;AN000; offset of file name
282ext_open_off dw ? ;AN030; offset of extended attributes
283ext_open_seg dw ? ;AN000; segment of extended attributes
284 dw 0 ;AN000; no additional parameters
285
286XA_cp_out label byte ;AN030; list for one extended attribute
287 DW 1 ;AN030; count of entries
288 DB EAISBINARY ;AN030; ea_type
289 DW EASYSTEM ;AN030; ea_flags
290 DB ? ;AN030; ea_rc
291 DB 2 ;AN030; ea_namelen
292 DW 2 ;AN030; ea_valuelen
293 DB "CP" ;AN030; ea_name
294xa_list_attr DW 0 ;AC030; code page
295xa_cp_length DW $-XA_cp_out ;AN030; length of buffer
296
297
298
299arg_buf db 128 dup (?)
300file_size_low dw ? ;AC000;
301file_size_high dw ? ;AC000;
302string_ptr_2 dw ?
303;AD061;string_ptr_2_sb dw ?
304copy_Num dw ?
305cpyflag db ?
306Dir_Num DW ?
307bytes_free dw ?
308 dw ?
309major_ver_num dw ?
310minor_ver_num dw ?
311one_char_val db ?,0
312vol_drv db ?
313
314IF IBM
315ROM_CALL DB ? ; flag for rom function
316ROM_IP DW ?
317ROM_CS DW ?
318ENDIF
319
320DESTVARS LABEL BYTE
321DESTISDIR DB ?
322DESTSIZ DB ?
323DESTTAIL DW ?
324DESTINFO DB ?
325DESTBUF DB DIRSTRLEN + 20 DUP (?)
326
327DESTHAND DW ?
328DESTISDEV DB ?
329FIRSTDEST DB ?
330MELCOPY DB ?
331MELSTART DW ?
332
333SRCVARS LABEL BYTE
334SRCISDIR DB ?
335SRCSIZ DB ?
336SRCTAIL DW ?
337SRCINFO DB ?
338SRCBUF DB DIRSTRLEN + 20 DUP (?)
339
340SRCHAND DW ?
341SRCISDEV DB ?
342
343SCANBUF DB DIRSTRLEN + 20 DUP (?)
344
345SRCPT DW ?
346INEXACT DB ?
347NOWRITE DB ?
348BINARY DB ?
349WRITTEN DW ?
350TERMREAD DB ?
351ASCII DB ?
352PLUS DB ?
353objcnt db ? ; Used in copy
354CPDATE DW ?
355CPTIME DW ?
356BATHAND DW ? ; Batch handle
357STARTEL DW ?
358ELCNT DB ?
359ELPOS DB ?
360SKPDEL DB ?
361SOURCE DB 11 DUP(?)
362
363ext_entered db 0 ;AN005;
364
365display_ioctl db 0 ;AN000; info level
366 db 0 ;AN000; reserved
367 dw crt_ioctl_ln ;AN000; length of data
368 dw ? ;AN000; control flags
369display_mode db ? ;AN000; display mode, colors
370 db 0 ;AN000; reserved
371 dw ? ;AN023; colors
372 dw ? ;AN000; display width (PELS)
373 dw ? ;AN000; display length (PELS)
374display_width dw ? ;AN000; display width
375linperpag dw linesperpage ;AN000; display length (default to linesperpage)
376
377vol_ioctl_buf label byte ;AN000; buffer for ioctl volume label/serial call
378 dw 0 ;AN000; info level
379vol_serial dd 0 ;AN000; volume serial number
380vol_label db 11 dup (" ") ;AN000; volume label - init to blanks
381 db 8 dup (" ") ;AN000; file system type
382
383expand_star db ?
384comspec_flag db ?
385msg_flag db ? ;AN022; flag set if non-utility message issued
386msg_numb dw 0 ;AN022; set with extended error message issued
387append_exec db 0 ;AN041; set if internal append executed
388print_err_flag dw 0 ;AN000; flag set if error during sysdispmsg
389subst_buffer db parm_block_size*2 dup (0);AN061;
390
391;;;; IF KANJI 3/3/KK
392KPARSE DB ?
393;;;; ENDIF 3/3/KK
394
395; Data declarations taken out of parse.asm
396
397arg arg_unit <> ; pointers, arg count, string buffer
398argbufptr DW ? ; index for argv[].argpointer
399tpbuf DB 128 DUP (?) ; temporary buffer
400LAST_ARG DW ? ; point at which to accumulate switch info
401comptr dw ? ; ptr into combuf
402
403; Data declarations taken out of path.asm
404fbuf find_buf <> ; dma buffer for findfirst/findnext
405pathinfo DW 3 DUP (?) ; ES, SI(old), and SI(new) of user path
406psep_char DB ? ; '/' or '\'
407search_best DB (?) ; best code, best filename so far
408fname_max_len equ 13
409search_best_buf DB fname_max_len DUP (?)
410search_curdir_buf DB 64 DUP (?) ; a place for CurDir info, if successful
411search_error DW (?) ; address of error message to be printed
412
413; Data declarations taken out of tbatch.asm
414if_not_count DW ?
415
416zflag db ? ; Used by typefil to indicate ^Z's
417
418 DW 80H DUP(0) ; Init to 0 to make sure the linker is not fooled
419STACK LABEL WORD
420
421INTERNATVARS internat_block <>
422 DB (internat_block_max - ($ - INTERNATVARS)) DUP (?)
423
424BatBufPos DW ? ; integer position in buffer of next byte
425BatBuf DB BatLen DUP (?)
426BatBufEnd DW ?
427
428; *****************************************************
429; EMG 4.00
430; DATA STARTING HERE WAS ADDED BY EMG FOR 4.00
431; FOR IMPLEMENTATION OF COMMON PARSE ROUTINE
432; *****************************************************
433;
434; COMMON PARSE OUTPUT BLOCKS
435;
436
437
438;
439; Common output blocks for PARSE number, complex, or string values.
440;
441
442PARSE1_OUTPUT LABEL BYTE ;AN000;
443PARSE1_TYPE DB 0 ;AN000; type
444PARSE1_CODE DB 0 ;AN000; return value
445PARSE1_SYN DW 0 ;AN000; es offset of synonym
446PARSE1_ADDR DD 0 ;AN000; numeric value / address
447 ; of string value
448
449;
450; Common output block for PARSE date strings.
451;
452
453DATE_OUTPUT LABEL BYTE ;AN000;
454DATE_TYPE DB 0 ;AN000; type
455 DB 0 ;AN000; return value
456 DW 0 ;AN000; es offset of synonym
457DATE_YEAR DW 0 ;AN000; year
458DATE_MONTH DB 0 ;AN000; month
459DATE_DAY DB 0 ;AN000; day
460
461;
462; Common output block for PARSE time strings.
463;
464
465TIME_OUTPUT LABEL BYTE ;AN000;
466TIME_TYPE DB 0 ;AN000; type
467 DB 0 ;AN000; return value
468 DW 0 ;AN000; es offset of synonym
469TIME_HOUR DB 0 ;AN000; hour
470TIME_MINUTES DB 0 ;AN000; minutes
471TIME_SECONDS DB 0 ;AN000; seconds
472TIME_FRACTION DB 0 ;AN000; hundredths
473
474;
475; Common output block for PARSE drive specifier (one based drive number).
476;
477
478DRIVE_OUTPUT LABEL BYTE ;AN000;
479DRIVE_TYPE DB 0 ;AN000; type
480DRIVE_VALUE DB 0 ;AN000; return value
481 DW 0 ;AN000; es offset of synonym
482DRIVE_NUMBER DB 0 ;AN000; drive number
483 DB 0,0,0 ;AN000; reserved
484
485TRANSPACEEND LABEL BYTE
486
487TRANSPACE ENDS
488 END