5	data 300,1200,2400,4800,9600,19200,38400,57600,115200,230400
8	if peek(2)>2 then poke 2,0
9	if peek(6)=255 and peek(2)=0 then poke 45,peek(174) : poke 46,peek(175) : clr
10	if (peek(186)<7 or peek(186)>30) and peek(186)<>1 then poke 186,8
20	poke 2,peek(2)+1 : on peek(2) goto 30,40,50
30	load"nova9.6-1.ml",peek(186),1
40	load"nova9.6-2.ml",peek(186),1
50	poke 55,0 : poke 56,124 : poke 643,0 : poke 644,124
60	clr : sys 38436 : vn$="9.6" : dv=peek(186) : \
	if dv=7 then dv$="1:" : bp=1 : goto 70
65	open15,dv,15:dv$="0:"
70	mp=19 : dim lk$(6),p$(mp),ph$(mp),pw$(mp),pt$(mp),bd%(mp),at%(mp),sc$(mp),m%(mp),fc$(16),f$(21),bd$(9),s%(6),w%(2),x%(2),y%(2) : lk$(6)="**B000000000"
90	ml=38400 : sl=ml+93 : bf=52224 : bg=bf+24 : \
	sr=32000 : op=ml+15 : xm=1024 : rv=xm+256 : \
	sn=35840 : cl=34048 : te=36864 : pt=49161 : pg=49153 : \
	md=52992 : m1=md+18 : dt=usr(ml+87) : sa=usr(4) : \
	da=te+4 : sys ml+66 : dp=dv : dp$=dv$ : pn=4 : sys ml+57 : \
	for i=0 to 9 : read bd$(i) : next
113	f$="nova9.6-rtl.ml" : gosub 7180 : sys sl+75
115	mi$="e1v1m1x4&c1&d2s0=0" : pt$="Zmodem" : rm$="internal" : \
	sr$="SwiftLink" : mo$="Hayes fast" : fo$="novaterm" : s8$="default" : \
	tm$="Standard-80" : pf$="nova phone" : ld$="Nobody" : td=1 : \
	poke xm+20,8 : gosub 1380 : ifer=0then170
140	re=30 : c3=15 : c7=peek(dt+12) : c8=peek(dt+23) : c9=peek(dt+24) : \
	pn=4 : ps=7 : d1=dv : d2=dv : d1$="0:" : d2$=d1$ : \
	d3$=d1$ : xo=17 : xf=19 : di=1 : xp=1 : bd=6 : \
	d3=-8*(dv=7)-dv*(dv<>7) : zr=1 : zs=1 : gosub1435
170	poke dt+7,c8 : poke dt+19,c3 : gosub 5250 : print "\S" : gosub5740
190	cr$=chr$(13) : dl$=chr$(20) : q$=chr$(34) : poke 198,0 : p4=1
195	if ss$>"" then i$=ss$ : gosub 9010 : gosub 3520
200	gosub3660 : sys ml+84 : print "\S\R\w\10 \W~D\w\16~I~F"
205	print "\w\10 \r~K\Z\w\17 " : \
	print "\w\10 \W\r~K\Z N O V A T E R M "
210	print "\w\10 \W~C\Z\r\w\17 \q"
220	poke 646,c3 : print "\w\12 * version 9.6c *"
230	print "\q\w\10 ~D\w\17~I~F" : print "\w\10 \r~K\R\w\17 ~K"
240	print "\w\10 \r~K\R  Terminal mode _~K" : \
	print "\w\10 \r~K\R  Dial a number _~K" : \
	print "\w\10 \r~K\R  Configuration _~K" : \
	print "\w\10 \r~K\R Disk operations_~K" : \
	print "\w\10 \r~K\R   Buffer menu  _~K"
250	print "\w\10 \r~K\R Device settings_~K" : \
	print "\w\10 \r~K\R Utility modules_~K" : \
	print "\w\10 \r~K\R  Exit terminal _~K" : \
	print "\w\10 \r~K\R" tab(28) "~K" : \
	print "\w\10 ~C\r\w\17~I\R~V" : gosub 6500
260	print "\q\w\k Modem is " mid$("OffOn",ca*3+1,3) "-line" : \
	print "\q" tab((27-len(ld$))/2) "Last dialed: "ld$ : \
	print "\s\w\24\q  Copyright (C)1989-1997 by Nick Rossi"; : sys ml+84
290	mx=8 : d=8 : tb=12 : p=p4 : gosub 6230 : p4=p : p5=1
300	on p goto 3120,320,910,730,1608,305,7050,6150
305	gosub 7720 : goto 200
310	er=0 : if i$>"" then bu=1 : gosub 6650
311	if er then print "\SLoading script: "i$ : r1=bp : bp=1 : gosub 2120 : bp=r1
312	return
315	poke 211,0 : if peek(6)and64 then poke 781,peek(214) : poke 211,40 : \
	sys cl+12
316	print "Result: " m$ "\k" : return
320	sc=0 : poke sa+12,peek(sa+12)and127 : gosub 2860 : rt=0
330	tr=0 : p%=0 : if ct=0 and p$="" then 200
340	if pq=0 and ct then p=99
350	if rt and tr=rt then 320
360	if ct=0 then ex$="Dialing" : ld$=p$ : tr=tr+1 : goto 440
370	if p%>=ct then 200
380	if pq then tr=tr+1 : goto 401
390	p=p+1 : if p>ph then p=1 : tr=tr+1
400	if m%(p)=0 then 390
401	if tr=1 and sc=0 then gosub 3520 : i$=sc$(p) : gosub 310
402	if (ct>1 or tr=1) and pt$(p)>"" then gosub 3520 : \
	tm$=pt$(p) : i$="tmod."+tm$ : gosub 9010
410	if ph$(p)="" then p%=p%+1 : goto 370
430	p%=0 : bd=bd%(p) : gosub 5250 : p$=ph$(p) : ex$=p$(p) : ld$=ex$
440	gosub 3510 : sys ml+9 : if peek(211) then print 
450	print "Try #" mid$(str$(tr),2) " " ex$ ": "; : sys md+12
460	print tab(40) "F1:Abort  Space:Redial  Waiting..."; : r1=0
520	ti$="000000" : m$="" : x=0 : poke 668,peek(667) : y=peek(211)
530	gosub 6500 : if ca then 650
540	sys ml+27 : if peek(783) and 1 then 570
545	a=peek(780) : if (a and 127)<32 then 570
550	m$=m$+chr$(a) : if m$="busy" or m$="no carrier" or m$="no dialtone" or \
	m$="no dial tone" or m$="no answer" or m$="voice" then 620
560	if m$="connect" then 650
570	get a$ : if a$="\E" or a$=" " then m$="Aborted"
580	if a$="\E" then sys md+15 : gosub 315 : goto 3120
590	if a$=" " then 620
600	a=re-val(ti$) : if a<>r1 then poke 211,y : if peek(6) and 64 then poke 781,peek(214) : sys cl+12
605	if a<>r1 then r1=a : print r1 "\157\k";
606	if a>0 then 530
610	m$="Timeout"
620	sys md+15 : gosub 315 : ti$="000000"
630	get a$ : ifa$="\E" then 3120
635	if val(ti$) < 2 then 630
640	goto 350
650	m$="Connected!" : gosub 315 : sys ml+12
660	gosub 3210 : if ct=0 then 3120
670	fc$(1)=pw$(p)+"\E" : poke dt+32,(at%(p)and8)/8 : m%(p)=0
705	if sc$(p)>" " and sc=0 then sc=1 : i$=sc$(p) : gosub 9010
710	if sc then return
720	goto 3120
730	if dv=7 then a=4 : gosub 7950
735	sys ml+84 : print "\S \r Disk Operations \R" tab(24); : \
	gosub 8000 : print : sys ml+24
740	print "\q Disk command_" : \
	print " Disk directory_" : \
	print " Delete files_" : \
	print " View textfile_" : \
	print " View file in 80 columns_" : \
	print " Print textfile_" : \
	print " Textfile to modem_"
750	print " ASCII file to PET_" : \
	print " PET file to ASCII_" : \
	print " PET file to Unix_" : \
	print " UUdecode file_" : \
	print " UUencode file_" : \
	print " UUencode file in PET_" : \
	print " (Device settings)_" : \
	print " Quit_" : sys ml+84
780	d=1 : mx=15 : tb=1 : p=p5 : gosub 6230 : p5=p : \
	if p>=4 and p<=13 then p=p-3 : goto 8220
790	on p goto 800,840,7220 : on p-13 goto 850,200
800	if dv=7 then a=4 : gosub 7950
805	print "DOS:" mid$(str$(dv),2) "," dv$ dl$ ">"; : p9=41 : gosub 4050 : if i$="" then 860
810	if left$(i$,1)="$" then 830
812	if left$(i$,1)="#" then 822
815	if i$<>"@" then 820
816	poke 781,15 : sys ml+60 : print s$; : goto 825
820	print# 15,i$ : goto 825
822	i$=mid$(i$,2) : gosub 7870
823	if er or ((a<8 or a>30) and a<>1) then gosub 835 : goto 825
824	dv=a : dv$=j$ : gosub 7990
825	if sc then return
826	print : goto 800
830	gosub 4270 : print : goto 800
835	print "\mIllegal device number" : return
840	print "\S"; : gosub 4260 : gosub 7190 : goto 730
850	gosub 7720 : goto 730
860	if sc then return
870	goto 730
900	print mid$("OFFON\k",-(a>0)*3+1,3) : return
910	p5=1 : p6=0
920	print "\S" tab(12) "\r Configuration "
925	print "\s\w\24\q \r F1:Quit    Right-cursor for MORE >> \R\k";
930	d=1 : mx=21 : tb=1 : p3=1 : tu=224 : p=p5 : if p6 then 1010
940	print "\s\q\q Term emulation_  : "tm$ : \
	print " Baud rate_\w\7 : " bd$(bd) "\k" : \
	print " Word/parity_\w\5 : " mid$("8N17E17O1",peek(dt+32)*3+1,3) : \
	print " 80-column driver_: " s8$ : \
	print " 40-column font_  : " fo$ : \
	print " 40-column colors_" : \
	print " 80-column colors_" : \
	print "\q Modem type_  : " mo$
