home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CBM Funet Archive
/
cbm-funet-archive-2003.iso
/
cbm
/
crossplatform
/
converters
/
uudecode.bas
< prev
Wrap
BASIC Source File
|
1993-10-31
|
2KB
|
61 lines
fROM: AC387@YFN.YSU.EDU (RANDALL WILLIAMS)
nEWSGROUPS: COMP.BINARIES.CBM
sUBJECT: basic UUDECODE
fOLLOWUP-tO: COMP.SYS.CBM
dATE: 31 oCT 1993 02:20:19 -0700
oRGANIZATION: uNIVERSITY OF aRIZONA cs dEPARTMENT, tUCSON az
nntp-pOSTING-hOST: CASLON.CS.ARIZONA.EDU
lAST CHANGED - 10/31/93
tHIS IS A basic UUDECODE PROGRAM. iT WOULD BE GOOD FOR UUDECODING
FILES UNTIL SOMETHING FASTER COULD BE OBTAINED. iT IGNORES EVERYTHING
UNTIL IT FINDS THE "BEGIN" STATEMENT AT THE START OF A UUENCODED FILE.
tHE FILE MUST BE A SEQUENTIAL
petascii FILE AND CONVERTS IT TO A PROGRAM FILE. sINCE IT IS IN basic IT IS EASY TO CHANGE.
10 INPUT"ENTER INPUT FILE NAME";FI$
20 INPUT"ENTER INPUT DEVICE #";DI
30 INPUT"ENTER OUTPUT FILE NAME";FO$
40 INPUT"ENTER OUTPUT DEVICE #";DO
50 PRINT"SEARCHING FOR FILE START"
60 OPEN2,DI,2,FI$+",S,R"
70 GOSUB400
80 IFLEFT$(W$,5)="BEGIN"THEN190
90 PRINT"FILE START NOT FOUND"
100 PRINTW$:GOTO70
190 PRINT"BEGINNING FILE CONVERSION"
200 OPEN3,DO,3,"@0:"+FO$+",P,W":LC=1
210 GOSUB400:PRINT"LINE ";LC;" "
220 IFLEFT$(W$,3)="END"THEN360
230 X=2:LL=(ASC(LEFT$(W$,1))-32)AND63
240 IFLL=0THEN210
250 LL=LL/3*4
260 FORZ=0TO3
270 IFX+Z-1>LLTHENB(Z)=32:GOTO290
280 B(Z)=(ASC(MID$(W$,X+Z,1))-32)AND63
290 NEXT:X=X+4
300 C1=B(0)*4+INT(B(1)/16)
310 C2=((B(1)*16)AND240)+INT(B(2)/4)
320 C3=((B(2)*64)AND192)+B(3)
330 PRINT#3,CHR$(C1);CHR$(C2);CHR$(C3);
340 IFX-1=>LLTHENLC=LC+1:GOTO210
350 GOTO260
360 PRINT"FILE CONVERSION DONE"
370 PRINT#3,"":CLOSE2:CLOSE3:END
400 W$=""
405 GET#2,X$:IFX$=""THENX$=CHR$(0)
410 IFX$=CHR$(13)ORX$=CHR$(10)THENRETURN
420 IFST<>0THENPRINT"ERROR":GOTO370
430 W$=W$+X$
440 IFLEN(W$)=254THENRETURN
450 GOTO405
--
sLAY THE DRAGONS OF YOUR OWN MIND BEFORE YOU CALL ME INSANE.
AC387@YFN.YSU.EDU
AM789@CLEVELAND.FREENET.EDU
-=*> gANDALF <*=-