[comp.binaries.ibm.pc.d] need MS-DOS uuENcode

arritt@kuhub.cc.ukans.edu (09/30/90)

The little BASIC routine to create MS-DOS uudecode, contained in the "starter
kit" for this newsgroup, is really clever.  Now, does someone have a
similar procedure for making an MS-DOS uuENcode?  I've got a colleague
in Greece to whom I can bitnet, and it would be nice if we could 
uuencode stuff (binary data files and so forth) for sending via e-mail.

If there's no BASIC routine available, a uuencoded version of uuencode 
(is that what "recursive" means? :-)  would be welcome.

Thanks for your help.  (Please e-mail your responses; I will post a 
summary if there is sufficient interest.)
________________________________________________________________________
Raymond W. Arritt                     | 
Assistant Professor                   |
Dept. of Physics and Astronomy        |  "everyone knew that as time went
Univ. of Kansas                       |   by they'd get a little bit older
Lawrence, KS  66045                   |   and a little bit slower..."
arritt@kuhub.cc.ukans.edu             |               
arritt@ukanvax.bitnet                 |
                               

w8sdz@vela.acs.oakland.edu (Keith Petersen) (09/30/90)

arritt@kuhub.cc.ukans.edu writes:
>The little BASIC routine to create MS-DOS uudecode, contained in the "starter
>kit" for this newsgroup, is really clever.  Now, does someone have a
>similar procedure for making an MS-DOS uuENcode?

This is from the SIMTEL20 archives.

---cut-here---UUENCODE.BAS---
100 REM - BASIC PROGRAM TO CREATE UUENCODE.COM (a fast uuencoder)
110 CLS:PRINT "Creating UUENCODE.COM": OPEN "UUENCODE.COM" AS #1 LEN = 1
120 FIELD #1,1 AS A$: CHECKSUM#=0
130 FOR I = 1 TO    47
140  LINESUM#=0: LOCATE 2,3: PRINT "Countdown: "    47 - I ;
150  FOR J = 1 TO  16: READ BYTE$: CHECKSUM#=CHECKSUM#+VAL("&H"+BYTE$)
160   LINESUM#=LINESUM#+VAL("&H"+BYTE$)
170   IF (BYTE < 256) THEN LSET A$=CHR$(VAL("&H"+BYTE$)): PUT #1
180  NEXT J
190  READ LINETOT$: LINECHECK# = VAL("&H"+LINETOT$)
200  IF LINECHECK# = LINESUM# THEN GOTO 220
210  LOCATE 4,2: PRINT "Error in line #"  ;  260 +  10 * I: GOTO 260
220 NEXT I
230 CLOSE: READ FILETOT$ : FILECHECK# = VAL(FILETOT$)
240 IF CHECKSUM# <> FILECHECK# THEN GOTO 260
250 PRINT: PRINT "UUENCODE.COM created successfully": SYSTEM
260 PRINT: PRINT "UUENCODE.COM is not valid!": END
270 DATA E9,D9, 0,55,55,45,4E,43,4F,44,45,20,5B,64,3A,5D,  590
280 DATA 5B,5C,70,61,74,68,5C,5D,62,69,6E,61,72,79,2E,66,  636
290 DATA 69,6C,20,3C,52,45,54,55,52,4E,3E, D, A,70,72,6F,  4B7
300 DATA 64,75,63,65,73,20,62,69,6E,61,72,79,2E,55,55,45,  5D6
310 DATA 20,6F,6E,20,63,75,72,72,65,6E,74,20,64,72,69,76,  5F5
320 DATA 65,5C,70,61,74,68,2E, D, A,24,54,68,69,73,20,70,  4FF
330 DATA 72,6F,67,72,61,6D,20,72,65,71,75,69,72,65,73,20,  638
340 DATA 44,4F,53,20,56,32,2E,30,20,6F,72,20,68,69,67,68,  4AD
350 DATA 65,72,2E, D, A,24, D, A,49,6E,70,75,74,20,70,61,  458
360 DATA 74,68,2F,66,69,6C,65,3A,20,20,49,6E,70,75,74,20,  555
370 DATA 66,69,6C,65,20,65,72,72,6F,72,2E, D, A,4F,75,74,  567
380 DATA 70,75,74,20,66,69,6C,65,20,65,72,72,6F,72,2E, D,  59E
390 DATA  A,60, D, A,65,6E,64, D, A,4E,6F,20,61,63,74,69,  44D
400 DATA 6F,6E, D, A,24, 0, 0, 1, 0,28, 4, 0,B4,30,CD,21,  317
410 DATA 3C, 2,73, C,BA,5A, 1,B4, 9,CD,21,B8, 1,4C,CD,21,  570
420 DATA E8,84, 1,73,2A,BA,86, 1,B9,14, 0,BB, 1, 0,B4,40,  5C8
430 DATA CD,21,BF,7F, 0,C6, 5,50,8B,D7,B4, A,CD,21,E8,66,  7A3
440 DATA  1,73, C,BA, 3, 1,B4, 9,CD,21,BA,C9, 1,EB,C8,BA,  6DA
450 DATA D8, 3,8B,F2,B8, 0,3D,CD,21,73, 3,E9,34, 1,A3,D5,  747
460 DATA  1,8B,CF,2B,CE,49,B0,5C,FD,F2,AE,FC,74, 8,8B,FE,  947
470 DATA 80,7D, 1,3A,75, 2,47,47,8B,F7,8B,D6,BF,A4, 3,AC,  732
480 DATA  A,C0,74, 3,AA,EB,F8,B8, D, A,AB,57,8B,F2,BF,28,  803
490 DATA  4,8B,D7,AC, A,C0,75, 2,B0,2E,AA,3C,2E,75,F4,B8,  766
500 DATA 75,75,AB,B8,65, 0,89, 5,33,C9,B4,3C,CD,21,59,73,  6E6
510 DATA  3,E9,AC, 0,A3,D7, 1,BA,9A, 3,2B,CA,E8,91, 0,E8,  7C0
520 DATA A6, 0,74,40,B9, 4, 6,AC,8A,E0,D0,E8,D0,E8,AA,AC,  8F9
530 DATA 8A,D0,D2,E4,D2,E8, 2,C4,AA,8A,E2,AC,8A,D0,D0,E4,  B60
540 DATA D0,E4,8A,CD,D2,E8, 2,C4,AA,8A,C2,AA,83,C5, 3,83,  9F9
550 DATA FD,2D,75, 3,E8,2F, 0,3B,36,D9, 1,72,C7,80,3E,DB,  6D6
560 DATA  1, 1,75,BB, B,ED,74, 9,2B,36,D9, 1,2B,EE,E8,15,  5F8
570 DATA  0,BA,C1, 1,B9, 8, 0,E8,36, 0,8B,1E,D7, 1,B4,3E,  5CE
580 DATA CD,21,B4,4C,CD,21,BA,9A, 3,8B,CF,2B,CA,51,8B,FA,  858
590 DATA 8B,C5,88, 5,B4,20,BB,60,3F,8A, 5,22,C7, 2,C4,3A,  683
600 DATA C4,75, 2,8A,C3,AA,E2,F1,59,B8, D, A,89, 5,41,41,  73D
610 DATA 8B,1E,D7, 1,B4,40,CD,21,72, 6,8B,FA,47,33,ED,C3,  78A
620 DATA BA,AD, 1,B9,14, 0,EB,30,BA,28, 4,B9,C8,AF,8B,1E,  70F
630 DATA D5, 1,B4,3F,CD,21,72,1A,8B,F2,8B,DA, 3,D8,3B,C1,  7FC
640 DATA 74, 9,C7, 7, 0, 0,C6, 6,DB, 1, 1,89,1E,D9, 1, B,  480
650 DATA C0,C3,BA,9A, 1,B9,13, 0,50,E8, 3, 0,58,EB,83,BB,  760
660 DATA  2, 0,B4,40,CD,21,C3,BE,80, 0,BF,D8, 3,FC,AC, A,  731
670 DATA C0,74, F,B4,20,AC,3A,C4,76,FB,3A,C4,76, 6,AA,AC,  802
680 DATA EB,F8,F9,C3,C6, 5, 0,F8,C3,90,62,65,67,69,6E,20,  8DA
690 DATA 36,34,34,20,55,55,45,4E,43,4F,44,45,20,76,31,2E,  40B
700 DATA 39, 0,44,61,76,69,64,20,50,20,4B,69,72,73,63,68,  515
710 DATA 62,61,75,6D,2C,20,54,6F,61,64,20,48,61,6C,6C,2C,  546
720 DATA 20,47,69,76,65,6E,20,74,6F,20,74,68,65,20,70,75,  582
730 DATA 62,6C,69,63,20,64,6F,6D,61,69,6E, 0, 0, 0, 0, 0,  432
740 DATA 78184