950	print " Modem init_  : AT" left$(mi$,20) : \
	print " Dial method_ : " mid$("pulsetone ",di*5+1,5) : \
	print " Redial time_ :" re "\157 seconds\k" : \
	print " Dial pacing_ :" pd "\k" : \
	print " Carrier type_: " mid$("InvertedNormal  ",peek(dt+9)/2+1,8) : \
	print "\q Protocol_\w\14 : "pt$ : \
	print " Block size_\w\12 :" bs
960	print " Chop X/Ymodem padding_ : "; : a=xp : gosub 900 : \
	print " Zmodem auto-download_  : "; : a=peek(dt+43) : gosub 900 : \
	print " Allow Zmodem streaming_: "; : a=zs : gosub 900 : \
	print " Existing files policy_ : Re" mid$("name placesume ",zr*5+1,5)
990	gosub 6230 : p3=0 : p5=p : p6=0 : if a$="\29" then p5=1 : p6=1 : goto 920
995	if a$<>cr$ and peek(da+3)=1 then 200
1000	on p goto 7045,5210,1197,6990,6970,7550,7560,1006,1120,1270,1180,1191,1201,1215,1006,7005,2810,1175,1240,1250,1255
1006	sys ml+18 : p5=1 : goto 930
1010	print "\s\q\q Serial driver_ : " sr$ : \
	print " Flow control_  : " mid$("None    SoftwareHardware",peek(dt+42)/8+1,8) : \
	print " Flow tolerance_:" peek(dt+8) : \
	print " XOFF character_:" xf : \
	print " XON character_ :" xo : \
	print " Line pacing_   :" ld "\157 seconds\k"
1020	print "\q Define F-keys_" : \
	print " Device settings_" : \
	print " Phone book_    : " pf$ : \
	print " F-key file_    : " fk$ : \
	print " Startup script_: " ss$ : \
	print " Memory device_ : " rm$
1030	print " Set time from_ : " ts$ : \
	print "\q Print in ASCII_        : "; : a=peek(dt+25) : gosub 900 : \
	print " Print with linefeeds_  : "; : a=peek(dt+3) : gosub900 : \
	print " Save buffer when full_ : "; : a=peek(6) and 16 : gosub 900 : \
	print "\q Load configuration_" : print " Save configuration_"
1105	gosub 6230 : p3=0 : p5=p : p6=1 : if a$="\29" then p5=1 : p6=0 : goto 920
1107	if a$<>cr$ and peek(da+3)=1 then 200
1110	on p goto 1130,1220,1193,2161,2161,1176,1006,4740,7715,1281,1283,1290,1145,8300,1006,1200,1199,1195,1006,1210,1540

1120	sl$="modem type" : ex$="modem." : gosub 7100 : if er=0 and p<mx then mo$=f$(p)
1125	gosub 5250 : gosub 1150 : goto 920

1130	sl$="serial driver" : ex$="serial." : nl=2 : gosub 7100 : if er=0 and p<mx then sr$=f$(p)
1140	gosub 1535 : goto 920

1145	gosub 1870 : goto 920
1150	if (peek(m1+1) and 2)=0 then di=0
1160	poke  m1+1,(peek(m1+1) and 3) or di*4 : mb=peek(sr+35) : if mb>peek(m1) then mb=peek(m1)
1161	poke  m1+2,pd : return

1175	xp=1-xp : goto 930

1176	poke 211,18 : p9=1 : gosub4050 : a=val(i$) : if a>=0 and a<10 then ld=a
1177	goto 930

1180	if (peek(m1+1) and 2)=0 then di=1
1190	di=1-di : gosub 1150 : goto 930

1191	poke 211,16 : p9=2 : gosub 4050 : a=val(i$) : if a>0 then re=a
1192	goto 930

1193	poke 211,18 : p9=3 : gosub 4050 : a=val(i$) : if a>10 and a<256 then poke dt+8,a
1194	goto 930

1195	a=16 : gosub 8070 : goto 930

1197	poke dt+32,peek(dt+32)+1 : if peek(dt+32)>2 then poke dt+32,0
1198	poke dt+31,1-32*(peek(dt+32)=1)-96*(peek(dt+32)=2) : goto 930

1199	poke dt+3,1-peek(dt+3) : goto 930

1200	poke dt+25,1-peek(dt+25) : goto 930

1201	poke 211,16 : p9=2 : gosub 4050 : a=val(i$) : if a>=0 then pd=a : poke m1+2,pd
1202	goto 930

1210	gosub 1380 : goto 920

1215	poke dt+9,16-peek(dt+9) : goto 930

1220	poke dt+42,peek(dt+42)+64 : if peek(dt+42)>128 then poke dt+42,0
1221	goto 930

1230	gosub 1350 : goto 920

1240	poke dt+43,1-peek(dt+43) : goto 930

1250	zs=1-zs : goto 930

1255	zr=zr+1 : if zr>2 then zr=0
1256	goto 930

1260	poke 211,18 : goto 4045

1270	poke 211,18 : p9=50 : gosub 4050 : if i$>"" then mi$=i$
1280	goto 920

1281	gosub 1260 : if i$>"" then pf$=i$
1282	goto 930

1283	gosub 1260 : if i$>"" then fk$=i$
1284	goto 930

1290	gosub 1260 : ss$=i$ : goto 930

1295	a=1 : gosub 7950 : if dv=7 then a=4 : gosub 7950
1296	return

1300	gosub 1295 : if er then return
1310	for i=1 to mp : gosub 4350 : next : i$=pf$ : gosub 6645 : if er then return
1315	input#2,v$ : if v$<>vn$ then ph=val(v$) : goto 1319
1317	input#2,ph
1319	if ph>mp then ph=mp
1320	for i=1 to ph : input#2,p$(i),ph$(i),pw$(i) : if v$=vn$ then input#2,pt$(i)
1330	input#2,bd%(i),at%(i),sc$(i) : next : close2 : return

1350	gosub 1295 : if er then return
1355	i$=pf$ : gosub6740 : tt=2 : gosub 7260 : if er then return
1360	cmd2 : print vn$ : print ph : for i=1 to ph : print q$ p$(i) : print q$ ph$(i) : print q$ pw$(i) : print q$ pt$(i) : print bd%(i) : print at%(i) : print q$ sc$(i) : next : sys 65484 : goto 7380
1375	if dv<>7 then return
1376	a=d3 : gosub 6950 : if er then return
1377	a=1 : gosub 7950 : nl=1 : f$="nova.Configure" : goto 7180
1380	a1$=mo$ : a2$=pt$ : a3$=te$ : gosub 1295 : if er then return
1385	i$="nova data "+vn$ : gosub 6645 : if er then dv=dp : goto1375
1390	input#2,v$ : if v$<>vn$ then close 2 : er=1 : return
1420	input#2,rm$,bd,di,cp$,d1,d2,d1$,c1$,d2$,c2$,d3,d3$,c3$,pn,ps, \
	c1,c2,c3,h,b,re,c7,c8,c9,xo,xf,xp,zs,ld,g,d,e,f,pd,zr, \
	mi$,mo$,pt$,fo$,tm$,pf$,fk$,ss$,sr$,s8$,ts$ : close 2
1430	xl=e and 1 : poke dt+38,h : poke dt+25,b and 1 : poke dt+3,(band2)/2 : \
	poke dt+32,gand3 : poke 6,(peek(6) and 239) or (eand16) : poke dt+8,d : \
	poke cl+35,f : poke dt+42,(eand96)*2 : poke dt+43,(eand2)/2 : \
	poke dt+9,g and 16 : poke dt+23,c8 : poke dt+24,c9 : poke dt+12,c7
