home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / packet / pbbsm100.ark / PBBS2DR.BAS < prev    next >
BASIC Source File  |  1986-08-15  |  13KB  |  260 lines

  1. 0 'TWODR.BA BY DICK ROUX N1AED VER 1.6 07/02/86
  2. 10 CLEAR1000:MAXFILES=6:LC$="":MM=0:UL=0:S=0:MW=0:MF=0:FL=0:MR=0:RQ=0:RD=0:C=0:L=0:MS=0:U=0:CR$="":B=0:M=0:CK=0:CK$="ON ":CALL16969
  3. 20 CA$="N1AED":NA$="Dick":T$="Merrimack NH":BE$="MAIL FOR: "
  4. 30 OPEN"ERRLOG.DO"FORAPPENDAS1:CLOSE1
  5. 40 GOSUB2160
  6. 50 MM=0:MS=0:ONERRORGOTO80:OPEN"MESLOG.DO"FORINPUTAS4
  7. 660 LINEINPUT#4,I$:IFLEN(I$)=>3THENMS=MS+1:IFI$=CA$THENMM=MM+1
  8. 70 IFEOF(4)THENCLOSE4:GOTO90ELSE60
  9. 80 IFERR=52THENOPEN"MESLOG.DO"FORAPPENDAS4:PRINT#4,CR$:CLOSE4
  10. 90 ONCOMGOSUB280:ONERRORGOTO930
  11. 100 IFUTHENGOSUB2150:U=0:GOSUB190ELSEGOSUB190
  12. 110 COMON
  13. 120 E$=INKEY$:GOSUB130:GOTO150
  14. 130 DA$=RIGHT$(DATE$,2)+LEFT$(DATE$,2)+MID$(DATE$,4,2)
  15. 140 TI$=LEFT$(TIME$,2)+MID$(TIME$,4,2):RETURN
  16. 150 IFE$=""THEN120
  17. 160 ONINSTR("EPRSGKBMC",E$)GOTO690,720,790,1690,870,1430,2145,5000,6000
  18. 170 ONINSTR("eprsgkbmc",E$)GOTO690,720,790,1690,870,1430,2145,5000,6000
  19. 180 GOTO120
  20. 190 IFCTHENRETURNELSECLS
  21. 200 PRINT"MAILBOX ACTIVE - WAITING ";MM;"/";MS;" Msgs"
  22. 210 PRINTFRE(0);" BYTES FREE    ";MR;"CONNECTS TODAY"
  23. 220 IFLEN(LC$)THENPRINT "Last User: ";LC$ELSEPRINT
  24. 225 IF B=0THENBB$="OFF"ELSEBB$="ON "
  25. 226 IF M=0THENMM$="OFF"ELSEMM$="ON "
  26. 230 '
  27. 235 PRINT"<P>rint Msgs <R>ead Msgs   <E>xit"
  28. 240 PRINT"<S>end Msg   <G>o Online   <K>ill Msgs"
  29. 250 PRINT"<B>eacon ";BB$;" <M>onitor ";MM$;"
  30. 260 PRINT"<C>onok ";CK$;"..SELECT.." 
  31. 270 RETURN
  32. 280 IFEOF(2)THENCLOSE2:OPEN"COM:58N1E"FORINPUTAS2:IFS=0THEN360ELSEPRINT#4,Z$:Z$="":S=0:FL=1:FORI=1TO500:NEXT:COMON:IFULTHEN2320ELSEGOSUB1570:GOSUB1600:GOTO360
  33. 290 C$=INPUT$(1,2):PRINTC$;:IFC$=CHR$(10)THENRETURN
  34. 300 IFC$=CHR$(13)THEN330
  35. 310 Z$=Z$+C$
  36. 320 IFLEN(Z$)=>78THEN330ELSERETURN
  37. 330 IFNOTCTHEN380
  38. 340 FG=INSTR(Z$,"*** conn"):IFFGTHENRQ$=MID$(Z$,20+FG,8):RQ=1:GOTO360
  39. 350 IFCTHEN430
  40. 360 IFRD=0ANDS=0ANDRQANDCTHENO$=RQ$+" Just Tried to Connect":GOSUB980:RQ=0
  41. 370 Z$="":RETURN
  42. 380 R=INSTR(Z$,"*** CON"):IFNOTLANDR>0THENCLS:C=-1:GOSUB2090:GOSUB2096ELSEGOTO360
  43. 390 IFFL=0THENGOSUB1060
  44. 400 COMSTOP
  45. 410 GOSUB1580
  46. 420 COMON:IFMFTHEN360ELSEGOSUB1310:GOSUB1600:GOTO360
  47. 430 IFINSTR(Z$,"*** DIS")THENC=0:GOSUB2092:GOTO670
  48. 440 IFINSTR(Z$,"retry")THEN370
  49. 450 IFSTHEN640
  50. 460 IFMFTHEN570
  51. 470 IFLTHEN360
  52. 480 IFZ$<>CR$THENZ=ASC(LEFT$(Z$,1)):IFZ>96ANDZ<123THENGOSUB2110:Z$=ZX$:ZX$=""
  53. 490 IFLEN(Z$)>1THEN570
  54. 500 IFZ$="T"THEN1220
  55. 510 IFZ$="R"THENGOSUB1350:GOSUB1600:GOTO360
  56. 520 IFZ$="H"THENGOSUB1810:GOSUB1600:GOTO360
  57. 530 IFZ$="I"THENGOSUB1880:GOSUB1600:GOTO360
  58. 540 IFZ$="B"THENGOSUB1630:GOSUB660:GOSUB2098:GOSUB2070:GOTO360
  59. 550 IFZ$="W"THENCOMSTOP:GOSUB2180:GOSUB1600:GOTO360
  60. 555 IFZ$="K"THENMW=2:O$="*** YOUR MESSAGE(S) WILL BE KILLED ON DISK ***":GOSUB980:GOSUB1600:GOTO360
  61. 560 IFZ$<>CR$THENO$="*** NON FUNCTIONAL CMD ***":GOSUB980:GOSUB1600:GOTO360
  62. 570 IFLEFT$(Z$,1)="S"ANDMID$(Z$,2,1)=" "ANDINSTR(Z$,"<")=0THEN1460:COMSTOP
  63. 580 IFLEFT$(Z$,1)="S"ANDMID$(Z$,3,1)=" "THEN1470:COMSTOP
  64. 590 IFLEFT$(Z$,1)="S"ANDMID$(Z$,2,2)="  "THEN1470:COMSTOP
  65. 600 IFLEFT$(Z$,2)="D "THENCOMSTOP:GOSUB2170:GOSUB1600:GOSUB3000:GOTO360
  66. 610 IFLEFT$(Z$,2)="U "THENCOMSTOP:GOTO2240
  67. 620 IFZ$<>CR$THENGOSUB2110:Z$=ZX$:ZX$="":IFZ$="R ALL"THENZA$="ALL":MW=1:GOSUB1360:MW=0:GOSUB1600:GOTO360
  68. 630 IFZ$<>CR$THENO$="*** WHAT?...Type <H>elp if you need it":GOSUB980:GOSUB1600
  69. 640 IFSTHENPRINT#4,Z$
  70. 650 GOTO360
  71. 660 O$=ZC$+" de "+CA$+": 73 ,CUL":GOSUB980:RETURN
  72. 670 COMSTOP:GOSUB2080:IFSTHENCLOSE4:S=0:GOSUB1920ELSEGOSUB1920:GOSUB2090:GOSUB1630:IFBTHENO$="BT "+BT$:GOSUB980
  73. 680 FL=0:L=0:MF=0:MR=MR+1:RD=0:GOSUB360:GOSUB1790:IFMW=2THEN1440ELSEGOSUB2094:GOSUB1630:GOTO100
  74. 690 COMOFF:CLOSE
  75. 700 DATE$=LEFT$(DATE$,6)+"86"
  76. 710 MENU
  77. 720 COMSTOP:CLS
  78. 730 PRINT:INPUT"CHECK PRINTER - PRESS ENTER.. ";X$
  79. 735 CLS:INPUT"Print Your Mail";ZE$:IF ZE$="N"ORZE$="n"THENINPUT"Print Whose";ZC$ELSEZC$=CA$
  80. 740 OPEN"0:"+ZC$+".DO"FORINPUTAS3:OPEN"LPT:"FOROUTPUTAS4
  81. 750 LINEINPUT#3,C$
  82. 760 IFEOF(3)THENCLOSE3,4:GOTO100
  83. 770 FORI=1TO250:NEXT:PRINTC$:PRINT#4,C$
  84. 780 GOTO750
  85. 790 COMSTOP:CLS:ONERRORGOTO860
  86. 800 MS=0:INPUT"Read Your Mail";ZE$:IF ZE$="N"ORZE$="n"THENINPUT"Read Whose";ZC$ELSEZC$=CA$
  87. 810 OPEN"0:"+ZC$+".DO"FORINPUTAS3
  88. 820 LINEINPUT#3,C$
  89. 830 IFEOF(3)THENCLOSE3:PRINTCR$:PRINT"*** END OF MESSAGES ":FORI=1TO1000:NEXT:GOTO50
  90. 840 FORI=1TO500:NEXT:PRINTC$
  91. 850 GOTO820
  92. 860 IFERR=52THENPRINT"*** NO MESSAGES":GOSUB1630:RESUME50
  93. 870 CLS:L=-1:PRINT"*** ONLINE *** ":PRINT"^D To cmd:":PRINT"<ESC> to Return"
  94. 880 E$=INKEY$:IFE$=""THEN880
  95. 890 IFE$=CHR$(27)THENL=0:Z$="":IFCTHENGOSUB1600:GOTO100ELSEGOTO100
  96. 900 IFE$=CHR$(8)THENPRINTCHR$(8);CHR$(32);
  97. 910 PRINT#1,E$;:IFE$=CHR$(13)THENPRINTE$ELSEPRINTE$;
  98. 920 GOTO880
  99. 930 CLOSE:BEEP:OPEN"ERRLOG.DO"FORAPPENDAS6
  100. 940 PRINT#6,"ERROR ";ERR;" IN LINE ";ERL;" WHILE ";ZC$;" WAS ON AT ";TI$;" ON ";DA$
  101. 950 IFCANDERR=57THENCLOSE6:S=0:Z$="":O$="*** SORRY, CAN'T DO IT, RAN OUT OF FILE SPACE !!! ***":GOSUB2160:GOSUB980:MF=0:RESUME1600
  102. 960 IFCANDERR=63THENCLOSE6:CLOSE4:S=0:Z$="":O$="*** SORRY, CAN'T DO IT, RAN OUT OF DISK SPACE !!! ***":GOSUB2160:GOSUB980:MF=0:RESUME1600
  103. 970 IFCANDERR=52THENCLOSE6:RD=0:MW=0:Z$="":O$="*** NONE FOUND":GOSUB2160:GOSUB980:RESUME360ELSECLOSE6:Z$="":RESUME40
  104. 980 FORX=1TOLEN(O$)
  105. 990 S$=MID$(O$,X,1)
  106. 1000 FORI=1TO3:NEXT
  107. 1010 PRINT#1,S$;
  108. 1020 PRINTS$;
  109. 1030 NEXT
  110. 1040 PRINT#1,CHR$(13);:PRINT
  111. 1050 RETURN
  112. 1060 IFMID$(Z$,21+R,1)="-"THENZC$=MID$(Z$,17+R,4):GOTO1110
  113. 1070 IFMID$(Z$,21+R,1)=" "THENZC$=MID$(Z$,17+R,4):GOTO1110
  114. 1080 IFMID$(Z$,22+R,1)="-"THENZC$=MID$(Z$,17+R,5):GOTO1110
  115. 1090 IFMID$(Z$,22+R,1)=" "THENZC$=MID$(Z$,17+R,5):GOTO1110
  116. 1100 ZC$=MID$(Z$,17+R,6)
  117. 1110 RESTORE
  118. 1120 READZF$,N$,MF
  119. 1130 IFINSTR(ZF$,ZC$)THENRETURN
  120. 1140 IFZF$="END"THENN$=ZC$:RETURN
  121. 1150 GOTO1120
  122. 1160 DATA"AB1Q","Dan",0,"WB2JCU","Fred",0,"WB1GXM","Butch",0
  123. 1170 DATA"K1OIQ","Al",0,"WA1HUM","Dana",0,"KA1MCD","Chris",0
  124. 1180 DATA"WA1OMM","Paul",0,"N1AHH","Ron",0,"W1TF","Ty",0
  125. 1190 DATA"WB1DSW","Herb",1,"KE1G","Bill",1,"W4PAS","Dick",0
  126. 1200 DATA"KG6LC","Paul",0,"W0RLI","Hank",1,"K1MRK","Carl",0
  127. 1210 DATA"K1UGM","Jim",1,"N1DL","Karl",1,"END","END",0
  128. 1220 PG=VAL(LEFT$(TIME$,2)):IFPG>5ANDPG<14THENO$="Sorry...Paging is disabled untill after 9 A.M. >":GOSUB980:GOSUB1610:GOTO360
  129. 1230 CLS:O$="Paging "+NA$+"...(for about 30 Sec.) >":GOSUB980
  130. 1240 PRINT:PRINTZC$;" Wants to Chat..."
  131. 1250 PRINT:PRINT"hit <G> to go online"
  132. 1260 FORI=1TO175
  133. 1270 FORP=1TO10:NEXT:BEEP
  134. 1280 E$=INKEY$:IFE$="G"ORE$="g"THENO$=NA$+" is at the keyboard...Standby! >":GOSUB980:COMON:GOTO870
  135. 1290 NEXT:O$="Guess "+NA$+" is not around...Sorry":GOSUB980
  136. 1300 O$="Feel free to leave "+NA$+" a message...73 & TNX >":GOSUB980:GOSUB1610:GOTO360
  137. 1310 ONERRORGOTO1330:O$="*** CHECKING MAIL...":GOSUB980:OPEN"0:"+ZC$+".DO"FORINPUTAS5
  138. 1320 O$="*** YOU HAVE MAIL *** HIT 'R' TO READ":ONERRORGOTO930:GOSUB980:MW=1:CLOSE5:RETURN
  139. 1330 IFERR=52THENO$="*** SORRY..NO MAIL":RESUME1340
  140. 1340 GOSUB980:ONERRORGOTO930:RETURN
  141. 1350 ZA$=ZC$
  142. 1360 IFMW=0THENO$="*** SORRY...NO MAIL":GOSUB980:RETURNELSERD=1:OPEN"0:"+ZA$+".DO"FORINPUTAS5
  143. 1370 LINEINPUT#5,ZD$
  144. 1380 O$=CR$:GOSUB980:LINEINPUT#5,O$:DB$=LEFT$(O$,6):TB$=RIGHT$(O$,4)
  145. 1390 GOSUB1640
  146. 1400 LINEINPUT#5,O$:IFINSTR(O$,"<")THENZD$=O$:GOTO1380ELSEGOSUB980
  147. 1410 IFEOF(5)THENCLOSE5:IFZA$<>"ALL"THENO$="*** PLEASE KILL YOUR MAIL WITH THE 'K' CMD BEFORE YOU DISCONNECT ***":GOSUB980:RD=0:RETURNELSERD=0:RETURN
  148. 1420 GOTO1400
  149. 1430 CLS:INPUT"Kill Your Mail";ZE$:IFZE$="N"ORZE$="n"THENINPUT"Kill Whose";ZD$:GOSUB2100:ZC$=ZX$:ZX$="":U=1ELSEZC$=CA$:U=1
  150. 1440 MW=0:KILL"0:"+ZC$+".DO":GOSUB1990:GOSUB2160:GOSUB2094:GOTO50
  151. 1450 ZD$=MID$(Z$,4,6):Z$=Z$+" < "+ZC$:GOTO1500
  152. 1460 ZD$=MID$(Z$,3,6):Z$=Z$+" < "+ZC$:GOTO1500
  153. 1470 IFINSTR(Z$,"<")=0THEN1450
  154. 1480 IFINSTR(Z$,"@")=0THEN1490ELSEZD$=MID$(Z$,4,INSTR(Z$,"@")-5):GOTO1500
  155. 1490 ZD$=MID$(Z$,4,INSTR(Z$,"<")-5)
  156. 1500 S=1:ONERRORGOTO1560:OPEN"0:"+ZD$+".DO"FORAPPENDAS4
  157. 1510 ONERRORGOTO930:PRINT#4,Z$
  158. 1520 PRINT#4,DA$;" ";TI$
  159. 1530 IFMFTHENZ$="":COMON:GOTO90
  160. 1540 COMON:O$="Enter Message, Cntl-z to end:":GOSUB980
  161. 1550 Z$="":GOTO100
  162. 1560 OPEN"0:"+ZD$+".DO"FOROUTPUTAS4:CLOSE4:RESUME1500
  163. 1570 CLOSE4:OPEN"MESLOG.DO"FORAPPENDAS4:GOSUB2100:ZD$=ZX$:ZX$="":PRINT#4,ZD$:CLOSE4:MS=MS+1:GOSUB2062:IFMF=1THENRETURNELSEO$="*** DONE":GOSUB980:RETURN
  164. 1580 IFMFTHEN1600ELSEO$="Hello "+N$+", Welcome to the "+CA$+" MINI-PBBS in "+T$:GOSUB980
  165. 1590 O$="H for HELP, I For System Info; There are"+STR$(MS)+" Msgs On the System":GOSUB980:RETURN
  166. 1600 IFFRE(0)<1000THENO$=" *** CAUTION - THE MEMORY IS FULL..PLEASE DO NOT ATTEMPT TO LEAVE ANY MESSAGES ***":GOSUB980
  167. 1610 GOSUB130:O$=ZC$+" de "+CA$+" at "+TI$+"z on "+DA$+"  B,D,H,I,K,R,S,T,U,W >":GOSUB980:IFMFTHEN1620ELSERETURN
  168. 1620 O$="*":GOSUB980:O$="*":GOSUB980:RETURN
  169. 1630 FORI=1TO500:NEXT:RETURN
  170. 1640 IFINSTR(ZD$,"@")=0THEN1670
  171. 1650 O$=" TR  "+" TO  "+" @ BBS  "+"  From"+"    Date  "+"   Time":GOSUB980
  172. 1660 O$=" "+ZD$+"   "+DB$+"   "+TB$:GOSUB980:RETURN
  173. 1670 O$=" TR  "+" TO  "+"  From"+"     Date  "+"   Time":GOSUB980
  174. 1680 O$=" "+ZD$+"   "+DB$+"   "+TB$:GOSUB980:RETURN
  175. 1690 CLS:LINEINPUT"Call sign of Receiver ";ZD$:GOSUB2100:ZD$=ZX$:ZX$=""
  176. 1700 ONERRORGOTO1780:OPEN"0:"+ZD$+".DO"FORAPPENDAS4
  177. 1710 ONERRORGOTO930:PRINT#4,"S  "+ZD$+" < "+CA$
  178. 1720 PRINT#4,DA$;" ";TI$
  179. 1730 PRINT"Input Message.../EX to End (ON A BLANK LINE)"
  180. 1740 LINEINPUTI$
  181. 1750 IFINSTR(I$,"/EX")>0ORINSTR(I$,"/ex")>0THEN1770
  182. 1760 PRINT#4,I$:GOTO1740
  183. 1770 PRINT#4,CR$:CLOSE4:OPEN"MESLOG.DO"FORAPPENDAS4:GOSUB2100:ZD$=ZX$:ZX$="":PRINT#4,ZD$:CLOSE4:PRINT"*** DONE":FORI=1TO500:NEXT:MS=MS+1:GOSUB2062:U=1:GOSUB2150:U=0:GOTO100
  184. 1780 OPEN"0:"+ZD$+".DO"FOROUTPUTAS4:CLOSE4:RESUME1700
  185. 1790 OPEN"USELOG.DO"FORAPPENDAS4
  186. 1800 LC$=ZC$+" AT "+TI$+" ON "+DA$:PRINT#4,LC$:CLOSE4:RETURN
  187. 1810 RD=1:O$="The command Syntax is:":GOSUB980
  188. 1820 O$="B<CR> - Bye (DISC)           D filename.ext<CR> - Download a file":GOSUB980
  189. 1830 O$="H<CR> - This HELP File       I<CR> - System Information":GOSUB980
  190. 1840 O$="R<CR> - Read YOUR mail       R ALL<CR> - Read mail addressed to 'ALL'":GOSUB980
  191. 1845 O$="K<CR> - Kill Your Mail":GOSUB980
  192. 1850 O$="S 'CALL'<CR> - Send mail     T<CR> - Pages "+NA$+" for 30 sec":GOSUB980
  193. 1860 O$="U 'filename.ext'<CR> - Upload a file - MAX 6 Char Filename..3 Char.Ext.":GOSUB980
  194. 1870 O$="W<CR> - What's Available To Download":GOSUB980:RD=0:RETURN
  195. 1880 RD=1:O$="This MINI-PBBS is run on a 32K TRS80 Model 100...It lacks the complete":GOSUB980
  196. 1890 O$="repertoire of a full PBBS; It was written to work within the memory":GOSUB980
  197. 1900 O$="restraints of the Model 100.  It's main purpose is to be able to":GOSUB980
  198. 1910 O$="store and retrieve messages....73  "+NA$+" "+CA$:GOSUB980:RD=0:RETURN
  199. 1920 COMSTOP:OPEN"MESLOG.DO"FORINPUTAS4
  200. 1930 LINEINPUT#4,O$:GOSUB1960
  201. 1940 IFEOF(4)THENCLOSE4:GOTO1980
  202. 1950 GOTO1930
  203. 1960 IFINSTR(O$,ZC$)THENRETURN
  204. 1970 IFINSTR(BE$,O$)THENRETURNELSEBE$=BE$+O$+" ":RETURN
  205. 1980 O$=BE$:BT$=BE$:COMON:IFLEN(BE$)=<10THENRETURNELSEGOSUB980:BE$="MAIL FOR: ":RETURN
  206. 1990 MM=0:MS=0:OPEN"MESLOG.DO"FORINPUTAS4
  207. 2000 OPEN"MESLO.DO"FOROUTPUTAS5
  208. 2010 PRINT#5,CR$
  209. 2020 LINEINPUT#4,I$:IFEOF(4)ANDI$=ZC$THENGOTO2050
  210. 2030 IFI$=ZC$THENI$="":GOTO2020
  211. 2040 IFI$=CR$THEN2050ELSEPRINT#5,I$:MS=MS+1:IFZD$=CA$THENMM=MM+1
  212. 2050 IFEOF(4)THENCLOSE4,5:KILL"MESLOG.DO":NAME"MESLO.DO"AS"MESLOG.DO":RETURN
  213. 2060 GOTO2020
  214. 2062 IFZD$=CA$THENMM=MM+1:RETURNELSERETURN
  215. 2070 GOSUB1630:O$="D":GOSUB980:RETURN
  216. 2080 GOSUB1630:O$="CONV":GOSUB980:RETURN
  217. 2090 GOSUB1630:O$=CHR$(4):GOSUB980:RETURN
  218. 2092 GOSUB1630:O$="CONOK OFF":GOSUB980:CK$="OFF":CK=1:RETURN
  219. 2094 GOSUB1630:O$="CONOK ON ":GOSUB980:CK$="ON":CK=0:RETURN
  220. 2096 GOSUB1630:O$="TRANS":GOSUB980:RETURN
  221. 2098 GOSUB1630:GOSUB1630:FORI=1TO3:PRINT#1,CHR$(4);:NEXT:GOSUB1630:GOSUB1630:RETURN
  222. 2100 Z$=ZD$
  223. 2110 FORX=1TOLEN(Z$)
  224. 2120 S$=MID$(Z$,X,1)
  225. 2130 IFASC(S$)>96ANDASC(S$)<123THENS$=CHR$(ASC(S$)-32)
  226. 2140 ZX$=ZX$+S$:NEXT:RETURN
  227. 2145 IF B=0 THEN 2150 ELSE 2165
  228. 2150 ZC$="XXX":BE$="BT MAIL FOR: ":CLS:GOSUB1920:GOSUB1630:IFUTHENZC$="":RETURNELSEO$="BE EV 90":B=1:GOSUB980:ZC$="":GOSUB1630:GOTO100
  229. 2160 OPEN"COM:58N1E"FOROUTPUTAS1:OPEN"COM:58N1E"FORINPUTAS2:RETURN
  230. 2165 GOSUB1630: O$="BE 0":GOSUB980:GOSUB1630:B=0:GOTO100
  231. 2170 ONERRORGOTO2220:F$=MID$(Z$,3,10):OPEN"1:"+F$FORINPUTAS5:GOTO2190
  232. 2180 ONERRORGOTO2230:OPEN"1:INDEX.DO"FORINPUTAS5
  233. 2190 IFEOF(5)THENCLOSE5:GOTO2200ELSE2210
  234. 2200 O$=CR$:GOSUB980:ONERRORGOTO930:COMON:RETURN
  235. 2210 LINEINPUT#5,O$:GOSUB980:GOTO2190
  236. 2220 O$="*** FILE NOT FOUND":GOSUB980:ONERRORGOTO930:RESUME2200
  237. 2230 IFERR=52THENOPEN"1:INDEX.DO"FOROUTPUTAS4:O$="*** DOWNLOAD DIRECTORY ***":PRINT#4,O$:CLOSE4:RESUME2180
  238. 2240 ONERRORGOTO2280:FN$=MID$(Z$,3,10)
  239. 2250 S=1:UL=1:OPEN"1:"+FN$FOROUTPUTAS4:ONERRORGOTO930
  240. 2260 COMON:O$="Send The File, Cntl-z to End":GOSUB980
  241. 2270 GOTO360
  242. 2280 IFERR=55THENO$="*** BAD FILENAME ...TRY AGAIN":GOSUB980:GOSUB1600:GOTO2310
  243. 2290 IFERR=63THENO$="*** SORRY...UPLOAD DISK IS FULL":GOSUB980:GOSUB1600:GOTO2310
  244. 2300 O$="*** Syntax Error..Try Again":GOSUB980:GOSUB1600:GOTO2310
  245. 2310 S=0:UL=0:ONERRORGOTO930:RESUME360
  246. 2320 CLOSE4:GOSUB2330:O$="*** DONE":GOSUB980:GOSUB1600:UL=0:GOSUB4000:GOTO360
  247. 2330 ONERRORGOTO2340:OPEN"1:INDEX.DO"FORAPPENDAS4:PRINT#4,FN$:CLOSE4:ONERRORGOTO930:RETURN
  248. 2340 IFERR=52THENOPEN"1:INDEX.DO"FOROUTPUTAS4:O$="*** DOWNLOAD DIRECTORY ***":PRINT#4,O$:CLOSE4:RESUME2330
  249. 3000 OPEN"DWNLOG.DO"FORAPPENDAS5
  250. 3010 PRINT#5,ZC$;" DOWNLOADED '";F$;"' AT ";TI$;" ON ";DA$
  251. 3020 CLOSE5:RETURN
  252. 4000 OPEN"UPLOG.DO"FORAPPENDAS5
  253. 4010 PRINT#5,ZC$;" UPLOADED '";FN$;"' AT ";TI$;" ON ";DA$
  254. 4020 CLOSE5:RETURN
  255. 5000 IFM=0THEN5010ELSE5020
  256. 5010 O$="MON ON":GOSUB980:M=1:GOSUB1630:GOTO100
  257. 5020 O$="MON OFF":GOSUB980:M=0:GOSUB1630:GOTO100
  258. 6000 IFCK=0THENGOSUB2092:GOSUB1630:CK=1:CK$="OFF":GOTO100
  259. 6010 IFCK<>0THENGOSUB2094:GOSUB1630:CK=0:CK$="ON ":GOTO100