A large commit.
[pdp8.git] / sw / kermit / k12 / k12mit.bwr
CommitLineData
81e70d48
PH
1Date: Fri, 1 May 1992 17:00:00 EDT
2From: Charles Lasner <lasner@watsun.cc.columbia.edu>
3Subject: DECmate I problems and more patching problems
4
5DECmate I problems.
6
7 Attempts to use the distributed Kermit-12 Version 10g on a
8DECmate (I) system will certainly fail. The coding specific to the
9DECmate I was never tested until recently. Two key routines wait for
10status flags that never raise because the affected registers do not
11generate flag changes/interrupts. This is unrelated to general
12serial data handling which works as originally coded.
13
14 There is a simple patch to the program to alleviate the problem:
15
16.LOAD SYS:KERMIT.SV/I$*$ [load the file in image mode and then
17 ask for more input. The $ which is
18 printed signifies the use of <ESC>
19 as the command terminator. The * is
20 printed by the system command
21 decoder requesting further input.
22 The second $ signifies the use of
23 <ESC> to end input to the command
24 decoder. The loader program
25 terminates and control returns to
26 the keyboard monitor.]
27
28.ODT [call in ODT to patch the program]
29
307/ 0007 0012 [change default baud rate to 2400;
31 this is optional]
32
33353/ 5352 7000 [make a JMP .-1 into a NOP]
3410302/ 5301 7000 [make a JMP .-1 into a NOP]
3512243/ 3607 3610 [bump the version number]
36
37^C [^C to exit to monitor]
38
39.SAVE SYS KERMIT [save patched file]
40
41This also updates the release revision from 10g to 10h. Future
42versions will eliminate the overhead of the now defunct routines.
43
44 The only DECmate versions remaining to be tested are:
45
46 DECmate I with DP278B (the system used for testing has DP278A)
47 DECmate III without internal modem
48 DECmate III with internal modem
49 DECmate III+
50
51Patching problems.
52
53 The restrictions placed on patching apparently stem from a bug
54going back at least as far as OS/8 V3D (likely further). Apparently,
55when a JSW value of 1 is used (as Kermit-12 does), the GET command
56doesn't work. Apparently, the system confuses the need to save the
57contents of 10000-11777 with the need to load it in the first place.
58Kermit-12 operates by first placing once-only code in the affected
59area, then discarding it in favor of a locked-in copy of the USR
60routine. To avoid overhead, the JSW value of 0001 is set to indicate
61there is no need to save this dead code when the USR is swapped in
62over it. Apparently, the GET command sets the =1 too early in the
63load process, so the code that uses the USR to carry out the actions
64of the GET operation doesn't properly load the Kermit-12 code.
65
66Consequently, the warnings documented in previous chapters of the
67.BWR file (below) apply in all cases. The interaction with CCL sited
68below may not apply in all versions, but the GET command problem is
69apparently universal.
70
71cjl
72
73------------------------------
74
75Date: Mon, 28 October 1991 20:00:00 EST
76From: Charles Lasner <lasner@watsun.cc.columbia.edu>
77Subject: Kermit-12 patching restrictions revisited yet again
78
79 Even more operating system ills (will it ever end?):
80
81 Still further investigation into operating system bugs in OS/278
82V2 on DECmates reveals that the problem in even worse that realized
83two weeks ago (see previous .BWR article):
84
85 When a SAVE command is executed from OS/278 involving a loaded
86handler, the SAVE operation fails! The contents of the files will be
87corrupted in general and will likely become (at least partially) all
88zeroes! The exact scope of the problem has not been ascertained, but
89certain loading tests reveal that the command fails even when
90accessing additional memory beyond field zero and one.
91
92 All operations to SYS: or any device co-resident with SYS: (or
93when DSK:=SYS: which is typically the case in many systems but not a
94rule) are unaffected beyond the restrictions reported previously.
95
96 Until recently, SAVE commands were of little interest to the
97casual user of OS/278, since program execution and ordinary file
98creation are unaffected. Since there are now several programs to be
99loaded and saved by users, the problem is more significent. Users of
100the direct loading method of acquiring KERMIT-12 are also in the
101affected category.
102
103 Clearly all developers and anyone assembling any part of the
104KERMIT-12 package should be aware of this problem. As a precaution,
105all persons using the SAVE command for any reason are advised to use
106the form involving SYS: only to avoid this problem. (Advanced users
107can determine which handlers are possibly co-resident and are thus
108acceptable as well.) The resultant file can always be copied to any
109device as required after the fact.
110
111cjl
112
113------------------------------
114
115Date: Thu, 10 October 1991 05:00:00 EDT
116From: Charles Lasner <lasner@watsun.cc.columbia.edu>
117Subject: Kermit-12 patching restrictions revisited and .BOO problems
118
119 More operating system ills regarding file loading:
120
121 Further investigation into operating system bugs in OS/278 V2 on
122DECmates reveals that the problem is worse than first realized:
123
124 When using GET or LOAD (ABSLDR) commands, especially when loading
125image files such as FIELD0.SV, FIELD1.SV (the partial load files from
126direct memory loading of K12MIT), or K12MIT.SV with /I, the JSW and
127starting field/address can become "mangled" into unusable values.
128One particular case achieved the impossible value of 6303 for a
129starting field change instruction (legal values are 6203 through 6273
130by 10s).
131
132 Consequently, the general recommendation for SAVE commands as
133used in various utilities throughout KERMIT-12 configuration etc., is
134to use explicit starting address and loading locations and JSW
135values. In short, always give a complete description of the SAVE
136operation under OS/278. For example, when direct-loading K12MIT
137through the printer port into the DECmate, the following commands
138should be used:
139
140}LOAD FIELD0.SV/I,FIELD1.SV/I$*$
141
142}SAVE SYS K12MIT.SV 00000-07577,10000-17577;00200=0001
143
144 As discussed earlier, the CCL form of the ABSLDR LOAD command
145works even though other seemingly equivalent forms don't. The
146complete SAVE command forces all parameters to be taken explicitly
147from the command; no reliance on system "assumptions" or loading
148artifacts. Always use the complete values for loading taken from the
149relevant program documentation.
150
151 Most users of KERMIT-12 are running OS/8 V3D, etc., where this
152sort of system bug isn't seen. In the future, all KERMIT-12
153documentation will give the "verbose" form of the command to contain
154this OS/278 V2-specific problem.
155
156Regarding .BOO format encoding:
157
158 The newest release of KERMIT-12 includes .BOO format encoding of
159all binary files and TECO macros as an alternative to ENCODE format.
160ENCODE format is still the preferred method of distribution, but .BOO
161format allows for use with other systems, such as MS-DOS. For
162example, TECO macros used with OS/8 TECO can be interchanged in .BOO
163format with similar files used with MS-DOS TECO. Intermediary sites,
164such as unix systems will not destroy the "delicate" nature of such
165files, etc.
166
167 The KERMIT-12 .BOO utilities are NOT totally compatible with
168existing .BOO utilities on other systems! Just like OS/8 ENCODE and
169DECODE, ENBOO and DEBOO do a perfect encoding/decoding of OS/8 files
170into their original form. When used with "foreign" .BOO decoders,
171some unpredictable things might occur.
172
173 Certain other .BOO encoders are known to throw in extraneous null
174bytes at the end of the file. Further, there is a design weakness in
175the original .BOO format that causes more null bytes to possibly
176appear. The KERMIT-12 programs utilize a superset of the original
177format to ensure correct encoding/decoding. When passing these files
178which now contain "correction bytes" to older decoders, the files are
179decoded with inflated lengths because the older decoders don't
180recognize the length correction. When passing files created by older
181encoders to the PDP-8, the resultant decoded files will also have
182inflated lengths because the older encoders failed to place
183correction bytes into the file.
184
185 The general rule for dealing with .BOO files originating from
186other systems is that they may have incorrect lengths. The resultant
187files may be (falsely) padded out with extraneous null bytes. In any
188case, since the files generally have no blocking structure, the files
189will be padded by OS/8 up to the nearest whole record or multiple of
190384 bytes anyway. Unless the file is ASCII and has a ^Z at the end,
191there is no way to determine the original intended file length.
192Files may be padded by null bytes introduced by other systems' bugs,
193the inherent weakness of the original .BOO format, or ultimately by
194OS/8 padding requirements.
195
196 ASCII files from other systems may be adjusted by using an editor
197such as TECO which stops at the ^Z. A second generation of the
198transferred file may be somewhat shorter when processed this way.
199
200 Should a file originating in OS/8 be intended for OS/8 use only
201(such as an encoding of a .SV file), it should not be decoded on an
202intermediate system, because a re-encoded version may differ from the
203encoded original because of ignored correction bytes, bugs, or the
204inability to insert correction bytes. Violating any of these rules
205could lead to OS/8 files corrupted into being too long. It is
206conceivable that these altered files are even dangerous to use under
207OS/8 because of their inflated lengths. (Certain files are validated
208by their restricted size, such as .HN files which must be exactly two
209or three blocks long depending on whether they are for one or two
210page handlers. If a one-page handler became three pages in file
211length, it could conceivably be confused with a two-page handler,
212etc.)
213
214cjl
215
216------------------------------
217
218Date: Sun, 7 October 1990 12:00:00 EDT
219From: Charles Lasner <lasner@watsun.cc.columbia.edu>
220Subject: Kermit-12 patching restrictions
221
222 All Kermit-12 configuration done according to the documentation
223works "as advertised." Users are tempted to patch the distributed
224image file K12MIT.SV as a "quick and dirty" method to make small
225modifications such as changing the default baud rate, etc. There is
226"conventional wisdom" that this can be accomplished using GET, SAVE
227commands to allow the use of ODT; this method is ordinarily used with
228other OS/8 family programs. It has been reported that this does NOT
229work on OS/278, the usual operating system for the DECmates. The
230following method should be avoided (a work-around is offered later):
231
232.GET SYS KERMIT [setup current image for patching]
233
234.ODT [call in ODT to patch the program]
235
2367/ 0007 0012 [change default baud rate to 2400]
237
238^C [^C to exit to monitor]
239
240.SAVE SYS KERMIT [save patched file]
241
242This method follows the exact procedure described in virtually every
243OS/8 document regarding patching of image files. The cited example
244changes the default baud rate from 1200 Baud to 2400 Baud by
245replacing the value chosen from the DEC standard table for 1200 Baud
246with the applicable value for 2400 Baud. This value is stored within
247Kermit-12 as the corresponding twelve-bit word with all high-order
248bits zeroed. (The location used is 000007; this is valid for Version
24910g, but could change in later versions.)
250
251 This attempt to make changes the "conventional" way produces a
252corrupted image file of K12MIT.SV (renamed to KERMIT.SV in the above
253example) when using OS/278 Version 2, the usual operating system on
254the DECmate II, etc. This method probably works in earlier (OS/8
255V3D, etc.) systems, however no attempt has been made to trace this
256bug in prior systems. A "fool-proof" method is required that works
257in spite of bugs in the operating system.
258
259 A work-around was attempted using OS/278 V2 on a DECmate II hard
260disk system:
261
262.LOAD SYS:KERMIT.SV/I [load the file in image mode]
263
264.ODT [call in ODT to patch the program]
265
2667/ 0007 0012 [change default baud rate to 2400]
267
268^C [^C to exit to monitor]
269
270.SAVE SYS KERMIT [save patched file]
271
272This also fails!
273
274 For reasons not understood yet, the following seemingly
275equivalent command DOES work:
276
277.LOAD SYS:KERMIT.SV/I$*$ [load the file in image mode and then
278 ask for more input. The $ which is
279 printed signifies the use of <ESC>
280 as the command terminator. The * is
281 printed by the system command
282 decoder requesting further input.
283 The second $ signifies the use of
284 <ESC> to end input to the command
285 decoder. The loader program
286 terminates and control returns to
287 the keyboard monitor.]
288
289.ODT [call in ODT to patch the program]
290
2917/ 0007 0012 [change default baud rate to 2400]
292
293^C [^C to exit to monitor]
294
295.SAVE SYS KERMIT [save patched file]
296
297This allows ODT commands to patch the file as intended, and also
298causes the subsequent SAVE command to work properly. All OS/8 family
299systems support this command (as long as CCL is enabled), so it will
300"always" work.
301
302 For those users who run with CCL turned off, the following
303sequence will also work:
304
305.R ABSLDR [run the loading program directly]
306*KERMIT.SV/I [load Kermit in image mode]
307*$ [<ESC> is typed to terminate the
308 loading process.]
309
310.ODT [call in ODT to patch the program]
311
3127/ 0007 0012 [change default baud rate to 2400]
313
314^C [^C to exit to monitor]
315
316.SAVE SYS KERMIT [save patched file]
317
318 The newer OS/8 family systems generally can't turn off the CCL
319mechanism. Since the R and RU commands are typically disabled on
320newer releases, only the CCL command work-around applies. Users
321opting to disable CCL are likely running "older" systems, such as
322OS/8 V3D on DECtapes. On these systems, ANY of the above methods
323should work, because the problematic bug didn't exist on those
324systems. Had DEC not gone "backwards" we could have avoided this
325entire discussion!
326
327 It is assumed the user will make "correct" patches to KERMIT-12;
328at least there is a "safe and proper" mechanism available to
329accomplish it!
330
331cjl
332
333------------------------------
334
335Date: Thu, 6 September 1990 12:00:00 EDT
336From: Charles Lasner <lasner@watsun.cc.columbia.edu>
337Subject: Kermit-12 potential problems
338
339 A newly implemented ENCODE/DECODE method should eliminate the
340reported problems with regard to passing encoded binary files through
341problematic "paths." The method chosen is a variant on the 5-bit
342encoding algorithm suggested. Encoded files now pass right through
343all of the WPS-related utilities. It is necessary to acquire
344virtually all files of this re-release of KERMIT-12 since all ENCODed
345files are different, as well as the source programs for the
346ENCODing/DECODing utilities themselves. Due to the file being
347"bare", the TECO macro K12GLB.TEC is possibly defective when it
348arrives at a user site; it will now be ENCODed as K12GLB.ENC to avoid
349this problem.
350
351 The KERMIT-12 source files are different due to maintenance work,
352requiring the user to obtain the re-released files. The sources now
353include a file to "pre-clear" memory. This aids in reducing the size
354of the ENCODed binary file K12MIT.ENC since undefined areas are no
355longer "relics" of random values, rather they are all set to 0000
356octal. The long strings of identical words will be eliminated since
357the new encoding format does repeat compression.
358
359 KERMIT-12 has still not been tested on any DECmates other than
360the DECmate II, as no volunteers have come forward with the proper
361hardware:
362
363 DECmate I with DP278A
364 DECmate I with DP278B
365 DECmate III without internal modem
366 DECmate III with internal modem
367 DECmate III+
368
369 A tentative volunteer for the DECmate I with DP278A configuration
370has been contacted, but testing has not yet started.
371
372cjl
373
374------------------------------
375
37626-Jul-90 1:15:43-GMT,15259;000000000001
377Return-Path: <lasner@cunixf.cc.columbia.edu>
378Received: from cunixf.cc.columbia.edu by watsun.cc.columbia.edu (5.59/FCB)
379 id AA26223; Wed, 25 Jul 90 21:15:41 EDT
380Received: by cunixf.cc.columbia.edu (5.59/FCB)
381 id AA11871; Wed, 25 Jul 90 21:16:19 EDT
382Date: Wed, 25 Jul 90 21:16:18 EDT
383From: Charles Lasner <lasner@cunixf.cc.columbia.edu>
384To: fdc@cunixf.cc.columbia.edu
385Subject: This was sent out to PDP8-LOVERS
386Message-Id: <CMM.0.88.648954978.lasner@cunixf.cc.columbia.edu>
387
388 I thought you might want to see this; it refers to the encoding
389problem I reported for a user with the problem (he has no net
390capability) in the programs using that encoding scheme we
391discussed...
392
393From: Charles Lasner (cjl)
394To: PDP8-LOVERS
395Subj: Feedback on encoding issues regarding archived files.
396
397 I have written a pair of OS/8 programs to ENCODE and DECODE
398binary files into an "ASCII-fied printable" format. Those of you
399familiar with either uuencode/uudecode or .BOO format will understand
400my intentions. They were originally written for the purpose of
401distribution of binary (.SV) files of KERMIT-12 by Columbia
402University in NY as part of the standard KERMIT collection (K12*.*).
403Columbia imposes a restriction on all files: they must be distributed
404in ASCII only. This is to ensure proper distribution regardless of
405the "path" taken between Columbia and the end user. Be advised that
406various problematic E-mailers, ASCII-EBCDIC EBCDIC-ASCII
407translations, filters for reserved codes, known problematic character
408substitutions, etc. are lurking out there! Consider yourself lucky if
409you get your sender's copy intact without some form of "cosmetic"
410reformatting. By encoding the binary files into an appropriate
411subset of ASCII, these problems hopefully are avoided. While we
412can't prevent ALL problems, we can usually tackle the most likely
413ones.
414
415 My original design was based on a discussion I had with Frank da
416Cruz of Columbia University (of KERMIT fame) regarding what to
417restrict ourselves to in a robust format. He was "unhappy" with some
418of the vulnerabilities of the uuencode and .BOO formats, which while
419popular, are not impervious to some "real" problems that have come
420up. We essentially designed an archiving format that was PDP-8
421oriented, but not limited to -8s only. Some of the highlights of the
422format are:
423
424a) File format restricted to "printable" six-bit subset of ASCII
425only. All else ignored; this was to minimize the "garble" factor,
426yet maintain a fairly high rate of efficiency: two ASCII characters
427equal one PDP-8 12-bit word. (This has proved to be problematic and
428is why we are here!)
429
430b) The archive file contains imbedded commands, not implied ones.
431By validating the commands, you can "trust" the contents. Commands
432are available for whatever purpose arises. Already implemented are
433commands to start ("(FILE filename.ext)") and end ("(END
434filename.ext)") the imbedded file, and an official comment command
435("(REMARK anything)") to help document the contents of the rest of
436the file. This is of course expandable. My OS/8 programs create all
437three types of commands. The start and end commands also
438theoretically allow multiple files in an archive, but I ignore the
439end command in the decoder and only allow one file per archive. I do
440support the start command completely, which includes a suggested name
441for the file. This name can be used at the user's option, or can be
442locally overridden. The encoding program inserts the original file
443name in this field, as this is of course the most likely name for the
444file at the other end.
445
446c) The archive contains a checksum for its contents to ensure the
447validity of the file.
448
449d) All "white space" character considerations are ignored; imbedded
450extraneous space characters, formfeeds, extra CR/LF, etc. are
451harmless. The CR/LF must be present at appropriate intervals, but
452this is only a problem with files passed through unix systems that
453delete the CR. Since OS/8 requires the CR and LF to be considered
454"printable", this is not a problem; the use of programs such as
455c-KERMIT will insert the CR if configured properly (SET FILE TYPE
456TEXT). Programs such as Rahul Dhesi's FLIP program are available to
457correct the problem easily if necessary: FLIP -m *.* or equivalent
458will remedy this.
459
460e) There is an internal record length of 64 characters with framing
461characters, to ensure the validity of each record. This prevents the
462file from getting "out of sync" with its original. This causes each
463line to be 68 characters including CR and LF, which is usually
464reasonable to most systems.
465
466 Unfortunately, this scheme has proved to be flawed in an
467important way that "matters." This format must deliver files to
468OS/278 systems by the prevailing paths of existent systems connected
469to DECmates containing only the normally present DEC release
470software. This could include sending the files via DEC-DX through
471WPS8, or acquiring the files on either DECmate CP/M-80 or DECmate
472MS-DOS, possibly using KERMIT-80, or KERMIT-MS as appropriate. If a
473file is received in the CP/M-80 environment, it can be converted to
474WPS8 format using a DEC-supplied program called WPSCONV. If a file
475is received in the MS-DOS environment, it can be converted to WPS8
476format using a DEC-supplied program called CONVERT. Incidentally,
477CONVERT can also convert CP/M-80 files as well, using MS-DOS format
478as an intermediary; WPSCONV is known to have bugs, which were
479corrected in CONVERT (which requires the MS-DOS hardware, not just
480the CP/M-80 hardware). These CP/M-80 and MS-DOS files can also come
481to the DECmate directly from a Rainbow as well, since the
482corresponding Rainbow systems are format compatible with the DECmate.
483DECmate MS-DOS additionally supports IBM-PC diskettes (160K or 180K
484single-sided only and read-only) as yet another source. Thus there
485are many paths to WPS8 versions of our files.
486
487 The problem with these methods is that apparently there is a bug
488in OS/278 WPFLOP, the only distributed conversion program a user
489would already have on his OS/278 system. (We haven't actually
490isolated the problem to WPFLOP, as the complaining user was taking
491the files from MS-DOS via CONVERT then to OS/278 via WPFLOP;
492conceivably the problem is in CONVERT, but in any case the problem
493exists somewhere in this supported path.)
494
495 The internal encoding used is to break the 12-bit word into two
496six-bit halves. Each half is in the range 00-77 octal. Adding 041
497to the value yields characters in the range of ! through ` or 041
498through 140 octal. The codes for 101-132 are A through Z and can be
499replaced by 141-172 for a through z if desired. This prevents
500case-sensitivity which is another possible network anomaly. We
501identified the DECmate problem as an anomaly regarding @ and `. The
502character codes for 100 and 140 are not treated uniquely, so the
503resulting OS/278 file is an inaccurate representation of the file.
504The decoding program correctly failed the conversion on a checksum
505error, so at least the user was aware of the problem!
506
507 As the PDP8-LOVERS, we will hopefully acquire an archive site for
508our files, so all of these considerations will apply. We need a file
509format that is "bullet-proof" to avoid problems like this one. I am
510soliciting suggestions for improvements on this encoding scheme (and
511any other overall file format suggestions as well) to provide an
512effective solution. The resultant programs will be added to the
513KERMIT-12 collection freely distributed by Columbia as well as other
514sources (DECUS, etc.).
515
516 Some suggestions have already been made:
517
5181. Just "quick-fix" the problem by providing an alternate character
519to the ` to make it non-anomalous with @. The available choices are
520{ | } and ~ only. The DEL character (octal 177) is unsuitable for
521other reasons; all other characters are either already used, or
522unprintable, or lower-case. This has the advantage of being most
523compatible with the existing programs, since the original character
524code can be supported as well; the "preferred" character would be
525generated by all future versions of the ENCODE program, and existing
526files could be trivially edited for compatibility as needed. This
527would have to be tested -- it is possible that the bug would
528persist. The choice is further narrowed to { and | only, since 175
529and 176 are sometimes treated as alternates to ESC. It is likely
530that systems which "mangle" the case of a character which is
531alphabetic could also do the same to { | } and ~ making them [ \ ]
532and _ respectively. This makes the entire suggestion unworkable.
533
5342. Change the format to "Hexafied-ASCII" where each PDP-8 12-bit
535word becomes represented by three characters from a 16-character set
536such as 0-9,A-F or A-P. The alphabetic codes would be immune to case
537conversion, and virtually every system supports this subset of ASCII.
538Instead of 64 characters on a line representing 32 12-bit words, each
539line would be 72 characters on a line representing 24 12-bit words
540(not counting framing characters and CR/LF). This also allows for
541many additional codes if needed. This scheme has the drawback of
542making the encoded file more inefficient, as the file will generally
543be 50% longer than those created by the original six-bit scheme.
544This robust scheme is workable.
545
5463. Modify 2. to include some form of compression. The easiest is to
547incorporate repeat compression. One simple scheme is to use an
548indicator character (R was suggested) as a prefix for an encoded
549count. It could be followed by three characters encoding the value
550of the 12-bit word and two characters encoding the value of the
551repeat count. Since this occupies six characters, as does two
552adjacent 12-bit encoded words, this scheme saves space when used for
553repeat compression lengths greater than two. The compressed field is
554the same length as two compressed "triplets", so overall file
555validation techniques wouldn't require special-case checks, as long
556as trailing "fill" characters were allowed for the last record before
557the short checksum record (which is signalled by its length). (T was
558suggested for this trailer character to be used to pad the last line
559with 0-69 characters.) This allows for compressing 3-258 repeated
56012-bit words into six characters. This would benefit files
561containing large areas of zeroes or HLT instructions, etc., as this
562can be the actual contents of binary files. If a .BN file created by
563PAL8, etc. is loaded and saved, then "junk" areas are created in the
564.SV file. Unfortunately, this is the norm, and the junk increases
565the size of the encoded version of the file. If the .BN file is
566loaded AFTER loading an all-zeroes file such as the binary output of:
567
568 *0
569
570 ZBLOCK 7600
571
572 $
573
574or equivalent as necessary (extended memory zeroed if required,
575etc.), then the file has all-zeroes gaps in it. These would repeat
576compress out using this scheme. Incidentally, an additional
577advantage of this method is that the resulting "cleaner" core-image
578file is slightly easier to disassemble, in case the source is lost.
579(Anyone who ever disassembled a .SV file or equivalent understands
580what I mean!). This also makes a binary papertape file (such as a
581diagnostic) loaded into a .SV file a little easier to follow when
582consulting the write-up, as memory is zeroed in between the locations
583referenced in the listing. The .SV file is smaller when encoded than
584the .BN file due to elimination of the paper-tape encoding overhead.
585OS/8 files of diagnostics could therefore be more efficiently
586archived as .SV files (encoded) than .BN files.
587
5884. Change to a 5-bit encoding with compression. This would use 32
589codes chosen from A-Z, 0-9 to encode the file five bits at a time per
590character. Five PDP-8 12-bit words would be encoded in 12
591characters. Since PDP-8 binary files are always multiples of 128
59212-bit word pages, there would need to be 4.8 "junk words" at the end
593of each block to encode the implied length of 130 words/block. Each
594line would be 78 characters (plus framing characters and CR/LF) so
595that four lines encodes a PDP-8 page, just as in the original six-bit
596scheme (the original scheme used 64 characters per line!). The last
597line of the file would contain 0-77 padding characters as necessary
598to maintain the line width as before. Repeat compression schemes can
599be expressed in any way that is a multiple of 12 characters; perhaps
600one or two adjacent expressions of repeat compression similar to
601above. Expected efficiency of this scheme is similar to the original
602six-bit method, or possibly slightly better; if compression is NEVER
603useful, then the file is 1.2 times as large.
604
605 There is an implementation restriction placed on the DECODE
606program: it should be relatively short, since it must be distributed
607in source form. It must also be written in a subset of PAL8
608compatible with the original PAL8 of the PS/8 days (ugh!) to ensure
609viability on any OS/8 family system. PAL8 Version B0 from OS/278 is
610distributed in ENCODed form, so this restriction need not apply to
611any other programs such as the ENCODE program or KERMIT-12, etc. It
612has been determined that PAL8 Version B0 and the companion CREF
613Version B0 will correctly function on any OS/8 family system on any
614PDP-8 member suitably configured to run the operating system the user
615already has running. (There is a minor anomaly when using input files
616from the TTY: handler; see K12MIT.DOC for a detailed explanation.)
617CPU extensions such as BSW and IAC RAL are not present in these
618programs, as was the original intention of OS/8 (which eventually was
619lost as newer members of DEC's programming staff were ignorant of
620this problem!). It is acceptable to have a "bare-bones" subset of
621the DECODE program distributed in "old" PAL8-compatible source form,
622along with a "fancier" version written in a more modern PAL8
623language, as the binary could then be DECODed with the subset DECODE
624program, or the source could be assembled with PAL8 Version B0 to
625"bootstrap" the "full" version of the DECODE program as necessary.
626
627 For those of you who can't wait, and want these utilities as they
628stand (using the fallible six-bit method), they are available via
629anonymous FTP from Columbia University (watsun) as
630/w/kermit/d/k12dec.pal and /w/kermit/d/k12enc.pal for the DECODer and
631ENCODer respectively. More information is available in
632/w/kermit/d/k12mit.doc or /w/kermit/d/k12mit.pal regarding use of
633PAL8 Version B0, other assemblers (such as PAL10 or P?S PAL) or other
634KERMIT-12 issues, etc.
635
636Charles Lasner (lasner@cunixf)
637cjl
638
639------------------------------
640
641Date: Fri, 4 May 90 13:55:02 EDT
642From: Charles Lasner <lasner@watsun.cc.columbia.edu>
643Subject: Kermit-12 problems
644
645 If the release files of KERMIT-12 are brought to DECmate MS-DOS
646via any of the various paths that can be used (such as from a Rainbow
647in either CP/M RX50 or MS-DOS RX50 format, etc.; in this particular
648case the reporting user obtained them using IBM-PC SSDD 180k 5-1/4"
649PC-DOS format.) then the files are available as DECmate II MS-DOS or
650CP/M-80 files on one of its standard devices (a:,b:,c:,d: floppies or
651e:,f:,g:,h: hard disk volumes).
652
653 The ultimate goal is to get these files (un-scathed!) to DECmate
654II OS/278 for KERMIT-12 installation. The standard DEC CONVERT
655program alledgedly can convert any combination of MS-DOS or CP/M-80
656or WPS/8 from/to each other. By converting the files to WPS/8
657documents, the files can be translated to OS/278 later (using the
658OS/278 WPFLOP utility).
659
660 There is a problem with DEC's CONVERT.EXE: it only CORRECTLY
661supports Rainbow/DECmate RX50 MS-DOS and CP/M diskettes, so the other
662formats (8" CP/M-80 diskettes and one-sided PC diskettes) have to be
663pre-converted with the appropriate copy commands to a supported
664diskette or hard disk volume first before using CONVERT. This is not
665a big problem, as we are merely using standard procedures, but the
666point is that much of this is undocumented or obscure. (I had to
667help the reporting user to copy his files to a "friendlier" device
668for CONVERT's benefit which only delayed our discovery of the REAL
669problem!)
670
671 The CONVERT program alledgedly supports ASCII/WPS format
672conversion from/to any of MS-DOS, CP/M-80, or WPS/8 (but only on
673a:,b:,c:,d:,e:,f:,g:,h: logical drives, not on the other hardware or
674media possibly hooked up to the DECmate!). Our purpose is to move
675the K12MIT files to WPS/8 format. This can be attempted with
676standard commands of CONVERT, but there apparently is a bug:
677
678 When you boot to OS/278 and retrieve the WPS/8 documents (via
679WPFLOP) which are the ENCODed files of KERMIT-12 as OS/278 files,
680there is a character anomaly between two encoding characters
681(specifically @ and `) that destroys the integrity of the affected
682file. This is possibly due to a bug in OS/278 WPFLOP, but more
683likely is a problem with MS-DOS CONVERT. Regardless of the
684perpetrator, this path is not viable to obtain the ENCODed files of
685the KERMIT-12 release.
686
687 Fortunately, the source files are not affected, as the anomalous
688characters are not part of the PDP-8 assembly language, and only
689comments could be affected. (As far as I can tell, there aren't any
690affected characters even in the comments!) It is therefore necessary
691to assemble KERMIT-12 directly from the sources when installing it on
692the DECmate II if obtaining it via any path which includes
693CONVERT/WPFLOP. The other ENCODed files are for PAL8 Version B0 and
694CREF Version B0 which are already present on the DECmate II as part
695of the standard release of OS/278 for the DECmate II and are thus
696superfluous. All ENCODed files can be recreated from OS/278 itself
697using the sources, etc., so the intended release files can be
698recreated for distribution to other OS/278 sites (bypassing the
699CONVERT/WPFLOP path). Future versions of the DECODE program will
700obviate this problem when an appropriate alternative format is
701supported properly which is immune to DEC's glitch.
702
703 A related problem surrounds the GLOBAL TECO macro K12GLB.TEC (aka
704GLOBAL.TEC). Due to the "delicate" nature of TECO macros, they could
705get "mangled" by the time they get to a user site. Future releases
706of KERMIT-12 will "protect" the macro by ENCODing it into K12GLB.ENC.
707It has also been reported that there are problems running the macro
708on certain releases of OS/8 family TECO and on other TECOs for other
709machines, and also problems running certain versions of OS/8 TECO on
710the DECmates. The author will investigate this problem eventually,
711but the main usage of the macro is for KERMIT-12 source maintainence
712on an OS/8 V3D system using the corresponding version of TECO; it is
713beyond the scope of KERMIT-12 development to investigate the myriad
714releases of TECO and their hardware and operating system
715dependencies; perhaps some TECO hackers can assist us!
716
717 An obscure problem indeed! Users give good feedback...
718
719 Can you suggest a fix for the CONVERT/WPFLOP-induced corruption?
720One is to allow the current format as a subset, but use a
721substitution character for the garbled character. Our character set
722is the 64 characters from ! through `, so the anomalous occurrences
723of @ are problematic. If we change the preferred character for ` to
724a lower-case letter (only octal 141 up is available, so let's assume
725the use of a) we avoid the CONVERT/WPFLOP problem. Newer released
726ENCODed files would then be immune to the treachery, but would
727require the newer DECODing program (or use TECO to change all
728occurrences of a to ` and then use the old DECODE program).
729
730 Should we abandon this inner format altogether? We could use an
731even more robust format like ASCII hex: 0-9 and A-F (allowing a-f as
732well!) at the expense of longer files (currently 2 characters=12
733bits, but would become 3 characters=12 bits). This would also hold
734up better through EBCDIC network conversion...
735
736cjl