1435	a=1 : gosub 7950
1437	if rm$>"" then f$="ram."+rm$ : gosub 7180 : sys sl+45 : if peek(bg)=0 then rm$="internal" : goto 1437
1438	sys sl+60
1440	if ts$>"" then f$="time."+ts$ : gosub 7180 : if e<19 then poke 780,1 : sys 49152
1445	if pt$>"" then f$="prt."+pt$ : gosub 7180 : gosub 7070 : if e>19 then pt$=a2$
1450	if fo$>"" then f$="font."+fo$ : gosub 7180 : if e>19 then fo$=""
1460	gosub 7950 : if mo$>"" then f$="modem."+mo$ : gosub 7180 : if e>19 then mo$=a1$
1470	if s8$>"" then f$="80col."+s8$ : gosub 7180 : if e>19 then s8$=""
1480	if tm$>"" then i$="tmod."+tm$ : gosub 9010 : if er then tm$=""
1485	if f8$="" then i$="novaterm" : gosub 9780
1487	if sr$>"" then f$="serial."+sr$ : gosub 7180
1490	poke dt+11,1 : gosub 7580 : gosub 1300 : gosub 1605 : er=0
1535	sys sl+51 : gosub 1150 : poke 2,peek(ml+87) : goto 5250
1540	gosub 1295 : if er then 920
1541	print "\s\w\24\q\k "; : gosub 7420 : if y=0 then 920
1542	gosub 1550 : goto 920
1550	i$="nova data "+vn$ : gosub 6740 : tt=2 : gosub 7260 : if er then return
1560	cmd 2 : print vn$ : print rm$ : print bd : print di : print q$ cp$ : \
	print d1 : print d2 : print q$ d1$ : print q$ c1$ : print q$ d2$ : \
	print q$ c2$ : print d3 : print q$ d3$ : print q$ c3$ : \
	print pn : print ps : print c1 : print c2 : print c3 : \
	print peek(dt+38) : print peek(dt+25)+2*peek(dt+3)
1570	print re : print peek(dt+12) : print peek(dt+23) : \
	print peek(dt+24) : print xo : print xf : print xp : print zs : \
	print ld : print peek(dt+32) or peek(dt+9) : print peek(dt+8) : \
	print xl+peek(dt+43)*2+(peek(6)and16)+peek(dt+42)/2 : \
	print peek(cl+35) : print pd : print zr
1580	print q$ mi$ : print q$ mo$ : print q$ pt$ : \
	print q$ fo$ : print q$ tm$ : print q$ pf$ : \
	print q$ fk$ : print q$ ss$ : print q$ sr$ : print q$ s8$ : \
	print q$ ts$ : sys 65484 : goto 7380

1600	gosub 1295 : if er then return
1601	sys ml+24 : i$=fk$ : gosub 6740 : tt=2 : gosub 7260 : if er then return
1602	cmd 2 : for i=2 to 16 : print q$ fc$(i) : next : sys 65484 : goto 7380

1605	gosub 1295 : if er then return
1606	i$=fk$ : gosub 6645 : if er then return
1607	for i=2 to 16 : input#2,fc$(i) : next : close2 : return

1608	p5=3 : p6=0 : bp=ob : a=4 : gosub 7950
1609	goto 1620
1610	gosub 7190
1620	sys ml+84 : print "\S \r Buffer Menu \R" tab(24); : if dv then gosub 8000
1621	print "\m\q Current buffer subdirectory:" bp
1624	b=bg+5 : gosub 6810 : d=a : b=bg+2 : gosub 6810 : d=d-a
1628	a$="not found" : if d then a$=mid$(str$(int(d*10/1024)/10),2)+"k"
1630	print "\q Memory device_: " rm$ " (" a$ ")" : \
	print "\q Buffer directory_\w\5 View file_" : \
	print " Change subdirectory_  View in 80 cols_" : \
	print " Disk directory_\w\7 Print file_" : \
	print " Change buffer device_ File to modem_" : \
	print " Save files to disk_   ASCII to PET_"
1640	print " Load files from disk_ PET to ASCII_" : \
	print " Rename file_\w\10 PET to Unix_" : \
	print " Delete files_\w\9 UUdecode file_" : \
	print " Clear subdirectory_   UUencode file_" : \
	print " Reformat buffer_\w\6 UUencode in PET_" : \
	print " Quit_\w\17 Quit_" : sys ml+84
1650	bu=1 : p=p5 : tu=128 : if p6 then 1690
1680	mx=13 : d=3 : tb=1 : gosub 6230 : p5=p : if p=mx then bu=0 : ob=bp : goto 200
1682	if a$="\29" then p6=1 : p5=p+2*(p>=3) : sys ml+18 : goto 1650
1685	print "\s\w\18\q"; : on p goto 1869,1620,1740,1735,1880,1860,2080,2155,2010,1970,2060,1995
1690	mx=11 : d=5 : tb=23 : gosub 6230 : p5=p : if p=mx then bu=0 : ob=bp : goto 200
1695	if a$="\29" then p6=0 : p5=p+2 : sys ml+18 : goto 1650
1700	print "\s\w\18\q"; : goto 8200
1710	gosub 4040 : if i$="" then j=0 : er=1 : return
1720	gosub 6650 : if er then gosub 6600 : if sc=0 then 7190
1730	return
1735	print " Subdirectory #: "; : p9=2 : gosub 4050 : if i$="" then 1620
1736	a=val(i$) : if a>=0 and a<31 then bp=a
1737	goto 1620
1740	poke dt+40,255 : print "\S\q0 \r" q$ "novaterm buffer " q$ "  d" mid$(str$(bp),2) : bc=0 : f=0
1760	gosub 6800 : if ts then 1780
1770	print mid$(str$(bl),2) tab(5) q$ bf$ q$ tab(24) mid$("prgseqscr",tt*3-2,3);
1775	print "  (" mid$(str$(bb),2) ")" : gosub 4960 : if f=0 then 1760
1780	gosub 1785 : poke dt+40,0 : goto 1610
1785	gosub 6512 : print mid$(str$(by),2) " blocks /" bb "bytes free." : return
1790	if peek(6) and 4 then 1965
1800	print "Capture file: "; : gosub 4045 : if i$="" then return
1810	bp=0 : tt=2 : gosub 7260 : return
1830	if (peek(6) and 4)=0 then return
1840	sys sl+39 : print "Capture file closed" : return
1850	gosub 1965 : goto 1950
1860	print "Device, drive: "; : p9=7 : gosub 4050 : if i$="" then 1620
1861	gosub 7870 : if er then gosub 835 : goto 1610
1862	d3=a : d3$=j$ : a=4 : gosub 7950 : goto 1620
1869	gosub 1870 : a=4 : gosub 7950 : goto 1620
1870	sl$="memory device" : ex$="ram." : gosub 7100 : if er or p=mx then return
1871	rm$=f$(p) : sys sl+45 : f$="nova9.6-1.ml" : gosub 7181 : poke sl+60,76 : sys sl+60
1872	f$="prt."+pt$ : gosub 7181 : f$="80col."+s8$ : goto 7181
1880	a=4 : gosub 7950 : if er then 1620
1881	print "\S"; : gosub 4260 : goto 1610
1950	if sc then return
1960	goto 1610
1965	print "Capture file still open" : return
1970	if peek(6) and 4 then 1850
1980	dv=7 : gosub 5270 : dv=d3 : if fl=0 then 1620
1990	print "\S" : gosub 7420 : if y then print : print : for l=1 to fl : i$=f$(l) : print "Deleting " i$ : gosub 6760 : next
1991	goto 1620
1995	print "You will lose all data in the buffer!" : gosub 7420 : if y then poke bg+1,0 : sys bf+18
1996	goto 1620
2010	gosub 1710 : if er then 1620
2020	k=j : print "Rename as: "; : gosub 4045 : if i$="" then 1620
2030	gosub 6650 : if er=0 then print "\qFile exists" : gosub 7190 : goto 1620
2050	poke 780,k-1 : sys bf+12 : sys sl+42 : poke 780,k-1 : sys bf+15 : goto 1620
2060	if peek(6) and 4 then 1850
2065	gosub 7420 : print : if y=0 then 1620
2066	for bc=peek(bg+1) to 1 step -1 : poke 780,bc-1 : \
	sys bf+12 : tp=(peek(bg+21) and 124)/4
2067	if tp=bp then print "\mDeleting "bf$; : j=bc : gosub 6765
2068	next : goto 1620
2080	a=4 : gosub 7950 : if er then 1620
2082	if peek(6) and 4 then 1850
2085	dv=7 : gosub 5270 : dv=d3 : if fl=0 then 1620
2087	print "\S"; : for l=1 to fl : i$=f$(l) : print : \
	print "Saving " i$ : gosub 2090 : next : gosub 8080 : goto 1620
2090	gosub 6650 : if er then 6600
2092	bu=0 : gosub 7260 : bu=1 : if er and e1<>63 then 6600
2093	if er=0 then 2100
2094	if sc then 2099
2095	print "Replace, Append, or Skip? \r \R\157";
2096	get a$ : if a$<>"s" and a$<>"a" and a$<>"r" then 2096
2097	print a$ : if a$="s" then return
2098	if a$="r" then print#15,"s" dv$ i$ : goto 2092
2099	open 2,dv,2,dv$ + i$ + "," + tp$ + ",a"
2100	poke 780,46 : poke 781,0 : poke 782,2 : sys sl : close2 : return
2120	if peek(6) and 4 then 1850
2125	bu=0 : gosub 6650 : bu=1 : if er then 6600
2130	gosub 7260 : if er then close2 : return
2140	poke 780,46 : poke 781,2 : poke 782,0 : sys sl : close2 : goto 7380
2150	if sc then return
2151	goto 1620
2155	a=4 : gosub 7950 : if er then 1620
2156	if peek(6) and 4 then 1850
2157	bu=0 : gosub 5270 : bu=1 : if fl=0 then 1620
2158	print "\S"; : for l=1 to fl : i$=f$(l) : print : \
	print "Loading "i$ : gosub 2120 : next : gosub 8080 : goto 1620
