Home » CEEFAX disks » telesoftware2.adl » ATS/T\ATS08
ATS/T\ATS08
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 » telesoftware2.adl |
Filename: | ATS/T\ATS08 |
Read OK: | ✔ |
File size: | 1FB9 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
Interactive programming J.J.Brayshaw 1987 Being able to tell whether a received page has been altered since its last broadcast is a useful feature. We can ensure, for example, that any page saved to disc is overwritten by a new version if received, or that all new versions of a page are printed out, etc. ATS08 looks at the transmissions in more detail to find out how to detect an "updated" page ... __________________________________________________________________________ Each teletext page broadcast includes a variety of information intended for the decoder itself. Amongst these details is a flag to show whether the page just received is an altered or "updated" version of its previous transmission. The update bit is either set, to show the page has a different content from the previously broadcast version, or clear to indicate the page has not changed. The idea of the "update" bit is to allow decoders in teletext tv sets to discover whether the page being displayed on screen should be altered. When a page is requested, the first version to arrive is displayed. Provided it has been received correctly, this remains on screen and unaltered until either a different page is requested or the update bit is set. In this way, a decoder can keep a correct version of a page in its page memory, and not risk overwriting this with a subsequently received but possibly corrupted version of the same page. In practice, most teletext tv sets do not check the integrity of the received page, and ignore the CRC. They therefore cannot tell whether the page is correct or not, and tend to grab every version received, in case some lines were missing or some text corrupted. This practice, of course, may result in a good page being replaced by a corrupt page! The update bit is contained in the header row, byte 12. The byte is hamming-coded for protection. When de-hammed, the second bit of the byte is the update flag. The ATS does much of the decoding when the page is transferred to memory. The first few bytes (clock run-in and framing code) are removed, and the appropriate codes de-hammed. Of the bytes transferred into memory, the first two are, as usual, the magazine and row identifiers, followed by page and sub-page number codes. The next two bytes are "control" information, and contain the update bit. We need, therefore, to study the seventh byte of row zero, as transferred by ATS. The update flag is bit one (second bit) of this byte, and we can detect its state with the following algorithm: Page 1 Interactive programming J.J.Brayshaw 1987 IF (byte% AND 2) = 2 THEN flag% = TRUE ELSE flag% = FALSE Static pages, as you would expect, only have the update bit set on the first broadcast, and so it is difficult to find one with this bit set. Rolling pages, however, have this bit set every time a different sub-page is transmitted. The Teletext specifications allow for transmission of only a part of a page. When the update bit is set, the data sent may only be intended to overwrite a part of the previously transmitted page, and thus make minor alterations. In this case, the receiver should not discard the previously received version, but should replace the appropriate packets of the stored page with those received in the "update" page. Any packets not received with the page update transmission should be considered to be unaltered from the last broadcast (and not necessarily considered as strings of 40 spaces as is the case with pages not identified as updates.). In practice, however, it is not normal to transmit only the updated sections of a page. The complete page is usually sent, because it cannot be guaranteed the decoder will have already received a complete page. Unless the decoder has already got the page complete, there will be nothing in memory to update! However, we can identify whether the update page is a part of a previous transmission or a complete page different from the previous version by looking at other information in the control bytes. The "erase-page" flag tells a decoder to erase the currently displayed page before displaying the version just received. If this flag is set, we know the received page is a complete page - it would not make sense to erase a page and then display only the alterations! Similarly, if the "erase-page" flag is clear, the contents of the update page received should simply overlay the page already displayed, and therefore is not a complete page. The update bit can also be used by receivers capable of switching between the normal tv picture or a teletext display. When a page is requested, this may be followed by pressing an "update" button on the keypad. This will cause the set to revert to the broadcast tv picture, yet still search for the requested page. When the page is received, the update bit is interrogated. If set, the page is grabbed and stored in a page memory. If the page contains a "start box" code (character code 11), then the section of the CEEFAX page between this code and a following "end box" code (character 10) will be superimposed on the picture. The "start box" and "end box" codes are meaningless on the BBC micro, as a tv picture display is not possible. However, the codes may still be present within the received page, and will be interpreted as spaces in the display (they are Mode 7 characters 138 and 139). Software can be written to display only the section of a page within a marked box. (I leave this program for you to write!) Remember that if *TRANSFER is used to receive Page 2 Interactive programming J.J.Brayshaw 1987 the page, the box commands are codes 138 and 139, having been translated to BBC Mode7 characters. However, if *DATA is used, the codes will remain as transmitted, with odd parity included, unless your program strips the parity of each byte before processing. (The transmitted codes, including parity, are code 138 - binary 10001010 - for end box, and code 11 - binary 00001011 - for start box.) The Alarm Clock page from CEEFAX (page 196) makes full use of both the update bit and the "box" codes. The update bit is set every minute on the minute. The box codes cause the top section of the page only to be superimposed on the tv signal when the page is selected for update on a teletext tv set. For this to function, two conditions must be met: the sub-page code requested is the same as that of the page transmitted; and the update bit is set. So, if we are to detect complete new versions of a particular page, we must look at both the update flag and the erase-page flag. Only if both are set can we be sure the page is a complete replacement display. The erase-page flag is bit 3 of byte 5 (as transferred to memory by ATS). The routine to read this flag is discussed in the next module. In the meantime, you may like to try and write a BASIC function to read this flag. There is a variety of other information about the page that we can determine from the two control and status bytes in packet zero, which will be explained in the next ATS programming module. __________________________________________________________________________ The program "B/ATS08" will capture the Alarm Clock page each time it is transmitted. You will see that it is broadcast several times a minute, in its correct position within the page number cycle. It is also transmitted each minute on the minute. Note the state of the update bit as each version of the page is received. Try the program with a variety of pages, including rolling sequences. The CRC is checked, and the setting of the update bit is shown on the bottom row after the page has been displayed. The routine required to find the update flag is a simple one, and is given in the program as FNupdate. Other flags within the control bits can be interpreted in a very similar manner, and will be described in the next module. Page 3
00000000 0d 0d 0d 0d 49 6e 74 65 72 61 63 74 69 76 65 20 |....Interactive | 00000010 70 72 6f 67 72 61 6d 6d 69 6e 67 20 20 20 20 20 |programming | 00000020 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000030 20 20 20 20 20 20 20 20 20 20 20 20 20 4a 2e 4a | J.J| 00000040 2e 42 72 61 79 73 68 61 77 20 31 39 38 37 0d 0d |.Brayshaw 1987..| 00000050 0d 0d 0d 42 65 69 6e 67 20 61 62 6c 65 20 74 6f |...Being able to| 00000060 20 74 65 6c 6c 20 77 68 65 74 68 65 72 20 61 20 | tell whether a | 00000070 72 65 63 65 69 76 65 64 20 70 61 67 65 20 68 61 |received page ha| 00000080 73 20 62 65 65 6e 20 61 6c 74 65 72 65 64 20 73 |s been altered s| 00000090 69 6e 63 65 20 69 74 73 20 6c 61 73 74 0d 62 72 |ince its last.br| 000000a0 6f 61 64 63 61 73 74 20 69 73 20 61 20 75 73 65 |oadcast is a use| 000000b0 66 75 6c 20 66 65 61 74 75 72 65 2e 20 57 65 20 |ful feature. We | 000000c0 63 61 6e 20 65 6e 73 75 72 65 2c 20 66 6f 72 20 |can ensure, for | 000000d0 65 78 61 6d 70 6c 65 2c 20 74 68 61 74 20 61 6e |example, that an| 000000e0 79 20 70 61 67 65 0d 73 61 76 65 64 20 74 6f 20 |y page.saved to | 000000f0 64 69 73 63 20 69 73 20 6f 76 65 72 77 72 69 74 |disc is overwrit| 00000100 74 65 6e 20 62 79 20 61 20 6e 65 77 20 76 65 72 |ten by a new ver| 00000110 73 69 6f 6e 20 69 66 20 72 65 63 65 69 76 65 64 |sion if received| 00000120 2c 20 6f 72 20 74 68 61 74 20 61 6c 6c 20 6e 65 |, or that all ne| 00000130 77 0d 76 65 72 73 69 6f 6e 73 20 6f 66 20 61 20 |w.versions of a | 00000140 70 61 67 65 20 61 72 65 20 70 72 69 6e 74 65 64 |page are printed| 00000150 20 6f 75 74 2c 20 65 74 63 2e 0d 0d 41 54 53 30 | out, etc...ATS0| 00000160 38 20 6c 6f 6f 6b 73 20 61 74 20 74 68 65 20 74 |8 looks at the t| 00000170 72 61 6e 73 6d 69 73 73 69 6f 6e 73 20 69 6e 20 |ransmissions in | 00000180 6d 6f 72 65 20 64 65 74 61 69 6c 20 74 6f 20 66 |more detail to f| 00000190 69 6e 64 20 6f 75 74 20 68 6f 77 20 74 6f 20 64 |ind out how to d| 000001a0 65 74 65 63 74 0d 61 6e 20 22 75 70 64 61 74 65 |etect.an "update| 000001b0 64 22 20 70 61 67 65 20 2e 2e 2e 0d 0d 5f 5f 5f |d" page .....___| 000001c0 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f |________________| * 00000200 5f 5f 5f 5f 5f 5f 5f 0d 0d 0d 45 61 63 68 20 74 |_______...Each t| 00000210 65 6c 65 74 65 78 74 20 70 61 67 65 20 62 72 6f |eletext page bro| 00000220 61 64 63 61 73 74 20 69 6e 63 6c 75 64 65 73 20 |adcast includes | 00000230 61 20 76 61 72 69 65 74 79 20 6f 66 20 69 6e 66 |a variety of inf| 00000240 6f 72 6d 61 74 69 6f 6e 20 69 6e 74 65 6e 64 65 |ormation intende| 00000250 64 0d 66 6f 72 20 74 68 65 20 64 65 63 6f 64 65 |d.for the decode| 00000260 72 20 69 74 73 65 6c 66 2e 20 41 6d 6f 6e 67 73 |r itself. Amongs| 00000270 74 20 74 68 65 73 65 20 64 65 74 61 69 6c 73 20 |t these details | 00000280 69 73 20 61 20 66 6c 61 67 20 74 6f 20 73 68 6f |is a flag to sho| 00000290 77 20 77 68 65 74 68 65 72 0d 74 68 65 20 70 61 |w whether.the pa| 000002a0 67 65 20 6a 75 73 74 20 72 65 63 65 69 76 65 64 |ge just received| 000002b0 20 69 73 20 61 6e 20 61 6c 74 65 72 65 64 20 6f | is an altered o| 000002c0 72 20 22 75 70 64 61 74 65 64 22 20 76 65 72 73 |r "updated" vers| 000002d0 69 6f 6e 20 6f 66 20 69 74 73 20 70 72 65 76 69 |ion of its previ| 000002e0 6f 75 73 0d 74 72 61 6e 73 6d 69 73 73 69 6f 6e |ous.transmission| 000002f0 2e 0d 0d 54 68 65 20 75 70 64 61 74 65 20 62 69 |...The update bi| 00000300 74 20 69 73 20 65 69 74 68 65 72 20 73 65 74 2c |t is either set,| 00000310 20 74 6f 20 73 68 6f 77 20 74 68 65 20 70 61 67 | to show the pag| 00000320 65 20 68 61 73 20 61 20 64 69 66 66 65 72 65 6e |e has a differen| 00000330 74 20 63 6f 6e 74 65 6e 74 0d 66 72 6f 6d 20 74 |t content.from t| 00000340 68 65 20 70 72 65 76 69 6f 75 73 6c 79 20 62 72 |he previously br| 00000350 6f 61 64 63 61 73 74 20 76 65 72 73 69 6f 6e 2c |oadcast version,| 00000360 20 6f 72 20 63 6c 65 61 72 20 74 6f 20 69 6e 64 | or clear to ind| 00000370 69 63 61 74 65 20 74 68 65 20 70 61 67 65 20 68 |icate the page h| 00000380 61 73 0d 6e 6f 74 20 63 68 61 6e 67 65 64 2e 0d |as.not changed..| 00000390 0d 54 68 65 20 69 64 65 61 20 6f 66 20 74 68 65 |.The idea of the| 000003a0 20 22 75 70 64 61 74 65 22 20 62 69 74 20 69 73 | "update" bit is| 000003b0 20 74 6f 20 61 6c 6c 6f 77 20 64 65 63 6f 64 65 | to allow decode| 000003c0 72 73 20 69 6e 20 74 65 6c 65 74 65 78 74 20 74 |rs in teletext t| 000003d0 76 20 73 65 74 73 20 74 6f 0d 64 69 73 63 6f 76 |v sets to.discov| 000003e0 65 72 20 77 68 65 74 68 65 72 20 74 68 65 20 70 |er whether the p| 000003f0 61 67 65 20 62 65 69 6e 67 20 64 69 73 70 6c 61 |age being displa| 00000400 79 65 64 20 6f 6e 20 73 63 72 65 65 6e 20 73 68 |yed on screen sh| 00000410 6f 75 6c 64 20 62 65 20 61 6c 74 65 72 65 64 2e |ould be altered.| 00000420 0d 57 68 65 6e 20 61 20 70 61 67 65 20 69 73 20 |.When a page is | 00000430 72 65 71 75 65 73 74 65 64 2c 20 74 68 65 20 66 |requested, the f| 00000440 69 72 73 74 20 76 65 72 73 69 6f 6e 20 74 6f 20 |irst version to | 00000450 61 72 72 69 76 65 20 69 73 20 64 69 73 70 6c 61 |arrive is displa| 00000460 79 65 64 2e 0d 50 72 6f 76 69 64 65 64 20 69 74 |yed..Provided it| 00000470 20 68 61 73 20 62 65 65 6e 20 72 65 63 65 69 76 | has been receiv| 00000480 65 64 20 63 6f 72 72 65 63 74 6c 79 2c 20 74 68 |ed correctly, th| 00000490 69 73 20 72 65 6d 61 69 6e 73 20 6f 6e 20 73 63 |is remains on sc| 000004a0 72 65 65 6e 20 61 6e 64 0d 75 6e 61 6c 74 65 72 |reen and.unalter| 000004b0 65 64 20 75 6e 74 69 6c 20 65 69 74 68 65 72 20 |ed until either | 000004c0 61 20 64 69 66 66 65 72 65 6e 74 20 70 61 67 65 |a different page| 000004d0 20 69 73 20 72 65 71 75 65 73 74 65 64 20 6f 72 | is requested or| 000004e0 20 74 68 65 20 75 70 64 61 74 65 20 62 69 74 20 | the update bit | 000004f0 69 73 0d 73 65 74 2e 20 49 6e 20 74 68 69 73 20 |is.set. In this | 00000500 77 61 79 2c 20 61 20 64 65 63 6f 64 65 72 20 63 |way, a decoder c| 00000510 61 6e 20 6b 65 65 70 20 61 20 63 6f 72 72 65 63 |an keep a correc| 00000520 74 20 76 65 72 73 69 6f 6e 20 6f 66 20 61 20 70 |t version of a p| 00000530 61 67 65 20 69 6e 20 69 74 73 0d 70 61 67 65 20 |age in its.page | 00000540 6d 65 6d 6f 72 79 2c 20 61 6e 64 20 6e 6f 74 20 |memory, and not | 00000550 72 69 73 6b 20 6f 76 65 72 77 72 69 74 69 6e 67 |risk overwriting| 00000560 20 74 68 69 73 20 77 69 74 68 20 61 20 73 75 62 | this with a sub| 00000570 73 65 71 75 65 6e 74 6c 79 20 72 65 63 65 69 76 |sequently receiv| 00000580 65 64 0d 62 75 74 20 70 6f 73 73 69 62 6c 79 20 |ed.but possibly | 00000590 63 6f 72 72 75 70 74 65 64 20 76 65 72 73 69 6f |corrupted versio| 000005a0 6e 20 6f 66 20 74 68 65 20 73 61 6d 65 20 70 61 |n of the same pa| 000005b0 67 65 2e 0d 0d 49 6e 20 70 72 61 63 74 69 63 65 |ge...In practice| 000005c0 2c 20 6d 6f 73 74 20 74 65 6c 65 74 65 78 74 20 |, most teletext | 000005d0 74 76 20 73 65 74 73 20 64 6f 20 6e 6f 74 20 63 |tv sets do not c| 000005e0 68 65 63 6b 20 74 68 65 20 69 6e 74 65 67 72 69 |heck the integri| 000005f0 74 79 20 6f 66 20 74 68 65 0d 72 65 63 65 69 76 |ty of the.receiv| 00000600 65 64 20 70 61 67 65 2c 20 61 6e 64 20 69 67 6e |ed page, and ign| 00000610 6f 72 65 20 74 68 65 20 43 52 43 2e 20 54 68 65 |ore the CRC. The| 00000620 79 20 74 68 65 72 65 66 6f 72 65 20 63 61 6e 6e |y therefore cann| 00000630 6f 74 20 74 65 6c 6c 20 77 68 65 74 68 65 72 20 |ot tell whether | 00000640 74 68 65 0d 70 61 67 65 20 69 73 20 63 6f 72 72 |the.page is corr| 00000650 65 63 74 20 6f 72 20 6e 6f 74 2c 20 61 6e 64 20 |ect or not, and | 00000660 74 65 6e 64 20 74 6f 20 67 72 61 62 20 65 76 65 |tend to grab eve| 00000670 72 79 20 76 65 72 73 69 6f 6e 20 72 65 63 65 69 |ry version recei| 00000680 76 65 64 2c 20 69 6e 20 63 61 73 65 0d 73 6f 6d |ved, in case.som| 00000690 65 20 6c 69 6e 65 73 20 77 65 72 65 20 6d 69 73 |e lines were mis| 000006a0 73 69 6e 67 20 6f 72 20 73 6f 6d 65 20 74 65 78 |sing or some tex| 000006b0 74 20 63 6f 72 72 75 70 74 65 64 2e 20 54 68 69 |t corrupted. Thi| 000006c0 73 20 70 72 61 63 74 69 63 65 2c 20 6f 66 20 63 |s practice, of c| 000006d0 6f 75 72 73 65 2c 0d 6d 61 79 20 72 65 73 75 6c |ourse,.may resul| 000006e0 74 20 69 6e 20 61 20 67 6f 6f 64 20 70 61 67 65 |t in a good page| 000006f0 20 62 65 69 6e 67 20 72 65 70 6c 61 63 65 64 20 | being replaced | 00000700 62 79 20 61 20 63 6f 72 72 75 70 74 20 70 61 67 |by a corrupt pag| 00000710 65 21 0d 0d 54 68 65 20 75 70 64 61 74 65 20 62 |e!..The update b| 00000720 69 74 20 69 73 20 63 6f 6e 74 61 69 6e 65 64 20 |it is contained | 00000730 69 6e 20 74 68 65 20 68 65 61 64 65 72 20 72 6f |in the header ro| 00000740 77 2c 20 62 79 74 65 20 31 32 2e 20 54 68 65 20 |w, byte 12. The | 00000750 62 79 74 65 20 69 73 0d 68 61 6d 6d 69 6e 67 2d |byte is.hamming-| 00000760 63 6f 64 65 64 20 66 6f 72 20 70 72 6f 74 65 63 |coded for protec| 00000770 74 69 6f 6e 2e 20 57 68 65 6e 20 64 65 2d 68 61 |tion. When de-ha| 00000780 6d 6d 65 64 2c 20 74 68 65 20 73 65 63 6f 6e 64 |mmed, the second| 00000790 20 62 69 74 20 6f 66 20 74 68 65 20 62 79 74 65 | bit of the byte| 000007a0 0d 69 73 20 74 68 65 20 75 70 64 61 74 65 20 66 |.is the update f| 000007b0 6c 61 67 2e 20 54 68 65 20 41 54 53 20 64 6f 65 |lag. The ATS doe| 000007c0 73 20 6d 75 63 68 20 6f 66 20 74 68 65 20 64 65 |s much of the de| 000007d0 63 6f 64 69 6e 67 20 77 68 65 6e 20 74 68 65 20 |coding when the | 000007e0 70 61 67 65 20 69 73 0d 74 72 61 6e 73 66 65 72 |page is.transfer| 000007f0 72 65 64 20 74 6f 20 6d 65 6d 6f 72 79 2e 20 54 |red to memory. T| 00000800 68 65 20 66 69 72 73 74 20 66 65 77 20 62 79 74 |he first few byt| 00000810 65 73 20 28 63 6c 6f 63 6b 20 72 75 6e 2d 69 6e |es (clock run-in| 00000820 20 61 6e 64 20 66 72 61 6d 69 6e 67 20 63 6f 64 | and framing cod| 00000830 65 29 0d 61 72 65 20 72 65 6d 6f 76 65 64 2c 20 |e).are removed, | 00000840 61 6e 64 20 74 68 65 20 61 70 70 72 6f 70 72 69 |and the appropri| 00000850 61 74 65 20 63 6f 64 65 73 20 64 65 2d 68 61 6d |ate codes de-ham| 00000860 6d 65 64 2e 20 4f 66 20 74 68 65 20 62 79 74 65 |med. Of the byte| 00000870 73 20 74 72 61 6e 73 66 65 72 72 65 64 0d 69 6e |s transferred.in| 00000880 74 6f 20 6d 65 6d 6f 72 79 2c 20 74 68 65 20 66 |to memory, the f| 00000890 69 72 73 74 20 74 77 6f 20 61 72 65 2c 20 61 73 |irst two are, as| 000008a0 20 75 73 75 61 6c 2c 20 74 68 65 20 6d 61 67 61 | usual, the maga| 000008b0 7a 69 6e 65 20 61 6e 64 20 72 6f 77 0d 69 64 65 |zine and row.ide| 000008c0 6e 74 69 66 69 65 72 73 2c 20 66 6f 6c 6c 6f 77 |ntifiers, follow| 000008d0 65 64 20 62 79 20 70 61 67 65 20 61 6e 64 20 73 |ed by page and s| 000008e0 75 62 2d 70 61 67 65 20 6e 75 6d 62 65 72 20 63 |ub-page number c| 000008f0 6f 64 65 73 2e 20 54 68 65 20 6e 65 78 74 20 74 |odes. The next t| 00000900 77 6f 0d 62 79 74 65 73 20 61 72 65 20 22 63 6f |wo.bytes are "co| 00000910 6e 74 72 6f 6c 22 20 69 6e 66 6f 72 6d 61 74 69 |ntrol" informati| 00000920 6f 6e 2c 20 61 6e 64 20 63 6f 6e 74 61 69 6e 20 |on, and contain | 00000930 74 68 65 20 75 70 64 61 74 65 20 62 69 74 2e 0d |the update bit..| 00000940 0d 57 65 20 6e 65 65 64 2c 20 74 68 65 72 65 66 |.We need, theref| 00000950 6f 72 65 2c 20 74 6f 20 73 74 75 64 79 20 74 68 |ore, to study th| 00000960 65 20 73 65 76 65 6e 74 68 20 62 79 74 65 20 6f |e seventh byte o| 00000970 66 20 72 6f 77 20 7a 65 72 6f 2c 20 61 73 20 74 |f row zero, as t| 00000980 72 61 6e 73 66 65 72 72 65 64 0d 62 79 20 41 54 |ransferred.by AT| 00000990 53 2e 20 54 68 65 20 75 70 64 61 74 65 20 66 6c |S. The update fl| 000009a0 61 67 20 69 73 20 62 69 74 20 6f 6e 65 20 28 73 |ag is bit one (s| 000009b0 65 63 6f 6e 64 20 62 69 74 29 20 6f 66 20 74 68 |econd bit) of th| 000009c0 69 73 20 62 79 74 65 2c 20 61 6e 64 20 77 65 20 |is byte, and we | 000009d0 63 61 6e 0d 64 65 74 65 63 74 20 69 74 73 20 73 |can.detect its s| 000009e0 74 61 74 65 20 77 69 74 68 20 74 68 65 20 66 6f |tate with the fo| 000009f0 6c 6c 6f 77 69 6e 67 20 61 6c 67 6f 72 69 74 68 |llowing algorith| 00000a00 6d 3a 0d 0d 0d 0d 0d 0d 20 20 20 20 20 20 20 20 |m:...... | 00000a10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000a20 20 20 20 20 20 20 20 20 20 20 50 61 67 65 20 31 | Page 1| 00000a30 0d 0d 0d 0d 0d 0d 0d 0d 0d 49 6e 74 65 72 61 63 |.........Interac| 00000a40 74 69 76 65 20 70 72 6f 67 72 61 6d 6d 69 6e 67 |tive programming| 00000a50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00000a70 20 20 4a 2e 4a 2e 42 72 61 79 73 68 61 77 20 31 | J.J.Brayshaw 1| 00000a80 39 38 37 0d 0d 0d 0d 0d 20 20 20 20 20 49 46 20 |987..... IF | 00000a90 28 62 79 74 65 25 20 41 4e 44 20 32 29 20 3d 20 |(byte% AND 2) = | 00000aa0 32 20 54 48 45 4e 20 66 6c 61 67 25 20 3d 20 54 |2 THEN flag% = T| 00000ab0 52 55 45 20 45 4c 53 45 20 66 6c 61 67 25 20 3d |RUE ELSE flag% =| 00000ac0 20 46 41 4c 53 45 0d 0d 53 74 61 74 69 63 20 70 | FALSE..Static p| 00000ad0 61 67 65 73 2c 20 61 73 20 79 6f 75 20 77 6f 75 |ages, as you wou| 00000ae0 6c 64 20 65 78 70 65 63 74 2c 20 6f 6e 6c 79 20 |ld expect, only | 00000af0 68 61 76 65 20 74 68 65 20 75 70 64 61 74 65 20 |have the update | 00000b00 62 69 74 20 73 65 74 20 6f 6e 20 74 68 65 0d 66 |bit set on the.f| 00000b10 69 72 73 74 20 62 72 6f 61 64 63 61 73 74 2c 20 |irst broadcast, | 00000b20 61 6e 64 20 73 6f 20 69 74 20 69 73 20 64 69 66 |and so it is dif| 00000b30 66 69 63 75 6c 74 20 74 6f 20 66 69 6e 64 20 6f |ficult to find o| 00000b40 6e 65 20 77 69 74 68 20 74 68 69 73 20 62 69 74 |ne with this bit| 00000b50 20 73 65 74 2e 0d 52 6f 6c 6c 69 6e 67 20 70 61 | set..Rolling pa| 00000b60 67 65 73 2c 20 68 6f 77 65 76 65 72 2c 20 68 61 |ges, however, ha| 00000b70 76 65 20 74 68 69 73 20 62 69 74 20 73 65 74 20 |ve this bit set | 00000b80 65 76 65 72 79 20 74 69 6d 65 20 61 20 64 69 66 |every time a dif| 00000b90 66 65 72 65 6e 74 20 73 75 62 2d 70 61 67 65 0d |ferent sub-page.| 00000ba0 69 73 20 74 72 61 6e 73 6d 69 74 74 65 64 2e 0d |is transmitted..| 00000bb0 0d 54 68 65 20 54 65 6c 65 74 65 78 74 20 73 70 |.The Teletext sp| 00000bc0 65 63 69 66 69 63 61 74 69 6f 6e 73 20 61 6c 6c |ecifications all| 00000bd0 6f 77 20 66 6f 72 20 74 72 61 6e 73 6d 69 73 73 |ow for transmiss| 00000be0 69 6f 6e 20 6f 66 20 6f 6e 6c 79 20 61 20 70 61 |ion of only a pa| 00000bf0 72 74 20 6f 66 20 61 0d 70 61 67 65 2e 20 57 68 |rt of a.page. Wh| 00000c00 65 6e 20 74 68 65 20 75 70 64 61 74 65 20 62 69 |en the update bi| 00000c10 74 20 69 73 20 73 65 74 2c 20 74 68 65 20 64 61 |t is set, the da| 00000c20 74 61 20 73 65 6e 74 20 6d 61 79 20 6f 6e 6c 79 |ta sent may only| 00000c30 20 62 65 20 69 6e 74 65 6e 64 65 64 20 74 6f 0d | be intended to.| 00000c40 6f 76 65 72 77 72 69 74 65 20 61 20 70 61 72 74 |overwrite a part| 00000c50 20 6f 66 20 74 68 65 20 70 72 65 76 69 6f 75 73 | of the previous| 00000c60 6c 79 20 74 72 61 6e 73 6d 69 74 74 65 64 20 70 |ly transmitted p| 00000c70 61 67 65 2c 20 61 6e 64 20 74 68 75 73 20 6d 61 |age, and thus ma| 00000c80 6b 65 20 6d 69 6e 6f 72 0d 61 6c 74 65 72 61 74 |ke minor.alterat| 00000c90 69 6f 6e 73 2e 20 49 6e 20 74 68 69 73 20 63 61 |ions. In this ca| 00000ca0 73 65 2c 20 74 68 65 20 72 65 63 65 69 76 65 72 |se, the receiver| 00000cb0 20 73 68 6f 75 6c 64 20 6e 6f 74 20 64 69 73 63 | should not disc| 00000cc0 61 72 64 20 74 68 65 20 70 72 65 76 69 6f 75 73 |ard the previous| 00000cd0 6c 79 0d 72 65 63 65 69 76 65 64 20 76 65 72 73 |ly.received vers| 00000ce0 69 6f 6e 2c 20 62 75 74 20 73 68 6f 75 6c 64 20 |ion, but should | 00000cf0 72 65 70 6c 61 63 65 20 74 68 65 20 61 70 70 72 |replace the appr| 00000d00 6f 70 72 69 61 74 65 20 70 61 63 6b 65 74 73 20 |opriate packets | 00000d10 6f 66 20 74 68 65 20 73 74 6f 72 65 64 0d 70 61 |of the stored.pa| 00000d20 67 65 20 77 69 74 68 20 74 68 6f 73 65 20 72 65 |ge with those re| 00000d30 63 65 69 76 65 64 20 69 6e 20 74 68 65 20 22 75 |ceived in the "u| 00000d40 70 64 61 74 65 22 20 70 61 67 65 2e 20 41 6e 79 |pdate" page. Any| 00000d50 20 70 61 63 6b 65 74 73 20 6e 6f 74 20 72 65 63 | packets not rec| 00000d60 65 69 76 65 64 0d 77 69 74 68 20 74 68 65 20 70 |eived.with the p| 00000d70 61 67 65 20 75 70 64 61 74 65 20 74 72 61 6e 73 |age update trans| 00000d80 6d 69 73 73 69 6f 6e 20 73 68 6f 75 6c 64 20 62 |mission should b| 00000d90 65 20 63 6f 6e 73 69 64 65 72 65 64 20 74 6f 20 |e considered to | 00000da0 62 65 20 75 6e 61 6c 74 65 72 65 64 0d 66 72 6f |be unaltered.fro| 00000db0 6d 20 74 68 65 20 6c 61 73 74 20 62 72 6f 61 64 |m the last broad| 00000dc0 63 61 73 74 20 28 61 6e 64 20 6e 6f 74 20 6e 65 |cast (and not ne| 00000dd0 63 65 73 73 61 72 69 6c 79 20 63 6f 6e 73 69 64 |cessarily consid| 00000de0 65 72 65 64 20 61 73 20 73 74 72 69 6e 67 73 20 |ered as strings | 00000df0 6f 66 20 34 30 0d 73 70 61 63 65 73 20 61 73 20 |of 40.spaces as | 00000e00 69 73 20 74 68 65 20 63 61 73 65 20 77 69 74 68 |is the case with| 00000e10 20 70 61 67 65 73 20 6e 6f 74 20 69 64 65 6e 74 | pages not ident| 00000e20 69 66 69 65 64 20 61 73 20 75 70 64 61 74 65 73 |ified as updates| 00000e30 2e 29 2e 0d 0d 49 6e 20 70 72 61 63 74 69 63 65 |.)...In practice| 00000e40 2c 20 68 6f 77 65 76 65 72 2c 20 69 74 20 69 73 |, however, it is| 00000e50 20 6e 6f 74 20 6e 6f 72 6d 61 6c 20 74 6f 20 74 | not normal to t| 00000e60 72 61 6e 73 6d 69 74 20 6f 6e 6c 79 20 74 68 65 |ransmit only the| 00000e70 20 75 70 64 61 74 65 64 0d 73 65 63 74 69 6f 6e | updated.section| 00000e80 73 20 6f 66 20 61 20 70 61 67 65 2e 20 54 68 65 |s of a page. The| 00000e90 20 63 6f 6d 70 6c 65 74 65 20 70 61 67 65 20 69 | complete page i| 00000ea0 73 20 75 73 75 61 6c 6c 79 20 73 65 6e 74 2c 20 |s usually sent, | 00000eb0 62 65 63 61 75 73 65 20 69 74 20 63 61 6e 6e 6f |because it canno| 00000ec0 74 0d 62 65 20 67 75 61 72 61 6e 74 65 65 64 20 |t.be guaranteed | 00000ed0 74 68 65 20 64 65 63 6f 64 65 72 20 77 69 6c 6c |the decoder will| 00000ee0 20 68 61 76 65 20 61 6c 72 65 61 64 79 20 72 65 | have already re| 00000ef0 63 65 69 76 65 64 20 61 20 63 6f 6d 70 6c 65 74 |ceived a complet| 00000f00 65 20 70 61 67 65 2e 0d 55 6e 6c 65 73 73 20 74 |e page..Unless t| 00000f10 68 65 20 64 65 63 6f 64 65 72 20 68 61 73 20 61 |he decoder has a| 00000f20 6c 72 65 61 64 79 20 67 6f 74 20 74 68 65 20 70 |lready got the p| 00000f30 61 67 65 20 63 6f 6d 70 6c 65 74 65 2c 20 74 68 |age complete, th| 00000f40 65 72 65 20 77 69 6c 6c 20 62 65 0d 6e 6f 74 68 |ere will be.noth| 00000f50 69 6e 67 20 69 6e 20 6d 65 6d 6f 72 79 20 74 6f |ing in memory to| 00000f60 20 75 70 64 61 74 65 21 20 48 6f 77 65 76 65 72 | update! However| 00000f70 2c 20 77 65 20 63 61 6e 20 69 64 65 6e 74 69 66 |, we can identif| 00000f80 79 20 77 68 65 74 68 65 72 20 74 68 65 20 75 70 |y whether the up| 00000f90 64 61 74 65 0d 70 61 67 65 20 69 73 20 61 20 70 |date.page is a p| 00000fa0 61 72 74 20 6f 66 20 61 20 70 72 65 76 69 6f 75 |art of a previou| 00000fb0 73 20 74 72 61 6e 73 6d 69 73 73 69 6f 6e 20 6f |s transmission o| 00000fc0 72 20 61 20 63 6f 6d 70 6c 65 74 65 20 70 61 67 |r a complete pag| 00000fd0 65 20 64 69 66 66 65 72 65 6e 74 0d 66 72 6f 6d |e different.from| 00000fe0 20 74 68 65 20 70 72 65 76 69 6f 75 73 20 76 65 | the previous ve| 00000ff0 72 73 69 6f 6e 20 62 79 20 6c 6f 6f 6b 69 6e 67 |rsion by looking| 00001000 20 61 74 20 6f 74 68 65 72 20 69 6e 66 6f 72 6d | at other inform| 00001010 61 74 69 6f 6e 20 69 6e 20 74 68 65 20 63 6f 6e |ation in the con| 00001020 74 72 6f 6c 0d 62 79 74 65 73 2e 20 54 68 65 20 |trol.bytes. The | 00001030 22 65 72 61 73 65 2d 70 61 67 65 22 20 66 6c 61 |"erase-page" fla| 00001040 67 20 74 65 6c 6c 73 20 61 20 64 65 63 6f 64 65 |g tells a decode| 00001050 72 20 74 6f 20 65 72 61 73 65 20 74 68 65 20 63 |r to erase the c| 00001060 75 72 72 65 6e 74 6c 79 0d 64 69 73 70 6c 61 79 |urrently.display| 00001070 65 64 20 70 61 67 65 20 62 65 66 6f 72 65 20 64 |ed page before d| 00001080 69 73 70 6c 61 79 69 6e 67 20 74 68 65 20 76 65 |isplaying the ve| 00001090 72 73 69 6f 6e 20 6a 75 73 74 20 72 65 63 65 69 |rsion just recei| 000010a0 76 65 64 2e 20 49 66 20 74 68 69 73 20 66 6c 61 |ved. If this fla| 000010b0 67 0d 69 73 20 73 65 74 2c 20 77 65 20 6b 6e 6f |g.is set, we kno| 000010c0 77 20 74 68 65 20 72 65 63 65 69 76 65 64 20 70 |w the received p| 000010d0 61 67 65 20 69 73 20 61 20 63 6f 6d 70 6c 65 74 |age is a complet| 000010e0 65 20 70 61 67 65 20 2d 20 69 74 20 77 6f 75 6c |e page - it woul| 000010f0 64 20 6e 6f 74 20 6d 61 6b 65 0d 73 65 6e 73 65 |d not make.sense| 00001100 20 74 6f 20 65 72 61 73 65 20 61 20 70 61 67 65 | to erase a page| 00001110 20 61 6e 64 20 74 68 65 6e 20 64 69 73 70 6c 61 | and then displa| 00001120 79 20 6f 6e 6c 79 20 74 68 65 20 61 6c 74 65 72 |y only the alter| 00001130 61 74 69 6f 6e 73 21 20 53 69 6d 69 6c 61 72 6c |ations! Similarl| 00001140 79 2c 20 69 66 0d 74 68 65 20 22 65 72 61 73 65 |y, if.the "erase| 00001150 2d 70 61 67 65 22 20 66 6c 61 67 20 69 73 20 63 |-page" flag is c| 00001160 6c 65 61 72 2c 20 74 68 65 20 63 6f 6e 74 65 6e |lear, the conten| 00001170 74 73 20 6f 66 20 74 68 65 20 75 70 64 61 74 65 |ts of the update| 00001180 20 70 61 67 65 20 72 65 63 65 69 76 65 64 0d 73 | page received.s| 00001190 68 6f 75 6c 64 20 73 69 6d 70 6c 79 20 6f 76 65 |hould simply ove| 000011a0 72 6c 61 79 20 74 68 65 20 70 61 67 65 20 61 6c |rlay the page al| 000011b0 72 65 61 64 79 20 64 69 73 70 6c 61 79 65 64 2c |ready displayed,| 000011c0 20 61 6e 64 20 74 68 65 72 65 66 6f 72 65 20 69 | and therefore i| 000011d0 73 20 6e 6f 74 20 61 0d 63 6f 6d 70 6c 65 74 65 |s not a.complete| 000011e0 20 70 61 67 65 2e 0d 0d 54 68 65 20 75 70 64 61 | page...The upda| 000011f0 74 65 20 62 69 74 20 63 61 6e 20 61 6c 73 6f 20 |te bit can also | 00001200 62 65 20 75 73 65 64 20 62 79 20 72 65 63 65 69 |be used by recei| 00001210 76 65 72 73 20 63 61 70 61 62 6c 65 20 6f 66 20 |vers capable of | 00001220 73 77 69 74 63 68 69 6e 67 20 62 65 74 77 65 65 |switching betwee| 00001230 6e 0d 74 68 65 20 6e 6f 72 6d 61 6c 20 74 76 20 |n.the normal tv | 00001240 70 69 63 74 75 72 65 20 6f 72 20 61 20 74 65 6c |picture or a tel| 00001250 65 74 65 78 74 20 64 69 73 70 6c 61 79 2e 20 57 |etext display. W| 00001260 68 65 6e 20 61 20 70 61 67 65 20 69 73 20 72 65 |hen a page is re| 00001270 71 75 65 73 74 65 64 2c 0d 74 68 69 73 20 6d 61 |quested,.this ma| 00001280 79 20 62 65 20 66 6f 6c 6c 6f 77 65 64 20 62 79 |y be followed by| 00001290 20 70 72 65 73 73 69 6e 67 20 61 6e 20 22 75 70 | pressing an "up| 000012a0 64 61 74 65 22 20 62 75 74 74 6f 6e 20 6f 6e 20 |date" button on | 000012b0 74 68 65 20 6b 65 79 70 61 64 2e 20 54 68 69 73 |the keypad. This| 000012c0 0d 77 69 6c 6c 20 63 61 75 73 65 20 74 68 65 20 |.will cause the | 000012d0 73 65 74 20 74 6f 20 72 65 76 65 72 74 20 74 6f |set to revert to| 000012e0 20 74 68 65 20 62 72 6f 61 64 63 61 73 74 20 74 | the broadcast t| 000012f0 76 20 70 69 63 74 75 72 65 2c 20 79 65 74 20 73 |v picture, yet s| 00001300 74 69 6c 6c 20 73 65 61 72 63 68 0d 66 6f 72 20 |till search.for | 00001310 74 68 65 20 72 65 71 75 65 73 74 65 64 20 70 61 |the requested pa| 00001320 67 65 2e 20 57 68 65 6e 20 74 68 65 20 70 61 67 |ge. When the pag| 00001330 65 20 69 73 20 72 65 63 65 69 76 65 64 2c 20 74 |e is received, t| 00001340 68 65 20 75 70 64 61 74 65 20 62 69 74 20 69 73 |he update bit is| 00001350 0d 69 6e 74 65 72 72 6f 67 61 74 65 64 2e 20 49 |.interrogated. I| 00001360 66 20 73 65 74 2c 20 74 68 65 20 70 61 67 65 20 |f set, the page | 00001370 69 73 20 67 72 61 62 62 65 64 20 61 6e 64 20 73 |is grabbed and s| 00001380 74 6f 72 65 64 20 69 6e 20 61 20 70 61 67 65 20 |tored in a page | 00001390 6d 65 6d 6f 72 79 2e 20 49 66 0d 74 68 65 20 70 |memory. If.the p| 000013a0 61 67 65 20 63 6f 6e 74 61 69 6e 73 20 61 20 22 |age contains a "| 000013b0 73 74 61 72 74 20 62 6f 78 22 20 63 6f 64 65 20 |start box" code | 000013c0 28 63 68 61 72 61 63 74 65 72 20 63 6f 64 65 20 |(character code | 000013d0 31 31 29 2c 20 74 68 65 6e 20 74 68 65 20 73 65 |11), then the se| 000013e0 63 74 69 6f 6e 0d 6f 66 20 74 68 65 20 43 45 45 |ction.of the CEE| 000013f0 46 41 58 20 70 61 67 65 20 62 65 74 77 65 65 6e |FAX page between| 00001400 20 74 68 69 73 20 63 6f 64 65 20 61 6e 64 20 61 | this code and a| 00001410 20 66 6f 6c 6c 6f 77 69 6e 67 20 22 65 6e 64 20 | following "end | 00001420 62 6f 78 22 20 63 6f 64 65 0d 28 63 68 61 72 61 |box" code.(chara| 00001430 63 74 65 72 20 31 30 29 20 77 69 6c 6c 20 62 65 |cter 10) will be| 00001440 20 73 75 70 65 72 69 6d 70 6f 73 65 64 20 6f 6e | superimposed on| 00001450 20 74 68 65 20 70 69 63 74 75 72 65 2e 0d 0d 54 | the picture...T| 00001460 68 65 20 22 73 74 61 72 74 20 62 6f 78 22 20 61 |he "start box" a| 00001470 6e 64 20 22 65 6e 64 20 62 6f 78 22 20 63 6f 64 |nd "end box" cod| 00001480 65 73 20 61 72 65 20 6d 65 61 6e 69 6e 67 6c 65 |es are meaningle| 00001490 73 73 20 6f 6e 20 74 68 65 20 42 42 43 20 6d 69 |ss on the BBC mi| 000014a0 63 72 6f 2c 20 61 73 20 61 0d 74 76 20 70 69 63 |cro, as a.tv pic| 000014b0 74 75 72 65 20 64 69 73 70 6c 61 79 20 69 73 20 |ture display is | 000014c0 6e 6f 74 20 70 6f 73 73 69 62 6c 65 2e 20 48 6f |not possible. Ho| 000014d0 77 65 76 65 72 2c 20 74 68 65 20 63 6f 64 65 73 |wever, the codes| 000014e0 20 6d 61 79 20 73 74 69 6c 6c 20 62 65 0d 70 72 | may still be.pr| 000014f0 65 73 65 6e 74 20 77 69 74 68 69 6e 20 74 68 65 |esent within the| 00001500 20 72 65 63 65 69 76 65 64 20 70 61 67 65 2c 20 | received page, | 00001510 61 6e 64 20 77 69 6c 6c 20 62 65 20 69 6e 74 65 |and will be inte| 00001520 72 70 72 65 74 65 64 20 61 73 20 73 70 61 63 65 |rpreted as space| 00001530 73 20 69 6e 20 74 68 65 0d 64 69 73 70 6c 61 79 |s in the.display| 00001540 20 28 74 68 65 79 20 61 72 65 20 4d 6f 64 65 20 | (they are Mode | 00001550 37 20 63 68 61 72 61 63 74 65 72 73 20 31 33 38 |7 characters 138| 00001560 20 61 6e 64 20 31 33 39 29 2e 20 53 6f 66 74 77 | and 139). Softw| 00001570 61 72 65 20 63 61 6e 20 62 65 20 77 72 69 74 74 |are can be writt| 00001580 65 6e 0d 74 6f 20 64 69 73 70 6c 61 79 20 6f 6e |en.to display on| 00001590 6c 79 20 74 68 65 20 73 65 63 74 69 6f 6e 20 6f |ly the section o| 000015a0 66 20 61 20 70 61 67 65 20 77 69 74 68 69 6e 20 |f a page within | 000015b0 61 20 6d 61 72 6b 65 64 20 62 6f 78 2e 20 28 49 |a marked box. (I| 000015c0 20 6c 65 61 76 65 20 74 68 69 73 0d 70 72 6f 67 | leave this.prog| 000015d0 72 61 6d 20 66 6f 72 20 79 6f 75 20 74 6f 20 77 |ram for you to w| 000015e0 72 69 74 65 21 29 20 52 65 6d 65 6d 62 65 72 20 |rite!) Remember | 000015f0 74 68 61 74 20 69 66 20 2a 54 52 41 4e 53 46 45 |that if *TRANSFE| 00001600 52 20 69 73 20 75 73 65 64 20 74 6f 20 72 65 63 |R is used to rec| 00001610 65 69 76 65 0d 0d 0d 0d 0d 20 20 20 20 20 20 20 |eive..... | 00001620 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001630 20 20 20 20 20 20 20 20 20 20 20 50 61 67 65 20 | Page | 00001640 32 0d 0d 0d 0d 0d 0d 0d 0d 0d 49 6e 74 65 72 61 |2.........Intera| 00001650 63 74 69 76 65 20 70 72 6f 67 72 61 6d 6d 69 6e |ctive programmin| 00001660 67 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |g | 00001670 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001680 20 20 20 4a 2e 4a 2e 42 72 61 79 73 68 61 77 20 | J.J.Brayshaw | 00001690 31 39 38 37 0d 0d 0d 0d 0d 74 68 65 20 70 61 67 |1987.....the pag| 000016a0 65 2c 20 74 68 65 20 62 6f 78 20 63 6f 6d 6d 61 |e, the box comma| 000016b0 6e 64 73 20 61 72 65 20 63 6f 64 65 73 20 31 33 |nds are codes 13| 000016c0 38 20 61 6e 64 20 31 33 39 2c 20 68 61 76 69 6e |8 and 139, havin| 000016d0 67 20 62 65 65 6e 20 74 72 61 6e 73 6c 61 74 65 |g been translate| 000016e0 64 0d 74 6f 20 42 42 43 20 4d 6f 64 65 37 20 63 |d.to BBC Mode7 c| 000016f0 68 61 72 61 63 74 65 72 73 2e 20 48 6f 77 65 76 |haracters. Howev| 00001700 65 72 2c 20 69 66 20 2a 44 41 54 41 20 69 73 20 |er, if *DATA is | 00001710 75 73 65 64 2c 20 74 68 65 20 63 6f 64 65 73 20 |used, the codes | 00001720 77 69 6c 6c 20 72 65 6d 61 69 6e 0d 61 73 20 74 |will remain.as t| 00001730 72 61 6e 73 6d 69 74 74 65 64 2c 20 77 69 74 68 |ransmitted, with| 00001740 20 6f 64 64 20 70 61 72 69 74 79 20 69 6e 63 6c | odd parity incl| 00001750 75 64 65 64 2c 20 75 6e 6c 65 73 73 20 79 6f 75 |uded, unless you| 00001760 72 20 70 72 6f 67 72 61 6d 20 73 74 72 69 70 73 |r program strips| 00001770 20 74 68 65 0d 70 61 72 69 74 79 20 6f 66 20 65 | the.parity of e| 00001780 61 63 68 20 62 79 74 65 20 62 65 66 6f 72 65 20 |ach byte before | 00001790 70 72 6f 63 65 73 73 69 6e 67 2e 20 28 54 68 65 |processing. (The| 000017a0 20 74 72 61 6e 73 6d 69 74 74 65 64 20 63 6f 64 | transmitted cod| 000017b0 65 73 2c 20 69 6e 63 6c 75 64 69 6e 67 0d 70 61 |es, including.pa| 000017c0 72 69 74 79 2c 20 61 72 65 20 63 6f 64 65 20 31 |rity, are code 1| 000017d0 33 38 20 2d 20 62 69 6e 61 72 79 20 31 30 30 30 |38 - binary 1000| 000017e0 31 30 31 30 20 2d 20 66 6f 72 20 65 6e 64 20 62 |1010 - for end b| 000017f0 6f 78 2c 20 61 6e 64 20 63 6f 64 65 20 31 31 20 |ox, and code 11 | 00001800 2d 20 62 69 6e 61 72 79 0d 30 30 30 30 31 30 31 |- binary.0000101| 00001810 31 20 2d 20 66 6f 72 20 73 74 61 72 74 20 62 6f |1 - for start bo| 00001820 78 2e 29 0d 0d 54 68 65 20 41 6c 61 72 6d 20 43 |x.)..The Alarm C| 00001830 6c 6f 63 6b 20 70 61 67 65 20 66 72 6f 6d 20 43 |lock page from C| 00001840 45 45 46 41 58 20 28 70 61 67 65 20 31 39 36 29 |EEFAX (page 196)| 00001850 20 6d 61 6b 65 73 20 66 75 6c 6c 20 75 73 65 20 | makes full use | 00001860 6f 66 20 62 6f 74 68 20 74 68 65 0d 75 70 64 61 |of both the.upda| 00001870 74 65 20 62 69 74 20 61 6e 64 20 74 68 65 20 22 |te bit and the "| 00001880 62 6f 78 22 20 63 6f 64 65 73 2e 20 54 68 65 20 |box" codes. The | 00001890 75 70 64 61 74 65 20 62 69 74 20 69 73 20 73 65 |update bit is se| 000018a0 74 20 65 76 65 72 79 20 6d 69 6e 75 74 65 20 6f |t every minute o| 000018b0 6e 20 74 68 65 0d 6d 69 6e 75 74 65 2e 20 54 68 |n the.minute. Th| 000018c0 65 20 62 6f 78 20 63 6f 64 65 73 20 63 61 75 73 |e box codes caus| 000018d0 65 20 74 68 65 20 74 6f 70 20 73 65 63 74 69 6f |e the top sectio| 000018e0 6e 20 6f 66 20 74 68 65 20 70 61 67 65 20 6f 6e |n of the page on| 000018f0 6c 79 20 74 6f 20 62 65 0d 73 75 70 65 72 69 6d |ly to be.superim| 00001900 70 6f 73 65 64 20 6f 6e 20 74 68 65 20 74 76 20 |posed on the tv | 00001910 73 69 67 6e 61 6c 20 77 68 65 6e 20 74 68 65 20 |signal when the | 00001920 70 61 67 65 20 69 73 20 73 65 6c 65 63 74 65 64 |page is selected| 00001930 20 66 6f 72 20 75 70 64 61 74 65 20 6f 6e 20 61 | for update on a| 00001940 0d 74 65 6c 65 74 65 78 74 20 74 76 20 73 65 74 |.teletext tv set| 00001950 2e 20 46 6f 72 20 74 68 69 73 20 74 6f 20 66 75 |. For this to fu| 00001960 6e 63 74 69 6f 6e 2c 20 74 77 6f 20 63 6f 6e 64 |nction, two cond| 00001970 69 74 69 6f 6e 73 20 6d 75 73 74 20 62 65 20 6d |itions must be m| 00001980 65 74 3a 20 74 68 65 0d 73 75 62 2d 70 61 67 65 |et: the.sub-page| 00001990 20 63 6f 64 65 20 72 65 71 75 65 73 74 65 64 20 | code requested | 000019a0 69 73 20 74 68 65 20 73 61 6d 65 20 61 73 20 74 |is the same as t| 000019b0 68 61 74 20 6f 66 20 74 68 65 20 70 61 67 65 20 |hat of the page | 000019c0 74 72 61 6e 73 6d 69 74 74 65 64 3b 20 61 6e 64 |transmitted; and| 000019d0 0d 74 68 65 20 75 70 64 61 74 65 20 62 69 74 20 |.the update bit | 000019e0 69 73 20 73 65 74 2e 0d 0d 53 6f 2c 20 69 66 20 |is set...So, if | 000019f0 77 65 20 61 72 65 20 74 6f 20 64 65 74 65 63 74 |we are to detect| 00001a00 20 63 6f 6d 70 6c 65 74 65 20 6e 65 77 20 76 65 | complete new ve| 00001a10 72 73 69 6f 6e 73 20 6f 66 20 61 20 70 61 72 74 |rsions of a part| 00001a20 69 63 75 6c 61 72 20 70 61 67 65 2c 20 77 65 0d |icular page, we.| 00001a30 6d 75 73 74 20 6c 6f 6f 6b 20 61 74 20 62 6f 74 |must look at bot| 00001a40 68 20 74 68 65 20 75 70 64 61 74 65 20 66 6c 61 |h the update fla| 00001a50 67 20 61 6e 64 20 74 68 65 20 65 72 61 73 65 2d |g and the erase-| 00001a60 70 61 67 65 20 66 6c 61 67 2e 20 4f 6e 6c 79 20 |page flag. Only | 00001a70 69 66 20 62 6f 74 68 0d 61 72 65 20 73 65 74 20 |if both.are set | 00001a80 63 61 6e 20 77 65 20 62 65 20 73 75 72 65 20 74 |can we be sure t| 00001a90 68 65 20 70 61 67 65 20 69 73 20 61 20 63 6f 6d |he page is a com| 00001aa0 70 6c 65 74 65 20 72 65 70 6c 61 63 65 6d 65 6e |plete replacemen| 00001ab0 74 20 64 69 73 70 6c 61 79 2e 20 54 68 65 0d 65 |t display. The.e| 00001ac0 72 61 73 65 2d 70 61 67 65 20 66 6c 61 67 20 69 |rase-page flag i| 00001ad0 73 20 62 69 74 20 33 20 6f 66 20 62 79 74 65 20 |s bit 3 of byte | 00001ae0 35 20 28 61 73 20 74 72 61 6e 73 66 65 72 72 65 |5 (as transferre| 00001af0 64 20 74 6f 20 6d 65 6d 6f 72 79 20 62 79 20 41 |d to memory by A| 00001b00 54 53 29 2e 20 54 68 65 0d 72 6f 75 74 69 6e 65 |TS). The.routine| 00001b10 20 74 6f 20 72 65 61 64 20 74 68 69 73 20 66 6c | to read this fl| 00001b20 61 67 20 69 73 20 64 69 73 63 75 73 73 65 64 20 |ag is discussed | 00001b30 69 6e 20 74 68 65 20 6e 65 78 74 20 6d 6f 64 75 |in the next modu| 00001b40 6c 65 2e 20 49 6e 20 74 68 65 0d 6d 65 61 6e 74 |le. In the.meant| 00001b50 69 6d 65 2c 20 79 6f 75 20 6d 61 79 20 6c 69 6b |ime, you may lik| 00001b60 65 20 74 6f 20 74 72 79 20 61 6e 64 20 77 72 69 |e to try and wri| 00001b70 74 65 20 61 20 42 41 53 49 43 20 66 75 6e 63 74 |te a BASIC funct| 00001b80 69 6f 6e 20 74 6f 20 72 65 61 64 20 74 68 69 73 |ion to read this| 00001b90 0d 66 6c 61 67 2e 0d 0d 54 68 65 72 65 20 69 73 |.flag...There is| 00001ba0 20 61 20 76 61 72 69 65 74 79 20 6f 66 20 6f 74 | a variety of ot| 00001bb0 68 65 72 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 |her information | 00001bc0 61 62 6f 75 74 20 74 68 65 20 70 61 67 65 20 74 |about the page t| 00001bd0 68 61 74 20 77 65 20 63 61 6e 0d 64 65 74 65 72 |hat we can.deter| 00001be0 6d 69 6e 65 20 66 72 6f 6d 20 74 68 65 20 74 77 |mine from the tw| 00001bf0 6f 20 63 6f 6e 74 72 6f 6c 20 61 6e 64 20 73 74 |o control and st| 00001c00 61 74 75 73 20 62 79 74 65 73 20 69 6e 20 70 61 |atus bytes in pa| 00001c10 63 6b 65 74 20 7a 65 72 6f 2c 20 77 68 69 63 68 |cket zero, which| 00001c20 20 77 69 6c 6c 0d 62 65 20 65 78 70 6c 61 69 6e | will.be explain| 00001c30 65 64 20 69 6e 20 74 68 65 20 6e 65 78 74 20 41 |ed in the next A| 00001c40 54 53 20 70 72 6f 67 72 61 6d 6d 69 6e 67 20 6d |TS programming m| 00001c50 6f 64 75 6c 65 2e 0d 0d 5f 5f 5f 5f 5f 5f 5f 5f |odule...________| 00001c60 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f |________________| * 00001ca0 5f 5f 0d 0d 54 68 65 20 70 72 6f 67 72 61 6d 20 |__..The program | 00001cb0 22 42 2f 41 54 53 30 38 22 20 77 69 6c 6c 20 63 |"B/ATS08" will c| 00001cc0 61 70 74 75 72 65 20 74 68 65 20 41 6c 61 72 6d |apture the Alarm| 00001cd0 20 43 6c 6f 63 6b 20 70 61 67 65 20 65 61 63 68 | Clock page each| 00001ce0 20 74 69 6d 65 20 69 74 20 69 73 0d 74 72 61 6e | time it is.tran| 00001cf0 73 6d 69 74 74 65 64 2e 20 59 6f 75 20 77 69 6c |smitted. You wil| 00001d00 6c 20 73 65 65 20 74 68 61 74 20 69 74 20 69 73 |l see that it is| 00001d10 20 62 72 6f 61 64 63 61 73 74 20 73 65 76 65 72 | broadcast sever| 00001d20 61 6c 20 74 69 6d 65 73 20 61 20 6d 69 6e 75 74 |al times a minut| 00001d30 65 2c 20 69 6e 0d 69 74 73 20 63 6f 72 72 65 63 |e, in.its correc| 00001d40 74 20 70 6f 73 69 74 69 6f 6e 20 77 69 74 68 69 |t position withi| 00001d50 6e 20 74 68 65 20 70 61 67 65 20 6e 75 6d 62 65 |n the page numbe| 00001d60 72 20 63 79 63 6c 65 2e 20 49 74 20 69 73 20 61 |r cycle. It is a| 00001d70 6c 73 6f 20 74 72 61 6e 73 6d 69 74 74 65 64 0d |lso transmitted.| 00001d80 65 61 63 68 20 6d 69 6e 75 74 65 20 6f 6e 20 74 |each minute on t| 00001d90 68 65 20 6d 69 6e 75 74 65 2e 20 4e 6f 74 65 20 |he minute. Note | 00001da0 74 68 65 20 73 74 61 74 65 20 6f 66 20 74 68 65 |the state of the| 00001db0 20 75 70 64 61 74 65 20 62 69 74 20 61 73 20 65 | update bit as e| 00001dc0 61 63 68 0d 76 65 72 73 69 6f 6e 20 6f 66 20 74 |ach.version of t| 00001dd0 68 65 20 70 61 67 65 20 69 73 20 72 65 63 65 69 |he page is recei| 00001de0 76 65 64 2e 0d 0d 54 72 79 20 74 68 65 20 70 72 |ved...Try the pr| 00001df0 6f 67 72 61 6d 20 77 69 74 68 20 61 20 76 61 72 |ogram with a var| 00001e00 69 65 74 79 20 6f 66 20 70 61 67 65 73 2c 20 69 |iety of pages, i| 00001e10 6e 63 6c 75 64 69 6e 67 20 72 6f 6c 6c 69 6e 67 |ncluding rolling| 00001e20 20 73 65 71 75 65 6e 63 65 73 2e 20 54 68 65 0d | sequences. The.| 00001e30 43 52 43 20 69 73 20 63 68 65 63 6b 65 64 2c 20 |CRC is checked, | 00001e40 61 6e 64 20 74 68 65 20 73 65 74 74 69 6e 67 20 |and the setting | 00001e50 6f 66 20 74 68 65 20 75 70 64 61 74 65 20 62 69 |of the update bi| 00001e60 74 20 69 73 20 73 68 6f 77 6e 20 6f 6e 20 74 68 |t is shown on th| 00001e70 65 20 62 6f 74 74 6f 6d 0d 72 6f 77 20 61 66 74 |e bottom.row aft| 00001e80 65 72 20 74 68 65 20 70 61 67 65 20 68 61 73 20 |er the page has | 00001e90 62 65 65 6e 20 64 69 73 70 6c 61 79 65 64 2e 0d |been displayed..| 00001ea0 0d 54 68 65 20 72 6f 75 74 69 6e 65 20 72 65 71 |.The routine req| 00001eb0 75 69 72 65 64 20 74 6f 20 66 69 6e 64 20 74 68 |uired to find th| 00001ec0 65 20 75 70 64 61 74 65 20 66 6c 61 67 20 69 73 |e update flag is| 00001ed0 20 61 20 73 69 6d 70 6c 65 20 6f 6e 65 2c 20 61 | a simple one, a| 00001ee0 6e 64 20 69 73 20 67 69 76 65 6e 0d 69 6e 20 74 |nd is given.in t| 00001ef0 68 65 20 70 72 6f 67 72 61 6d 20 61 73 20 46 4e |he program as FN| 00001f00 75 70 64 61 74 65 2e 20 4f 74 68 65 72 20 66 6c |update. Other fl| 00001f10 61 67 73 20 77 69 74 68 69 6e 20 74 68 65 20 63 |ags within the c| 00001f20 6f 6e 74 72 6f 6c 20 62 69 74 73 20 63 61 6e 20 |ontrol bits can | 00001f30 62 65 0d 69 6e 74 65 72 70 72 65 74 65 64 20 69 |be.interpreted i| 00001f40 6e 20 61 20 76 65 72 79 20 73 69 6d 69 6c 61 72 |n a very similar| 00001f50 20 6d 61 6e 6e 65 72 2c 20 61 6e 64 20 77 69 6c | manner, and wil| 00001f60 6c 20 62 65 20 64 65 73 63 72 69 62 65 64 20 69 |l be described i| 00001f70 6e 20 74 68 65 20 6e 65 78 74 0d 6d 6f 64 75 6c |n the next.modul| 00001f80 65 2e 0d 0d 0d 0d 0d 0d 0d 0d 0d 0d 20 20 20 20 |e........... | 00001f90 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001fa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 50 61 | Pa| 00001fb0 67 65 20 33 0d 0d 0d 0d 0d |ge 3.....| 00001fb9