]>
Commit | Line | Data |
---|---|---|
e58a7a25 L |
1 | ; CPSKER.ASM\r |
2 | ; KERMIT - (Celtic for "FREE")\r | |
3 | ;\r | |
4 | ; This is the CP/M-80 implementation of the Columbia University\r | |
5 | ; KERMIT file transfer protocol.\r | |
6 | ;\r | |
7 | ; Version 4.0\r | |
8 | ;\r | |
9 | ; Copyright June 1981,1982,1983,1984\r | |
10 | ; Columbia University\r | |
11 | ;\r | |
12 | ; Originally written by Bill Catchings of the Columbia University Center for\r | |
13 | ; Computing Activities, 612 W. 115th St., New York, NY 10025.\r | |
14 | ;\r | |
15 | ; Contributions by Frank da Cruz, Daphne Tzoar, Bernie Eiben,\r | |
16 | ; Bruce Tanner, Nick Bush, Greg Small, Kimmo Laaksonen, Jeff Damens, and many\r | |
17 | ; others. \r | |
18 | ;\r | |
19 | ;\r | |
20 | ; This is the header for the system-independent portion of KERMIT, which\r | |
21 | ; consists of the following files (in this order):\r | |
22 | ;\r | |
23 | ; CPSKER.ASM - this file\r | |
24 | ; CPSDEF.ASM - definitions for both KERMIT and KERSYS\r | |
25 | ; CPSMIT.ASM - \initialization, main loop, miscellaneous commands \r | |
26 | ; CPSCOM.ASM - /(BYE, EXIT, LOG, SET, SHOW, and STATUS) (Part1 of 2)\r | |
27 | ; CPSPK1.ASM - \the KERMIT protocol handler (SEND, RECEIVE, LOGOUT,\r | |
28 | ; CPSPK2.ASM - / and FINISH commands) (In two parts)\r | |
29 | ; CPSREM.ASM - REMOTE commands etc\r | |
30 | ; CPSSER.ASM - SERVER commands etc (Empty as yet)\r | |
31 | ; CPSTT.ASM - the transparent commands (TRANSMIT, CONNECT)\r | |
32 | ; CPSCPM.ASM - CP/M commands (DIR, ERA)\r | |
33 | ; CPSWLD.ASM - the wildcard handler\r | |
34 | ; CPSCMD.ASM - the command parser\r | |
35 | ; CPSUTL.ASM - utility routines\r | |
36 | ; CPSDAT.ASM - Data space and the overlay link space\r | |
37 | ;\r | |
38 | ; When building the system-independent part with M80 or MAC80, CPSKER\r | |
39 | ; INCLUDEs the other files; when building with LASM, each file LINKs to\r | |
40 | ; the next file.\r | |
41 | ;\r | |
42 | ; For now, the system-dependent routines are all in CPSSYS.ASM, with\r | |
43 | ; the actual configuration defined in CPSTYP.ASM.\r | |
44 | ;\r | |
45 | ; revision history (latest first):\r | |
46 | ;\r | |
47 | ; Begin CP/M Kermit-80 version 4.11.\r | |
48 | ;edit 32, 1-Apr-1991 by MF. Official release of work to date as CP/M Kermit\r | |
49 | ; (Kermit-80) Version 4.11.\r | |
50 | ; Modified edit level of cpscpm.asm to reflect a bug fix for the TYPE\r | |
51 | ; command introduced with edit 13.\r | |
52 | ;edit 31, 29-Mar-1991 by MF. Modified edit levels of cpsker.asm,\r | |
53 | ; cpscom.asm and cpsdat.asm to reflect rename of parameter vermin to\r | |
54 | ; revno (revision level) and change of SET COLLISION REPLACE to\r | |
55 | ; SET COLLISION OVERWRITE to conform with C-Kermit. Modified\r | |
56 | ; edit level of cpsrem.asm to reflect change from REMOTE SET FILE\r | |
57 | ; COLLISION REPLACE to REMOTE SET FILE COLLISION OVERWRITE.\r | |
58 | ; Modified edit level of cpsutl.asm to reflect code tightening and\r | |
59 | ; edit levels of cpsmit.asm and cpspk2.asm to close any open TAKE-file\r | |
60 | ; and abort take-file processing if ^C is typed from the console\r | |
61 | ; Also corrected ^Z test in cpsmit.asm in INPUT command ("inp2b")\r | |
62 | ; Implement "file not found" complaint if a TAKE command can't find\r | |
63 | ; the TAKE-file and it's not the initial TAKE (KERMIT.INI)\r | |
64 | ; Modified edit level of cpscpm.asm to reflect modification of the\r | |
65 | ; TYPE and PRINT commands to cancel file typeout/printout completely\r | |
66 | ; if ^C is entered on the console (either immediately or after a key\r | |
67 | ; has been pressed to induce a pause) and to immediately begin\r | |
68 | ; typeout/printout of the next file (if the filespec was wild-carded)\r | |
69 | ; if ^X is entered (either immediately or after a key has been pressed\r | |
70 | ; to induce a pause).\r | |
71 | ; Modified edit levels of cpsmit.asm and cpscom.asm to reflect addition\r | |
72 | ; of the STAY command as a synonym for SET NO-EXIT.\r | |
73 | ;edit 30, 27-Feb-1991 by MF. Modified edit levels of cpscom.asm,\r | |
74 | ; cpsmit.asm, cpsutl.asm and cpsdat.asm to reflect provision for\r | |
75 | ; a "revision level" field (1-26=A-Z), addition of QUIT as a synonym\r | |
76 | ; for the EXIT command, recognition of C, R and S as abbreviations\r | |
77 | ; for the CONNECT, RECEIVE and SEND commands, respectively, display\r | |
78 | ; of Kermit version in the VERSION command and a fix to the TAKE-file\r | |
79 | ; input routine "r1tchr" to prevent semicolons from being interpreted\r | |
80 | ; as command separators during TAKE-file execution. This last fix\r | |
81 | ; allows such commands as REMOTE DELETE *.*;* to Kermit-32 to\r | |
82 | ; operate as expected.\r | |
83 | ;edit 29, 14-Feb-1991 by MF. Updated edit levels of cpscom.asm,\r | |
84 | ; cpscpm.asm, cpsdat.asm and cpsrem.asm to reflect bug fixes,\r | |
85 | ; code tightening and simplified routine "remcli" (in cpsrem.asm)\r | |
86 | ; which gets text to be passed on to a remote Kermit in REMOTE\r | |
87 | ; Kermit commands.\r | |
88 | ;edit 28, 8-Feb-1991 by MF. Changed edit level of cpscpm.asm to reflect\r | |
89 | ; a bug fix to make TAKE-files work properly with commands such as\r | |
90 | ; INPUT which check the keyboard for input.\r | |
91 | ;edit 27, 30-Jan-1991 by MF. Changed edit levels of cpscpm.asm, cpsrem.asm,\r | |
92 | ; cpstt.asm and cpsutl.asm to reflect bug fixes and enhancements\r | |
93 | ;edit 26, 17-Jan-1991 by MF. Changed edit level of cpscmd.asm to\r | |
94 | ; reflect fixes to allow leading spaces/tabs to be ignored when\r | |
95 | ; parsing keywords (this was the intent but the code never worked\r | |
96 | ; correctly) and to blank the entire fcb in "cmifil" to allow successive\r | |
97 | ; COPY commands to function properly. Also changed edit level of\r | |
98 | ; cpspk1.asm to reflect further work on "disk full" error reporting.\r | |
99 | ;edit 25, 14-Jan-1991 by MF. Incremented edit level of cpspk1.asm to\r | |
100 | ; reflect bug fix to "disk full" error reporting code so <cr><lf>\r | |
101 | ; is not sent directly to the Remote Kermit. This per a report from\r | |
102 | ; Russell Lang of Australia's Monash University.\r | |
103 | ;edit 24, 10-Jan-1991 by MF. Modified edit level of cpxtyp.asm to\r | |
104 | ; reflect addition of "terminal required" message for some.\r | |
105 | ; machines.\r | |
106 | ;edit 23, 7-Jan-1991 by MF. Modified edit levels of cpxtyp.asm, cpxswt.asm,\r | |
107 | ; cpxbbi.asm to reflect addition of Ampro Little Board support.\r | |
108 | ;edit 22, 3-Jan-1991 by MF. Incremented edit levels of cpspk1.asm/cpspk2.asm\r | |
109 | ; to reflect further mods to "sdata" and "inchr" routines.\r | |
110 | ;edit 21, 2-Jan-1991 by MF. Incremented edit level of cpspk1.asm to reflect\r | |
111 | ; code cleanup in "sdata" routine.\r | |
112 | ;edit 20, 26-Dec-1990 by MF. Modified edit level of CPSCMD.ASM to reflect\r | |
113 | ; fix to allow leading white space to be skipped in lines from\r | |
114 | ; TAKE-files as well as from the CP/M command-line tail; this per a\r | |
115 | ; phoned-in bug-report to Dr. Martin J. Carter of Nottingham\r | |
116 | ; University in the U.K. (PPZMAJOC@vax.ccc.nottingham.ac.uk)\r | |
117 | ;edit 19, 14-Dec-1990 by MF. Modified edit level of cpspk2.asm to reflect\r | |
118 | ; modification to "gofil" to allow drive specifications in 2nd\r | |
119 | ; filename of GET and RECEIVE commands; also modified edit levels of\r | |
120 | ; cpspk1.asm and cpsrem.asm to reflect addition of "<<>>" around\r | |
121 | ; "X" or "F" packets coming as a reply to a REMOTE command and\r | |
122 | ; deletion of an unnecessary instruction before label remc2d\r | |
123 | ; in cpsrem.asm.\r | |
124 | ;edit 18, 9-Dec-1990 by MF. Modified edit levels for Version 4.10\r | |
125 | ; yet another time to reflect changes in CPSDAT.ASM to clarify\r | |
126 | ; "File size on DIR" status message.\r | |
127 | ;edit 17, 4-Dec-1990 by MF. Adjusted edit levels of cpscom.asm/cpsdat.asm\r | |
128 | ; to reflect addition of Autoreceive status to SHOW/STATUS display.\r | |
129 | ;edit 16, 30-Nov-1990 by MF. Adjusted edit levels of cpscom.asm/cpsdat.asm\r | |
130 | ; to reflect fix to SHOW/STATUS routines to show terminal display\r | |
131 | ; mode (quiet/regular). Also adjusted edit level of cpsutl.asm to reflect\r | |
132 | ; change to routine "p20ln" to use "pausit" to save code space.\r | |
133 | ; Adjusted edit level of cpsdef.asm to reflect change in "fairness"\r | |
134 | ; counter prfair from 100 to 50 to make terminal a bit more responsive\r | |
135 | ; during CONNECTs.\r | |
136 | ;edit 15, 27-Nov-1990 by MF. Adjusted edit level of cpspk1.asm to reflect\r | |
137 | ; a bug fix.\r | |
138 | ;edit 14, 27-Nov-1990 by MF. Again adjusted edit level of cpspk1.asm to\r | |
139 | ; reflect modifications of "disk-full"and SET INCOMPLETE-FILES behavior.\r | |
140 | ;edit 13, 23 Nov-1990 by MF. Adjusted edit level of cpspk1.asm to reflect\r | |
141 | ; code changes for "disk full" processing.\r | |
142 | ;edit 12, 8-Nov-1990 by MF.\r | |
143 | ; Adjusted edit levels shown for cpscom.asm/cpspk1.asm/cpsdat.asm to\r | |
144 | ; reflect bug fixes and code revisions.\r | |
145 | ;edit 11, 5-Nov-1990 by MF.\r | |
146 | ; Cosmetic changes for main help text for COPY and RENAME commands.\r | |
147 | ; Begin CP/M Kermit-80 version 4.10.\r | |
148 | ;edit 10, 2-Nov-1990 by MF. Moved Overlay address to 7000H (cpsdat.asm).\r | |
149 | ;edit 9, 1-Nov-1990 by Mike Freeman (BPA). Cosmetic changes (command-name\r | |
150 | ; changes: SET BAUD-RATE==>SET SPEED, FCOPY==>COPY, FRENAME==>RENAME,\r | |
151 | ; STRING==>OUTPUT, REMOTE CWD==>REMOTE CD per suggestions of FDC\r | |
152 | ; to aid in uniformity of nomenclature for various Kermits.\r | |
153 | ;edit 8, 30-Oct-1990 by Michael Freeman; 301 N.E. 107th Street;\r | |
154 | ; Vancouver, WA 98685 USA; Telephone (206)574-8221.\r | |
155 | ; Work: Bonneville Power Administration\r | |
156 | ; P.O. Box 491 M/S MORF\r | |
157 | ; Vancouver, WA USA 98666\r | |
158 | ; Telephone (206)690-2307\r | |
159 | ; Implemented FRENAME command to rename a CP/M file.\r | |
160 | ; Implemented many Remote commands, variable-length packets up thru\r | |
161 | ; 94 characters in length. Fixed a bug in CPSCOM.ASM in the\r | |
162 | ; routine "getnp" and a bug in CPSCOM.ASM which caused garbage to appear\r | |
163 | ; on the screen when PRTSTR was called with QUIETD flag set.\r | |
164 | ; Modified code in module CPSCMD.ASM to skip leading spaces and tabs\r | |
165 | ; when getting Kermit commands from the CP/M command line. This also\r | |
166 | ; obviates the necessity to type a leading semicolon to separate the\r | |
167 | ; Kermit command from the Kermit commands on the CP/M command line.\r | |
168 | ; Fixed code in CPSPK2.ASM which handles file collision detection\r | |
169 | ; and resulting file rename per my entries in CPKERM.BWR.\r | |
170 | ; and included fix by Russell Lang of Dept. of Electrical and Computer\r | |
171 | ; Engineering, Monash University, Australia, to prevent renamed\r | |
172 | ; files with SET WARNING ON from having the attributes (e.g., R/O)\r | |
173 | ; copied from original file. Mr. Lang's E-mail address is:\r | |
174 | ; Russell Lang Email: rjl@monu1.cc.monash.edu.au Phone: (03) 565 3460\r | |
175 | ; Department of Electrical and Computer Systems Engineering\r | |
176 | ; Monash University, Australia\r | |
177 | ; Also fixed a bug in CPSPK2.ASM which prevented completion messages\r | |
178 | ; from being displayed if terminal was set to QUIET.\r | |
179 | ; Implemented most proposed SET FILE-COLLISION (COLLISION) commands.\r | |
180 | ; Implemented SET INCOMPLETE file disposition command.\r | |
181 | ; Implemented a few of the proposed REMOTE SET commands.\r | |
182 | ; Implemented other fixes suggested in CPKERM.BWR.\r | |
183 | ; Moved overlay address to 6C00H.\r | |
184 | ; Changed location of .printx in this file so LASM doesn't complain.\r | |
185 | ; In system-dependent modules, included HP-125 support.\r | |
186 | ; Also modified Telcon Zorba code in CPXHEA.ASM to enable setting\r | |
187 | ; of baud-rates and sending of a break.\r | |
188 | ; Included Russell Lang of Monash Univ. Australia's implementation\r | |
189 | ; for the Microbee series of computers (CPXBEE.ASM).\r | |
190 | ; Fixed COMPUPRO version of Kermit to compile correctly and to\r | |
191 | ; conform to current syntax for setting baud-rate.\r | |
192 | ; edit 7, September, 1987. Added files for SERVER and REMOTE \r | |
193 | ; modules (CPSSER/CPSREM). SERVER is still empty, and may be \r | |
194 | ; only wishfull thinking. I have ideas, but I dont think I \r | |
195 | ; will have the time to implement it.\r | |
196 | ;\r | |
197 | ; edit 6: 30 March, 1987 by OBSchou. Start Kermit-80 V4.09 with the \r | |
198 | ; overlay address at 6000h. Also adjusted the INCLUDEs to allow\r | |
199 | ; M80 to assmeble these files.\r | |
200 | ;\r | |
201 | ; edit 5: 20 June, 1986. Have added so much code etc that the overlay had to \r | |
202 | ; be moved again.. give it to 5000h. This starts off Kermit-80 V4.08\r | |
203 | ;\r | |
204 | ; edit 4 22 April 1986\r | |
205 | ; Start work on 4.06. This should clear up a couple of bugs, add in\r | |
206 | ; a few features, and split the system dependent stuff into \r | |
207 | ; smaller units.\r | |
208 | ;\r | |
209 | ; edit 3a 7 March 86 OBSchou Loughborough england. Minor additions\r | |
210 | ; to cpsker.asm, cpscmd.asm and cpspkt.asm.\r | |
211 | ;\r | |
212 | ; edit 3: February 10, 1985 (CJC)\r | |
213 | ; Update for v4.05; add "verno" so CPSUTL doesn't have to change\r | |
214 | ; just because some other module did.\r | |
215 | ;\r | |
216 | ; edit 2: September 10, 1984 (CJC)\r | |
217 | ; Update for v4.03.\r | |
218 | ;\r | |
219 | ; edit 1: July 27, 1984 (CJC)\r | |
220 | ; Created to allow assembly of Kermit by LASM as well as MAC80 and M80.\r | |
221 | \r | |
222 | verno EQU 11 ; minor version number\r | |
223 | revno EQU 0 ;[MF]Revision level\r | |
224 | ;[MF]0-26 yields A-Z\r | |
225 | \r | |
226 | ; Version 4.10 of Kermit consists of the following edit levels:\r | |
227 | ; cpsker.asm edit 32\r | |
228 | ; cpsdef.asm edit 9\r | |
229 | ; cpsmit.asm edit 30\r | |
230 | ; cpscom.asm edit 13\r | |
231 | ; cpspk1.asm edit 23\r | |
232 | ; cpspk2.asm edit 11\r | |
233 | ; cpsrem.asm edit 13\r | |
234 | ; cpsser.asm edit 1\r | |
235 | ; cpstt.asm edit 12\r | |
236 | ; cpscpm.asm edit 14\r | |
237 | ; cpswld.asm edit 4\r | |
238 | ; cpscmd.asm edit 13\r | |
239 | ; cpsutl.asm edit 30\r | |
240 | ; cpsdat.asm edit 19\r | |
241 | ; cpxlnk.asm edit 8 (cpslnk.asm is not assembled with cpsker, but it\r | |
242 | ; defines the linkage area expected by cpsker, and so must\r | |
243 | ; match the description in cpsutl.asm)\r | |
244 | ; cpxswt.asm edit 10\r | |
245 | ;\r | |
246 | ; Version 4.10 of Kermit has been tested with the following edit levels of\r | |
247 | ; the system-dependent files:\r | |
248 | ; cpxtyp.asm edit 34\r | |
249 | ; cpxsys.asm edit 40\r | |
250 | ; cpxhea.asm edit 4\r | |
251 | ; cpxtor.asm edit 4\r | |
252 | ; cpxbbi.asm edit 4 (Ampro Little Board)\r | |
253 | ;\r | |
254 | ; Version 4.10 of Kermit is still to be tested fully against all known systems\r | |
255 | ; so far included in the system dependent overlays.\r | |
256 | ;\r | |
257 | \r | |
258 | \r | |
259 | FALSE equ 0\r | |
260 | TRUE equ NOT FALSE\r | |
261 | \r | |
262 | cpsker equ TRUE ; building system-independent part\r | |
263 | debug equ FALSE ; set false for running system. True => does some\r | |
264 | ; unusual or unexpected things.\r | |
265 | ;\r | |
266 | ; Assembler type. Define the appropriate one TRUE, the rest FALSE. (We can't\r | |
267 | ; use ASM, because it cannot handle multiple input files)\r | |
268 | mac80 EQU FALSE ; For assembly via MAC80 cross-assembler.\r | |
b0db0839 L |
269 | m80 EQU TRUE ; For assembly via Microsoft's M80.\r |
270 | lasm EQU FALSE ; For assembly via LASM, a public-domain\r | |
e58a7a25 L |
271 | ; assembler.\r |
272 | ;\r | |
273 | ; Get the other modules...\r | |
274 | \r | |
275 | IF lasm ; If we're linking, go on to the next file.\r | |
276 | LINK CPSDEF\r | |
277 | ENDIF;lasm\r | |
278 | \r | |
279 | ; If we're still here, we must be using M80 or MAC80. M80 doesn't\r | |
280 | ; like ENDs inside conditionals, but the END statement has to be\r | |
281 | ; in CPSUTL for LASM (otherwise, we'd need a file containing just an\r | |
282 | ; END statement). So, we leave off the IF m80 OR mac80 conditional\r | |
283 | ; that ought to be around these INCLUDEs. No problem until the next\r | |
284 | ; incompatible assembler comes along...\r | |
285 | ; Let's first say where we are:\r | |
286 | ;\r | |
287 | .printx * CPSKER.ASM (or nearest offer) *\r | |
288 | ;\r | |
289 | .printx * CPSDEF.ASM *\r | |
290 | INCLUDE CPSDEF.ASM ; definitions\r | |
291 | .printx * CPSMIT.ASM *\r | |
292 | INCLUDE CPSMIT.ASM ; initialization, main loop, some commands\r | |
293 | .printx * CPSCOM.ASM *\r | |
294 | INCLUDE CPSCOM.ASM ; part of command/status/set etc\r | |
295 | .printx * CPSPK1.ASM *\r | |
296 | INCLUDE CPSPK1.ASM ; KERMIT protocol handler (Part 1)\r | |
297 | .printx * CPSPK2.ASM *\r | |
298 | INCLUDE CPSPK2.ASM ; KERMIT protocol handler (Part 2)\r | |
299 | .printx * CPSREM.ASM *\r | |
300 | INCLUDE CPSREM.ASM ; Kermit REMOTE code (little in it, as yet)\r | |
301 | .printx * CPSSER.ASM *\r | |
302 | INCLUDE CPSSER.ASM ; Kermit SERVER code (As yet, empty)\r | |
303 | .printx * CPSTT.ASM *\r | |
304 | INCLUDE CPSTT.ASM ; transparent communication handler\r | |
305 | .printx * CPSCPM.ASM *\r | |
306 | INCLUDE CPSCPM.ASM ; CP/M command support (DIR, ERA)\r | |
307 | .printx * CPSWLD.ASM *\r | |
308 | INCLUDE CPSWLD.ASM ; wildcard handler\r | |
309 | .printx * CPSCMD.ASM *\r | |
310 | INCLUDE CPSCMD.ASM ; command parser\r | |
311 | .printx * CPSUTL.ASM *\r | |
312 | INCLUDE CPSUTL.ASM ; Various utilities and data, and END [ToadHall]\r | |
313 | .printx * CPSDAT.ASM *\r | |
314 | INCLUDE CPSDAT.ASM\r | |
315 | END ; MAC80 ignores END's in included files...\r |