2161	poke 211,18 : p9=3 : gosub 4050 : a=val(i$) : if p=5 then xo=a : poke dt+16,xo : goto 930
2163	xf=a : poke dt+15,xf : goto 930
2170	ap=peek(dt+32) : poke dt+32,0 : gosub 8000
2171	print tab(23-xl) "Translation: "; : if xl then print "\r ON " : goto 2173
2172	print "OFF"
2173	print "\w\5\q" : if bw=0 then 2180
2175	print "\w\40~I"; : a=int(bw/40) : b=bw-a*40 : print "\w" chr$(a) "\q" tab(b) "\r~D\w\39~I\R~V"
2180	print "\s\q\q\q" : goto 2533
2184	print "\s\w\24\q\w\11 \r Hold C= to abort \R\s\w\8\q"; : return
2185	if peek(pt+14) and 64 then 2390
2187	a=2 : gosub 7950 : if er then 2390
2188	if (peek(pt+14) and 32) and dv<>7 then st$="Set device to buffer" : goto 2390
2190	print "\S" tab((40-len(pt$)-9)/2) "\r " pt$ " upload \q" : gosub 2170 : if peek(pt+14) and 8 then 2430
2250	print " File: "; : gosub 4045 : if i$="" then 2390
2270	gosub 6650 : if er and am=0 then print "\s\w\5\q\k" : print "\k"; : gosub 6600 : gosub 7210
2275	if er then 2380
2280	print "\s\w\4\q File: " i$ "\k" : i$=i$+","+tp$ : print " Type: " tt$
2300	s$=mid$(str$(bb),2) : print " Size:\k" bl "\157 blocks (" s$ " bytes)\k"
2320	gosub 2184 : print " Bytes sent:\w\11 Retries:";
2370	poke pt+16,tt : sys pt-9 : ff=ff+1
2375	if peek(pt+15) then st$="Upload aborted!"
2380	close2
2390	es=0 : if am then return
2392	if dv=7 then a=1 : gosub 7950
2395	poke dt+32,ap : if sc or se then return
2400	goto 3120
2420	print "\S" : gosub 5740 : goto 200
2430	if sc then f$(1)=i$ : fu=1
2435	if fu then 2526
2440	gosub 5270 : fu=fl : if fu=0 then 2390
2441	goto 2190
2526	print "\s\w\6\q" tab(11) "\r Waiting to start " : sys pt-9 : if peek(pt+15) then fu=0 : goto 2375
2530	print "\Q\k" : ff=0 : for y=1 to fu : i$=f$(y) : am=1 : gosub 2270 : am=0 : if peek(pt+15) then y=fu
2531	next : gosub 8080 : fu=0 : if peek(pt+15) then 2375
2532	i$="" : am=1 : gosub 2370 : am=0 : st$="Files sent:"+str$(ff-1) : goto 2390
2533	a=bs : b=pt+1 : gosub 7520 : poke pt+18,dv : poke pt+21,-(dv=7)
2534	poke pt+22,xl : poke pt+23,xp : poke pt+24,zs : return
2535	a=3 : gosub 7950 : if er then 2390
2537	if (peek(pt+14) and 32) and dv<>7 then st$="Set device to buffer" : goto 2390
2540	print "\S" tab((29-len(pt$))/2) "\r "pt$" download \q" : gosub 2170
2550	if dv=7 and (peek(6) and 4) then sys sl+39
2570	ff=0 : tt=1 : tp$="p" : s$="" : if peek(pt+14) and 10 then 2690
2640	if sc=0 or i$="" then 2660
2650	if mid$(i$,len(i$)-1,1)="," then tp$=right$(i$,1) : i$=left$(i$,len(i$)-2)
2660	print " File: "; : gosub 4045 : if i$="" then 2390
2670	gosub 6650 : close2 : if er then 2690
2680	if zr then 2683
2681	if sc then 2390
2682	print "\Q" tab(27) "Replace? \r \R\157"; : gosub 7430 : print : if y=0 then 2390
2683	gosub 6740
2685	print "\Q File: " i$ "\k"
2690	tt$="" : if zd or (peek(pt+14) and 1) then 2740
2700	if sc then 2717
2710	print " Type (prg,seq,usr): \r \R\157"; : gosub 2801 : if tp$=cr$ then 2390
2717	gosub 2805 : if peek(pt+14) and 10 then poke 211,0 : print "\k" : goto 2740
2720	gosub 2805
2730	print "\s\w\4\q File: " i$ "\k" : gosub 2806 : print " Type: " tt$ "\k"
2731	if s$>"" then bl=int((val(s$)-1)/254)+1 : print " Size:\k" bl "blocks (" s$ " bytes)\k"
2732	es=1 : gosub 7260 : tt$=","+tp$
2733	if er and (peek(pt+14) and 8)=0 then gosub 6600 : gosub 7210 : goto 2390
2735	if er and e1=63 then gosub 2851 : oner+1goto 2737,2732,2730
2736	if er then sys pt-3 : goto 2794
2737	ff=ff+1 : a=peek(pt+14) and 11 : if a and a<8 then i$=""
2740	gosub 2184 : print " Bytes recv:\w\11 Retries:";
2750	poke pt+16,tt : if zd then zd=0 : sys pt+25 : goto 2791
2790	sys pt-6
2791	if ff then gosub 7380
2794	if peek(pt+15) then st$="Download aborted!" : goto 2390
2795	if (peek(pt+14) and 11)=0 or i$="" then 2799
2796	tt=peek(pt+16) : if tt then tp$=""
2797	if len(i$)>1 then if mid$(i$,len(i$)-1,1)="," then tp$=right$(i$,1) : i$=left$(i$,len(i$)-2)
2798	i$=left$(i$,16) : on 1-(tp$="") goto 2720,2730
2799	if peek(pt+14) and 8 then st$="Files received:"+str$(ff)
2800	goto 2390
2801	get tp$ : if tp$<>"p" and tp$<>"s" and tp$<>"u" and tp$<>cr$ then 2801
2802	return
2805	tt=-(tp$="p")-2*(tp$="s")-3*(tp$="u") : return
2806	tt$=mid$("prgsequsr",tt*3-2,3) : return
2810	if b1=b2 then 930
2815	print "\S\q" pt$ " block size (" mid$(str$(b1),2) "-" mid$(str$(b2),2) "): ";
2820	p9=4 : gosub 4050 : if i$="" then 920
2830	bs=val(i$) : if bs<b1 then bs=b1
2840	if bs>b2 then bs=b2
2850	goto 920
2851	if zr=1 then gosub 6740 : print "\s\w\4\q\w\31\29Replaced"; : er=1 : return
2852	if zr=0 or (peek(pt+14) and 128)=0 then 2859
2853	if dv=7 and j<peek(bg+1) then 2859
2854	print "\s\w\4\q\w\28\29Resuming..."; : if dv=7 then sys sl+72 : er=0 : goto 2856
2855	gosub 6650 : sys sl+18 : close2 : open 2,dv,2,dv$+i$+","+tp$+",a" : er=0
2856	print "\s\w\4\q\w\28\29    Resumed"; : return
2859	i$=left$(i$,len(i$)-1)+chr$(asc(right$(i$,1))+1) : er=2 : return
2860	pp=1
2870	sys ml+84 : print "\S \rF1\R:Quit  \rF3\R:Insert  \rF5\R:Edit    \rF7\R:Save\m\w\10 \rF4\R:Delete  \rF6\R:Manual  \rF8\R:Load\m \rSpace\R:Tag entry\w\5 \rReturn\R:Dial\s\w\24\q Phone book: " pf$ "\s\q\q\q"
2900	ph=0 : for i=mp to 1 step -1 : if p$(i)>"" then ph=i : i=1
2910	next : if pp>ph and ph then pp=ph
2920	mx=ph+1 : if mx>mp then mx=mp
2921	for i=1 to ph
2930	print mid$(" >",m%(i)+1,1) p$(i) tab(22) left$(ph$(i),16) tab(38) "_"
2940	next : print tab(38) "_" : sys ml+84 : goto 2960
2950	sys ml+18
2960	p=pp : d=3 : tb=1 : tu=96 : gosub 6230 : pp=p : if a$=cr$ then 3090
2970	if a$=" " then 3000
2980	f=peek(da+3) : if f=1 then ct=0 : p$="" : return
2990	on f-1 goto 2950,4390,4660,4400,3020,3050,3050
3000	sys ml+18 : if a$=" " and ph$(pp)>"" then m%(pp)=1-m%(pp) : print mid$(" >",m%(pp)+1,1);
3010	goto 2960
3020	sys ml+18 : print "\s\w\24\q Phone number:\k "; : p9=40 : cr=1 : gosub 4050 : p$=i$ : ct=0 : return
3050	print "\s\w\24\q " mid$("SaveLoad",(f-7)*4+1,4) " phone book: \k" pf$;
3060	poke 211,18 : cr=1 : gosub 4045 : if i$="" and f=7 then i$=pf$
3070	if i$>"" then pf$=i$ : on f-6 gosub 1350,1300
3080	goto 2870
3090	pq=0 : ct=0 : for i=1 to mp : if m%(i) then ct=ct+1
3100	next : if ct=0 then ct=1 : pq=1 : p=pp : if p$(pp)="" or ph$(pp)="" then sys ml+18 : goto 2960
3110	return
3120	gosub 3510
3140	if st$>"" then print "\m*Novaterm: " st$ : st$=""
3150	if peek(6) and 64 then poke 783,1 : sys cl+50
3152	sys ml+21 : sys 65484
3155	bu=0 : sys te : if peek(6) and 64 then poke 783,0 : sys cl+50
3160	sys ml+6 : a=peek(da+2) : a$=chr$(peek(da+1))
3170	on a goto 3270,3180,3610,9150,3200,3220,3150,3260,3175
3175	zd=1 : a$="~D" : goto 3300
3180	s$=fc$(peek(da+3)) : if s$="" then 3150
3185	if peek(sa+2) and 128 then sys ml+3
3190	sys op : if peek(sa+2) and 128 then sys ml+6
3195	goto 3150
3200	gosub 3210 : goto 3150
3210	for i=3 to 0 step -1 : poke 56584+i,0 : next : return
3220	if (peek(m1+1) and 1)=0 then print "\mNo carrier" : sys md
3230	poke 56587,peek(56587) : goto 3150
3251	ti$="000000"
3252	sys ml+81 : if peek(780) and ti$<"000010" then 3252
3253	a=4 : gosub 7950 : if er then 3150
3254	bu=1 : gosub 7380 : i$=bf$ : gosub 6650 : bu=0 : print 
3255	print "Dumping buffer"; : open 2,dv,2,dv$+i$+",s,a" : gosub 6560 : if er=0 then 3257
3256	close 2 : tp$="s" : gosub 7260 : if er then 3150
3257	gosub 2100 : bu=1 : gosub 6740 : tt=2 : gosub 7260 : sys ml+21 : bu=0 : print 
3258	poke 781,0 : sys ml+63 : goto 3150
3260	if peek(6) and 16 then 3251
3261	print "\mCapture buffer is full!" : sys ml+12 : sys sl+39 : goto 3258
3270	if a$="~@" then sc=sc or 2 : print : gosub 800 : sc=sc and 1 : goto 3150
3275	if a$="~A" and (peek(da-1) and 2)=0 then a=4 : goto 3620
3280	if a$="~B" and (peek(6) and 4) then 3615
3290	if a$="~C" and (peek(da-1) and 1)=0 then 3500
3300	if a$="~D" then gosub 3520 : gosub 2535 : goto 3120
3310	if a$="~E" then a=2 : goto 3620
3320	if a$="~F" then 3540
3330	if a$="~G" then gosub 3520 : sc=0 : poke sa+12,peek(sa+12) and 127 : gosub 9000 : goto 3120
3340	if a$="~H" then print "\mHanging up..." : sys md
3350	if a$="~I" then gosub 5750
3360	if a$="~J" then sys md+3
3370	if a$="~K" then a=6 : goto 3620
3372	if a$="~L" then print "\mF-key file: "; : gosub 4045 : if i$>"" then fk$=i$ : gosub 1605 : goto 3150
3375	if a$="~+" then gosub 3520 : p=3 : goto 4970
3380	if a$="~M" then gosub 3520 : p=1 : goto 4970
3390	if a$="~N" then print "\mBuffer: "; : gosub 1785
3400	if a$="~O" then 3481
3410	if a$="~P" then gosub 3520 : gosub 7010 : goto 3120
3430	if a$="~R" then gosub 5210
3440	if a$="~S" then sys sl+15
3445	if a$="~T" then gosub 3520 : gosub 7030 : goto 3120
3450	if a$="~U" then gosub 3520 : gosub 2185 : goto 3120
3460	if a$="~V" then 3590
3461	if a$="~W" then poke cl+35,255-peek(cl+35) : print "\mScroll-ahead "; : a=peek(cl+35) : gosub 3490
3462	if a$="~X" then print "\mSending break..." : sys sl+24
3465	if a$="~Y" then gosub 3483
3467	if a$="~Z" and sc=1 then print "\mScript aborted" : goto 9190
3470	if a$="~Z" then gosub 3520 : goto 200
3471	if a$="~-" then xl=1-xl : print "\mTransfer translation "; : a=xl : gosub 3490
3473	goto 3150
3481	print : bu=1 : on (peek(6) and 4)/4+1 gosub 1790,1830 : bu=0 : goto 3150
3483	poke 650,128 : gosub 7580 : poke dt+19,c3 : if peek(6) and 64 then poke 53280,c9
3484	poke cl+28,0 : poke cl+29,7 : poke cl+33,0 : poke 199,0 : sys cl+44 : return
3490	if a then print "ON" : return
3495	print "OFF" : return
3500	gosub 3520 : a=64 : gosub 8070 : goto 3120
3510	if se=0 then poke da+3,0 : print "\S" : sys ml+48 : sys ml+9 : se=1
3512	if pc=0 then pc=1 : print "Press C= M for terminal commands"
3515	return
3520	if se then sys ml+45 : se=0 : print "\S";
3525	return
3540	gosub 6510 : if er=0 then print "\mDevice"; : gosub 8005 : print ": " z$
3550	goto 3140
3590	gosub 3520 : print "\S"; : gosub 4260 : gosub 7190 : goto 3120
3610	poke sa,62-peek(sa) : poke dt+11,1 : goto 3150
3615	a=10 : print "\mCapture "; : if peek(sa+a)>128 then print "paused" : goto 3620
3616	print "resumed"
3620	if peek(sa+a) and 128 then poke sa+a,peek(sa+a) and 127 : goto 3640
3630	poke sa+a,peek(sa+a) or 128
3640	if a=4 then gosub 3660
3650	poke dt+11,1 : goto 3150
3660	a=12 : b=194 : if peek(sa+4)<128 then a=6 : b=66
3670	poke 53272,(peek(53272) and 240) or a : poke peek(888)+256*peek(895)+3,b : return
4040	print "File name: ";
4045	p9=16
4050	if sc=1 then print i$ : return
4060	poke 780,p9 : poke 781,cr*255 : sys ml+39 : cr=0 : return
4260	i$="$"+dv$+"*" : if dv=7 then a=4 : gosub 7950
4270	open 1,dv,0,i$ : gosub 6560 : if er then 6600
4280	get#1,a$,a$ : e=0 : poke dt+40,255
4300	gosub 6880 : f=st : print z$"" : e=e+1
4310	gosub 4960 : if ts=0 and f=0 then 4300
4330	if ts then print mid$(str$(e-2),2)" files total."
4340	close 1 : poke dt+40,0 : return
4350	p$(i)="" : ph$(i)="" : pw$(i)="" : bd%(i)=0 : at%(i)=0 : sc$(i)="" : m%(i)=0 : return
4390	if ph=mp then 2960
4391	if pp>ph then 4400
4392	for i=ph to pp step -1 : p$(i+1)=p$(i) : ph$(i+1)=ph$(i) : pw$(i+1)=pw$(i)
4393	pt$(i+1)=pt$(i) : bd%(i+1)=bd%(i)
4394	at%(i+1)=at%(i) : sc$(i+1)=sc$(i) : m%(i+1)=m%(i) : next : i=pp : gosub 4350
4400	p5=1 : print "\S" : ch=0 : a2=(at%(pp) and 8)/8
4410	print "\s\q Edit entry: \r "p$(pp)" \R\k" : \
	print "\s\q\q\q Entry name_  : " p$(pp) "\k" : \
	print " Phone number_: " ph$(pp)"\k" : \
	print " Password_    : " pw$(pp)"\k"
