10PROCinit
20ON ERROR GOTO 660
30 *|"
40 *|" DISPLAY v 3.01
50 *|"
60 *|" Text File Reader
70 *|" (c) 1991 John Carpenter
80 *|"
90MODE mode%
100OSCLI"DIR "+dir$
110VDU23;8202;0;0;0;0;0;
120PROCpic
130REPEATUNTILGET=32
140CLS
150VDU15
160IF paged%=1 THEN VDU14
170IFpaged%=1 THEN CLS:PRINT" Press SH
IFT to Scroll through"'
180*.
190INPUT" FILENAME "file$
200 X=OPENIN(file$)
210IF paged%=1 AND return%=0 THEN CLS:
PRINT" <S> top <P> ause <R> esume
text "'
220 REPEAT
230IF paged%=1 AND return%=0 THEN GOTO
270
240 CLS
250 PRINT" <S> top <P> ause <R>
esume text "
260IF print%=1 THEN PRINT'" Turn print
er ON and press RETURN when ready..":R
EPEATUNTILGET=13:VDU2
270 REPEAT
280 IF EOF#X THEN VDU 3,30:PRINT" En
d of the file.. press any key ":A=GE
T:CLOSE#0:GOTO 140
290 A=BGET#X
300 IF A=10 THEN A=0:ELSE IF A=13 THEN
VDU 10
310 IF (A>159 AND A<255) THEN A=A-128
320IF chars%=0 THEN GOTO 360
330IF A=95 THEN A=35:GOTO360
340IF A=35 THEN A=96:GOTO360
350IFA=96 THEN A=95
360 VDU A
370 A$=INKEY$(0)
380 UNTIL A$<>"" OR VPOS=23
390 IF INSTR("SsPp",A$)=0 THEN 270
400 VDU3:IF A$="S" OR A$="s" THEN VDU
30:PRINT" File has been stopped Hit an
y key ":A=GET:OSCLI"CLOSE":GOTO 140
410 IF A$="P" OR A$="p" THEN PROCpause
:GOTO270
420 IF return%=1 THEN VDU30:PRINT" M
ore text.. bash hash or return ":REP
EAT:UNTILGET=13
430 UNTIL FALSE
440DEF PROCpause
450xpos%=POS:ypos%=VPOS
460IF print%<>1 THEN VDU30:PRINT" Paus
ed... R to resume text ":REPE
AT:C=GET:UNTIL C=ASC("R") OR C=ASC("r"):
VDU30:PRINT" <S> top <P> ause <R>
esume text"
470PROCmoveto(xpos%,ypos%)
480ENDPROC
490 DEF PROCmoveto(xpos%,ypos%)
500 IF ?&70=13 AND ypos%=21 VDU30:ENDP
ROC
510 REPEAT
520 IF POS>xpos% THEN VDU8
530 IF POS<xpos% THEN VDU9
540 IF VPOS<ypos% THEN VDU10
550 IF VPOS>ypos% THEN VDU11
560 UNTIL xpos%=POS AND ypos%=VPOS
570 ENDPROC
580DEF PROCinit
590chars%=1
600paged%=0
610print%=0
620return%=1
630mode%=7
640dir$="$"
650ENDPROC
660 *|" ERROR HELP BIT
670CLS
680VDU3
690VDU15
700REPORT
710IFERR=17 THEN GOTO 740
720PRINT" at line ";ERL;" number ";ERR
730PRINT" Press any key":A=GET
740CLS
750sel%=1
760PRINT" Resolve Comms Text File Re
ader HELP"'
770IF paged%=1 THEN PRINT" Paged mode.
. ON" ELSE PRINT" Paged mode.. OFF"
780IF print%=1 THEN PRINT" Printing te
xt.. ON" ELSE PRINT" Printing text.. OFF
"
790IF return%=1 THEN PRINT" Return at
end of page.. ON" ELSE PRINT" Return at
end of page.. OFF"
800PRINT" Mode number.. ";mode%
810PRINT" Current dir.. ";dir$
820PRINT" Select help screen"
830PRINT" Drop to BASIC"
840PRINT" Return to program"
850IF chars%=1 THEN PRINT" Change Char
s ON" ELSE PRINT" Change Chars OFF"
860PRINT'" Move cursor with :"
870PRINT'" : (same key as *,no shift)
for up"
880PRINT" / (same key as ?,no shift) f
or down"
890PRINT " RETURN to select"
900 REPEAT
910PRINTTAB(0,sel%+1)" ";
920A=GET
930UNTIL A=58 OR A=47 OR A=13
940IFA=13 AND sel%=8 THEN GOTO 20
950IFA=13 THEN PROCselect:GOTO 740
960PRINTTAB(0,sel%+1)" ";
970IF A=58 THEN sel%=sel%-1 ELSE sel%=
sel%+1
980 IF sel%=10 THEN sel%=1
990IFsel%=0 THEN sel%=9
1000GOTO 900
1010DEF PROCmode
1020PRINTTAB(0,5)"
";
1030INPUTTAB(0,5)" Enter new mode "mode
%
1040ENDPROC
1050DEF PROCdir
1060PRINTTAB(0,6)"
";
1070INPUTTAB(0,6)" Enter new dir "dir$
1080ENDPROC
1090DEF PROCheylp
1100CLS
1110PRINT" This program is designed to
read text files..it is DESIGNED to be
used in Mode 7,but any number of mod
es may be used."
1120PRINT" Options can be toggled/chan
ged with the help menu which appears
when you press ESCAPE as you will hav
e noticed. It also appears if you make
a mistake in entering a filename,but i
t is easy"
1130PRINT" to return back to displaying
the file."
1140PRINT" If you want to use this pro
gram ONLINE just delete the line that sa
ys ON ERROR in it (line 20) and it will
work in Viewdata Mode."
1150PRINT" This program was written by
John Carpenter and is PD..but,don
't rip it off please..if you change it
,still credit me!"
1160PRINT"
,,,,,,,,,,, Bang return"
1170REPEAT:UNTILGET=13
1180CLS
1190PRINT" Please also call my long ru
nning BB, Resolve which,from August 23
rd 1991, will have the new number 043
8 832824"
1200PRINT" It is Viewdata,V23,V21 (hop
efully 2400 too soon), 24hours and
it can also support Scrolly in a naff wa
y..Hmm.."
1210PRINT" Anyway,enough plugging..enj
oy the prog and let me know,via the BB,w
hat you think..I'm quite pleased wit
h it myself"
1220PRINT" Paged mode means when the b
ottom of screen is reached SHIFT must
be pressed to scroll it.This also happe
ns when CATTING a disk."
1230PRINT"
,,,,,,,,,,, Bang return"
1240REPEAT:UNTILGET=13
1250CLS
1260PRINT" Return means that at the ver
y bottom of the screen it asks you to pr
ess return to continue.This is much bet
ter than paged mode.But,if you want t
o print and read at the same time,use pa
ged mode, as that does not print PRESS
"
1270PRINT" SHIFT etc..do NOT have paged
AND return mode BOTH on or it will go a
bit odd.. it will still work,just be c
rap!"
1280PRINT" Print means that it will pr
int the text to printer.It will not
print graphics though.It will ask
you to turn on the printer before it sta
rts printing and automatically t
urn it off if you stop it or if the fil
e"
1290PRINT" ends..Pause does not work in
printmode"
1300PRINT"
,,,,,,,,,,, Bash Return"
1310REPEATUNTILGET=13
1320CLS
1330PRINT" Change Chars is defaulted t
o ON and it changes pound,hash,underline
etc around as in Viewdata.The screen sh
ould still look Ok..but,should you want
to turn this off,just toggle it off.
"
1340PRINT" I hope to have included eve
ry feature possible with this..feel fre
e to change it about,just keep me credit
ed,please!! This program was written for
Resolve Comms and Eight Bit Software
Public "
1350PRINT" Domain Library and should wo
rk on BBC model B and Master users."
1360PRINT"
,,,,,,,,,,, Bash Return"
1370REPEATUNTILGET=13
1380ENDPROC
1390DEF PROCselect
1400IFsel%=1 THEN PROCpaged
1410IFsel%=2 THEN PROCprint
1420IFsel%=3 THEN PROCreturn
1430IFsel%=4 THEN PROCmode
1440IFsel%=5 THEN PROCdir
1450IFsel%=6 THEN PROCheylp
1460IFsel%=7 THEN CLS:PRINT" Finished :
";:END
1470IFsel%=9 THEN PROCchars
1480ENDPROC
1490DEF PROCpaged
1500IF paged%=1 THEN paged%=0:ENDPROC
1510paged%=1
1520ENDPROC
1530DEF PROCprint
1540IF print%=1 THEN print%=0:ENDPROC
1550print%=1
1560ENDPROC
1570DEF PROCreturn
1580IF return%=1 THEN return%=0:ENDPROC
1590return%=1
1600ENDPROC
1610DEF PROCchars
1620IF chars%=1 THEN chars%=0:ENDPROC
1630chars%=1
1640ENDPROC
1650DEF PROCpic
1660CLS
1670PRINT"
c% 8915"
1680PRINT"
)0 5555"
1690PRINT"
,!$&& %"
1700PRINT" 1710PRINT" The Resolve Comms Text Fil
e Reader"
1720PRINT" Written by John Carpenter
(c) 1991"
1730PRINT"
///////////";
1740PRINT" 1750PRINT" Press ESCAPE for the help
menu etc"
1760PRINT" Press SPACE to start dis
playing"
1770PRINT" 1780ENDPROC