Compucolor.org – Virtual Media

Listing of file='WADEMO.BAS;01' on disk='vmedia/analiz_watals-sector.ccvf'

0 PLOT 6,2,12,3,64,0:IF  PEEK (32941) >  238GOTO 4800
1 GOTO 4850:REM  USE THIS VERSION IF THE BASIC EDITOR IS PRESENT
10 REM  C8=nn C9=nn CALL VECTOR FOR SEQFIL,PRINT,GET KEY
20 C6= 154:C7= 130:C5ALL= 33283:POKE C5- 1,195:POKE C5,C6:POKE C5+ 1,C7:REM   ANALIZ CALL VECTOR
30 PLOT 3,64,0,27,18,7,6,2,15:REM  OUT8,199
60 REM   81 01 06 WATALS FOR DISK BASIC V6 & V8
89 REM  ANALIZ FUNCTIONS
90 DEX= 0:KEY= 1:SIM= 2:OSIG= 4:POA= 8:RLTBL= 16:RBL= 32:LVBL= 48:UPPR= 64:LOWR= 128:FSENT= 192
100 TIME= 33209:CY= 33228:CX= 33227:POKE 33289,129:PLOT 27,24
110 QT= 32
130 REM  DIMENSION ARRAYS HERE
139 REM  DEFAULT VALUES
140 HANG= 0:ECOL= 63:SCOL= 0:LN= 0:XY= 3:PR$= " *> ":APF$= "":APF= 0
150 CO= 7:RC= 1:IC= 2:MC= 3:AC= 5:HC= 6:TC= 7
170 VCADDRESS= 33234:BASFLAG= 33265:CRLF$= CHR$ (13)+ CHR$ (10)
189  REM  CLEAR SCREEN FUNCTIONS
190 DEF FN CL(X)= INT (X* 2.02)
200 DEF FN LN(X)= NOT INT (X* 4.1- 128)
240 DEF FN ADDRESS(X)= PEEK (X)+ PEEK (X+ 1)* 256
250 REM  LESS #, ETC. DESCRIPTION
290 PLOT 3,64,LN
300 HE$= "UNAV"
350 GOTO 5000
500  REM  GET NAME & #
505 PLOT 29,6,TC,15
510 PLOT 3,0,24:PRINT "What is your family / surname?";:APF= 1:GOSUB 700:GOSUB  1000:N$= T$
515 PLOT 6,TC:PRINT :PRINT "ID Number?";:APF= 1:GOSUB 700:ID$= T$
520 PLOT 6,TC:PRINT :PRINT "Thank you.  What do your friends call you?";:APF= 1:GOSUB 700:GOSUB  1000:FM$= T$
530 PLOT 6,TC:PRINT :PRINT "Ok, ";FM$;", let's go to work."
535 PLOT 3,64,LN,15,6,TC:T= 1:GOSUB 3100
599 RETURN
700  REM  INPUT MANAGER
701  REM  OUT 207 UNLOCKS & OUT 199 LOCKS THE KEYBOARD.
720 PLOT 6,IC:IF APF= 1THEN PRINT PR$;:APF= 0
730 TY= PEEK (CY):TX= PEEK (CX):OUT 8,207:INPUT "";T$:IF  T$= ""THEN  T$= "0":GOTO 790:REM  OUT8,199
739  REM  NULL INPUT, THEN READ COMPLETE INPUT INCLUDING LEADING SPACES.
740 X= 32839:T$= ""
750 J= PEEK (X):IF J< > 0THEN T$= T$+ CHR$ (J):X= X+ 1:GOTO 750
754  REM  CHECK FOR USER COMMANDS. "?" IN FIRST COL.
755 IF CALL (KEY+ RLT)(T$,"?")< > 1THEN T$= ED$:GOTO 790
765 X= CALL (KE+ LO+ RLTBL)(T$,"bye#quit#time#help")AND 255:IF X= 0THEN X= 16
769  REM  WHICH COMMAND?
770 X= INT (LOG (X)/ .6931147)+ 1:ON  X GOSUB  4900,4900,4500,3055,3055:T$= "0"
790 PLOT 6,TC:RETURN
1000 REM  FORM SENTENCE
1010 IF  CALL (FSEN)(T$,"")THEN  T$= ED$
1049 RETURN
1100 REM  CHANGE TO LOWER CASE
1110 IF  CALL (LOWR)(T$,"")THEN  T$= ED$
1149 RETURN
1200 REM  CHANGE TO UPPER CASE
1210 IF  CALL (UPPR)(T$,"")THEN  T$= ED$
1249 RETURN
1300 REM  REMOVE ALL SPACES FROM T$
1310 IF  CALL (RBLNKS)(T$,"")THEN  T$= ED$
1349 RETURN
1400 REM  SIMPLE KEY-WORD CHECK
1410 RI= 0:X= CALL (KEY+ UPPR+ RLTBL)(T$,A$)AND  255:REM  NORMALIZE TO 8 BITS
1420 IF  X> 0 THEN  RI= 1
1499 RETURN
1600 REM  LOAD VECTOR "P" WITH "NQ" UNIQUE RANDOM NUMBERS
1610 PLOT 3,64,0
1630 J= RND (- PEEK (TIME))
1650 FOR J= 1TO NQ:P(J)= J:NEXT J
1660 FOR JJ= 1TO NQ
1670 J= RND (1)* NQ+ 1:T= P(JJ):P(JJ)= P(J):P(J)= T
1680 NEXT JJ
1690 RETURN
2100  REM  NO FOLD OUTPUT OR PRINT T$ IN THE WINDOW SCOL,ECOL, LN
2101 REM  IF HANG = -1 THEN THE CURSOR WILL HANG AFTER THE LAST LINE
2102 REM  INPUTS: ECOL=END COLUMN. SCOL=START COL. LN=LINE NUMBER
2104 IF (T$= "")OR (SCOL> ECOL)GOTO 2150
2105 TX= LEN (T$):IF  TX< = ECOL- SCOL THEN  X= TX+ 1:GOTO  2130
2115 FOR  X= (ECOL- SCOL)+ 1 TO  2 STEP  - 1
2120  IF  MID$ (T$,X,1)< > " " THEN  NEXT  X:X= TX+ 1
2129  REM  PRINT @ PLOT 3,START COL,LINE #
2130 PLOT  3,SC,LN:PRINT  LEFT$ (T$,X- 1);:IF  NOT  HANG THEN  PRINT
2140 LN= LN+ 1:T$= MID$ (T$,X+ 1):IF  T$< > "" GOTO  2105
2150 RETURN
3000 REM  FOOT
3005 IF FT$= ""THEN FT$= "Press RETURN to continue."
3010 T9= 32- LEN (FT$+ PR$)/ 2
3015 PLOT 15,6,2,XY,0,31,11,XY,T9,31:PRINT FT$;
3020 APF= 1:GOSUB 700
3030 RETURN
3055 IF HE$= "UNAV"THEN PLOT XY,0,31,11,XY,15,31:PRINT "HELP IS UNAVAILABLE";:APF= 1:T= 2:GOSUB 3100:GOTO 3085
3060 X= CALL (KEY+ LOWR+ RBL)(T$,"help"):T$= MID$ (T$,X+ 1)
3065  REM  T$ = AREA WHERE HELP HAS BEEN REQUESTED.
3070  REM  INSERT YOUR HELP ROUTINES HERE OR GOSUB TO YOUR ROUTINES.
3085 RETURN
3100 REM  TIMER ROUTINE
3110 PLOT 3,64,0:T= T+ PEEK (TIME):IF T= > 59THEN T= T- 59
3120 IF  PEEK (TIME)= < T GOTO 3120
3130 RETURN
3200  REM  PRINT A SCREEN (PAGE MODE, PLEASE) TO THE PRINTER
3201  REM  STARTING @ HOME & ENDING @ THE LAST CURSOR POSITION
3220 POKE  C5ALL,C8:POKE  C5+ 1,C9:X= CALL (5)("",""):POKE  C5,C6:POKE  C5+ 1,C7:RETURN
3300  REM  GET KEY. X=VALUE OF KEY PRESSED
3320 POKE  C5ALL,C8:POKE  C5+ 1,C9:X= CALL (6)("",""):POKE  C5,C6:POKE  C5+ 1,C7:RETURN
3400  REM   INITIAL SET UP FOR SEQUENTIAL FILES 
3401 REM   0=OPEN FOR I/P, 1=OPEN FOR O/P, 2=GET RECORD W/O CRLF
3402 REM   3=PUT RECORD W/CRLF, 4=CLOSE FILES
3403 REM   SYNTAX: X=CALL(N)(N$,BU$(FIL)) WHERE N=CALL VAL. N$=STRING TO TRANSFER, BU$(FIL)= A 255 BYTE FPB
3404 REM   IMPORTANT THE STRING ASSIGNED AS BU$(FIL) MUST NOT BE REASSIGNED OR USED.
3405 REM   THE FILE THAT IS TO BE OPENED MUST BE IN FIL$(FIL)
3406 REM  FIL=FILE #.(1,2,N). ONLY ONE (1) OUTPUT FILE MAY BE OPEN AT ANY ONE TIME.
3410 BUFFR$(0)= " ":FOR X= 1TO 7:BU$(0)= BU$(0)+ BU$(0):NEXT X:BU$(0)= BU$(0)+ LEFT$ (BU$(0),127)
3411 BU$(1)= BU$(0)+ "":BU$(2)= BU$(0)+ "":BU$(3)= BU$(0)+ "":RETURN
3419 REM   OPEN THE FILE FIL$ FOR INPUT, BU$(FIL)=FPB & BUFFER
3420 POKE C5+ 1,C9:POKE C5,C8:X= CALL (0)(FIL$(FIL),BU$(FIL)):POKE C5,C6:POKE C5+ 1,C7:RETURN
3429 REM   GET A RECORD FROM FIL$, BU$=FPB & BUFFER, T$=THE RECORD
3430 T$= BU$(0)+ "":POKE C5+ 1,C9:POKE C5,C8:X= CALL (2)(T$,BU$(FIL)):POKE C5,C6:POKE C5+ 1,C7:RETURN
3431 REM   12=END OF FILE. BE SURE TO CHECK FOR IT.
3439 REM   OPEN THE FILE FIL$(FIL) FOR OUTPUT, B2U$(FI)=FPB & BUFFER
3440 POKE C5+ 1,C9:POKE C5,C8:X= CALL (1)(FIL$(FIL),BU$(FIL)):POKE C5,C6:POKE C5+ 1,C7:RETURN
3449 REM   PUT A RECORD TO FIL$(FIL), BU$(FIL)=FPB & BUFFER, T$=THE RECORD
3450 T$= T$+ CR$:POKE C5+ 1,C9:POKE C5,C8:X= CALL (3)(T$,BU$(FIL)):POKE C5,C6:POKE C5+ 1,C7:RETURN
3459 REM   CLOSE THE FILE FIL$(FIL), BU$(FIL)=FPB & BUFFER, BU$(FIL)=THE FILE FPB
3460 IF BU$(FIL)THEN POKE C5+ 1,C9:POKE C5,C8:X= CALL (4)(FIL$(FIL),BU$(FIL)):POKE C5,C6:POKE C5+ 1,C7:RETURN
3469  :
3499 RETURN
3500 REM  FIND & IN T$
3510 FOR X= 1TO LEN (A$):IF MID$ (A$,X,1)= "&"THEN A$= LEFT$ (A$,X- 1):GOTO 3549
3520 NEXT X
3549 RETURN
3550 REM  FIND # IN A$
3560 FOR X= 1TO LEN (A$):IF MID$ (A$,X,1)= "#"THEN A$= LEFT$ (A$,X- 1):GOTO 3599
3570 NEXT X
3599 RETURN
3650 REM  FIND FIELD POS OF MATCHED STRING. X=VALUE RETURNED BY ANALIZ
3660 X= INT (LOG (X)/ .6931147)+ 1
3699 RETURN
4000 REM   C.L.E.F. (C) UNIVERSITY OF WATERLOO, 1980
4020 FILE "TRAP",4199
4030 PLOT 3,64,LN:FILE "R",1,"CLEF",1
4040 CT= 1
4050 FOR I= 1TO 105:GET 1,1,CT;X1,X2,X3,X4,X5:PLOT X1,X2,X3,X4,X5:CT= CT+ 20:NEXT I:GET 1,1,CT;X1:PLOT X1
4170 PLOT 3,9,0:PRINT "Computer-Aided Learning Exercises in French":PLOT 3,64,LN
4185 FILE "C",1:RETURN
4195 RETURN
4199 GOTO  5002:REM  GOTO CALLING LINE PLUS ONE.
4200  REM  SUBROUTINE TO PLOT HORIZ. BARS TO CLEAR THE SCREEN
4201  REM  FROM LN (LINE #) TO THE BOTTOM OF THE SCREEN.
4220 CL= 0:WI= 63:DPTH= 31:T1= 2:CO= 0:GOTO 4240
4229  REM  ENTER HERE & RE-DEFINE THE WINDOW TO BE CLEARED & THE COLOUR TO BE USED.
4230 T1= CO:IF CO= 0THEN T1= TC
4240 PLOT 3,64,LN:X= FN CL(CL):Y= FN LN(DP):T3= FN CL(WI+ CL):T2= FN LN(LN)
4250 T5= 1:IF DIR= 1THEN T5= - 1:T= X:X= T3:T3= T:DIR= 0
4260 PLOT 6,CO,2,246,Y
4270 FOR T0= XTO T3STEP T5:PLOT T0,T2:NEXT T0
4280 PLOT 255
4290 PLOT 6,T1:T5= 1:RETURN
4300 REM  PLOT VERT. BARS
4320 CL= 0:WI= 63:DPTH= 31:T1= 2:CO= 0:GOTO 4340
4330 T1= CO:IF CO= 0THEN T1= TC
4340 PLOT 3,64,LN:X= FN CL(CL):Y= FN LN(DP):T3= FN CL(WI+ CL):T2= FN LN(LN)
4350 T5= 1:IF DIR= 1THEN T5= - 1:T= Y:Y= T2:T2= T:DIR= 0
4360 PLOT 6,CO,2,250,X
4370 FOR T0= YTO T2STEP T5:PLOT T0,T3:NEXT T0
4380 PLOT 255
4390 PLOT 6,T1:T5= 1:RETURN
4500 REM  GET THE CURRENT TIME OF DAY
4525 PLOT 3,64,LN
4530 L2= PEEK (33210):L1= PEEK (33211)
4535 IF L1> 12THEN L1= L1- 12
4540 TI$= RIGHT$ (STR$ (L1+ 100),2)+ ":"+ RIGHT$ (STR$ (L2+ 100),2)
4545 PLOT XY,TX,TY:PRINT TI$:APF= 1:T= 2:GOSUB 3100:PLOT XY,CL,LN:PRINT SPC( LEN (TI$)):RETURN
4600 REM   PRINT T$, CENTRED
4620 PLOT 6,MC,XY,FN CTR(CL),LN:PRINT T$:RETURN
4800 REM  LOAD SEQFIL/PRINT/GETKEY
4810 POKE 32940,111:POKE 32941,253:CLEAR 2000:C8= 240:C9= 253:REM LOAD ADDR=FD70, CALL=FDF0
4820 PLOT 27,4:PRINT "RUN SEQFIL.PRG":PLOT 27,27
4830 GOTO 10
4849 REM  IF FREDI IS PRESENT, USE THIS VERSION
4850 POKE 32940,47:POKE 32941,237:CLEAR 2000:C8= 96:C9= 237:REM LOAD ADDR=ECE0, CALL=ED60
4860 PLOT 27,4:PRINT "RUN SEQFBF.PRG":PLOT 27,27
4870 GOTO 10
4900  REM  BYE/QUIT STUB. INSERT YOUR ROUTINE # IN LINE 770
4910 PLOT  12,6,2,14,3,30,16:PRINT "END"
4920 PLOT  3,64,0:GOTO  4920
5000 REM  USER DATA STATEMENTS START HERE
5002 :
5004 REM   81 11 29 DATE LAST EDITED  CWH
5006 :
5008 PLOT 6,2,12,15,29
5010 PLOT 3,23,3:PRINT "WATALS/ANALIZ (V3.2)";SPC( 20);"`"
5012 PLOT 3,23,4:PRINT "eeeeee eeeeee"
5014 PLOT 3,8,7:PRINT "THIS IS A BRIEF DEMONSTRATION OF THE SUB-ROUTINE"
5016 PLOT 3,0,9:PRINT "PACKAGE WATALS AND THE CHARACTER AND WORD PARSING PROGRAMME"
5018 PLOT 3,59,10:PRINT "`````"
5020 PLOT 3,0,11:PRINT "ANALIZ. ALSO INCLUDED IN VERSION 3.2 IS THE SEQUENTIAL FILE`````"
5022 PLOT 3,61,12:PRINT "```"
5024 PLOT 3,0,13:PRINT "ACCESS UTILITY SEQFIL.";SPC( 39);"```"
5026 PLOT 3,8,17:PRINT "THIS PROGRAMME WAS WRITTEN USING THE SCREEN PROCESSING"
5028 PLOT 3,62,18:PRINT "``"
5030 PLOT 3,0,19:PRINT "PROGRAMME AGILIS AS THE PRIMARY EDITOR."
5032 PLOT 3,0,21:PRINT "":GOSUB 3000:PRINT ""
5034 PLOT 6,2,12,15,29,3,0,0:PRINT "-2-"
5036 PLOT 3,0,3:PRINT "LIST OF SUB-ROUTINES IN WATALS."
5038 PLOT 3,0,5:PRINT "0-350   DEFINE VARIABLES & SET DEFAULT VALUES.";SPC( 17);"`"
5040 PLOT 3,0,6:PRINT "500     GENERAL PURPOSE GET YOUR NAME, NUMBER, ETC."
5042 PLOT 3,0,7:PRINT "700     GET ALL CHARACTERS ENTERED FROM THE CONSOLE."
5044 PLOT 3,0,8:PRINT "1000    FORM A SENTENCE ON T$. (FIRST LETTER IN CAPS, REMAINDER"
5046 PLOT 3,9,9:PRINT "IN LOWER CASE. 'How are you today?'"
5048 PLOT 3,0,10:PRINT "1100    CHANGE T$ TO LOWER CASE. 'how are you today?'"
5050 PLOT 3,0,11:PRINT "1200    CHANGE T$ TO UPPER CASE. 'HOW ARE YOU TODAY?'"
5052 PLOT 3,0,12:PRINT "1300    REMOVE ALL SPACES FROM T$. 'HOWAREYOUTODAY?'"
5054 PLOT 3,0,13:PRINT "1400    SIMPLE KEY-WORD CHECK. MAY BE EASILY MODIFIED."
5056 PLOT 3,0,14:PRINT "1600    LOAD A VECTOR P() WITH 'NQ' UNIQUE NUMBERS.  P() MUST ``"
5058 PLOT 3,9,15:PRINT "BE PREVIOUSLY DIMENSIONED TO 'NQ'.  USE AS IN INDEX FOR"
5060 PLOT 3,9,16:PRINT "POOLS OF RANDOM QUESTIONS, ANSWERS, ETC."
5062 PLOT 3,0,17:PRINT "2100    NO-FOLD OUTPUT. DEFINE A PRINT WINDOW AND ENSURE THAT ``"
5064 PLOT 3,9,18:PRINT "THE TEXT (T$) DOES NOT BREAK A WORD ON THE WINDOW LEDGE"
5066 PLOT 3,0,19:PRINT "3000    A  'FOOT' MESSAGE IS PRINTEd ON THE LAST LINE OF THE ```"
5068 PLOT 3,8,20:PRINT "SCREEN. 'PRESS RETURN TO CONTINUE'";SPC( 21);"`"
5070 PLOT 3,0,21:PRINT "3055    IF A HELP FACILITY IS AVAILABLE (NO COST OPTION), THIS"
5072 PLOT 3,9,22:PRINT "ROUTINE DOES THE SELECTION."
5074 PLOT 3,0,23:PRINT "3100    DELAY PROGRAMME EXECUTION 'T' SECONDS."
5076 PLOT 3,0,24:PRINT "3200    PRINT A CRT SCREEN TO YOUR PRINTER. THE BAUD RATE MUST"
5078 PLOT 3,9,25:PRINT "BE SET BY YOUR PROGRAMME. THIS ROUTINE STARTS PRINTING"
5080 PLOT 3,9,26:PRINT "FROM THE HOME POSITION TO THE LAST DEFINED VISIBLE"
5082 PLOT 3,9,27:PRINT "CURSOR."
5084 PLOT 3,0,28:PRINT "":GOSUB 3000:PRINT ""
5086 PLOT 6,2,12,15,29,3,0,0:PRINT "-3-"
5088 PLOT 3,8,2:PRINT "THE FOLLOWING ROUTINES ARE CONTAINED IN SEQFIL & WHEN"
5090 PLOT 3,1,3:PRINT "CALLED WILL SET THE CALL VECTOR TO SEQFIL. ON COMPLETION,"
5092 PLOT 3,1,4:PRINT "THE CALL VECTOR WILL BE RESET TO ANALIZ."
5094 PLOT 3,0,6:PRINT "3200    PRINT A CRT SCREEN TO YOUR PRINTER. THE BAUD RATE MUST"
5096 PLOT 3,9,7:PRINT "BE SET BY YOUR PROGRAMME. THIS ROUTINE STARTS PRINTING"
5098 PLOT 3,9,8:PRINT "FROM THE HOME POSITION TO THE LAST DEFINED VISIBLE"
5100 PLOT 3,9,9:PRINT "CURSOR."
5102 PLOT 3,0,11:PRINT "3300    GET A KEYSTROKE FROM THE CONSOLE. WAIT UNTIL A KEY IS"
5104 PLOT 3,9,12:PRINT "STRUCK, THEN RETURN WITH THE ASCII VALUE IN X."
5106 PLOT 3,0,14:PRINT "3400    INITIAL CALL TO SET UP SEQUENTIAL FILE BUFFER. <BU$(0)>"
5108 PLOT 3,0,16:PRINT "3420    OPEN A SEQUENTIAL FILE FOR INPUT (READ) .     ``````````"
5110 PLOT 3,0,18:PRINT "3430    GET A RECORD TERMINATED WITH A CRLF FROM AN OPEN FILE  `"
5112 PLOT 3,9,19:PRINT "(CARRIAGE RETURN/LINE FEED). THE CRLF IS REMOVED BY````"
5114 PLOT 3,9,20:PRINT "SEQFIL & MUST BE RESTORED BY THE BASIC PROGRAMME."
5116 PLOT 3,0,22:PRINT "3440    OPEN A FILE FOR OUTPUT (WRITE).";SPC( 24);"`"
5118 PLOT 3,0,24:PRINT "3450    PUT A RECORD TERMINATED WITH A CRLF TO THE OUTPUT FILE."
5120 PLOT 3,0,26:PRINT "3460    CLOSE THE SPECIFIED FILE.";SPC( 28);"```"
5122 PLOT 3,0,27:PRINT "":GOSUB 3000:PRINT ""
5124 PLOT 6,2,12,15,29,3,0,0:PRINT "-4-"
5126 PLOT 3,0,2:PRINT "3650    RETURN THE FIRST FIELD WHERE A MATCH OCCURED IN AN"
5128 PLOT 3,9,3:PRINT "ANALIZ RETURN VALUE."
5130 PLOT 3,0,5:PRINT "4000    PRINT C.L.E.F. LOGO THAT IS STORED ON DISK."
5132 PLOT 3,0,7:PRINT "4200    CLEAR SCREEN FROM LN (LINE #) TO BOTTOM OF THE SCREEN."
5134 PLOT 3,9,8:PRINT "DIR SPECIFIRS DIRECTION. DEFAULTS FROM LEFT TO RIGHT."
5136 PLOT 3,1,9:PRINT "4230   ALTERNATE ENTRY POINT TO CREATE AN ERASE WINDOW. ALL"
5138 PLOT 3,9,10:PRINT "VALUES, INCLUDING COLOUR, MUST BE SPECIFIED."
5140 PLOT 3,0,12:PRINT "4300    THE SAME AS 4200, EXCEPT THE DEFAULT DIRECTION IS FROM"
5142 PLOT 3,9,13:PRINT "THE BOTTOM UP TO LN."
5144 PLOT 3,1,14:PRINT "4330   THE SAME AS 4230."
5146 PLOT 3,0,16:PRINT "4500    GET THE CURRENT TIME OF THE DAY AND PRINT IT @ THE LAST"
5148 PLOT 3,9,17:PRINT "DEFINED CURSOR POSITION."
5150 PLOT 3,0,19:PRINT "4600    PRINT T$, CENTRED ON THE SCREEN."
5152 PLOT 3,0,21:PRINT "4800    THIS SECTION IS CALLED BY WATALS TO LOAD SEQFIL.       `"
5154 PLOT 3,0,23:PRINT "4900    INSTALL YOUR ROUTINE FOR BYE OR QUIT HERE."
5156 PLOT 3,0,25:PRINT "5000    YOUR PROGRAMME STARTS HERE."
5158 PLOT 3,0,29:PRINT "":GOSUB 3000:PRINT ""
5200 PLOT 6,2,12,15,29,3,31,0:PRINT "-5-"
5205 PLOT 3,0,1:PRINT "GOSUB 700"
5210 PLOT 3,8,3:PRINT "IF THE ALL PURPOSE FLAG (APF) IS SET TO 1, A PROMPT ````"
5215 PLOT 3,9,4:PRINT "WILL BE PRINTED @ LN,CL (COLUMN).";SPC( 14);"````````"
5220 PLOT 3,0,5:PRINT "E.G."
5225 PLOT 3,0,7:PRINT "9000 CL=8:LN=30:PLOT 3,CL,LN"
5230 PLOT 3,0,8:PRINT "9010 APF=1:GOSUB 700:IF T$=CHR$(0) THEN PRINT CHR$(7)
5235 PLOT 3,0,30:PRINT "":PLOT 3,8,30:APF= 1:GOSUB 700:IF T$= "0"THEN PRINT CHR$ (7);:PRINT ""
5240 PLOT 15,29,3,8,10:PRINT "THE LAST PLOTTED CURSOR POSITIONS ARE SAVED IN
5245 PLOT 3,9,11:PRINT "TX (COLUMN) & TY (ROW). THESE MAY BE USED   FOR REPLACING"
5250 PLOT 3,9,12:PRINT "WRONG RESPONSES IN THE USER INPUT AREA.          "
5255 PLOT 3,0,14:PRINT "9020 PRINT 'WHAT IS THE ......... 700 ROUTINE USED FOR?'      "
5260 PLOT 3,24,14:APF= 0:GOSUB 700
5265 PLOT 15,29,3,0,15:PRINT "9030 IF T$=CHR$(48) THEN PLOT 3,TX,TY:PRINT 'GOSUB'`````````````"
5270 PLOT 3,2,30:PRINT "":IF T$= "0"THEN PLOT 3,TX,TY:PRINT "GOSUB":GOSUB 3000:PRINT "
5300 PLOT 6,2,12,15,29,3,31,0:PRINT "-6-"
5305 PLOT 3,0,1:PRINT "GOSUB 500"
5310 PLOT 3,8,3:PRINT "GET STUDENT'S NAME, ID #, WHATEVER."
5315 PLOT 21,2,42,86,242,46,86,46,82,52,82,52,86,54,86,54,78,52,78,52,74,68,74,68,70,70,66,70,62,68,62,255
5320 PLOT 21,2,42,86,242,42,82,42,78,44,78,44,74,42,70,40,66,40,62,42,62,44,66,46,62,48,62,48,66,58,66,56,62,62,62,64,66,68,62,255
5325 PLOT 20,2,46,78,242,46,78,255
5330 PLOT 20,2,50,78,242,50,78,255
5335 PLOT 17,2,46,74,242,48,74,50,74,255
5340 PLOT 23,2,68,70,242,70,74,74,74,76,78,255
5345 PLOT 15,29,3,0,4:PRINT "9000 GOSUB 500                          ";SPC( 10);"            "
5350 PLOT 3,0,31:PRINT "":GOSUB 500:PRINT ""
5355 PLOT 15,29,3,8,5:PRINT "FORM SENTENCE WAS USED ON THE FIRST & LAST NAMES TO
5360 PLOT 3,9,6:PRINT "PREVENT ANY CONFUSION IN STATISTICS COLLECTING ROUTINES"
5365 PLOT 3,9,7:PRINT "WITH THE SAME NAME IN DIFFERENT CASES, ETC. "
5370 PLOT 15,3,0,30:PRINT "":GOSUB 3000:PRINT "                                               "
5375 PLOT 3,0,31:PRINT "              "
5400 PLOT 6,2,12,15,29,3,31,0:PRINT "-7-"
5402 PLOT 3,0,1:PRINT "GOSUB 1000"
5404 PLOT 3,8,3:PRINT "FORM A SENTENCE OUT OF T$."
5406 PLOT 3,0,4:PRINT "9000 T$='MY CAT IS A REFUGEE.'"
5408 PLOT 3,0,5:PRINT "9010 GOSUB 1000:PRINT T$"
5410 PLOT 3,0,6:PRINT "":T$= "MY CAT IS A REFUGEE.":GOSUB 1000:PRINT T$:PRINT ""
5412 PLOT 15,29,3,0,6:PRINT "                                              "
5414 PLOT 3,0,9:PRINT "GOSUB 1100"
5416 PLOT 3,8,11:PRINT "CHANGE T$ TO LOWER CASE."
5418 PLOT 3,0,13:PRINT "9020 T$='OR AM I THE ONE SEEKING REFUGE?':GOSUB 1100:PRINT T$
5420 PLOT 3,0,14:PRINT "":T$= "OR AM I THE ONE SEEKING REFUGE?":GOSUB 1100:PRINT T$:PRINT ""
5422 PLOT 15,29,3,0,14:PRINT "                                                        "
5424 PLOT 3,0,17:PRINT "GOSUB 1200"
5426 PLOT 3,8,19:PRINT "CHANGE T$ TO UPPER CASE."
5428 PLOT 3,63,20
5430 PLOT 3,0,21:PRINT "9030 T$='from what, quoth the CAT evermore.':GOSUB 1200:PRINT T$"
5432 PLOT 3,0,22:PRINT "":T$= "from what, quoth the CAT evermore.":GOSUB 1200:PRINT T$:PRINT "    `"
5434 PLOT 15,29,3,0,22:PRINT "                                                                "
5436 PLOT 3,0,25:PRINT "GOSUB 1300"
5438 PLOT 3,8,27:PRINT "REMOVE ALL THE SPACES FROM T$."
5440 PLOT 3,0,29:PRINT "9040 T$='IF I'M OK AND YOU'RE OK, THEN ....':GOSUB 1300:PRINT T$"
5442 PLOT 3,0,30:T$= "IF I'M OK AND YOUR'RE OK, THEN ....":GOSUB 1300:PRINT T$
5444 PLOT 3,0,31:PRINT "":T= 5:GOSUB 3100:GOSUB 3000
5500 PLOT 6,2,12,15,29,3,31,0:PRINT "-8-"
5505 PLOT 3,0,1:PRINT "GOSUB 2100"
5510 PLOT 15,3,8,4:PRINT "NO FOLD OUTPUT. DEFINE A PRINT WINDOW @ LINE 14 WITH"
5515 PLOT 3,1,6:PRINT "WITH A START COL. OF 10 & AN END COL. OF 40."
5520 PLOT 3,0,8:PRINT "T$='.....':LN=14:SCOL=10:ECOL=40:GOSUB 2100"
5525 PLOT 3,0,9:PRINT "":T= 2:GOSUB 3100:PRINT ""
5530 PLOT 3,0,10:PRINT "":T$= FT$+ " "+ FT$+ " "+ FT$+ " "+ FT$:LN= 14:EC= 40:SC= 10:PRINT ""
5535 PLOT 3,0,11:PRINT "":T1$= T$:GOSUB 2100:GOSUB 3000:PRINT ""
5540 PLOT 3,0,13:PRINT "ENTER A NEW VALUE FOR THE END COL. ECOL="
5545 PLOT 3,40,13:INPUT "";T$
5550 PLOT 15,29,3,0,14:PRINT "":LN= 14:ECOL= VAL (T$):GOSUB 4200:T$= T1$:GOSUB 2100:PRINT ""
5555 PLOT 15,29,3,7,13:PRINT "NOTHER VALUE FOR THE END COL. ECOL="
5557 PLOT 3,43,13:INPUT "";T$
5560 PLOT 15,29,3,0,14:PRINT " ":LN= 14:ECOL= VAL (T$):GOSUB 4200:T$= T1$:GOSUB 2100:PRINT ""
5565 PLOT 15,29,3,1,31:PRINT "":GOSUB 3000:PRINT ""
5570 PLOT 6,2,12,15,29,3,31,0:PRINT "-9-"
5575 PLOT 3,0,3:PRINT "THE PREVIOUS PAGE ALSO USED:"
5580 PLOT 3,8,7:PRINT "GOSUB 3000      A FOOT MESSAGE"
5585 PLOT 3,8,11:PRINT "GOSUB 3100      A TIME DELAY"
5590 PLOT 3,8,15:PRINT "GOSUB  700      LINE INPUT"
5595 PLOT 3,8,19:PRINT "GOSUB 4200      SELECTIVE SCREEN CLEARING"
5600 PLOT 3,1,23:PRINT "AND BASIC CODE INSERTION FROM AGILIS."
5605 PLOT 3,7,31:PRINT "PRESS RETURN TO SEE HOW IT WAS DONE.*>"
5610 PLOT 3,46,31:INPUT "";T$
5615 PLOT 6,2,12,15,29,3,31,0:PRINT "-10-"
5620 PLOT 3,0,3:PRINT "POSITION YOUR TEXT AS REQUIRED. START A NEW LINE IN THE 2ND."
5625 PLOT 3,0,7:PRINT "COLUMN POSITION WITH A DOUBLE QUOTE <CHR$(34)>. FOR DISPLAY"
5630 PLOT 3,0,11:PRINT "PURPOSES I WILL USE A YELLOW '."
5635 PLOT 3,0,13:PRINT "E.G."
5640 PLOT 3,1,15:PRINT "':T=2:GOSUB 3100:APF=1:GOSUB 700:? T$+' '+T$:?'"
5645 PLOT 3,0,19:PRINT "THEN CLOSE THE STATEMENT WITH A PRINT (? '). THIS PROCEDURE"
5650 PLOT 3,0,23:PRINT "WILL EFFECTIVELY FOOL THE LINE PARSING ROUTINE IN AGILIS INTO"
5655 PLOT 3,0,27:PRINT "THINKING THE SCREEN LINE IS ONE CONTINUOUS STATEMENT."
5660 PLOT 3,1,31:PRINT "":T= 2:GOSUB 3100:APF= 1:GOSUB 700:PRINT T$+ " "+ T$:PRINT ""
5665 PLOT 6,2,12,15,29,3,31,0:PRINT "-11-"
5670 PLOT 3,0,3:PRINT "THE FOLLOWING DEMONSTRATION IS ON THE USE OF THE SEQUENTIAL"
5675 PLOT 3,0,7:PRINT "FILE UTILITY SEQFIL."
5680 PLOT 3,0,11:PRINT "THE FILE 'VECTOR.SRC' WILL BE OPENED AND PRINTED ON THE SCREEN."
5685 PLOT 3,0,15:PRINT "A SECOND FILE, 'TEMP.COP' WILL BE OPENED AND EVERY SECOND LINE"
5690 PLOT 3,0,19:PRINT "OF 'VECTOR.SRC' WILL BE SAVED."
5695 PLOT 3,0,23:PRINT "AS AGILIS & SEQFIL  OCCUPY THE SAME MEMORY SPACE (AT LEAST THE"
5700 PLOT 3,0,27:PRINT "CURRENT VERSIONS DO), SOME EDITING MAY HAVE TO BE DONE USING"
5705 PLOT 3,0,31:PRINT "FREDI. ":T= 3:GOSUB 3100:PRINT ""
5710 PLOT 6,2,12,15,29,3,31,0:PRINT "-12-"
5715 PLOT 3,0,1:PRINT "SEQFIL.PRG"
5720 PLOT 3,0,5:PRINT "GOSUB 3400      CREATE FILE PARAMETER BLOCK AND BUFFER."
5725 PLOT 3,5,7:PRINT "TWO SMALL ARRAYS (3 ELEMENTS) HAS BEEN DEFINED TO"
5730 PLOT 3,0,8:PRINT "ACCOMMODATE THREE (3) FILE NAMES FIL$(1<>3), ONE REUSABLE BUFFER"
5735 PLOT 3,0,9:PRINT "BU$(0) AND THREE FILE FPB'S BU$(1<>3)"
5740 PLOT 3,0,11:PRINT "A CALL TO 3400 CREATES BU$(0) AS A STRING OF 255 SPACES. THIS"
5745 PLOT 3,1,13:PRINT "":GOSUB 3400:PRINT "FILE BUFFERS CREATED."
5750 PLOT 3,0,14:PRINT "STRING MUST NEVER BE ALTERED. IT IS USED FOR COPYING ONLY."
5755 PLOT 3,0,19:PRINT "GOSUB 3420      OPEN A FILE FOR INPUT."
5760 PLOT 3,8,21:PRINT "THE CALL VALUE FOR AN OPEN INPUT IS 0."
5765 PLOT 3,0,23:PRINT "FIL=1:FIL$(FIL)='VECTOR':GOSUB 3420"
5770 PLOT 3,1,24:PRINT "":FIL= 1:FIL$(FIL)= "VECTOR":GOSUB 3420:PRINT "FILE "FI$(FI)" OPENED."
5775 PLOT 3,1,30:PRINT "":GOSUB 3000:PRINT ""
5780 PLOT 6,2,12,15,29,3,31,0:PRINT "-13-"
5785 PLOT 3,0,1:PRINT "SEQFIL.PRG"
5790 PLOT 3,0,5:PRINT "GOSUB 3440      OPEN A FILE FOR OUTPUT."
5795 PLOT 3,0,7:PRINT "FIL=2:FIL$(FIL)='TEMP.COP':GOSUB 3440"
5800 PLOT 3,1,9:PRINT "":FIL= 2:FIL$(FIL)= "TEMP.COP":GOSUB 3440:PRINT "OUTPUT FILE OPEN."
5805 PLOT 3,0,13:PRINT "NOW CREATE A SIMPLE WHILE NOT END OF FILE (12)"
5810 PLOT 3,3,15:PRINT "GET TWO RECORDS"
5815 PLOT 3,5,17:PRINT "PRINT THEM"
5820 PLOT 3,3,19:PRINT "SAVE THE SECOND RECORD IN TEMP.COP"
5825 PLOT 3,1,21:PRINT "IF END OF FILE"
5830 PLOT 3,3,23:PRINT "CLOSE THE FILES"
5840 PRINT CHR$ (27);CHR$ (11);
5845 FIL= 1:GOSUB 3430:PRINT  T$:FIL= 1:GOSUB 3430:PRINT T$:IF  X= 12 THEN PRINT "END OF FILE": GOTO  5855
5850 FIL= 2:GOSUB 3450:GOTO  5845
5855 FIL= 2:GOSUB  3460
5858 FIL= 1:FIL$(FIL)= "TEMP.COP":GOSUB 3420:PRINT "FILE "FI$(FI)" OPENED."
5860 FIL= 1:GOSUB 3430:PRINT T$:IF  X= 12 THEN PRINT "END OF FILE": GOTO  5863
5862 GOTO  5860
5863 PRINT  CHR$ (27);CHR$ (24)
5864 GOSUB 3000
5865 PLOT 6,2,12,15,29,3,31,0:PRINT "-14-"
5870 PLOT 3,0,1:PRINT "SEQFIL.PRG"
5875 PLOT 3,0,5:PRINT "NOW CREATE A SIMPLE WHILE NOT END OF FILE (12)"
5880 PLOT 3,3,7:PRINT "GET TWO RECORDS"
5885 PLOT 3,5,9:PRINT "PRINT THEM"
5890 PLOT 3,3,11:PRINT "SAVE THE SECOND RECORD IN TEMP.COP"
5895 PLOT 3,1,13:PRINT "IF END OF FILE"
5900 PLOT 3,3,15:PRINT "CLOSE THE FILES"
5905 PLOT 3,1,17:PRINT "'CHR$(27);CHR$(11);'";SPC( 20);"SET ROLL MODE"
5910 PLOT 3,1,19:PRINT "':FOR I=1 TO 1000:IF X=12 THEN I=1001:?'CHECK FOR EOF"
5915 PLOT 3,1,21:PRINT "':FIL=1:GOSUB 3430:?T$:GOSUB 3430:?T$;' GET TWO RECORDS & PRINT"
5920 PLOT 3,1,23:PRINT "':FIL=2:GOSUB 3450:NEXT I:?'";SPC( 12);"FILE IT (T$)"
5925 PLOT 3,1,25:PRINT "':FIL=2:GOSUB 3460:?CHR$(27);CHR$(24)'  CLOSE FILES"
5930 PLOT 3,2,27:PRINT "' : GOSUB 3000:?'"
5935 PLOT 3,1,31:PRINT "":GOSUB 3000:PRINT ""
5940 PLOT 6,2,12,15,29,3,31,0:PRINT "-15-"
5945 PLOT 3,8,9:PRINT "THIS CONCLUDES THE DEMONSTRATION PROGRAMME FOR"
5950 PLOT 3,21,13:PRINT "WATALS.BAS/ANALIZ.PRG"
5955 PLOT 3,16,17:PRINT "PLEASE ADDRESS ALL COMMENTS TO:"
5960 PLOT 3,21,19:PRINT "CARL HENNIG"
5965 PLOT 3,21,20:PRINT "ARTS LANGUAGE LABORATORY"
5970 PLOT 3,21,21:PRINT "UNIVERSITY OF WATERLOO"
5975 PLOT 3,21,23:PRINT "WATERLOO, ONTARIO N2L 3G1"
5980 PLOT 3,21,25:PRINT "CANADA"
5985 PLOT 3,14,29:PRINT "THANK YOU FOR PURCHASING WATALS/ANALIZ."
5990 PLOT 6,0,8