home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_07_1985_Transactor_Publishing.d64
/
c64 bbs link
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
3KB
|
110 lines
0 rem the transactor volume 6 issue 02 page 50
1 rem c64 bbs link
2 rem a simple database for your bbs numbers
3 rem the program "sort64" must be in memory at $c100
4 rem if x=0 then x=1 : load "sort64",8,1
5 dim n$(500):goto200
6 save"@0:64 bbs link",8:verify"64 bbs link",8:stop
10 hi=int(n/256):lo=n-hi*256:return
20 n=rc:gosub10:print#15,"p"chr$(2+96)chr$(lo)chr$(hi)chr$(ps)
25 return
30 input#15,a,z$,c,d:print:printwt$;a;yl$;" ";z$;gy$;c;" ";d:return
40 print:printtab(11)gy$"insert master disk"
41 geta$:ifa$=""goto41
42 return
50 poke53265,peek(53265)and239:return
60 poke53265,peek(53265)or16:return
200 open15,8,15:printchr$(14)
205 cl$=chr$(147):wt$=chr$(5):gy$=chr$(155):cy$=chr$(159):cu$=chr$(145)
210 rt$=chr$(13):yl$=chr$(158)
215 poke53281,0:poke53280,6
220 printcl$:printtab(14)gy$" 64 bbs link":fora=1to40:printyl$"-";:next:print
225 printtab(16)wt$;cu$;"bob hayes":fora=1to40:print"-";:next:print
230 x=7
240 printtab(x)wt$"1> "gy$"create file"
250 printtab(x)wt$"2> "gy$"enter new record"
260 printtab(x)wt$"3> "gy$"modify existing record"
280 printtab(x)wt$"4> "gy$"print list"wt$
290 print:printtab(x);:poke19,64:input"select:";s$:print:poke19,0
300 s=val(s$):ifs>5ors<1goto290
310 on s goto 320,400,600,700
320 printcl$;cr$;:poke19,64:input"approx size: ";sz:print:poke19,0
325 gosub40
330 open2,8,2,"0:data,l,"+chr$(77)
335 rc=sz:ps=1:gosub20
336 print#2,"last";rt$:close2
340 open2,8,2,"@0:point,p,w":x=1:print#2,x;rt$:close2
350 run
400 printcl$:gosub30
405 print:printwt$"name/bbs = 20 chars":print"phone # = 12 chars"
410 print"handle/name = 20 chars":print"password = 20 chars"
420 print:poke19,64:printcy$"name/bbs:"wt$;:input x$:print:poke19,0:rem white
425 ifx$<>"*"thenb$=x$
430 poke19,64:printcy$"phone # :"wt$;:input x$:print:poke19,0:rem cyan/white
435 ifx$<>"*"thenp$=x$
440 poke19,64:printcy$"handle :"wt$;:input x$:print:poke19,0
445 ifx$<>"*"thenh$=x$
450 poke19,64:printcy$"password:"wt$;:input x$:print::poke19,0
452 ifx$<>"*"thenc$=x$
455 print:print:input"sure (y/n/q)";a$:ifa$="q"thenrun
460 ifa$="n"goto400
465 ifqq=0thenqq=1:gosub40
466 gosub50
470 open2,8,2,"point":input#2,k:close2
480 if r <> 0 then k=r
485 open2,8,2,"data"
490 rc=k
500 ps=1:gosub20:print#2,left$(b$,20);rt$
510 ps=22:gosub20:print#2,left$(p$,12);rt$
520 ps=35:gosub20:print#2,left$(h$,20);rt$
530 ps=56:gosub20:print#2,left$(c$,20);rt$
540 close2
550 if r <> 0 then gosub60:run
560 k=k+1:open2,8,2,"@0:point,p,w":print#2,k;rt$:close2:gosub60
570 goto400
600 printcl$;yl$"entering a * will leave data same":print
605 ch=0:printwt$;:input"input the entry # for changes";ch
610 ifch=0thenrun
620 r=ch:rc=ch:qa=1:open2,8,2,"data":gosub820:close2:goto400
700 printcl$"enter printer type:":print
710 printgy$"a) 1525/mps 801, b) 1526/mps 802"
720 print:input"type";a$:ifa$<>"a"anda$<>"b"goto700
725 printcl$;wt$:input"<u>pper/<l>owercase";c$:ifc$<>"u"andc$<>"l"goto725
730 ifa$="a"andc$="l"then open4,4:print#4,chr$(17):goto750
732 ifa$="b"andc$="l"thenopen4,4,7:print#4,chr$(17):goto750
734 open4,4
750 print#4," name/bbs ";:rem 3 spaces/14 spaces
760 print#4," phone number ";:rem 2 spaces
770 print#4,"handle ";:rem 15 spaces
780 print#4,"password ";rt$:rem 12 spaces
782 fora=1to80:print#4,"-";:next
785 open2,8,2,"point":input#2,k:close2
790 open2,8,2,"data"
800 fora=1tok-1
810 rc=a
820 ps=1:gosub20:input#2,b$
825 ps=22:gosub20:input#2,p$
830 ps=35:gosub20:input#2,h$
835 ps=56:gosub20:input#2,c$
836 ifqa=1thenqa=0:return
840 rem
845 iflen(b$)<20thenb$=b$+".":goto845
850 iflen(p$)<12thenp$=p$+" ":goto850
855 iflen(h$)<20thenh$=h$+" ":goto855
860 iflen(c$)<20thenc$=c$+" ":goto860
861 rem
862 rem
863 ifa<10thenn$(a)=str$(a)+" "+b$+".."+p$+" "+h$+" "+c$:goto870
865 n$(a)=str$(a)+" "+b$+".."+p$+" "+h$+" "+c$
870 next:close2
875 rem
880 srt=12*4096+256
890 sys(srt),n$,1,k-1,4,23,a
900 fora=1tok-1:ifmid$(n$(a),5,1)="@"goto902
901 print#4,n$(a)
902 geta$:ifa$=""goto906
904 geta$:ifa$=""goto904
906 next
910 print#4:close4:run
920 rem *** delete lines 890- for listing 2 ***