; PAE ProDOS v4.5b ; Written for ProDOS by -DC- ; PAE DOS 3.3 by Uknown Pirate ; Shooting Star 20meg PAE ProDOS/BBS ; 206/838-7686 -- 300/1200/2400 baud ; This is one of those great programs ; written By Pirates For Pirates. So, ; by all means, do with it as you damn ; well please. Enjoy, my fellow pirates. ; -Uknown Pirate ; Flags Used: ; ; flag(20) - PAE access (0=no, 1=yes) ; flag(21) - Entrance marker (0=first time in PAE, 1=been here before) ; flag(22) - Download access (0=no, 1=yes) ; flag(23) - Upload access (0=no, 1=yes) ; flag(24) - View file access (0=no, 1=yes) ; flag(25) - Copy file access (0=no, 1=yes) ; flag(26) - Unlimited downloading (0=no, 1=yes) public return public link.term on nocar goto link.term ; Set drive specifiers ; ad$ = Drive with all seg files ; bd$ = Drive with all PAE ProDOS files ; cd$ = Drive with all system data files ; rd$ = RAM drive for faster access ad$="a:":bd$="k:":cd$="b:":rd$="l:" l1$=ad$+"pae.pdos.main" l2$=ad$+"pae.xfers" l3$=ad$+"pae.sysop" l4$=ad$+"pae.configure" l5$=ad$+"pae.commands" lm$=ad$+"main.seg" ls$=ad$+"system.seg" ; Get data to begin PAE print:kill "l:variables":create "l:variables":store "l:variables" if not flag(20) print "You don't have access to the PAE section.":goto link.main open #1,bd$+"pae.data":a=mark(1) if a print "PAE hasn't been configured.":close:if not info(5) clear:recall "l:variables":kill "l:variables":link lm$,"fromsys" if a link l4$ input #1,i$\dp\ps\up\dn\bt\kl\kb\ul\nr\pn\tt\z\vr\dt\fl close:nr=nr+2:if (i$<>"4.5") and (info(5)) link l4$ if i$<>"4.5" print "PAE ProDOS hasn't been configured.":goto link.main open #1,bd$+"drives":a=mark(1):close if not a goto start create bd$+"drives":print 'Directory files must be created now... Hit [RETURN] when done. *> NOTE: Do NOT use colons (:) <*' config input @2 "Drive: " a$:if a$="" goto start open #1,bd$+"drives":position #1,4,0:input #1,a:a=a+1 position #1,4,0:print #1,a:position #1,4,a:print #1,a$:close i$=bd$+"dir"+a$:open #1,i$:a=mark(1):close if not a print "Data file already exists for this drive; erase? "; if not a input @0 lg$:if lg$<>"Y" goto config kill i$:create i$:open #1,i$:position #1,95,0:print #1,0:close goto config start print "PAE ProDOS - Pseudo AE Simulator v4.5b" print "---------- Written by -DC-" z=0:e$=chr$(27):cr$=chr$(13):bs$=chr$(8) bl$=chr$(45,39):f$=bd$+"pae.welcome" close:open #1,f$:a=mark(1):close ; If PAE.WELCOME file doesn't exist, PAE is closed. if a print \"Sorry, the PAE is closed today.":goto link.main gosub show.file ; Get top point holder f$=bd$+"pae.points" open #1,f$:a=mark(1):close if a create f$ print\\"The top point holder is..."; top.hld tu=1:tp=0 open #1,f$ for ie=1 to nu if not (ie mod 20) setint(1):print ".";:setint(""):if key(1) print "":ie=nu:next:close:goto skip position #1,12,ie input #1,pp,b,b:if pp>tp tu=ie:tp=pp next:close open #1,cd$+"users":position #1,vr,tu input #1,t1$,t2$:close if not t1$ pp=0:open #1,f$:position #1,12,tu:print #1,pp,up,dn:close:goto top.hld print:ch$=t1$+" "+t2$:gosub spin print " with "tp" transfer points." ; Add user to log skip if ul create bd$+"pae.log" ul$=bl$+cr$+date$+" "+time$+cr$+a1$+" "+a2$+" entered PAE at "+str$(info(2)*300)+" baud" gosub ed.log open #1,bd$+"drives":position #1,4,1:input #1,lg$:close ; Get user's points a=up:x=dn:open #1,bd$+"pae.points" position #1,12,un:input #1,pt,up,dn if not flag(21) pt=dp:up=a:dn=x:flag(21)=1 if (not up) or (not dn) up=a:dn=x position #1,12,un:print #1,pt,up,dn:close gosub x.mset1 gosub show.stats open #1,bd$+"dat"+lg$ if mark(1) close:dn$="":li=0:l1=0:mf=fl:goto ae.com input #1,dn$\a\li\l1\mf:close:if mf";:a=0:push ae.com ae.com1 gosub get.key ae.com2 if i$=chr$(21) goto arrow.up if (i$=bs$) and (len(lg$)>1) goto arrow.dn if (i$="K") and kl goto kill.file if i$="I" goto info if i$="D" goto dir if i$="L" goto log if i$="N" goto change if i$="B" goto binary if i$="R" goto upload if (i$="T") and (tt>1) goto top.uls if i$="S" goto download if i$="V" goto view if i$="H" goto hang if i$="?" goto com.show if i$="Q" goto quit if i$="X" goto x.mset if i$="Y" print:goto show.stats if i$="C" goto w.file if i$="P" goto page if i$="W" goto want.list if i$="F" goto find.file if i$="A" goto activs1 if i$="Z" goto zipscan if i$="M" goto move.file if i$="%" goto rename if i$=chr$(4) goto ser.num if i$=chr$(20) goto x.mset3 if not info(5) goto ae.com1 if i$="*" print "System":pop:recall "l:variables":kill "l:variables":link ls$ if i$="!" print "SysOp commands":link l3$ goto ae.com1 ; Show Commands com.show f$=bd$+"pae.menu":gosub show.file if info(5) print ' || [!] Enter SysOp Menu [%] Rename a file || -[]:------------------------------------------------:[]-' return ; Directory Dir print "Directory" Dir1 print \" "s$\:i$=lg$+": "+dn$+chr$(32,61):i$=left$(i$,61) if l1=1 i$=i$+"[R] " if l1=2 i$=i$+"[W] " if l1=3 i$=i$+"[F] " if not l1 i$=i$+" " i$=i$+"Manager: #"+str$(li):print left$(i$,edit(3))\ i$="Program name"+chr$(32,20)+"Typ Blk/XBlk U/L Date Uploaded by Rec#" print left$(i$,edit(3))\ open #1,bd$+"dir"+lg$:position #1,95,0:input #1,a if not a close:print "No files":return wx=0:for b=1 to a:position #1,95,b:input #1,i$,x$ if len(i$)<40 i$="EMPTY":position #1,95,b:print #1,i$,x$ if i$="EMPTY" goto dir3 open #2,lg$+":"+x$:ww=mark(2):close #2:if ww=0 goto dir2 print #3 "[ Deleting "x$" ]"; f$=left$("a"+str$(b)+"."+x$,15) kill lg$+":"+f$:position #1,95,b:print #1,"EMPTY",x$ ww=13+len(x$):print #3 chr$(8,ww);chr$(32,ww);chr$(8,ww);:goto dir3 dir2 wx=b:i$=i$+chr$(32,74):i$=left$(i$,74):i$=i$+" #"+str$(b) setint(1):print left$(i$,edit(3)):setint("") if key(1) print "":close:b=a:next:return dir3 next:if wx=0 print "No files":position #1,95,0:print #1,0:close:return if wx2 goto up1 if len(lg$)=1 a$=lg$+"1":print a$"]":goto log2 a=val(right$(lg$,1)) a=a+1:a$=left$(lg$,1)+str$(a) print a$"]":goto log2 up1 a=val(mid$(lg$,2,2)) a=a+1:a$=left$(lg$,1)+str$(a) print a$"]":goto log2 ; Down arrow arrow.dn print "Down - ["; if len(lg$)>2 goto dn1 if right$(lg$,1)="1" a$=left$(lg$,1):print a$"]":goto log2 a=val(right$(lg$,1)) a=a-1:a$=left$(lg$,1)+str$(a) print a$"]":goto log2 dn1 a=val(mid$(lg$,2,2)) a=a-1:a$=left$(lg$,1)+str$(a) print a$"]":goto log2 ; Log a volume Log print "Log Volume":print\"Current: " lg$ log1 input @2"New (?): "a$ if not a$ a$=lg$:goto log.end if a$="?" print \"Available Drives"\:gosub drives:print:goto log1 log2 if len(a$)>3 print \"Invalid drive":return open #1,bd$+"drives":position #1,4,0:input #1,a for b=1 to a:position #1,4,b:input #1,i$ if (len(i$)=len(a$)) and (i$=a$) b=a:next:close:goto log.end next:close:print \"Invalid drive":return log.end open #1,bd$+"dat"+a$ if mark(1) close:dn$="":li=0:l1=0:goto log.end2 input #1,i$\a\b\c\d:close if not flag(a) print \"Insufficient access"\:goto log1 dn$=i$:li=b:l1=c:mf=d:if mf"#" gosub name.find:goto bin1 a=val(mid$(f$,2,(len(f$)-1))):if a<1 return gosub number bin1 fn$=left$(i$,30):x$=lg$+":"+x$ use cd$+"xdos","getinfo "+x$ a=peek(edit(5)+7):if a=6 goto bin2 if a<>224 print \"Error - Not a Binary II or NuFX file":return setint(1):print \"As a NuFX file, it contains..." use cd$+"nulist",x$:setint("") ul$="Listed NuFX file: "+lg$+":"+fn$:goto ed.log bin2 print \"As a Binary II file, it contains..." print \"_Filename________Typ__Blks_Modified_________Created"; print "____________Length_SubType" use cd$+"xdos","blist "+x$:setint("") a=peek(10):if a print\"Error #"a" detected - Aborted" ul$="Listed a Binary II file: "+lg$+":"+fn$:goto ed.log ; SysOp move file move.file if (li<>un) and (not info(5)) return open #1,bd$+"dir"+lg$:position #1,95,0:input #1,wx if wx=0 close:print \"No files on this drive!":return if wx<2 close:print \"Error - Only one file on drive!":return close:input @2 "Move file: "f$:if f$="" return if left$(f$,1)<>"#" gosub name.find:goto move1 a=val(mid$(f$,2,(len(f$)-1))):if a<1 return gosub number move1 fn$=left$(i$,30):f$=lg$+":"+left$("a"+str$(x)+"."+x$,15) input @2 \"To location #"a:if (a<1) or (a=x) return f1$=left$("a"+str$(a)+"."+x$,15):use cd$+"xdos","rename "+f$+","+f1$ open #1,bd$+"dir"+lg$:if a>wx wx=a:position #1,95,0:print #1,wx position #1,95,x:input #1,i$,x$:position #1,95,a:input #1,d1$,d2$ position #1,95,x:print #1,d1$,d2$:position #1,95,a:print #1,i$,x$ close:f$=lg$+":"+left$("a"+str$(a)+"."+d2$,15) f1$=left$("a"+str$(x)+"."+d2$,15):use cd$+"xdos","rename "+f$+","+f1$ return ; View View if not flag(24) print \\"You don't have view file access.":return if l1=2 print \\"This drive is in Write Only mode.":return input @2 "View: "f$:if not f$ return if left$(f$,1)<>"#" gosub name.find:goto view1 a=val(mid$(f$,2,(len(f$)-1))):if a<1 return gosub number view1 fn$=left$(i$,30):x$=lg$+":"+x$ use cd$+"xdos","getinfo "+x$:a=peek(edit(5)+7) if a<>221 goto view2 print \"The DDDeluxe message says..."\ ul$=chr$(143):i$=chr$(142) use cd$+"xdeluxe",x$,ul$,i$,edit(3)+1 print:if peek(10) print "Error reading message" ul$="Viewed DDDeluxe message: "+lg$+":"+fn$:goto ed.log view2 print:setint(1):use cd$+"xshow",x$:setint("") if key(1) print "":return if peek(10)=255 print "Error - Incorrect filetype":return ul$="Viewed file: "+lg$+":"+fn$:goto ed.log ; Hang up hang print "Hang up? "; gosub get.key if i$<>"Y" print "No": return print "Yes" ul$="Hung up":gosub ed.log goto link.hang ; Exit to main quit print "Quit PAE to BBS? "; gosub get.key if i$<>"Y" print "No": return print "Yes" ul$="Quit PAE":gosub ed.log pop: goto link.main ; Show user stats show.stats print \"Your stats:" print\"Alias : "a1$" "a2$ print "Transfer points : "pt print "Time remaining : "; if clock(2) print (clock(2)-clock(1))/60":"; if clock(2) i$=str$((clock(2)-clock(1)) mod 60):if len(i$)<2 i$="0"+i$ if not clock(2) i$="Unlimited" print i$ print "U/L to D/L ratio: "up":"dn print "D/L access : ";:if flag(22) print "Yes":else print "No" print "U/L access : ";:if flag(23) print "Yes":else print "No" print "View file access: ";:if flag(24) print "Yes":else print "No" print "Copy file access: ";:if flag(25) print "Yes":else print "No" print "Unlimited d/ling: ";:if flag(26) print "Yes":else print "No" if info(5) print\"But, alas, you are the sysop!" return x.mset print "Protocol change" ul$="Set protocol type":gosub ed.log x.mset1 ym=0:mj=0:print\'Set protocol type [1) DOS 3.3 AE [2) ProDOS AE [3) X/Ymodem File, etc. [4) Ymodem Batch [5) Ymodem-G [?) Help Choice: '; x.mset2 gosub get.key:a=val(i$) if i$="2" mj=1:print "ProDOS AE" if i$="1" mj=2:print "DOS 3.3 AE" if i$="3" print "X/Ymodem, etc." if i$="4" print "Ymodem Batch":ym=1 if i$="5" print "Ymodem-G":ym=2 if i$="?" print"Help"\:f$=bd$+"help.protocol":gosub show.file:goto x.mset1 if (a<1) or (a>5) goto x.mset2 print:if z return x.mset3 print "Are you calling with PCPursuit? ";:gosub get.key if i$="Y" print "Yes":z=600:else print "No":z=300 return ; Ctrl-D, Ctrl-I, Ctrl-S serial number ser.num get i$ if i$<>chr$(9) goto ae.com2 get i$ if i$<>chr$(19) goto ae.com2 ser.num2 print #4 "PAE ProDOS v4.5b - Written by Disk Crasher" return info input @2 "Info on file: "f$:if not f$ return if len(f$)>30 print \"Invalid filename - 30 chars max":return if left$(f$,1)<>"#" gosub name.find:goto info4 a=val(mid$(f$,2,(len(f$)-1))):if a<1 return gosub number info4 fn$=left$(i$,30):f$=lg$+":a"+str$(x)+"."+x$ open #1,f$:a=mark(1):close if a print \"No info on this file":return print \chr$(45,edit(3));:gosub show.file:print chr$(45,edit(3)) ul$="Info'd file: "+lg$+":"+fn$:goto ed.log ; Zipscan routine zipscan print "Zipscan drives":ul$=lg$ nn$=dn$:ll=li:d1=l1:d2=mf print \"[E]xpress or [N]ormal? ";:gosub get.key:if i$="E" goto express if i$<>"N" print "Quit":return print "Normal":open #1,bd$+"drives":position #1,4,0:input #1,d1:close for d2=1 to d1:open #1,bd$+"drives":position #1,4,d2:input #1,lg$:close open #1,bd$+"dat"+lg$:if mark(1) close:dn$="":li=0:goto zip1 input #1,i$\a\b\c\d:close:if not flag(a) next:goto zip2 dn$=i$:li=b:l1=c:mf=d zip1 gosub dir1:print \" continues, or [Q]uit"; gosub get.key:if i$="Q" d2=d1 print:next:lg$=ul$ zip2 dn$=nn$:li=ll:l1=d1:mf=d2 ul$="Zipscanned drives - Normal mode":goto ed.log express print "Express"\\s$:ul$="Zipscanned drives - Express mode":gosub ed.log ul$=lg$:open #1,bd$+"drives":position #1,4,0:input #1,d1:close for d2=1 to d1:open #1,bd$+"drives":position #1,4,d2:input #1,lg$:close open #1,bd$+"dat"+lg$:if mark(1) close:i$="":goto exp1 input #1,i$\a\b\c\d:close:if not flag(a) next:lg$=ul$:return exp1 print \"[Drive: "lg$;:if i$ print " - "i$; print "]"\:open #1,bd$+"dir"+lg$:position #1,95,0 input #1,a:if not a close:print "No files":next:lg$=ul$:return wx=0:for b=1 to a:position #1,95,b:input #1,i$,x$ if len(i$)<40 i$="EMPTY":position #1,95,b:print #1,i$,x$ if i$<>"EMPTY" wx=b:setint(1):print left$(i$,30):setint("") if key(1) print "":close:b=a:next:d2=d1:next:lg$=ul$:return next:if wx=0 print "No files":position #1,95,0:print #1,0 if wx":b=a:next:close:return wx=wx+1:next:close find1 if not d2 print "No match found" if d2=1 print "Found 1 occurance" if d2>1 print "Found "d2" occurances" ul$="Searched for a file -" if not d2 ul$=ul$+" [not found]":else ul$=ul$+" [found]" gosub ed.log:return ; subroutines name.find if f$="/" f$=fn$:print " Filename: "f$ open #1,bd$+"dir"+lg$:position #1,95,0:input #1,a if not a close:print \"No such file":pop:return for b=1 to a:position #1,95,b:input #1,i$,x$ if i$="EMPTY" next:close:print \"File not found":pop:return gf=len(f$):if left$(i$,gf)=f$ x=b:b=a:next:close:goto number1 next:close:print \"File not found":pop:return number open #1,bd$+"dir"+lg$:position #1,95,0:input #1,b if not b close:print \"No files on this drive!":pop:return if a>b close:print \"Error - Highest file # is "b:pop:return position #1,95,a:input #1,i$,x$:close if i$="EMPTY" print \"No such file":pop:return x=a:f$=left$(i$,30):print " Filename: "f$ number1 if info(5) or (li=un) return if left$(i$,2)="S." print\"This file is for SysOps only.":pop:return if left$(i$,2)<>"U." return gh=val(mid$(i$,3,(len(str$(nu))))):if (gh<1) or (gh>nu) return if un<>gh print \"This file is for user #"gh" only.":pop:return return ed.log if info(5) return open #1,bd$+"pae.log":append #1:print #1,ul$:close return upload link l2$ download link l2$,"download" w.file link l5$,"w.file" change link l5$,"change" rename if (li<>un) and (not info(5)) return link l5$,"rename" kill.file link l5$,"kill.file" page link l5$,"page" want.list print "Wants":link l5$,"want.list" activs1 print "Activities":link l5$,"activs1" top.uls print "Top u/lers":link l5$,"top.uls" link.main gosub goodbye clear:recall "l:variables":kill "l:variables" link lm$,"fromsys" link.term ul$="[Disconnected]":gosub ed.log clear:recall "l:variables":kill "l:variables" link lm$,"term1" link.hang gosub goodbye pop:clear:recall "l:variables":kill "l:variables" link lm$,"termin2" goodbye print\ setint(1):copy bd$+"pae.goodbye":setint(""):return show.file setint(1):print:copy f$:setint(""):return spin ch=1 spinon print "!"bs$"/"bs$"-"bs$"\"bs$"!"bs$"/"bs$"-"bs$"\"bs$; print mid$(ch$,ch,1); ch=ch+1 if ch<=len(ch$) goto spinon return return on nocar goto link.term if info(0) print ^ return drives open #1,bd$+"drives":position #1,4,0:input #1,a for b=1 to a:position #1,4,b:input #1,a$:a$=a$+" " setint(1):print left$(a$,3)" - ";:setint("") if key(1) b=a:next:close:return open #2,bd$+"dat"+a$ if mark(1) close #2:print "":next:close:return input #2,i$\x\gh\gg\ww:i$=i$+chr$(32,35):i$=left$(i$,35) if gg=1 i$=i$+"[R] " if gg=2 i$=i$+"[W] " if gg=3 i$=i$+"[F] " if not gg i$=i$+" " i$=i$+"Flag: ":a$=str$(x)+" ":a$=left$(a$,2) i$=i$+a$+" Manager: #"+str$(gh) setint(1):print i$:setint(""):if key(1) b=a close #2:next:close:return get.key ww=0 get.key1 if (clock(2)<>0) and (clock(1)>clock(2)) print "[Time Limit Exceeded]":goto link.term gf=peek(-16384):if (gf=129) or (gf=150) get i$:print bs$;:return gf=key(0):if (gf>96) and (gf<123) gf=gf-32 if (gf=7) or (gf=15) or (gf=16) goto get.key2 if gf i$=chr$(gf):return get.key2 ww=ww+1 if ww=2000 print chr$(7,2);:goto get.key1 if ww=4000 pop:goto link.term if (not info(0)) and (not info(5)) goto link.term goto get.key1 case.convert ab$="":for wy=1 to len(fn$):wx=asc(mid$(fn$,wy,1)) if (wx=32) or (wx=46) ab$=ab$+".":next:goto case1 if (wx<48) or (wx>90) next:goto case1 if (wx>57) and (wx<65) next:goto case1 ab$=ab$+chr$(wx):next case1 ab$=left$(ab$,15) if right$(ab$,1)="." ab$=left$(ab$,(len(ab$)-1)):goto case1 return