4420	print " Term type_   : "pt$(pp) : \
	print " Baud rate_   : " bd$(bd%(pp)) "\k" : \
	print " Word/parity_ : " mid$("8N17E17O1",a2*3+1,3) : \
	print " Login script_: " sc$(pp) "\k" : print " Quit_"
4460	d=2 : mx=8 : tb=1 : tu=32 : p=p5 : gosub 6230 : if p=mx then 4590
4470	p5=p : poke 211,16 : ch=1 : if p<4 then p9=23 : gosub 4050 : if i$="" then 4410
4480	on p goto 4490,4510,4520,4560,4540,4576,4580
4490	p$(pp)=i$ : goto 4410
4510	ph$(pp)=i$ : goto 4410
4520	pw$(pp)=i$ : if i$=" " then pw$(pp)=""
4530	goto 4410
4540	bd%(pp)=bd%(pp)+1 : if bd%(pp)>mb then bd%(pp)=0
4550	goto 4410
4560	gosub 7025 : if p<mx then pt$(pp)=f$(p)
4570	print "\S" : goto 4410
4576	a2=a2+1 : if a2>2 then a2=0
4577	goto 4410
4580	p9=16 : gosub 4050 : sc$(pp)=i$ : goto 4410
4590	at%(pp)=a2*8 : pp=-px*(p$(pp)="")-pp*(p$(pp)>"") : if pp>ph then ph=pp
4595	if pp=0 then pp=1
4600	if ch=0 then 2870
4610	print "\s\w" chr$(d+mx+2) "\q Save changes? \r \R\157"; : gosub 7430 : if y then gosub 1350
4620	goto 2870
4660	print "\s\w\24\q Delete entry: are you sure? \k\r \R\157"; : gosub 7430
4680	if y=0 then 2870
4690	if pp=ph then 4730
4700	for i=pp to ph-1 : p$(i)=p$(i+1) : ph$(i)=ph$(i+1) : pw$(i)=pw$(i+1) : pt$(i)=pt$(i+1) : bd%(i)=bd%(i+1) : at%(i)=at%(i+1) : sc$(i)=sc$(i+1) : m%(i)=m%(i+1) : next
4730	i=ph : gosub 4350 : ph=ph-1 : goto 2870
4740	p=1
4745	print "\S\q Edit function keys:\q" : \
	for i=2 to 16 : print " F" mid$(str$(i),2) "_" tab(5)": " left$(fc$(i),22) : next : \
	print "\q Load function keys_" : print " Save function keys_"
