Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!magnus.ircc.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!WSMR-SIMTEL20.ARMY.MIL!w8sdz From: w8sdz@WSMR-SIMTEL20.ARMY.MIL (Keith Petersen) Newsgroups: comp.binaries.ibm.pc.d Subject: Easy bootstrap for fast MSDOS uudecode Summary: Solving the chicken-and-the-egg uudecode problem Keywords: uudecode,msdos,basic,uudecode.bas Message-ID: Date: 3 Mar 91 21:24:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 136 This is from the SIMTEL20 archives. I certify that this GWBASIC/BASICA program creates an accurate copy of David Kirschbaum's uudecode program which is available in source code form from SIMTEL20. The executable that this BASIC program creates is extremely fast, having been written in assembly language. This is version 2.0, last revised 3-March-91. It corrects a bug which caused improper decoding of files with four-digit attributes after the "begin" keyword. Keith -- Keith Petersen Maintainer of SIMTEL20's MSDOS, MISC & CP/M archives [IP address 26.2.0.74] Internet: w8sdz@WSMR-SIMTEL20.Army.Mil or w8sdz@vela.acs.oakland.edu Uucp: uunet!wsmr-simtel20.army.mil!w8sdz BITNET: w8sdz@OAKLAND ---cut-here---uudecode.bas--- 100 REM - BASIC PROGRAM TO CREATE UUDECODE.COM v2.0 (a fast uudecoder) 110 CLS:PRINT "Creating UUDECODE.COM. See UUDECODE.DOC for instructions." 115 OPEN "UUDECODE.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 "UUDECODE.COM created successfully": SYSTEM 260 PRINT: PRINT "UUDECODE.COM is not valid!": END 270 DATA EB,54,90,49,6E,70,75,74,20,66,69,6C,65,20,65,72, 696 280 DATA 72,6F,72,2E, D, A,4F,75,74,70,75,74,20,66,69,6C, 584 290 DATA 65,20,65,72,72,6F,72,2E, D, A,73,74,61,72,74,20, 542 300 DATA 6E,6F,74,20,66,6F,75,6E,64,2E, D, A,45,6E,64,20, 509 310 DATA 6E,6F,74,20,66,6F,75,6E,64,2E, D, A, 0, 0, 0, 0, 3D2 320 DATA 64, 3,64, 3,14, 3,E8,BE, 1,E8,2F, 1,BF,14, 3,E8, 562 330 DATA AC, 0,AD,3D,62,65,75,F4,AD,3D,67,69,75,EE,AD,3D, 7CD 340 DATA 6E,20,75,E8,BF,14, 3,B4,20,AC,3A,C4,76,FB,AC,3A, 796 350 DATA C4,75,FB,AC,3A,C4,76,FB,3A,C4,74, 4,AA,AC,EB,F8, 9FE 360 DATA BA,14, 3,33,C9,88, D,B4,3C,CD,21,73, 3,E9,E3, 0, 682 370 DATA A3,4E, 1,BF,14, 3,E8,65, 0,AC, A,C0,74,48,BB,20, 622 380 DATA 20,2A,C3, A,C0,74,3F,32,E4,8B,E8,B9, 4, 6,AC,8A, 70C 390 DATA E0,AC,8A,D0,2B,C3,D0,E4,D0,E4,D2,E8, A,C4,AA,4D, ABB 400 DATA 74,D4,8A,E2,AC,8A,D0,2B,C3,D2,E4,D0,E8,D0,E8, A, AD8 410 DATA C4,AA,4D,74,C1,8A,E2,AC,2B,C3,8A,CD,D2,E4, A,C4, 9D1 420 DATA AA,4D,75,C7,EB,B0,E8,15, 0,AD,3D,65,6E,75, 5,AC, 7AE 430 DATA 3C,64,74, 3,E8,AE, 0,E8,61, 0,B4,4C,CD,21,8B,36, 6A5 440 DATA 50, 1,89,3E,54, 1,BD,50, 0,BF,C4, 2,33,C0,AB,B9, 656 450 DATA 27, 0,B8,20,20,F3,AB,BF,C4, 2,3B,36,52, 1,72, 6, 57E 460 DATA E8,38, 0,E8,55, 0,AC,3C,60,75, 4,B0,20,EB, 8,3C, 61D 470 DATA D,74,1B,3C, A,74,18,AA,4D,75,DF,3B,36,52, 1,72, 4EF 480 DATA 3,E8,37, 0,AC,3C, A,75,F2,BF,14, 3,EB,B4,46,89, 6BF 490 DATA 36,50, 1,8B,3E,54, 1,BE,C4, 2,C3,BA,14, 3,8B,CA, 612 500 DATA 87, E,54, 1,2B,CA,76, A,8B,1E,4E, 1,B4,40,CD,21, 539 510 DATA 72, 1,C3,BA,16, 1,B9,14, 0,EB,22,BA,64, 3,B9,9C, 657 520 DATA FA,8B,1E,4C, 1,B4,3F,CD,21,72, C, B,C0,74, 8,8B, 621 530 DATA F2, 3,C6,A3,52, 1,C3,BA, 3, 1,B9,13, 0,50,E8, A, 640 540 DATA 0,58,E9,55,FF,BA,3C, 1,B9,10, 0,BB, 2, 0,B4,40, 606 550 DATA CD,21,C3,90,54,68,69,73,20,50,72,6F,67,72,61,6D, 6D1 560 DATA 20,52,65,71,75,69,72,65,73,20,44,4F,53,20,56,65, 551 570 DATA 72,73,69,6F,6E,20,32,2E,30,20,6F,72,20,68,69,67, 534 580 DATA 68,65,72,2E, D, A,24, D, A,49,6E,70,75,74,20,70, 45F 590 DATA 61,74,68,2F,66,69,6C,65,3A,20,20,4E,6F,20,61,63, 527 600 DATA 74,69,6F,6E, D, A,24,B4,30,CD,21,3C, 2,73, C,BA, 53E 610 DATA C4, 2,B4, 9,CD,21,B8, 1,4C,CD,21,E8,36, 0,73,23, 618 620 DATA BA,F7, 2,B9,14, 0,BB, 2, 0,B4,40,CD,21,BF,7F, 0, 65D 630 DATA C6, 5,50,8B,D7,B4, A,CD,21,E8,18, 0,73, 5,BA, B, 666 640 DATA 3,EB,CF,BA,86, 3,B8, 0,3D,CD,21,72, 4,A3,4C, 1, 649 650 DATA C3,E9,43,FF,BE,80, 0,BF,86, 3,FC,AC, A,C0,74, F, 869 660 DATA B4,20,AC,3A,C4,76,FB,3A,C4,76, 6,AA,AC,EB,F8,F9, 99B 670 DATA C3,C6, 5, 0,F8,C3,55,55,44,45,43,4F,44,45,20,76, 62D 680 DATA 32,2E,30, 0,4F,72,69,67,69,6E,61,6C,6C,79,20,62, 52C 690 DATA 79,20,54,68,65,6F,64,6F,72,65,20,41,2E,20,4B,61, 52E 700 DATA 6C,64,69,73, 0,54,68,6F,72,6F,75,67,68,6C,79,20, 601 710 DATA 72,65,68,61,63,6B,65,64,20,62,79,20,44,61,76,69, 5D6 720 DATA 64,20,50,20,4B,69,72,73,63,68,62,61,75,6D,2C,20, 549 730 DATA 54,6F,61,64,20,48,61,6C,6C, 0, 0, 0, 0, 0, 0, 0, 329 740 DATA 76827 ---cut-here--- ---cut-here---uudecode.doc--- UUDECODE.DOC by David Kirschbaum UUDECODE uudecodes uuencoded files to original binary form. It is compatible with the Unix (and other) uuencode/uudecode utilities. Usage: UUDECODE Displays usage message, prompts for input file name. UUDECODE [d:][\path\]filename.uue Produces a uudecoded file, with the filename taken from within the uuencoded file (which might include a path). Notes: WARNING: UUDECODE does NOT check for existing files, and will gleefully write over them! Check first! UUDECODE will accept an input path\filename up to 80 chars long, and will prompt if none is specified. A uudecoded filename is taken from the uuencoded source file and is written to the current directory (or to the path included in the file header). Input files may be any length. Uuencoded file headers (mailing headers, etc.) need not be removed. However, any spurious lines between the "begin" and "end" lines MUST be removed. Anything beyond the "end" line is ignored. If no "end" is found, the output file is saved, but an error message is displayed. Certain uuencoders append a "checksum" character to the end of each uuencoded line. UUDECODE ignores these. Uuencoded files generated or moved through a Unix system may have LF (ASCII 10) line endings instead of the DOS-convention CR/LF (ASCII 13/10) endings. UUDECODE will handle those LF ends of line as well. you MAY get a "end not found" message, but the uudecoded file will be intact. Certain systems and mailers will strip off trailing spaces on lines. UUDECODE attempts to replace them. ---cut-here---