Home » CEEFAX disks » telesoftware16.adl » 08-07-89/T\Capt
08-07-89/T\Capt
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » CEEFAX disks » telesoftware16.adl |
Filename: | 08-07-89/T\Capt |
Read OK: | ✔ |
File size: | 2ABD bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
DUDLEY COLLEGE OF TECHNOLOGY COMPUTER CAPTIONS FOR VIDEOS Some time and money can be saved by using a computer connected to a video recorder to record captions or messages rather than adhesive lettering in front of a camera. Using a computer program can also make synchronisation with music particularly simple: the operator can listen to the chosen music and press a key on the appropriate beat, causing either a number of lines to reveal or the page to change. The program in listing 1 is well suited to this use. Starting with a blank screen, lines of data are revealed whenever the space-bar is pressed. Looking at how the data is stored reveals at line 500 the number of complete pages in the sequence, which is read and used at lines 40 and 50. The following lines of data are read at line 80. Variables X and Y represent the horizontal and vertical position at which the lines of text stored in the variable words$ will be printed. If Pause$ is "Y" then the display will pause until the space-bar is pressed; if Pause$ is "N" then the next line of that page will be printed. If Double$ is "Y" then that line will be printed at double height. 10 MODE 7 20 VDU23;11,0;0;0;0 30 PROCspace 40 READ P 50 FOR page=1 TO P 60 CLS 70 REPEAT 80 READ X,Y,words$,Pause$,Double$ 90 IF X=90 THEN 120 100 IF Double$="Y" THEN PROCDBL(X,Y,words$) ELSE PRINTTAB(X,Y);words$ 110 IF Pause$="Y" THEN PROCspace 120 UNTIL X=90 130 PROCspace 140 NEXT page 150 CLS:PROCspace:VDU23;11,255;0;0;0 160 END 200 DEFPROCspace:*FX15,0 210 REPEAT UNTIL GET=32:ENDPROC 250 DEFPROCDBL(X,Y,words$) 260 PRINTTAB(X,Y)CHR$141;words$ 270 PRINTTAB(X,Y+1)CHR$141;words$ 280 ENDPROC 500 DATA 1:REM no. of pages 505 DATA 4,4,"Dudley College of Technology ",Y,Y 510 DATA 15,7,"presents",Y,N 515 DATA 14,10,"CAPTIONS ",N,Y 520 DATA 6,14,"A program that generates a",N,N 525 DATA 12,15,"second program.",N,N 530 DATA 9,18,"David King DCT 1983",N,N 535 DATA 90,0,"End",N,N 590 REM DK DCT caption program 595 REM generator <C> dk 1983 Listing 1 DCT DATABASE Video Captions Page 1 What does take time with a program like this is calculating the values of X and Y for each line. This normally entails breaking into the program several times to alter the values. One way round this is to have a program that works out the values for you. Below are two procedures that quickly make these calculations. Later we will fit the programs into a master program which, after evaluating your inputs, creates and records a new program onto cassette or disc. The generated program will be the same as listing 1, but with your own data recorded. The cursor control keys with their clearly marked arrows are the obvious ones to use for positioning text on the screen, but they do not normally give a code when pressed that is recognisable to a BASIC program waiting for an input. The inclusion of the command *FX 4,1 in the program will make the cursor keys give ASCII numbers: 138 for down, 139 for up. 390 DEFPROCpos_curs 400 X=4:Y=10:GOTO450 410 key_pressed=GET 420 IFkey_pressed=138THENY=Y+1:IFY>24THEN Y=24:VDU7 430 IFkey_pressed=139THEN Y=Y-1:IFY<1THEN Y=1:VDU7 440 IFkey_pressed=13 THEN460 450 PRINTTAB(X,Y);:GOTO410 460 X(line)=X:Y(line)=Y 470 ENDPROC Listing 2 The procedure in listing 2 starts by positioning the cursor at TAB(4,10), where we can see it clearly. Pressing the arrows for up and down either adds to or subtracts from the value of Y. If you try to go off-screen, the computer makes a noise (VDU 7). The computer ignores other pressed keys, except the <RETURN> key (ASCII value 13) which terminates the procedure. 490 DEFPROCline(max) 500 PRINTTAB(0,0)" ";:PRINTSTRING$(38," ") 510 PRINTTAB(0,0)"Words then RETURN":len=0 520 *FX15,0 530 key_pressed=GET 540 IFkey_pressed=13 THEN630 550 IF len>=max AND key_pressed<>127 THEN VDU7:GOTO520 560 IF key_pressed=127 THEN words$(line)=LEFT$(words$(line),len-1):GOTO580 570 words$(line)=words$(line)+CHR$(key_pressed) 580 len=LEN(words$(line)) 590 PRINTTAB(0,Y(line))" ";:PRINTSTRING$(39," ") 600 : 610 X(line)=(max DIV2)-(len DIV2):IFDouble$(line)="Y"THENPROCDBL(X(line),Y(line),words$(lin e)) ELSE PRINTTAB(X(line),Y(line));words$(line) 620 GOTO530 630 PRINTTAB(0,0)" Delay (Y/N) ";:PRINTSTRING$(20," ") 640 key_pressed$=GET$ 650 IFkey_pressed$<>"Y"AND key_pressed$<>"N"THEN640 660 Pause$(line)=key_pressed$ 670 ENDPROC Listing 3 DCT DATABASE Video Captions Page 2 Now the vertical position (variable Y) is finalised: the second procedure (listing 3) calculates the value of X. All users have to do is type in whatever they want to see displayed. The procedure automatically prints the line in the centre of the screen, producing the rather entertaining effect of words growing out from the middle of the line as you type. The variable line indicates the number of the text line being created. The variable max at line 490 should contain the maximum number of letters per line: this is 39 in mode 7 and 19 in mode 5. Although we are dealing with text, line 530 produces the ASCII number of the key pressed rather than a string. This is so that the procedure can detect the return key (13) or delete key (127) being pressed. Line 560 copes with stripping words$ of the last character when the DELETE key has been pressed. When appropriate, line 570 adds a character to words$. The line of text being processed is kept in the centre of the screen by lines 580 and 610. We now have two procedures for positioning text: the end of the second procedure sets the reveal delay variable Pause$ for the line. In the second part of these notes, we look at PROCsaver, how it creates and records the display program, and provide a listing of the whole of the master program. * * * * * * * * * * * * * * * COMPUTER CAPTIONS FOR VIDEOS: PART TWO Apart from one or two short procedures to aid the presentation and flow of the program, the main procedure is PROCsaver, which is defined at lines 960-1410. Programs are normally saved in a shortened form, with BASIC commands stored as reduced tokens. The *SPOOL command on the BBC Micro and Acorn Electron causes whatever next appears on the screen to be saved onto cassette as ASCII characters. This means that if you RUN the program in listing 4, line 20 activates the SPOOL command and what is printed on the screen by line 30 is stored for prosperity on tape or disc as an ASCII file. Line 40 finishes the facility. IN14 10 REM SPOOL Demo dk 20 *SPOOL "Demo1" 30 PRINT"Dudley College of Technology" 40 *SPOOL 50 END Listing 4 If we engage the SPOOL command and then print a syntactically correct program onto the screen, that newly created program is saved. Again the program is saved as an ASCII file, so it cannot be re-loaded at this stage with the LOAD or CHAIN commands. Listing 5 shows how variables can be passed into the ASCII program. When the program has run and the ASCII file has been recorded, type NEW (or the programs will merge!), then load the file by typing *EXEC"Demo2" + <RETURN> key. Ignore error messages and RUN the program. The program can now DCT DATABASE Video Captions Page 3 be LISTed, SAVEd, LOADed and RUN as any BASIC program. 10 REM second demo DK 20 INPUT"What is your name",Name$ 30 *SPOOL "Demo2" 40 PRINT"10 MODE 7" 50 PRINT"20 FOR colour = 129 TO 137" 60 PRINT"30 P.'CHR$(colour);"; 70 PRINTCHR$34;Name$;" is a fine person.";CHR$34 80 PRINT"40 NEXT colour" 90 PRINT"50 END" 100 *SPOOL 110 END Listing 5 In line 80, PRINT CHR$34 has to be used to make quotation marks appear on the screen. The program uses easy variable names to aid typing. It will probably save time if you define the red keys to print them. e.g. *KEY2 key_press The principle behind listing 5, where we make a complete listing appear on-screen then record it, is extended in PROCsaver. Lines 1010-1220 print the main body of the generated program onto the screen. Lines 1230-1290 display your data within the new program. USING THE PROGRAM The program contains brief but helpful instructions, and operates as follows: 1. Position cursor to calculate vertical position. 2. Select double or single height for characters. 3. Type in line of text. 4. Do you want a reveal delay after this line of text? 5. Do you want the next page, same page or to exit this stage of the program? 6. Save the generated program onto cassette or disc. If you have the 1.2 OS ROM fitted, you can insert Teletext colour codes into the text by pressing SHIFT and a red key. However, you will get the clearest pictures if you use white lettering on black, using the "video out" socket on the computer connected to "video in" on the video recorder. David King, Dudley College of Technology, The Broadway, DUDLEY, West Midlands, DY1 4AS. PRESTEL COMPATABLE VIEWDATA telephone DUDLEY (0384) 239944 Terminal & viewdata 300-300 and 1200-75 baud telephone DUDLEY (0384) 238073 Speech telephone DUDLEY (0384) 455433 ext 272 DCT DATABASE Video Captions Page 4
00000000 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 00000010 20 20 20 20 20 20 20 20 20 44 55 44 4c 45 59 20 | DUDLEY | 00000020 43 4f 4c 4c 45 47 45 20 4f 46 20 54 45 43 48 4e |COLLEGE OF TECHN| 00000030 4f 4c 4f 47 59 0d 0d 20 20 20 20 20 20 20 20 20 |OLOGY.. | 00000040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 | C| 00000050 4f 4d 50 55 54 45 52 20 43 41 50 54 49 4f 4e 53 |OMPUTER CAPTIONS| 00000060 20 46 4f 52 20 56 49 44 45 4f 53 0d 0d 0d 0d 20 | FOR VIDEOS.... | 00000070 20 20 20 20 20 20 20 20 20 53 6f 6d 65 20 74 69 | Some ti| 00000080 6d 65 20 61 6e 64 20 6d 6f 6e 65 79 20 63 61 6e |me and money can| 00000090 20 62 65 20 73 61 76 65 64 20 62 79 20 75 73 69 | be saved by usi| 000000a0 6e 67 20 61 20 63 6f 6d 70 75 74 65 72 20 63 6f |ng a computer co| 000000b0 6e 6e 65 63 74 65 64 20 74 6f 20 61 0d 76 69 64 |nnected to a.vid| 000000c0 65 6f 20 20 72 65 63 6f 72 64 65 72 20 74 6f 20 |eo recorder to | 000000d0 72 65 63 6f 72 64 20 63 61 70 74 69 6f 6e 73 20 |record captions | 000000e0 6f 72 20 6d 65 73 73 61 67 65 73 20 72 61 74 68 |or messages rath| 000000f0 65 72 20 74 68 61 6e 20 61 64 68 65 73 69 76 65 |er than adhesive| 00000100 20 6c 65 74 74 65 72 69 6e 67 0d 69 6e 20 66 72 | lettering.in fr| 00000110 6f 6e 74 20 6f 66 20 61 20 63 61 6d 65 72 61 2e |ont of a camera.| 00000120 20 55 73 69 6e 67 20 61 20 63 6f 6d 70 75 74 65 | Using a compute| 00000130 72 20 70 72 6f 67 72 61 6d 20 63 61 6e 20 61 6c |r program can al| 00000140 73 6f 20 6d 61 6b 65 20 20 73 79 6e 63 68 72 6f |so make synchro| 00000150 6e 69 73 61 74 69 6f 6e 0d 77 69 74 68 20 20 6d |nisation.with m| 00000160 75 73 69 63 20 20 70 61 72 74 69 63 75 6c 61 72 |usic particular| 00000170 6c 79 20 73 69 6d 70 6c 65 3a 20 74 68 65 20 6f |ly simple: the o| 00000180 70 65 72 61 74 6f 72 20 63 61 6e 20 6c 69 73 74 |perator can list| 00000190 65 6e 20 74 6f 20 74 68 65 20 63 68 6f 73 65 6e |en to the chosen| 000001a0 20 6d 75 73 69 63 0d 61 6e 64 20 70 72 65 73 73 | music.and press| 000001b0 20 61 20 6b 65 79 20 6f 6e 20 74 68 65 20 61 70 | a key on the ap| 000001c0 70 72 6f 70 72 69 61 74 65 20 62 65 61 74 2c 20 |propriate beat, | 000001d0 63 61 75 73 69 6e 67 20 65 69 74 68 65 72 20 61 |causing either a| 000001e0 20 6e 75 6d 62 65 72 20 6f 66 20 6c 69 6e 65 73 | number of lines| 000001f0 20 20 74 6f 0d 72 65 76 65 61 6c 20 6f 72 20 74 | to.reveal or t| 00000200 68 65 20 70 61 67 65 20 74 6f 20 63 68 61 6e 67 |he page to chang| 00000210 65 2e 0d 0d 20 20 20 20 20 20 20 20 20 20 54 68 |e... Th| 00000220 65 20 20 70 72 6f 67 72 61 6d 20 69 6e 20 6c 69 |e program in li| 00000230 73 74 69 6e 67 20 31 20 69 73 20 77 65 6c 6c 20 |sting 1 is well | 00000240 73 75 69 74 65 64 20 74 6f 20 74 68 69 73 20 75 |suited to this u| 00000250 73 65 2e 20 53 74 61 72 74 69 6e 67 20 77 69 74 |se. Starting wit| 00000260 68 0d 61 20 62 6c 61 6e 6b 20 73 63 72 65 65 6e |h.a blank screen| 00000270 2c 20 6c 69 6e 65 73 20 6f 66 20 64 61 74 61 20 |, lines of data | 00000280 61 72 65 20 72 65 76 65 61 6c 65 64 20 77 68 65 |are revealed whe| 00000290 6e 65 76 65 72 20 74 68 65 20 73 70 61 63 65 2d |never the space-| 000002a0 62 61 72 20 69 73 20 70 72 65 73 73 65 64 2e 0d |bar is pressed..| 000002b0 4c 6f 6f 6b 69 6e 67 20 61 74 20 68 6f 77 20 74 |Looking at how t| 000002c0 68 65 20 64 61 74 61 20 69 73 20 73 74 6f 72 65 |he data is store| 000002d0 64 20 72 65 76 65 61 6c 73 20 61 74 20 6c 69 6e |d reveals at lin| 000002e0 65 20 35 30 30 20 74 68 65 20 6e 75 6d 62 65 72 |e 500 the number| 000002f0 20 6f 66 20 20 63 6f 6d 70 6c 65 74 65 0d 70 61 | of complete.pa| 00000300 67 65 73 20 20 69 6e 20 20 74 68 65 20 20 73 65 |ges in the se| 00000310 71 75 65 6e 63 65 2c 20 20 77 68 69 63 68 20 20 |quence, which | 00000320 69 73 20 20 72 65 61 64 20 20 61 6e 64 20 20 75 |is read and u| 00000330 73 65 64 20 61 74 20 6c 69 6e 65 73 20 34 30 20 |sed at lines 40 | 00000340 61 6e 64 20 35 30 2e 20 54 68 65 0d 66 6f 6c 6c |and 50. The.foll| 00000350 6f 77 69 6e 67 20 6c 69 6e 65 73 20 6f 66 20 64 |owing lines of d| 00000360 61 74 61 20 61 72 65 20 72 65 61 64 20 61 74 20 |ata are read at | 00000370 6c 69 6e 65 20 38 30 2e 20 56 61 72 69 61 62 6c |line 80. Variabl| 00000380 65 73 20 58 20 61 6e 64 20 59 20 72 65 70 72 65 |es X and Y repre| 00000390 73 65 6e 74 20 20 74 68 65 0d 68 6f 72 69 7a 6f |sent the.horizo| 000003a0 6e 74 61 6c 20 20 61 6e 64 20 20 76 65 72 74 69 |ntal and verti| 000003b0 63 61 6c 20 20 70 6f 73 69 74 69 6f 6e 20 20 61 |cal position a| 000003c0 74 20 77 68 69 63 68 20 74 68 65 20 6c 69 6e 65 |t which the line| 000003d0 73 20 6f 66 20 74 65 78 74 20 73 74 6f 72 65 64 |s of text stored| 000003e0 20 69 6e 20 74 68 65 0d 76 61 72 69 61 62 6c 65 | in the.variable| 000003f0 20 77 6f 72 64 73 24 20 77 69 6c 6c 20 62 65 20 | words$ will be | 00000400 70 72 69 6e 74 65 64 2e 20 49 66 20 50 61 75 73 |printed. If Paus| 00000410 65 24 20 69 73 20 22 59 22 20 74 68 65 6e 20 74 |e$ is "Y" then t| 00000420 68 65 20 64 69 73 70 6c 61 79 20 77 69 6c 6c 20 |he display will | 00000430 70 61 75 73 65 0d 75 6e 74 69 6c 20 74 68 65 20 |pause.until the | 00000440 73 70 61 63 65 2d 62 61 72 20 69 73 20 70 72 65 |space-bar is pre| 00000450 73 73 65 64 3b 20 69 66 20 50 61 75 73 65 24 20 |ssed; if Pause$ | 00000460 69 73 20 22 4e 22 20 74 68 65 6e 20 74 68 65 20 |is "N" then the | 00000470 6e 65 78 74 20 6c 69 6e 65 20 20 6f 66 20 20 74 |next line of t| 00000480 68 61 74 0d 70 61 67 65 20 20 77 69 6c 6c 20 20 |hat.page will | 00000490 62 65 20 20 70 72 69 6e 74 65 64 2e 20 20 49 66 |be printed. If| 000004a0 20 44 6f 75 62 6c 65 24 20 69 73 20 22 59 22 20 | Double$ is "Y" | 000004b0 74 68 65 6e 20 74 68 61 74 20 6c 69 6e 65 20 77 |then that line w| 000004c0 69 6c 6c 20 62 65 20 70 72 69 6e 74 65 64 20 61 |ill be printed a| 000004d0 74 0d 64 6f 75 62 6c 65 20 68 65 69 67 68 74 2e |t.double height.| 000004e0 0d 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |.. | 000004f0 20 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | . | 00000500 20 31 30 20 4d 4f 44 45 20 37 0d 20 20 20 20 20 | 10 MODE 7. | 00000510 20 20 20 20 20 20 20 20 20 20 32 30 20 56 44 55 | 20 VDU| 00000520 32 33 3b 31 31 2c 30 3b 30 3b 30 3b 30 0d 20 20 |23;11,0;0;0;0. | 00000530 20 20 20 20 20 20 20 20 20 20 20 20 20 33 30 20 | 30 | 00000540 50 52 4f 43 73 70 61 63 65 0d 20 20 20 20 20 20 |PROCspace. | 00000550 20 20 20 20 20 20 20 20 20 34 30 20 52 45 41 44 | 40 READ| 00000560 20 50 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 | P. | 00000570 20 20 35 30 20 46 4f 52 20 70 61 67 65 3d 31 20 | 50 FOR page=1 | 00000580 54 4f 20 50 0d 20 20 20 20 20 20 20 20 20 20 20 |TO P. | 00000590 20 20 20 20 36 30 20 43 4c 53 0d 20 20 20 20 20 | 60 CLS. | 000005a0 20 20 20 20 20 20 20 20 20 20 37 30 20 52 45 50 | 70 REP| 000005b0 45 41 54 0d 20 20 20 20 20 20 20 20 20 20 20 20 |EAT. | 000005c0 20 20 20 38 30 20 52 45 41 44 20 58 2c 59 2c 77 | 80 READ X,Y,w| 000005d0 6f 72 64 73 24 2c 50 61 75 73 65 24 2c 44 6f 75 |ords$,Pause$,Dou| 000005e0 62 6c 65 24 0d 20 20 20 20 20 20 20 20 20 20 20 |ble$. | 000005f0 20 20 20 20 39 30 20 49 46 20 58 3d 39 30 20 54 | 90 IF X=90 T| 00000600 48 45 4e 20 31 32 30 0d 20 20 20 20 20 20 20 20 |HEN 120. | 00000610 20 20 20 20 20 20 31 30 30 20 49 46 20 44 6f 75 | 100 IF Dou| 00000620 62 6c 65 24 3d 22 59 22 20 54 48 45 4e 20 50 52 |ble$="Y" THEN PR| 00000630 4f 43 44 42 4c 28 58 2c 59 2c 77 6f 72 64 73 24 |OCDBL(X,Y,words$| 00000640 29 20 45 4c 53 45 0d 20 20 20 20 20 20 20 20 20 |) ELSE. | 00000650 20 20 20 20 20 50 52 49 4e 54 54 41 42 28 58 2c | PRINTTAB(X,| 00000660 59 29 3b 77 6f 72 64 73 24 0d 20 20 20 20 20 20 |Y);words$. | 00000670 20 20 20 20 20 20 20 20 31 31 30 20 49 46 20 50 | 110 IF P| 00000680 61 75 73 65 24 3d 22 59 22 20 54 48 45 4e 20 50 |ause$="Y" THEN P| 00000690 52 4f 43 73 70 61 63 65 0d 20 20 20 20 20 20 20 |ROCspace. | 000006a0 20 20 20 20 20 20 20 31 32 30 20 55 4e 54 49 4c | 120 UNTIL| 000006b0 20 58 3d 39 30 0d 20 20 20 20 20 20 20 20 20 20 | X=90. | 000006c0 20 20 20 20 31 33 30 20 50 52 4f 43 73 70 61 63 | 130 PROCspac| 000006d0 65 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |e. | 000006e0 31 34 30 20 4e 45 58 54 20 70 61 67 65 0d 20 20 |140 NEXT page. | 000006f0 20 20 20 20 20 20 20 20 20 20 20 20 31 35 30 20 | 150 | 00000700 43 4c 53 3a 50 52 4f 43 73 70 61 63 65 3a 56 44 |CLS:PROCspace:VD| 00000710 55 32 33 3b 31 31 2c 32 35 35 3b 30 3b 30 3b 30 |U23;11,255;0;0;0| 00000720 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 31 |. 1| 00000730 36 30 20 45 4e 44 0d 20 20 20 20 20 20 20 20 20 |60 END. | 00000740 20 20 20 20 20 32 30 30 20 44 45 46 50 52 4f 43 | 200 DEFPROC| 00000750 73 70 61 63 65 3a 2a 46 58 31 35 2c 30 0d 20 20 |space:*FX15,0. | 00000760 20 20 20 20 20 20 20 20 20 20 20 20 32 31 30 20 | 210 | 00000770 52 45 50 45 41 54 20 55 4e 54 49 4c 20 47 45 54 |REPEAT UNTIL GET| 00000780 3d 33 32 3a 45 4e 44 50 52 4f 43 0d 20 20 20 20 |=32:ENDPROC. | 00000790 20 20 20 20 20 20 20 20 20 20 32 35 30 20 44 45 | 250 DE| 000007a0 46 50 52 4f 43 44 42 4c 28 58 2c 59 2c 77 6f 72 |FPROCDBL(X,Y,wor| 000007b0 64 73 24 29 0d 20 20 20 20 20 20 20 20 20 20 20 |ds$). | 000007c0 20 20 20 32 36 30 20 50 52 49 4e 54 54 41 42 28 | 260 PRINTTAB(| 000007d0 58 2c 59 29 43 48 52 24 31 34 31 3b 77 6f 72 64 |X,Y)CHR$141;word| 000007e0 73 24 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 |s$. | 000007f0 20 32 37 30 20 50 52 49 4e 54 54 41 42 28 58 2c | 270 PRINTTAB(X,| 00000800 59 2b 31 29 43 48 52 24 31 34 31 3b 77 6f 72 64 |Y+1)CHR$141;word| 00000810 73 24 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 |s$. | 00000820 20 32 38 30 20 45 4e 44 50 52 4f 43 0d 20 20 20 | 280 ENDPROC. | 00000830 20 20 20 20 20 20 20 20 20 20 20 35 30 30 20 44 | 500 D| 00000840 41 54 41 20 31 3a 52 45 4d 20 6e 6f 2e 20 6f 66 |ATA 1:REM no. of| 00000850 20 70 61 67 65 73 0d 20 20 20 20 20 20 20 20 20 | pages. | 00000860 20 20 20 20 20 35 30 35 20 44 41 54 41 20 34 2c | 505 DATA 4,| 00000870 34 2c 22 44 75 64 6c 65 79 20 43 6f 6c 6c 65 67 |4,"Dudley Colleg| 00000880 65 20 6f 66 20 54 65 63 68 6e 6f 6c 6f 67 79 20 |e of Technology | 00000890 20 22 2c 59 2c 59 0d 20 20 20 20 20 20 20 20 20 | ",Y,Y. | 000008a0 20 20 20 20 20 35 31 30 20 44 41 54 41 20 31 35 | 510 DATA 15| 000008b0 2c 37 2c 22 70 72 65 73 65 6e 74 73 22 2c 59 2c |,7,"presents",Y,| 000008c0 4e 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |N. | 000008d0 35 31 35 20 44 41 54 41 20 31 34 2c 31 30 2c 22 |515 DATA 14,10,"| 000008e0 43 41 50 54 49 4f 4e 53 20 20 22 2c 4e 2c 59 0d |CAPTIONS ",N,Y.| 000008f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 35 32 | 52| 00000900 30 20 44 41 54 41 20 36 2c 31 34 2c 22 41 20 70 |0 DATA 6,14,"A p| 00000910 72 6f 67 72 61 6d 20 74 68 61 74 20 67 65 6e 65 |rogram that gene| 00000920 72 61 74 65 73 20 61 22 2c 4e 2c 4e 0d 20 20 20 |rates a",N,N. | 00000930 20 20 20 20 20 20 20 20 20 20 20 35 32 35 20 44 | 525 D| 00000940 41 54 41 20 31 32 2c 31 35 2c 22 73 65 63 6f 6e |ATA 12,15,"secon| 00000950 64 20 70 72 6f 67 72 61 6d 2e 22 2c 4e 2c 4e 0d |d program.",N,N.| 00000960 20 20 20 20 20 20 20 20 20 20 20 20 20 20 35 33 | 53| 00000970 30 20 44 41 54 41 20 39 2c 31 38 2c 22 44 61 76 |0 DATA 9,18,"Dav| 00000980 69 64 20 4b 69 6e 67 20 44 43 54 20 20 31 39 38 |id King DCT 198| 00000990 33 22 2c 4e 2c 4e 0d 20 20 20 20 20 20 20 20 20 |3",N,N. | 000009a0 20 20 20 20 20 35 33 35 20 44 41 54 41 20 39 30 | 535 DATA 90| 000009b0 2c 30 2c 22 45 6e 64 22 2c 4e 2c 4e 0d 20 20 20 |,0,"End",N,N. | 000009c0 20 20 20 20 20 20 20 20 20 20 20 35 39 30 20 52 | 590 R| 000009d0 45 4d 20 44 4b 20 44 43 54 20 63 61 70 74 69 6f |EM DK DCT captio| 000009e0 6e 20 70 72 6f 67 72 61 6d 0d 20 20 20 20 20 20 |n program. | 000009f0 20 20 20 20 20 20 20 20 35 39 35 20 52 45 4d 20 | 595 REM | 00000a00 67 65 6e 65 72 61 74 6f 72 20 20 3c 43 3e 20 64 |generator <C> d| 00000a10 6b 20 31 39 38 33 0d 0d 20 20 20 20 20 20 20 20 |k 1983.. | 00000a20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000a30 20 20 20 20 20 20 20 20 20 20 4c 69 73 74 69 6e | Listin| 00000a40 67 20 31 0d 0d 0d 0d 20 20 20 20 20 20 20 20 20 |g 1.... | 00000a50 20 20 20 20 20 20 20 20 20 20 20 20 44 43 54 20 | DCT | 00000a60 44 41 54 41 42 41 53 45 20 56 69 64 65 6f 20 43 |DATABASE Video C| 00000a70 61 70 74 69 6f 6e 73 20 20 50 61 67 65 20 31 0d |aptions Page 1.| 00000a80 0d 0d 20 20 20 20 20 20 20 20 20 20 57 68 61 74 |.. What| 00000a90 20 64 6f 65 73 20 74 61 6b 65 20 74 69 6d 65 20 | does take time | 00000aa0 77 69 74 68 20 61 20 70 72 6f 67 72 61 6d 20 6c |with a program l| 00000ab0 69 6b 65 20 20 74 68 69 73 20 20 69 73 20 20 63 |ike this is c| 00000ac0 61 6c 63 75 6c 61 74 69 6e 67 20 20 74 68 65 0d |alculating the.| 00000ad0 76 61 6c 75 65 73 20 20 6f 66 20 20 58 20 20 61 |values of X a| 00000ae0 6e 64 20 20 59 20 20 66 6f 72 20 65 61 63 68 20 |nd Y for each | 00000af0 6c 69 6e 65 2e 20 54 68 69 73 20 6e 6f 72 6d 61 |line. This norma| 00000b00 6c 6c 79 20 65 6e 74 61 69 6c 73 20 62 72 65 61 |lly entails brea| 00000b10 6b 69 6e 67 20 69 6e 74 6f 20 74 68 65 0d 70 72 |king into the.pr| 00000b20 6f 67 72 61 6d 20 73 65 76 65 72 61 6c 20 74 69 |ogram several ti| 00000b30 6d 65 73 20 74 6f 20 61 6c 74 65 72 20 74 68 65 |mes to alter the| 00000b40 20 76 61 6c 75 65 73 2e 20 4f 6e 65 20 77 61 79 | values. One way| 00000b50 20 72 6f 75 6e 64 20 74 68 69 73 20 69 73 20 20 | round this is | 00000b60 74 6f 20 20 68 61 76 65 20 20 61 0d 70 72 6f 67 |to have a.prog| 00000b70 72 61 6d 20 20 74 68 61 74 20 20 77 6f 72 6b 73 |ram that works| 00000b80 20 20 6f 75 74 20 20 74 68 65 20 20 76 61 6c 75 | out the valu| 00000b90 65 73 20 66 6f 72 20 79 6f 75 2e 20 42 65 6c 6f |es for you. Belo| 00000ba0 77 20 61 72 65 20 74 77 6f 20 70 72 6f 63 65 64 |w are two proced| 00000bb0 75 72 65 73 20 74 68 61 74 0d 71 75 69 63 6b 6c |ures that.quickl| 00000bc0 79 20 6d 61 6b 65 20 74 68 65 73 65 20 63 61 6c |y make these cal| 00000bd0 63 75 6c 61 74 69 6f 6e 73 2e 20 4c 61 74 65 72 |culations. Later| 00000be0 20 77 65 20 77 69 6c 6c 20 66 69 74 20 74 68 65 | we will fit the| 00000bf0 20 70 72 6f 67 72 61 6d 73 20 69 6e 74 6f 20 61 | programs into a| 00000c00 20 6d 61 73 74 65 72 0d 70 72 6f 67 72 61 6d 20 | master.program | 00000c10 77 68 69 63 68 2c 20 61 66 74 65 72 20 65 76 61 |which, after eva| 00000c20 6c 75 61 74 69 6e 67 20 20 79 6f 75 72 20 20 69 |luating your i| 00000c30 6e 70 75 74 73 2c 20 20 63 72 65 61 74 65 73 20 |nputs, creates | 00000c40 20 61 6e 64 20 20 72 65 63 6f 72 64 73 20 20 61 | and records a| 00000c50 20 20 6e 65 77 0d 70 72 6f 67 72 61 6d 20 20 6f | new.program o| 00000c60 6e 74 6f 20 20 63 61 73 73 65 74 74 65 20 20 6f |nto cassette o| 00000c70 72 20 20 64 69 73 63 2e 20 20 54 68 65 20 67 65 |r disc. The ge| 00000c80 6e 65 72 61 74 65 64 20 70 72 6f 67 72 61 6d 20 |nerated program | 00000c90 77 69 6c 6c 20 62 65 20 74 68 65 20 73 61 6d 65 |will be the same| 00000ca0 20 61 73 0d 6c 69 73 74 69 6e 67 20 31 2c 20 62 | as.listing 1, b| 00000cb0 75 74 20 77 69 74 68 20 79 6f 75 72 20 6f 77 6e |ut with your own| 00000cc0 20 64 61 74 61 20 72 65 63 6f 72 64 65 64 2e 0d | data recorded..| 00000cd0 0d 20 20 20 20 20 20 20 20 20 20 54 68 65 20 63 |. The c| 00000ce0 75 72 73 6f 72 20 63 6f 6e 74 72 6f 6c 20 6b 65 |ursor control ke| 00000cf0 79 73 20 77 69 74 68 20 74 68 65 69 72 20 63 6c |ys with their cl| 00000d00 65 61 72 6c 79 20 6d 61 72 6b 65 64 20 20 61 72 |early marked ar| 00000d10 72 6f 77 73 20 20 61 72 65 20 20 74 68 65 0d 6f |rows are the.o| 00000d20 62 76 69 6f 75 73 20 20 6f 6e 65 73 20 20 74 6f |bvious ones to| 00000d30 20 20 75 73 65 20 20 66 6f 72 20 20 70 6f 73 69 | use for posi| 00000d40 74 69 6f 6e 69 6e 67 20 20 74 65 78 74 20 6f 6e |tioning text on| 00000d50 20 74 68 65 20 73 63 72 65 65 6e 2c 20 62 75 74 | the screen, but| 00000d60 20 74 68 65 79 20 64 6f 20 6e 6f 74 0d 6e 6f 72 | they do not.nor| 00000d70 6d 61 6c 6c 79 20 67 69 76 65 20 61 20 63 6f 64 |mally give a cod| 00000d80 65 20 77 68 65 6e 20 70 72 65 73 73 65 64 20 74 |e when pressed t| 00000d90 68 61 74 20 69 73 20 72 65 63 6f 67 6e 69 73 61 |hat is recognisa| 00000da0 62 6c 65 20 20 74 6f 20 20 61 20 20 42 41 53 49 |ble to a BASI| 00000db0 43 20 20 70 72 6f 67 72 61 6d 0d 77 61 69 74 69 |C program.waiti| 00000dc0 6e 67 20 20 66 6f 72 20 20 61 6e 20 20 69 6e 70 |ng for an inp| 00000dd0 75 74 2e 20 20 54 68 65 20 69 6e 63 6c 75 73 69 |ut. The inclusi| 00000de0 6f 6e 20 6f 66 20 74 68 65 20 63 6f 6d 6d 61 6e |on of the comman| 00000df0 64 20 2a 46 58 20 34 2c 31 20 69 6e 20 74 68 65 |d *FX 4,1 in the| 00000e00 20 70 72 6f 67 72 61 6d 0d 77 69 6c 6c 20 6d 61 | program.will ma| 00000e10 6b 65 20 74 68 65 20 63 75 72 73 6f 72 20 6b 65 |ke the cursor ke| 00000e20 79 73 20 67 69 76 65 20 41 53 43 49 49 20 6e 75 |ys give ASCII nu| 00000e30 6d 62 65 72 73 3a 20 31 33 38 20 66 6f 72 20 64 |mbers: 138 for d| 00000e40 6f 77 6e 2c 20 31 33 39 20 66 6f 72 20 75 70 2e |own, 139 for up.| 00000e50 0d 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |.. | 00000e60 20 20 33 39 30 20 44 45 46 50 52 4f 43 70 6f 73 | 390 DEFPROCpos| 00000e70 5f 63 75 72 73 0d 20 20 20 20 20 20 20 20 20 20 |_curs. | 00000e80 20 20 20 20 20 20 34 30 30 20 58 3d 34 3a 59 3d | 400 X=4:Y=| 00000e90 31 30 3a 47 4f 54 4f 34 35 30 0d 20 20 20 20 20 |10:GOTO450. | 00000ea0 20 20 20 20 20 20 20 20 20 20 20 34 31 30 20 6b | 410 k| 00000eb0 65 79 5f 70 72 65 73 73 65 64 3d 47 45 54 0d 20 |ey_pressed=GET. | 00000ec0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 34 | 4| 00000ed0 32 30 20 49 46 6b 65 79 5f 70 72 65 73 73 65 64 |20 IFkey_pressed| 00000ee0 3d 31 33 38 54 48 45 4e 59 3d 59 2b 31 3a 49 46 |=138THENY=Y+1:IF| 00000ef0 59 3e 32 34 54 48 45 4e 20 59 3d 32 34 3a 56 44 |Y>24THEN Y=24:VD| 00000f00 55 37 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 |U7. | 00000f10 20 20 20 34 33 30 20 49 46 6b 65 79 5f 70 72 65 | 430 IFkey_pre| 00000f20 73 73 65 64 3d 31 33 39 54 48 45 4e 20 59 3d 59 |ssed=139THEN Y=Y| 00000f30 2d 31 3a 49 46 59 3c 31 54 48 45 4e 20 59 3d 31 |-1:IFY<1THEN Y=1| 00000f40 3a 56 44 55 37 0d 20 20 20 20 20 20 20 20 20 20 |:VDU7. | 00000f50 20 20 20 20 20 20 34 34 30 20 49 46 6b 65 79 5f | 440 IFkey_| 00000f60 70 72 65 73 73 65 64 3d 31 33 20 54 48 45 4e 34 |pressed=13 THEN4| 00000f70 36 30 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 |60. | 00000f80 20 20 20 34 35 30 20 50 52 49 4e 54 54 41 42 28 | 450 PRINTTAB(| 00000f90 58 2c 59 29 3b 3a 47 4f 54 4f 34 31 30 0d 20 20 |X,Y);:GOTO410. | 00000fa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 34 36 | 46| 00000fb0 30 20 58 28 6c 69 6e 65 29 3d 58 3a 59 28 6c 69 |0 X(line)=X:Y(li| 00000fc0 6e 65 29 3d 59 0d 20 20 20 20 20 20 20 20 20 20 |ne)=Y. | 00000fd0 20 20 20 20 20 20 34 37 30 20 45 4e 44 50 52 4f | 470 ENDPRO| 00000fe0 43 0d 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 |C.. | 00000ff0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001000 20 20 20 20 20 4c 69 73 74 69 6e 67 20 32 0d 0d | Listing 2..| 00001010 0d 20 20 20 20 20 20 20 20 20 20 54 68 65 20 70 |. The p| 00001020 72 6f 63 65 64 75 72 65 20 69 6e 20 6c 69 73 74 |rocedure in list| 00001030 69 6e 67 20 32 20 73 74 61 72 74 73 20 20 62 79 |ing 2 starts by| 00001040 20 20 70 6f 73 69 74 69 6f 6e 69 6e 67 20 20 74 | positioning t| 00001050 68 65 20 20 63 75 72 73 6f 72 20 20 61 74 0d 54 |he cursor at.T| 00001060 41 42 28 34 2c 31 30 29 2c 20 20 77 68 65 72 65 |AB(4,10), where| 00001070 20 20 77 65 20 63 61 6e 20 73 65 65 20 69 74 20 | we can see it | 00001080 63 6c 65 61 72 6c 79 2e 20 50 72 65 73 73 69 6e |clearly. Pressin| 00001090 67 20 74 68 65 20 61 72 72 6f 77 73 20 66 6f 72 |g the arrows for| 000010a0 20 75 70 20 61 6e 64 20 64 6f 77 6e 0d 65 69 74 | up and down.eit| 000010b0 68 65 72 20 61 64 64 73 20 74 6f 20 6f 72 20 73 |her adds to or s| 000010c0 75 62 74 72 61 63 74 73 20 66 72 6f 6d 20 74 68 |ubtracts from th| 000010d0 65 20 76 61 6c 75 65 20 6f 66 20 59 2e 20 49 66 |e value of Y. If| 000010e0 20 79 6f 75 20 74 72 79 20 74 6f 20 67 6f 20 6f | you try to go o| 000010f0 66 66 2d 73 63 72 65 65 6e 2c 0d 74 68 65 20 63 |ff-screen,.the c| 00001100 6f 6d 70 75 74 65 72 20 6d 61 6b 65 73 20 61 20 |omputer makes a | 00001110 6e 6f 69 73 65 20 28 56 44 55 20 37 29 2e 20 54 |noise (VDU 7). T| 00001120 68 65 20 63 6f 6d 70 75 74 65 72 20 69 67 6e 6f |he computer igno| 00001130 72 65 73 20 6f 74 68 65 72 20 70 72 65 73 73 65 |res other presse| 00001140 64 20 20 6b 65 79 73 2c 0d 65 78 63 65 70 74 20 |d keys,.except | 00001150 74 68 65 20 3c 52 45 54 55 52 4e 3e 20 6b 65 79 |the <RETURN> key| 00001160 20 28 41 53 43 49 49 20 76 61 6c 75 65 20 31 33 | (ASCII value 13| 00001170 29 20 77 68 69 63 68 20 74 65 72 6d 69 6e 61 74 |) which terminat| 00001180 65 73 20 74 68 65 20 70 72 6f 63 65 64 75 72 65 |es the procedure| 00001190 2e 0d 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 |... | 000011a0 20 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | . | 000011b0 20 20 34 39 30 20 44 45 46 50 52 4f 43 6c 69 6e | 490 DEFPROClin| 000011c0 65 28 6d 61 78 29 0d 20 20 20 20 20 20 20 20 20 |e(max). | 000011d0 20 20 20 20 20 20 20 35 30 30 20 50 52 49 4e 54 | 500 PRINT| 000011e0 54 41 42 28 30 2c 30 29 22 20 22 3b 3a 50 52 49 |TAB(0,0)" ";:PRI| 000011f0 4e 54 53 54 52 49 4e 47 24 28 33 38 2c 22 20 22 |NTSTRING$(38," "| 00001200 29 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |). | 00001210 20 20 35 31 30 20 50 52 49 4e 54 54 41 42 28 30 | 510 PRINTTAB(0| 00001220 2c 30 29 22 57 6f 72 64 73 20 74 68 65 6e 20 52 |,0)"Words then R| 00001230 45 54 55 52 4e 22 3a 6c 65 6e 3d 30 0d 20 20 20 |ETURN":len=0. | 00001240 20 20 20 20 20 20 20 20 20 20 20 20 20 35 32 30 | 520| 00001250 20 2a 46 58 31 35 2c 30 0d 20 20 20 20 20 20 20 | *FX15,0. | 00001260 20 20 20 20 20 20 20 20 20 35 33 30 20 6b 65 79 | 530 key| 00001270 5f 70 72 65 73 73 65 64 3d 47 45 54 0d 20 20 20 |_pressed=GET. | 00001280 20 20 20 20 20 20 20 20 20 20 20 20 20 35 34 30 | 540| 00001290 20 49 46 6b 65 79 5f 70 72 65 73 73 65 64 3d 31 | IFkey_pressed=1| 000012a0 33 20 54 48 45 4e 36 33 30 0d 20 20 20 20 20 20 |3 THEN630. | 000012b0 20 20 20 20 20 20 20 20 20 20 35 35 30 20 49 46 | 550 IF| 000012c0 20 6c 65 6e 3e 3d 6d 61 78 20 41 4e 44 20 6b 65 | len>=max AND ke| 000012d0 79 5f 70 72 65 73 73 65 64 3c 3e 31 32 37 20 54 |y_pressed<>127 T| 000012e0 48 45 4e 20 56 44 55 37 3a 47 4f 54 4f 35 32 30 |HEN VDU7:GOTO520| 000012f0 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 00001300 20 35 36 30 20 49 46 20 6b 65 79 5f 70 72 65 73 | 560 IF key_pres| 00001310 73 65 64 3d 31 32 37 20 54 48 45 4e 0d 20 20 20 |sed=127 THEN. | 00001320 20 20 20 20 20 20 20 20 20 20 20 77 6f 72 64 73 | words| 00001330 24 28 6c 69 6e 65 29 3d 4c 45 46 54 24 28 77 6f |$(line)=LEFT$(wo| 00001340 72 64 73 24 28 6c 69 6e 65 29 2c 6c 65 6e 2d 31 |rds$(line),len-1| 00001350 29 3a 47 4f 54 4f 35 38 30 0d 20 20 20 20 20 20 |):GOTO580. | 00001360 20 20 20 20 20 20 20 20 20 20 35 37 30 20 77 6f | 570 wo| 00001370 72 64 73 24 28 6c 69 6e 65 29 3d 77 6f 72 64 73 |rds$(line)=words| 00001380 24 28 6c 69 6e 65 29 2b 43 48 52 24 28 6b 65 79 |$(line)+CHR$(key| 00001390 5f 70 72 65 73 73 65 64 29 0d 20 20 20 20 20 20 |_pressed). | 000013a0 20 20 20 20 20 20 20 20 20 20 35 38 30 20 6c 65 | 580 le| 000013b0 6e 3d 4c 45 4e 28 77 6f 72 64 73 24 28 6c 69 6e |n=LEN(words$(lin| 000013c0 65 29 29 0d 20 20 20 20 20 20 20 20 20 20 20 20 |e)). | 000013d0 20 20 20 20 35 39 30 20 50 52 49 4e 54 54 41 42 | 590 PRINTTAB| 000013e0 28 30 2c 59 28 6c 69 6e 65 29 29 22 20 22 3b 3a |(0,Y(line))" ";:| 000013f0 50 52 49 4e 54 53 54 52 49 4e 47 24 28 33 39 2c |PRINTSTRING$(39,| 00001400 22 20 22 29 0d 20 20 20 20 20 20 20 20 20 20 20 |" "). | 00001410 20 20 20 20 20 36 30 30 20 3a 0d 20 20 20 20 20 | 600 :. | 00001420 20 20 20 20 20 20 20 20 20 20 20 36 31 30 20 58 | 610 X| 00001430 28 6c 69 6e 65 29 3d 28 6d 61 78 20 44 49 56 32 |(line)=(max DIV2| 00001440 29 2d 28 6c 65 6e 0d 20 20 20 20 20 20 20 20 20 |)-(len. | 00001450 20 20 20 20 20 44 49 56 32 29 3a 49 46 44 6f 75 | DIV2):IFDou| 00001460 62 6c 65 24 28 6c 69 6e 65 29 3d 22 59 22 54 48 |ble$(line)="Y"TH| 00001470 45 4e 50 52 4f 43 44 42 4c 28 58 28 6c 69 6e 65 |ENPROCDBL(X(line| 00001480 29 2c 59 28 6c 69 6e 65 29 2c 77 6f 72 64 73 24 |),Y(line),words$| 00001490 28 6c 69 6e 0d 20 20 20 20 20 20 20 20 20 20 20 |(lin. | 000014a0 20 20 20 65 29 29 0d 20 20 20 20 20 20 20 20 20 | e)). | 000014b0 20 20 20 20 20 45 4c 53 45 20 50 52 49 4e 54 54 | ELSE PRINTT| 000014c0 41 42 28 58 28 6c 69 6e 65 29 2c 59 28 6c 69 6e |AB(X(line),Y(lin| 000014d0 65 29 29 3b 77 6f 72 64 73 24 28 6c 69 6e 65 29 |e));words$(line)| 000014e0 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 000014f0 20 36 32 30 20 47 4f 54 4f 35 33 30 0d 20 20 20 | 620 GOTO530. | 00001500 20 20 20 20 20 20 20 20 20 20 20 20 20 36 33 30 | 630| 00001510 20 50 52 49 4e 54 54 41 42 28 30 2c 30 29 22 20 | PRINTTAB(0,0)" | 00001520 20 44 65 6c 61 79 20 28 59 2f 4e 29 20 20 20 20 | Delay (Y/N) | 00001530 20 22 3b 3a 50 52 49 4e 54 53 54 52 49 4e 47 24 | ";:PRINTSTRING$| 00001540 28 32 30 2c 22 20 22 29 0d 20 20 20 20 20 20 20 |(20," "). | 00001550 20 20 20 20 20 20 20 20 20 36 34 30 20 6b 65 79 | 640 key| 00001560 5f 70 72 65 73 73 65 64 24 3d 47 45 54 24 0d 20 |_pressed$=GET$. | 00001570 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 36 | 6| 00001580 35 30 20 49 46 6b 65 79 5f 70 72 65 73 73 65 64 |50 IFkey_pressed| 00001590 24 3c 3e 22 59 22 41 4e 44 20 6b 65 79 5f 70 72 |$<>"Y"AND key_pr| 000015a0 65 73 73 65 64 24 3c 3e 22 4e 22 54 48 45 4e 36 |essed$<>"N"THEN6| 000015b0 34 30 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 |40. | 000015c0 20 20 20 36 36 30 20 50 61 75 73 65 24 28 6c 69 | 660 Pause$(li| 000015d0 6e 65 29 3d 6b 65 79 5f 70 72 65 73 73 65 64 24 |ne)=key_pressed$| 000015e0 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 000015f0 20 36 37 30 20 45 4e 44 50 52 4f 43 0d 0d 20 20 | 670 ENDPROC.. | 00001600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00001620 4c 69 73 74 69 6e 67 20 33 0d 0d 0d 20 20 20 20 |Listing 3... | 00001630 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001640 20 44 43 54 20 44 41 54 41 42 41 53 45 20 56 69 | DCT DATABASE Vi| 00001650 64 65 6f 20 43 61 70 74 69 6f 6e 73 20 20 50 61 |deo Captions Pa| 00001660 67 65 20 32 0d 0d 0d 0d 20 20 20 20 20 20 20 20 |ge 2.... | 00001670 20 20 4e 6f 77 20 20 74 68 65 20 20 76 65 72 74 | Now the vert| 00001680 69 63 61 6c 20 20 70 6f 73 69 74 69 6f 6e 20 20 |ical position | 00001690 28 76 61 72 69 61 62 6c 65 20 59 29 20 69 73 20 |(variable Y) is | 000016a0 66 69 6e 61 6c 69 73 65 64 3a 20 74 68 65 20 73 |finalised: the s| 000016b0 65 63 6f 6e 64 0d 70 72 6f 63 65 64 75 72 65 20 |econd.procedure | 000016c0 28 6c 69 73 74 69 6e 67 20 33 29 20 63 61 6c 63 |(listing 3) calc| 000016d0 75 6c 61 74 65 73 20 74 68 65 20 76 61 6c 75 65 |ulates the value| 000016e0 20 6f 66 20 58 2e 20 41 6c 6c 20 75 73 65 72 73 | of X. All users| 000016f0 20 68 61 76 65 20 74 6f 20 64 6f 20 69 73 20 74 | have to do is t| 00001700 79 70 65 0d 69 6e 20 77 68 61 74 65 76 65 72 20 |ype.in whatever | 00001710 74 68 65 79 20 77 61 6e 74 20 74 6f 20 73 65 65 |they want to see| 00001720 20 64 69 73 70 6c 61 79 65 64 2e 20 54 68 65 20 | displayed. The | 00001730 20 70 72 6f 63 65 64 75 72 65 20 20 61 75 74 6f | procedure auto| 00001740 6d 61 74 69 63 61 6c 6c 79 20 20 70 72 69 6e 74 |matically print| 00001750 73 0d 74 68 65 20 20 6c 69 6e 65 20 20 69 6e 20 |s.the line in | 00001760 20 74 68 65 20 20 63 65 6e 74 72 65 20 20 6f 66 | the centre of| 00001770 20 20 74 68 65 20 73 63 72 65 65 6e 2c 20 70 72 | the screen, pr| 00001780 6f 64 75 63 69 6e 67 20 74 68 65 20 72 61 74 68 |oducing the rath| 00001790 65 72 20 65 6e 74 65 72 74 61 69 6e 69 6e 67 0d |er entertaining.| 000017a0 65 66 66 65 63 74 20 6f 66 20 77 6f 72 64 73 20 |effect of words | 000017b0 67 72 6f 77 69 6e 67 20 6f 75 74 20 66 72 6f 6d |growing out from| 000017c0 20 74 68 65 20 6d 69 64 64 6c 65 20 6f 66 20 74 | the middle of t| 000017d0 68 65 20 20 6c 69 6e 65 20 20 61 73 20 20 79 6f |he line as yo| 000017e0 75 20 20 74 79 70 65 2e 20 20 54 68 65 0d 76 61 |u type. The.va| 000017f0 72 69 61 62 6c 65 20 6c 69 6e 65 20 69 6e 64 69 |riable line indi| 00001800 63 61 74 65 73 20 74 68 65 20 6e 75 6d 62 65 72 |cates the number| 00001810 20 6f 66 20 74 68 65 20 74 65 78 74 20 6c 69 6e | of the text lin| 00001820 65 20 62 65 69 6e 67 20 63 72 65 61 74 65 64 2e |e being created.| 00001830 0d 0d 20 20 20 20 20 20 20 20 20 20 54 68 65 20 |.. The | 00001840 20 76 61 72 69 61 62 6c 65 20 20 6d 61 78 20 61 | variable max a| 00001850 74 20 6c 69 6e 65 20 34 39 30 20 73 68 6f 75 6c |t line 490 shoul| 00001860 64 20 63 6f 6e 74 61 69 6e 20 74 68 65 20 6d 61 |d contain the ma| 00001870 78 69 6d 75 6d 20 6e 75 6d 62 65 72 20 6f 66 0d |ximum number of.| 00001880 6c 65 74 74 65 72 73 20 70 65 72 20 6c 69 6e 65 |letters per line| 00001890 3a 20 74 68 69 73 20 69 73 20 33 39 20 69 6e 20 |: this is 39 in | 000018a0 6d 6f 64 65 20 37 20 61 6e 64 20 31 39 20 69 6e |mode 7 and 19 in| 000018b0 20 20 6d 6f 64 65 20 20 35 2e 20 20 41 6c 74 68 | mode 5. Alth| 000018c0 6f 75 67 68 20 20 77 65 20 20 61 72 65 0d 64 65 |ough we are.de| 000018d0 61 6c 69 6e 67 20 20 77 69 74 68 20 20 74 65 78 |aling with tex| 000018e0 74 2c 20 20 6c 69 6e 65 20 20 35 33 30 20 20 70 |t, line 530 p| 000018f0 72 6f 64 75 63 65 73 20 74 68 65 20 41 53 43 49 |roduces the ASCI| 00001900 49 20 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 |I number of the | 00001910 6b 65 79 20 70 72 65 73 73 65 64 0d 72 61 74 68 |key pressed.rath| 00001920 65 72 20 74 68 61 6e 20 61 20 73 74 72 69 6e 67 |er than a string| 00001930 2e 20 54 68 69 73 20 69 73 20 73 6f 20 74 68 61 |. This is so tha| 00001940 74 20 74 68 65 20 70 72 6f 63 65 64 75 72 65 20 |t the procedure | 00001950 63 61 6e 20 64 65 74 65 63 74 20 74 68 65 20 72 |can detect the r| 00001960 65 74 75 72 6e 20 6b 65 79 0d 28 31 33 29 20 6f |eturn key.(13) o| 00001970 72 20 64 65 6c 65 74 65 20 6b 65 79 20 28 31 32 |r delete key (12| 00001980 37 29 20 62 65 69 6e 67 20 70 72 65 73 73 65 64 |7) being pressed| 00001990 2e 0d 0d 20 20 20 20 20 20 20 20 20 20 4c 69 6e |... Lin| 000019a0 65 20 35 36 30 20 63 6f 70 65 73 20 77 69 74 68 |e 560 copes with| 000019b0 20 73 74 72 69 70 70 69 6e 67 20 77 6f 72 64 73 | stripping words| 000019c0 24 20 6f 66 20 74 68 65 20 6c 61 73 74 20 63 68 |$ of the last ch| 000019d0 61 72 61 63 74 65 72 20 77 68 65 6e 20 74 68 65 |aracter when the| 000019e0 0d 44 45 4c 45 54 45 20 6b 65 79 20 68 61 73 20 |.DELETE key has | 000019f0 62 65 65 6e 20 70 72 65 73 73 65 64 2e 20 57 68 |been pressed. Wh| 00001a00 65 6e 20 61 70 70 72 6f 70 72 69 61 74 65 2c 20 |en appropriate, | 00001a10 6c 69 6e 65 20 35 37 30 20 61 64 64 73 20 61 20 |line 570 adds a | 00001a20 20 63 68 61 72 61 63 74 65 72 20 20 74 6f 0d 77 | character to.w| 00001a30 6f 72 64 73 24 2e 20 20 54 68 65 20 6c 69 6e 65 |ords$. The line| 00001a40 20 6f 66 20 74 65 78 74 20 62 65 69 6e 67 20 70 | of text being p| 00001a50 72 6f 63 65 73 73 65 64 20 69 73 20 6b 65 70 74 |rocessed is kept| 00001a60 20 69 6e 20 74 68 65 20 63 65 6e 74 72 65 20 6f | in the centre o| 00001a70 66 20 74 68 65 20 73 63 72 65 65 6e 0d 62 79 20 |f the screen.by | 00001a80 6c 69 6e 65 73 20 35 38 30 20 61 6e 64 20 36 31 |lines 580 and 61| 00001a90 30 2e 0d 0d 20 20 20 20 20 20 20 20 20 20 57 65 |0... We| 00001aa0 20 6e 6f 77 20 68 61 76 65 20 74 77 6f 20 70 72 | now have two pr| 00001ab0 6f 63 65 64 75 72 65 73 20 66 6f 72 20 70 6f 73 |ocedures for pos| 00001ac0 69 74 69 6f 6e 69 6e 67 20 74 65 78 74 3a 20 20 |itioning text: | 00001ad0 74 68 65 20 20 65 6e 64 20 20 6f 66 20 20 74 68 |the end of th| 00001ae0 65 0d 73 65 63 6f 6e 64 20 20 70 72 6f 63 65 64 |e.second proced| 00001af0 75 72 65 20 20 73 65 74 73 20 74 68 65 20 72 65 |ure sets the re| 00001b00 76 65 61 6c 20 64 65 6c 61 79 20 76 61 72 69 61 |veal delay varia| 00001b10 62 6c 65 20 50 61 75 73 65 24 20 66 6f 72 20 74 |ble Pause$ for t| 00001b20 68 65 20 6c 69 6e 65 2e 20 49 6e 20 74 68 65 0d |he line. In the.| 00001b30 73 65 63 6f 6e 64 20 70 61 72 74 20 6f 66 20 74 |second part of t| 00001b40 68 65 73 65 20 6e 6f 74 65 73 2c 20 77 65 20 6c |hese notes, we l| 00001b50 6f 6f 6b 20 61 74 20 50 52 4f 43 73 61 76 65 72 |ook at PROCsaver| 00001b60 2c 20 68 6f 77 20 69 74 20 63 72 65 61 74 65 73 |, how it creates| 00001b70 20 61 6e 64 20 20 72 65 63 6f 72 64 73 0d 74 68 | and records.th| 00001b80 65 20 20 64 69 73 70 6c 61 79 20 20 70 72 6f 67 |e display prog| 00001b90 72 61 6d 2c 20 20 61 6e 64 20 20 70 72 6f 76 69 |ram, and provi| 00001ba0 64 65 20 20 61 20 20 6c 69 73 74 69 6e 67 20 20 |de a listing | 00001bb0 6f 66 20 20 74 68 65 20 77 68 6f 6c 65 20 6f 66 |of the whole of| 00001bc0 20 74 68 65 20 6d 61 73 74 65 72 0d 70 72 6f 67 | the master.prog| 00001bd0 72 61 6d 2e 0d 0d 20 20 20 20 20 20 20 20 20 20 |ram... | 00001be0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 20 | * | 00001bf0 2a 20 2a 20 2a 20 2a 20 2a 20 2a 20 2a 20 2a 20 |* * * * * * * * | 00001c00 2a 20 2a 20 2a 20 2a 20 2a 20 2a 20 0d 0d 20 20 |* * * * * * .. | 00001c10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001c20 20 43 4f 4d 50 55 54 45 52 20 43 41 50 54 49 4f | COMPUTER CAPTIO| 00001c30 4e 53 20 46 4f 52 20 56 49 44 45 4f 53 3a 20 50 |NS FOR VIDEOS: P| 00001c40 41 52 54 20 54 57 4f 0d 0d 20 20 20 20 20 20 20 |ART TWO.. | 00001c50 20 20 20 41 70 61 72 74 20 66 72 6f 6d 20 6f 6e | Apart from on| 00001c60 65 20 6f 72 20 74 77 6f 20 73 68 6f 72 74 20 70 |e or two short p| 00001c70 72 6f 63 65 64 75 72 65 73 20 74 6f 20 61 69 64 |rocedures to aid| 00001c80 20 74 68 65 20 70 72 65 73 65 6e 74 61 74 69 6f | the presentatio| 00001c90 6e 20 20 61 6e 64 0d 66 6c 6f 77 20 20 6f 66 20 |n and.flow of | 00001ca0 20 74 68 65 20 20 70 72 6f 67 72 61 6d 2c 20 20 | the program, | 00001cb0 74 68 65 20 6d 61 69 6e 20 70 72 6f 63 65 64 75 |the main procedu| 00001cc0 72 65 20 69 73 20 50 52 4f 43 73 61 76 65 72 2c |re is PROCsaver,| 00001cd0 20 77 68 69 63 68 20 69 73 20 64 65 66 69 6e 65 | which is define| 00001ce0 64 20 61 74 0d 6c 69 6e 65 73 20 39 36 30 2d 31 |d at.lines 960-1| 00001cf0 34 31 30 2e 0d 0d 20 20 20 20 20 20 20 20 20 20 |410... | 00001d00 50 72 6f 67 72 61 6d 73 20 61 72 65 20 20 6e 6f |Programs are no| 00001d10 72 6d 61 6c 6c 79 20 20 73 61 76 65 64 20 20 69 |rmally saved i| 00001d20 6e 20 20 61 20 20 73 68 6f 72 74 65 6e 65 64 20 |n a shortened | 00001d30 20 66 6f 72 6d 2c 20 20 77 69 74 68 20 20 42 41 | form, with BA| 00001d40 53 49 43 0d 63 6f 6d 6d 61 6e 64 73 20 20 73 74 |SIC.commands st| 00001d50 6f 72 65 64 20 20 61 73 20 20 72 65 64 75 63 65 |ored as reduce| 00001d60 64 20 74 6f 6b 65 6e 73 2e 20 54 68 65 20 2a 53 |d tokens. The *S| 00001d70 50 4f 4f 4c 20 63 6f 6d 6d 61 6e 64 20 6f 6e 20 |POOL command on | 00001d80 74 68 65 20 42 42 43 20 4d 69 63 72 6f 20 61 6e |the BBC Micro an| 00001d90 64 0d 41 63 6f 72 6e 20 45 6c 65 63 74 72 6f 6e |d.Acorn Electron| 00001da0 20 63 61 75 73 65 73 20 77 68 61 74 65 76 65 72 | causes whatever| 00001db0 20 6e 65 78 74 20 61 70 70 65 61 72 73 20 6f 6e | next appears on| 00001dc0 20 74 68 65 20 73 63 72 65 65 6e 20 74 6f 20 20 | the screen to | 00001dd0 62 65 20 20 73 61 76 65 64 20 20 6f 6e 74 6f 0d |be saved onto.| 00001de0 63 61 73 73 65 74 74 65 20 20 61 73 20 20 41 53 |cassette as AS| 00001df0 43 49 49 20 20 63 68 61 72 61 63 74 65 72 73 2e |CII characters.| 00001e00 20 20 54 68 69 73 20 20 6d 65 61 6e 73 20 20 74 | This means t| 00001e10 68 61 74 20 69 66 20 79 6f 75 20 52 55 4e 20 74 |hat if you RUN t| 00001e20 68 65 20 70 72 6f 67 72 61 6d 20 69 6e 0d 6c 69 |he program in.li| 00001e30 73 74 69 6e 67 20 34 2c 20 6c 69 6e 65 20 32 30 |sting 4, line 20| 00001e40 20 61 63 74 69 76 61 74 65 73 20 74 68 65 20 53 | activates the S| 00001e50 50 4f 4f 4c 20 63 6f 6d 6d 61 6e 64 20 61 6e 64 |POOL command and| 00001e60 20 77 68 61 74 20 20 69 73 20 20 70 72 69 6e 74 | what is print| 00001e70 65 64 20 20 6f 6e 20 20 74 68 65 0d 73 63 72 65 |ed on the.scre| 00001e80 65 6e 20 20 62 79 20 6c 69 6e 65 20 33 30 20 69 |en by line 30 i| 00001e90 73 20 73 74 6f 72 65 64 20 66 6f 72 20 70 72 6f |s stored for pro| 00001ea0 73 70 65 72 69 74 79 20 6f 6e 20 74 61 70 65 20 |sperity on tape | 00001eb0 6f 72 20 64 69 73 63 20 61 73 20 61 6e 20 41 53 |or disc as an AS| 00001ec0 43 49 49 20 66 69 6c 65 2e 0d 4c 69 6e 65 20 34 |CII file..Line 4| 00001ed0 30 20 66 69 6e 69 73 68 65 73 20 74 68 65 20 66 |0 finishes the f| 00001ee0 61 63 69 6c 69 74 79 2e 0d 0d 49 4e 31 34 0d 20 |acility...IN14. | 00001ef0 20 20 31 30 20 52 45 4d 20 53 50 4f 4f 4c 20 44 | 10 REM SPOOL D| 00001f00 65 6d 6f 20 64 6b 0d 20 20 20 32 30 20 2a 53 50 |emo dk. 20 *SP| 00001f10 4f 4f 4c 20 22 44 65 6d 6f 31 22 0d 20 20 20 33 |OOL "Demo1". 3| 00001f20 30 20 50 52 49 4e 54 22 44 75 64 6c 65 79 20 43 |0 PRINT"Dudley C| 00001f30 6f 6c 6c 65 67 65 20 6f 66 20 54 65 63 68 6e 6f |ollege of Techno| 00001f40 6c 6f 67 79 22 0d 20 20 20 34 30 20 2a 53 50 4f |logy". 40 *SPO| 00001f50 4f 4c 0d 20 20 20 35 30 20 45 4e 44 0d 0d 20 20 |OL. 50 END.. | 00001f60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00001f80 4c 69 73 74 69 6e 67 20 34 0d 0d 0d 20 20 20 20 |Listing 4... | 00001f90 20 20 20 20 20 20 49 66 20 77 65 20 65 6e 67 61 | If we enga| 00001fa0 67 65 20 74 68 65 20 53 50 4f 4f 4c 20 20 63 6f |ge the SPOOL co| 00001fb0 6d 6d 61 6e 64 20 20 61 6e 64 20 20 74 68 65 6e |mmand and then| 00001fc0 20 20 70 72 69 6e 74 20 20 61 20 20 73 79 6e 74 | print a synt| 00001fd0 61 63 74 69 63 61 6c 6c 79 0d 63 6f 72 72 65 63 |actically.correc| 00001fe0 74 20 20 70 72 6f 67 72 61 6d 20 20 6f 6e 74 6f |t program onto| 00001ff0 20 74 68 65 20 73 63 72 65 65 6e 2c 20 74 68 61 | the screen, tha| 00002000 74 20 6e 65 77 6c 79 20 63 72 65 61 74 65 64 20 |t newly created | 00002010 70 72 6f 67 72 61 6d 20 69 73 20 73 61 76 65 64 |program is saved| 00002020 2e 20 41 67 61 69 6e 0d 74 68 65 20 70 72 6f 67 |. Again.the prog| 00002030 72 61 6d 20 69 73 20 73 61 76 65 64 20 61 73 20 |ram is saved as | 00002040 61 6e 20 41 53 43 49 49 20 66 69 6c 65 2c 20 73 |an ASCII file, s| 00002050 6f 20 69 74 20 20 63 61 6e 6e 6f 74 20 20 62 65 |o it cannot be| 00002060 20 20 72 65 2d 6c 6f 61 64 65 64 20 20 61 74 20 | re-loaded at | 00002070 20 74 68 69 73 0d 73 74 61 67 65 20 77 69 74 68 | this.stage with| 00002080 20 74 68 65 20 4c 4f 41 44 20 6f 72 20 43 48 41 | the LOAD or CHA| 00002090 49 4e 20 63 6f 6d 6d 61 6e 64 73 2e 20 0d 0d 20 |IN commands. .. | 000020a0 20 20 20 20 20 20 20 20 20 4c 69 73 74 69 6e 67 | Listing| 000020b0 20 35 20 73 68 6f 77 73 20 68 6f 77 20 76 61 72 | 5 shows how var| 000020c0 69 61 62 6c 65 73 20 63 61 6e 20 62 65 20 70 61 |iables can be pa| 000020d0 73 73 65 64 20 69 6e 74 6f 20 74 68 65 20 41 53 |ssed into the AS| 000020e0 43 49 49 20 70 72 6f 67 72 61 6d 2e 0d 57 68 65 |CII program..Whe| 000020f0 6e 20 20 74 68 65 20 20 70 72 6f 67 72 61 6d 20 |n the program | 00002100 68 61 73 20 72 75 6e 20 61 6e 64 20 74 68 65 20 |has run and the | 00002110 41 53 43 49 49 20 66 69 6c 65 20 68 61 73 20 62 |ASCII file has b| 00002120 65 65 6e 20 72 65 63 6f 72 64 65 64 2c 20 74 79 |een recorded, ty| 00002130 70 65 20 4e 45 57 20 28 6f 72 0d 74 68 65 20 70 |pe NEW (or.the p| 00002140 72 6f 67 72 61 6d 73 20 77 69 6c 6c 20 6d 65 72 |rograms will mer| 00002150 67 65 21 29 2c 20 74 68 65 6e 20 20 6c 6f 61 64 |ge!), then load| 00002160 20 20 74 68 65 20 20 66 69 6c 65 20 20 62 79 20 | the file by | 00002170 20 74 79 70 69 6e 67 20 20 2a 45 58 45 43 22 44 | typing *EXEC"D| 00002180 65 6d 6f 32 22 20 20 2b 0d 3c 52 45 54 55 52 4e |emo2" +.<RETURN| 00002190 3e 20 20 6b 65 79 2e 20 49 67 6e 6f 72 65 20 65 |> key. Ignore e| 000021a0 72 72 6f 72 20 6d 65 73 73 61 67 65 73 20 61 6e |rror messages an| 000021b0 64 20 52 55 4e 20 74 68 65 20 70 72 6f 67 72 61 |d RUN the progra| 000021c0 6d 2e 20 54 68 65 20 70 72 6f 67 72 61 6d 20 63 |m. The program c| 000021d0 61 6e 20 6e 6f 77 0d 0d 0d 20 20 20 20 20 20 20 |an now... | 000021e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 43 | DC| 000021f0 54 20 44 41 54 41 42 41 53 45 20 56 69 64 65 6f |T DATABASE Video| 00002200 20 43 61 70 74 69 6f 6e 73 20 20 50 61 67 65 20 | Captions Page | 00002210 33 0d 0d 62 65 20 4c 49 53 54 65 64 2c 20 53 41 |3..be LISTed, SA| 00002220 56 45 64 2c 20 4c 4f 41 44 65 64 20 61 6e 64 20 |VEd, LOADed and | 00002230 52 55 4e 20 61 73 20 61 6e 79 20 42 41 53 49 43 |RUN as any BASIC| 00002240 20 70 72 6f 67 72 61 6d 2e 0d 0d 20 20 20 20 20 | program... | 00002250 20 20 20 20 20 20 20 20 20 20 20 20 31 30 20 52 | 10 R| 00002260 45 4d 20 73 65 63 6f 6e 64 20 64 65 6d 6f 20 44 |EM second demo D| 00002270 4b 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |K. | 00002280 20 20 20 32 30 20 49 4e 50 55 54 22 57 68 61 74 | 20 INPUT"What| 00002290 20 69 73 20 79 6f 75 72 20 6e 61 6d 65 22 2c 4e | is your name",N| 000022a0 61 6d 65 24 0d 20 20 20 20 20 20 20 20 20 20 20 |ame$. | 000022b0 20 20 20 20 20 20 33 30 20 2a 53 50 4f 4f 4c 20 | 30 *SPOOL | 000022c0 22 44 65 6d 6f 32 22 0d 20 20 20 20 20 20 20 20 |"Demo2". | 000022d0 20 20 20 20 20 20 20 20 20 34 30 20 50 52 49 4e | 40 PRIN| 000022e0 54 22 31 30 20 4d 4f 44 45 20 37 22 0d 20 20 20 |T"10 MODE 7". | 000022f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 35 30 | 50| 00002300 20 50 52 49 4e 54 22 32 30 20 46 4f 52 20 63 6f | PRINT"20 FOR co| 00002310 6c 6f 75 72 20 3d 20 31 32 39 20 54 4f 20 31 33 |lour = 129 TO 13| 00002320 37 22 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 |7". | 00002330 20 20 20 20 36 30 20 50 52 49 4e 54 22 33 30 20 | 60 PRINT"30 | 00002340 50 2e 27 43 48 52 24 28 63 6f 6c 6f 75 72 29 3b |P.'CHR$(colour);| 00002350 22 3b 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 |";. | 00002360 20 20 20 20 37 30 20 50 52 49 4e 54 43 48 52 24 | 70 PRINTCHR$| 00002370 33 34 3b 4e 61 6d 65 24 3b 22 20 69 73 20 61 20 |34;Name$;" is a | 00002380 66 69 6e 65 20 70 65 72 73 6f 6e 2e 22 3b 43 48 |fine person.";CH| 00002390 52 24 33 34 0d 20 20 20 20 20 20 20 20 20 20 20 |R$34. | 000023a0 20 20 20 20 20 20 38 30 20 50 52 49 4e 54 22 34 | 80 PRINT"4| 000023b0 30 20 4e 45 58 54 20 63 6f 6c 6f 75 72 22 0d 20 |0 NEXT colour". | 000023c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000023d0 39 30 20 50 52 49 4e 54 22 35 30 20 45 4e 44 22 |90 PRINT"50 END"| 000023e0 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 000023f0 20 31 30 30 20 2a 53 50 4f 4f 4c 0d 20 20 20 20 | 100 *SPOOL. | 00002400 20 20 20 20 20 20 20 20 20 20 20 20 31 31 30 20 | 110 | 00002410 45 4e 44 0d 0d 20 20 20 20 20 20 20 20 20 20 20 |END.. | 00002420 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002430 20 20 20 20 20 20 20 4c 69 73 74 69 6e 67 20 35 | Listing 5| 00002440 0d 0d 20 20 20 20 20 20 20 20 20 20 49 6e 20 6c |.. In l| 00002450 69 6e 65 20 38 30 2c 20 50 52 49 4e 54 20 43 48 |ine 80, PRINT CH| 00002460 52 24 33 34 20 68 61 73 20 74 6f 20 62 65 20 75 |R$34 has to be u| 00002470 73 65 64 20 20 74 6f 20 20 6d 61 6b 65 20 20 71 |sed to make q| 00002480 75 6f 74 61 74 69 6f 6e 20 20 6d 61 72 6b 73 0d |uotation marks.| 00002490 61 70 70 65 61 72 20 20 6f 6e 20 74 68 65 20 73 |appear on the s| 000024a0 63 72 65 65 6e 2e 20 54 68 65 20 70 72 6f 67 72 |creen. The progr| 000024b0 61 6d 20 75 73 65 73 20 65 61 73 79 20 76 61 72 |am uses easy var| 000024c0 69 61 62 6c 65 20 6e 61 6d 65 73 20 74 6f 20 61 |iable names to a| 000024d0 69 64 20 74 79 70 69 6e 67 2e 20 49 74 0d 77 69 |id typing. It.wi| 000024e0 6c 6c 20 70 72 6f 62 61 62 6c 79 20 73 61 76 65 |ll probably save| 000024f0 20 74 69 6d 65 20 69 66 20 79 6f 75 20 64 65 66 | time if you def| 00002500 69 6e 65 20 74 68 65 20 72 65 64 20 6b 65 79 73 |ine the red keys| 00002510 20 74 6f 20 70 72 69 6e 74 20 74 68 65 6d 2e 0d | to print them..| 00002520 20 65 2e 67 2e 20 2a 4b 45 59 32 20 6b 65 79 5f | e.g. *KEY2 key_| 00002530 70 72 65 73 73 0d 0d 20 20 20 20 20 20 20 20 20 |press.. | 00002540 20 54 68 65 20 70 72 69 6e 63 69 70 6c 65 20 62 | The principle b| 00002550 65 68 69 6e 64 20 6c 69 73 74 69 6e 67 20 35 2c |ehind listing 5,| 00002560 20 77 68 65 72 65 20 77 65 20 6d 61 6b 65 20 20 | where we make | 00002570 61 20 20 63 6f 6d 70 6c 65 74 65 20 20 6c 69 73 |a complete lis| 00002580 74 69 6e 67 0d 61 70 70 65 61 72 20 20 6f 6e 2d |ting.appear on-| 00002590 73 63 72 65 65 6e 20 20 74 68 65 6e 20 20 72 65 |screen then re| 000025a0 63 6f 72 64 20 69 74 2c 20 69 73 20 65 78 74 65 |cord it, is exte| 000025b0 6e 64 65 64 20 69 6e 20 50 52 4f 43 73 61 76 65 |nded in PROCsave| 000025c0 72 2e 20 4c 69 6e 65 73 20 31 30 31 30 2d 31 32 |r. Lines 1010-12| 000025d0 32 30 0d 70 72 69 6e 74 20 74 68 65 20 6d 61 69 |20.print the mai| 000025e0 6e 20 62 6f 64 79 20 6f 66 20 74 68 65 20 67 65 |n body of the ge| 000025f0 6e 65 72 61 74 65 64 20 70 72 6f 67 72 61 6d 20 |nerated program | 00002600 6f 6e 74 6f 20 74 68 65 20 73 63 72 65 65 6e 2e |onto the screen.| 00002610 20 4c 69 6e 65 73 20 31 32 33 30 2d 31 32 39 30 | Lines 1230-1290| 00002620 0d 64 69 73 70 6c 61 79 20 79 6f 75 72 20 64 61 |.display your da| 00002630 74 61 20 77 69 74 68 69 6e 20 74 68 65 20 6e 65 |ta within the ne| 00002640 77 20 70 72 6f 67 72 61 6d 2e 0d 0d 55 53 49 4e |w program...USIN| 00002650 47 20 54 48 45 20 50 52 4f 47 52 41 4d 0d 0d 54 |G THE PROGRAM..T| 00002660 68 65 20 70 72 6f 67 72 61 6d 20 63 6f 6e 74 61 |he program conta| 00002670 69 6e 73 20 62 72 69 65 66 20 62 75 74 20 68 65 |ins brief but he| 00002680 6c 70 66 75 6c 20 69 6e 73 74 72 75 63 74 69 6f |lpful instructio| 00002690 6e 73 2c 20 61 6e 64 20 6f 70 65 72 61 74 65 73 |ns, and operates| 000026a0 20 61 73 20 66 6f 6c 6c 6f 77 73 3a 0d 20 20 20 | as follows:. | 000026b0 20 20 20 20 20 20 20 31 2e 20 50 6f 73 69 74 69 | 1. Positi| 000026c0 6f 6e 20 63 75 72 73 6f 72 20 74 6f 20 63 61 6c |on cursor to cal| 000026d0 63 75 6c 61 74 65 20 76 65 72 74 69 63 61 6c 20 |culate vertical | 000026e0 70 6f 73 69 74 69 6f 6e 2e 0d 20 20 20 20 20 20 |position.. | 000026f0 20 20 20 20 32 2e 20 53 65 6c 65 63 74 20 64 6f | 2. Select do| 00002700 75 62 6c 65 20 6f 72 20 73 69 6e 67 6c 65 20 68 |uble or single h| 00002710 65 69 67 68 74 20 66 6f 72 20 63 68 61 72 61 63 |eight for charac| 00002720 74 65 72 73 2e 0d 20 20 20 20 20 20 20 20 20 20 |ters.. | 00002730 33 2e 20 54 79 70 65 20 69 6e 20 6c 69 6e 65 20 |3. Type in line | 00002740 6f 66 20 74 65 78 74 2e 0d 20 20 20 20 20 20 20 |of text.. | 00002750 20 20 20 34 2e 20 44 6f 20 79 6f 75 20 77 61 6e | 4. Do you wan| 00002760 74 20 61 20 72 65 76 65 61 6c 20 64 65 6c 61 79 |t a reveal delay| 00002770 20 61 66 74 65 72 20 74 68 69 73 20 6c 69 6e 65 | after this line| 00002780 20 6f 66 20 74 65 78 74 3f 0d 20 20 20 20 20 20 | of text?. | 00002790 20 20 20 20 35 2e 20 44 6f 20 79 6f 75 20 77 61 | 5. Do you wa| 000027a0 6e 74 20 74 68 65 20 6e 65 78 74 20 70 61 67 65 |nt the next page| 000027b0 2c 20 73 61 6d 65 20 70 61 67 65 20 6f 72 20 74 |, same page or t| 000027c0 6f 20 65 78 69 74 20 20 74 68 69 73 20 20 73 74 |o exit this st| 000027d0 61 67 65 20 20 6f 66 0d 20 20 20 20 20 20 20 20 |age of. | 000027e0 20 20 20 20 20 74 68 65 20 70 72 6f 67 72 61 6d | the program| 000027f0 3f 0d 20 20 20 20 20 20 20 20 20 20 36 2e 20 53 |?. 6. S| 00002800 61 76 65 20 74 68 65 20 67 65 6e 65 72 61 74 65 |ave the generate| 00002810 64 20 70 72 6f 67 72 61 6d 20 6f 6e 74 6f 20 63 |d program onto c| 00002820 61 73 73 65 74 74 65 20 6f 72 20 64 69 73 63 2e |assette or disc.| 00002830 0d 0d 20 20 20 20 20 20 20 20 20 20 49 66 20 20 |.. If | 00002840 79 6f 75 20 20 68 61 76 65 20 74 68 65 20 31 2e |you have the 1.| 00002850 32 20 4f 53 20 52 4f 4d 20 66 69 74 74 65 64 2c |2 OS ROM fitted,| 00002860 20 79 6f 75 20 63 61 6e 20 69 6e 73 65 72 74 20 | you can insert | 00002870 54 65 6c 65 74 65 78 74 20 63 6f 6c 6f 75 72 0d |Teletext colour.| 00002880 63 6f 64 65 73 20 69 6e 74 6f 20 74 68 65 20 74 |codes into the t| 00002890 65 78 74 20 62 79 20 70 72 65 73 73 69 6e 67 20 |ext by pressing | 000028a0 53 48 49 46 54 20 61 6e 64 20 61 20 72 65 64 20 |SHIFT and a red | 000028b0 6b 65 79 2e 20 48 6f 77 65 76 65 72 2c 20 20 79 |key. However, y| 000028c0 6f 75 20 20 77 69 6c 6c 20 20 67 65 74 0d 74 68 |ou will get.th| 000028d0 65 20 20 63 6c 65 61 72 65 73 74 20 20 70 69 63 |e clearest pic| 000028e0 74 75 72 65 73 20 69 66 20 79 6f 75 20 75 73 65 |tures if you use| 000028f0 20 77 68 69 74 65 20 6c 65 74 74 65 72 69 6e 67 | white lettering| 00002900 20 6f 6e 20 62 6c 61 63 6b 2c 20 75 73 69 6e 67 | on black, using| 00002910 20 74 68 65 20 22 76 69 64 65 6f 0d 6f 75 74 22 | the "video.out"| 00002920 20 73 6f 63 6b 65 74 20 6f 6e 20 74 68 65 20 63 | socket on the c| 00002930 6f 6d 70 75 74 65 72 20 63 6f 6e 6e 65 63 74 65 |omputer connecte| 00002940 64 20 74 6f 20 22 76 69 64 65 6f 20 69 6e 22 20 |d to "video in" | 00002950 6f 6e 20 74 68 65 20 76 69 64 65 6f 20 72 65 63 |on the video rec| 00002960 6f 72 64 65 72 2e 0d 0d 0d 44 61 76 69 64 20 4b |order....David K| 00002970 69 6e 67 2c 0d 44 75 64 6c 65 79 20 43 6f 6c 6c |ing,.Dudley Coll| 00002980 65 67 65 20 6f 66 20 54 65 63 68 6e 6f 6c 6f 67 |ege of Technolog| 00002990 79 2c 0d 54 68 65 20 42 72 6f 61 64 77 61 79 2c |y,.The Broadway,| 000029a0 0d 44 55 44 4c 45 59 2c 0d 57 65 73 74 20 4d 69 |.DUDLEY,.West Mi| 000029b0 64 6c 61 6e 64 73 2c 0d 44 59 31 20 34 41 53 2e |dlands,.DY1 4AS.| 000029c0 0d 0d 50 52 45 53 54 45 4c 20 43 4f 4d 50 41 54 |..PRESTEL COMPAT| 000029d0 41 42 4c 45 20 56 49 45 57 44 41 54 41 20 20 74 |ABLE VIEWDATA t| 000029e0 65 6c 65 70 68 6f 6e 65 20 44 55 44 4c 45 59 20 |elephone DUDLEY | 000029f0 28 30 33 38 34 29 20 32 33 39 39 34 34 0d 0d 54 |(0384) 239944..T| 00002a00 65 72 6d 69 6e 61 6c 20 26 20 76 69 65 77 64 61 |erminal & viewda| 00002a10 74 61 20 33 30 30 2d 33 30 30 20 61 6e 64 20 31 |ta 300-300 and 1| 00002a20 32 30 30 2d 37 35 20 62 61 75 64 0d 74 65 6c 65 |200-75 baud.tele| 00002a30 70 68 6f 6e 65 20 44 55 44 4c 45 59 20 28 30 33 |phone DUDLEY (03| 00002a40 38 34 29 20 32 33 38 30 37 33 0d 0d 53 70 65 65 |84) 238073..Spee| 00002a50 63 68 20 74 65 6c 65 70 68 6f 6e 65 20 20 44 55 |ch telephone DU| 00002a60 44 4c 45 59 20 28 30 33 38 34 29 20 34 35 35 34 |DLEY (0384) 4554| 00002a70 33 33 20 65 78 74 20 32 37 32 0d 0d 0d 0d 0d 0d |33 ext 272......| 00002a80 0d 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |.. | 00002a90 20 20 20 20 20 20 20 44 43 54 20 44 41 54 41 42 | DCT DATAB| 00002aa0 41 53 45 20 56 69 64 65 6f 20 43 61 70 74 69 6f |ASE Video Captio| 00002ab0 6e 73 20 20 50 61 67 65 20 34 0d 0d 0d |ns Page 4...| 00002abd