4780	d=2 : tb=1 : mx=18 : tu=64 : gosub 6230 : if a$<>cr$ then 4789
4781	if p<mx then 4786
4782	print "File name: " fk$; : poke 211,11 : gosub 4045 : if i$="" and fk$>"" then gosub 1601
4783	if i$>"" then fk$=i$ : gosub 1601
4786	if p=mx-1 then gosub 4040 : if i$>"" then fk$=i$ : gosub 1605
4787	if p>mx-2 then 4745
4788	f=p+1 : goto 4790
4789	f=peek(da+3) : if f=1 then 920
4790	print "F" mid$(str$(f),2) ": "; : p9=78 : gosub 4050 : fc$(f)=i$ : goto 4745
4960	get a$ : if a$="p" then wait198,1 : geta$
4961	if a$="s" then f=1
4962	return
4970	a=1 : gosub 7950 : if dv=7 then bu=1
4980	le=255 : gosub 8100 : i$="terminal help" : gosub 6650 : if er then 4990
4985	sys pg+(p-1)*3
4990	gosub 8255 : le=0 : if dv=7 then bu=0
4995	goto 3120
5210	bd=bd+1 : if bd>mb then bd=0
5220	gosub 5250 : if se then return
5230	goto 930
5250	if bd>mb then bd=mb
5251	for i=1 to 6 : if i>len(bd$(bd)) then a=32 : goto 5253
5252	a=asc(mid$(bd$(bd),i,1))
5253	poke sa+15+i,a : next : poke dt+11,1 : poke 780,bd : sys ml+33 : return
5255	on1-(dv=7)gosub 6880,6800 : if ts then r1=(p%-1)*21 : return
5256	if dv<>7 then gosub 6920 : if tt=0 or f$="" or f$="," then 5255
5257	return
5270	j$="*" : if dv<>7 then print " Pattern match: *"; : p9=16 : gosub 4050 : if i$>"" then j$=i$
5280	fl=0 : p=1 : p6=0 : p%=1 : r1=0 : r2=0 : mf=0 : ts=0 : gosub 8080 : sys ml+84 : open 3,3
5290	print "\S \rF1\R:Abort\w\5 \rF3\R:Select\w\4 \rF5\R:Next page\m \rF7\R:Start\w\5 \rF4\R:Remove\w\4 \rF6\R:Prev page\m~D\r Directory\w\8 \R~F~D\r Selected\w\9 \R" : poke 65535+usr(209),123 : \
	for i=1 to 21 : print "\r~K\R" tab(18) "_~K\r~K\R" tab(38) "_" : poke 65535+usr(209),97 : next
5330	print "~C\r\w\18~I\R~V~C\r\w\18~I"; : poke sn+999,126 : sys ml+84 : if p%=0 then 5456
5370	mf=0 : bc=0 : if dv=7 then 5405
5380	open 1,dv,0,"$"+dv$+j$ : gosub 6560 : if er then 5467
5400	get#1,a$,a$ : sys ml+54
5405	if p%>1 then for r1=1 to (p%-1)*21 : gosub 5255 : next : if ts then p%=p%-1 : close 1 : goto 5370
5407	print "\s\q\q" : poke dt+34,18
5410	gosub 5255 : if ts then 5450
5440	mf=mf+1 : print "\29 " f$ "\k"
5441	if mf<21 then 5410
5450	if p%=0 then p%=1
5451	if mf=0 and p%<=1 then 5467
5452	if mf=0 then close 1 : p%=p%-1 : goto 5370
5453	if p>mf then p=mf
5454	if p6 then if p>fl then p=fl-1*(fl=0)
5456	if p6 then 5461
5460	d=2 : tb=2 : mx=mf : tu=224 : p3=1 : gosub 6230 : p3=0 : goto 5463
5461	d=2 : tb=22 : mx=fl+1+(fl=21) : tu=224 : p3=1 : gosub 6230 : p3=0
5463	sys ml+18 : if a$="" then p6=1-p6 : goto 5451
5464	if a$=cr$ or a$=" " then f=3 : goto 5466
5465	f=peek(da+3) : if f=1 then fl=0 : goto 5467
5466	on f-2 goto 5470,5469,5610,5630,5467
5467	close 1 : close 3 : poke dt+34,40 : return
5469	j=p : on p6+1 goto 5460,5570
5470	if p6=1 then 5540
5471	if fl=21 then 5456
5472	poke 211,2 : input#3,i$ : i=16
5480	if mid$(i$,i,1)=" " then i=i-1 : goto 5480
5490	fl=fl+1 : f$(fl)=left$(i$,i) : x=fl : goto 5543
5540	poke 211,22 : gosub 4045 : x=p : if i$>"" then f$(p)=i$ : if p>fl then fl=p
5543	goto 5600
5570	if j>fl then sys ml+18 : goto 5456
5580	if j<fl then for i=j+1 to fl : f$(i-1)=f$(i) : next
5590	f$(fl)="" : fl=fl-1
5600	poke dt+34,38 : print "\s\q\q" : for i=1 to 21 : print tab(22) f$(i) "\k" : next : goto 5456
5610	if ts then 5456
5615	p%=p%+1
5620	gosub 5650 : mf=0 : if p%=1 then 5370
5625	goto 5407
5630	if p%=1 then 5456
5640	p%=p%-1 : close 1 : gosub 5650 : goto 5370
5650	print "\s\q\q" : poke dt+34,18 : for i=1 to 21 : print "\29\k" : next : return
5740	gosub 6500 : if ca or (peek(m1+1) and 1)=0 then return
5750	print "\mInitializing modem..." : sys ml+21 : sys ml+3
5760	s$="ATZ\E" : sys op : if mi$>"" then s$="^P^P^PAT"+mi$+"\E^P^P^P" : sys op : sys ml+6
5770	return
6015	if sc then return
6020	gosub 7190 : goto 730
6150	print "\s\w\24\q\k\w\10 Exit: "; : gosub 7420 : if y=0 then 200
6160	sys sl+66 : end
6230	poke 780,p : poke 781,d : poke 782,mx : poke dt+37,tu+tb : sys sl+27
6240	tu=0 : p=peek(780) : a$=chr$(peek(781)) : return
6500	sys sl+6 : ca=0 : if peek(780) then ca=1
6501	return
6510	if bu=0 and dv<>7 then 6520
6512	b=bg+5 : gosub 6810 : bb=a : if peek(6) and 4 then b=252 : goto 6516
6513	if peek(bg+1)=0 then b=bg+2 : goto 6516
6515	poke 780,peek(bg+1)-1 : sys bf+12 : b=bg+18
6516	gosub 6810 : bb=bb-a : by=int((bb-1)/254)+1 : return
6520	open 1,dv,0,"$"+dv$+chr$(34) : gosub 6560 : if er then 6600
6530	get#1,a$,a$ : gosub 6880 : gosub 6880 : by=val(z$) : close 1 : return
6560	er=0 : sys ml+24 : input#15,e1,e2$,e3,e4 : if e1>19 then er=1 : close 1 : close 2 : close 3
6570	return
6600	if e1=1 then print "\mFiles scratched:"e3 : return
6610	e2$=chr$(asc(left$(e2$,1))+32)+mid$(e2$,2)
6630	if e3 then e2$=e2$+" in track"+str$(e3)+", sector"+str$(e4)
6640	print : print e2$ : return
6645	tt=0 : er=0 : if bu or dv=7 then 6700
6646	goto 6690
6650	tt=0 : er=0 : if bu or dv=7 then 6700
6660	open 1,dv,0,"$"+dv$+i$ : gosub 6560 : if er then return
6670	get#1,a$,a$ : gosub 6880 : gosub 6880 : close 1
6680	if ts then e1=0 : e2$="file not found" : er=1 : return
6690	gosub 6920 : open 2,dv,2,dv$+i$ : goto 6560
6700	gosub 6850 : if j=0 then e1=0 : e2$="file not found" : er=1 : return
6710	i=j : poke 780,j-1 : sys sl+33 : gosub 6805
6720	gosub 2806 : tp$=left$(tt$,1) : return
6740	if bu=0 and dv<>7 then print# 15,"s"dv$i$ : return
6750	if peek(6) and 4 then print "\mCapture file still open" : return
6760	gosub 6850 : if j=0 then return
6765	if peek(bg+21) and 128 then print "\mFile locked" : return
6770	poke 780,j-1 : sys ml+78 : return
6800	ts=0 : if bc=peek(bg+1) then ts=1 : return
6802	poke 780,bc : sys bf+12 : f$=bf$
6805	b=bg+12 : gosub 6810 : bb=a : bl=int((a-1)/254)+1 : tt=peek(bg+21) and 3 : if tt=0 then tt=1
6806	tp=(peek(bg+21) and 124)/4 : bc=bc+1 : if bp<>255 then if bp<>tp then 6800
6807	return
6810	a=peek(b)+256*peek(b+1)+65536*peek(b+2) : return
6830	a=pn : gosub 6950 : if er=0 then open 4,pn,ps : return
6835	print "\mPrinter not present" : if sc=0 then 7190
6840	return
6850	poke 780,0 : sys sl+63 : if peek(781)=peek(bg+1) then j=0 : return
6860	j=peek(781)+1 : return
6880	ts=0 : sys ml+54 : if right$(z$,1)="." or right$(z$,4)="free" then ts=1
6890	return
6900	k=7 : for t=1 to len(z$) : if mid$(z$,t,1)=chr$(34) then k=t+1 : t=len(z$)
6905	next : for t=0 to 16 : if mid$(z$,t+k,1)=chr$(34) then z=t : t=16
6910	next : f$=mid$(z$,k,z) : return
6920	gosub 6900 : bl=val(left$(z$,5)) : bb=bl*254
6930	tt$=right$(z$,3) : tp$=left$(tt$,1) : tt=-(tp$="p")-2*(tp$="s")-3*(tp$="u") : return
6950	er=0 : open 16,a,15 : close 16 : if 128 and st then er=1
6960	return
6970	sl$="font" : ex$="font." : gosub 7100 : if p=mx or mx=0 then 920
6980	fo$=f$(p) : goto 920
6990	sl$="80 column driver" : ex$="80col." : gosub 7100 : if p=mx or mx=0 then 920
7000	s8$=f$(p) : i$=f8$ : f8$="" : gosub 9780 : goto 920
7005	gosub 7010 : goto 920
7010	sl$="protocol" : ex$="prt." : gosub 7100 : if p=mx or mx=0 then return
7020	pt$=f$(p) : poke dt+11,1 : goto 7070
7025	sl$="terminal emulation" : ex$="tmod." : nl=1 : r1=dv : r2=bp : dv=7 : bp=1 : gosub 7102
7026	nl=0 : dv=r1 : bp=r2 : return
7030	gosub 7025 : if p=mx or mx=0 then return
7040	tm$=f$(p) : poke dt+11,1 : i$=f$ : goto 9010
7045	gosub 7030 : goto 920
7050	sl$="program" : ex$="nova." : nl=3 : gosub 7100 : nl=0 : goto 200
7070	poke pt,0 : b1=usr(pt+3) : b2=usr(pt+5) : bs=usr(pt+1) : bw=usr(pt+19) : return
7080	if dv<>7 then gosub 6880 : if ts=0 then gosub 6900
7081	if dv<>7 then return
7090	gosub 6800 : if ts then return
7091	if left$(f$,len(ex$))=ex$ then return
7092	if dv=7 then ts=1 : return
7093	goto 7090
7100	a=1 : gosub 7950 : if er then return
7102	print "\S\q Select " sl$ ":\q" : mx=0
7103	if dv=7 then i$=ex$ : poke 780,255 : sys sl+63 : bc=peek(781) : goto 7120
7105	open 1,dv,0,"$"+dv$+ex$+"*" : gosub 6560 : if er then return
7110	get#1,a$,a$ : sys ml+54
7120	gosub 7080 : if ts then 7150
7130	mx=mx+1 : f$(mx)=mid$(f$,len(ex$)+1) : print " " f$(mx) "_" : if mx<21 then 7120
7150	close 1
7155	if mx=0 then print " No "sl$" files" : goto 7190
7160	mx=mx+1 : print " Quit_" : d=2 : tb=1 : p=1 : gosub 6230 : if p=mx then return
7170	f$=ex$+f$(p) : if nl=1 then nl=0 : return
7175	if nl=2 then nl=0 : sys sl+30
7180	print "\s\w\24\q Loading " f$ "\k\s";
7181	if dv<>7 then 7185
7182	sys ml+42 : a$=i$ : i$=f$ : gosub 6850 : i$=a$
7183	if j=0 then poke 780,d3 : poke 782,0 : f$=d3$+f$ : sys sl+21 : input#15,e : er=-(er>19) : return
7184	poke 781,j-1
7185	f$=dv$+f$ : poke 780,dv : poke 782,nl : sys sl+21 : e=0 : if dv<>7 then input#15,e : er=-(e>19)
7187	return
7190	if peek(211) then print 
7200	print "\m\r Press RETURN \R";
7210	get a$ : if a$<>cr$ then 7210
7211	return
7220	gosub 5270 : if fl=0 then 730
7230	print "\S" : for i=1 to fl : i$=f$(i) : print "Deleting " i$ : gosub 6740 : next : gosub 8080 : goto 730
7260	if tp$="" then tp$=mid$("psu",tt,1)
7270	if tt=0 then tt=-(tp$="p")-2*(tp$="s")-3*(tp$="u")
7280	er=0 : if bu or dv=7 then 7310
7290	open 2,dv,2,dv$+i$+","+tp$+",w" : gosub 6560 : if er>0 and es=0 then 6600
7300	return
7310	gosub 6850 : if j then er=1 : e1=63 : e2$="file exists"
7320	if peek(bg+1)=peek(bg) then er=1 : e1=72 : e2$="buffer directory full"
7325	if er then on es+1 goto 6600,7300
7330	poke 781,tt+bp*4 : sys sl+36 : j=0 : return
7380	if bu or dv=7 then sys sl+39 : return
7390	close 2 : return
7420	print "Are you sure? \r \R\157";
7430	get a$ : if a$<>"y" and a$<>"n" then 7430
7440	if a$="n" then print "no"; : y=0 : return
7450	print "yes"; : y=1 : return
7520	if a<0 then a=a+65536
7530	r2=int(a/256) : r1=a-r2*256 : poke b,r1 : poke b+1,r2 : return
7550	gosub 8100 : sys pg+30 : gosub 8255 : c1=peek(53280) : c2=peek(53281) : c3=peek(646) : goto 920
7560	gosub 8100 : sys pg+33 : gosub 8255 : goto 920
7580	poke 53280,c1 : poke 53281,c2 : poke 646,c3 : poke cl+29,7 : sys ml+57 : return
7715	gosub 7720 : goto 920
7720	print "\S\q\q Device settings:" tab(21) "Disk commands:\q" : p=1
7725	print "\s\w\4\q Program drv_ :"; : a=dp : a$=dp$ : gosub 8010 : print "\k"tab(21) ">" cp$ : \
	print " Upload drv_  :"; : a=d1 : a$=d1$ : gosub 8010 : print "\k" tab(21) ">" c1$
