8-Bit Software Online Conversion

:2.$.VIEWDAT - Listing

10REM >ViewData 20MODE7:WIDTH0:IFNOTFNarc A%=114:X%=0 :CALL&FFF4:MODE7:A%=132:HIMEM=((USR&FFF4 )AND&FFFF00)DIV256 30pagemax%=(((HIMEM-TOP-600)/1024)):p agemax%=(pagemax%AND(pagemax%<128))+(127 AND(pagemax%>127))-2:ST=HIMEM-(pagemax% +1)*1024:P=0:LINK=0:TP=0:LLP=0:IFpagemax %<5 PRINT" Not enough memory":Z=GET:CHAI N"Hello" 40*KEY10O.|MRUN|M 50Flg2%=0:VDAT=0:CLOCK=0:VER$="Viewda ta Program Version 4.09 (C)1989":CHR=97: P=0:P1=0:P2=0:lp%=0:Z$="":D%=0:DIM bu%(1 5),L%(pagemax%),L2%(pagemax%),buffer% 10 0:FOR LOOP=0 TO pagemax%:L%(LOOP)=-1:L2% (LOOP)=-1:NEXT 60IFNOTFNarc THEN HIMEM=ST 70time%=-1:fnd=1:oscflg=0:IFV%<>101AN D V%<>103PRINTTAB(0,0);VER$;TAB(7,12);" Buffer size: ";pagemax%+1 80IFFNarc B%=&8610 ELSE IF PAGE>&3000 B%=&3A10 ELSE B%=&410 90KST=0:DIR$="":D%=&1200:ON ERROR IF flg GOTO120 ELSEGOTO140 100flg=1:IFV%<>102AND V%<>103THENOSCLI "*LOAD !ComDat "+STR$÷(B%):D%=!B% 110IF$(B%+4)<>""DIR$=$(B%+4)+"." 120flg=0:PROC`GETPAGE("KEYS"):KST=ST:S T=ST+1024*LE:KLE=LE 130pagemax%=pagemax%-LE 140ON ERROR RUN 150PROCdate:ONERROR IFF$="0"THEN$ST=ST RING$(230," "):$(ST+230)=STRING$(179," " )+" No start page.":$(ST+460)=STRING$(2 30," "):$(ST+690)=STRING$(232," "):GOTO1 80 ELSE F$="0":GOTO170 160IF(V%>99AND V%<104)AND W%>-1 F$=STR $W% ELSE F$="0" 170PROC`GETPAGE(F$):IF(?(ST+1024*P+935 )AND 31)=0 PRINTTAB(0,24);SPC(38);:ERROR 180IF(V%<100OR V%>103) V%=100 190ON ERROR GOTO1340 200del%=3000:*FX4,1 210*FX11 220*FX225,128 230*FX226,1 240IF fnd PROC`MEMtoP ELSE fnd=1 250tim%=TIME+del%:IF(Flg2%AND32)=0 PRI NTTAB(0,24);SPC(35); 260Z$=INKEY$(20):IF CLOCK PROC`CLOCK 270IF TIME>tim% AND VDAT=0 GOTO510 280IFZ$=""GOTO260 290IFZ$="?"PROC`OSC:GOTO240 300IFZ$=CHR$26 PROCstats:GOTO240 310IFZ$=" "OR Z$="#"OR Z$=CHR$13GOTO51 0 320IFZ$>"/"AND Z$<":"GOTO400 330IFZ$=" " OR Z$=CHR$135 PROC`REVEAL: GOTO250 340IFZ$=" " LINK=0:GOTO440 350IFZ$=" "OR Z$="*"GOTO470 360IFZ$=" "OR Z$="^"OR Z$=CHR$139 L=10 :GOTO410 370IFZ$=CHR$127OR Z$=CHR$136THENlp%=(l p%-2)AND 15:LINK=bu%(lp%):GOTO440 380IF Z$<"A" GOTO260 390IFZ$>"@"AND Z$<"÷"PROC`KEYWORD:GOTO 240 ELSE GOTO260 400L=ASC Z$-48 410LINK=!(ST+1024*P2+936+L*4) 420IF LINK=0 PRINTTAB(0,24);" No link" ;:Z$=INKEY$(200):GOTO250 430IFLINK=-1THENLINK=0 440F$=STR$ LINK:IF LINK<0 GOTO250 450IFF$="" GOTO260 460PROC`GETPAGE(F$):GOTO240 470F$=FN`EDIT:IFF$=""Z$=CHR$127:GOTO37 0 480LINK=VAL F$ 490IF LINK<0OR LINK>999999999 PRINTTAB (0,24);" Out of range!!!";:Z$=INKEY$(200 ):GOTO250 500GOTO450 510REM IF P1=pagemax% GOTO240 520IF L%(P1+1)<>TP AND !(ST+1024*P2+98 0)=0 P1=P2:CHR=97:GOTO240 530IF L%(P1+1)<>TP L=11:GOTO410 540P1=P1+1:CHR=CHR+1:GOTO240 550DEFFN`EDIT:VDU 28,0,24,39,24:INPUT '" What page number? "P3$ 560PRINTTAB(0,24);SPC(39);:VDU 28,0,24 ,39,0:=P3$ 570DEFPROC`GETPAGE(P$) 580LOCAL LINK,LOOP 590LINK=VAL P$:IF LINK=0 AND P$<>"0" G OTO630 600FOR LOOP=0 TO pagemax% 610IF L2%(LOOP)=LINK P1=LOOP:P2=P1:LOO P=999:NEXTLOOP:GOTO700 620NEXT 630F$=P$:?(ST+1024*P+935)=1 640PROC`LOAD(F$):LE=?(ST+1024*P+935)AN D 31:IF LE=0 fnd=0:PRINTTAB(0,24);" Page ";F$;" does not exist.";:Z=INKEY(200):E NDPROC 650IF LE>pagemax% fnd=0:PRINTTAB(0,24) ;" Buffer full";SPC(20);:Z$=INKEY$(200): ENDPROC 660IF P+LE>pagemax%+1 FOR LOOP=P TO pa gemax%:L2%(LOOP)=-1:NEXTLOOP:P=0:GOTO640 670fnd=1:IF LINK=0 AND P$<>"0" LINK=-2 680P1=P:P2=P:FOR LOOP=0 TO LE-1 690L%(LOOP+P)=LINK:L2%(LOOP+P)=-1:NEXT LOOP:L2%(P)=LINK:P=P+LE:IFP>pagemax% P= 0 700CHR=97:IF LINK>-1 LLP=LINK 710TP=LINK:bu%(lp%)=TP:lp%=(lp%+1)AND 15:ENDPROC 720ENDPROC 730DEFPROC`LOAD(F$):LOCAL X%,Y% 740PRINTTAB(0,24);" Loading page ";F$; " ";STRING$(3,CHR$8); 750PAG=ST+1024*P:B$=STR$÷PAG 760IF (D% AND 3072)<>0 F$=FN`Q(F$) 770!buffer%=buffer%+&20:$(buffer%+&20) =DIR$+F$:A%=5:X%=buffer%:Y%=X%DIV256:IF( (USR&FFDD)AND255)=0 ?(ST+1024*P+935)=0:L 2%(P)=-1:ENDPROC ELSE LE=(buffer%!&A)DIV 1024 780IF P+LE>pagemax%+1 THEN ?(ST+1024*P +935)=LE:ENDPROC 790OSCLI"*LOAD "+DIR$+F$+" "+B$ 800ENDPROC 810DEFFN`Q(F$) 820IF STR$(VAL F$)<>F$ THEN =F$ 830LOCAL A,Q$ 840Z%=(D%AND&C00)/1024:FOR A=1 TO LEN F$ STEP Z% 850Q$=Q$+MID$(F$,A,Z%)+"D.":NEXT:=LEFT $(Q$,LEN Q$-2) 860DEFPROC`MEMtoP:time%=-1 870VDU26,15:IF (?(ST+P2*1024+935)AND32 )=0 CLS 880VDU 23;8202;0;0;0;:IF ?(ST+P1*1024) =128 OR ?(ST+P1*1024)=13 GOTO980 890IF ?(ST+P1*1024)=0 CLS:PROC`TITLE:E NDPROC 900del%=!(ST+P2*1024+1000)AND&FFFF:IF del%=0 del%=3000 910VDAT=SGN(?(ST+P2*1024+935)AND128):C LOCK=SGN((?(ST+P2*1024+935)AND64)OR(VDAT =0)) 920PROC`TITLE:IF(Flg2%AND&C0)=&40 M=?( ST+P1*1024+40):?(ST+P1*1024+40)=13:PRINT $(ST+P1*1024);:?(ST+P1*1024+40)=M 930FORL=0TO3:M=?(ST+P1*1024+230*(L+1)) :?(ST+P1*1024+230*(L+1))=13 940PRINT$(ST+P1*1024+230*L);:?(ST+P1*1 024+230*(L+1))=M 950NEXTL:IF(Flg2%AND128) M=?(ST+P1*102 4+40+13.75*(Flg2%AND64)):?(ST+P1*1024+40 +13.75*(Flg2%AND64))=13:PRINT$(ST+P1*102 4+13.75*(Flg2%AND64));:?(ST+P1*1024+40+1 3.75*(Flg2%AND64))=M 960IF(Flg2%AND32) PRINTTIT$;SPC(38-POS ); 970ENDPROC 980L=ST+P1*1024+1:?(L-1)=0:REPEAT:Z$=" ":REPEAT:Z$=Z$+CHR$(?L):L=L+1:UNTIL ?L=1 28 OR LEN Z$>37 OR ?L=13:IFLEFT$(Z$,1)=" " REPEATZ$=MID$(Z$,2):UNTILLEFT$(Z$,1)< >" " 990IFLENZ$>37 L=ST+P1*1024+((L-40-(ST+ P1*1024))MOD40)+40 1000IFRIGHT$(Z$,1)=" " REPEATZ$=LEFT$(Z $,LENZ$-1):UNTILRIGHT$(Z$,1)<>" " 1010PROC`OSCLI(Z$):L=L+1:UNTIL?L=128 OR ?L=13 OR L>ST+1024*P1+910 OR Z$="":ENDP ROC 1020DEFPROC`TITLE:VDU30:Flg2%=?(ST+1024 *P2+934):?(ST+1024*P2+934)=13:TIT$=$(ST+ 1024*P2+921):?(ST+1024*P2+934)=Flg2%:IFL ENTIT$=13THENIFRIGHT$(TIT$,1)=CHR$141THE N TIT$=LEFT$(TIT$,12) 1030IF(Flg2%AND&C0)ENDPROC 1040W%=TP:PRINTTIT$;SPC(13-LENTIT$);" " ;TP;CHR$(CHR);SPC((21-POS)AND POS<21);SP C(3 AND(TP>99999));:IF CLOCK=0 PRINTTAB( 25,0)" Set - ";P1;" " ELSE PROC`CLOCK:P RINTTAB(25,0);d;" "mn$;SPC((d<10)AND1);: IFTP<100000 PRINTTAB(21,0);Day$;" "; 1050PRINTTAB(0,1);:ENDPROC 1060DEFPROC`CLOCK:IF time%=TIME DIV100 ENDPROC 1070IF(Flg2%AND 128)ENDPROC 1080time%=TIME DIV100:h=TIME DIV360000: m=TIME DIV6000 MOD60:s=TIME DIV100 MOD60 :IF h<10h$=" "ELSEh$=" " 1090IFm<10m$=":0"ELSEm$=":" 1100IFs<10s$="/0"ELSEs$="/" 1110PRINTTAB(31,0)h$;h;m$;m;s$;s;:IF TI ME DIV256=&8400 IFFNdate ENDPROC 1120ENDPROC 1130DEFFN`DATE1:IF(D%AND&1000) THEN =0 1140LOCAL X%,Y%:!buffer%=&10000900:A%=& 14:X%=buffer%:Y%=X%DIV256:CALL&FFF1:IFbu ffer%?3<>0 :=0 1150s=buffer%?8:m=buffer%?7:h=buffer%?6 :yr=81+buffer%?5 DIV16:mn=buffer%?5 AND& F:d=buffer%?4 AND31:mn$=MID$("JanFebMarA prMayJunJulAugSepOctNovDec",mn*3-2,3):Da y$=FN`DAY(d,mn,yr) 1160TIME=h*360000+m*6000+s*100:=TRUE 1170DEFFN`DAY(D,MN,Y):LOCAL F,Q,D$:D=D+ 1:IF(Y/4)-INT(Y/4)=0 F=1 1180FORQ=80TOY-1:IF(Q/4)-INT(Q/4)=0 D=D +1 1190NEXT:D=D+(Y-80)*365:IFF=1ANDMN>2 D= D+1 1200FORQ=1TOMN:D=D+VALMID$("00312831303 130313130313031",2*Q-1,2):NEXT 1210D=D MOD7:D$=MID$("SunMonTueWedThuFr iSat",D*3+1,3):=D$ 1220DEFFN`DATE2:A%=14:X%=buffer%:Y%=X%D IV256:!buffer%=&D00:CALL&FFF1:IF ?buffer %=0 :=0 1230buffer%?24=13:D$=$buffer%:d=VALMID$ (D$,5,2):h=VALMID$(D$,17,2):m=VALMID$(D$ ,20,2):s=VALRIGHT$(D$,2):mn$=MID$(D$,8,3 ):Day$=LEFT$(D$,3):GOTO1160 1240DEFFN`DATE3:IFFNfs=5AND FN`DATE1:=T RUE 1250IF(D%AND 512)=512 Day$="***":mn$="* **":d=0:TIME=0:=TRUE 1260VDU31,0,2:INPUT"Day: "Day$ 1270REPEAT:INPUT"Date: "d:UNTILd>0ANDd< 32 1280s=0:INPUT"Month: "mn$:mn$=LEFT$(mn$ ,3):INPUT"Hours: "h:INPUT"Minutes: "m:GO TO1160 1290DEFFNdate:IF(D%AND 256)=256 AND FN` DATE2 :=TRUE 1300IF FN`DATE1 :=TRUE 1310=FN`DATE2 1320DEFPROCdate:IF FNdate ENDPROC 1330IFFN`DATE3 OR1 ENDPROC 1340fnd=0:VDU26:PRINTTAB(0,23);:OSCLI"F X12":OSCLI"FX4":IF ERR<>214 OR oscflg<>0 REPORT:IF ERR=17 GOTO1380 1350IF ERR<100 GOTO1390 1360IFERR=214 AND oscflg=0 PRINTTAB(0,2 4);" ::Page ";P$;" does not exist::"; 1370PRINTSPC(38-POS);:Z$=INKEY$(200):GO TO200 1380IFNOTINKEY(-1)GOTO1440 1390PRINT" at line ";ERL:VDU7:IFINKEY(- 1)OSCLI"FX225,1":OSCLI"FX226,128":END EL SEGOTO1370 1400DEFPROC`REVEAL 1410LOCAL A:PRINTTAB(0,24);"Revealing.. ."; 1420FOR A=0 TO 919:IF ?(ST+1024*P1+A)=1 52 VDU31,A MOD 40,1+(A DIV 40),32 1430NEXT A:PRINTTAB(0,24);SPC(20);:ENDP ROC 1440PRINTTAB(0,24);" Do you want to fin ish? (Y/N)";:Z$=GET$ 1450IFZ$="Y"ORZ$="y"VDU8,8,8,8,8:PRINT" Yes ";:OSCLI"DR.0":OSCLI"EX. !BOOT" ELS EGOTO200 1460DEFPROC`OSC 1470CLS:*FX4 1480INPUTLINE"*"AA$ 1490PROC`OSCLI(AA$):CLOSE#0 1500PRINT"****** Press space to continu e ******";:AA$=GET$ 1510VDU13:PRINTSPC(39);:VDU13:IF AA$<>" *" OSCLI"FX4,1":ENDPROC 1520GOTO1480 1530DEFPROC`KEYWORD 1540IF KST=0 PRINTTAB(0,24);" No keywor ds present.";INKEY$(200);:ENDPROC 1550VDU28,0,24,39,24:OSCLI"FX138,0,"+ST R$ASCZ$ 1560LOCAL Q$,A,B,C,D 1570INPUT'" Keyword: "Z$:IF LENZ$<2 END PROC 1580PRINT" Looking for ";Z$;:Z$=FNU(Z$) :IF INSTR(Z$," ") Z$=LEFT$(Z$,INSTR(Z$," ")-2) 1590FOR A=0 TO KLE-1 1600Q$="":C=1:FOR B=0 TO 919 1610D=?(KST+A*1024+B) AND 127:D$=MID$(Z $,C,1) 1620IF D=33 A=99:B=999:Q$="":GOTO1700 1630IF D=32 GOTO1700 1640IF D$="*" GOTO1680 1650IF D<>ASCD$ GOTO1690 1660C=C+1:IF C<=LEN Z$ GOTO1700 1670IF?(KST+A*1024+B+1)<>44 GOTO1690 1680PROC`FDNUM:A=99:B=999:GOTO1700 1690C=1:PROC`FDNUM:Q$="" 1700NEXTB,A 1710IFQ$="" PRINT'" Keyword not found"; :VDU26:fnd=0:Z$=INKEY$(200):ENDPROC 1720VDU12,26:PROC`GETPAGE(Q$):fnd=1:END PROC 1730DEFPROC`FDNUM 1740REPEAT:B=B+1:UNTIL?(KST+A*1024+B)=A SC"," 1750B=B+1:Q$="":D$=CHR$(?(KST+A*1024+B) ) 1760REPEAT:Q$=Q$+D$:B=B+1:D$=CHR$(?(KST +A*1024+B)) 1770UNTIL D$<"0" OR D$>"9":ENDPROC 1780DEFFNU(Q$) 1790LOCAL W$,R$,A 1800FOR A=1 TO LEN Q$:W$=MID$(Q$,A,1):I F W$>"£" W$=CHR$(ASC W$-32) 1810R$=R$+W$:NEXT:=R$ 1820DEFPROC`OSCLI(A$) 1830IF LEFT$(A$,1)="*" OR LEFT$(A$,1)=" " A$=MID$(A$,2):GOTO1830 1840IF LEFT$(A$,4)="PAGE" PROC`GETPAGE( MID$(A$,6)):OSCLI"FX138,0,32":ENDPROC 1850IF LEFT$(A$,4)="SHUT" CLOSE#0:ENDPR OC 1860IF LEFT$(A$,8)="NEWSREEL" PRINT" Ne wsreel index page.":L=L+1000:ENDPROC 1870IF LEFT$(A$,5)="CHAIN" P$=MID$(A$,7 ):PRINT" Loading "P$:OSCLI"FX4":OSCLI"FX 225,1":OSCLI"FX226,128":OSCLI"FX11,32":C HAINP$ 1880IF LEFT$(A$,2)="IP" DIR$=MID$(A$,4) +".":$(B%+4)=LEFT$(DIR$,LENDIR$-1):ENDPR OC 1890IF LEFT$(A$,5)="FLAG=" V%=VALMID$(A $,6):ENDPROC 1900IF LEFT$(A$,5)="CLEAR" FOR LP=0 TO pagemax%:L%(LP)=-1:L2%(LP)=-1:NEXT:ENDPR OC 1910oscflg=1:OSCLI A$:oscflg=0:ENDPROC 1920DEFFNfs:LOCAL A%,Y%,E%:A%=0:Y%=0:E% =0:=(USR&FFDA)AND255 1930DEFPROCstats:FOR LP=0 TO pagemax% S TEP18:CLS:PRINT" "CHR$157" Program Statu s":PROC`CLOCK:PRINT"Maximum page: ";page max%'"Current stored pages: "'"Loc. P age"SPC(5)"Title" 1940FOR LOOP=LP TO (pagemax%AND(LP+19>p agemax%))+((LP+17)AND(LP+19<=pagemax%)): PRINTSPC(2-LENSTR$LOOP);LOOP;" ";:IF L%( LOOP)=-1 PRINT"Empty"; 1950IF L%(LOOP)>-1 PRINTL%(LOOP);" ";LE FT$($(ST+LOOP*1024+921),13);TAB(27);:IF L%(LOOP)=L2%(LOOP) PRINT" start frame"; 1960PRINT:NEXT:PRINTTAB(0,23);VER$;:REP EAT:PROC`CLOCK:UNTILINKEY(50)>0:NEXT:CLS :ENDPROC 1970DEFFNarc:=(INKEY-256<190 AND INKEY- 256>150)