Craig Bruce's uudecoder (type-in) From: Cameron Kaiser cdkaiser@delete.these.four.words.concentric.net Reply to: Cameron Kaiser Date: 01 Mar 1999 07:32:17 PST Organization: Concentric Internet Services Newsgroups: comp.binaries.cbm Followup to: newsgroup(s) *** comp.binaries.cbm is a moderated binaries- *** *** only newsgroup (no discussion or *** *** crossposting allowed) for Commodore 8-bits *** *** *** *** For information on comp.binaries.cbm visit *** *** http://www.concentric.net/~cdkaiser/cbc/ *** *** *** *** This file is also available via FTP from *** *** ftp://videocam.net.au/cbm/incoming *** *** (allow time for submission to be received) *** Craig Bruce's UUDECODE program. Type it in to BASIC and you will be able to decode messages posted to comp.binaries.cbm in uuencoded format. 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 device #";dp 40 open2,di,2,fi$+",s,r" 50 print"searching for uu-data start" 60 gosub360 70 ifleft$(w$,5)="begin"then90 80 printw$:goto60 90 print"beginning data conversion" 100 print w$ 110 fo$=mid$(w$,11) 120 open3,dp,3,"@0:"+fo$+",p,w":lc=1 130 gosub360:print"line ";lc;" " 140 ifleft$(w$,3)="end"then330 150 x=2:dl=(asc(left$(w$,1))-32)and63 160 ifasc(left$(w$,1))=192thendl=0 170 ob$="" 180 ifdl=0then130 190 ll=int((dl+2)/3)*4 200 forz=0to3 210 ifx+z-2>=llthenb(z)=0:goto250 220 c=asc(mid$(w$,x+z,1)) 230 ifc=192thenb(z)=0:goto250 240 b(z)=(c-32)and63 250 next:x=x+4 260 c1=b(0)*4+int(b(1)/16) 270 c2=((b(1)*16)and240)+int(b(2)/4) 280 c3=((b(2)*64)and192)+b(3) 290 ob$=ob$+chr$(c1)+chr$(c2)+chr$(c3) 300 ifx-20andw$<>""thenreturn 390 ifst<>0thenprint"eof":goto350 400 ifasc(x$)=13orasc(x$)=10thenreturn 410 w$=w$+x$ 420 iflen(w$)=254thenreturn 430 goto370 Keep on Hackin'! -Craig Bruce csbruce(@)ccnga.uwaterloo.ca "From each according to his ability, to each according to his ability." -- Cameron Kaiser * cdkaiser.cris(@)com * powered by eight bits * operating on faith -- supporting the Commodore 64/128: http://www.armory.com/~spectre/cwi/ -- head moderator comp.binaries.cbm * cbm special forces unit $ea31 (tincsf) personal page http://calvin.ptloma.edu/~spectre/ * "when in doubt, take a pawn"