7730	print " Download drv_:"; : a=d2 : a$=d2$ : gosub 8010 : print "\k" tab(21) ">" c2$ : \
	print " Buffer drv_  :" str$(d3) "," d3$ dl$ "\k" tab(21) ">" c3$ : \
	print " Printer dev_ :" str$(pn) "," mid$(str$(ps),2) : print " Quit_"
7770	d=3 : tb=1 : mx=6 : tu=32 : gosub 6230 : pd=(p=5) : if p=mx then return
7780	poke 211,16 : poke dt+34,21 : p9=5 : cr=1 : gosub 4050 : poke dt+34,40 : if i$="" then 7725
7790	gosub 7870 : if er then 7725
7800	c$="" : if a<>7 then poke 211,21 : print ">"; : p9=17 : gosub 4050 : c$=i$
7820	on p goto 7830,7840,7850,7855,7860
7830	if a=7 then 7725
7835	dp=a : dp$=j$ : cp$=c$ : goto 7725
7840	d1=a : d1$=j$ : c1$=c$ : goto 7725
7850	d2=a : d2$=j$ : c2$=c$ : goto 7725
7855	d3=a : d3$=j$ : c3$=c$ : goto 7725
7860	ps=j : if a<4 or a>127 then 7725
7865	pn=a : goto 7725
7870	j=0 : for i=1 to len(i$) : if mid$(i$,i,1)="," then j=i : i=len(i$)
7880	next : if j then j=val(mid$(i$,j+1))
7885	a=val(i$) : if left$(i$,1)="b" or left$(i$,1)="B" or a=0 then a=7
7890	j$=mid$(str$(j),2)+":" : er=1 : if a>=4 and a<>7 and a<31 then 6950
7892	if p<=3 and a<8 then er=1
7895	if p<=3 and a=7 then er=0
7900	return
7950	er=0 : b=dv : b$=dv$ : on a goto 7960,7970,7980,7985
7960	dv=dp : dv$=dp$ : c$=cp$ : goto 7990
7970	dv=d1 : dv$=d1$ : c$=c1$ : goto 7990
7980	dv=d2 : dv$=d2$ : c$=c2$ : goto 7990
7985	dv=d3 : dv$=d3$ : c$=c3$
7990	er=0 : if dv=7 then close 15 : bp=val(dv$) : open 15,d3,15 : return
7993	close 15 : open 15,dv,15 : close 15 : if 128 and st then dv=b : dv$=b$ : er=1
7995	open 15,dv,15,c$ : return
8000	print " Device:";
8005	a=dv : a$=dv$
8010	if a=7 then print " B"; : goto 8020
8015	print str$(a);
8020	print "," a$ dl$; : return
8070	poke 6,(peek(6) and 255-a) + a - (peek(6) and a) : a=0 : return
8080	for i=1 to 21 : f$(i)="" : next : return
8100	gosub 8280 : pr=pg+peek(pg-1)
8105	poke pr,-255*(bu>0) : poke pr+1,dv : poke pr+2,bp : poke pr+3,pn : poke pr+4,ps
8106	poke pr+5,ld : poke pr+6,sc : poke pr+7,le : return
8120	gosub 8100 : open 2,dv,2,dv$+i$ : gosub 6560 : if er then gosub 6600 : gosub 8255 : er=1 : return
8130	return
8200	gosub 4040 : if i$="" then 1620
8205	gosub 8100 : gosub 6650 : if er then gosub 6600 : gosub 8255 : er=1 : goto 1950
8210	gosub 8250 : if sc then return
8215	goto 1620
8220	gosub 4040 : if i$="" then 730
8230	gosub 8120 : if er then 6015
8240	gosub 8250 : goto 860
8250	sys pg+(p-1)*3
8255	if dp<>7 then sys sl+75 : er=0 : return
8260	f$="prt."+pt$
8270	r1=bp : a=1 : gosub 7950 : gosub 7181 : dv=b : dv$=b$ : bp=r1 : goto 7990
8280	f$="nova9.6-rtl.ml" : on 1-(dp=7) goto 8255,8270
8300	sl$="clock device" : ex$="time." : gosub 7100 : if p=mx or mx=0 then 920
8310	ts$=f$(p) : print "\s\w\24\q "; : gosub 8320 : goto 920
8320	f$="time."+ts$ : gosub 8270 : poke 780,0 : sys 49152 : goto 8260
9000	rt=0 : print "\S\qExecute script file\q" : gosub 4040 : if i$="" then 9190
9010	r1=bp : bp=255 : bu=1 : gosub 6650 : sc=1 : bp=r1 : if er=0 then 9031
9020	gosub 1295 : if er then 9190
9030	gosub 2120 : oner+1goto 9010,9190
9031	if tt<>3 then print "\qBad file type\q" : er=1 : goto 9180
9032	sc$=i$ : bu=0 : li=0 : poke sa+12,peek(sa+12) or 128 : poke dt+11,1
9033	for i=0 to 2 : w%(i)=peek(249+i) : next : for i=0 to 5 : lk$(i)="" : next : sys ml+66
9035	poke 144,0
9040	li=li+1
9050	if (64 and st) or peek(653)=2 then er=0 : goto 9190
9060	sys ml+72 : lc=c : c=peek(780) : if c=0 then 9040
9070	for i=0 to 2 : x%(i)=peek(249+i) : y%(i)=peek(bg+8+i) : next
9075	if (c=64 or c=128 or c=129 or c=134 or c=135 or c=138 or c=143) then gosub 3520
9080	if c=32 then 9150
9090	if c<64 then 9170
9095	if c<96 then gosub 9240
9100	on c-63 goto 9290,9310,9340,9370,9380,9400,9420,9331,9333
9105	if c<96 then 9170
9110	on c-95 goto 9450,9580,9590,9610,9190,9630,9640,9660,9820,9830,9850,9645,9960
9111	on c-110 goto 9980
9112	if c<127 then 9170
9115	gosub 9210 : es=0 : if c<140 and c<>133 then print 
9120	on c-127 gosub 9650,9250,9997,9997,9710,9730,2535,2185,9860,800,9740,9750,9760,9770,9790,9998,9810,9800,9780,9900
9140	if es then on es goto 9170,9190,9000
9145	for i=0 to 2 : poke 249+i,x%(i) : poke bg+8+i,y%(i) : next : bu=0
9150	sys ml+72 : if peek(780)<255 then 9150
9160	goto 9040
9170	print "\mScript run-time error, line" li
9180	gosub 7200
9190	sc=0 : rt=0 : bu=0 : poke sa+12,peek(sa+12) and 127 : poke dt+11,1 : return
9210	i$="" : sys ml+72 : if peek(780)<>34 then return
9220	sys ml+72 : if peek(780)<>34 then i$=i$+chr$(peek(780)) : goto 9220
9230	return
9240	sys ml+72 : a=peek(780) : sys ml+72 : a=a+256*peek(780) : return
9250	if i$="" then es=1 : return
9260	p=0 : for i=1 to ph : if i$=p$(i) then p=i : i=ph
9270	next : if p=0 then es=1 : return
9280	gosub 9940 : ct=1 : pq=1 : p$=" " : goto 330
9290	if a>ph then 9170
9300	gosub 9940 : ct=1 : pq=1 : p=a : gosub 330 : goto 9150
9310	if (a<8 or a>127) and a<>1 then 9170
9320	close 15 : open 15,a,15 : close 15 : if 128 and st then open 15,dv,15 : goto 9170
9330	dv=a : open 15,dv,15 : goto 9150
9331	if a<0 or a>19 then 9170
9332	dv$=mid$(str$(a),2)+":" : goto 9150
9333	if a<0 or a>255 then 9170
9334	ps=a : goto 9150
9340	if a<4 or a>255 then 9170
9350	open 4,a,ps : close 4 : if (128 and st)=0 then pn=a
9360	goto 9150
9370	rt=a : goto 9150
9380	if a<0 or a>mb then 9170
9390	bd=a : gosub 5250 : goto 9150
9400	if a<1 or a>16 then 9170
9410	s$=fc$(a) : sys op : goto 9150
9420	ti$="000000" : if a<1 then 9170
9430	if a-val(ti$)>0 then 9430
9440	goto 9150
9450	n=0
9460	sys ml+72 : if peek(780)=3 then n=1-n : goto 9460
9470	c=peek(780) : if c=98 then 9550
9480	on c-3 goto 9490,9510,9530
9490	gosub 6500 : if ca-n then 9560
9500	goto 9150
9510	if ((peek(56577) and 8)/8)-n then 9560
9520	goto 9150
9530	sys ml+81 : onn-peek(780)/2+1goto 9150,9560
9550	gosub 9240 : if (a=peek(dt+29))+n=0 then 9150
9560	sys ml+72 : if peek(780)<>7 then 9150
9570	goto 9050
9580	i$="" : goto 3120
9590	gosub 9240 : if a<1 or a>6 then 9170
9600	gosub 9210 : lk$(a-1)=i$ : sys ml+66 : goto 9150
9610	gosub 9240 : if a<1 or a>6 then 9170
9620	lk$(a-1)="" : sys ml+66 : goto 9150
9630	gosub 9240 : x=a : poke 782,li
9631	if li>=a then for i=0 to 2 : poke 249+i,w%(i) : next : poke 782,1
9635	poke 781,x : sys ml+69 : li=x : goto 9050
9640	sys md : goto 9150
9645	sys md+3 : goto 9150
9650	gosub 9940 : p$=i$ : ct=0 : goto 330
9660	sys ml+72 : c=peek(780) : bu=1 : print : a=4 : gosub 7950 : if er then 9170
9664	if c<>9 and c<>11 then gosub 9210
9665	if c=138 then gosub 3520
9670	if c>137 then p=c-138+3 : gosub 8205 : goto 9140
9680	if c>129 then on c-129 gosub 2090,2120 : goto 9140
9690	if c>7 then on c-7 gosub 6740,9700,1790,1830
9695	goto 9140
9700	poke bg+1,0 : return
9710	if peek(211) then print 
9720	print i$ : return
9730	if pt$<>i$ then f$="prt."+i$ : gosub 9806 : if er=0 and e<20 then pt$=i$ : poke dt+11,1 : goto 7070
9735	return
9740	p=3 : goto 8230
9750	p=4 : goto 8230
9760	if as$<>i$ then f$="asc."+i$ : gosub 9806 : if er=0 and e<20 then as$=i$
9765	goto 3660
9770	if fo$<>i$ then f$="font."+i$ : gosub 9806 : if er=0 and e<20 then fo$=i$
9775	return
9780	ex$="font8"+chr$(peek(cl+36)+48)+"."
9782	if f8$<>i$ then f$=ex$+i$ : gosub 9806 : if er=0 and e<20 then f8$=i$
9785	return
9790	if te$<>i$ then f$="term."+i$ : gosub 9806 : if er=0 and e<20 then te$=i$ : poke dt+11,1
9792	if peek(da-1) and 1 then poke 6,peek(6) or 64
9793	if peek(da-1) and 2 then poke sa+4,peek(sa+4) or 128
9795	return
9800	if mo$<>i$ then f$="modem."+i$ : gosub 9806 : if er=0 and e<20 then mo$=i$ : goto 1150
9805	return
9806	a=1 : gosub 7950 : if er then return
9807	goto 7180
9810	gosub 3510 : s$=i$ : sys op : return
9820	gosub 5740 : goto 9150
9830	if peek(da-1) and 1 then 9150
9832	r1=0 : if se then gosub 3520 : r1=1
9835	poke 6,peek(6) and 191 : if r1 then gosub 3510
9840	goto 9150
9850	r1=0 : if se then gosub 3520 : r1=1
9855	poke 6,peek(6) or 64 : if r1 then gosub 3510
9856	goto 9150
9860	gosub 8100 : sys pg+36 : x=peek(780) : gosub 8255 : print : if x then es=2
9870	return
9900	a$=left$(i$,2) : if a$="8n" then poke dt+32,0
9910	if a$="7e" then poke dt+32,1
9920	if a$="7o" then poke dt+32,2
9930	return
9940	goto 3520
9960	gosub 8320 : goto 9150
9980	sys ml+72 : if peek(780)=1 then poke sa+4,peek(sa+4) or 128 : goto 9995
9990	poke sa+4,peek(sa+4) and 127
9995	gosub 3660 : goto 9150
9997	es=1 : return
9998	es=3 : return