---cut-here---UUDENCODE.DOC---

                        UUENCODE.DOC
                by David Kirschbaum, Toad Hall
                    kirsch@usasoc.soc.mil

UUENCODE.COM uuencodes binary files to ASCII text files which are
compatible with the Unix (and other) uuencode/uudecode utilities.

Usage:

          UUENCODE<RETURN>
    Displays usage message, prompts for input file name.

          UUENCODE [d:][\path\]filename.bin
    Produces filename.uue in current directory.

Notes:

WARNING: UUENCODE does NOT check for existing files, and will gleefully
write over them!  Check first!

The program will accept an input path\filename up to 80 chars long, and
will prompt if none is specified.

A uuencoded filename is created by stripping the ".typ" (if present)
from the original filename and appending ".uue" as the file type.

Input files may be any length.

---cut-here---

The complete distribution version (with MASM source code)  fast
uuencode/uudecode by David Kirschbaum is available from SIMTEL20 as:

Directory PD1:<MSDOS.FILUTL>
 Filename   Type Length   Date    Description
==============================================
TOADUU19.ARC  B   26377  890924  Unix-compat. fast uuencode/uudecode w/ASM src

Keith
-- 
Keith Petersen
Co-SysOp, Detroit Download Central 313-885-3956 (212/V22bis/HST/V32/V42bis)
Internet: w8sdz@vela.acs.oakland.edu, w8sdz@brl.mil  BITNET: w8sdz@NDSUVM1
Uucp: {ames,decwrl,harvard,rutgers,ucbvax,uunet}!vela.acs.oakland.edu!w8sdz