UUE2DBG 1/3

 BBS: Inland Empire Archive
Date: 06-27-92 (16:10)             Number: 1512
From: MARK BUTLER                  Refer#: NONE
  To: ALL                           Recvd: NO  
Subj: UUE2DBG     1/3                Conf: (2) Quik_Bas
 '*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
 '*** There's been a little talk lately about using some form of
 '*** UUE encoding to share binary files (OBJs etc) here. This is
 '*** something I whipped up using information shared to me by
 '*** James Vahn to convert a UUE script file to a debug compatible
 '*** script. First one will need to create the UUE file then
 '*** UUE2DBG will convert it, this program does -not- create the
 '*** original UUE file... you'll have to do that yourself with
 '*** UUE11.COM which can be recreated from the debug script file
 '*** in the message after this one which, BTW, was created with
 '*** UUE2DBG as a test for it. Reliability of UUE2DBG is *NOT*
 '*** guaranteed. I'm offering this as is, if ya see a bug, fix it!
 '***
 '***   ----> MHB :-)
 '*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
 DEFINT A-Z
 DECLARE FUNCTION SCRFileName$ (FileName$)
 DECLARE SUB Twister (row%, col%, turn%)

     PRINT
     PRINT "UUE2DBG v1.0 - Placed into the public domain June 1992"
     PRINT SPC(15); "by Mark H Butler, all rights evaporated"
     InFile$ = RTRIM$(COMMAND$)
     IF InFile$ = "" THEN
         PRINT
         PRINT "*** No UUE input file specified"
         GOTO Usage
     ELSEIF RIGHT$(InFile$, 3) <> "UUE" THEN
         PRINT
         PRINT "*** Input file must have an extension of '.UUE'"
         GOTO Usage
     END IF
     ON ERROR GOTO Usage
     OPEN InFile$ FOR INPUT AS 1
     linecount% = 0
     DO WHILE NOT EOF(1)
         LINE INPUT #1, dummy$
         linecount% = linecount% + 1
     LOOP
     CLOSE
     dummy$ = ""
     OPEN InFile$ FOR INPUT AS 1
     REDIM UUETxt$(1 TO linecount%)
     FOR i% = 1 TO linecount%
         LINE INPUT #1, UUETxt$(i%)
         IF EOF(1) THEN
             EXIT FOR
         END IF
     NEXT i%
     FOR i% = 2 TO linecount% - 2
         UUETxt$(i%) = RIGHT$(UUETxt$(i%), 61)
     NEXT
     OriginFile$ = UUETxt$(1)
     begin$ = "begin 644 "
     getname% = INSTR(OriginFile$, begin$)
     namelength% = LEN(OriginFile$) - LEN(begin$) - 1
     OriginFile$ = LCASE$(RIGHT$(OriginFile$, getname% + namelength%))
     OutFile$ = SCRFileName$(InFile$)
     OPEN OutFile$ FOR OUTPUT AS 2
     PRINT
     PRINT "Creating "; OutFile$; "  ";
     PRINT #2, "     to recreate "; OriginFile$; " delete these first"
     PRINT #2, "     two lines and enter...  DEBUG < "; OutFile$
     PRINT #2, "             "
     PRINT #2, "n"; OriginFile$
     PRINT #2, "e90 BE 00 01 8B FE 8B D6 33 DB B9 00 FE B4 3F CD 21"
     PRINT #2, "ea0 50 8B C8 B0 7E F2 AE B8 0D 0A AF 75 F4 87 F7 B1"
     PRINT #2, "eb0 02 AD 3D 0D 0A 74 FA 2D 20 20 3C 5A 73 17 24 3F"
     PRINT #2, "ec0 D2 E4 D3 C0 AA 92 AD 2D 20 20 D2 E4 D3 C8 24 0F"

     PRINT #2, "ed0 02 C6 AB EB DC 58 F7 D8 99 92 91 33 DB B8 01 42"
     PRINT #2, "ee0 CD 21 8B CF FE CD CC"
     PRINT #2, "rip"
     PRINT #2, "90"
     PRINT #2, "g"
     PRINT #2, "W"
     PRINT #2, "Q"
     PRINT #2, "~"
     turn% = 1
     row% = CSRLIN
     col% = POS(0)
     FOR i% = 2 TO linecount% - 2
         UUETxt$(i%) = RIGHT$(UUETxt$(i%), LEN(UUETxt$(i%)) - 1)
         PRINT #2, UUETxt$(i%)
         Twister row%, col%, turn%
         turn% = turn% + 1
         IF turn% > 4 THEN turn% = 1
     NEXT
     CLOSE
     LOCATE row%, col%
     PRINT "...Done!";
     END
 Usage:
     PRINT
     PRINT "Usage "; CHR$(16); " UUE2DBG <filename.uue>"
     END

 FUNCTION SCRFileName$ (FileName$) STATIC
     Extension = INSTR(FileName$, ".")
     IF Extension > 0 THEN
         SCRFileName$ = LEFT$(FileName$, Extension - 1) + ".SCR"
  >>> continued to next message

... OFFLINE 1.39 * I don't believe in miracles... I depend on them
............................................


--- WM v2.03/91-0012
 * Origin: Com-Dat BBS  Hillsboro, OR.  HST (503) 681-0543 (1:105/314)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET