1 'Use this BASIC program on the PC if you have the printable file 2 'MSKERMIT.BOO already on the PC to convert it to an executable 3 'file. This program takes about 30 minutes to run on a PC with 4 'floppy disks. 5 ' Bill Catchings, June 1984 6 ' Columbia University Center for Computing Activities 10 t\$ = time\$ ' Save the time. 20 defint a-z ' Integer to gain some speed. 30 n\$ = chr\$(0) 40 z = asc("0") 50 t = asc("~")-z 60 def fnuchr%(a\$)=asc(a\$)-z 70 open "MSKERMIT.BOO" for input as #1 100 input#1,f\$ ' Is this the right file? 110 if len(f\$) > 20 then goto 900 120 open f\$ for output as #2 130 print "Outputting to "+f\$ 200 if eof(1) then goto 800 ' Exit nicely on end of file. 210 input#1,x\$ ' Get a line. 220 y\$ = "" ' Clear the output buffer. 230 goto 400 300 print#2,y\$; ' Print output buffer to file. 310 goto 200 ' Get another line. 400 if len(x\$) = 0 goto 300 ' Is the input buffer empty? 410 a = fnuchr%(x\$) 420 if a = t then goto 700 ' Null repeat character? 430 q\$=mid\$(x\$,2,3) ' Get the quadruplet to decode. 440 x\$=mid\$(x\$,5) 450 b = fnuchr%(q\$) 460 q\$ = mid\$(q\$,2) 470 c = fnuchr%(q\$) 480 q\$ = mid\$(q\$,2) 490 d = fnuchr%(q\$) 500 y\$ = y\$ + chr\$(((a * 4) + (b \ 16)) and 255) ' Decode the quad. 510 y\$ = y\$ + chr\$(((b * 16) + (c \ 4)) and 255) 520 y\$ = y\$ + chr\$(((c * 64) + d) and 255) 530 goto 400 ' Get another quad. 700 x\$ = mid\$(x\$,2) ' Expand the nulls. 710 r = fnuchr%(x\$) ' Get the number of nulls. 715 print " Null: ",r 720 x\$ = mid\$(x\$,2) 730 for i=1 to r ' Loop, adding nulls to string. 740 y\$ = y\$ + n\$ 750 next 760 print#2,y\$; ' Output the nulls to the file. 770 y\$ = "" ' Clear the output buffer. 780 goto 400 800 print "Processing complete, elapsed time: "+t\$+" to "+time\$ 810 print "Output in "+f\$ 820 close #1,#2 830 goto 9999 900 print "?The version of the MSKERMIT.BOO file is incorrect" 910 goto 820 9999 end