Home » CEEFAX disks » telesoftware14.adl » 18-03-89/T\TTX02

18-03-89/T\TTX02

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 » telesoftware14.adl
Filename: 18-03-89/T\TTX02
Read OK:
File size: 859C bytes
Load address: 0000
Exec address: FFFFFFFF
File contents
Interfacing with the Acorn Teletext Adaptor - by - Gordon Horsington
--------------------------------------------------------------------

Module 2. The header packet
---------------------------

There are 32 Teletext packets, numbered 0 to 31. Each packet is broadcast
as 45 bytes, and 43 of these bytes are available from the Acorn Teletext
adaptor. Every packet has the format shown in figure 1.


+------+------+-------+------+------+---      ---+
|    Clock    |Framing| Mag and Row |  40 bytes  |
|    run-in   |code   | Addr Group  |  of data   |
+------+------+-------+------+------+---      ---+
   1      2       3      4      5     6    -   45  byte number

Figure 1. The data transmitted in a Teletext packet
---------------------------------------------------


The first two bytes of every packet comprise the clock run-in sequence of
alternating bits, beginning 101010... and so on. These two bytes are used
to indicate the presence of a data packet and to establish the timing of
the bits in that packet.

The third byte of every packet is the framing code %11100100. This code
was selected to enable byte synchronisation to be established even if one
bit of the framing code byte has been wrongly received. The framing code
byte can be read from the adaptor as the number &27, %00100111, ie. with
all the bits in the byte reversed.

The magazine and packet numbers are broadcast in the next two bytes, known
as the Magazine and Row Address Group (MRAG). Rows of Teletext data have
been renamed packets but the terms row and packet tend to be used
interchangeably. The Row in MRAG refers to the packet address. Because of
the possible confusion that can be caused by the interchangeable use of
these terms I will use row to refer to the 16 * 64 byte rows of memory in
the Teletext adaptor and packet to refer to the rows of Teletext data
which are stored in the adaptor's memory.

The fourth and fifth byte of every packet, and a number of other bytes in
specific packets, are hamming codes which contain 4 message bits
interleaved with 4 protection bits. Decoding the hamming coded bytes into
4 bit nybbles can correct single errors in the received byte and detect
multiple errors.

The two MRAG bytes are hamming coded and must be decoded before they can
be used. Each byte decodes into a 4 bit nybble. The magazine number is a 3
bit number and the packet number uses 5 bits. When you interface directly
with the adaptor, you have to decode the 3 and 5 bit numbers from these
two nybbles. The 40 bytes of data which follow the magazine and packet
numbers have a variable format which depends upon the packet number.

Packet 0 is known as the Page Header. Packet 0 contains 8 additional
hamming coded bytes which decode to give the page and sub-page numbers and
a series of control bits. It also contains the header information you see
displayed at the top of a Teletext page in the terminal mode. Decoding the
information contained in packet 0 will be dealt with in this module and
using the information will be covered in modules 3 and 4.

Packet numbers 1 to 23 contain the information displayed by the level 1
Teletext terminal. They can also contain redefinable telesoftware format
(RTF) computer software. The decoding of telesoftware will not be covered
in these modules and is best left to the ATS.

Packet numbers greater than 23 are sometimes referred to as 'Ghost rows'
or 'Ghost packets' and they are not normally displayed by level 1 Teletext.
All packets from 0 to 31 can be received by the Acorn Teletext adaptor and
it is interesting to know what the so-called ghost packets contain.

Packets 24 and 25 have the same format as packets 1 to 23 and, when they
are combined with the central 24 bytes in packet 0, they form a page of
1024 bytes which is suitable for telesoftware. Packet 24 can also contain
the colour coded prompts for linked pages used by Fastext and the ATS.

Packet 26 is used to broadcast information which can be used to enhance
the display of higher level decoders. Facilities are included to define
full screen and row colours, pastel colours, accented and special
characters, double height, double width, underline and reduced intensity.

Packet 27 is known as the Page Service Packet and is used to define linked
page addresses. Each packet 27 contains 6 groups of 6 bytes, each of which
specifies a page and sub-page. There are 4 versions of packet 27 so that
up to 24 page numbers can be linked to to any given page. A cyclic
redundancy check (CRC) code is incorporated in packet 27 type 0. This can
be used to verify the data in packets 0 - 25.

Packet 28 is used to redefine the character set. Two versions are used,
one of which is page related and the other magazine related. The data are
broadcast as 13 groups of 3 bytes, each group defining a character. Packet
28 can also be used to redefine pastel colours.

Packet 30 is the first of two page independent packets and contains the
Television Service Data Packet (TSDP). Magazines are referred to as
channels in packets 30 and 31 so that magazines 0 to 7 in packet 30 are
known as page independent channels 0 to 7. There are two formats used for
the TSDP which are known as type 0 and type 2. The TSDP contains
information about the initial page to be grabbed by the decoder, programme
and TV channel labels, time in a standard format, control information and
data for display. Modules 5 and 6 will examine the TSDPs in detail.

Packet 31 is the second page independent packet and magazines 0 to 7 in
packet 31 are usually referred to as page independent channels 8 to 15.
Channels 8, 9, 10 and 11 are used by the BBC for its Datacast service.
Datacast is professional data communications technique which distributes
machine readable information to all parts of the United Kingdom
simultaneously. Datacast is used by organisations such as the London Stock
Exchange and the Post Office and most of the information is encrypted for
security. Packet 31 can be received on the Acorn Teletext adaptor and the
demonstration program associated with module 7 will allow you to look at
some of the data broadcast in this packet. At the time of writing the ITV
network is broadcasting an Air Call test message in packet 31. Neither
Channel 4 nor S4C make any use of packet 31.

In module 1 you were shown how to intercept and recognise the Teletext
generated interrupt. In this module I will show you how to read data from
the adaptor into user memory. The example program HEADER only looks for
packet 0 but the same techniques apply to any packet.

Because all the packets broadcast on Teletext contain at least two hamming
coded bytes it is necessary to include a table of 256 bytes to decode
them. This table (lines 1850 to 2490) will have to be included in almost
every Teletext program which bypasses the ATS or TFS.

A Teletext generated interrupt signals that data are available to be read
from the adaptor and up to 16 packets can be read from the 16 * 64 byte
rows of memory in the adaptor although, at the the time of writing, only 7
of the 16 rows are used. The BBC currently use 6 rows for CEEFAX and 1 for
Datacast but there are plans to use 8 rows for CEEFAX and 2 for Datacast.
Because not all the rows are used it is necessary to be able to detect
which rows contain data. This can be done by looking for the framing code.

Each row can be selected by writing one of the numbers &00 to &0F into the
row register at &FC11 (lines 1180 to 1210). After selecting a row, the
framing code byte can be loaded from the adaptor by reading the data
register at &FC12 (line 1110). If the result of this read is &27 then data
are available. If data are available the program HEADER reads them using
the subroutine readpacket (line 1150 and lines 1380 to 1820).

Before returning from a Teletext interrupt is necessary to clear the
framing code in each row of the adaptor's memory. To do this select each
row in turn and write the number zero into the data register (lines 1220
to 1290). If you do not include lines 1220 to 1290 the program will run
for a while but eventually, and usually quite quickly, the program will
crash. The Teletext interrupt processing routine must also either read
from or write to the status clear register (line 1300) before restoring
the registers and executing the RTI instruction.

Reading and decoding the magazine and packet numbers is done in lines 1390
to 1520 of HEADER and described in more detail in figure 2.


      LDY datareg    \ read magazine number and bit 0 of packet number
      LDA hamtable,Y \ de-ham it into the accumulator
      BMI clearflag  \ bit 7 set means an irrecoverable error
      STA magazine   \ save magazine number and bit 0 of packet number
      LDY datareg    \ read bits 1 to 4 of the packet number into Y
      LDA hamtable,Y \ de-ham it into the accumulator
      BMI clearflag  \ branch if an irrecoverable error
      STA packet     \ save bits 1 to 4 of the packet number
      LDA magazine   \ load magazine number and bit 0 of packet number
      CMP #&08       \ bit 3 into carry flag
      ROL packet     \ rotate bits 0 to 3 left and add bit 0
      AND #&07       \ isolate the 3 bits of the magazine number
      STA magazine   \ and store the 3 bit magazine number

Figure 2. Reading and decoding the magazine and packet numbers.
---------------------------------------------------------------


The two bytes which contain the magazine and packet numbers have to be
read and de-hammed before they can be used. If either of the two bytes
generates an irrecoverable error (ie. de-hamms to &FF) then the whole
packet must be rejected because without the information stored in the MRAG
there is no way of knowing the correct identity of the packet.

After reading and de-hamming both bytes the first nybble is loaded into
the accumulator and compared with the number 8. If the content of the
accumulator is equal to or greater than 8 then the carry flag is set. In
this way bit 3 of the first nybble, which is bit 0 of the packet number,
is transferred into the carry flag. The 4 most significant bits of the
packet number are then rotated left and the least significant bit is
placed in bit 0 of the packet number. The accumulator still contains the
first nybble which is ANDed with the number 7 to clear bit 3. The
accumulator then contains the 3 bit magazine number which can be stored
for later use and the previously incomplete 4 bit packet number is now the
correct 5 bit number.

When the magazine and packet numbers have been decoded and stored in user
memory the rest of the 40 data bytes in the row can be read if required.
In HEADER only packet 0 is read and all other packets are rejected (lines
1530 to 1540). You can easily modify this program if you want to look at
any other packets.

The program HEADER and all the Teletext demonstration programs in modules
2 to 7 use a zero page flag byte called grabflag (line 440) to indicate
when data have been transferred into user memory and are available for
display. In HEADER, grabflag can contain either the number &00 or the
number &80. The number &00 means that the data are not ready to print and
the number &80 means that the data are ready to print. The foreground task
does not return control to BASIC if grabflag contains zero (lines 780 to
790) and the background task does not read any more data if bit 7 of
grabflag is set. In this way the machine code foreground task returns
control to BASIC after 300 packets have been stored.

The program HEADER uses a machine code routine to read and store 300
headers in a buffer and, after reading the headers, returns to BASIC to
interpret and display the contents of the buffer. The table in figure 3
shows the format of the header packet. Figure 3 also shows where this
program stores the data it reads with respect to an offset 'head' in the
data buffer 'buffer'.

The byte number in the left hand column of figure 3 shows the order in
which the data are stored in the adaptor. The next column shows whether or
not the data are hamming coded (hc = hamming coded, blank = not coded),
the third column gives a brief description of the byte (or bits from the
byte), the next column shows where the byte (or bits from the byte) are
stored with respect to the offset 'head', and the last column describes
the format in which the program HEADER stores the data (blank = stored as
read).


+-------+----+---------------------------+------------------+-----------+
|byte no|code| description               | stored in        | format    |
+-------+----+---------------------------+------------------+-----------+
|  1    |    | clock run-in              | (not read)       |           |
|  2    |    | clock run-in              | (not read)       |           |
|  3    |    | framing code              | (not stored)     |           |
|  4    | hc | magazine no. in bits 0-2  | head?0           | de-hammed |
|  4    | hc | bit 0 of pack no in bit 3 | (not stored)     |           |
|  5    | hc | packet number bits 1-4    | (not stored)     |           |
|  6    | hc | page number, low nybble   | head?1           | de-hammed |
|  7    | hc | page number, high nybble  | head?2           | de-hammed |
|  8    | hc | sub-page, low nybble      | head?3           | de-hammed |
|  9    | hc | sub-page in bits 0 - 2    | head?4 bits 0-2  | de-hammed |
|  9    | hc | erase page control bit    | head?4 bit 3     | de-hammed |
| 10    | hc | sub-page                  | head?5           | de-hammed |
| 11    | hc | subpage,hi nybble,bits 0,1| head?6 bits 0,1  | de-hammed |
| 11    | hc | newsflash control bit     | head?6 bit 2     | de-hammed |
| 11    | hc | subtitle control bit      | head?6 bit 3     | de-hammed |
| 12    | hc | suppress header cont. bit | head?7 bit 0     | de-hammed |
| 12    | hc | update indicator cont bit | head?7 bit 1     | de-hammed |
| 12    | hc | out of sequence cont. bit | head?7 bit 2     | de-hammed |
| 12    | hc | inhibit display cont. bit | head?7 bit 3     | de-hammed |
| 13    | hc | serial/parallel magazine  | head?8 bit 0     | de-hammed |
| 13    | hc | language in bits 1-3      | head?8 bits 1-3  | de-hammed |
| 14-45 |    | header display message    | head?9 - head?40 |           |
+-------+----+---------------------------+------------------+-----------+

Figure 3. The data transmitted in the header packet
---------------------------------------------------


If you compare the information in figure 3 with the format of the header
made available by the ATS then it should be clear that the ATS does some
processing of the data before making them available to the user (see page
41 of the ATS User Guide). When you write a program to bypass the ATS and
interface directly with the Teletext adaptor you have to take the raw data
and process it within your own program. You must not assume that the data
are in the familiar ATS format. If, however, you need to use packet 27 to
find the page links or the CRC bytes you will find that the description of
the last 40 bytes of the packet in the ATS manual will also apply to bytes
6 to 45 of packet 27 taken directly from the adaptor.

The first 5 bytes of the header are in the same format as the first 5
bytes of all Teletext packets. They are therefore read and decoded in the
same way as all packets.

The packet number of the header is zero. Packet zero is the only packet to
contain the page number. All packets (except 30 and 31) received after a
packet zero, which also have the same magazine number as the packet zero,
are assumed to be in the same page. The page changes when a different
packet zero in the same magazine is received.

A sub-page number can be extracted from the de-hammed 8th, 9th, 10th, and
11th bytes of packet zero. The low order nybble is in the eighth byte and
is stored by the program HEADER in head?3. The next (3 bit) nybble is in
bits 0, 1 and 2 of the ninth byte and is stored in head?4. The next nybble
of the sub-page number is in the tenth byte and stored in head?5. The high
order (2 bit) nybble is in bits 0 and 1 of the eleventh byte and stored in
head?6. This strange use of different numbers of bits for the digits in
the sub-page number has its origins in the now largely obsolete time
sub-code.

Originally the sub-page number was designed to reflect the time of day and
it was allocated four hex digits to correspond directly with hours and
minutes. The time has a range from 0000 (midnight) to 2359 (11:59 pm). The
range of BCD digits needed to store the time of day requires 2 bits for
the first digit (0-2), 4 for the second (0-9), 3 for the third (0-5) and 4
for the last (0-9). The sub-page code can therefore be a maximum of &3F7F
and up to 3200 sub-pages can be associated with any page. Not all the
codes between 0 an &3F7F are possible, for example, a sub-page code of
&0080 is not possible, as the third digit cannot exceed 7.

The Alarm clock on CEEFAX page 196 is the only page that is now
transmitted using the sub-page coding as a time-code. Requesting the alarm
at, for example, 17:30, is in fact the same as requesting page 196
sub-page 1730, which is broadcast at exactly 5:30 pm. All the other
cycling sub-pages use the sub-page number as a means to differentiate
between consecutive pages in a rolling sequence.

The control bits broadcast in the header packet will be used in modules 3
and 4 when the design of page grabbers will be considered. There are 8
control bits which are used and 3 unused control bits. The control bits
have the following locations and interpretations:


Erase page.

Broadcast in byte 9, bit 3. (Stored in head?4, bit 3)
If a decoder receives a page containing less than 23 packets it must know
whether these are to be simply overlaid on a previously received page with
the same page number or if the previous text is to be erased before
updating. If the erase page bit is set, it will do the latter. If the
erase-bit is clear it should overlay the information without erasing the
previous page.


Newsflash.

Broadcast in byte 11, bit 2. (Stored in head?6, bit 2)
Newsflashes and subtitles are designed to be mixed with normal TV
pictures and are recognised by Teletext television sets by their control
bits. They are not displayed by the ATS Teletext terminal mode because the
Acorn adaptor cannot mix television and Teletext signals.


Subtitle.

Broadcast in byte 11, bit 3. (Stored in head?6, bit 3)
As with the newsflash pages, subtitles are mixed with the normal TV
picture. Subtitles are not displayed by the ATS Teletext terminal.


Suppress header.

Broadcast in byte 12, bit 0. (Stored in head?7, bit 0)
Normally all the page headers are displayed as they are received. This
ensures the time displayed in the header is kept reasonably accurate, and
the cycling page numbers can be seen. The headers of some pages are not
displayed by Teletext television sets. At the moment the BBC Telesoftware
pages and all pages in the alphabetic range of hexadecimal numbers have
the display of their headers suppressed.


Update indicator.

Broadcast in byte 12, bit 1. (Stored in head?7 bit 1)
The update indicator bit indicates whether the content of the page has
been altered since its last broadcast. When this bit is set the page may
be incomplete, containing only the updated packets of a page.


Out of Sequence.

Broadcast in byte 12, bit 2. (Stored in head?7, bit 2)
This bit is set when a page is broadcast out of strict numerical sequence
in order to give it priority (such as a subtitle) or more frequent
transmission (such as an index page). In order to keep a steady appearance
to the cycling page number display the headers of out of sequence pages
are not displayed. There may be times when a decoder will need to
differentiate between a suppressed header from an in sequence page, and an
unsuppressed header from an out of sequence page, and so the two
conditions are allocated separate control bits.


Inhibit display.

Broadcast in byte 12, bit 3. (Stored in head?7, bit 3)
BBC Telesoftware pages often have the inhibit display bit set to suppress
the display of the Telesoftware file. These files are for computer use
only and may cause some confusion if displayed by a Teletext television
set.


Serial magazine.

Broadcast in byte 13, bit 0. (Stored in head?8, bit 0)
Magazines on Teletext are either serial (BBC 1, BBC 2 and Channel 4) or
parallel (ITV network). The BBC 2 serial transmissions broadcast each page
from magazine 2 followed by each page from magazine 3 then each page from
magazine 7. The parallel transmissions on the ITV network have packets
from the pages in each magazine interleaved with the packets from a
different magazine. Currently ITV use four lines for their national
magazine (100 series pages), and three lines for the regional magazine
(200 series pages).

Parallel transmission needn't use a fixed number of lines however, and an
intelligent transmission system could give extra lines to the 'other'
magazine if the first would otherwise only transmit 'dummy' headers (page
xFF). However, this needs more complicated transmission software than is
currently available.

When the serial magazine control bit is set, all page headers are
displayed as rolling headers. When this bit is clear only headers from the
current magazine are displayed. This gives the illusion of speed, but it
is just an illusion.


Language

Broadcast in byte 13, bits 1-3. (Stored in head?8, bits 1-3)
These three control bits specify which language the page is in, and hence
which character set is required. Some characters of the standard Latin
Alphabet character set (as used by ASCII) are changed to suit different
languages. The changes for the English language are those characters that
are different in Mode 7 to the other BBC screen modes, the Pound, Divide,
and fraction symbols for example. The allocation is as follows:

                       Bits    Language
                       321
                       ---     --------
                       000     English
                       001     French
                       010     Swedish/Finnish
                       011     Czechoslovak
                       100     German
                       101     Portuguese/Spanish
                       110     Italian
                       111     (reserved)



The way in which a Teletext TV responds to the control bits is pre-
determined and unalterable by the viewer. When the design of page grabbers
is considered in the next two modules you will learn how to use these
control bits so that, for example, you can design a page grabber which
will allow you to see the screens which have the inhibit display bit set.

Chain the program HEADER and select a channel. The program will load and
display 300 header packets and interpret all the control bits for each
header. Press the Shift key to scroll through the display.

Both BBC 1 and BBC 2 broadcast serial magazines but the ITV network
stations broadcast parallel magazines. A Teletext page can be defined as
beginning with, and including, its page header and ending with, and
excluding, the next page header with the same magazine number. All the
intermediate packets with the same magazine number relate to the selected
page. This definition needs to be qualified because the program HEADER
will show you that up to ten headers are broadcast for each page. A more
complete definition of a Teletext page should include the following
qualifications:


1) A header with a page number FF and the same magazine number as a
previous header can be used to indicate the end of a page. For example,
header 1FF indicates the end of any page in magazine 1, 2FF indicates the
end of any page in magazine 2, and so on. The IBA use page number FF
extensively, the BBC use it less often.

2) A header with the same magazine number but a different page number to a
previous header marks the end of one page and, if the page number is not
FF, the start of the next page.

3) All the packets within a page have the same magazine number.

4) Packets 30 and 31 are, by definition, independent of any page.


When the header packets are considered as described above it much easier
to deal with the multiple headers of both serial and parallel magazines
and to understand how the interleaved pages in parallel magazines can be
loaded from the adaptor without mixing the different pages of the parallel
magazines. This will be dealt with in the next module.


   10 REM> HEADER
   20 MODE7
   30 VDU14
   40 DIM mcode &300 :REM: space for machine code
   50 DIM buffer &3300 :REM: buffer for 300 headers
   60 PROCmcode :REM: assemble machine code
   70 INPUT"TV channel (1-4) = "answer$
   80 channel?0=EVAL("&"+LEFT$(answer$,1))+&1B :REM: TTX enable,
      Int enable, AFC
   90 IF channel?0 < &1C THEN channel?0 = &1C
  100 IF channel?0 > &1F THEN channel?0 = &1F
  110 PRINT"Reading TTX - Please wait"
  120 CALL mcode :REM: read 300 headers and store in buffer
  130 control$=STRING$(60," ")
  140 end=buffer+(300*41) :REM: end of buffer
  150 FOR head = buffer TO end STEP 41
  160 control$=""
  170 PRINT;~head?0;~head?2;~head?1;:REM: magazine and page numbers
  180 PRINT;~(head?6)AND3;~head?5;~(head?4)AND7;~head?3;
      :REM: sub-page number
  190 erase=((head?4)AND8)<>0 :REM: erase page
  200 news=((head?6)AND4)<>0 :REM: newsflash
  210 subtitle=((head?6)AND8)<>0 :REM: subtitle
  220 suppress=((head?7)AND1)<>0 :REM: suppress header
  230 update=((head?7)AND2)<>0 :REM: update indicator
  240 outofseq=((head?7)AND4)<>0 :REM: out of sequence
  250 inhibit=((head?7)AND8)<>0 :REM: inhibit display
  260 serial=((head?8)AND1)<>0 :REM: serial magazine
  270 IF erase control$=control$+" Erase,"
  280 IF news control$=control$+" News,"
  290 IF subtitle control$=control$+" Sub-T,"
  300 IF suppress control$=control$+" Supp,"
  310 IF update control$=control$+" Update,"
  320 IF outofseq control$=control$+" Out-Seq,"
  330 IF inhibit control$=control$+" Inhibit,"
  340 IF serial control$=control$+" Serial"
      ELSE control$=control$+" Para."
  350 PRINT control$ :REM: explain the control bits
  360 FOR byte=9 TO 40
  370 VDU ((head?byte) OR &80):REM: display header
  380 NEXT
  390 PRINT
  400 NEXT
  410 VDU15
  420 END
  430 DEFPROCmcode
  440 grabflag=&70 :REM: header grab flag
  450 channel=&71 :REM: TV channel
  460 workspace=&72 :REM: 2 byte workspace
  470 magazine=&74 :REM: magazine number
  480 packet=&75 :REM: packet number
  490 irq2v=&206 :REM: IRQ2 vector
  500 ttxcontrol=&FC10 :REM: TTX control register, write only
  510 ttxstatus=&FC10 :REM: TTX status register, read only
  520 rowreg=&FC11 :REM: TTX row register, write only
  530 datareg=&FC12 :REM: TTX data register, read & write
  540 statclr=&FC13 :REM: TTX clear status register, read & write
  550 osbyte=&FFF4
  560 FOR pass=0 TO 2 STEP 2
  570 P%=mcode
  580 [       OPT pass
  590         LDA #&00
  600         STA grabflag  \ when grabflag = 0 read and store headers
  610         LDX #buffer MOD 256 \ address of the start of the buffer
  620         LDY #buffer DIV 256
  630         STX workspace \ into zero page for indirect addressing
  640         STY workspace+1
  650         LDX irq2v     \ load secondary interrupt vector
  660         LDY irq2v+1
  670         STX oldirq2v  \ save secondary interrupt vector
  680         STY oldirq2v+1
  690         LDX #interrupt MOD 256 \ install new interrupt routine
  700         LDY #interrupt DIV 256
  710         SEI           \ disable interrupts when vectors are altered
  720         STX irq2v
  730         STY irq2v+1
  740         CLI           \ re-enable interrupts
  750         LDA channel   \ load (channel number + #&1C)
  760         STA ttxcontrol \ enable TTX
  770 .mainloop
  780         BIT grabflag  \ grabflag = &80 when buffer full
  790         BMI allover   \ branch if buffer full
  800         BIT &FF       \ poll escape flag
  810         BPL mainloop  \ loop if escape not pressed
  820         LDA #&7E      \ decimal 126
  830         JSR osbyte    \ acknowledge escape
  840 .allover
  850         LDA #&00
  860         STA ttxcontrol \ disable TTX
  870         LDX oldirq2v  \ load original vector
  880         LDY oldirq2v+1
  890         SEI           \ disable interrupts when vectors are altered
  900         STX irq2v     \ restore original vector
  910         STY irq2v+1
  920         CLI           \ re-enable interrupts
  930         RTS           \ return to BASIC
  940 .interrupt
  950         BIT ttxstatus \ poll TTX hardware
  960         BMI ttxinter  \ branch if TTX interrupt
  970         JMP (oldirq2v) \ not TTX interrupt
  980 .ttxinter
  990         LDA &FC       \ interrupt accumulator save register
 1000         PHA           \ push interrupt accumulator save register
 1010         TXA
 1020         PHA           \ push X
 1030         TYA
 1040         PHA           \ push Y
 1050         BIT grabflag  \ are headers still being collected?
 1060         BMI clearstatus \ clear status and RTI if finished
 1070         CLD           \ clear decimal flag
 1080         LDY #&00      \ start with row 0
 1090 .readttxt
 1100         STY rowreg    \ try rows 0 to 15
 1110         LDA datareg   \ load framing code (#&27)
 1120         BEQ emptyrow  \ if zero try next row
 1130         TYA
 1140         PHA           \ save row number
 1150         JSR readpacket \ look for headers and load if found
 1160         PLA
 1170         TAY           \ restore row number
 1180 .emptyrow
 1190         INY           \ increment row number
 1200         CPY #&10      \ try rows 0 - 15
 1210         BNE readttxt
 1220 .clearstatus
 1230         LDA #&00
 1240         LDY #&0F      \ clear 16 rows in adaptor
 1250 .clearloop
 1260         STY rowreg
 1270         STA datareg
 1280         DEY
 1290         BPL clearloop
 1300         STA statclr   \ clear status flags before returning
 1310         PLA
 1320         TAY           \ restore Y
 1330         PLA
 1340         TAX           \ restore X
 1350         PLA
 1360         STA &FC       \ restore interrupt accumulator save register
 1370         RTI           \ return from interrupt
 1380 .readpacket
 1390         LDY datareg   \ read magazine number
 1400         LDA hamtable,Y \ de-ham it
 1410         BMI return    \ stop loading if error
 1420         STA magazine  \ save magazine number
 1430         LDY datareg   \ read packet number
 1440         LDA hamtable,Y \ de-ham it
 1450         BMI return    \ stop loading if error
 1460         STA packet    \ save packet number
 1470         LDA magazine  \ load magazine number
 1480         CMP #&08      \ bit 3 of mag. number is bit 0 of packet
                            \ number
 1490         ROL packet    \ 5 bit packet number
 1500         AND #&07      \ use only bits 0-2
 1510         LDY #&00
 1520         STA (workspace),Y \ store magazine number
 1530         LDA packet    \ header packet number is zero
 1540         BNE return    \ return if not header
 1550 .readheader
 1560         INY           \ Y = 1-40
 1570         LDX datareg   \ read data register
 1580         LDA hamtable,X \ de-ham it
 1590         BMI return    \ stop loading if error
 1600         STA (workspace),Y \ store de-hammed data
 1610         CPY #&08      \ use Y = 1-8 for 8 bytes of hammed data
 1620         BCC readheader \ continue reading hammed data
 1630 .readmore
 1640         INY
 1650         LDA datareg   \ read data register, not hammed
 1660         ORA #&80      \ set bit 7
 1670         STA (workspace),Y \ store in buffer
 1680         CPY #&28      \ decimal 40
 1690         BNE readmore  \ go back for more
 1700         CLC           \ clear carry for addition
 1710         LDA workspace
 1720         ADC #&29      \ add 41 to point to next part of the buffer
 1730         STA workspace
 1740         LDA workspace+1
 1750         ADC #&00
 1760         STA workspace+1
 1770         CMP #(buffer+&3300) DIV 256 \ is there room for more data?
 1780         BCC return    \ branch if there is more room
 1790         LDA #&80
 1800         STA grabflag  \ mark buffer as full
 1810 .return
 1820         RTS           \ return to look at next TTX row
 1830 .oldirq2v
 1840         EQUW &00
 1850 .hamtable
 1860         EQUD &0101FF01 
 1870         EQUD &FF0100FF 
 1880         EQUD &FF0102FF 
 1890         EQUD &07FFFF0A
 1900         EQUD &FF0100FF 
 1910         EQUD &00FF0000 
 1920         EQUD &0BFFFF06 
 1930         EQUD &FF0300FF
 1940         EQUD &FF010CFF 
 1950         EQUD &07FFFF04 
 1960         EQUD &07FFFF06 
 1970         EQUD &070707FF
 1980         EQUD &05FFFF06 
 1990         EQUD &FF0D00FF 
 2000         EQUD &FF060606 
 2010         EQUD &07FFFF06
 2020         EQUD &FF0102FF 
 2030         EQUD &09FFFF04 
 2040         EQUD &02FF0202 
 2050         EQUD &FF0302FF
 2060         EQUD &05FFFF08 
 2070         EQUD &FF0300FF 
 2080         EQUD &FF0302FF 
 2090         EQUD &0303FF03
 2100         EQUD &05FFFF04 
 2110         EQUD &FF040404 
 2120         EQUD &FF0F02FF 
 2130         EQUD &07FFFF04
 2140         EQUD &050505FF 
 2150         EQUD &05FFFF04 
 2160         EQUD &05FFFF06 
 2170         EQUD &FF030EFF
 2180         EQUD &FF010CFF 
 2190         EQUD &09FFFF0A 
 2200         EQUD &0BFFFF0A 
 2210         EQUD &FF0A0A0A
 2220         EQUD &0BFFFF08 
 2230         EQUD &FF0D00FF 
 2240         EQUD &0B0B0BFF 
 2250         EQUD &0BFFFF0A
 2260         EQUD &0CFF0C0C 
 2270         EQUD &FF0D0CFF 
 2280         EQUD &FF0F0CFF 
 2290         EQUD &07FFFF0A
 2300         EQUD &FF0D0CFF 
 2310         EQUD &0D0DFF0D 
 2320         EQUD &0BFFFF06 
 2330         EQUD &FF0D0EFF
 2340         EQUD &09FFFF08 
 2350         EQUD &090909FF 
 2360         EQUD &FF0F02FF 
 2370         EQUD &09FFFF0A
 2380         EQUD &FF080808 
 2390         EQUD &09FFFF08 
 2400         EQUD &0BFFFF08 
 2410         EQUD &FF030EFF
 2420         EQUD &FF0F0CFF 
 2430         EQUD &09FFFF04 
 2440         EQUD &0F0FFF0F 
 2450         EQUD &FF0F0EFF
 2460         EQUD &05FFFF08 
 2470         EQUD &FF0D0EFF 
 2480         EQUD &FF0F0EFF 
 2490         EQUD &0EFF0E0E
 2500 ]
 2510 NEXT
 2520 ENDPROC
00000000  49 6e 74 65 72 66 61 63  69 6e 67 20 77 69 74 68  |Interfacing with|
00000010  20 74 68 65 20 41 63 6f  72 6e 20 54 65 6c 65 74  | the Acorn Telet|
00000020  65 78 74 20 41 64 61 70  74 6f 72 20 2d 20 62 79  |ext Adaptor - by|
00000030  20 2d 20 47 6f 72 64 6f  6e 20 48 6f 72 73 69 6e  | - Gordon Horsin|
00000040  67 74 6f 6e 0d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |gton.-----------|
00000050  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000080  2d 2d 2d 2d 2d 2d 2d 2d  2d 0d 0d 4d 6f 64 75 6c  |---------..Modul|
00000090  65 20 32 2e 20 54 68 65  20 68 65 61 64 65 72 20  |e 2. The header |
000000a0  70 61 63 6b 65 74 0d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |packet.---------|
000000b0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
000000c0  2d 2d 0d 0d 54 68 65 72  65 20 61 72 65 20 33 32  |--..There are 32|
000000d0  20 54 65 6c 65 74 65 78  74 20 70 61 63 6b 65 74  | Teletext packet|
000000e0  73 2c 20 6e 75 6d 62 65  72 65 64 20 30 20 74 6f  |s, numbered 0 to|
000000f0  20 33 31 2e 20 45 61 63  68 20 70 61 63 6b 65 74  | 31. Each packet|
00000100  20 69 73 20 62 72 6f 61  64 63 61 73 74 0d 61 73  | is broadcast.as|
00000110  20 34 35 20 62 79 74 65  73 2c 20 61 6e 64 20 34  | 45 bytes, and 4|
00000120  33 20 6f 66 20 74 68 65  73 65 20 62 79 74 65 73  |3 of these bytes|
00000130  20 61 72 65 20 61 76 61  69 6c 61 62 6c 65 20 66  | are available f|
00000140  72 6f 6d 20 74 68 65 20  41 63 6f 72 6e 20 54 65  |rom the Acorn Te|
00000150  6c 65 74 65 78 74 0d 61  64 61 70 74 6f 72 2e 20  |letext.adaptor. |
00000160  45 76 65 72 79 20 70 61  63 6b 65 74 20 68 61 73  |Every packet has|
00000170  20 74 68 65 20 66 6f 72  6d 61 74 20 73 68 6f 77  | the format show|
00000180  6e 20 69 6e 20 66 69 67  75 72 65 20 31 2e 0d 0d  |n in figure 1...|
00000190  0d 2b 2d 2d 2d 2d 2d 2d  2b 2d 2d 2d 2d 2d 2d 2b  |.+------+------+|
000001a0  2d 2d 2d 2d 2d 2d 2d 2b  2d 2d 2d 2d 2d 2d 2b 2d  |-------+------+-|
000001b0  2d 2d 2d 2d 2d 2b 2d 2d  2d 20 20 20 20 20 20 2d  |-----+---      -|
000001c0  2d 2d 2b 0d 7c 20 20 20  20 43 6c 6f 63 6b 20 20  |--+.|    Clock  |
000001d0  20 20 7c 46 72 61 6d 69  6e 67 7c 20 4d 61 67 20  |  |Framing| Mag |
000001e0  61 6e 64 20 52 6f 77 20  7c 20 20 34 30 20 62 79  |and Row |  40 by|
000001f0  74 65 73 20 20 7c 0d 7c  20 20 20 20 72 75 6e 2d  |tes  |.|    run-|
00000200  69 6e 20 20 20 7c 63 6f  64 65 20 20 20 7c 20 41  |in   |code   | A|
00000210  64 64 72 20 47 72 6f 75  70 20 20 7c 20 20 6f 66  |ddr Group  |  of|
00000220  20 64 61 74 61 20 20 20  7c 0d 2b 2d 2d 2d 2d 2d  | data   |.+-----|
00000230  2d 2b 2d 2d 2d 2d 2d 2d  2b 2d 2d 2d 2d 2d 2d 2d  |-+------+-------|
00000240  2b 2d 2d 2d 2d 2d 2d 2b  2d 2d 2d 2d 2d 2d 2b 2d  |+------+------+-|
00000250  2d 2d 20 20 20 20 20 20  2d 2d 2d 2b 0d 20 20 20  |--      ---+.   |
00000260  31 20 20 20 20 20 20 32  20 20 20 20 20 20 20 33  |1      2       3|
00000270  20 20 20 20 20 20 34 20  20 20 20 20 20 35 20 20  |      4      5  |
00000280  20 20 20 36 20 20 20 20  2d 20 20 20 34 35 20 20  |   6    -   45  |
00000290  62 79 74 65 20 6e 75 6d  62 65 72 0d 0d 46 69 67  |byte number..Fig|
000002a0  75 72 65 20 31 2e 20 54  68 65 20 64 61 74 61 20  |ure 1. The data |
000002b0  74 72 61 6e 73 6d 69 74  74 65 64 20 69 6e 20 61  |transmitted in a|
000002c0  20 54 65 6c 65 74 65 78  74 20 70 61 63 6b 65 74  | Teletext packet|
000002d0  0d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |.---------------|
000002e0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000300  2d 2d 2d 2d 0d 0d 0d 54  68 65 20 66 69 72 73 74  |----...The first|
00000310  20 74 77 6f 20 62 79 74  65 73 20 6f 66 20 65 76  | two bytes of ev|
00000320  65 72 79 20 70 61 63 6b  65 74 20 63 6f 6d 70 72  |ery packet compr|
00000330  69 73 65 20 74 68 65 20  63 6c 6f 63 6b 20 72 75  |ise the clock ru|
00000340  6e 2d 69 6e 20 73 65 71  75 65 6e 63 65 20 6f 66  |n-in sequence of|
00000350  0d 61 6c 74 65 72 6e 61  74 69 6e 67 20 62 69 74  |.alternating bit|
00000360  73 2c 20 62 65 67 69 6e  6e 69 6e 67 20 31 30 31  |s, beginning 101|
00000370  30 31 30 2e 2e 2e 20 61  6e 64 20 73 6f 20 6f 6e  |010... and so on|
00000380  2e 20 54 68 65 73 65 20  74 77 6f 20 62 79 74 65  |. These two byte|
00000390  73 20 61 72 65 20 75 73  65 64 0d 74 6f 20 69 6e  |s are used.to in|
000003a0  64 69 63 61 74 65 20 74  68 65 20 70 72 65 73 65  |dicate the prese|
000003b0  6e 63 65 20 6f 66 20 61  20 64 61 74 61 20 70 61  |nce of a data pa|
000003c0  63 6b 65 74 20 61 6e 64  20 74 6f 20 65 73 74 61  |cket and to esta|
000003d0  62 6c 69 73 68 20 74 68  65 20 74 69 6d 69 6e 67  |blish the timing|
000003e0  20 6f 66 0d 74 68 65 20  62 69 74 73 20 69 6e 20  | of.the bits in |
000003f0  74 68 61 74 20 70 61 63  6b 65 74 2e 0d 0d 54 68  |that packet...Th|
00000400  65 20 74 68 69 72 64 20  62 79 74 65 20 6f 66 20  |e third byte of |
00000410  65 76 65 72 79 20 70 61  63 6b 65 74 20 69 73 20  |every packet is |
00000420  74 68 65 20 66 72 61 6d  69 6e 67 20 63 6f 64 65  |the framing code|
00000430  20 25 31 31 31 30 30 31  30 30 2e 20 54 68 69 73  | %11100100. This|
00000440  20 63 6f 64 65 0d 77 61  73 20 73 65 6c 65 63 74  | code.was select|
00000450  65 64 20 74 6f 20 65 6e  61 62 6c 65 20 62 79 74  |ed to enable byt|
00000460  65 20 73 79 6e 63 68 72  6f 6e 69 73 61 74 69 6f  |e synchronisatio|
00000470  6e 20 74 6f 20 62 65 20  65 73 74 61 62 6c 69 73  |n to be establis|
00000480  68 65 64 20 65 76 65 6e  20 69 66 20 6f 6e 65 0d  |hed even if one.|
00000490  62 69 74 20 6f 66 20 74  68 65 20 66 72 61 6d 69  |bit of the frami|
000004a0  6e 67 20 63 6f 64 65 20  62 79 74 65 20 68 61 73  |ng code byte has|
000004b0  20 62 65 65 6e 20 77 72  6f 6e 67 6c 79 20 72 65  | been wrongly re|
000004c0  63 65 69 76 65 64 2e 20  54 68 65 20 66 72 61 6d  |ceived. The fram|
000004d0  69 6e 67 20 63 6f 64 65  0d 62 79 74 65 20 63 61  |ing code.byte ca|
000004e0  6e 20 62 65 20 72 65 61  64 20 66 72 6f 6d 20 74  |n be read from t|
000004f0  68 65 20 61 64 61 70 74  6f 72 20 61 73 20 74 68  |he adaptor as th|
00000500  65 20 6e 75 6d 62 65 72  20 26 32 37 2c 20 25 30  |e number &27, %0|
00000510  30 31 30 30 31 31 31 2c  20 69 65 2e 20 77 69 74  |0100111, ie. wit|
00000520  68 0d 61 6c 6c 20 74 68  65 20 62 69 74 73 20 69  |h.all the bits i|
00000530  6e 20 74 68 65 20 62 79  74 65 20 72 65 76 65 72  |n the byte rever|
00000540  73 65 64 2e 0d 0d 54 68  65 20 6d 61 67 61 7a 69  |sed...The magazi|
00000550  6e 65 20 61 6e 64 20 70  61 63 6b 65 74 20 6e 75  |ne and packet nu|
00000560  6d 62 65 72 73 20 61 72  65 20 62 72 6f 61 64 63  |mbers are broadc|
00000570  61 73 74 20 69 6e 20 74  68 65 20 6e 65 78 74 20  |ast in the next |
00000580  74 77 6f 20 62 79 74 65  73 2c 20 6b 6e 6f 77 6e  |two bytes, known|
00000590  0d 61 73 20 74 68 65 20  4d 61 67 61 7a 69 6e 65  |.as the Magazine|
000005a0  20 61 6e 64 20 52 6f 77  20 41 64 64 72 65 73 73  | and Row Address|
000005b0  20 47 72 6f 75 70 20 28  4d 52 41 47 29 2e 20 52  | Group (MRAG). R|
000005c0  6f 77 73 20 6f 66 20 54  65 6c 65 74 65 78 74 20  |ows of Teletext |
000005d0  64 61 74 61 20 68 61 76  65 0d 62 65 65 6e 20 72  |data have.been r|
000005e0  65 6e 61 6d 65 64 20 70  61 63 6b 65 74 73 20 62  |enamed packets b|
000005f0  75 74 20 74 68 65 20 74  65 72 6d 73 20 72 6f 77  |ut the terms row|
00000600  20 61 6e 64 20 70 61 63  6b 65 74 20 74 65 6e 64  | and packet tend|
00000610  20 74 6f 20 62 65 20 75  73 65 64 0d 69 6e 74 65  | to be used.inte|
00000620  72 63 68 61 6e 67 65 61  62 6c 79 2e 20 54 68 65  |rchangeably. The|
00000630  20 52 6f 77 20 69 6e 20  4d 52 41 47 20 72 65 66  | Row in MRAG ref|
00000640  65 72 73 20 74 6f 20 74  68 65 20 70 61 63 6b 65  |ers to the packe|
00000650  74 20 61 64 64 72 65 73  73 2e 20 42 65 63 61 75  |t address. Becau|
00000660  73 65 20 6f 66 0d 74 68  65 20 70 6f 73 73 69 62  |se of.the possib|
00000670  6c 65 20 63 6f 6e 66 75  73 69 6f 6e 20 74 68 61  |le confusion tha|
00000680  74 20 63 61 6e 20 62 65  20 63 61 75 73 65 64 20  |t can be caused |
00000690  62 79 20 74 68 65 20 69  6e 74 65 72 63 68 61 6e  |by the interchan|
000006a0  67 65 61 62 6c 65 20 75  73 65 20 6f 66 0d 74 68  |geable use of.th|
000006b0  65 73 65 20 74 65 72 6d  73 20 49 20 77 69 6c 6c  |ese terms I will|
000006c0  20 75 73 65 20 72 6f 77  20 74 6f 20 72 65 66 65  | use row to refe|
000006d0  72 20 74 6f 20 74 68 65  20 31 36 20 2a 20 36 34  |r to the 16 * 64|
000006e0  20 62 79 74 65 20 72 6f  77 73 20 6f 66 20 6d 65  | byte rows of me|
000006f0  6d 6f 72 79 20 69 6e 0d  74 68 65 20 54 65 6c 65  |mory in.the Tele|
00000700  74 65 78 74 20 61 64 61  70 74 6f 72 20 61 6e 64  |text adaptor and|
00000710  20 70 61 63 6b 65 74 20  74 6f 20 72 65 66 65 72  | packet to refer|
00000720  20 74 6f 20 74 68 65 20  72 6f 77 73 20 6f 66 20  | to the rows of |
00000730  54 65 6c 65 74 65 78 74  20 64 61 74 61 0d 77 68  |Teletext data.wh|
00000740  69 63 68 20 61 72 65 20  73 74 6f 72 65 64 20 69  |ich are stored i|
00000750  6e 20 74 68 65 20 61 64  61 70 74 6f 72 27 73 20  |n the adaptor's |
00000760  6d 65 6d 6f 72 79 2e 0d  0d 54 68 65 20 66 6f 75  |memory...The fou|
00000770  72 74 68 20 61 6e 64 20  66 69 66 74 68 20 62 79  |rth and fifth by|
00000780  74 65 20 6f 66 20 65 76  65 72 79 20 70 61 63 6b  |te of every pack|
00000790  65 74 2c 20 61 6e 64 20  61 20 6e 75 6d 62 65 72  |et, and a number|
000007a0  20 6f 66 20 6f 74 68 65  72 20 62 79 74 65 73 20  | of other bytes |
000007b0  69 6e 0d 73 70 65 63 69  66 69 63 20 70 61 63 6b  |in.specific pack|
000007c0  65 74 73 2c 20 61 72 65  20 68 61 6d 6d 69 6e 67  |ets, are hamming|
000007d0  20 63 6f 64 65 73 20 77  68 69 63 68 20 63 6f 6e  | codes which con|
000007e0  74 61 69 6e 20 34 20 6d  65 73 73 61 67 65 20 62  |tain 4 message b|
000007f0  69 74 73 0d 69 6e 74 65  72 6c 65 61 76 65 64 20  |its.interleaved |
00000800  77 69 74 68 20 34 20 70  72 6f 74 65 63 74 69 6f  |with 4 protectio|
00000810  6e 20 62 69 74 73 2e 20  44 65 63 6f 64 69 6e 67  |n bits. Decoding|
00000820  20 74 68 65 20 68 61 6d  6d 69 6e 67 20 63 6f 64  | the hamming cod|
00000830  65 64 20 62 79 74 65 73  20 69 6e 74 6f 0d 34 20  |ed bytes into.4 |
00000840  62 69 74 20 6e 79 62 62  6c 65 73 20 63 61 6e 20  |bit nybbles can |
00000850  63 6f 72 72 65 63 74 20  73 69 6e 67 6c 65 20 65  |correct single e|
00000860  72 72 6f 72 73 20 69 6e  20 74 68 65 20 72 65 63  |rrors in the rec|
00000870  65 69 76 65 64 20 62 79  74 65 20 61 6e 64 20 64  |eived byte and d|
00000880  65 74 65 63 74 0d 6d 75  6c 74 69 70 6c 65 20 65  |etect.multiple e|
00000890  72 72 6f 72 73 2e 0d 0d  54 68 65 20 74 77 6f 20  |rrors...The two |
000008a0  4d 52 41 47 20 62 79 74  65 73 20 61 72 65 20 68  |MRAG bytes are h|
000008b0  61 6d 6d 69 6e 67 20 63  6f 64 65 64 20 61 6e 64  |amming coded and|
000008c0  20 6d 75 73 74 20 62 65  20 64 65 63 6f 64 65 64  | must be decoded|
000008d0  20 62 65 66 6f 72 65 20  74 68 65 79 20 63 61 6e  | before they can|
000008e0  0d 62 65 20 75 73 65 64  2e 20 45 61 63 68 20 62  |.be used. Each b|
000008f0  79 74 65 20 64 65 63 6f  64 65 73 20 69 6e 74 6f  |yte decodes into|
00000900  20 61 20 34 20 62 69 74  20 6e 79 62 62 6c 65 2e  | a 4 bit nybble.|
00000910  20 54 68 65 20 6d 61 67  61 7a 69 6e 65 20 6e 75  | The magazine nu|
00000920  6d 62 65 72 20 69 73 20  61 20 33 0d 62 69 74 20  |mber is a 3.bit |
00000930  6e 75 6d 62 65 72 20 61  6e 64 20 74 68 65 20 70  |number and the p|
00000940  61 63 6b 65 74 20 6e 75  6d 62 65 72 20 75 73 65  |acket number use|
00000950  73 20 35 20 62 69 74 73  2e 20 57 68 65 6e 20 79  |s 5 bits. When y|
00000960  6f 75 20 69 6e 74 65 72  66 61 63 65 20 64 69 72  |ou interface dir|
00000970  65 63 74 6c 79 0d 77 69  74 68 20 74 68 65 20 61  |ectly.with the a|
00000980  64 61 70 74 6f 72 2c 20  79 6f 75 20 68 61 76 65  |daptor, you have|
00000990  20 74 6f 20 64 65 63 6f  64 65 20 74 68 65 20 33  | to decode the 3|
000009a0  20 61 6e 64 20 35 20 62  69 74 20 6e 75 6d 62 65  | and 5 bit numbe|
000009b0  72 73 20 66 72 6f 6d 20  74 68 65 73 65 0d 74 77  |rs from these.tw|
000009c0  6f 20 6e 79 62 62 6c 65  73 2e 20 54 68 65 20 34  |o nybbles. The 4|
000009d0  30 20 62 79 74 65 73 20  6f 66 20 64 61 74 61 20  |0 bytes of data |
000009e0  77 68 69 63 68 20 66 6f  6c 6c 6f 77 20 74 68 65  |which follow the|
000009f0  20 6d 61 67 61 7a 69 6e  65 20 61 6e 64 20 70 61  | magazine and pa|
00000a00  63 6b 65 74 0d 6e 75 6d  62 65 72 73 20 68 61 76  |cket.numbers hav|
00000a10  65 20 61 20 76 61 72 69  61 62 6c 65 20 66 6f 72  |e a variable for|
00000a20  6d 61 74 20 77 68 69 63  68 20 64 65 70 65 6e 64  |mat which depend|
00000a30  73 20 75 70 6f 6e 20 74  68 65 20 70 61 63 6b 65  |s upon the packe|
00000a40  74 20 6e 75 6d 62 65 72  2e 0d 0d 50 61 63 6b 65  |t number...Packe|
00000a50  74 20 30 20 69 73 20 6b  6e 6f 77 6e 20 61 73 20  |t 0 is known as |
00000a60  74 68 65 20 50 61 67 65  20 48 65 61 64 65 72 2e  |the Page Header.|
00000a70  20 50 61 63 6b 65 74 20  30 20 63 6f 6e 74 61 69  | Packet 0 contai|
00000a80  6e 73 20 38 20 61 64 64  69 74 69 6f 6e 61 6c 0d  |ns 8 additional.|
00000a90  68 61 6d 6d 69 6e 67 20  63 6f 64 65 64 20 62 79  |hamming coded by|
00000aa0  74 65 73 20 77 68 69 63  68 20 64 65 63 6f 64 65  |tes which decode|
00000ab0  20 74 6f 20 67 69 76 65  20 74 68 65 20 70 61 67  | to give the pag|
00000ac0  65 20 61 6e 64 20 73 75  62 2d 70 61 67 65 20 6e  |e and sub-page n|
00000ad0  75 6d 62 65 72 73 20 61  6e 64 0d 61 20 73 65 72  |umbers and.a ser|
00000ae0  69 65 73 20 6f 66 20 63  6f 6e 74 72 6f 6c 20 62  |ies of control b|
00000af0  69 74 73 2e 20 49 74 20  61 6c 73 6f 20 63 6f 6e  |its. It also con|
00000b00  74 61 69 6e 73 20 74 68  65 20 68 65 61 64 65 72  |tains the header|
00000b10  20 69 6e 66 6f 72 6d 61  74 69 6f 6e 20 79 6f 75  | information you|
00000b20  20 73 65 65 0d 64 69 73  70 6c 61 79 65 64 20 61  | see.displayed a|
00000b30  74 20 74 68 65 20 74 6f  70 20 6f 66 20 61 20 54  |t the top of a T|
00000b40  65 6c 65 74 65 78 74 20  70 61 67 65 20 69 6e 20  |eletext page in |
00000b50  74 68 65 20 74 65 72 6d  69 6e 61 6c 20 6d 6f 64  |the terminal mod|
00000b60  65 2e 20 44 65 63 6f 64  69 6e 67 20 74 68 65 0d  |e. Decoding the.|
00000b70  69 6e 66 6f 72 6d 61 74  69 6f 6e 20 63 6f 6e 74  |information cont|
00000b80  61 69 6e 65 64 20 69 6e  20 70 61 63 6b 65 74 20  |ained in packet |
00000b90  30 20 77 69 6c 6c 20 62  65 20 64 65 61 6c 74 20  |0 will be dealt |
00000ba0  77 69 74 68 20 69 6e 20  74 68 69 73 20 6d 6f 64  |with in this mod|
00000bb0  75 6c 65 20 61 6e 64 0d  75 73 69 6e 67 20 74 68  |ule and.using th|
00000bc0  65 20 69 6e 66 6f 72 6d  61 74 69 6f 6e 20 77 69  |e information wi|
00000bd0  6c 6c 20 62 65 20 63 6f  76 65 72 65 64 20 69 6e  |ll be covered in|
00000be0  20 6d 6f 64 75 6c 65 73  20 33 20 61 6e 64 20 34  | modules 3 and 4|
00000bf0  2e 0d 0d 50 61 63 6b 65  74 20 6e 75 6d 62 65 72  |...Packet number|
00000c00  73 20 31 20 74 6f 20 32  33 20 63 6f 6e 74 61 69  |s 1 to 23 contai|
00000c10  6e 20 74 68 65 20 69 6e  66 6f 72 6d 61 74 69 6f  |n the informatio|
00000c20  6e 20 64 69 73 70 6c 61  79 65 64 20 62 79 20 74  |n displayed by t|
00000c30  68 65 20 6c 65 76 65 6c  20 31 0d 54 65 6c 65 74  |he level 1.Telet|
00000c40  65 78 74 20 74 65 72 6d  69 6e 61 6c 2e 20 54 68  |ext terminal. Th|
00000c50  65 79 20 63 61 6e 20 61  6c 73 6f 20 63 6f 6e 74  |ey can also cont|
00000c60  61 69 6e 20 72 65 64 65  66 69 6e 61 62 6c 65 20  |ain redefinable |
00000c70  74 65 6c 65 73 6f 66 74  77 61 72 65 20 66 6f 72  |telesoftware for|
00000c80  6d 61 74 0d 28 52 54 46  29 20 63 6f 6d 70 75 74  |mat.(RTF) comput|
00000c90  65 72 20 73 6f 66 74 77  61 72 65 2e 20 54 68 65  |er software. The|
00000ca0  20 64 65 63 6f 64 69 6e  67 20 6f 66 20 74 65 6c  | decoding of tel|
00000cb0  65 73 6f 66 74 77 61 72  65 20 77 69 6c 6c 20 6e  |esoftware will n|
00000cc0  6f 74 20 62 65 20 63 6f  76 65 72 65 64 0d 69 6e  |ot be covered.in|
00000cd0  20 74 68 65 73 65 20 6d  6f 64 75 6c 65 73 20 61  | these modules a|
00000ce0  6e 64 20 69 73 20 62 65  73 74 20 6c 65 66 74 20  |nd is best left |
00000cf0  74 6f 20 74 68 65 20 41  54 53 2e 0d 0d 50 61 63  |to the ATS...Pac|
00000d00  6b 65 74 20 6e 75 6d 62  65 72 73 20 67 72 65 61  |ket numbers grea|
00000d10  74 65 72 20 74 68 61 6e  20 32 33 20 61 72 65 20  |ter than 23 are |
00000d20  73 6f 6d 65 74 69 6d 65  73 20 72 65 66 65 72 72  |sometimes referr|
00000d30  65 64 20 74 6f 20 61 73  20 27 47 68 6f 73 74 20  |ed to as 'Ghost |
00000d40  72 6f 77 73 27 0d 6f 72  20 27 47 68 6f 73 74 20  |rows'.or 'Ghost |
00000d50  70 61 63 6b 65 74 73 27  20 61 6e 64 20 74 68 65  |packets' and the|
00000d60  79 20 61 72 65 20 6e 6f  74 20 6e 6f 72 6d 61 6c  |y are not normal|
00000d70  6c 79 20 64 69 73 70 6c  61 79 65 64 20 62 79 20  |ly displayed by |
00000d80  6c 65 76 65 6c 20 31 20  54 65 6c 65 74 65 78 74  |level 1 Teletext|
00000d90  2e 0d 41 6c 6c 20 70 61  63 6b 65 74 73 20 66 72  |..All packets fr|
00000da0  6f 6d 20 30 20 74 6f 20  33 31 20 63 61 6e 20 62  |om 0 to 31 can b|
00000db0  65 20 72 65 63 65 69 76  65 64 20 62 79 20 74 68  |e received by th|
00000dc0  65 20 41 63 6f 72 6e 20  54 65 6c 65 74 65 78 74  |e Acorn Teletext|
00000dd0  20 61 64 61 70 74 6f 72  20 61 6e 64 0d 69 74 20  | adaptor and.it |
00000de0  69 73 20 69 6e 74 65 72  65 73 74 69 6e 67 20 74  |is interesting t|
00000df0  6f 20 6b 6e 6f 77 20 77  68 61 74 20 74 68 65 20  |o know what the |
00000e00  73 6f 2d 63 61 6c 6c 65  64 20 67 68 6f 73 74 20  |so-called ghost |
00000e10  70 61 63 6b 65 74 73 20  63 6f 6e 74 61 69 6e 2e  |packets contain.|
00000e20  0d 0d 50 61 63 6b 65 74  73 20 32 34 20 61 6e 64  |..Packets 24 and|
00000e30  20 32 35 20 68 61 76 65  20 74 68 65 20 73 61 6d  | 25 have the sam|
00000e40  65 20 66 6f 72 6d 61 74  20 61 73 20 70 61 63 6b  |e format as pack|
00000e50  65 74 73 20 31 20 74 6f  20 32 33 20 61 6e 64 2c  |ets 1 to 23 and,|
00000e60  20 77 68 65 6e 20 74 68  65 79 0d 61 72 65 20 63  | when they.are c|
00000e70  6f 6d 62 69 6e 65 64 20  77 69 74 68 20 74 68 65  |ombined with the|
00000e80  20 63 65 6e 74 72 61 6c  20 32 34 20 62 79 74 65  | central 24 byte|
00000e90  73 20 69 6e 20 70 61 63  6b 65 74 20 30 2c 20 74  |s in packet 0, t|
00000ea0  68 65 79 20 66 6f 72 6d  20 61 20 70 61 67 65 20  |hey form a page |
00000eb0  6f 66 0d 31 30 32 34 20  62 79 74 65 73 20 77 68  |of.1024 bytes wh|
00000ec0  69 63 68 20 69 73 20 73  75 69 74 61 62 6c 65 20  |ich is suitable |
00000ed0  66 6f 72 20 74 65 6c 65  73 6f 66 74 77 61 72 65  |for telesoftware|
00000ee0  2e 20 50 61 63 6b 65 74  20 32 34 20 63 61 6e 20  |. Packet 24 can |
00000ef0  61 6c 73 6f 20 63 6f 6e  74 61 69 6e 0d 74 68 65  |also contain.the|
00000f00  20 63 6f 6c 6f 75 72 20  63 6f 64 65 64 20 70 72  | colour coded pr|
00000f10  6f 6d 70 74 73 20 66 6f  72 20 6c 69 6e 6b 65 64  |ompts for linked|
00000f20  20 70 61 67 65 73 20 75  73 65 64 20 62 79 20 46  | pages used by F|
00000f30  61 73 74 65 78 74 20 61  6e 64 20 74 68 65 20 41  |astext and the A|
00000f40  54 53 2e 0d 0d 50 61 63  6b 65 74 20 32 36 20 69  |TS...Packet 26 i|
00000f50  73 20 75 73 65 64 20 74  6f 20 62 72 6f 61 64 63  |s used to broadc|
00000f60  61 73 74 20 69 6e 66 6f  72 6d 61 74 69 6f 6e 20  |ast information |
00000f70  77 68 69 63 68 20 63 61  6e 20 62 65 20 75 73 65  |which can be use|
00000f80  64 20 74 6f 20 65 6e 68  61 6e 63 65 0d 74 68 65  |d to enhance.the|
00000f90  20 64 69 73 70 6c 61 79  20 6f 66 20 68 69 67 68  | display of high|
00000fa0  65 72 20 6c 65 76 65 6c  20 64 65 63 6f 64 65 72  |er level decoder|
00000fb0  73 2e 20 46 61 63 69 6c  69 74 69 65 73 20 61 72  |s. Facilities ar|
00000fc0  65 20 69 6e 63 6c 75 64  65 64 20 74 6f 20 64 65  |e included to de|
00000fd0  66 69 6e 65 0d 66 75 6c  6c 20 73 63 72 65 65 6e  |fine.full screen|
00000fe0  20 61 6e 64 20 72 6f 77  20 63 6f 6c 6f 75 72 73  | and row colours|
00000ff0  2c 20 70 61 73 74 65 6c  20 63 6f 6c 6f 75 72 73  |, pastel colours|
00001000  2c 20 61 63 63 65 6e 74  65 64 20 61 6e 64 20 73  |, accented and s|
00001010  70 65 63 69 61 6c 0d 63  68 61 72 61 63 74 65 72  |pecial.character|
00001020  73 2c 20 64 6f 75 62 6c  65 20 68 65 69 67 68 74  |s, double height|
00001030  2c 20 64 6f 75 62 6c 65  20 77 69 64 74 68 2c 20  |, double width, |
00001040  75 6e 64 65 72 6c 69 6e  65 20 61 6e 64 20 72 65  |underline and re|
00001050  64 75 63 65 64 20 69 6e  74 65 6e 73 69 74 79 2e  |duced intensity.|
00001060  0d 0d 50 61 63 6b 65 74  20 32 37 20 69 73 20 6b  |..Packet 27 is k|
00001070  6e 6f 77 6e 20 61 73 20  74 68 65 20 50 61 67 65  |nown as the Page|
00001080  20 53 65 72 76 69 63 65  20 50 61 63 6b 65 74 20  | Service Packet |
00001090  61 6e 64 20 69 73 20 75  73 65 64 20 74 6f 20 64  |and is used to d|
000010a0  65 66 69 6e 65 20 6c 69  6e 6b 65 64 0d 70 61 67  |efine linked.pag|
000010b0  65 20 61 64 64 72 65 73  73 65 73 2e 20 45 61 63  |e addresses. Eac|
000010c0  68 20 70 61 63 6b 65 74  20 32 37 20 63 6f 6e 74  |h packet 27 cont|
000010d0  61 69 6e 73 20 36 20 67  72 6f 75 70 73 20 6f 66  |ains 6 groups of|
000010e0  20 36 20 62 79 74 65 73  2c 20 65 61 63 68 20 6f  | 6 bytes, each o|
000010f0  66 20 77 68 69 63 68 0d  73 70 65 63 69 66 69 65  |f which.specifie|
00001100  73 20 61 20 70 61 67 65  20 61 6e 64 20 73 75 62  |s a page and sub|
00001110  2d 70 61 67 65 2e 20 54  68 65 72 65 20 61 72 65  |-page. There are|
00001120  20 34 20 76 65 72 73 69  6f 6e 73 20 6f 66 20 70  | 4 versions of p|
00001130  61 63 6b 65 74 20 32 37  20 73 6f 20 74 68 61 74  |acket 27 so that|
00001140  0d 75 70 20 74 6f 20 32  34 20 70 61 67 65 20 6e  |.up to 24 page n|
00001150  75 6d 62 65 72 73 20 63  61 6e 20 62 65 20 6c 69  |umbers can be li|
00001160  6e 6b 65 64 20 74 6f 20  74 6f 20 61 6e 79 20 67  |nked to to any g|
00001170  69 76 65 6e 20 70 61 67  65 2e 20 41 20 63 79 63  |iven page. A cyc|
00001180  6c 69 63 0d 72 65 64 75  6e 64 61 6e 63 79 20 63  |lic.redundancy c|
00001190  68 65 63 6b 20 28 43 52  43 29 20 63 6f 64 65 20  |heck (CRC) code |
000011a0  69 73 20 69 6e 63 6f 72  70 6f 72 61 74 65 64 20  |is incorporated |
000011b0  69 6e 20 70 61 63 6b 65  74 20 32 37 20 74 79 70  |in packet 27 typ|
000011c0  65 20 30 2e 20 54 68 69  73 20 63 61 6e 0d 62 65  |e 0. This can.be|
000011d0  20 75 73 65 64 20 74 6f  20 76 65 72 69 66 79 20  | used to verify |
000011e0  74 68 65 20 64 61 74 61  20 69 6e 20 70 61 63 6b  |the data in pack|
000011f0  65 74 73 20 30 20 2d 20  32 35 2e 0d 0d 50 61 63  |ets 0 - 25...Pac|
00001200  6b 65 74 20 32 38 20 69  73 20 75 73 65 64 20 74  |ket 28 is used t|
00001210  6f 20 72 65 64 65 66 69  6e 65 20 74 68 65 20 63  |o redefine the c|
00001220  68 61 72 61 63 74 65 72  20 73 65 74 2e 20 54 77  |haracter set. Tw|
00001230  6f 20 76 65 72 73 69 6f  6e 73 20 61 72 65 20 75  |o versions are u|
00001240  73 65 64 2c 0d 6f 6e 65  20 6f 66 20 77 68 69 63  |sed,.one of whic|
00001250  68 20 69 73 20 70 61 67  65 20 72 65 6c 61 74 65  |h is page relate|
00001260  64 20 61 6e 64 20 74 68  65 20 6f 74 68 65 72 20  |d and the other |
00001270  6d 61 67 61 7a 69 6e 65  20 72 65 6c 61 74 65 64  |magazine related|
00001280  2e 20 54 68 65 20 64 61  74 61 20 61 72 65 0d 62  |. The data are.b|
00001290  72 6f 61 64 63 61 73 74  20 61 73 20 31 33 20 67  |roadcast as 13 g|
000012a0  72 6f 75 70 73 20 6f 66  20 33 20 62 79 74 65 73  |roups of 3 bytes|
000012b0  2c 20 65 61 63 68 20 67  72 6f 75 70 20 64 65 66  |, each group def|
000012c0  69 6e 69 6e 67 20 61 20  63 68 61 72 61 63 74 65  |ining a characte|
000012d0  72 2e 20 50 61 63 6b 65  74 0d 32 38 20 63 61 6e  |r. Packet.28 can|
000012e0  20 61 6c 73 6f 20 62 65  20 75 73 65 64 20 74 6f  | also be used to|
000012f0  20 72 65 64 65 66 69 6e  65 20 70 61 73 74 65 6c  | redefine pastel|
00001300  20 63 6f 6c 6f 75 72 73  2e 0d 0d 50 61 63 6b 65  | colours...Packe|
00001310  74 20 33 30 20 69 73 20  74 68 65 20 66 69 72 73  |t 30 is the firs|
00001320  74 20 6f 66 20 74 77 6f  20 70 61 67 65 20 69 6e  |t of two page in|
00001330  64 65 70 65 6e 64 65 6e  74 20 70 61 63 6b 65 74  |dependent packet|
00001340  73 20 61 6e 64 20 63 6f  6e 74 61 69 6e 73 20 74  |s and contains t|
00001350  68 65 0d 54 65 6c 65 76  69 73 69 6f 6e 20 53 65  |he.Television Se|
00001360  72 76 69 63 65 20 44 61  74 61 20 50 61 63 6b 65  |rvice Data Packe|
00001370  74 20 28 54 53 44 50 29  2e 20 4d 61 67 61 7a 69  |t (TSDP). Magazi|
00001380  6e 65 73 20 61 72 65 20  72 65 66 65 72 72 65 64  |nes are referred|
00001390  20 74 6f 20 61 73 0d 63  68 61 6e 6e 65 6c 73 20  | to as.channels |
000013a0  69 6e 20 70 61 63 6b 65  74 73 20 33 30 20 61 6e  |in packets 30 an|
000013b0  64 20 33 31 20 73 6f 20  74 68 61 74 20 6d 61 67  |d 31 so that mag|
000013c0  61 7a 69 6e 65 73 20 30  20 74 6f 20 37 20 69 6e  |azines 0 to 7 in|
000013d0  20 70 61 63 6b 65 74 20  33 30 20 61 72 65 0d 6b  | packet 30 are.k|
000013e0  6e 6f 77 6e 20 61 73 20  70 61 67 65 20 69 6e 64  |nown as page ind|
000013f0  65 70 65 6e 64 65 6e 74  20 63 68 61 6e 6e 65 6c  |ependent channel|
00001400  73 20 30 20 74 6f 20 37  2e 20 54 68 65 72 65 20  |s 0 to 7. There |
00001410  61 72 65 20 74 77 6f 20  66 6f 72 6d 61 74 73 20  |are two formats |
00001420  75 73 65 64 20 66 6f 72  0d 74 68 65 20 54 53 44  |used for.the TSD|
00001430  50 20 77 68 69 63 68 20  61 72 65 20 6b 6e 6f 77  |P which are know|
00001440  6e 20 61 73 20 74 79 70  65 20 30 20 61 6e 64 20  |n as type 0 and |
00001450  74 79 70 65 20 32 2e 20  54 68 65 20 54 53 44 50  |type 2. The TSDP|
00001460  20 63 6f 6e 74 61 69 6e  73 0d 69 6e 66 6f 72 6d  | contains.inform|
00001470  61 74 69 6f 6e 20 61 62  6f 75 74 20 74 68 65 20  |ation about the |
00001480  69 6e 69 74 69 61 6c 20  70 61 67 65 20 74 6f 20  |initial page to |
00001490  62 65 20 67 72 61 62 62  65 64 20 62 79 20 74 68  |be grabbed by th|
000014a0  65 20 64 65 63 6f 64 65  72 2c 20 70 72 6f 67 72  |e decoder, progr|
000014b0  61 6d 6d 65 0d 61 6e 64  20 54 56 20 63 68 61 6e  |amme.and TV chan|
000014c0  6e 65 6c 20 6c 61 62 65  6c 73 2c 20 74 69 6d 65  |nel labels, time|
000014d0  20 69 6e 20 61 20 73 74  61 6e 64 61 72 64 20 66  | in a standard f|
000014e0  6f 72 6d 61 74 2c 20 63  6f 6e 74 72 6f 6c 20 69  |ormat, control i|
000014f0  6e 66 6f 72 6d 61 74 69  6f 6e 20 61 6e 64 0d 64  |nformation and.d|
00001500  61 74 61 20 66 6f 72 20  64 69 73 70 6c 61 79 2e  |ata for display.|
00001510  20 4d 6f 64 75 6c 65 73  20 35 20 61 6e 64 20 36  | Modules 5 and 6|
00001520  20 77 69 6c 6c 20 65 78  61 6d 69 6e 65 20 74 68  | will examine th|
00001530  65 20 54 53 44 50 73 20  69 6e 20 64 65 74 61 69  |e TSDPs in detai|
00001540  6c 2e 0d 0d 50 61 63 6b  65 74 20 33 31 20 69 73  |l...Packet 31 is|
00001550  20 74 68 65 20 73 65 63  6f 6e 64 20 70 61 67 65  | the second page|
00001560  20 69 6e 64 65 70 65 6e  64 65 6e 74 20 70 61 63  | independent pac|
00001570  6b 65 74 20 61 6e 64 20  6d 61 67 61 7a 69 6e 65  |ket and magazine|
00001580  73 20 30 20 74 6f 20 37  20 69 6e 0d 70 61 63 6b  |s 0 to 7 in.pack|
00001590  65 74 20 33 31 20 61 72  65 20 75 73 75 61 6c 6c  |et 31 are usuall|
000015a0  79 20 72 65 66 65 72 72  65 64 20 74 6f 20 61 73  |y referred to as|
000015b0  20 70 61 67 65 20 69 6e  64 65 70 65 6e 64 65 6e  | page independen|
000015c0  74 20 63 68 61 6e 6e 65  6c 73 20 38 20 74 6f 20  |t channels 8 to |
000015d0  31 35 2e 0d 43 68 61 6e  6e 65 6c 73 20 38 2c 20  |15..Channels 8, |
000015e0  39 2c 20 31 30 20 61 6e  64 20 31 31 20 61 72 65  |9, 10 and 11 are|
000015f0  20 75 73 65 64 20 62 79  20 74 68 65 20 42 42 43  | used by the BBC|
00001600  20 66 6f 72 20 69 74 73  20 44 61 74 61 63 61 73  | for its Datacas|
00001610  74 20 73 65 72 76 69 63  65 2e 0d 44 61 74 61 63  |t service..Datac|
00001620  61 73 74 20 69 73 20 70  72 6f 66 65 73 73 69 6f  |ast is professio|
00001630  6e 61 6c 20 64 61 74 61  20 63 6f 6d 6d 75 6e 69  |nal data communi|
00001640  63 61 74 69 6f 6e 73 20  74 65 63 68 6e 69 71 75  |cations techniqu|
00001650  65 20 77 68 69 63 68 20  64 69 73 74 72 69 62 75  |e which distribu|
00001660  74 65 73 0d 6d 61 63 68  69 6e 65 20 72 65 61 64  |tes.machine read|
00001670  61 62 6c 65 20 69 6e 66  6f 72 6d 61 74 69 6f 6e  |able information|
00001680  20 74 6f 20 61 6c 6c 20  70 61 72 74 73 20 6f 66  | to all parts of|
00001690  20 74 68 65 20 55 6e 69  74 65 64 20 4b 69 6e 67  | the United King|
000016a0  64 6f 6d 0d 73 69 6d 75  6c 74 61 6e 65 6f 75 73  |dom.simultaneous|
000016b0  6c 79 2e 20 44 61 74 61  63 61 73 74 20 69 73 20  |ly. Datacast is |
000016c0  75 73 65 64 20 62 79 20  6f 72 67 61 6e 69 73 61  |used by organisa|
000016d0  74 69 6f 6e 73 20 73 75  63 68 20 61 73 20 74 68  |tions such as th|
000016e0  65 20 4c 6f 6e 64 6f 6e  20 53 74 6f 63 6b 0d 45  |e London Stock.E|
000016f0  78 63 68 61 6e 67 65 20  61 6e 64 20 74 68 65 20  |xchange and the |
00001700  50 6f 73 74 20 4f 66 66  69 63 65 20 61 6e 64 20  |Post Office and |
00001710  6d 6f 73 74 20 6f 66 20  74 68 65 20 69 6e 66 6f  |most of the info|
00001720  72 6d 61 74 69 6f 6e 20  69 73 20 65 6e 63 72 79  |rmation is encry|
00001730  70 74 65 64 20 66 6f 72  0d 73 65 63 75 72 69 74  |pted for.securit|
00001740  79 2e 20 50 61 63 6b 65  74 20 33 31 20 63 61 6e  |y. Packet 31 can|
00001750  20 62 65 20 72 65 63 65  69 76 65 64 20 6f 6e 20  | be received on |
00001760  74 68 65 20 41 63 6f 72  6e 20 54 65 6c 65 74 65  |the Acorn Telete|
00001770  78 74 20 61 64 61 70 74  6f 72 20 61 6e 64 20 74  |xt adaptor and t|
00001780  68 65 0d 64 65 6d 6f 6e  73 74 72 61 74 69 6f 6e  |he.demonstration|
00001790  20 70 72 6f 67 72 61 6d  20 61 73 73 6f 63 69 61  | program associa|
000017a0  74 65 64 20 77 69 74 68  20 6d 6f 64 75 6c 65 20  |ted with module |
000017b0  37 20 77 69 6c 6c 20 61  6c 6c 6f 77 20 79 6f 75  |7 will allow you|
000017c0  20 74 6f 20 6c 6f 6f 6b  20 61 74 0d 73 6f 6d 65  | to look at.some|
000017d0  20 6f 66 20 74 68 65 20  64 61 74 61 20 62 72 6f  | of the data bro|
000017e0  61 64 63 61 73 74 20 69  6e 20 74 68 69 73 20 70  |adcast in this p|
000017f0  61 63 6b 65 74 2e 20 41  74 20 74 68 65 20 74 69  |acket. At the ti|
00001800  6d 65 20 6f 66 20 77 72  69 74 69 6e 67 20 74 68  |me of writing th|
00001810  65 20 49 54 56 0d 6e 65  74 77 6f 72 6b 20 69 73  |e ITV.network is|
00001820  20 62 72 6f 61 64 63 61  73 74 69 6e 67 20 61 6e  | broadcasting an|
00001830  20 41 69 72 20 43 61 6c  6c 20 74 65 73 74 20 6d  | Air Call test m|
00001840  65 73 73 61 67 65 20 69  6e 20 70 61 63 6b 65 74  |essage in packet|
00001850  20 33 31 2e 20 4e 65 69  74 68 65 72 0d 43 68 61  | 31. Neither.Cha|
00001860  6e 6e 65 6c 20 34 20 6e  6f 72 20 53 34 43 20 6d  |nnel 4 nor S4C m|
00001870  61 6b 65 20 61 6e 79 20  75 73 65 20 6f 66 20 70  |ake any use of p|
00001880  61 63 6b 65 74 20 33 31  2e 0d 0d 49 6e 20 6d 6f  |acket 31...In mo|
00001890  64 75 6c 65 20 31 20 79  6f 75 20 77 65 72 65 20  |dule 1 you were |
000018a0  73 68 6f 77 6e 20 68 6f  77 20 74 6f 20 69 6e 74  |shown how to int|
000018b0  65 72 63 65 70 74 20 61  6e 64 20 72 65 63 6f 67  |ercept and recog|
000018c0  6e 69 73 65 20 74 68 65  20 54 65 6c 65 74 65 78  |nise the Teletex|
000018d0  74 0d 67 65 6e 65 72 61  74 65 64 20 69 6e 74 65  |t.generated inte|
000018e0  72 72 75 70 74 2e 20 49  6e 20 74 68 69 73 20 6d  |rrupt. In this m|
000018f0  6f 64 75 6c 65 20 49 20  77 69 6c 6c 20 73 68 6f  |odule I will sho|
00001900  77 20 79 6f 75 20 68 6f  77 20 74 6f 20 72 65 61  |w you how to rea|
00001910  64 20 64 61 74 61 20 66  72 6f 6d 0d 74 68 65 20  |d data from.the |
00001920  61 64 61 70 74 6f 72 20  69 6e 74 6f 20 75 73 65  |adaptor into use|
00001930  72 20 6d 65 6d 6f 72 79  2e 20 54 68 65 20 65 78  |r memory. The ex|
00001940  61 6d 70 6c 65 20 70 72  6f 67 72 61 6d 20 48 45  |ample program HE|
00001950  41 44 45 52 20 6f 6e 6c  79 20 6c 6f 6f 6b 73 20  |ADER only looks |
00001960  66 6f 72 0d 70 61 63 6b  65 74 20 30 20 62 75 74  |for.packet 0 but|
00001970  20 74 68 65 20 73 61 6d  65 20 74 65 63 68 6e 69  | the same techni|
00001980  71 75 65 73 20 61 70 70  6c 79 20 74 6f 20 61 6e  |ques apply to an|
00001990  79 20 70 61 63 6b 65 74  2e 0d 0d 42 65 63 61 75  |y packet...Becau|
000019a0  73 65 20 61 6c 6c 20 74  68 65 20 70 61 63 6b 65  |se all the packe|
000019b0  74 73 20 62 72 6f 61 64  63 61 73 74 20 6f 6e 20  |ts broadcast on |
000019c0  54 65 6c 65 74 65 78 74  20 63 6f 6e 74 61 69 6e  |Teletext contain|
000019d0  20 61 74 20 6c 65 61 73  74 20 74 77 6f 20 68 61  | at least two ha|
000019e0  6d 6d 69 6e 67 0d 63 6f  64 65 64 20 62 79 74 65  |mming.coded byte|
000019f0  73 20 69 74 20 69 73 20  6e 65 63 65 73 73 61 72  |s it is necessar|
00001a00  79 20 74 6f 20 69 6e 63  6c 75 64 65 20 61 20 74  |y to include a t|
00001a10  61 62 6c 65 20 6f 66 20  32 35 36 20 62 79 74 65  |able of 256 byte|
00001a20  73 20 74 6f 20 64 65 63  6f 64 65 0d 74 68 65 6d  |s to decode.them|
00001a30  2e 20 54 68 69 73 20 74  61 62 6c 65 20 28 6c 69  |. This table (li|
00001a40  6e 65 73 20 31 38 35 30  20 74 6f 20 32 34 39 30  |nes 1850 to 2490|
00001a50  29 20 77 69 6c 6c 20 68  61 76 65 20 74 6f 20 62  |) will have to b|
00001a60  65 20 69 6e 63 6c 75 64  65 64 20 69 6e 20 61 6c  |e included in al|
00001a70  6d 6f 73 74 0d 65 76 65  72 79 20 54 65 6c 65 74  |most.every Telet|
00001a80  65 78 74 20 70 72 6f 67  72 61 6d 20 77 68 69 63  |ext program whic|
00001a90  68 20 62 79 70 61 73 73  65 73 20 74 68 65 20 41  |h bypasses the A|
00001aa0  54 53 20 6f 72 20 54 46  53 2e 0d 0d 41 20 54 65  |TS or TFS...A Te|
00001ab0  6c 65 74 65 78 74 20 67  65 6e 65 72 61 74 65 64  |letext generated|
00001ac0  20 69 6e 74 65 72 72 75  70 74 20 73 69 67 6e 61  | interrupt signa|
00001ad0  6c 73 20 74 68 61 74 20  64 61 74 61 20 61 72 65  |ls that data are|
00001ae0  20 61 76 61 69 6c 61 62  6c 65 20 74 6f 20 62 65  | available to be|
00001af0  20 72 65 61 64 0d 66 72  6f 6d 20 74 68 65 20 61  | read.from the a|
00001b00  64 61 70 74 6f 72 20 61  6e 64 20 75 70 20 74 6f  |daptor and up to|
00001b10  20 31 36 20 70 61 63 6b  65 74 73 20 63 61 6e 20  | 16 packets can |
00001b20  62 65 20 72 65 61 64 20  66 72 6f 6d 20 74 68 65  |be read from the|
00001b30  20 31 36 20 2a 20 36 34  20 62 79 74 65 0d 72 6f  | 16 * 64 byte.ro|
00001b40  77 73 20 6f 66 20 6d 65  6d 6f 72 79 20 69 6e 20  |ws of memory in |
00001b50  74 68 65 20 61 64 61 70  74 6f 72 20 61 6c 74 68  |the adaptor alth|
00001b60  6f 75 67 68 2c 20 61 74  20 74 68 65 20 74 68 65  |ough, at the the|
00001b70  20 74 69 6d 65 20 6f 66  20 77 72 69 74 69 6e 67  | time of writing|
00001b80  2c 20 6f 6e 6c 79 20 37  0d 6f 66 20 74 68 65 20  |, only 7.of the |
00001b90  31 36 20 72 6f 77 73 20  61 72 65 20 75 73 65 64  |16 rows are used|
00001ba0  2e 20 54 68 65 20 42 42  43 20 63 75 72 72 65 6e  |. The BBC curren|
00001bb0  74 6c 79 20 75 73 65 20  36 20 72 6f 77 73 20 66  |tly use 6 rows f|
00001bc0  6f 72 20 43 45 45 46 41  58 20 61 6e 64 20 31 20  |or CEEFAX and 1 |
00001bd0  66 6f 72 0d 44 61 74 61  63 61 73 74 20 62 75 74  |for.Datacast but|
00001be0  20 74 68 65 72 65 20 61  72 65 20 70 6c 61 6e 73  | there are plans|
00001bf0  20 74 6f 20 75 73 65 20  38 20 72 6f 77 73 20 66  | to use 8 rows f|
00001c00  6f 72 20 43 45 45 46 41  58 20 61 6e 64 20 32 20  |or CEEFAX and 2 |
00001c10  66 6f 72 20 44 61 74 61  63 61 73 74 2e 0d 42 65  |for Datacast..Be|
00001c20  63 61 75 73 65 20 6e 6f  74 20 61 6c 6c 20 74 68  |cause not all th|
00001c30  65 20 72 6f 77 73 20 61  72 65 20 75 73 65 64 20  |e rows are used |
00001c40  69 74 20 69 73 20 6e 65  63 65 73 73 61 72 79 20  |it is necessary |
00001c50  74 6f 20 62 65 20 61 62  6c 65 20 74 6f 20 64 65  |to be able to de|
00001c60  74 65 63 74 0d 77 68 69  63 68 20 72 6f 77 73 20  |tect.which rows |
00001c70  63 6f 6e 74 61 69 6e 20  64 61 74 61 2e 20 54 68  |contain data. Th|
00001c80  69 73 20 63 61 6e 20 62  65 20 64 6f 6e 65 20 62  |is can be done b|
00001c90  79 20 6c 6f 6f 6b 69 6e  67 20 66 6f 72 20 74 68  |y looking for th|
00001ca0  65 20 66 72 61 6d 69 6e  67 20 63 6f 64 65 2e 0d  |e framing code..|
00001cb0  0d 45 61 63 68 20 72 6f  77 20 63 61 6e 20 62 65  |.Each row can be|
00001cc0  20 73 65 6c 65 63 74 65  64 20 62 79 20 77 72 69  | selected by wri|
00001cd0  74 69 6e 67 20 6f 6e 65  20 6f 66 20 74 68 65 20  |ting one of the |
00001ce0  6e 75 6d 62 65 72 73 20  26 30 30 20 74 6f 20 26  |numbers &00 to &|
00001cf0  30 46 20 69 6e 74 6f 20  74 68 65 0d 72 6f 77 20  |0F into the.row |
00001d00  72 65 67 69 73 74 65 72  20 61 74 20 26 46 43 31  |register at &FC1|
00001d10  31 20 28 6c 69 6e 65 73  20 31 31 38 30 20 74 6f  |1 (lines 1180 to|
00001d20  20 31 32 31 30 29 2e 20  41 66 74 65 72 20 73 65  | 1210). After se|
00001d30  6c 65 63 74 69 6e 67 20  61 20 72 6f 77 2c 20 74  |lecting a row, t|
00001d40  68 65 0d 66 72 61 6d 69  6e 67 20 63 6f 64 65 20  |he.framing code |
00001d50  62 79 74 65 20 63 61 6e  20 62 65 20 6c 6f 61 64  |byte can be load|
00001d60  65 64 20 66 72 6f 6d 20  74 68 65 20 61 64 61 70  |ed from the adap|
00001d70  74 6f 72 20 62 79 20 72  65 61 64 69 6e 67 20 74  |tor by reading t|
00001d80  68 65 20 64 61 74 61 0d  72 65 67 69 73 74 65 72  |he data.register|
00001d90  20 61 74 20 26 46 43 31  32 20 28 6c 69 6e 65 20  | at &FC12 (line |
00001da0  31 31 31 30 29 2e 20 49  66 20 74 68 65 20 72 65  |1110). If the re|
00001db0  73 75 6c 74 20 6f 66 20  74 68 69 73 20 72 65 61  |sult of this rea|
00001dc0  64 20 69 73 20 26 32 37  20 74 68 65 6e 20 64 61  |d is &27 then da|
00001dd0  74 61 0d 61 72 65 20 61  76 61 69 6c 61 62 6c 65  |ta.are available|
00001de0  2e 20 49 66 20 64 61 74  61 20 61 72 65 20 61 76  |. If data are av|
00001df0  61 69 6c 61 62 6c 65 20  74 68 65 20 70 72 6f 67  |ailable the prog|
00001e00  72 61 6d 20 48 45 41 44  45 52 20 72 65 61 64 73  |ram HEADER reads|
00001e10  20 74 68 65 6d 20 75 73  69 6e 67 0d 74 68 65 20  | them using.the |
00001e20  73 75 62 72 6f 75 74 69  6e 65 20 72 65 61 64 70  |subroutine readp|
00001e30  61 63 6b 65 74 20 28 6c  69 6e 65 20 31 31 35 30  |acket (line 1150|
00001e40  20 61 6e 64 20 6c 69 6e  65 73 20 31 33 38 30 20  | and lines 1380 |
00001e50  74 6f 20 31 38 32 30 29  2e 0d 0d 42 65 66 6f 72  |to 1820)...Befor|
00001e60  65 20 72 65 74 75 72 6e  69 6e 67 20 66 72 6f 6d  |e returning from|
00001e70  20 61 20 54 65 6c 65 74  65 78 74 20 69 6e 74 65  | a Teletext inte|
00001e80  72 72 75 70 74 20 69 73  20 6e 65 63 65 73 73 61  |rrupt is necessa|
00001e90  72 79 20 74 6f 20 63 6c  65 61 72 20 74 68 65 0d  |ry to clear the.|
00001ea0  66 72 61 6d 69 6e 67 20  63 6f 64 65 20 69 6e 20  |framing code in |
00001eb0  65 61 63 68 20 72 6f 77  20 6f 66 20 74 68 65 20  |each row of the |
00001ec0  61 64 61 70 74 6f 72 27  73 20 6d 65 6d 6f 72 79  |adaptor's memory|
00001ed0  2e 20 54 6f 20 64 6f 20  74 68 69 73 20 73 65 6c  |. To do this sel|
00001ee0  65 63 74 20 65 61 63 68  0d 72 6f 77 20 69 6e 20  |ect each.row in |
00001ef0  74 75 72 6e 20 61 6e 64  20 77 72 69 74 65 20 74  |turn and write t|
00001f00  68 65 20 6e 75 6d 62 65  72 20 7a 65 72 6f 20 69  |he number zero i|
00001f10  6e 74 6f 20 74 68 65 20  64 61 74 61 20 72 65 67  |nto the data reg|
00001f20  69 73 74 65 72 20 28 6c  69 6e 65 73 20 31 32 32  |ister (lines 122|
00001f30  30 0d 74 6f 20 31 32 39  30 29 2e 20 49 66 20 79  |0.to 1290). If y|
00001f40  6f 75 20 64 6f 20 6e 6f  74 20 69 6e 63 6c 75 64  |ou do not includ|
00001f50  65 20 6c 69 6e 65 73 20  31 32 32 30 20 74 6f 20  |e lines 1220 to |
00001f60  31 32 39 30 20 74 68 65  20 70 72 6f 67 72 61 6d  |1290 the program|
00001f70  20 77 69 6c 6c 20 72 75  6e 0d 66 6f 72 20 61 20  | will run.for a |
00001f80  77 68 69 6c 65 20 62 75  74 20 65 76 65 6e 74 75  |while but eventu|
00001f90  61 6c 6c 79 2c 20 61 6e  64 20 75 73 75 61 6c 6c  |ally, and usuall|
00001fa0  79 20 71 75 69 74 65 20  71 75 69 63 6b 6c 79 2c  |y quite quickly,|
00001fb0  20 74 68 65 20 70 72 6f  67 72 61 6d 20 77 69 6c  | the program wil|
00001fc0  6c 0d 63 72 61 73 68 2e  20 54 68 65 20 54 65 6c  |l.crash. The Tel|
00001fd0  65 74 65 78 74 20 69 6e  74 65 72 72 75 70 74 20  |etext interrupt |
00001fe0  70 72 6f 63 65 73 73 69  6e 67 20 72 6f 75 74 69  |processing routi|
00001ff0  6e 65 20 6d 75 73 74 20  61 6c 73 6f 20 65 69 74  |ne must also eit|
00002000  68 65 72 20 72 65 61 64  0d 66 72 6f 6d 20 6f 72  |her read.from or|
00002010  20 77 72 69 74 65 20 74  6f 20 74 68 65 20 73 74  | write to the st|
00002020  61 74 75 73 20 63 6c 65  61 72 20 72 65 67 69 73  |atus clear regis|
00002030  74 65 72 20 28 6c 69 6e  65 20 31 33 30 30 29 20  |ter (line 1300) |
00002040  62 65 66 6f 72 65 20 72  65 73 74 6f 72 69 6e 67  |before restoring|
00002050  0d 74 68 65 20 72 65 67  69 73 74 65 72 73 20 61  |.the registers a|
00002060  6e 64 20 65 78 65 63 75  74 69 6e 67 20 74 68 65  |nd executing the|
00002070  20 52 54 49 20 69 6e 73  74 72 75 63 74 69 6f 6e  | RTI instruction|
00002080  2e 0d 0d 52 65 61 64 69  6e 67 20 61 6e 64 20 64  |...Reading and d|
00002090  65 63 6f 64 69 6e 67 20  74 68 65 20 6d 61 67 61  |ecoding the maga|
000020a0  7a 69 6e 65 20 61 6e 64  20 70 61 63 6b 65 74 20  |zine and packet |
000020b0  6e 75 6d 62 65 72 73 20  69 73 20 64 6f 6e 65 20  |numbers is done |
000020c0  69 6e 20 6c 69 6e 65 73  20 31 33 39 30 0d 74 6f  |in lines 1390.to|
000020d0  20 31 35 32 30 20 6f 66  20 48 45 41 44 45 52 20  | 1520 of HEADER |
000020e0  61 6e 64 20 64 65 73 63  72 69 62 65 64 20 69 6e  |and described in|
000020f0  20 6d 6f 72 65 20 64 65  74 61 69 6c 20 69 6e 20  | more detail in |
00002100  66 69 67 75 72 65 20 32  2e 0d 0d 0d 20 20 20 20  |figure 2....    |
00002110  20 20 4c 44 59 20 64 61  74 61 72 65 67 20 20 20  |  LDY datareg   |
00002120  20 5c 20 72 65 61 64 20  6d 61 67 61 7a 69 6e 65  | \ read magazine|
00002130  20 6e 75 6d 62 65 72 20  61 6e 64 20 62 69 74 20  | number and bit |
00002140  30 20 6f 66 20 70 61 63  6b 65 74 20 6e 75 6d 62  |0 of packet numb|
00002150  65 72 0d 20 20 20 20 20  20 4c 44 41 20 68 61 6d  |er.      LDA ham|
00002160  74 61 62 6c 65 2c 59 20  5c 20 64 65 2d 68 61 6d  |table,Y \ de-ham|
00002170  20 69 74 20 69 6e 74 6f  20 74 68 65 20 61 63 63  | it into the acc|
00002180  75 6d 75 6c 61 74 6f 72  0d 20 20 20 20 20 20 42  |umulator.      B|
00002190  4d 49 20 63 6c 65 61 72  66 6c 61 67 20 20 5c 20  |MI clearflag  \ |
000021a0  62 69 74 20 37 20 73 65  74 20 6d 65 61 6e 73 20  |bit 7 set means |
000021b0  61 6e 20 69 72 72 65 63  6f 76 65 72 61 62 6c 65  |an irrecoverable|
000021c0  20 65 72 72 6f 72 0d 20  20 20 20 20 20 53 54 41  | error.      STA|
000021d0  20 6d 61 67 61 7a 69 6e  65 20 20 20 5c 20 73 61  | magazine   \ sa|
000021e0  76 65 20 6d 61 67 61 7a  69 6e 65 20 6e 75 6d 62  |ve magazine numb|
000021f0  65 72 20 61 6e 64 20 62  69 74 20 30 20 6f 66 20  |er and bit 0 of |
00002200  70 61 63 6b 65 74 20 6e  75 6d 62 65 72 0d 20 20  |packet number.  |
00002210  20 20 20 20 4c 44 59 20  64 61 74 61 72 65 67 20  |    LDY datareg |
00002220  20 20 20 5c 20 72 65 61  64 20 62 69 74 73 20 31  |   \ read bits 1|
00002230  20 74 6f 20 34 20 6f 66  20 74 68 65 20 70 61 63  | to 4 of the pac|
00002240  6b 65 74 20 6e 75 6d 62  65 72 20 69 6e 74 6f 20  |ket number into |
00002250  59 0d 20 20 20 20 20 20  4c 44 41 20 68 61 6d 74  |Y.      LDA hamt|
00002260  61 62 6c 65 2c 59 20 5c  20 64 65 2d 68 61 6d 20  |able,Y \ de-ham |
00002270  69 74 20 69 6e 74 6f 20  74 68 65 20 61 63 63 75  |it into the accu|
00002280  6d 75 6c 61 74 6f 72 0d  20 20 20 20 20 20 42 4d  |mulator.      BM|
00002290  49 20 63 6c 65 61 72 66  6c 61 67 20 20 5c 20 62  |I clearflag  \ b|
000022a0  72 61 6e 63 68 20 69 66  20 61 6e 20 69 72 72 65  |ranch if an irre|
000022b0  63 6f 76 65 72 61 62 6c  65 20 65 72 72 6f 72 0d  |coverable error.|
000022c0  20 20 20 20 20 20 53 54  41 20 70 61 63 6b 65 74  |      STA packet|
000022d0  20 20 20 20 20 5c 20 73  61 76 65 20 62 69 74 73  |     \ save bits|
000022e0  20 31 20 74 6f 20 34 20  6f 66 20 74 68 65 20 70  | 1 to 4 of the p|
000022f0  61 63 6b 65 74 20 6e 75  6d 62 65 72 0d 20 20 20  |acket number.   |
00002300  20 20 20 4c 44 41 20 6d  61 67 61 7a 69 6e 65 20  |   LDA magazine |
00002310  20 20 5c 20 6c 6f 61 64  20 6d 61 67 61 7a 69 6e  |  \ load magazin|
00002320  65 20 6e 75 6d 62 65 72  20 61 6e 64 20 62 69 74  |e number and bit|
00002330  20 30 20 6f 66 20 70 61  63 6b 65 74 20 6e 75 6d  | 0 of packet num|
00002340  62 65 72 0d 20 20 20 20  20 20 43 4d 50 20 23 26  |ber.      CMP #&|
00002350  30 38 20 20 20 20 20 20  20 5c 20 62 69 74 20 33  |08       \ bit 3|
00002360  20 69 6e 74 6f 20 63 61  72 72 79 20 66 6c 61 67  | into carry flag|
00002370  0d 20 20 20 20 20 20 52  4f 4c 20 70 61 63 6b 65  |.      ROL packe|
00002380  74 20 20 20 20 20 5c 20  72 6f 74 61 74 65 20 62  |t     \ rotate b|
00002390  69 74 73 20 30 20 74 6f  20 33 20 6c 65 66 74 20  |its 0 to 3 left |
000023a0  61 6e 64 20 61 64 64 20  62 69 74 20 30 0d 20 20  |and add bit 0.  |
000023b0  20 20 20 20 41 4e 44 20  23 26 30 37 20 20 20 20  |    AND #&07    |
000023c0  20 20 20 5c 20 69 73 6f  6c 61 74 65 20 74 68 65  |   \ isolate the|
000023d0  20 33 20 62 69 74 73 20  6f 66 20 74 68 65 20 6d  | 3 bits of the m|
000023e0  61 67 61 7a 69 6e 65 20  6e 75 6d 62 65 72 0d 20  |agazine number. |
000023f0  20 20 20 20 20 53 54 41  20 6d 61 67 61 7a 69 6e  |     STA magazin|
00002400  65 20 20 20 5c 20 61 6e  64 20 73 74 6f 72 65 20  |e   \ and store |
00002410  74 68 65 20 33 20 62 69  74 20 6d 61 67 61 7a 69  |the 3 bit magazi|
00002420  6e 65 20 6e 75 6d 62 65  72 0d 0d 46 69 67 75 72  |ne number..Figur|
00002430  65 20 32 2e 20 52 65 61  64 69 6e 67 20 61 6e 64  |e 2. Reading and|
00002440  20 64 65 63 6f 64 69 6e  67 20 74 68 65 20 6d 61  | decoding the ma|
00002450  67 61 7a 69 6e 65 20 61  6e 64 20 70 61 63 6b 65  |gazine and packe|
00002460  74 20 6e 75 6d 62 65 72  73 2e 0d 2d 2d 2d 2d 2d  |t numbers..-----|
00002470  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000024a0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 0d 0d 0d 54 68 65  |----------...The|
000024b0  20 74 77 6f 20 62 79 74  65 73 20 77 68 69 63 68  | two bytes which|
000024c0  20 63 6f 6e 74 61 69 6e  20 74 68 65 20 6d 61 67  | contain the mag|
000024d0  61 7a 69 6e 65 20 61 6e  64 20 70 61 63 6b 65 74  |azine and packet|
000024e0  20 6e 75 6d 62 65 72 73  20 68 61 76 65 20 74 6f  | numbers have to|
000024f0  20 62 65 0d 72 65 61 64  20 61 6e 64 20 64 65 2d  | be.read and de-|
00002500  68 61 6d 6d 65 64 20 62  65 66 6f 72 65 20 74 68  |hammed before th|
00002510  65 79 20 63 61 6e 20 62  65 20 75 73 65 64 2e 20  |ey can be used. |
00002520  49 66 20 65 69 74 68 65  72 20 6f 66 20 74 68 65  |If either of the|
00002530  20 74 77 6f 20 62 79 74  65 73 0d 67 65 6e 65 72  | two bytes.gener|
00002540  61 74 65 73 20 61 6e 20  69 72 72 65 63 6f 76 65  |ates an irrecove|
00002550  72 61 62 6c 65 20 65 72  72 6f 72 20 28 69 65 2e  |rable error (ie.|
00002560  20 64 65 2d 68 61 6d 6d  73 20 74 6f 20 26 46 46  | de-hamms to &FF|
00002570  29 20 74 68 65 6e 20 74  68 65 20 77 68 6f 6c 65  |) then the whole|
00002580  0d 70 61 63 6b 65 74 20  6d 75 73 74 20 62 65 20  |.packet must be |
00002590  72 65 6a 65 63 74 65 64  20 62 65 63 61 75 73 65  |rejected because|
000025a0  20 77 69 74 68 6f 75 74  20 74 68 65 20 69 6e 66  | without the inf|
000025b0  6f 72 6d 61 74 69 6f 6e  20 73 74 6f 72 65 64 20  |ormation stored |
000025c0  69 6e 20 74 68 65 20 4d  52 41 47 0d 74 68 65 72  |in the MRAG.ther|
000025d0  65 20 69 73 20 6e 6f 20  77 61 79 20 6f 66 20 6b  |e is no way of k|
000025e0  6e 6f 77 69 6e 67 20 74  68 65 20 63 6f 72 72 65  |nowing the corre|
000025f0  63 74 20 69 64 65 6e 74  69 74 79 20 6f 66 20 74  |ct identity of t|
00002600  68 65 20 70 61 63 6b 65  74 2e 0d 0d 41 66 74 65  |he packet...Afte|
00002610  72 20 72 65 61 64 69 6e  67 20 61 6e 64 20 64 65  |r reading and de|
00002620  2d 68 61 6d 6d 69 6e 67  20 62 6f 74 68 20 62 79  |-hamming both by|
00002630  74 65 73 20 74 68 65 20  66 69 72 73 74 20 6e 79  |tes the first ny|
00002640  62 62 6c 65 20 69 73 20  6c 6f 61 64 65 64 20 69  |bble is loaded i|
00002650  6e 74 6f 0d 74 68 65 20  61 63 63 75 6d 75 6c 61  |nto.the accumula|
00002660  74 6f 72 20 61 6e 64 20  63 6f 6d 70 61 72 65 64  |tor and compared|
00002670  20 77 69 74 68 20 74 68  65 20 6e 75 6d 62 65 72  | with the number|
00002680  20 38 2e 20 49 66 20 74  68 65 20 63 6f 6e 74 65  | 8. If the conte|
00002690  6e 74 20 6f 66 20 74 68  65 0d 61 63 63 75 6d 75  |nt of the.accumu|
000026a0  6c 61 74 6f 72 20 69 73  20 65 71 75 61 6c 20 74  |lator is equal t|
000026b0  6f 20 6f 72 20 67 72 65  61 74 65 72 20 74 68 61  |o or greater tha|
000026c0  6e 20 38 20 74 68 65 6e  20 74 68 65 20 63 61 72  |n 8 then the car|
000026d0  72 79 20 66 6c 61 67 20  69 73 20 73 65 74 2e 20  |ry flag is set. |
000026e0  49 6e 0d 74 68 69 73 20  77 61 79 20 62 69 74 20  |In.this way bit |
000026f0  33 20 6f 66 20 74 68 65  20 66 69 72 73 74 20 6e  |3 of the first n|
00002700  79 62 62 6c 65 2c 20 77  68 69 63 68 20 69 73 20  |ybble, which is |
00002710  62 69 74 20 30 20 6f 66  20 74 68 65 20 70 61 63  |bit 0 of the pac|
00002720  6b 65 74 20 6e 75 6d 62  65 72 2c 0d 69 73 20 74  |ket number,.is t|
00002730  72 61 6e 73 66 65 72 72  65 64 20 69 6e 74 6f 20  |ransferred into |
00002740  74 68 65 20 63 61 72 72  79 20 66 6c 61 67 2e 20  |the carry flag. |
00002750  54 68 65 20 34 20 6d 6f  73 74 20 73 69 67 6e 69  |The 4 most signi|
00002760  66 69 63 61 6e 74 20 62  69 74 73 20 6f 66 20 74  |ficant bits of t|
00002770  68 65 0d 70 61 63 6b 65  74 20 6e 75 6d 62 65 72  |he.packet number|
00002780  20 61 72 65 20 74 68 65  6e 20 72 6f 74 61 74 65  | are then rotate|
00002790  64 20 6c 65 66 74 20 61  6e 64 20 74 68 65 20 6c  |d left and the l|
000027a0  65 61 73 74 20 73 69 67  6e 69 66 69 63 61 6e 74  |east significant|
000027b0  20 62 69 74 20 69 73 0d  70 6c 61 63 65 64 20 69  | bit is.placed i|
000027c0  6e 20 62 69 74 20 30 20  6f 66 20 74 68 65 20 70  |n bit 0 of the p|
000027d0  61 63 6b 65 74 20 6e 75  6d 62 65 72 2e 20 54 68  |acket number. Th|
000027e0  65 20 61 63 63 75 6d 75  6c 61 74 6f 72 20 73 74  |e accumulator st|
000027f0  69 6c 6c 20 63 6f 6e 74  61 69 6e 73 20 74 68 65  |ill contains the|
00002800  0d 66 69 72 73 74 20 6e  79 62 62 6c 65 20 77 68  |.first nybble wh|
00002810  69 63 68 20 69 73 20 41  4e 44 65 64 20 77 69 74  |ich is ANDed wit|
00002820  68 20 74 68 65 20 6e 75  6d 62 65 72 20 37 20 74  |h the number 7 t|
00002830  6f 20 63 6c 65 61 72 20  62 69 74 20 33 2e 20 54  |o clear bit 3. T|
00002840  68 65 0d 61 63 63 75 6d  75 6c 61 74 6f 72 20 74  |he.accumulator t|
00002850  68 65 6e 20 63 6f 6e 74  61 69 6e 73 20 74 68 65  |hen contains the|
00002860  20 33 20 62 69 74 20 6d  61 67 61 7a 69 6e 65 20  | 3 bit magazine |
00002870  6e 75 6d 62 65 72 20 77  68 69 63 68 20 63 61 6e  |number which can|
00002880  20 62 65 20 73 74 6f 72  65 64 0d 66 6f 72 20 6c  | be stored.for l|
00002890  61 74 65 72 20 75 73 65  20 61 6e 64 20 74 68 65  |ater use and the|
000028a0  20 70 72 65 76 69 6f 75  73 6c 79 20 69 6e 63 6f  | previously inco|
000028b0  6d 70 6c 65 74 65 20 34  20 62 69 74 20 70 61 63  |mplete 4 bit pac|
000028c0  6b 65 74 20 6e 75 6d 62  65 72 20 69 73 20 6e 6f  |ket number is no|
000028d0  77 20 74 68 65 0d 63 6f  72 72 65 63 74 20 35 20  |w the.correct 5 |
000028e0  62 69 74 20 6e 75 6d 62  65 72 2e 0d 0d 57 68 65  |bit number...Whe|
000028f0  6e 20 74 68 65 20 6d 61  67 61 7a 69 6e 65 20 61  |n the magazine a|
00002900  6e 64 20 70 61 63 6b 65  74 20 6e 75 6d 62 65 72  |nd packet number|
00002910  73 20 68 61 76 65 20 62  65 65 6e 20 64 65 63 6f  |s have been deco|
00002920  64 65 64 20 61 6e 64 20  73 74 6f 72 65 64 20 69  |ded and stored i|
00002930  6e 20 75 73 65 72 0d 6d  65 6d 6f 72 79 20 74 68  |n user.memory th|
00002940  65 20 72 65 73 74 20 6f  66 20 74 68 65 20 34 30  |e rest of the 40|
00002950  20 64 61 74 61 20 62 79  74 65 73 20 69 6e 20 74  | data bytes in t|
00002960  68 65 20 72 6f 77 20 63  61 6e 20 62 65 20 72 65  |he row can be re|
00002970  61 64 20 69 66 20 72 65  71 75 69 72 65 64 2e 0d  |ad if required..|
00002980  49 6e 20 48 45 41 44 45  52 20 6f 6e 6c 79 20 70  |In HEADER only p|
00002990  61 63 6b 65 74 20 30 20  69 73 20 72 65 61 64 20  |acket 0 is read |
000029a0  61 6e 64 20 61 6c 6c 20  6f 74 68 65 72 20 70 61  |and all other pa|
000029b0  63 6b 65 74 73 20 61 72  65 20 72 65 6a 65 63 74  |ckets are reject|
000029c0  65 64 20 28 6c 69 6e 65  73 0d 31 35 33 30 20 74  |ed (lines.1530 t|
000029d0  6f 20 31 35 34 30 29 2e  20 59 6f 75 20 63 61 6e  |o 1540). You can|
000029e0  20 65 61 73 69 6c 79 20  6d 6f 64 69 66 79 20 74  | easily modify t|
000029f0  68 69 73 20 70 72 6f 67  72 61 6d 20 69 66 20 79  |his program if y|
00002a00  6f 75 20 77 61 6e 74 20  74 6f 20 6c 6f 6f 6b 20  |ou want to look |
00002a10  61 74 0d 61 6e 79 20 6f  74 68 65 72 20 70 61 63  |at.any other pac|
00002a20  6b 65 74 73 2e 0d 0d 54  68 65 20 70 72 6f 67 72  |kets...The progr|
00002a30  61 6d 20 48 45 41 44 45  52 20 61 6e 64 20 61 6c  |am HEADER and al|
00002a40  6c 20 74 68 65 20 54 65  6c 65 74 65 78 74 20 64  |l the Teletext d|
00002a50  65 6d 6f 6e 73 74 72 61  74 69 6f 6e 20 70 72 6f  |emonstration pro|
00002a60  67 72 61 6d 73 20 69 6e  20 6d 6f 64 75 6c 65 73  |grams in modules|
00002a70  0d 32 20 74 6f 20 37 20  75 73 65 20 61 20 7a 65  |.2 to 7 use a ze|
00002a80  72 6f 20 70 61 67 65 20  66 6c 61 67 20 62 79 74  |ro page flag byt|
00002a90  65 20 63 61 6c 6c 65 64  20 67 72 61 62 66 6c 61  |e called grabfla|
00002aa0  67 20 28 6c 69 6e 65 20  34 34 30 29 20 74 6f 20  |g (line 440) to |
00002ab0  69 6e 64 69 63 61 74 65  0d 77 68 65 6e 20 64 61  |indicate.when da|
00002ac0  74 61 20 68 61 76 65 20  62 65 65 6e 20 74 72 61  |ta have been tra|
00002ad0  6e 73 66 65 72 72 65 64  20 69 6e 74 6f 20 75 73  |nsferred into us|
00002ae0  65 72 20 6d 65 6d 6f 72  79 20 61 6e 64 20 61 72  |er memory and ar|
00002af0  65 20 61 76 61 69 6c 61  62 6c 65 20 66 6f 72 0d  |e available for.|
00002b00  64 69 73 70 6c 61 79 2e  20 49 6e 20 48 45 41 44  |display. In HEAD|
00002b10  45 52 2c 20 67 72 61 62  66 6c 61 67 20 63 61 6e  |ER, grabflag can|
00002b20  20 63 6f 6e 74 61 69 6e  20 65 69 74 68 65 72 20  | contain either |
00002b30  74 68 65 20 6e 75 6d 62  65 72 20 26 30 30 20 6f  |the number &00 o|
00002b40  72 20 74 68 65 0d 6e 75  6d 62 65 72 20 26 38 30  |r the.number &80|
00002b50  2e 20 54 68 65 20 6e 75  6d 62 65 72 20 26 30 30  |. The number &00|
00002b60  20 6d 65 61 6e 73 20 74  68 61 74 20 74 68 65 20  | means that the |
00002b70  64 61 74 61 20 61 72 65  20 6e 6f 74 20 72 65 61  |data are not rea|
00002b80  64 79 20 74 6f 20 70 72  69 6e 74 20 61 6e 64 0d  |dy to print and.|
00002b90  74 68 65 20 6e 75 6d 62  65 72 20 26 38 30 20 6d  |the number &80 m|
00002ba0  65 61 6e 73 20 74 68 61  74 20 74 68 65 20 64 61  |eans that the da|
00002bb0  74 61 20 61 72 65 20 72  65 61 64 79 20 74 6f 20  |ta are ready to |
00002bc0  70 72 69 6e 74 2e 20 54  68 65 20 66 6f 72 65 67  |print. The foreg|
00002bd0  72 6f 75 6e 64 20 74 61  73 6b 0d 64 6f 65 73 20  |round task.does |
00002be0  6e 6f 74 20 72 65 74 75  72 6e 20 63 6f 6e 74 72  |not return contr|
00002bf0  6f 6c 20 74 6f 20 42 41  53 49 43 20 69 66 20 67  |ol to BASIC if g|
00002c00  72 61 62 66 6c 61 67 20  63 6f 6e 74 61 69 6e 73  |rabflag contains|
00002c10  20 7a 65 72 6f 20 28 6c  69 6e 65 73 20 37 38 30  | zero (lines 780|
00002c20  20 74 6f 0d 37 39 30 29  20 61 6e 64 20 74 68 65  | to.790) and the|
00002c30  20 62 61 63 6b 67 72 6f  75 6e 64 20 74 61 73 6b  | background task|
00002c40  20 64 6f 65 73 20 6e 6f  74 20 72 65 61 64 20 61  | does not read a|
00002c50  6e 79 20 6d 6f 72 65 20  64 61 74 61 20 69 66 20  |ny more data if |
00002c60  62 69 74 20 37 20 6f 66  0d 67 72 61 62 66 6c 61  |bit 7 of.grabfla|
00002c70  67 20 69 73 20 73 65 74  2e 20 49 6e 20 74 68 69  |g is set. In thi|
00002c80  73 20 77 61 79 20 74 68  65 20 6d 61 63 68 69 6e  |s way the machin|
00002c90  65 20 63 6f 64 65 20 66  6f 72 65 67 72 6f 75 6e  |e code foregroun|
00002ca0  64 20 74 61 73 6b 20 72  65 74 75 72 6e 73 0d 63  |d task returns.c|
00002cb0  6f 6e 74 72 6f 6c 20 74  6f 20 42 41 53 49 43 20  |ontrol to BASIC |
00002cc0  61 66 74 65 72 20 33 30  30 20 70 61 63 6b 65 74  |after 300 packet|
00002cd0  73 20 68 61 76 65 20 62  65 65 6e 20 73 74 6f 72  |s have been stor|
00002ce0  65 64 2e 0d 0d 54 68 65  20 70 72 6f 67 72 61 6d  |ed...The program|
00002cf0  20 48 45 41 44 45 52 20  75 73 65 73 20 61 20 6d  | HEADER uses a m|
00002d00  61 63 68 69 6e 65 20 63  6f 64 65 20 72 6f 75 74  |achine code rout|
00002d10  69 6e 65 20 74 6f 20 72  65 61 64 20 61 6e 64 20  |ine to read and |
00002d20  73 74 6f 72 65 20 33 30  30 0d 68 65 61 64 65 72  |store 300.header|
00002d30  73 20 69 6e 20 61 20 62  75 66 66 65 72 20 61 6e  |s in a buffer an|
00002d40  64 2c 20 61 66 74 65 72  20 72 65 61 64 69 6e 67  |d, after reading|
00002d50  20 74 68 65 20 68 65 61  64 65 72 73 2c 20 72 65  | the headers, re|
00002d60  74 75 72 6e 73 20 74 6f  20 42 41 53 49 43 20 74  |turns to BASIC t|
00002d70  6f 0d 69 6e 74 65 72 70  72 65 74 20 61 6e 64 20  |o.interpret and |
00002d80  64 69 73 70 6c 61 79 20  74 68 65 20 63 6f 6e 74  |display the cont|
00002d90  65 6e 74 73 20 6f 66 20  74 68 65 20 62 75 66 66  |ents of the buff|
00002da0  65 72 2e 20 54 68 65 20  74 61 62 6c 65 20 69 6e  |er. The table in|
00002db0  20 66 69 67 75 72 65 20  33 0d 73 68 6f 77 73 20  | figure 3.shows |
00002dc0  74 68 65 20 66 6f 72 6d  61 74 20 6f 66 20 74 68  |the format of th|
00002dd0  65 20 68 65 61 64 65 72  20 70 61 63 6b 65 74 2e  |e header packet.|
00002de0  20 46 69 67 75 72 65 20  33 20 61 6c 73 6f 20 73  | Figure 3 also s|
00002df0  68 6f 77 73 20 77 68 65  72 65 20 74 68 69 73 0d  |hows where this.|
00002e00  70 72 6f 67 72 61 6d 20  73 74 6f 72 65 73 20 74  |program stores t|
00002e10  68 65 20 64 61 74 61 20  69 74 20 72 65 61 64 73  |he data it reads|
00002e20  20 77 69 74 68 20 72 65  73 70 65 63 74 20 74 6f  | with respect to|
00002e30  20 61 6e 20 6f 66 66 73  65 74 20 27 68 65 61 64  | an offset 'head|
00002e40  27 20 69 6e 20 74 68 65  0d 64 61 74 61 20 62 75  |' in the.data bu|
00002e50  66 66 65 72 20 27 62 75  66 66 65 72 27 2e 0d 0d  |ffer 'buffer'...|
00002e60  54 68 65 20 62 79 74 65  20 6e 75 6d 62 65 72 20  |The byte number |
00002e70  69 6e 20 74 68 65 20 6c  65 66 74 20 68 61 6e 64  |in the left hand|
00002e80  20 63 6f 6c 75 6d 6e 20  6f 66 20 66 69 67 75 72  | column of figur|
00002e90  65 20 33 20 73 68 6f 77  73 20 74 68 65 20 6f 72  |e 3 shows the or|
00002ea0  64 65 72 20 69 6e 0d 77  68 69 63 68 20 74 68 65  |der in.which the|
00002eb0  20 64 61 74 61 20 61 72  65 20 73 74 6f 72 65 64  | data are stored|
00002ec0  20 69 6e 20 74 68 65 20  61 64 61 70 74 6f 72 2e  | in the adaptor.|
00002ed0  20 54 68 65 20 6e 65 78  74 20 63 6f 6c 75 6d 6e  | The next column|
00002ee0  20 73 68 6f 77 73 20 77  68 65 74 68 65 72 20 6f  | shows whether o|
00002ef0  72 0d 6e 6f 74 20 74 68  65 20 64 61 74 61 20 61  |r.not the data a|
00002f00  72 65 20 68 61 6d 6d 69  6e 67 20 63 6f 64 65 64  |re hamming coded|
00002f10  20 28 68 63 20 3d 20 68  61 6d 6d 69 6e 67 20 63  | (hc = hamming c|
00002f20  6f 64 65 64 2c 20 62 6c  61 6e 6b 20 3d 20 6e 6f  |oded, blank = no|
00002f30  74 20 63 6f 64 65 64 29  2c 0d 74 68 65 20 74 68  |t coded),.the th|
00002f40  69 72 64 20 63 6f 6c 75  6d 6e 20 67 69 76 65 73  |ird column gives|
00002f50  20 61 20 62 72 69 65 66  20 64 65 73 63 72 69 70  | a brief descrip|
00002f60  74 69 6f 6e 20 6f 66 20  74 68 65 20 62 79 74 65  |tion of the byte|
00002f70  20 28 6f 72 20 62 69 74  73 20 66 72 6f 6d 20 74  | (or bits from t|
00002f80  68 65 0d 62 79 74 65 29  2c 20 74 68 65 20 6e 65  |he.byte), the ne|
00002f90  78 74 20 63 6f 6c 75 6d  6e 20 73 68 6f 77 73 20  |xt column shows |
00002fa0  77 68 65 72 65 20 74 68  65 20 62 79 74 65 20 28  |where the byte (|
00002fb0  6f 72 20 62 69 74 73 20  66 72 6f 6d 20 74 68 65  |or bits from the|
00002fc0  20 62 79 74 65 29 20 61  72 65 0d 73 74 6f 72 65  | byte) are.store|
00002fd0  64 20 77 69 74 68 20 72  65 73 70 65 63 74 20 74  |d with respect t|
00002fe0  6f 20 74 68 65 20 6f 66  66 73 65 74 20 27 68 65  |o the offset 'he|
00002ff0  61 64 27 2c 20 61 6e 64  20 74 68 65 20 6c 61 73  |ad', and the las|
00003000  74 20 63 6f 6c 75 6d 6e  20 64 65 73 63 72 69 62  |t column describ|
00003010  65 73 0d 74 68 65 20 66  6f 72 6d 61 74 20 69 6e  |es.the format in|
00003020  20 77 68 69 63 68 20 74  68 65 20 70 72 6f 67 72  | which the progr|
00003030  61 6d 20 48 45 41 44 45  52 20 73 74 6f 72 65 73  |am HEADER stores|
00003040  20 74 68 65 20 64 61 74  61 20 28 62 6c 61 6e 6b  | the data (blank|
00003050  20 3d 20 73 74 6f 72 65  64 20 61 73 0d 72 65 61  | = stored as.rea|
00003060  64 29 2e 0d 0d 0d 2b 2d  2d 2d 2d 2d 2d 2d 2b 2d  |d)....+-------+-|
00003070  2d 2d 2d 2b 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |---+------------|
00003080  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2b  |---------------+|
00003090  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
000030a0  2d 2d 2b 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2b 0d  |--+-----------+.|
000030b0  7c 62 79 74 65 20 6e 6f  7c 63 6f 64 65 7c 20 64  ||byte no|code| d|
000030c0  65 73 63 72 69 70 74 69  6f 6e 20 20 20 20 20 20  |escription      |
000030d0  20 20 20 20 20 20 20 20  20 7c 20 73 74 6f 72 65  |         | store|
000030e0  64 20 69 6e 20 20 20 20  20 20 20 20 7c 20 66 6f  |d in        | fo|
000030f0  72 6d 61 74 20 20 20 20  7c 0d 2b 2d 2d 2d 2d 2d  |rmat    |.+-----|
00003100  2d 2d 2b 2d 2d 2d 2d 2b  2d 2d 2d 2d 2d 2d 2d 2d  |--+----+--------|
00003110  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00003120  2d 2d 2d 2b 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |---+------------|
00003130  2d 2d 2d 2d 2d 2d 2b 2d  2d 2d 2d 2d 2d 2d 2d 2d  |------+---------|
00003140  2d 2d 2b 0d 7c 20 20 31  20 20 20 20 7c 20 20 20  |--+.|  1    |   |
00003150  20 7c 20 63 6c 6f 63 6b  20 72 75 6e 2d 69 6e 20  | | clock run-in |
00003160  20 20 20 20 20 20 20 20  20 20 20 20 20 7c 20 28  |             | (|
00003170  6e 6f 74 20 72 65 61 64  29 20 20 20 20 20 20 20  |not read)       |
00003180  7c 20 20 20 20 20 20 20  20 20 20 20 7c 0d 7c 20  ||           |.| |
00003190  20 32 20 20 20 20 7c 20  20 20 20 7c 20 63 6c 6f  | 2    |    | clo|
000031a0  63 6b 20 72 75 6e 2d 69  6e 20 20 20 20 20 20 20  |ck run-in       |
000031b0  20 20 20 20 20 20 20 7c  20 28 6e 6f 74 20 72 65  |       | (not re|
000031c0  61 64 29 20 20 20 20 20  20 20 7c 20 20 20 20 20  |ad)       |     |
000031d0  20 20 20 20 20 20 7c 0d  7c 20 20 33 20 20 20 20  |      |.|  3    |
000031e0  7c 20 20 20 20 7c 20 66  72 61 6d 69 6e 67 20 63  ||    | framing c|
000031f0  6f 64 65 20 20 20 20 20  20 20 20 20 20 20 20 20  |ode             |
00003200  20 7c 20 28 6e 6f 74 20  73 74 6f 72 65 64 29 20  | | (not stored) |
00003210  20 20 20 20 7c 20 20 20  20 20 20 20 20 20 20 20  |    |           |
00003220  7c 0d 7c 20 20 34 20 20  20 20 7c 20 68 63 20 7c  ||.|  4    | hc ||
00003230  20 6d 61 67 61 7a 69 6e  65 20 6e 6f 2e 20 69 6e  | magazine no. in|
00003240  20 62 69 74 73 20 30 2d  32 20 20 7c 20 68 65 61  | bits 0-2  | hea|
00003250  64 3f 30 20 20 20 20 20  20 20 20 20 20 20 7c 20  |d?0           | |
00003260  64 65 2d 68 61 6d 6d 65  64 20 7c 0d 7c 20 20 34  |de-hammed |.|  4|
00003270  20 20 20 20 7c 20 68 63  20 7c 20 62 69 74 20 30  |    | hc | bit 0|
00003280  20 6f 66 20 70 61 63 6b  20 6e 6f 20 69 6e 20 62  | of pack no in b|
00003290  69 74 20 33 20 7c 20 28  6e 6f 74 20 73 74 6f 72  |it 3 | (not stor|
000032a0  65 64 29 20 20 20 20 20  7c 20 20 20 20 20 20 20  |ed)     |       |
000032b0  20 20 20 20 7c 0d 7c 20  20 35 20 20 20 20 7c 20  |    |.|  5    | |
000032c0  68 63 20 7c 20 70 61 63  6b 65 74 20 6e 75 6d 62  |hc | packet numb|
000032d0  65 72 20 62 69 74 73 20  31 2d 34 20 20 20 20 7c  |er bits 1-4    ||
000032e0  20 28 6e 6f 74 20 73 74  6f 72 65 64 29 20 20 20  | (not stored)   |
000032f0  20 20 7c 20 20 20 20 20  20 20 20 20 20 20 7c 0d  |  |           |.|
00003300  7c 20 20 36 20 20 20 20  7c 20 68 63 20 7c 20 70  ||  6    | hc | p|
00003310  61 67 65 20 6e 75 6d 62  65 72 2c 20 6c 6f 77 20  |age number, low |
00003320  6e 79 62 62 6c 65 20 20  20 7c 20 68 65 61 64 3f  |nybble   | head?|
00003330  31 20 20 20 20 20 20 20  20 20 20 20 7c 20 64 65  |1           | de|
00003340  2d 68 61 6d 6d 65 64 20  7c 0d 7c 20 20 37 20 20  |-hammed |.|  7  |
00003350  20 20 7c 20 68 63 20 7c  20 70 61 67 65 20 6e 75  |  | hc | page nu|
00003360  6d 62 65 72 2c 20 68 69  67 68 20 6e 79 62 62 6c  |mber, high nybbl|
00003370  65 20 20 7c 20 68 65 61  64 3f 32 20 20 20 20 20  |e  | head?2     |
00003380  20 20 20 20 20 20 7c 20  64 65 2d 68 61 6d 6d 65  |      | de-hamme|
00003390  64 20 7c 0d 7c 20 20 38  20 20 20 20 7c 20 68 63  |d |.|  8    | hc|
000033a0  20 7c 20 73 75 62 2d 70  61 67 65 2c 20 6c 6f 77  | | sub-page, low|
000033b0  20 6e 79 62 62 6c 65 20  20 20 20 20 20 7c 20 68  | nybble      | h|
000033c0  65 61 64 3f 33 20 20 20  20 20 20 20 20 20 20 20  |ead?3           |
000033d0  7c 20 64 65 2d 68 61 6d  6d 65 64 20 7c 0d 7c 20  || de-hammed |.| |
000033e0  20 39 20 20 20 20 7c 20  68 63 20 7c 20 73 75 62  | 9    | hc | sub|
000033f0  2d 70 61 67 65 20 69 6e  20 62 69 74 73 20 30 20  |-page in bits 0 |
00003400  2d 20 32 20 20 20 20 7c  20 68 65 61 64 3f 34 20  |- 2    | head?4 |
00003410  62 69 74 73 20 30 2d 32  20 20 7c 20 64 65 2d 68  |bits 0-2  | de-h|
00003420  61 6d 6d 65 64 20 7c 0d  7c 20 20 39 20 20 20 20  |ammed |.|  9    |
00003430  7c 20 68 63 20 7c 20 65  72 61 73 65 20 70 61 67  || hc | erase pag|
00003440  65 20 63 6f 6e 74 72 6f  6c 20 62 69 74 20 20 20  |e control bit   |
00003450  20 7c 20 68 65 61 64 3f  34 20 62 69 74 20 33 20  | | head?4 bit 3 |
00003460  20 20 20 20 7c 20 64 65  2d 68 61 6d 6d 65 64 20  |    | de-hammed |
00003470  7c 0d 7c 20 31 30 20 20  20 20 7c 20 68 63 20 7c  ||.| 10    | hc ||
00003480  20 73 75 62 2d 70 61 67  65 20 20 20 20 20 20 20  | sub-page       |
00003490  20 20 20 20 20 20 20 20  20 20 20 7c 20 68 65 61  |           | hea|
000034a0  64 3f 35 20 20 20 20 20  20 20 20 20 20 20 7c 20  |d?5           | |
000034b0  64 65 2d 68 61 6d 6d 65  64 20 7c 0d 7c 20 31 31  |de-hammed |.| 11|
000034c0  20 20 20 20 7c 20 68 63  20 7c 20 73 75 62 70 61  |    | hc | subpa|
000034d0  67 65 2c 68 69 20 6e 79  62 62 6c 65 2c 62 69 74  |ge,hi nybble,bit|
000034e0  73 20 30 2c 31 7c 20 68  65 61 64 3f 36 20 62 69  |s 0,1| head?6 bi|
000034f0  74 73 20 30 2c 31 20 20  7c 20 64 65 2d 68 61 6d  |ts 0,1  | de-ham|
00003500  6d 65 64 20 7c 0d 7c 20  31 31 20 20 20 20 7c 20  |med |.| 11    | |
00003510  68 63 20 7c 20 6e 65 77  73 66 6c 61 73 68 20 63  |hc | newsflash c|
00003520  6f 6e 74 72 6f 6c 20 62  69 74 20 20 20 20 20 7c  |ontrol bit     ||
00003530  20 68 65 61 64 3f 36 20  62 69 74 20 32 20 20 20  | head?6 bit 2   |
00003540  20 20 7c 20 64 65 2d 68  61 6d 6d 65 64 20 7c 0d  |  | de-hammed |.|
00003550  7c 20 31 31 20 20 20 20  7c 20 68 63 20 7c 20 73  || 11    | hc | s|
00003560  75 62 74 69 74 6c 65 20  63 6f 6e 74 72 6f 6c 20  |ubtitle control |
00003570  62 69 74 20 20 20 20 20  20 7c 20 68 65 61 64 3f  |bit      | head?|
00003580  36 20 62 69 74 20 33 20  20 20 20 20 7c 20 64 65  |6 bit 3     | de|
00003590  2d 68 61 6d 6d 65 64 20  7c 0d 7c 20 31 32 20 20  |-hammed |.| 12  |
000035a0  20 20 7c 20 68 63 20 7c  20 73 75 70 70 72 65 73  |  | hc | suppres|
000035b0  73 20 68 65 61 64 65 72  20 63 6f 6e 74 2e 20 62  |s header cont. b|
000035c0  69 74 20 7c 20 68 65 61  64 3f 37 20 62 69 74 20  |it | head?7 bit |
000035d0  30 20 20 20 20 20 7c 20  64 65 2d 68 61 6d 6d 65  |0     | de-hamme|
000035e0  64 20 7c 0d 7c 20 31 32  20 20 20 20 7c 20 68 63  |d |.| 12    | hc|
000035f0  20 7c 20 75 70 64 61 74  65 20 69 6e 64 69 63 61  | | update indica|
00003600  74 6f 72 20 63 6f 6e 74  20 62 69 74 20 7c 20 68  |tor cont bit | h|
00003610  65 61 64 3f 37 20 62 69  74 20 31 20 20 20 20 20  |ead?7 bit 1     |
00003620  7c 20 64 65 2d 68 61 6d  6d 65 64 20 7c 0d 7c 20  || de-hammed |.| |
00003630  31 32 20 20 20 20 7c 20  68 63 20 7c 20 6f 75 74  |12    | hc | out|
00003640  20 6f 66 20 73 65 71 75  65 6e 63 65 20 63 6f 6e  | of sequence con|
00003650  74 2e 20 62 69 74 20 7c  20 68 65 61 64 3f 37 20  |t. bit | head?7 |
00003660  62 69 74 20 32 20 20 20  20 20 7c 20 64 65 2d 68  |bit 2     | de-h|
00003670  61 6d 6d 65 64 20 7c 0d  7c 20 31 32 20 20 20 20  |ammed |.| 12    |
00003680  7c 20 68 63 20 7c 20 69  6e 68 69 62 69 74 20 64  || hc | inhibit d|
00003690  69 73 70 6c 61 79 20 63  6f 6e 74 2e 20 62 69 74  |isplay cont. bit|
000036a0  20 7c 20 68 65 61 64 3f  37 20 62 69 74 20 33 20  | | head?7 bit 3 |
000036b0  20 20 20 20 7c 20 64 65  2d 68 61 6d 6d 65 64 20  |    | de-hammed |
000036c0  7c 0d 7c 20 31 33 20 20  20 20 7c 20 68 63 20 7c  ||.| 13    | hc ||
000036d0  20 73 65 72 69 61 6c 2f  70 61 72 61 6c 6c 65 6c  | serial/parallel|
000036e0  20 6d 61 67 61 7a 69 6e  65 20 20 7c 20 68 65 61  | magazine  | hea|
000036f0  64 3f 38 20 62 69 74 20  30 20 20 20 20 20 7c 20  |d?8 bit 0     | |
00003700  64 65 2d 68 61 6d 6d 65  64 20 7c 0d 7c 20 31 33  |de-hammed |.| 13|
00003710  20 20 20 20 7c 20 68 63  20 7c 20 6c 61 6e 67 75  |    | hc | langu|
00003720  61 67 65 20 69 6e 20 62  69 74 73 20 31 2d 33 20  |age in bits 1-3 |
00003730  20 20 20 20 20 7c 20 68  65 61 64 3f 38 20 62 69  |     | head?8 bi|
00003740  74 73 20 31 2d 33 20 20  7c 20 64 65 2d 68 61 6d  |ts 1-3  | de-ham|
00003750  6d 65 64 20 7c 0d 7c 20  31 34 2d 34 35 20 7c 20  |med |.| 14-45 | |
00003760  20 20 20 7c 20 68 65 61  64 65 72 20 64 69 73 70  |   | header disp|
00003770  6c 61 79 20 6d 65 73 73  61 67 65 20 20 20 20 7c  |lay message    ||
00003780  20 68 65 61 64 3f 39 20  2d 20 68 65 61 64 3f 34  | head?9 - head?4|
00003790  30 20 7c 20 20 20 20 20  20 20 20 20 20 20 7c 0d  |0 |           |.|
000037a0  2b 2d 2d 2d 2d 2d 2d 2d  2b 2d 2d 2d 2d 2b 2d 2d  |+-------+----+--|
000037b0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
000037c0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2b 2d 2d 2d 2d 2d 2d  |---------+------|
000037d0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2b 2d 2d 2d  |------------+---|
000037e0  2d 2d 2d 2d 2d 2d 2d 2d  2b 0d 0d 46 69 67 75 72  |--------+..Figur|
000037f0  65 20 33 2e 20 54 68 65  20 64 61 74 61 20 74 72  |e 3. The data tr|
00003800  61 6e 73 6d 69 74 74 65  64 20 69 6e 20 74 68 65  |ansmitted in the|
00003810  20 68 65 61 64 65 72 20  70 61 63 6b 65 74 0d 2d  | header packet.-|
00003820  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00003850  2d 2d 0d 0d 0d 49 66 20  79 6f 75 20 63 6f 6d 70  |--...If you comp|
00003860  61 72 65 20 74 68 65 20  69 6e 66 6f 72 6d 61 74  |are the informat|
00003870  69 6f 6e 20 69 6e 20 66  69 67 75 72 65 20 33 20  |ion in figure 3 |
00003880  77 69 74 68 20 74 68 65  20 66 6f 72 6d 61 74 20  |with the format |
00003890  6f 66 20 74 68 65 20 68  65 61 64 65 72 0d 6d 61  |of the header.ma|
000038a0  64 65 20 61 76 61 69 6c  61 62 6c 65 20 62 79 20  |de available by |
000038b0  74 68 65 20 41 54 53 20  74 68 65 6e 20 69 74 20  |the ATS then it |
000038c0  73 68 6f 75 6c 64 20 62  65 20 63 6c 65 61 72 20  |should be clear |
000038d0  74 68 61 74 20 74 68 65  20 41 54 53 20 64 6f 65  |that the ATS doe|
000038e0  73 20 73 6f 6d 65 0d 70  72 6f 63 65 73 73 69 6e  |s some.processin|
000038f0  67 20 6f 66 20 74 68 65  20 64 61 74 61 20 62 65  |g of the data be|
00003900  66 6f 72 65 20 6d 61 6b  69 6e 67 20 74 68 65 6d  |fore making them|
00003910  20 61 76 61 69 6c 61 62  6c 65 20 74 6f 20 74 68  | available to th|
00003920  65 20 75 73 65 72 20 28  73 65 65 20 70 61 67 65  |e user (see page|
00003930  0d 34 31 20 6f 66 20 74  68 65 20 41 54 53 20 55  |.41 of the ATS U|
00003940  73 65 72 20 47 75 69 64  65 29 2e 20 57 68 65 6e  |ser Guide). When|
00003950  20 79 6f 75 20 77 72 69  74 65 20 61 20 70 72 6f  | you write a pro|
00003960  67 72 61 6d 20 74 6f 20  62 79 70 61 73 73 20 74  |gram to bypass t|
00003970  68 65 20 41 54 53 20 61  6e 64 0d 69 6e 74 65 72  |he ATS and.inter|
00003980  66 61 63 65 20 64 69 72  65 63 74 6c 79 20 77 69  |face directly wi|
00003990  74 68 20 74 68 65 20 54  65 6c 65 74 65 78 74 20  |th the Teletext |
000039a0  61 64 61 70 74 6f 72 20  79 6f 75 20 68 61 76 65  |adaptor you have|
000039b0  20 74 6f 20 74 61 6b 65  20 74 68 65 20 72 61 77  | to take the raw|
000039c0  20 64 61 74 61 0d 61 6e  64 20 70 72 6f 63 65 73  | data.and proces|
000039d0  73 20 69 74 20 77 69 74  68 69 6e 20 79 6f 75 72  |s it within your|
000039e0  20 6f 77 6e 20 70 72 6f  67 72 61 6d 2e 20 59 6f  | own program. Yo|
000039f0  75 20 6d 75 73 74 20 6e  6f 74 20 61 73 73 75 6d  |u must not assum|
00003a00  65 20 74 68 61 74 20 74  68 65 20 64 61 74 61 0d  |e that the data.|
00003a10  61 72 65 20 69 6e 20 74  68 65 20 66 61 6d 69 6c  |are in the famil|
00003a20  69 61 72 20 41 54 53 20  66 6f 72 6d 61 74 2e 20  |iar ATS format. |
00003a30  49 66 2c 20 68 6f 77 65  76 65 72 2c 20 79 6f 75  |If, however, you|
00003a40  20 6e 65 65 64 20 74 6f  20 75 73 65 20 70 61 63  | need to use pac|
00003a50  6b 65 74 20 32 37 20 74  6f 0d 66 69 6e 64 20 74  |ket 27 to.find t|
00003a60  68 65 20 70 61 67 65 20  6c 69 6e 6b 73 20 6f 72  |he page links or|
00003a70  20 74 68 65 20 43 52 43  20 62 79 74 65 73 20 79  | the CRC bytes y|
00003a80  6f 75 20 77 69 6c 6c 20  66 69 6e 64 20 74 68 61  |ou will find tha|
00003a90  74 20 74 68 65 20 64 65  73 63 72 69 70 74 69 6f  |t the descriptio|
00003aa0  6e 20 6f 66 0d 74 68 65  20 6c 61 73 74 20 34 30  |n of.the last 40|
00003ab0  20 62 79 74 65 73 20 6f  66 20 74 68 65 20 70 61  | bytes of the pa|
00003ac0  63 6b 65 74 20 69 6e 20  74 68 65 20 41 54 53 20  |cket in the ATS |
00003ad0  6d 61 6e 75 61 6c 20 77  69 6c 6c 20 61 6c 73 6f  |manual will also|
00003ae0  20 61 70 70 6c 79 20 74  6f 20 62 79 74 65 73 0d  | apply to bytes.|
00003af0  36 20 74 6f 20 34 35 20  6f 66 20 70 61 63 6b 65  |6 to 45 of packe|
00003b00  74 20 32 37 20 74 61 6b  65 6e 20 64 69 72 65 63  |t 27 taken direc|
00003b10  74 6c 79 20 66 72 6f 6d  20 74 68 65 20 61 64 61  |tly from the ada|
00003b20  70 74 6f 72 2e 0d 0d 54  68 65 20 66 69 72 73 74  |ptor...The first|
00003b30  20 35 20 62 79 74 65 73  20 6f 66 20 74 68 65 20  | 5 bytes of the |
00003b40  68 65 61 64 65 72 20 61  72 65 20 69 6e 20 74 68  |header are in th|
00003b50  65 20 73 61 6d 65 20 66  6f 72 6d 61 74 20 61 73  |e same format as|
00003b60  20 74 68 65 20 66 69 72  73 74 20 35 0d 62 79 74  | the first 5.byt|
00003b70  65 73 20 6f 66 20 61 6c  6c 20 54 65 6c 65 74 65  |es of all Telete|
00003b80  78 74 20 70 61 63 6b 65  74 73 2e 20 54 68 65 79  |xt packets. They|
00003b90  20 61 72 65 20 74 68 65  72 65 66 6f 72 65 20 72  | are therefore r|
00003ba0  65 61 64 20 61 6e 64 20  64 65 63 6f 64 65 64 20  |ead and decoded |
00003bb0  69 6e 20 74 68 65 0d 73  61 6d 65 20 77 61 79 20  |in the.same way |
00003bc0  61 73 20 61 6c 6c 20 70  61 63 6b 65 74 73 2e 0d  |as all packets..|
00003bd0  0d 54 68 65 20 70 61 63  6b 65 74 20 6e 75 6d 62  |.The packet numb|
00003be0  65 72 20 6f 66 20 74 68  65 20 68 65 61 64 65 72  |er of the header|
00003bf0  20 69 73 20 7a 65 72 6f  2e 20 50 61 63 6b 65 74  | is zero. Packet|
00003c00  20 7a 65 72 6f 20 69 73  20 74 68 65 20 6f 6e 6c  | zero is the onl|
00003c10  79 20 70 61 63 6b 65 74  20 74 6f 0d 63 6f 6e 74  |y packet to.cont|
00003c20  61 69 6e 20 74 68 65 20  70 61 67 65 20 6e 75 6d  |ain the page num|
00003c30  62 65 72 2e 20 41 6c 6c  20 70 61 63 6b 65 74 73  |ber. All packets|
00003c40  20 28 65 78 63 65 70 74  20 33 30 20 61 6e 64 20  | (except 30 and |
00003c50  33 31 29 20 72 65 63 65  69 76 65 64 20 61 66 74  |31) received aft|
00003c60  65 72 20 61 0d 70 61 63  6b 65 74 20 7a 65 72 6f  |er a.packet zero|
00003c70  2c 20 77 68 69 63 68 20  61 6c 73 6f 20 68 61 76  |, which also hav|
00003c80  65 20 74 68 65 20 73 61  6d 65 20 6d 61 67 61 7a  |e the same magaz|
00003c90  69 6e 65 20 6e 75 6d 62  65 72 20 61 73 20 74 68  |ine number as th|
00003ca0  65 20 70 61 63 6b 65 74  20 7a 65 72 6f 2c 0d 61  |e packet zero,.a|
00003cb0  72 65 20 61 73 73 75 6d  65 64 20 74 6f 20 62 65  |re assumed to be|
00003cc0  20 69 6e 20 74 68 65 20  73 61 6d 65 20 70 61 67  | in the same pag|
00003cd0  65 2e 20 54 68 65 20 70  61 67 65 20 63 68 61 6e  |e. The page chan|
00003ce0  67 65 73 20 77 68 65 6e  20 61 20 64 69 66 66 65  |ges when a diffe|
00003cf0  72 65 6e 74 0d 70 61 63  6b 65 74 20 7a 65 72 6f  |rent.packet zero|
00003d00  20 69 6e 20 74 68 65 20  73 61 6d 65 20 6d 61 67  | in the same mag|
00003d10  61 7a 69 6e 65 20 69 73  20 72 65 63 65 69 76 65  |azine is receive|
00003d20  64 2e 0d 0d 41 20 73 75  62 2d 70 61 67 65 20 6e  |d...A sub-page n|
00003d30  75 6d 62 65 72 20 63 61  6e 20 62 65 20 65 78 74  |umber can be ext|
00003d40  72 61 63 74 65 64 20 66  72 6f 6d 20 74 68 65 20  |racted from the |
00003d50  64 65 2d 68 61 6d 6d 65  64 20 38 74 68 2c 20 39  |de-hammed 8th, 9|
00003d60  74 68 2c 20 31 30 74 68  2c 20 61 6e 64 0d 31 31  |th, 10th, and.11|
00003d70  74 68 20 62 79 74 65 73  20 6f 66 20 70 61 63 6b  |th bytes of pack|
00003d80  65 74 20 7a 65 72 6f 2e  20 54 68 65 20 6c 6f 77  |et zero. The low|
00003d90  20 6f 72 64 65 72 20 6e  79 62 62 6c 65 20 69 73  | order nybble is|
00003da0  20 69 6e 20 74 68 65 20  65 69 67 68 74 68 20 62  | in the eighth b|
00003db0  79 74 65 20 61 6e 64 0d  69 73 20 73 74 6f 72 65  |yte and.is store|
00003dc0  64 20 62 79 20 74 68 65  20 70 72 6f 67 72 61 6d  |d by the program|
00003dd0  20 48 45 41 44 45 52 20  69 6e 20 68 65 61 64 3f  | HEADER in head?|
00003de0  33 2e 20 54 68 65 20 6e  65 78 74 20 28 33 20 62  |3. The next (3 b|
00003df0  69 74 29 20 6e 79 62 62  6c 65 20 69 73 20 69 6e  |it) nybble is in|
00003e00  0d 62 69 74 73 20 30 2c  20 31 20 61 6e 64 20 32  |.bits 0, 1 and 2|
00003e10  20 6f 66 20 74 68 65 20  6e 69 6e 74 68 20 62 79  | of the ninth by|
00003e20  74 65 20 61 6e 64 20 69  73 20 73 74 6f 72 65 64  |te and is stored|
00003e30  20 69 6e 20 68 65 61 64  3f 34 2e 20 54 68 65 20  | in head?4. The |
00003e40  6e 65 78 74 20 6e 79 62  62 6c 65 0d 6f 66 20 74  |next nybble.of t|
00003e50  68 65 20 73 75 62 2d 70  61 67 65 20 6e 75 6d 62  |he sub-page numb|
00003e60  65 72 20 69 73 20 69 6e  20 74 68 65 20 74 65 6e  |er is in the ten|
00003e70  74 68 20 62 79 74 65 20  61 6e 64 20 73 74 6f 72  |th byte and stor|
00003e80  65 64 20 69 6e 20 68 65  61 64 3f 35 2e 20 54 68  |ed in head?5. Th|
00003e90  65 20 68 69 67 68 0d 6f  72 64 65 72 20 28 32 20  |e high.order (2 |
00003ea0  62 69 74 29 20 6e 79 62  62 6c 65 20 69 73 20 69  |bit) nybble is i|
00003eb0  6e 20 62 69 74 73 20 30  20 61 6e 64 20 31 20 6f  |n bits 0 and 1 o|
00003ec0  66 20 74 68 65 20 65 6c  65 76 65 6e 74 68 20 62  |f the eleventh b|
00003ed0  79 74 65 20 61 6e 64 20  73 74 6f 72 65 64 20 69  |yte and stored i|
00003ee0  6e 0d 68 65 61 64 3f 36  2e 20 54 68 69 73 20 73  |n.head?6. This s|
00003ef0  74 72 61 6e 67 65 20 75  73 65 20 6f 66 20 64 69  |trange use of di|
00003f00  66 66 65 72 65 6e 74 20  6e 75 6d 62 65 72 73 20  |fferent numbers |
00003f10  6f 66 20 62 69 74 73 20  66 6f 72 20 74 68 65 20  |of bits for the |
00003f20  64 69 67 69 74 73 20 69  6e 0d 74 68 65 20 73 75  |digits in.the su|
00003f30  62 2d 70 61 67 65 20 6e  75 6d 62 65 72 20 68 61  |b-page number ha|
00003f40  73 20 69 74 73 20 6f 72  69 67 69 6e 73 20 69 6e  |s its origins in|
00003f50  20 74 68 65 20 6e 6f 77  20 6c 61 72 67 65 6c 79  | the now largely|
00003f60  20 6f 62 73 6f 6c 65 74  65 20 74 69 6d 65 0d 73  | obsolete time.s|
00003f70  75 62 2d 63 6f 64 65 2e  0d 0d 4f 72 69 67 69 6e  |ub-code...Origin|
00003f80  61 6c 6c 79 20 74 68 65  20 73 75 62 2d 70 61 67  |ally the sub-pag|
00003f90  65 20 6e 75 6d 62 65 72  20 77 61 73 20 64 65 73  |e number was des|
00003fa0  69 67 6e 65 64 20 74 6f  20 72 65 66 6c 65 63 74  |igned to reflect|
00003fb0  20 74 68 65 20 74 69 6d  65 20 6f 66 20 64 61 79  | the time of day|
00003fc0  20 61 6e 64 0d 69 74 20  77 61 73 20 61 6c 6c 6f  | and.it was allo|
00003fd0  63 61 74 65 64 20 66 6f  75 72 20 68 65 78 20 64  |cated four hex d|
00003fe0  69 67 69 74 73 20 74 6f  20 63 6f 72 72 65 73 70  |igits to corresp|
00003ff0  6f 6e 64 20 64 69 72 65  63 74 6c 79 20 77 69 74  |ond directly wit|
00004000  68 20 68 6f 75 72 73 20  61 6e 64 0d 6d 69 6e 75  |h hours and.minu|
00004010  74 65 73 2e 20 54 68 65  20 74 69 6d 65 20 68 61  |tes. The time ha|
00004020  73 20 61 20 72 61 6e 67  65 20 66 72 6f 6d 20 30  |s a range from 0|
00004030  30 30 30 20 28 6d 69 64  6e 69 67 68 74 29 20 74  |000 (midnight) t|
00004040  6f 20 32 33 35 39 20 28  31 31 3a 35 39 20 70 6d  |o 2359 (11:59 pm|
00004050  29 2e 20 54 68 65 0d 72  61 6e 67 65 20 6f 66 20  |). The.range of |
00004060  42 43 44 20 64 69 67 69  74 73 20 6e 65 65 64 65  |BCD digits neede|
00004070  64 20 74 6f 20 73 74 6f  72 65 20 74 68 65 20 74  |d to store the t|
00004080  69 6d 65 20 6f 66 20 64  61 79 20 72 65 71 75 69  |ime of day requi|
00004090  72 65 73 20 32 20 62 69  74 73 20 66 6f 72 0d 74  |res 2 bits for.t|
000040a0  68 65 20 66 69 72 73 74  20 64 69 67 69 74 20 28  |he first digit (|
000040b0  30 2d 32 29 2c 20 34 20  66 6f 72 20 74 68 65 20  |0-2), 4 for the |
000040c0  73 65 63 6f 6e 64 20 28  30 2d 39 29 2c 20 33 20  |second (0-9), 3 |
000040d0  66 6f 72 20 74 68 65 20  74 68 69 72 64 20 28 30  |for the third (0|
000040e0  2d 35 29 20 61 6e 64 20  34 0d 66 6f 72 20 74 68  |-5) and 4.for th|
000040f0  65 20 6c 61 73 74 20 28  30 2d 39 29 2e 20 54 68  |e last (0-9). Th|
00004100  65 20 73 75 62 2d 70 61  67 65 20 63 6f 64 65 20  |e sub-page code |
00004110  63 61 6e 20 74 68 65 72  65 66 6f 72 65 20 62 65  |can therefore be|
00004120  20 61 20 6d 61 78 69 6d  75 6d 20 6f 66 20 26 33  | a maximum of &3|
00004130  46 37 46 0d 61 6e 64 20  75 70 20 74 6f 20 33 32  |F7F.and up to 32|
00004140  30 30 20 73 75 62 2d 70  61 67 65 73 20 63 61 6e  |00 sub-pages can|
00004150  20 62 65 20 61 73 73 6f  63 69 61 74 65 64 20 77  | be associated w|
00004160  69 74 68 20 61 6e 79 20  70 61 67 65 2e 20 4e 6f  |ith any page. No|
00004170  74 20 61 6c 6c 20 74 68  65 0d 63 6f 64 65 73 20  |t all the.codes |
00004180  62 65 74 77 65 65 6e 20  30 20 61 6e 20 26 33 46  |between 0 an &3F|
00004190  37 46 20 61 72 65 20 70  6f 73 73 69 62 6c 65 2c  |7F are possible,|
000041a0  20 66 6f 72 20 65 78 61  6d 70 6c 65 2c 20 61 20  | for example, a |
000041b0  73 75 62 2d 70 61 67 65  20 63 6f 64 65 20 6f 66  |sub-page code of|
000041c0  0d 26 30 30 38 30 20 69  73 20 6e 6f 74 20 70 6f  |.&0080 is not po|
000041d0  73 73 69 62 6c 65 2c 20  61 73 20 74 68 65 20 74  |ssible, as the t|
000041e0  68 69 72 64 20 64 69 67  69 74 20 63 61 6e 6e 6f  |hird digit canno|
000041f0  74 20 65 78 63 65 65 64  20 37 2e 0d 0d 54 68 65  |t exceed 7...The|
00004200  20 41 6c 61 72 6d 20 63  6c 6f 63 6b 20 6f 6e 20  | Alarm clock on |
00004210  43 45 45 46 41 58 20 70  61 67 65 20 31 39 36 20  |CEEFAX page 196 |
00004220  69 73 20 74 68 65 20 6f  6e 6c 79 20 70 61 67 65  |is the only page|
00004230  20 74 68 61 74 20 69 73  20 6e 6f 77 0d 74 72 61  | that is now.tra|
00004240  6e 73 6d 69 74 74 65 64  20 75 73 69 6e 67 20 74  |nsmitted using t|
00004250  68 65 20 73 75 62 2d 70  61 67 65 20 63 6f 64 69  |he sub-page codi|
00004260  6e 67 20 61 73 20 61 20  74 69 6d 65 2d 63 6f 64  |ng as a time-cod|
00004270  65 2e 20 52 65 71 75 65  73 74 69 6e 67 20 74 68  |e. Requesting th|
00004280  65 20 61 6c 61 72 6d 0d  61 74 2c 20 66 6f 72 20  |e alarm.at, for |
00004290  65 78 61 6d 70 6c 65 2c  20 31 37 3a 33 30 2c 20  |example, 17:30, |
000042a0  69 73 20 69 6e 20 66 61  63 74 20 74 68 65 20 73  |is in fact the s|
000042b0  61 6d 65 20 61 73 20 72  65 71 75 65 73 74 69 6e  |ame as requestin|
000042c0  67 20 70 61 67 65 20 31  39 36 0d 73 75 62 2d 70  |g page 196.sub-p|
000042d0  61 67 65 20 31 37 33 30  2c 20 77 68 69 63 68 20  |age 1730, which |
000042e0  69 73 20 62 72 6f 61 64  63 61 73 74 20 61 74 20  |is broadcast at |
000042f0  65 78 61 63 74 6c 79 20  35 3a 33 30 20 70 6d 2e  |exactly 5:30 pm.|
00004300  20 41 6c 6c 20 74 68 65  20 6f 74 68 65 72 0d 63  | All the other.c|
00004310  79 63 6c 69 6e 67 20 73  75 62 2d 70 61 67 65 73  |ycling sub-pages|
00004320  20 75 73 65 20 74 68 65  20 73 75 62 2d 70 61 67  | use the sub-pag|
00004330  65 20 6e 75 6d 62 65 72  20 61 73 20 61 20 6d 65  |e number as a me|
00004340  61 6e 73 20 74 6f 20 64  69 66 66 65 72 65 6e 74  |ans to different|
00004350  69 61 74 65 0d 62 65 74  77 65 65 6e 20 63 6f 6e  |iate.between con|
00004360  73 65 63 75 74 69 76 65  20 70 61 67 65 73 20 69  |secutive pages i|
00004370  6e 20 61 20 72 6f 6c 6c  69 6e 67 20 73 65 71 75  |n a rolling sequ|
00004380  65 6e 63 65 2e 0d 0d 54  68 65 20 63 6f 6e 74 72  |ence...The contr|
00004390  6f 6c 20 62 69 74 73 20  62 72 6f 61 64 63 61 73  |ol bits broadcas|
000043a0  74 20 69 6e 20 74 68 65  20 68 65 61 64 65 72 20  |t in the header |
000043b0  70 61 63 6b 65 74 20 77  69 6c 6c 20 62 65 20 75  |packet will be u|
000043c0  73 65 64 20 69 6e 20 6d  6f 64 75 6c 65 73 20 33  |sed in modules 3|
000043d0  0d 61 6e 64 20 34 20 77  68 65 6e 20 74 68 65 20  |.and 4 when the |
000043e0  64 65 73 69 67 6e 20 6f  66 20 70 61 67 65 20 67  |design of page g|
000043f0  72 61 62 62 65 72 73 20  77 69 6c 6c 20 62 65 20  |rabbers will be |
00004400  63 6f 6e 73 69 64 65 72  65 64 2e 20 54 68 65 72  |considered. Ther|
00004410  65 20 61 72 65 20 38 0d  63 6f 6e 74 72 6f 6c 20  |e are 8.control |
00004420  62 69 74 73 20 77 68 69  63 68 20 61 72 65 20 75  |bits which are u|
00004430  73 65 64 20 61 6e 64 20  33 20 75 6e 75 73 65 64  |sed and 3 unused|
00004440  20 63 6f 6e 74 72 6f 6c  20 62 69 74 73 2e 20 54  | control bits. T|
00004450  68 65 20 63 6f 6e 74 72  6f 6c 20 62 69 74 73 0d  |he control bits.|
00004460  68 61 76 65 20 74 68 65  20 66 6f 6c 6c 6f 77 69  |have the followi|
00004470  6e 67 20 6c 6f 63 61 74  69 6f 6e 73 20 61 6e 64  |ng locations and|
00004480  20 69 6e 74 65 72 70 72  65 74 61 74 69 6f 6e 73  | interpretations|
00004490  3a 0d 0d 0d 45 72 61 73  65 20 70 61 67 65 2e 0d  |:...Erase page..|
000044a0  0d 42 72 6f 61 64 63 61  73 74 20 69 6e 20 62 79  |.Broadcast in by|
000044b0  74 65 20 39 2c 20 62 69  74 20 33 2e 20 28 53 74  |te 9, bit 3. (St|
000044c0  6f 72 65 64 20 69 6e 20  68 65 61 64 3f 34 2c 20  |ored in head?4, |
000044d0  62 69 74 20 33 29 0d 49  66 20 61 20 64 65 63 6f  |bit 3).If a deco|
000044e0  64 65 72 20 72 65 63 65  69 76 65 73 20 61 20 70  |der receives a p|
000044f0  61 67 65 20 63 6f 6e 74  61 69 6e 69 6e 67 20 6c  |age containing l|
00004500  65 73 73 20 74 68 61 6e  20 32 33 20 70 61 63 6b  |ess than 23 pack|
00004510  65 74 73 20 69 74 20 6d  75 73 74 20 6b 6e 6f 77  |ets it must know|
00004520  0d 77 68 65 74 68 65 72  20 74 68 65 73 65 20 61  |.whether these a|
00004530  72 65 20 74 6f 20 62 65  20 73 69 6d 70 6c 79 20  |re to be simply |
00004540  6f 76 65 72 6c 61 69 64  20 6f 6e 20 61 20 70 72  |overlaid on a pr|
00004550  65 76 69 6f 75 73 6c 79  20 72 65 63 65 69 76 65  |eviously receive|
00004560  64 20 70 61 67 65 20 77  69 74 68 0d 74 68 65 20  |d page with.the |
00004570  73 61 6d 65 20 70 61 67  65 20 6e 75 6d 62 65 72  |same page number|
00004580  20 6f 72 20 69 66 20 74  68 65 20 70 72 65 76 69  | or if the previ|
00004590  6f 75 73 20 74 65 78 74  20 69 73 20 74 6f 20 62  |ous text is to b|
000045a0  65 20 65 72 61 73 65 64  20 62 65 66 6f 72 65 0d  |e erased before.|
000045b0  75 70 64 61 74 69 6e 67  2e 20 49 66 20 74 68 65  |updating. If the|
000045c0  20 65 72 61 73 65 20 70  61 67 65 20 62 69 74 20  | erase page bit |
000045d0  69 73 20 73 65 74 2c 20  69 74 20 77 69 6c 6c 20  |is set, it will |
000045e0  64 6f 20 74 68 65 20 6c  61 74 74 65 72 2e 20 49  |do the latter. I|
000045f0  66 20 74 68 65 0d 65 72  61 73 65 2d 62 69 74 20  |f the.erase-bit |
00004600  69 73 20 63 6c 65 61 72  20 69 74 20 73 68 6f 75  |is clear it shou|
00004610  6c 64 20 6f 76 65 72 6c  61 79 20 74 68 65 20 69  |ld overlay the i|
00004620  6e 66 6f 72 6d 61 74 69  6f 6e 20 77 69 74 68 6f  |nformation witho|
00004630  75 74 20 65 72 61 73 69  6e 67 20 74 68 65 0d 70  |ut erasing the.p|
00004640  72 65 76 69 6f 75 73 20  70 61 67 65 2e 0d 0d 0d  |revious page....|
00004650  4e 65 77 73 66 6c 61 73  68 2e 0d 0d 42 72 6f 61  |Newsflash...Broa|
00004660  64 63 61 73 74 20 69 6e  20 62 79 74 65 20 31 31  |dcast in byte 11|
00004670  2c 20 62 69 74 20 32 2e  20 28 53 74 6f 72 65 64  |, bit 2. (Stored|
00004680  20 69 6e 20 68 65 61 64  3f 36 2c 20 62 69 74 20  | in head?6, bit |
00004690  32 29 0d 4e 65 77 73 66  6c 61 73 68 65 73 20 61  |2).Newsflashes a|
000046a0  6e 64 20 73 75 62 74 69  74 6c 65 73 20 61 72 65  |nd subtitles are|
000046b0  20 64 65 73 69 67 6e 65  64 20 74 6f 20 62 65 20  | designed to be |
000046c0  6d 69 78 65 64 20 77 69  74 68 20 6e 6f 72 6d 61  |mixed with norma|
000046d0  6c 20 54 56 0d 70 69 63  74 75 72 65 73 20 61 6e  |l TV.pictures an|
000046e0  64 20 61 72 65 20 72 65  63 6f 67 6e 69 73 65 64  |d are recognised|
000046f0  20 62 79 20 54 65 6c 65  74 65 78 74 20 74 65 6c  | by Teletext tel|
00004700  65 76 69 73 69 6f 6e 20  73 65 74 73 20 62 79 20  |evision sets by |
00004710  74 68 65 69 72 20 63 6f  6e 74 72 6f 6c 0d 62 69  |their control.bi|
00004720  74 73 2e 20 54 68 65 79  20 61 72 65 20 6e 6f 74  |ts. They are not|
00004730  20 64 69 73 70 6c 61 79  65 64 20 62 79 20 74 68  | displayed by th|
00004740  65 20 41 54 53 20 54 65  6c 65 74 65 78 74 20 74  |e ATS Teletext t|
00004750  65 72 6d 69 6e 61 6c 20  6d 6f 64 65 20 62 65 63  |erminal mode bec|
00004760  61 75 73 65 20 74 68 65  0d 41 63 6f 72 6e 20 61  |ause the.Acorn a|
00004770  64 61 70 74 6f 72 20 63  61 6e 6e 6f 74 20 6d 69  |daptor cannot mi|
00004780  78 20 74 65 6c 65 76 69  73 69 6f 6e 20 61 6e 64  |x television and|
00004790  20 54 65 6c 65 74 65 78  74 20 73 69 67 6e 61 6c  | Teletext signal|
000047a0  73 2e 0d 0d 0d 53 75 62  74 69 74 6c 65 2e 0d 0d  |s....Subtitle...|
000047b0  42 72 6f 61 64 63 61 73  74 20 69 6e 20 62 79 74  |Broadcast in byt|
000047c0  65 20 31 31 2c 20 62 69  74 20 33 2e 20 28 53 74  |e 11, bit 3. (St|
000047d0  6f 72 65 64 20 69 6e 20  68 65 61 64 3f 36 2c 20  |ored in head?6, |
000047e0  62 69 74 20 33 29 0d 41  73 20 77 69 74 68 20 74  |bit 3).As with t|
000047f0  68 65 20 6e 65 77 73 66  6c 61 73 68 20 70 61 67  |he newsflash pag|
00004800  65 73 2c 20 73 75 62 74  69 74 6c 65 73 20 61 72  |es, subtitles ar|
00004810  65 20 6d 69 78 65 64 20  77 69 74 68 20 74 68 65  |e mixed with the|
00004820  20 6e 6f 72 6d 61 6c 20  54 56 0d 70 69 63 74 75  | normal TV.pictu|
00004830  72 65 2e 20 53 75 62 74  69 74 6c 65 73 20 61 72  |re. Subtitles ar|
00004840  65 20 6e 6f 74 20 64 69  73 70 6c 61 79 65 64 20  |e not displayed |
00004850  62 79 20 74 68 65 20 41  54 53 20 54 65 6c 65 74  |by the ATS Telet|
00004860  65 78 74 20 74 65 72 6d  69 6e 61 6c 2e 0d 0d 0d  |ext terminal....|
00004870  53 75 70 70 72 65 73 73  20 68 65 61 64 65 72 2e  |Suppress header.|
00004880  0d 0d 42 72 6f 61 64 63  61 73 74 20 69 6e 20 62  |..Broadcast in b|
00004890  79 74 65 20 31 32 2c 20  62 69 74 20 30 2e 20 28  |yte 12, bit 0. (|
000048a0  53 74 6f 72 65 64 20 69  6e 20 68 65 61 64 3f 37  |Stored in head?7|
000048b0  2c 20 62 69 74 20 30 29  0d 4e 6f 72 6d 61 6c 6c  |, bit 0).Normall|
000048c0  79 20 61 6c 6c 20 74 68  65 20 70 61 67 65 20 68  |y all the page h|
000048d0  65 61 64 65 72 73 20 61  72 65 20 64 69 73 70 6c  |eaders are displ|
000048e0  61 79 65 64 20 61 73 20  74 68 65 79 20 61 72 65  |ayed as they are|
000048f0  20 72 65 63 65 69 76 65  64 2e 20 54 68 69 73 0d  | received. This.|
00004900  65 6e 73 75 72 65 73 20  74 68 65 20 74 69 6d 65  |ensures the time|
00004910  20 64 69 73 70 6c 61 79  65 64 20 69 6e 20 74 68  | displayed in th|
00004920  65 20 68 65 61 64 65 72  20 69 73 20 6b 65 70 74  |e header is kept|
00004930  20 72 65 61 73 6f 6e 61  62 6c 79 20 61 63 63 75  | reasonably accu|
00004940  72 61 74 65 2c 20 61 6e  64 0d 74 68 65 20 63 79  |rate, and.the cy|
00004950  63 6c 69 6e 67 20 70 61  67 65 20 6e 75 6d 62 65  |cling page numbe|
00004960  72 73 20 63 61 6e 20 62  65 20 73 65 65 6e 2e 20  |rs can be seen. |
00004970  54 68 65 20 68 65 61 64  65 72 73 20 6f 66 20 73  |The headers of s|
00004980  6f 6d 65 20 70 61 67 65  73 20 61 72 65 20 6e 6f  |ome pages are no|
00004990  74 0d 64 69 73 70 6c 61  79 65 64 20 62 79 20 54  |t.displayed by T|
000049a0  65 6c 65 74 65 78 74 20  74 65 6c 65 76 69 73 69  |eletext televisi|
000049b0  6f 6e 20 73 65 74 73 2e  20 41 74 20 74 68 65 20  |on sets. At the |
000049c0  6d 6f 6d 65 6e 74 20 74  68 65 20 42 42 43 20 54  |moment the BBC T|
000049d0  65 6c 65 73 6f 66 74 77  61 72 65 0d 70 61 67 65  |elesoftware.page|
000049e0  73 20 61 6e 64 20 61 6c  6c 20 70 61 67 65 73 20  |s and all pages |
000049f0  69 6e 20 74 68 65 20 61  6c 70 68 61 62 65 74 69  |in the alphabeti|
00004a00  63 20 72 61 6e 67 65 20  6f 66 20 68 65 78 61 64  |c range of hexad|
00004a10  65 63 69 6d 61 6c 20 6e  75 6d 62 65 72 73 20 68  |ecimal numbers h|
00004a20  61 76 65 0d 74 68 65 20  64 69 73 70 6c 61 79 20  |ave.the display |
00004a30  6f 66 20 74 68 65 69 72  20 68 65 61 64 65 72 73  |of their headers|
00004a40  20 73 75 70 70 72 65 73  73 65 64 2e 0d 0d 0d 55  | suppressed....U|
00004a50  70 64 61 74 65 20 69 6e  64 69 63 61 74 6f 72 2e  |pdate indicator.|
00004a60  0d 0d 42 72 6f 61 64 63  61 73 74 20 69 6e 20 62  |..Broadcast in b|
00004a70  79 74 65 20 31 32 2c 20  62 69 74 20 31 2e 20 28  |yte 12, bit 1. (|
00004a80  53 74 6f 72 65 64 20 69  6e 20 68 65 61 64 3f 37  |Stored in head?7|
00004a90  20 62 69 74 20 31 29 0d  54 68 65 20 75 70 64 61  | bit 1).The upda|
00004aa0  74 65 20 69 6e 64 69 63  61 74 6f 72 20 62 69 74  |te indicator bit|
00004ab0  20 69 6e 64 69 63 61 74  65 73 20 77 68 65 74 68  | indicates wheth|
00004ac0  65 72 20 74 68 65 20 63  6f 6e 74 65 6e 74 20 6f  |er the content o|
00004ad0  66 20 74 68 65 20 70 61  67 65 20 68 61 73 0d 62  |f the page has.b|
00004ae0  65 65 6e 20 61 6c 74 65  72 65 64 20 73 69 6e 63  |een altered sinc|
00004af0  65 20 69 74 73 20 6c 61  73 74 20 62 72 6f 61 64  |e its last broad|
00004b00  63 61 73 74 2e 20 57 68  65 6e 20 74 68 69 73 20  |cast. When this |
00004b10  62 69 74 20 69 73 20 73  65 74 20 74 68 65 20 70  |bit is set the p|
00004b20  61 67 65 20 6d 61 79 0d  62 65 20 69 6e 63 6f 6d  |age may.be incom|
00004b30  70 6c 65 74 65 2c 20 63  6f 6e 74 61 69 6e 69 6e  |plete, containin|
00004b40  67 20 6f 6e 6c 79 20 74  68 65 20 75 70 64 61 74  |g only the updat|
00004b50  65 64 20 70 61 63 6b 65  74 73 20 6f 66 20 61 20  |ed packets of a |
00004b60  70 61 67 65 2e 0d 0d 0d  4f 75 74 20 6f 66 20 53  |page....Out of S|
00004b70  65 71 75 65 6e 63 65 2e  0d 0d 42 72 6f 61 64 63  |equence...Broadc|
00004b80  61 73 74 20 69 6e 20 62  79 74 65 20 31 32 2c 20  |ast in byte 12, |
00004b90  62 69 74 20 32 2e 20 28  53 74 6f 72 65 64 20 69  |bit 2. (Stored i|
00004ba0  6e 20 68 65 61 64 3f 37  2c 20 62 69 74 20 32 29  |n head?7, bit 2)|
00004bb0  0d 54 68 69 73 20 62 69  74 20 69 73 20 73 65 74  |.This bit is set|
00004bc0  20 77 68 65 6e 20 61 20  70 61 67 65 20 69 73 20  | when a page is |
00004bd0  62 72 6f 61 64 63 61 73  74 20 6f 75 74 20 6f 66  |broadcast out of|
00004be0  20 73 74 72 69 63 74 20  6e 75 6d 65 72 69 63 61  | strict numerica|
00004bf0  6c 20 73 65 71 75 65 6e  63 65 0d 69 6e 20 6f 72  |l sequence.in or|
00004c00  64 65 72 20 74 6f 20 67  69 76 65 20 69 74 20 70  |der to give it p|
00004c10  72 69 6f 72 69 74 79 20  28 73 75 63 68 20 61 73  |riority (such as|
00004c20  20 61 20 73 75 62 74 69  74 6c 65 29 20 6f 72 20  | a subtitle) or |
00004c30  6d 6f 72 65 20 66 72 65  71 75 65 6e 74 0d 74 72  |more frequent.tr|
00004c40  61 6e 73 6d 69 73 73 69  6f 6e 20 28 73 75 63 68  |ansmission (such|
00004c50  20 61 73 20 61 6e 20 69  6e 64 65 78 20 70 61 67  | as an index pag|
00004c60  65 29 2e 20 49 6e 20 6f  72 64 65 72 20 74 6f 20  |e). In order to |
00004c70  6b 65 65 70 20 61 20 73  74 65 61 64 79 20 61 70  |keep a steady ap|
00004c80  70 65 61 72 61 6e 63 65  0d 74 6f 20 74 68 65 20  |pearance.to the |
00004c90  63 79 63 6c 69 6e 67 20  70 61 67 65 20 6e 75 6d  |cycling page num|
00004ca0  62 65 72 20 64 69 73 70  6c 61 79 20 74 68 65 20  |ber display the |
00004cb0  68 65 61 64 65 72 73 20  6f 66 20 6f 75 74 20 6f  |headers of out o|
00004cc0  66 20 73 65 71 75 65 6e  63 65 20 70 61 67 65 73  |f sequence pages|
00004cd0  0d 61 72 65 20 6e 6f 74  20 64 69 73 70 6c 61 79  |.are not display|
00004ce0  65 64 2e 20 54 68 65 72  65 20 6d 61 79 20 62 65  |ed. There may be|
00004cf0  20 74 69 6d 65 73 20 77  68 65 6e 20 61 20 64 65  | times when a de|
00004d00  63 6f 64 65 72 20 77 69  6c 6c 20 6e 65 65 64 20  |coder will need |
00004d10  74 6f 0d 64 69 66 66 65  72 65 6e 74 69 61 74 65  |to.differentiate|
00004d20  20 62 65 74 77 65 65 6e  20 61 20 73 75 70 70 72  | between a suppr|
00004d30  65 73 73 65 64 20 68 65  61 64 65 72 20 66 72 6f  |essed header fro|
00004d40  6d 20 61 6e 20 69 6e 20  73 65 71 75 65 6e 63 65  |m an in sequence|
00004d50  20 70 61 67 65 2c 20 61  6e 64 20 61 6e 0d 75 6e  | page, and an.un|
00004d60  73 75 70 70 72 65 73 73  65 64 20 68 65 61 64 65  |suppressed heade|
00004d70  72 20 66 72 6f 6d 20 61  6e 20 6f 75 74 20 6f 66  |r from an out of|
00004d80  20 73 65 71 75 65 6e 63  65 20 70 61 67 65 2c 20  | sequence page, |
00004d90  61 6e 64 20 73 6f 20 74  68 65 20 74 77 6f 0d 63  |and so the two.c|
00004da0  6f 6e 64 69 74 69 6f 6e  73 20 61 72 65 20 61 6c  |onditions are al|
00004db0  6c 6f 63 61 74 65 64 20  73 65 70 61 72 61 74 65  |located separate|
00004dc0  20 63 6f 6e 74 72 6f 6c  20 62 69 74 73 2e 0d 0d  | control bits...|
00004dd0  0d 49 6e 68 69 62 69 74  20 64 69 73 70 6c 61 79  |.Inhibit display|
00004de0  2e 0d 0d 42 72 6f 61 64  63 61 73 74 20 69 6e 20  |...Broadcast in |
00004df0  62 79 74 65 20 31 32 2c  20 62 69 74 20 33 2e 20  |byte 12, bit 3. |
00004e00  28 53 74 6f 72 65 64 20  69 6e 20 68 65 61 64 3f  |(Stored in head?|
00004e10  37 2c 20 62 69 74 20 33  29 0d 42 42 43 20 54 65  |7, bit 3).BBC Te|
00004e20  6c 65 73 6f 66 74 77 61  72 65 20 70 61 67 65 73  |lesoftware pages|
00004e30  20 6f 66 74 65 6e 20 68  61 76 65 20 74 68 65 20  | often have the |
00004e40  69 6e 68 69 62 69 74 20  64 69 73 70 6c 61 79 20  |inhibit display |
00004e50  62 69 74 20 73 65 74 20  74 6f 20 73 75 70 70 72  |bit set to suppr|
00004e60  65 73 73 0d 74 68 65 20  64 69 73 70 6c 61 79 20  |ess.the display |
00004e70  6f 66 20 74 68 65 20 54  65 6c 65 73 6f 66 74 77  |of the Telesoftw|
00004e80  61 72 65 20 66 69 6c 65  2e 20 54 68 65 73 65 20  |are file. These |
00004e90  66 69 6c 65 73 20 61 72  65 20 66 6f 72 20 63 6f  |files are for co|
00004ea0  6d 70 75 74 65 72 20 75  73 65 0d 6f 6e 6c 79 20  |mputer use.only |
00004eb0  61 6e 64 20 6d 61 79 20  63 61 75 73 65 20 73 6f  |and may cause so|
00004ec0  6d 65 20 63 6f 6e 66 75  73 69 6f 6e 20 69 66 20  |me confusion if |
00004ed0  64 69 73 70 6c 61 79 65  64 20 62 79 20 61 20 54  |displayed by a T|
00004ee0  65 6c 65 74 65 78 74 20  74 65 6c 65 76 69 73 69  |eletext televisi|
00004ef0  6f 6e 0d 73 65 74 2e 0d  0d 0d 53 65 72 69 61 6c  |on.set....Serial|
00004f00  20 6d 61 67 61 7a 69 6e  65 2e 0d 0d 42 72 6f 61  | magazine...Broa|
00004f10  64 63 61 73 74 20 69 6e  20 62 79 74 65 20 31 33  |dcast in byte 13|
00004f20  2c 20 62 69 74 20 30 2e  20 28 53 74 6f 72 65 64  |, bit 0. (Stored|
00004f30  20 69 6e 20 68 65 61 64  3f 38 2c 20 62 69 74 20  | in head?8, bit |
00004f40  30 29 0d 4d 61 67 61 7a  69 6e 65 73 20 6f 6e 20  |0).Magazines on |
00004f50  54 65 6c 65 74 65 78 74  20 61 72 65 20 65 69 74  |Teletext are eit|
00004f60  68 65 72 20 73 65 72 69  61 6c 20 28 42 42 43 20  |her serial (BBC |
00004f70  31 2c 20 42 42 43 20 32  20 61 6e 64 20 43 68 61  |1, BBC 2 and Cha|
00004f80  6e 6e 65 6c 20 34 29 20  6f 72 0d 70 61 72 61 6c  |nnel 4) or.paral|
00004f90  6c 65 6c 20 28 49 54 56  20 6e 65 74 77 6f 72 6b  |lel (ITV network|
00004fa0  29 2e 20 54 68 65 20 42  42 43 20 32 20 73 65 72  |). The BBC 2 ser|
00004fb0  69 61 6c 20 74 72 61 6e  73 6d 69 73 73 69 6f 6e  |ial transmission|
00004fc0  73 20 62 72 6f 61 64 63  61 73 74 20 65 61 63 68  |s broadcast each|
00004fd0  20 70 61 67 65 0d 66 72  6f 6d 20 6d 61 67 61 7a  | page.from magaz|
00004fe0  69 6e 65 20 32 20 66 6f  6c 6c 6f 77 65 64 20 62  |ine 2 followed b|
00004ff0  79 20 65 61 63 68 20 70  61 67 65 20 66 72 6f 6d  |y each page from|
00005000  20 6d 61 67 61 7a 69 6e  65 20 33 20 74 68 65 6e  | magazine 3 then|
00005010  20 65 61 63 68 20 70 61  67 65 20 66 72 6f 6d 0d  | each page from.|
00005020  6d 61 67 61 7a 69 6e 65  20 37 2e 20 54 68 65 20  |magazine 7. The |
00005030  70 61 72 61 6c 6c 65 6c  20 74 72 61 6e 73 6d 69  |parallel transmi|
00005040  73 73 69 6f 6e 73 20 6f  6e 20 74 68 65 20 49 54  |ssions on the IT|
00005050  56 20 6e 65 74 77 6f 72  6b 20 68 61 76 65 20 70  |V network have p|
00005060  61 63 6b 65 74 73 0d 66  72 6f 6d 20 74 68 65 20  |ackets.from the |
00005070  70 61 67 65 73 20 69 6e  20 65 61 63 68 20 6d 61  |pages in each ma|
00005080  67 61 7a 69 6e 65 20 69  6e 74 65 72 6c 65 61 76  |gazine interleav|
00005090  65 64 20 77 69 74 68 20  74 68 65 20 70 61 63 6b  |ed with the pack|
000050a0  65 74 73 20 66 72 6f 6d  20 61 0d 64 69 66 66 65  |ets from a.diffe|
000050b0  72 65 6e 74 20 6d 61 67  61 7a 69 6e 65 2e 20 43  |rent magazine. C|
000050c0  75 72 72 65 6e 74 6c 79  20 49 54 56 20 75 73 65  |urrently ITV use|
000050d0  20 66 6f 75 72 20 6c 69  6e 65 73 20 66 6f 72 20  | four lines for |
000050e0  74 68 65 69 72 20 6e 61  74 69 6f 6e 61 6c 0d 6d  |their national.m|
000050f0  61 67 61 7a 69 6e 65 20  28 31 30 30 20 73 65 72  |agazine (100 ser|
00005100  69 65 73 20 70 61 67 65  73 29 2c 20 61 6e 64 20  |ies pages), and |
00005110  74 68 72 65 65 20 6c 69  6e 65 73 20 66 6f 72 20  |three lines for |
00005120  74 68 65 20 72 65 67 69  6f 6e 61 6c 20 6d 61 67  |the regional mag|
00005130  61 7a 69 6e 65 0d 28 32  30 30 20 73 65 72 69 65  |azine.(200 serie|
00005140  73 20 70 61 67 65 73 29  2e 0d 0d 50 61 72 61 6c  |s pages)...Paral|
00005150  6c 65 6c 20 74 72 61 6e  73 6d 69 73 73 69 6f 6e  |lel transmission|
00005160  20 6e 65 65 64 6e 27 74  20 75 73 65 20 61 20 66  | needn't use a f|
00005170  69 78 65 64 20 6e 75 6d  62 65 72 20 6f 66 20 6c  |ixed number of l|
00005180  69 6e 65 73 20 68 6f 77  65 76 65 72 2c 20 61 6e  |ines however, an|
00005190  64 20 61 6e 0d 69 6e 74  65 6c 6c 69 67 65 6e 74  |d an.intelligent|
000051a0  20 74 72 61 6e 73 6d 69  73 73 69 6f 6e 20 73 79  | transmission sy|
000051b0  73 74 65 6d 20 63 6f 75  6c 64 20 67 69 76 65 20  |stem could give |
000051c0  65 78 74 72 61 20 6c 69  6e 65 73 20 74 6f 20 74  |extra lines to t|
000051d0  68 65 20 27 6f 74 68 65  72 27 0d 6d 61 67 61 7a  |he 'other'.magaz|
000051e0  69 6e 65 20 69 66 20 74  68 65 20 66 69 72 73 74  |ine if the first|
000051f0  20 77 6f 75 6c 64 20 6f  74 68 65 72 77 69 73 65  | would otherwise|
00005200  20 6f 6e 6c 79 20 74 72  61 6e 73 6d 69 74 20 27  | only transmit '|
00005210  64 75 6d 6d 79 27 20 68  65 61 64 65 72 73 20 28  |dummy' headers (|
00005220  70 61 67 65 0d 78 46 46  29 2e 20 48 6f 77 65 76  |page.xFF). Howev|
00005230  65 72 2c 20 74 68 69 73  20 6e 65 65 64 73 20 6d  |er, this needs m|
00005240  6f 72 65 20 63 6f 6d 70  6c 69 63 61 74 65 64 20  |ore complicated |
00005250  74 72 61 6e 73 6d 69 73  73 69 6f 6e 20 73 6f 66  |transmission sof|
00005260  74 77 61 72 65 20 74 68  61 6e 20 69 73 0d 63 75  |tware than is.cu|
00005270  72 72 65 6e 74 6c 79 20  61 76 61 69 6c 61 62 6c  |rrently availabl|
00005280  65 2e 0d 0d 57 68 65 6e  20 74 68 65 20 73 65 72  |e...When the ser|
00005290  69 61 6c 20 6d 61 67 61  7a 69 6e 65 20 63 6f 6e  |ial magazine con|
000052a0  74 72 6f 6c 20 62 69 74  20 69 73 20 73 65 74 2c  |trol bit is set,|
000052b0  20 61 6c 6c 20 70 61 67  65 20 68 65 61 64 65 72  | all page header|
000052c0  73 20 61 72 65 0d 64 69  73 70 6c 61 79 65 64 20  |s are.displayed |
000052d0  61 73 20 72 6f 6c 6c 69  6e 67 20 68 65 61 64 65  |as rolling heade|
000052e0  72 73 2e 20 57 68 65 6e  20 74 68 69 73 20 62 69  |rs. When this bi|
000052f0  74 20 69 73 20 63 6c 65  61 72 20 6f 6e 6c 79 20  |t is clear only |
00005300  68 65 61 64 65 72 73 20  66 72 6f 6d 20 74 68 65  |headers from the|
00005310  0d 63 75 72 72 65 6e 74  20 6d 61 67 61 7a 69 6e  |.current magazin|
00005320  65 20 61 72 65 20 64 69  73 70 6c 61 79 65 64 2e  |e are displayed.|
00005330  20 54 68 69 73 20 67 69  76 65 73 20 74 68 65 20  | This gives the |
00005340  69 6c 6c 75 73 69 6f 6e  20 6f 66 20 73 70 65 65  |illusion of spee|
00005350  64 2c 20 62 75 74 20 69  74 0d 69 73 20 6a 75 73  |d, but it.is jus|
00005360  74 20 61 6e 20 69 6c 6c  75 73 69 6f 6e 2e 0d 0d  |t an illusion...|
00005370  0d 4c 61 6e 67 75 61 67  65 0d 0d 42 72 6f 61 64  |.Language..Broad|
00005380  63 61 73 74 20 69 6e 20  62 79 74 65 20 31 33 2c  |cast in byte 13,|
00005390  20 62 69 74 73 20 31 2d  33 2e 20 28 53 74 6f 72  | bits 1-3. (Stor|
000053a0  65 64 20 69 6e 20 68 65  61 64 3f 38 2c 20 62 69  |ed in head?8, bi|
000053b0  74 73 20 31 2d 33 29 0d  54 68 65 73 65 20 74 68  |ts 1-3).These th|
000053c0  72 65 65 20 63 6f 6e 74  72 6f 6c 20 62 69 74 73  |ree control bits|
000053d0  20 73 70 65 63 69 66 79  20 77 68 69 63 68 20 6c  | specify which l|
000053e0  61 6e 67 75 61 67 65 20  74 68 65 20 70 61 67 65  |anguage the page|
000053f0  20 69 73 20 69 6e 2c 20  61 6e 64 20 68 65 6e 63  | is in, and henc|
00005400  65 0d 77 68 69 63 68 20  63 68 61 72 61 63 74 65  |e.which characte|
00005410  72 20 73 65 74 20 69 73  20 72 65 71 75 69 72 65  |r set is require|
00005420  64 2e 20 53 6f 6d 65 20  63 68 61 72 61 63 74 65  |d. Some characte|
00005430  72 73 20 6f 66 20 74 68  65 20 73 74 61 6e 64 61  |rs of the standa|
00005440  72 64 20 4c 61 74 69 6e  0d 41 6c 70 68 61 62 65  |rd Latin.Alphabe|
00005450  74 20 63 68 61 72 61 63  74 65 72 20 73 65 74 20  |t character set |
00005460  28 61 73 20 75 73 65 64  20 62 79 20 41 53 43 49  |(as used by ASCI|
00005470  49 29 20 61 72 65 20 63  68 61 6e 67 65 64 20 74  |I) are changed t|
00005480  6f 20 73 75 69 74 20 64  69 66 66 65 72 65 6e 74  |o suit different|
00005490  0d 6c 61 6e 67 75 61 67  65 73 2e 20 54 68 65 20  |.languages. The |
000054a0  63 68 61 6e 67 65 73 20  66 6f 72 20 74 68 65 20  |changes for the |
000054b0  45 6e 67 6c 69 73 68 20  6c 61 6e 67 75 61 67 65  |English language|
000054c0  20 61 72 65 20 74 68 6f  73 65 20 63 68 61 72 61  | are those chara|
000054d0  63 74 65 72 73 20 74 68  61 74 0d 61 72 65 20 64  |cters that.are d|
000054e0  69 66 66 65 72 65 6e 74  20 69 6e 20 4d 6f 64 65  |ifferent in Mode|
000054f0  20 37 20 74 6f 20 74 68  65 20 6f 74 68 65 72 20  | 7 to the other |
00005500  42 42 43 20 73 63 72 65  65 6e 20 6d 6f 64 65 73  |BBC screen modes|
00005510  2c 20 74 68 65 20 50 6f  75 6e 64 2c 20 44 69 76  |, the Pound, Div|
00005520  69 64 65 2c 0d 61 6e 64  20 66 72 61 63 74 69 6f  |ide,.and fractio|
00005530  6e 20 73 79 6d 62 6f 6c  73 20 66 6f 72 20 65 78  |n symbols for ex|
00005540  61 6d 70 6c 65 2e 20 54  68 65 20 61 6c 6c 6f 63  |ample. The alloc|
00005550  61 74 69 6f 6e 20 69 73  20 61 73 20 66 6f 6c 6c  |ation is as foll|
00005560  6f 77 73 3a 0d 0d 20 20  20 20 20 20 20 20 20 20  |ows:..          |
00005570  20 20 20 20 20 20 20 20  20 20 20 20 20 42 69 74  |             Bit|
00005580  73 20 20 20 20 4c 61 6e  67 75 61 67 65 0d 20 20  |s    Language.  |
00005590  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000055a0  20 20 20 20 20 33 32 31  0d 20 20 20 20 20 20 20  |     321.       |
000055b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000055c0  2d 2d 2d 20 20 20 20 20  2d 2d 2d 2d 2d 2d 2d 2d  |---     --------|
000055d0  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
000055e0  20 20 20 20 20 20 20 20  30 30 30 20 20 20 20 20  |        000     |
000055f0  45 6e 67 6c 69 73 68 0d  20 20 20 20 20 20 20 20  |English.        |
00005600  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 30  |               0|
00005610  30 31 20 20 20 20 20 46  72 65 6e 63 68 0d 20 20  |01     French.  |
00005620  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00005630  20 20 20 20 20 30 31 30  20 20 20 20 20 53 77 65  |     010     Swe|
00005640  64 69 73 68 2f 46 69 6e  6e 69 73 68 0d 20 20 20  |dish/Finnish.   |
00005650  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00005660  20 20 20 20 30 31 31 20  20 20 20 20 43 7a 65 63  |    011     Czec|
00005670  68 6f 73 6c 6f 76 61 6b  0d 20 20 20 20 20 20 20  |hoslovak.       |
00005680  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00005690  31 30 30 20 20 20 20 20  47 65 72 6d 61 6e 0d 20  |100     German. |
000056a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000056b0  20 20 20 20 20 20 31 30  31 20 20 20 20 20 50 6f  |      101     Po|
000056c0  72 74 75 67 75 65 73 65  2f 53 70 61 6e 69 73 68  |rtuguese/Spanish|
000056d0  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
000056e0  20 20 20 20 20 20 20 20  31 31 30 20 20 20 20 20  |        110     |
000056f0  49 74 61 6c 69 61 6e 0d  20 20 20 20 20 20 20 20  |Italian.        |
00005700  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 31  |               1|
00005710  31 31 20 20 20 20 20 28  72 65 73 65 72 76 65 64  |11     (reserved|
00005720  29 0d 0d 0d 0d 54 68 65  20 77 61 79 20 69 6e 20  |)....The way in |
00005730  77 68 69 63 68 20 61 20  54 65 6c 65 74 65 78 74  |which a Teletext|
00005740  20 54 56 20 72 65 73 70  6f 6e 64 73 20 74 6f 20  | TV responds to |
00005750  74 68 65 20 63 6f 6e 74  72 6f 6c 20 62 69 74 73  |the control bits|
00005760  20 69 73 20 70 72 65 2d  0d 64 65 74 65 72 6d 69  | is pre-.determi|
00005770  6e 65 64 20 61 6e 64 20  75 6e 61 6c 74 65 72 61  |ned and unaltera|
00005780  62 6c 65 20 62 79 20 74  68 65 20 76 69 65 77 65  |ble by the viewe|
00005790  72 2e 20 57 68 65 6e 20  74 68 65 20 64 65 73 69  |r. When the desi|
000057a0  67 6e 20 6f 66 20 70 61  67 65 20 67 72 61 62 62  |gn of page grabb|
000057b0  65 72 73 0d 69 73 20 63  6f 6e 73 69 64 65 72 65  |ers.is considere|
000057c0  64 20 69 6e 20 74 68 65  20 6e 65 78 74 20 74 77  |d in the next tw|
000057d0  6f 20 6d 6f 64 75 6c 65  73 20 79 6f 75 20 77 69  |o modules you wi|
000057e0  6c 6c 20 6c 65 61 72 6e  20 68 6f 77 20 74 6f 20  |ll learn how to |
000057f0  75 73 65 20 74 68 65 73  65 0d 63 6f 6e 74 72 6f  |use these.contro|
00005800  6c 20 62 69 74 73 20 73  6f 20 74 68 61 74 2c 20  |l bits so that, |
00005810  66 6f 72 20 65 78 61 6d  70 6c 65 2c 20 79 6f 75  |for example, you|
00005820  20 63 61 6e 20 64 65 73  69 67 6e 20 61 20 70 61  | can design a pa|
00005830  67 65 20 67 72 61 62 62  65 72 20 77 68 69 63 68  |ge grabber which|
00005840  0d 77 69 6c 6c 20 61 6c  6c 6f 77 20 79 6f 75 20  |.will allow you |
00005850  74 6f 20 73 65 65 20 74  68 65 20 73 63 72 65 65  |to see the scree|
00005860  6e 73 20 77 68 69 63 68  20 68 61 76 65 20 74 68  |ns which have th|
00005870  65 20 69 6e 68 69 62 69  74 20 64 69 73 70 6c 61  |e inhibit displa|
00005880  79 20 62 69 74 20 73 65  74 2e 0d 0d 43 68 61 69  |y bit set...Chai|
00005890  6e 20 74 68 65 20 70 72  6f 67 72 61 6d 20 48 45  |n the program HE|
000058a0  41 44 45 52 20 61 6e 64  20 73 65 6c 65 63 74 20  |ADER and select |
000058b0  61 20 63 68 61 6e 6e 65  6c 2e 20 54 68 65 20 70  |a channel. The p|
000058c0  72 6f 67 72 61 6d 20 77  69 6c 6c 20 6c 6f 61 64  |rogram will load|
000058d0  20 61 6e 64 0d 64 69 73  70 6c 61 79 20 33 30 30  | and.display 300|
000058e0  20 68 65 61 64 65 72 20  70 61 63 6b 65 74 73 20  | header packets |
000058f0  61 6e 64 20 69 6e 74 65  72 70 72 65 74 20 61 6c  |and interpret al|
00005900  6c 20 74 68 65 20 63 6f  6e 74 72 6f 6c 20 62 69  |l the control bi|
00005910  74 73 20 66 6f 72 20 65  61 63 68 0d 68 65 61 64  |ts for each.head|
00005920  65 72 2e 20 50 72 65 73  73 20 74 68 65 20 53 68  |er. Press the Sh|
00005930  69 66 74 20 6b 65 79 20  74 6f 20 73 63 72 6f 6c  |ift key to scrol|
00005940  6c 20 74 68 72 6f 75 67  68 20 74 68 65 20 64 69  |l through the di|
00005950  73 70 6c 61 79 2e 0d 0d  42 6f 74 68 20 42 42 43  |splay...Both BBC|
00005960  20 31 20 61 6e 64 20 42  42 43 20 32 20 62 72 6f  | 1 and BBC 2 bro|
00005970  61 64 63 61 73 74 20 73  65 72 69 61 6c 20 6d 61  |adcast serial ma|
00005980  67 61 7a 69 6e 65 73 20  62 75 74 20 74 68 65 20  |gazines but the |
00005990  49 54 56 20 6e 65 74 77  6f 72 6b 0d 73 74 61 74  |ITV network.stat|
000059a0  69 6f 6e 73 20 62 72 6f  61 64 63 61 73 74 20 70  |ions broadcast p|
000059b0  61 72 61 6c 6c 65 6c 20  6d 61 67 61 7a 69 6e 65  |arallel magazine|
000059c0  73 2e 20 41 20 54 65 6c  65 74 65 78 74 20 70 61  |s. A Teletext pa|
000059d0  67 65 20 63 61 6e 20 62  65 20 64 65 66 69 6e 65  |ge can be define|
000059e0  64 20 61 73 0d 62 65 67  69 6e 6e 69 6e 67 20 77  |d as.beginning w|
000059f0  69 74 68 2c 20 61 6e 64  20 69 6e 63 6c 75 64 69  |ith, and includi|
00005a00  6e 67 2c 20 69 74 73 20  70 61 67 65 20 68 65 61  |ng, its page hea|
00005a10  64 65 72 20 61 6e 64 20  65 6e 64 69 6e 67 20 77  |der and ending w|
00005a20  69 74 68 2c 20 61 6e 64  0d 65 78 63 6c 75 64 69  |ith, and.excludi|
00005a30  6e 67 2c 20 74 68 65 20  6e 65 78 74 20 70 61 67  |ng, the next pag|
00005a40  65 20 68 65 61 64 65 72  20 77 69 74 68 20 74 68  |e header with th|
00005a50  65 20 73 61 6d 65 20 6d  61 67 61 7a 69 6e 65 20  |e same magazine |
00005a60  6e 75 6d 62 65 72 2e 20  41 6c 6c 20 74 68 65 0d  |number. All the.|
00005a70  69 6e 74 65 72 6d 65 64  69 61 74 65 20 70 61 63  |intermediate pac|
00005a80  6b 65 74 73 20 77 69 74  68 20 74 68 65 20 73 61  |kets with the sa|
00005a90  6d 65 20 6d 61 67 61 7a  69 6e 65 20 6e 75 6d 62  |me magazine numb|
00005aa0  65 72 20 72 65 6c 61 74  65 20 74 6f 20 74 68 65  |er relate to the|
00005ab0  20 73 65 6c 65 63 74 65  64 0d 70 61 67 65 2e 20  | selected.page. |
00005ac0  54 68 69 73 20 64 65 66  69 6e 69 74 69 6f 6e 20  |This definition |
00005ad0  6e 65 65 64 73 20 74 6f  20 62 65 20 71 75 61 6c  |needs to be qual|
00005ae0  69 66 69 65 64 20 62 65  63 61 75 73 65 20 74 68  |ified because th|
00005af0  65 20 70 72 6f 67 72 61  6d 20 48 45 41 44 45 52  |e program HEADER|
00005b00  0d 77 69 6c 6c 20 73 68  6f 77 20 79 6f 75 20 74  |.will show you t|
00005b10  68 61 74 20 75 70 20 74  6f 20 74 65 6e 20 68 65  |hat up to ten he|
00005b20  61 64 65 72 73 20 61 72  65 20 62 72 6f 61 64 63  |aders are broadc|
00005b30  61 73 74 20 66 6f 72 20  65 61 63 68 20 70 61 67  |ast for each pag|
00005b40  65 2e 20 41 20 6d 6f 72  65 0d 63 6f 6d 70 6c 65  |e. A more.comple|
00005b50  74 65 20 64 65 66 69 6e  69 74 69 6f 6e 20 6f 66  |te definition of|
00005b60  20 61 20 54 65 6c 65 74  65 78 74 20 70 61 67 65  | a Teletext page|
00005b70  20 73 68 6f 75 6c 64 20  69 6e 63 6c 75 64 65 20  | should include |
00005b80  74 68 65 20 66 6f 6c 6c  6f 77 69 6e 67 0d 71 75  |the following.qu|
00005b90  61 6c 69 66 69 63 61 74  69 6f 6e 73 3a 0d 0d 0d  |alifications:...|
00005ba0  31 29 20 41 20 68 65 61  64 65 72 20 77 69 74 68  |1) A header with|
00005bb0  20 61 20 70 61 67 65 20  6e 75 6d 62 65 72 20 46  | a page number F|
00005bc0  46 20 61 6e 64 20 74 68  65 20 73 61 6d 65 20 6d  |F and the same m|
00005bd0  61 67 61 7a 69 6e 65 20  6e 75 6d 62 65 72 20 61  |agazine number a|
00005be0  73 20 61 0d 70 72 65 76  69 6f 75 73 20 68 65 61  |s a.previous hea|
00005bf0  64 65 72 20 63 61 6e 20  62 65 20 75 73 65 64 20  |der can be used |
00005c00  74 6f 20 69 6e 64 69 63  61 74 65 20 74 68 65 20  |to indicate the |
00005c10  65 6e 64 20 6f 66 20 61  20 70 61 67 65 2e 20 46  |end of a page. F|
00005c20  6f 72 20 65 78 61 6d 70  6c 65 2c 0d 68 65 61 64  |or example,.head|
00005c30  65 72 20 31 46 46 20 69  6e 64 69 63 61 74 65 73  |er 1FF indicates|
00005c40  20 74 68 65 20 65 6e 64  20 6f 66 20 61 6e 79 20  | the end of any |
00005c50  70 61 67 65 20 69 6e 20  6d 61 67 61 7a 69 6e 65  |page in magazine|
00005c60  20 31 2c 20 32 46 46 20  69 6e 64 69 63 61 74 65  | 1, 2FF indicate|
00005c70  73 20 74 68 65 0d 65 6e  64 20 6f 66 20 61 6e 79  |s the.end of any|
00005c80  20 70 61 67 65 20 69 6e  20 6d 61 67 61 7a 69 6e  | page in magazin|
00005c90  65 20 32 2c 20 61 6e 64  20 73 6f 20 6f 6e 2e 20  |e 2, and so on. |
00005ca0  54 68 65 20 49 42 41 20  75 73 65 20 70 61 67 65  |The IBA use page|
00005cb0  20 6e 75 6d 62 65 72 20  46 46 0d 65 78 74 65 6e  | number FF.exten|
00005cc0  73 69 76 65 6c 79 2c 20  74 68 65 20 42 42 43 20  |sively, the BBC |
00005cd0  75 73 65 20 69 74 20 6c  65 73 73 20 6f 66 74 65  |use it less ofte|
00005ce0  6e 2e 0d 0d 32 29 20 41  20 68 65 61 64 65 72 20  |n...2) A header |
00005cf0  77 69 74 68 20 74 68 65  20 73 61 6d 65 20 6d 61  |with the same ma|
00005d00  67 61 7a 69 6e 65 20 6e  75 6d 62 65 72 20 62 75  |gazine number bu|
00005d10  74 20 61 20 64 69 66 66  65 72 65 6e 74 20 70 61  |t a different pa|
00005d20  67 65 20 6e 75 6d 62 65  72 20 74 6f 20 61 0d 70  |ge number to a.p|
00005d30  72 65 76 69 6f 75 73 20  68 65 61 64 65 72 20 6d  |revious header m|
00005d40  61 72 6b 73 20 74 68 65  20 65 6e 64 20 6f 66 20  |arks the end of |
00005d50  6f 6e 65 20 70 61 67 65  20 61 6e 64 2c 20 69 66  |one page and, if|
00005d60  20 74 68 65 20 70 61 67  65 20 6e 75 6d 62 65 72  | the page number|
00005d70  20 69 73 20 6e 6f 74 0d  46 46 2c 20 74 68 65 20  | is not.FF, the |
00005d80  73 74 61 72 74 20 6f 66  20 74 68 65 20 6e 65 78  |start of the nex|
00005d90  74 20 70 61 67 65 2e 0d  0d 33 29 20 41 6c 6c 20  |t page...3) All |
00005da0  74 68 65 20 70 61 63 6b  65 74 73 20 77 69 74 68  |the packets with|
00005db0  69 6e 20 61 20 70 61 67  65 20 68 61 76 65 20 74  |in a page have t|
00005dc0  68 65 20 73 61 6d 65 20  6d 61 67 61 7a 69 6e 65  |he same magazine|
00005dd0  20 6e 75 6d 62 65 72 2e  0d 0d 34 29 20 50 61 63  | number...4) Pac|
00005de0  6b 65 74 73 20 33 30 20  61 6e 64 20 33 31 20 61  |kets 30 and 31 a|
00005df0  72 65 2c 20 62 79 20 64  65 66 69 6e 69 74 69 6f  |re, by definitio|
00005e00  6e 2c 20 69 6e 64 65 70  65 6e 64 65 6e 74 20 6f  |n, independent o|
00005e10  66 20 61 6e 79 20 70 61  67 65 2e 0d 0d 0d 57 68  |f any page....Wh|
00005e20  65 6e 20 74 68 65 20 68  65 61 64 65 72 20 70 61  |en the header pa|
00005e30  63 6b 65 74 73 20 61 72  65 20 63 6f 6e 73 69 64  |ckets are consid|
00005e40  65 72 65 64 20 61 73 20  64 65 73 63 72 69 62 65  |ered as describe|
00005e50  64 20 61 62 6f 76 65 20  69 74 20 6d 75 63 68 20  |d above it much |
00005e60  65 61 73 69 65 72 0d 74  6f 20 64 65 61 6c 20 77  |easier.to deal w|
00005e70  69 74 68 20 74 68 65 20  6d 75 6c 74 69 70 6c 65  |ith the multiple|
00005e80  20 68 65 61 64 65 72 73  20 6f 66 20 62 6f 74 68  | headers of both|
00005e90  20 73 65 72 69 61 6c 20  61 6e 64 20 70 61 72 61  | serial and para|
00005ea0  6c 6c 65 6c 20 6d 61 67  61 7a 69 6e 65 73 0d 61  |llel magazines.a|
00005eb0  6e 64 20 74 6f 20 75 6e  64 65 72 73 74 61 6e 64  |nd to understand|
00005ec0  20 68 6f 77 20 74 68 65  20 69 6e 74 65 72 6c 65  | how the interle|
00005ed0  61 76 65 64 20 70 61 67  65 73 20 69 6e 20 70 61  |aved pages in pa|
00005ee0  72 61 6c 6c 65 6c 20 6d  61 67 61 7a 69 6e 65 73  |rallel magazines|
00005ef0  20 63 61 6e 20 62 65 0d  6c 6f 61 64 65 64 20 66  | can be.loaded f|
00005f00  72 6f 6d 20 74 68 65 20  61 64 61 70 74 6f 72 20  |rom the adaptor |
00005f10  77 69 74 68 6f 75 74 20  6d 69 78 69 6e 67 20 74  |without mixing t|
00005f20  68 65 20 64 69 66 66 65  72 65 6e 74 20 70 61 67  |he different pag|
00005f30  65 73 20 6f 66 20 74 68  65 20 70 61 72 61 6c 6c  |es of the parall|
00005f40  65 6c 0d 6d 61 67 61 7a  69 6e 65 73 2e 20 54 68  |el.magazines. Th|
00005f50  69 73 20 77 69 6c 6c 20  62 65 20 64 65 61 6c 74  |is will be dealt|
00005f60  20 77 69 74 68 20 69 6e  20 74 68 65 20 6e 65 78  | with in the nex|
00005f70  74 20 6d 6f 64 75 6c 65  2e 0d 0d 0d 20 20 20 31  |t module....   1|
00005f80  30 20 52 45 4d 3e 20 48  45 41 44 45 52 0d 20 20  |0 REM> HEADER.  |
00005f90  20 32 30 20 4d 4f 44 45  37 0d 20 20 20 33 30 20  | 20 MODE7.   30 |
00005fa0  56 44 55 31 34 0d 20 20  20 34 30 20 44 49 4d 20  |VDU14.   40 DIM |
00005fb0  6d 63 6f 64 65 20 26 33  30 30 20 3a 52 45 4d 3a  |mcode &300 :REM:|
00005fc0  20 73 70 61 63 65 20 66  6f 72 20 6d 61 63 68 69  | space for machi|
00005fd0  6e 65 20 63 6f 64 65 0d  20 20 20 35 30 20 44 49  |ne code.   50 DI|
00005fe0  4d 20 62 75 66 66 65 72  20 26 33 33 30 30 20 3a  |M buffer &3300 :|
00005ff0  52 45 4d 3a 20 62 75 66  66 65 72 20 66 6f 72 20  |REM: buffer for |
00006000  33 30 30 20 68 65 61 64  65 72 73 0d 20 20 20 36  |300 headers.   6|
00006010  30 20 50 52 4f 43 6d 63  6f 64 65 20 3a 52 45 4d  |0 PROCmcode :REM|
00006020  3a 20 61 73 73 65 6d 62  6c 65 20 6d 61 63 68 69  |: assemble machi|
00006030  6e 65 20 63 6f 64 65 0d  20 20 20 37 30 20 49 4e  |ne code.   70 IN|
00006040  50 55 54 22 54 56 20 63  68 61 6e 6e 65 6c 20 28  |PUT"TV channel (|
00006050  31 2d 34 29 20 3d 20 22  61 6e 73 77 65 72 24 0d  |1-4) = "answer$.|
00006060  20 20 20 38 30 20 63 68  61 6e 6e 65 6c 3f 30 3d  |   80 channel?0=|
00006070  45 56 41 4c 28 22 26 22  2b 4c 45 46 54 24 28 61  |EVAL("&"+LEFT$(a|
00006080  6e 73 77 65 72 24 2c 31  29 29 2b 26 31 42 20 3a  |nswer$,1))+&1B :|
00006090  52 45 4d 3a 20 54 54 58  20 65 6e 61 62 6c 65 2c  |REM: TTX enable,|
000060a0  0d 20 20 20 20 20 20 49  6e 74 20 65 6e 61 62 6c  |.      Int enabl|
000060b0  65 2c 20 41 46 43 0d 20  20 20 39 30 20 49 46 20  |e, AFC.   90 IF |
000060c0  63 68 61 6e 6e 65 6c 3f  30 20 3c 20 26 31 43 20  |channel?0 < &1C |
000060d0  54 48 45 4e 20 63 68 61  6e 6e 65 6c 3f 30 20 3d  |THEN channel?0 =|
000060e0  20 26 31 43 0d 20 20 31  30 30 20 49 46 20 63 68  | &1C.  100 IF ch|
000060f0  61 6e 6e 65 6c 3f 30 20  3e 20 26 31 46 20 54 48  |annel?0 > &1F TH|
00006100  45 4e 20 63 68 61 6e 6e  65 6c 3f 30 20 3d 20 26  |EN channel?0 = &|
00006110  31 46 0d 20 20 31 31 30  20 50 52 49 4e 54 22 52  |1F.  110 PRINT"R|
00006120  65 61 64 69 6e 67 20 54  54 58 20 2d 20 50 6c 65  |eading TTX - Ple|
00006130  61 73 65 20 77 61 69 74  22 0d 20 20 31 32 30 20  |ase wait".  120 |
00006140  43 41 4c 4c 20 6d 63 6f  64 65 20 3a 52 45 4d 3a  |CALL mcode :REM:|
00006150  20 72 65 61 64 20 33 30  30 20 68 65 61 64 65 72  | read 300 header|
00006160  73 20 61 6e 64 20 73 74  6f 72 65 20 69 6e 20 62  |s and store in b|
00006170  75 66 66 65 72 0d 20 20  31 33 30 20 63 6f 6e 74  |uffer.  130 cont|
00006180  72 6f 6c 24 3d 53 54 52  49 4e 47 24 28 36 30 2c  |rol$=STRING$(60,|
00006190  22 20 22 29 0d 20 20 31  34 30 20 65 6e 64 3d 62  |" ").  140 end=b|
000061a0  75 66 66 65 72 2b 28 33  30 30 2a 34 31 29 20 3a  |uffer+(300*41) :|
000061b0  52 45 4d 3a 20 65 6e 64  20 6f 66 20 62 75 66 66  |REM: end of buff|
000061c0  65 72 0d 20 20 31 35 30  20 46 4f 52 20 68 65 61  |er.  150 FOR hea|
000061d0  64 20 3d 20 62 75 66 66  65 72 20 54 4f 20 65 6e  |d = buffer TO en|
000061e0  64 20 53 54 45 50 20 34  31 0d 20 20 31 36 30 20  |d STEP 41.  160 |
000061f0  63 6f 6e 74 72 6f 6c 24  3d 22 22 0d 20 20 31 37  |control$="".  17|
00006200  30 20 50 52 49 4e 54 3b  7e 68 65 61 64 3f 30 3b  |0 PRINT;~head?0;|
00006210  7e 68 65 61 64 3f 32 3b  7e 68 65 61 64 3f 31 3b  |~head?2;~head?1;|
00006220  3a 52 45 4d 3a 20 6d 61  67 61 7a 69 6e 65 20 61  |:REM: magazine a|
00006230  6e 64 20 70 61 67 65 20  6e 75 6d 62 65 72 73 0d  |nd page numbers.|
00006240  20 20 31 38 30 20 50 52  49 4e 54 3b 7e 28 68 65  |  180 PRINT;~(he|
00006250  61 64 3f 36 29 41 4e 44  33 3b 7e 68 65 61 64 3f  |ad?6)AND3;~head?|
00006260  35 3b 7e 28 68 65 61 64  3f 34 29 41 4e 44 37 3b  |5;~(head?4)AND7;|
00006270  7e 68 65 61 64 3f 33 3b  0d 20 20 20 20 20 20 3a  |~head?3;.      :|
00006280  52 45 4d 3a 20 73 75 62  2d 70 61 67 65 20 6e 75  |REM: sub-page nu|
00006290  6d 62 65 72 0d 20 20 31  39 30 20 65 72 61 73 65  |mber.  190 erase|
000062a0  3d 28 28 68 65 61 64 3f  34 29 41 4e 44 38 29 3c  |=((head?4)AND8)<|
000062b0  3e 30 20 3a 52 45 4d 3a  20 65 72 61 73 65 20 70  |>0 :REM: erase p|
000062c0  61 67 65 0d 20 20 32 30  30 20 6e 65 77 73 3d 28  |age.  200 news=(|
000062d0  28 68 65 61 64 3f 36 29  41 4e 44 34 29 3c 3e 30  |(head?6)AND4)<>0|
000062e0  20 3a 52 45 4d 3a 20 6e  65 77 73 66 6c 61 73 68  | :REM: newsflash|
000062f0  0d 20 20 32 31 30 20 73  75 62 74 69 74 6c 65 3d  |.  210 subtitle=|
00006300  28 28 68 65 61 64 3f 36  29 41 4e 44 38 29 3c 3e  |((head?6)AND8)<>|
00006310  30 20 3a 52 45 4d 3a 20  73 75 62 74 69 74 6c 65  |0 :REM: subtitle|
00006320  0d 20 20 32 32 30 20 73  75 70 70 72 65 73 73 3d  |.  220 suppress=|
00006330  28 28 68 65 61 64 3f 37  29 41 4e 44 31 29 3c 3e  |((head?7)AND1)<>|
00006340  30 20 3a 52 45 4d 3a 20  73 75 70 70 72 65 73 73  |0 :REM: suppress|
00006350  20 68 65 61 64 65 72 0d  20 20 32 33 30 20 75 70  | header.  230 up|
00006360  64 61 74 65 3d 28 28 68  65 61 64 3f 37 29 41 4e  |date=((head?7)AN|
00006370  44 32 29 3c 3e 30 20 3a  52 45 4d 3a 20 75 70 64  |D2)<>0 :REM: upd|
00006380  61 74 65 20 69 6e 64 69  63 61 74 6f 72 0d 20 20  |ate indicator.  |
00006390  32 34 30 20 6f 75 74 6f  66 73 65 71 3d 28 28 68  |240 outofseq=((h|
000063a0  65 61 64 3f 37 29 41 4e  44 34 29 3c 3e 30 20 3a  |ead?7)AND4)<>0 :|
000063b0  52 45 4d 3a 20 6f 75 74  20 6f 66 20 73 65 71 75  |REM: out of sequ|
000063c0  65 6e 63 65 0d 20 20 32  35 30 20 69 6e 68 69 62  |ence.  250 inhib|
000063d0  69 74 3d 28 28 68 65 61  64 3f 37 29 41 4e 44 38  |it=((head?7)AND8|
000063e0  29 3c 3e 30 20 3a 52 45  4d 3a 20 69 6e 68 69 62  |)<>0 :REM: inhib|
000063f0  69 74 20 64 69 73 70 6c  61 79 0d 20 20 32 36 30  |it display.  260|
00006400  20 73 65 72 69 61 6c 3d  28 28 68 65 61 64 3f 38  | serial=((head?8|
00006410  29 41 4e 44 31 29 3c 3e  30 20 3a 52 45 4d 3a 20  |)AND1)<>0 :REM: |
00006420  73 65 72 69 61 6c 20 6d  61 67 61 7a 69 6e 65 0d  |serial magazine.|
00006430  20 20 32 37 30 20 49 46  20 65 72 61 73 65 20 63  |  270 IF erase c|
00006440  6f 6e 74 72 6f 6c 24 3d  63 6f 6e 74 72 6f 6c 24  |ontrol$=control$|
00006450  2b 22 20 45 72 61 73 65  2c 22 0d 20 20 32 38 30  |+" Erase,".  280|
00006460  20 49 46 20 6e 65 77 73  20 63 6f 6e 74 72 6f 6c  | IF news control|
00006470  24 3d 63 6f 6e 74 72 6f  6c 24 2b 22 20 4e 65 77  |$=control$+" New|
00006480  73 2c 22 0d 20 20 32 39  30 20 49 46 20 73 75 62  |s,".  290 IF sub|
00006490  74 69 74 6c 65 20 63 6f  6e 74 72 6f 6c 24 3d 63  |title control$=c|
000064a0  6f 6e 74 72 6f 6c 24 2b  22 20 53 75 62 2d 54 2c  |ontrol$+" Sub-T,|
000064b0  22 0d 20 20 33 30 30 20  49 46 20 73 75 70 70 72  |".  300 IF suppr|
000064c0  65 73 73 20 63 6f 6e 74  72 6f 6c 24 3d 63 6f 6e  |ess control$=con|
000064d0  74 72 6f 6c 24 2b 22 20  53 75 70 70 2c 22 0d 20  |trol$+" Supp,". |
000064e0  20 33 31 30 20 49 46 20  75 70 64 61 74 65 20 63  | 310 IF update c|
000064f0  6f 6e 74 72 6f 6c 24 3d  63 6f 6e 74 72 6f 6c 24  |ontrol$=control$|
00006500  2b 22 20 55 70 64 61 74  65 2c 22 0d 20 20 33 32  |+" Update,".  32|
00006510  30 20 49 46 20 6f 75 74  6f 66 73 65 71 20 63 6f  |0 IF outofseq co|
00006520  6e 74 72 6f 6c 24 3d 63  6f 6e 74 72 6f 6c 24 2b  |ntrol$=control$+|
00006530  22 20 4f 75 74 2d 53 65  71 2c 22 0d 20 20 33 33  |" Out-Seq,".  33|
00006540  30 20 49 46 20 69 6e 68  69 62 69 74 20 63 6f 6e  |0 IF inhibit con|
00006550  74 72 6f 6c 24 3d 63 6f  6e 74 72 6f 6c 24 2b 22  |trol$=control$+"|
00006560  20 49 6e 68 69 62 69 74  2c 22 0d 20 20 33 34 30  | Inhibit,".  340|
00006570  20 49 46 20 73 65 72 69  61 6c 20 63 6f 6e 74 72  | IF serial contr|
00006580  6f 6c 24 3d 63 6f 6e 74  72 6f 6c 24 2b 22 20 53  |ol$=control$+" S|
00006590  65 72 69 61 6c 22 0d 20  20 20 20 20 20 45 4c 53  |erial".      ELS|
000065a0  45 20 63 6f 6e 74 72 6f  6c 24 3d 63 6f 6e 74 72  |E control$=contr|
000065b0  6f 6c 24 2b 22 20 50 61  72 61 2e 22 0d 20 20 33  |ol$+" Para.".  3|
000065c0  35 30 20 50 52 49 4e 54  20 63 6f 6e 74 72 6f 6c  |50 PRINT control|
000065d0  24 20 3a 52 45 4d 3a 20  65 78 70 6c 61 69 6e 20  |$ :REM: explain |
000065e0  74 68 65 20 63 6f 6e 74  72 6f 6c 20 62 69 74 73  |the control bits|
000065f0  0d 20 20 33 36 30 20 46  4f 52 20 62 79 74 65 3d  |.  360 FOR byte=|
00006600  39 20 54 4f 20 34 30 0d  20 20 33 37 30 20 56 44  |9 TO 40.  370 VD|
00006610  55 20 28 28 68 65 61 64  3f 62 79 74 65 29 20 4f  |U ((head?byte) O|
00006620  52 20 26 38 30 29 3a 52  45 4d 3a 20 64 69 73 70  |R &80):REM: disp|
00006630  6c 61 79 20 68 65 61 64  65 72 0d 20 20 33 38 30  |lay header.  380|
00006640  20 4e 45 58 54 0d 20 20  33 39 30 20 50 52 49 4e  | NEXT.  390 PRIN|
00006650  54 0d 20 20 34 30 30 20  4e 45 58 54 0d 20 20 34  |T.  400 NEXT.  4|
00006660  31 30 20 56 44 55 31 35  0d 20 20 34 32 30 20 45  |10 VDU15.  420 E|
00006670  4e 44 0d 20 20 34 33 30  20 44 45 46 50 52 4f 43  |ND.  430 DEFPROC|
00006680  6d 63 6f 64 65 0d 20 20  34 34 30 20 67 72 61 62  |mcode.  440 grab|
00006690  66 6c 61 67 3d 26 37 30  20 3a 52 45 4d 3a 20 68  |flag=&70 :REM: h|
000066a0  65 61 64 65 72 20 67 72  61 62 20 66 6c 61 67 0d  |eader grab flag.|
000066b0  20 20 34 35 30 20 63 68  61 6e 6e 65 6c 3d 26 37  |  450 channel=&7|
000066c0  31 20 3a 52 45 4d 3a 20  54 56 20 63 68 61 6e 6e  |1 :REM: TV chann|
000066d0  65 6c 0d 20 20 34 36 30  20 77 6f 72 6b 73 70 61  |el.  460 workspa|
000066e0  63 65 3d 26 37 32 20 3a  52 45 4d 3a 20 32 20 62  |ce=&72 :REM: 2 b|
000066f0  79 74 65 20 77 6f 72 6b  73 70 61 63 65 0d 20 20  |yte workspace.  |
00006700  34 37 30 20 6d 61 67 61  7a 69 6e 65 3d 26 37 34  |470 magazine=&74|
00006710  20 3a 52 45 4d 3a 20 6d  61 67 61 7a 69 6e 65 20  | :REM: magazine |
00006720  6e 75 6d 62 65 72 0d 20  20 34 38 30 20 70 61 63  |number.  480 pac|
00006730  6b 65 74 3d 26 37 35 20  3a 52 45 4d 3a 20 70 61  |ket=&75 :REM: pa|
00006740  63 6b 65 74 20 6e 75 6d  62 65 72 0d 20 20 34 39  |cket number.  49|
00006750  30 20 69 72 71 32 76 3d  26 32 30 36 20 3a 52 45  |0 irq2v=&206 :RE|
00006760  4d 3a 20 49 52 51 32 20  76 65 63 74 6f 72 0d 20  |M: IRQ2 vector. |
00006770  20 35 30 30 20 74 74 78  63 6f 6e 74 72 6f 6c 3d  | 500 ttxcontrol=|
00006780  26 46 43 31 30 20 3a 52  45 4d 3a 20 54 54 58 20  |&FC10 :REM: TTX |
00006790  63 6f 6e 74 72 6f 6c 20  72 65 67 69 73 74 65 72  |control register|
000067a0  2c 20 77 72 69 74 65 20  6f 6e 6c 79 0d 20 20 35  |, write only.  5|
000067b0  31 30 20 74 74 78 73 74  61 74 75 73 3d 26 46 43  |10 ttxstatus=&FC|
000067c0  31 30 20 3a 52 45 4d 3a  20 54 54 58 20 73 74 61  |10 :REM: TTX sta|
000067d0  74 75 73 20 72 65 67 69  73 74 65 72 2c 20 72 65  |tus register, re|
000067e0  61 64 20 6f 6e 6c 79 0d  20 20 35 32 30 20 72 6f  |ad only.  520 ro|
000067f0  77 72 65 67 3d 26 46 43  31 31 20 3a 52 45 4d 3a  |wreg=&FC11 :REM:|
00006800  20 54 54 58 20 72 6f 77  20 72 65 67 69 73 74 65  | TTX row registe|
00006810  72 2c 20 77 72 69 74 65  20 6f 6e 6c 79 0d 20 20  |r, write only.  |
00006820  35 33 30 20 64 61 74 61  72 65 67 3d 26 46 43 31  |530 datareg=&FC1|
00006830  32 20 3a 52 45 4d 3a 20  54 54 58 20 64 61 74 61  |2 :REM: TTX data|
00006840  20 72 65 67 69 73 74 65  72 2c 20 72 65 61 64 20  | register, read |
00006850  26 20 77 72 69 74 65 0d  20 20 35 34 30 20 73 74  |& write.  540 st|
00006860  61 74 63 6c 72 3d 26 46  43 31 33 20 3a 52 45 4d  |atclr=&FC13 :REM|
00006870  3a 20 54 54 58 20 63 6c  65 61 72 20 73 74 61 74  |: TTX clear stat|
00006880  75 73 20 72 65 67 69 73  74 65 72 2c 20 72 65 61  |us register, rea|
00006890  64 20 26 20 77 72 69 74  65 0d 20 20 35 35 30 20  |d & write.  550 |
000068a0  6f 73 62 79 74 65 3d 26  46 46 46 34 0d 20 20 35  |osbyte=&FFF4.  5|
000068b0  36 30 20 46 4f 52 20 70  61 73 73 3d 30 20 54 4f  |60 FOR pass=0 TO|
000068c0  20 32 20 53 54 45 50 20  32 0d 20 20 35 37 30 20  | 2 STEP 2.  570 |
000068d0  50 25 3d 6d 63 6f 64 65  0d 20 20 35 38 30 20 5b  |P%=mcode.  580 [|
000068e0  20 20 20 20 20 20 20 4f  50 54 20 70 61 73 73 0d  |       OPT pass.|
000068f0  20 20 35 39 30 20 20 20  20 20 20 20 20 20 4c 44  |  590         LD|
00006900  41 20 23 26 30 30 0d 20  20 36 30 30 20 20 20 20  |A #&00.  600    |
00006910  20 20 20 20 20 53 54 41  20 67 72 61 62 66 6c 61  |     STA grabfla|
00006920  67 20 20 5c 20 77 68 65  6e 20 67 72 61 62 66 6c  |g  \ when grabfl|
00006930  61 67 20 3d 20 30 20 72  65 61 64 20 61 6e 64 20  |ag = 0 read and |
00006940  73 74 6f 72 65 20 68 65  61 64 65 72 73 0d 20 20  |store headers.  |
00006950  36 31 30 20 20 20 20 20  20 20 20 20 4c 44 58 20  |610         LDX |
00006960  23 62 75 66 66 65 72 20  4d 4f 44 20 32 35 36 20  |#buffer MOD 256 |
00006970  5c 20 61 64 64 72 65 73  73 20 6f 66 20 74 68 65  |\ address of the|
00006980  20 73 74 61 72 74 20 6f  66 20 74 68 65 20 62 75  | start of the bu|
00006990  66 66 65 72 0d 20 20 36  32 30 20 20 20 20 20 20  |ffer.  620      |
000069a0  20 20 20 4c 44 59 20 23  62 75 66 66 65 72 20 44  |   LDY #buffer D|
000069b0  49 56 20 32 35 36 0d 20  20 36 33 30 20 20 20 20  |IV 256.  630    |
000069c0  20 20 20 20 20 53 54 58  20 77 6f 72 6b 73 70 61  |     STX workspa|
000069d0  63 65 20 5c 20 69 6e 74  6f 20 7a 65 72 6f 20 70  |ce \ into zero p|
000069e0  61 67 65 20 66 6f 72 20  69 6e 64 69 72 65 63 74  |age for indirect|
000069f0  20 61 64 64 72 65 73 73  69 6e 67 0d 20 20 36 34  | addressing.  64|
00006a00  30 20 20 20 20 20 20 20  20 20 53 54 59 20 77 6f  |0         STY wo|
00006a10  72 6b 73 70 61 63 65 2b  31 0d 20 20 36 35 30 20  |rkspace+1.  650 |
00006a20  20 20 20 20 20 20 20 20  4c 44 58 20 69 72 71 32  |        LDX irq2|
00006a30  76 20 20 20 20 20 5c 20  6c 6f 61 64 20 73 65 63  |v     \ load sec|
00006a40  6f 6e 64 61 72 79 20 69  6e 74 65 72 72 75 70 74  |ondary interrupt|
00006a50  20 76 65 63 74 6f 72 0d  20 20 36 36 30 20 20 20  | vector.  660   |
00006a60  20 20 20 20 20 20 4c 44  59 20 69 72 71 32 76 2b  |      LDY irq2v+|
00006a70  31 0d 20 20 36 37 30 20  20 20 20 20 20 20 20 20  |1.  670         |
00006a80  53 54 58 20 6f 6c 64 69  72 71 32 76 20 20 5c 20  |STX oldirq2v  \ |
00006a90  73 61 76 65 20 73 65 63  6f 6e 64 61 72 79 20 69  |save secondary i|
00006aa0  6e 74 65 72 72 75 70 74  20 76 65 63 74 6f 72 0d  |nterrupt vector.|
00006ab0  20 20 36 38 30 20 20 20  20 20 20 20 20 20 53 54  |  680         ST|
00006ac0  59 20 6f 6c 64 69 72 71  32 76 2b 31 0d 20 20 36  |Y oldirq2v+1.  6|
00006ad0  39 30 20 20 20 20 20 20  20 20 20 4c 44 58 20 23  |90         LDX #|
00006ae0  69 6e 74 65 72 72 75 70  74 20 4d 4f 44 20 32 35  |interrupt MOD 25|
00006af0  36 20 5c 20 69 6e 73 74  61 6c 6c 20 6e 65 77 20  |6 \ install new |
00006b00  69 6e 74 65 72 72 75 70  74 20 72 6f 75 74 69 6e  |interrupt routin|
00006b10  65 0d 20 20 37 30 30 20  20 20 20 20 20 20 20 20  |e.  700         |
00006b20  4c 44 59 20 23 69 6e 74  65 72 72 75 70 74 20 44  |LDY #interrupt D|
00006b30  49 56 20 32 35 36 0d 20  20 37 31 30 20 20 20 20  |IV 256.  710    |
00006b40  20 20 20 20 20 53 45 49  20 20 20 20 20 20 20 20  |     SEI        |
00006b50  20 20 20 5c 20 64 69 73  61 62 6c 65 20 69 6e 74  |   \ disable int|
00006b60  65 72 72 75 70 74 73 20  77 68 65 6e 20 76 65 63  |errupts when vec|
00006b70  74 6f 72 73 20 61 72 65  20 61 6c 74 65 72 65 64  |tors are altered|
00006b80  0d 20 20 37 32 30 20 20  20 20 20 20 20 20 20 53  |.  720         S|
00006b90  54 58 20 69 72 71 32 76  0d 20 20 37 33 30 20 20  |TX irq2v.  730  |
00006ba0  20 20 20 20 20 20 20 53  54 59 20 69 72 71 32 76  |       STY irq2v|
00006bb0  2b 31 0d 20 20 37 34 30  20 20 20 20 20 20 20 20  |+1.  740        |
00006bc0  20 43 4c 49 20 20 20 20  20 20 20 20 20 20 20 5c  | CLI           \|
00006bd0  20 72 65 2d 65 6e 61 62  6c 65 20 69 6e 74 65 72  | re-enable inter|
00006be0  72 75 70 74 73 0d 20 20  37 35 30 20 20 20 20 20  |rupts.  750     |
00006bf0  20 20 20 20 4c 44 41 20  63 68 61 6e 6e 65 6c 20  |    LDA channel |
00006c00  20 20 5c 20 6c 6f 61 64  20 28 63 68 61 6e 6e 65  |  \ load (channe|
00006c10  6c 20 6e 75 6d 62 65 72  20 2b 20 23 26 31 43 29  |l number + #&1C)|
00006c20  0d 20 20 37 36 30 20 20  20 20 20 20 20 20 20 53  |.  760         S|
00006c30  54 41 20 74 74 78 63 6f  6e 74 72 6f 6c 20 5c 20  |TA ttxcontrol \ |
00006c40  65 6e 61 62 6c 65 20 54  54 58 0d 20 20 37 37 30  |enable TTX.  770|
00006c50  20 2e 6d 61 69 6e 6c 6f  6f 70 0d 20 20 37 38 30  | .mainloop.  780|
00006c60  20 20 20 20 20 20 20 20  20 42 49 54 20 67 72 61  |         BIT gra|
00006c70  62 66 6c 61 67 20 20 5c  20 67 72 61 62 66 6c 61  |bflag  \ grabfla|
00006c80  67 20 3d 20 26 38 30 20  77 68 65 6e 20 62 75 66  |g = &80 when buf|
00006c90  66 65 72 20 66 75 6c 6c  0d 20 20 37 39 30 20 20  |fer full.  790  |
00006ca0  20 20 20 20 20 20 20 42  4d 49 20 61 6c 6c 6f 76  |       BMI allov|
00006cb0  65 72 20 20 20 5c 20 62  72 61 6e 63 68 20 69 66  |er   \ branch if|
00006cc0  20 62 75 66 66 65 72 20  66 75 6c 6c 0d 20 20 38  | buffer full.  8|
00006cd0  30 30 20 20 20 20 20 20  20 20 20 42 49 54 20 26  |00         BIT &|
00006ce0  46 46 20 20 20 20 20 20  20 5c 20 70 6f 6c 6c 20  |FF       \ poll |
00006cf0  65 73 63 61 70 65 20 66  6c 61 67 0d 20 20 38 31  |escape flag.  81|
00006d00  30 20 20 20 20 20 20 20  20 20 42 50 4c 20 6d 61  |0         BPL ma|
00006d10  69 6e 6c 6f 6f 70 20 20  5c 20 6c 6f 6f 70 20 69  |inloop  \ loop i|
00006d20  66 20 65 73 63 61 70 65  20 6e 6f 74 20 70 72 65  |f escape not pre|
00006d30  73 73 65 64 0d 20 20 38  32 30 20 20 20 20 20 20  |ssed.  820      |
00006d40  20 20 20 4c 44 41 20 23  26 37 45 20 20 20 20 20  |   LDA #&7E     |
00006d50  20 5c 20 64 65 63 69 6d  61 6c 20 31 32 36 0d 20  | \ decimal 126. |
00006d60  20 38 33 30 20 20 20 20  20 20 20 20 20 4a 53 52  | 830         JSR|
00006d70  20 6f 73 62 79 74 65 20  20 20 20 5c 20 61 63 6b  | osbyte    \ ack|
00006d80  6e 6f 77 6c 65 64 67 65  20 65 73 63 61 70 65 0d  |nowledge escape.|
00006d90  20 20 38 34 30 20 2e 61  6c 6c 6f 76 65 72 0d 20  |  840 .allover. |
00006da0  20 38 35 30 20 20 20 20  20 20 20 20 20 4c 44 41  | 850         LDA|
00006db0  20 23 26 30 30 0d 20 20  38 36 30 20 20 20 20 20  | #&00.  860     |
00006dc0  20 20 20 20 53 54 41 20  74 74 78 63 6f 6e 74 72  |    STA ttxcontr|
00006dd0  6f 6c 20 5c 20 64 69 73  61 62 6c 65 20 54 54 58  |ol \ disable TTX|
00006de0  0d 20 20 38 37 30 20 20  20 20 20 20 20 20 20 4c  |.  870         L|
00006df0  44 58 20 6f 6c 64 69 72  71 32 76 20 20 5c 20 6c  |DX oldirq2v  \ l|
00006e00  6f 61 64 20 6f 72 69 67  69 6e 61 6c 20 76 65 63  |oad original vec|
00006e10  74 6f 72 0d 20 20 38 38  30 20 20 20 20 20 20 20  |tor.  880       |
00006e20  20 20 4c 44 59 20 6f 6c  64 69 72 71 32 76 2b 31  |  LDY oldirq2v+1|
00006e30  0d 20 20 38 39 30 20 20  20 20 20 20 20 20 20 53  |.  890         S|
00006e40  45 49 20 20 20 20 20 20  20 20 20 20 20 5c 20 64  |EI           \ d|
00006e50  69 73 61 62 6c 65 20 69  6e 74 65 72 72 75 70 74  |isable interrupt|
00006e60  73 20 77 68 65 6e 20 76  65 63 74 6f 72 73 20 61  |s when vectors a|
00006e70  72 65 20 61 6c 74 65 72  65 64 0d 20 20 39 30 30  |re altered.  900|
00006e80  20 20 20 20 20 20 20 20  20 53 54 58 20 69 72 71  |         STX irq|
00006e90  32 76 20 20 20 20 20 5c  20 72 65 73 74 6f 72 65  |2v     \ restore|
00006ea0  20 6f 72 69 67 69 6e 61  6c 20 76 65 63 74 6f 72  | original vector|
00006eb0  0d 20 20 39 31 30 20 20  20 20 20 20 20 20 20 53  |.  910         S|
00006ec0  54 59 20 69 72 71 32 76  2b 31 0d 20 20 39 32 30  |TY irq2v+1.  920|
00006ed0  20 20 20 20 20 20 20 20  20 43 4c 49 20 20 20 20  |         CLI    |
00006ee0  20 20 20 20 20 20 20 5c  20 72 65 2d 65 6e 61 62  |       \ re-enab|
00006ef0  6c 65 20 69 6e 74 65 72  72 75 70 74 73 0d 20 20  |le interrupts.  |
00006f00  39 33 30 20 20 20 20 20  20 20 20 20 52 54 53 20  |930         RTS |
00006f10  20 20 20 20 20 20 20 20  20 20 5c 20 72 65 74 75  |          \ retu|
00006f20  72 6e 20 74 6f 20 42 41  53 49 43 0d 20 20 39 34  |rn to BASIC.  94|
00006f30  30 20 2e 69 6e 74 65 72  72 75 70 74 0d 20 20 39  |0 .interrupt.  9|
00006f40  35 30 20 20 20 20 20 20  20 20 20 42 49 54 20 74  |50         BIT t|
00006f50  74 78 73 74 61 74 75 73  20 5c 20 70 6f 6c 6c 20  |txstatus \ poll |
00006f60  54 54 58 20 68 61 72 64  77 61 72 65 0d 20 20 39  |TTX hardware.  9|
00006f70  36 30 20 20 20 20 20 20  20 20 20 42 4d 49 20 74  |60         BMI t|
00006f80  74 78 69 6e 74 65 72 20  20 5c 20 62 72 61 6e 63  |txinter  \ branc|
00006f90  68 20 69 66 20 54 54 58  20 69 6e 74 65 72 72 75  |h if TTX interru|
00006fa0  70 74 0d 20 20 39 37 30  20 20 20 20 20 20 20 20  |pt.  970        |
00006fb0  20 4a 4d 50 20 28 6f 6c  64 69 72 71 32 76 29 20  | JMP (oldirq2v) |
00006fc0  5c 20 6e 6f 74 20 54 54  58 20 69 6e 74 65 72 72  |\ not TTX interr|
00006fd0  75 70 74 0d 20 20 39 38  30 20 2e 74 74 78 69 6e  |upt.  980 .ttxin|
00006fe0  74 65 72 0d 20 20 39 39  30 20 20 20 20 20 20 20  |ter.  990       |
00006ff0  20 20 4c 44 41 20 26 46  43 20 20 20 20 20 20 20  |  LDA &FC       |
00007000  5c 20 69 6e 74 65 72 72  75 70 74 20 61 63 63 75  |\ interrupt accu|
00007010  6d 75 6c 61 74 6f 72 20  73 61 76 65 20 72 65 67  |mulator save reg|
00007020  69 73 74 65 72 0d 20 31  30 30 30 20 20 20 20 20  |ister. 1000     |
00007030  20 20 20 20 50 48 41 20  20 20 20 20 20 20 20 20  |    PHA         |
00007040  20 20 5c 20 70 75 73 68  20 69 6e 74 65 72 72 75  |  \ push interru|
00007050  70 74 20 61 63 63 75 6d  75 6c 61 74 6f 72 20 73  |pt accumulator s|
00007060  61 76 65 20 72 65 67 69  73 74 65 72 0d 20 31 30  |ave register. 10|
00007070  31 30 20 20 20 20 20 20  20 20 20 54 58 41 0d 20  |10         TXA. |
00007080  31 30 32 30 20 20 20 20  20 20 20 20 20 50 48 41  |1020         PHA|
00007090  20 20 20 20 20 20 20 20  20 20 20 5c 20 70 75 73  |           \ pus|
000070a0  68 20 58 0d 20 31 30 33  30 20 20 20 20 20 20 20  |h X. 1030       |
000070b0  20 20 54 59 41 0d 20 31  30 34 30 20 20 20 20 20  |  TYA. 1040     |
000070c0  20 20 20 20 50 48 41 20  20 20 20 20 20 20 20 20  |    PHA         |
000070d0  20 20 5c 20 70 75 73 68  20 59 0d 20 31 30 35 30  |  \ push Y. 1050|
000070e0  20 20 20 20 20 20 20 20  20 42 49 54 20 67 72 61  |         BIT gra|
000070f0  62 66 6c 61 67 20 20 5c  20 61 72 65 20 68 65 61  |bflag  \ are hea|
00007100  64 65 72 73 20 73 74 69  6c 6c 20 62 65 69 6e 67  |ders still being|
00007110  20 63 6f 6c 6c 65 63 74  65 64 3f 0d 20 31 30 36  | collected?. 106|
00007120  30 20 20 20 20 20 20 20  20 20 42 4d 49 20 63 6c  |0         BMI cl|
00007130  65 61 72 73 74 61 74 75  73 20 5c 20 63 6c 65 61  |earstatus \ clea|
00007140  72 20 73 74 61 74 75 73  20 61 6e 64 20 52 54 49  |r status and RTI|
00007150  20 69 66 20 66 69 6e 69  73 68 65 64 0d 20 31 30  | if finished. 10|
00007160  37 30 20 20 20 20 20 20  20 20 20 43 4c 44 20 20  |70         CLD  |
00007170  20 20 20 20 20 20 20 20  20 5c 20 63 6c 65 61 72  |         \ clear|
00007180  20 64 65 63 69 6d 61 6c  20 66 6c 61 67 0d 20 31  | decimal flag. 1|
00007190  30 38 30 20 20 20 20 20  20 20 20 20 4c 44 59 20  |080         LDY |
000071a0  23 26 30 30 20 20 20 20  20 20 5c 20 73 74 61 72  |#&00      \ star|
000071b0  74 20 77 69 74 68 20 72  6f 77 20 30 0d 20 31 30  |t with row 0. 10|
000071c0  39 30 20 2e 72 65 61 64  74 74 78 74 0d 20 31 31  |90 .readttxt. 11|
000071d0  30 30 20 20 20 20 20 20  20 20 20 53 54 59 20 72  |00         STY r|
000071e0  6f 77 72 65 67 20 20 20  20 5c 20 74 72 79 20 72  |owreg    \ try r|
000071f0  6f 77 73 20 30 20 74 6f  20 31 35 0d 20 31 31 31  |ows 0 to 15. 111|
00007200  30 20 20 20 20 20 20 20  20 20 4c 44 41 20 64 61  |0         LDA da|
00007210  74 61 72 65 67 20 20 20  5c 20 6c 6f 61 64 20 66  |tareg   \ load f|
00007220  72 61 6d 69 6e 67 20 63  6f 64 65 20 28 23 26 32  |raming code (#&2|
00007230  37 29 0d 20 31 31 32 30  20 20 20 20 20 20 20 20  |7). 1120        |
00007240  20 42 45 51 20 65 6d 70  74 79 72 6f 77 20 20 5c  | BEQ emptyrow  \|
00007250  20 69 66 20 7a 65 72 6f  20 74 72 79 20 6e 65 78  | if zero try nex|
00007260  74 20 72 6f 77 0d 20 31  31 33 30 20 20 20 20 20  |t row. 1130     |
00007270  20 20 20 20 54 59 41 0d  20 31 31 34 30 20 20 20  |    TYA. 1140   |
00007280  20 20 20 20 20 20 50 48  41 20 20 20 20 20 20 20  |      PHA       |
00007290  20 20 20 20 5c 20 73 61  76 65 20 72 6f 77 20 6e  |    \ save row n|
000072a0  75 6d 62 65 72 0d 20 31  31 35 30 20 20 20 20 20  |umber. 1150     |
000072b0  20 20 20 20 4a 53 52 20  72 65 61 64 70 61 63 6b  |    JSR readpack|
000072c0  65 74 20 5c 20 6c 6f 6f  6b 20 66 6f 72 20 68 65  |et \ look for he|
000072d0  61 64 65 72 73 20 61 6e  64 20 6c 6f 61 64 20 69  |aders and load i|
000072e0  66 20 66 6f 75 6e 64 0d  20 31 31 36 30 20 20 20  |f found. 1160   |
000072f0  20 20 20 20 20 20 50 4c  41 0d 20 31 31 37 30 20  |      PLA. 1170 |
00007300  20 20 20 20 20 20 20 20  54 41 59 20 20 20 20 20  |        TAY     |
00007310  20 20 20 20 20 20 5c 20  72 65 73 74 6f 72 65 20  |      \ restore |
00007320  72 6f 77 20 6e 75 6d 62  65 72 0d 20 31 31 38 30  |row number. 1180|
00007330  20 2e 65 6d 70 74 79 72  6f 77 0d 20 31 31 39 30  | .emptyrow. 1190|
00007340  20 20 20 20 20 20 20 20  20 49 4e 59 20 20 20 20  |         INY    |
00007350  20 20 20 20 20 20 20 5c  20 69 6e 63 72 65 6d 65  |       \ increme|
00007360  6e 74 20 72 6f 77 20 6e  75 6d 62 65 72 0d 20 31  |nt row number. 1|
00007370  32 30 30 20 20 20 20 20  20 20 20 20 43 50 59 20  |200         CPY |
00007380  23 26 31 30 20 20 20 20  20 20 5c 20 74 72 79 20  |#&10      \ try |
00007390  72 6f 77 73 20 30 20 2d  20 31 35 0d 20 31 32 31  |rows 0 - 15. 121|
000073a0  30 20 20 20 20 20 20 20  20 20 42 4e 45 20 72 65  |0         BNE re|
000073b0  61 64 74 74 78 74 0d 20  31 32 32 30 20 2e 63 6c  |adttxt. 1220 .cl|
000073c0  65 61 72 73 74 61 74 75  73 0d 20 31 32 33 30 20  |earstatus. 1230 |
000073d0  20 20 20 20 20 20 20 20  4c 44 41 20 23 26 30 30  |        LDA #&00|
000073e0  0d 20 31 32 34 30 20 20  20 20 20 20 20 20 20 4c  |. 1240         L|
000073f0  44 59 20 23 26 30 46 20  20 20 20 20 20 5c 20 63  |DY #&0F      \ c|
00007400  6c 65 61 72 20 31 36 20  72 6f 77 73 20 69 6e 20  |lear 16 rows in |
00007410  61 64 61 70 74 6f 72 0d  20 31 32 35 30 20 2e 63  |adaptor. 1250 .c|
00007420  6c 65 61 72 6c 6f 6f 70  0d 20 31 32 36 30 20 20  |learloop. 1260  |
00007430  20 20 20 20 20 20 20 53  54 59 20 72 6f 77 72 65  |       STY rowre|
00007440  67 0d 20 31 32 37 30 20  20 20 20 20 20 20 20 20  |g. 1270         |
00007450  53 54 41 20 64 61 74 61  72 65 67 0d 20 31 32 38  |STA datareg. 128|
00007460  30 20 20 20 20 20 20 20  20 20 44 45 59 0d 20 31  |0         DEY. 1|
00007470  32 39 30 20 20 20 20 20  20 20 20 20 42 50 4c 20  |290         BPL |
00007480  63 6c 65 61 72 6c 6f 6f  70 0d 20 31 33 30 30 20  |clearloop. 1300 |
00007490  20 20 20 20 20 20 20 20  53 54 41 20 73 74 61 74  |        STA stat|
000074a0  63 6c 72 20 20 20 5c 20  63 6c 65 61 72 20 73 74  |clr   \ clear st|
000074b0  61 74 75 73 20 66 6c 61  67 73 20 62 65 66 6f 72  |atus flags befor|
000074c0  65 20 72 65 74 75 72 6e  69 6e 67 0d 20 31 33 31  |e returning. 131|
000074d0  30 20 20 20 20 20 20 20  20 20 50 4c 41 0d 20 31  |0         PLA. 1|
000074e0  33 32 30 20 20 20 20 20  20 20 20 20 54 41 59 20  |320         TAY |
000074f0  20 20 20 20 20 20 20 20  20 20 5c 20 72 65 73 74  |          \ rest|
00007500  6f 72 65 20 59 0d 20 31  33 33 30 20 20 20 20 20  |ore Y. 1330     |
00007510  20 20 20 20 50 4c 41 0d  20 31 33 34 30 20 20 20  |    PLA. 1340   |
00007520  20 20 20 20 20 20 54 41  58 20 20 20 20 20 20 20  |      TAX       |
00007530  20 20 20 20 5c 20 72 65  73 74 6f 72 65 20 58 0d  |    \ restore X.|
00007540  20 31 33 35 30 20 20 20  20 20 20 20 20 20 50 4c  | 1350         PL|
00007550  41 0d 20 31 33 36 30 20  20 20 20 20 20 20 20 20  |A. 1360         |
00007560  53 54 41 20 26 46 43 20  20 20 20 20 20 20 5c 20  |STA &FC       \ |
00007570  72 65 73 74 6f 72 65 20  69 6e 74 65 72 72 75 70  |restore interrup|
00007580  74 20 61 63 63 75 6d 75  6c 61 74 6f 72 20 73 61  |t accumulator sa|
00007590  76 65 20 72 65 67 69 73  74 65 72 0d 20 31 33 37  |ve register. 137|
000075a0  30 20 20 20 20 20 20 20  20 20 52 54 49 20 20 20  |0         RTI   |
000075b0  20 20 20 20 20 20 20 20  5c 20 72 65 74 75 72 6e  |        \ return|
000075c0  20 66 72 6f 6d 20 69 6e  74 65 72 72 75 70 74 0d  | from interrupt.|
000075d0  20 31 33 38 30 20 2e 72  65 61 64 70 61 63 6b 65  | 1380 .readpacke|
000075e0  74 0d 20 31 33 39 30 20  20 20 20 20 20 20 20 20  |t. 1390         |
000075f0  4c 44 59 20 64 61 74 61  72 65 67 20 20 20 5c 20  |LDY datareg   \ |
00007600  72 65 61 64 20 6d 61 67  61 7a 69 6e 65 20 6e 75  |read magazine nu|
00007610  6d 62 65 72 0d 20 31 34  30 30 20 20 20 20 20 20  |mber. 1400      |
00007620  20 20 20 4c 44 41 20 68  61 6d 74 61 62 6c 65 2c  |   LDA hamtable,|
00007630  59 20 5c 20 64 65 2d 68  61 6d 20 69 74 0d 20 31  |Y \ de-ham it. 1|
00007640  34 31 30 20 20 20 20 20  20 20 20 20 42 4d 49 20  |410         BMI |
00007650  72 65 74 75 72 6e 20 20  20 20 5c 20 73 74 6f 70  |return    \ stop|
00007660  20 6c 6f 61 64 69 6e 67  20 69 66 20 65 72 72 6f  | loading if erro|
00007670  72 0d 20 31 34 32 30 20  20 20 20 20 20 20 20 20  |r. 1420         |
00007680  53 54 41 20 6d 61 67 61  7a 69 6e 65 20 20 5c 20  |STA magazine  \ |
00007690  73 61 76 65 20 6d 61 67  61 7a 69 6e 65 20 6e 75  |save magazine nu|
000076a0  6d 62 65 72 0d 20 31 34  33 30 20 20 20 20 20 20  |mber. 1430      |
000076b0  20 20 20 4c 44 59 20 64  61 74 61 72 65 67 20 20  |   LDY datareg  |
000076c0  20 5c 20 72 65 61 64 20  70 61 63 6b 65 74 20 6e  | \ read packet n|
000076d0  75 6d 62 65 72 0d 20 31  34 34 30 20 20 20 20 20  |umber. 1440     |
000076e0  20 20 20 20 4c 44 41 20  68 61 6d 74 61 62 6c 65  |    LDA hamtable|
000076f0  2c 59 20 5c 20 64 65 2d  68 61 6d 20 69 74 0d 20  |,Y \ de-ham it. |
00007700  31 34 35 30 20 20 20 20  20 20 20 20 20 42 4d 49  |1450         BMI|
00007710  20 72 65 74 75 72 6e 20  20 20 20 5c 20 73 74 6f  | return    \ sto|
00007720  70 20 6c 6f 61 64 69 6e  67 20 69 66 20 65 72 72  |p loading if err|
00007730  6f 72 0d 20 31 34 36 30  20 20 20 20 20 20 20 20  |or. 1460        |
00007740  20 53 54 41 20 70 61 63  6b 65 74 20 20 20 20 5c  | STA packet    \|
00007750  20 73 61 76 65 20 70 61  63 6b 65 74 20 6e 75 6d  | save packet num|
00007760  62 65 72 0d 20 31 34 37  30 20 20 20 20 20 20 20  |ber. 1470       |
00007770  20 20 4c 44 41 20 6d 61  67 61 7a 69 6e 65 20 20  |  LDA magazine  |
00007780  5c 20 6c 6f 61 64 20 6d  61 67 61 7a 69 6e 65 20  |\ load magazine |
00007790  6e 75 6d 62 65 72 0d 20  31 34 38 30 20 20 20 20  |number. 1480    |
000077a0  20 20 20 20 20 43 4d 50  20 23 26 30 38 20 20 20  |     CMP #&08   |
000077b0  20 20 20 5c 20 62 69 74  20 33 20 6f 66 20 6d 61  |   \ bit 3 of ma|
000077c0  67 2e 20 6e 75 6d 62 65  72 20 69 73 20 62 69 74  |g. number is bit|
000077d0  20 30 20 6f 66 20 70 61  63 6b 65 74 0d 20 20 20  | 0 of packet.   |
000077e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000077f0  20 20 20 20 20 20 20 20  20 5c 20 6e 75 6d 62 65  |         \ numbe|
00007800  72 0d 20 31 34 39 30 20  20 20 20 20 20 20 20 20  |r. 1490         |
00007810  52 4f 4c 20 70 61 63 6b  65 74 20 20 20 20 5c 20  |ROL packet    \ |
00007820  35 20 62 69 74 20 70 61  63 6b 65 74 20 6e 75 6d  |5 bit packet num|
00007830  62 65 72 0d 20 31 35 30  30 20 20 20 20 20 20 20  |ber. 1500       |
00007840  20 20 41 4e 44 20 23 26  30 37 20 20 20 20 20 20  |  AND #&07      |
00007850  5c 20 75 73 65 20 6f 6e  6c 79 20 62 69 74 73 20  |\ use only bits |
00007860  30 2d 32 0d 20 31 35 31  30 20 20 20 20 20 20 20  |0-2. 1510       |
00007870  20 20 4c 44 59 20 23 26  30 30 0d 20 31 35 32 30  |  LDY #&00. 1520|
00007880  20 20 20 20 20 20 20 20  20 53 54 41 20 28 77 6f  |         STA (wo|
00007890  72 6b 73 70 61 63 65 29  2c 59 20 5c 20 73 74 6f  |rkspace),Y \ sto|
000078a0  72 65 20 6d 61 67 61 7a  69 6e 65 20 6e 75 6d 62  |re magazine numb|
000078b0  65 72 0d 20 31 35 33 30  20 20 20 20 20 20 20 20  |er. 1530        |
000078c0  20 4c 44 41 20 70 61 63  6b 65 74 20 20 20 20 5c  | LDA packet    \|
000078d0  20 68 65 61 64 65 72 20  70 61 63 6b 65 74 20 6e  | header packet n|
000078e0  75 6d 62 65 72 20 69 73  20 7a 65 72 6f 0d 20 31  |umber is zero. 1|
000078f0  35 34 30 20 20 20 20 20  20 20 20 20 42 4e 45 20  |540         BNE |
00007900  72 65 74 75 72 6e 20 20  20 20 5c 20 72 65 74 75  |return    \ retu|
00007910  72 6e 20 69 66 20 6e 6f  74 20 68 65 61 64 65 72  |rn if not header|
00007920  0d 20 31 35 35 30 20 2e  72 65 61 64 68 65 61 64  |. 1550 .readhead|
00007930  65 72 0d 20 31 35 36 30  20 20 20 20 20 20 20 20  |er. 1560        |
00007940  20 49 4e 59 20 20 20 20  20 20 20 20 20 20 20 5c  | INY           \|
00007950  20 59 20 3d 20 31 2d 34  30 0d 20 31 35 37 30 20  | Y = 1-40. 1570 |
00007960  20 20 20 20 20 20 20 20  4c 44 58 20 64 61 74 61  |        LDX data|
00007970  72 65 67 20 20 20 5c 20  72 65 61 64 20 64 61 74  |reg   \ read dat|
00007980  61 20 72 65 67 69 73 74  65 72 0d 20 31 35 38 30  |a register. 1580|
00007990  20 20 20 20 20 20 20 20  20 4c 44 41 20 68 61 6d  |         LDA ham|
000079a0  74 61 62 6c 65 2c 58 20  5c 20 64 65 2d 68 61 6d  |table,X \ de-ham|
000079b0  20 69 74 0d 20 31 35 39  30 20 20 20 20 20 20 20  | it. 1590       |
000079c0  20 20 42 4d 49 20 72 65  74 75 72 6e 20 20 20 20  |  BMI return    |
000079d0  5c 20 73 74 6f 70 20 6c  6f 61 64 69 6e 67 20 69  |\ stop loading i|
000079e0  66 20 65 72 72 6f 72 0d  20 31 36 30 30 20 20 20  |f error. 1600   |
000079f0  20 20 20 20 20 20 53 54  41 20 28 77 6f 72 6b 73  |      STA (works|
00007a00  70 61 63 65 29 2c 59 20  5c 20 73 74 6f 72 65 20  |pace),Y \ store |
00007a10  64 65 2d 68 61 6d 6d 65  64 20 64 61 74 61 0d 20  |de-hammed data. |
00007a20  31 36 31 30 20 20 20 20  20 20 20 20 20 43 50 59  |1610         CPY|
00007a30  20 23 26 30 38 20 20 20  20 20 20 5c 20 75 73 65  | #&08      \ use|
00007a40  20 59 20 3d 20 31 2d 38  20 66 6f 72 20 38 20 62  | Y = 1-8 for 8 b|
00007a50  79 74 65 73 20 6f 66 20  68 61 6d 6d 65 64 20 64  |ytes of hammed d|
00007a60  61 74 61 0d 20 31 36 32  30 20 20 20 20 20 20 20  |ata. 1620       |
00007a70  20 20 42 43 43 20 72 65  61 64 68 65 61 64 65 72  |  BCC readheader|
00007a80  20 5c 20 63 6f 6e 74 69  6e 75 65 20 72 65 61 64  | \ continue read|
00007a90  69 6e 67 20 68 61 6d 6d  65 64 20 64 61 74 61 0d  |ing hammed data.|
00007aa0  20 31 36 33 30 20 2e 72  65 61 64 6d 6f 72 65 0d  | 1630 .readmore.|
00007ab0  20 31 36 34 30 20 20 20  20 20 20 20 20 20 49 4e  | 1640         IN|
00007ac0  59 0d 20 31 36 35 30 20  20 20 20 20 20 20 20 20  |Y. 1650         |
00007ad0  4c 44 41 20 64 61 74 61  72 65 67 20 20 20 5c 20  |LDA datareg   \ |
00007ae0  72 65 61 64 20 64 61 74  61 20 72 65 67 69 73 74  |read data regist|
00007af0  65 72 2c 20 6e 6f 74 20  68 61 6d 6d 65 64 0d 20  |er, not hammed. |
00007b00  31 36 36 30 20 20 20 20  20 20 20 20 20 4f 52 41  |1660         ORA|
00007b10  20 23 26 38 30 20 20 20  20 20 20 5c 20 73 65 74  | #&80      \ set|
00007b20  20 62 69 74 20 37 0d 20  31 36 37 30 20 20 20 20  | bit 7. 1670    |
00007b30  20 20 20 20 20 53 54 41  20 28 77 6f 72 6b 73 70  |     STA (worksp|
00007b40  61 63 65 29 2c 59 20 5c  20 73 74 6f 72 65 20 69  |ace),Y \ store i|
00007b50  6e 20 62 75 66 66 65 72  0d 20 31 36 38 30 20 20  |n buffer. 1680  |
00007b60  20 20 20 20 20 20 20 43  50 59 20 23 26 32 38 20  |       CPY #&28 |
00007b70  20 20 20 20 20 5c 20 64  65 63 69 6d 61 6c 20 34  |     \ decimal 4|
00007b80  30 0d 20 31 36 39 30 20  20 20 20 20 20 20 20 20  |0. 1690         |
00007b90  42 4e 45 20 72 65 61 64  6d 6f 72 65 20 20 5c 20  |BNE readmore  \ |
00007ba0  67 6f 20 62 61 63 6b 20  66 6f 72 20 6d 6f 72 65  |go back for more|
00007bb0  0d 20 31 37 30 30 20 20  20 20 20 20 20 20 20 43  |. 1700         C|
00007bc0  4c 43 20 20 20 20 20 20  20 20 20 20 20 5c 20 63  |LC           \ c|
00007bd0  6c 65 61 72 20 63 61 72  72 79 20 66 6f 72 20 61  |lear carry for a|
00007be0  64 64 69 74 69 6f 6e 0d  20 31 37 31 30 20 20 20  |ddition. 1710   |
00007bf0  20 20 20 20 20 20 4c 44  41 20 77 6f 72 6b 73 70  |      LDA worksp|
00007c00  61 63 65 0d 20 31 37 32  30 20 20 20 20 20 20 20  |ace. 1720       |
00007c10  20 20 41 44 43 20 23 26  32 39 20 20 20 20 20 20  |  ADC #&29      |
00007c20  5c 20 61 64 64 20 34 31  20 74 6f 20 70 6f 69 6e  |\ add 41 to poin|
00007c30  74 20 74 6f 20 6e 65 78  74 20 70 61 72 74 20 6f  |t to next part o|
00007c40  66 20 74 68 65 20 62 75  66 66 65 72 0d 20 31 37  |f the buffer. 17|
00007c50  33 30 20 20 20 20 20 20  20 20 20 53 54 41 20 77  |30         STA w|
00007c60  6f 72 6b 73 70 61 63 65  0d 20 31 37 34 30 20 20  |orkspace. 1740  |
00007c70  20 20 20 20 20 20 20 4c  44 41 20 77 6f 72 6b 73  |       LDA works|
00007c80  70 61 63 65 2b 31 0d 20  31 37 35 30 20 20 20 20  |pace+1. 1750    |
00007c90  20 20 20 20 20 41 44 43  20 23 26 30 30 0d 20 31  |     ADC #&00. 1|
00007ca0  37 36 30 20 20 20 20 20  20 20 20 20 53 54 41 20  |760         STA |
00007cb0  77 6f 72 6b 73 70 61 63  65 2b 31 0d 20 31 37 37  |workspace+1. 177|
00007cc0  30 20 20 20 20 20 20 20  20 20 43 4d 50 20 23 28  |0         CMP #(|
00007cd0  62 75 66 66 65 72 2b 26  33 33 30 30 29 20 44 49  |buffer+&3300) DI|
00007ce0  56 20 32 35 36 20 5c 20  69 73 20 74 68 65 72 65  |V 256 \ is there|
00007cf0  20 72 6f 6f 6d 20 66 6f  72 20 6d 6f 72 65 20 64  | room for more d|
00007d00  61 74 61 3f 0d 20 31 37  38 30 20 20 20 20 20 20  |ata?. 1780      |
00007d10  20 20 20 42 43 43 20 72  65 74 75 72 6e 20 20 20  |   BCC return   |
00007d20  20 5c 20 62 72 61 6e 63  68 20 69 66 20 74 68 65  | \ branch if the|
00007d30  72 65 20 69 73 20 6d 6f  72 65 20 72 6f 6f 6d 0d  |re is more room.|
00007d40  20 31 37 39 30 20 20 20  20 20 20 20 20 20 4c 44  | 1790         LD|
00007d50  41 20 23 26 38 30 0d 20  31 38 30 30 20 20 20 20  |A #&80. 1800    |
00007d60  20 20 20 20 20 53 54 41  20 67 72 61 62 66 6c 61  |     STA grabfla|
00007d70  67 20 20 5c 20 6d 61 72  6b 20 62 75 66 66 65 72  |g  \ mark buffer|
00007d80  20 61 73 20 66 75 6c 6c  0d 20 31 38 31 30 20 2e  | as full. 1810 .|
00007d90  72 65 74 75 72 6e 0d 20  31 38 32 30 20 20 20 20  |return. 1820    |
00007da0  20 20 20 20 20 52 54 53  20 20 20 20 20 20 20 20  |     RTS        |
00007db0  20 20 20 5c 20 72 65 74  75 72 6e 20 74 6f 20 6c  |   \ return to l|
00007dc0  6f 6f 6b 20 61 74 20 6e  65 78 74 20 54 54 58 20  |ook at next TTX |
00007dd0  72 6f 77 0d 20 31 38 33  30 20 2e 6f 6c 64 69 72  |row. 1830 .oldir|
00007de0  71 32 76 0d 20 31 38 34  30 20 20 20 20 20 20 20  |q2v. 1840       |
00007df0  20 20 45 51 55 57 20 26  30 30 0d 20 31 38 35 30  |  EQUW &00. 1850|
00007e00  20 2e 68 61 6d 74 61 62  6c 65 0d 20 31 38 36 30  | .hamtable. 1860|
00007e10  20 20 20 20 20 20 20 20  20 45 51 55 44 20 26 30  |         EQUD &0|
00007e20  31 30 31 46 46 30 31 20  0d 20 31 38 37 30 20 20  |101FF01 . 1870  |
00007e30  20 20 20 20 20 20 20 45  51 55 44 20 26 46 46 30  |       EQUD &FF0|
00007e40  31 30 30 46 46 20 0d 20  31 38 38 30 20 20 20 20  |100FF . 1880    |
00007e50  20 20 20 20 20 45 51 55  44 20 26 46 46 30 31 30  |     EQUD &FF010|
00007e60  32 46 46 20 0d 20 31 38  39 30 20 20 20 20 20 20  |2FF . 1890      |
00007e70  20 20 20 45 51 55 44 20  26 30 37 46 46 46 46 30  |   EQUD &07FFFF0|
00007e80  41 0d 20 31 39 30 30 20  20 20 20 20 20 20 20 20  |A. 1900         |
00007e90  45 51 55 44 20 26 46 46  30 31 30 30 46 46 20 0d  |EQUD &FF0100FF .|
00007ea0  20 31 39 31 30 20 20 20  20 20 20 20 20 20 45 51  | 1910         EQ|
00007eb0  55 44 20 26 30 30 46 46  30 30 30 30 20 0d 20 31  |UD &00FF0000 . 1|
00007ec0  39 32 30 20 20 20 20 20  20 20 20 20 45 51 55 44  |920         EQUD|
00007ed0  20 26 30 42 46 46 46 46  30 36 20 0d 20 31 39 33  | &0BFFFF06 . 193|
00007ee0  30 20 20 20 20 20 20 20  20 20 45 51 55 44 20 26  |0         EQUD &|
00007ef0  46 46 30 33 30 30 46 46  0d 20 31 39 34 30 20 20  |FF0300FF. 1940  |
00007f00  20 20 20 20 20 20 20 45  51 55 44 20 26 46 46 30  |       EQUD &FF0|
00007f10  31 30 43 46 46 20 0d 20  31 39 35 30 20 20 20 20  |10CFF . 1950    |
00007f20  20 20 20 20 20 45 51 55  44 20 26 30 37 46 46 46  |     EQUD &07FFF|
00007f30  46 30 34 20 0d 20 31 39  36 30 20 20 20 20 20 20  |F04 . 1960      |
00007f40  20 20 20 45 51 55 44 20  26 30 37 46 46 46 46 30  |   EQUD &07FFFF0|
00007f50  36 20 0d 20 31 39 37 30  20 20 20 20 20 20 20 20  |6 . 1970        |
00007f60  20 45 51 55 44 20 26 30  37 30 37 30 37 46 46 0d  | EQUD &070707FF.|
00007f70  20 31 39 38 30 20 20 20  20 20 20 20 20 20 45 51  | 1980         EQ|
00007f80  55 44 20 26 30 35 46 46  46 46 30 36 20 0d 20 31  |UD &05FFFF06 . 1|
00007f90  39 39 30 20 20 20 20 20  20 20 20 20 45 51 55 44  |990         EQUD|
00007fa0  20 26 46 46 30 44 30 30  46 46 20 0d 20 32 30 30  | &FF0D00FF . 200|
00007fb0  30 20 20 20 20 20 20 20  20 20 45 51 55 44 20 26  |0         EQUD &|
00007fc0  46 46 30 36 30 36 30 36  20 0d 20 32 30 31 30 20  |FF060606 . 2010 |
00007fd0  20 20 20 20 20 20 20 20  45 51 55 44 20 26 30 37  |        EQUD &07|
00007fe0  46 46 46 46 30 36 0d 20  32 30 32 30 20 20 20 20  |FFFF06. 2020    |
00007ff0  20 20 20 20 20 45 51 55  44 20 26 46 46 30 31 30  |     EQUD &FF010|
00008000  32 46 46 20 0d 20 32 30  33 30 20 20 20 20 20 20  |2FF . 2030      |
00008010  20 20 20 45 51 55 44 20  26 30 39 46 46 46 46 30  |   EQUD &09FFFF0|
00008020  34 20 0d 20 32 30 34 30  20 20 20 20 20 20 20 20  |4 . 2040        |
00008030  20 45 51 55 44 20 26 30  32 46 46 30 32 30 32 20  | EQUD &02FF0202 |
00008040  0d 20 32 30 35 30 20 20  20 20 20 20 20 20 20 45  |. 2050         E|
00008050  51 55 44 20 26 46 46 30  33 30 32 46 46 0d 20 32  |QUD &FF0302FF. 2|
00008060  30 36 30 20 20 20 20 20  20 20 20 20 45 51 55 44  |060         EQUD|
00008070  20 26 30 35 46 46 46 46  30 38 20 0d 20 32 30 37  | &05FFFF08 . 207|
00008080  30 20 20 20 20 20 20 20  20 20 45 51 55 44 20 26  |0         EQUD &|
00008090  46 46 30 33 30 30 46 46  20 0d 20 32 30 38 30 20  |FF0300FF . 2080 |
000080a0  20 20 20 20 20 20 20 20  45 51 55 44 20 26 46 46  |        EQUD &FF|
000080b0  30 33 30 32 46 46 20 0d  20 32 30 39 30 20 20 20  |0302FF . 2090   |
000080c0  20 20 20 20 20 20 45 51  55 44 20 26 30 33 30 33  |      EQUD &0303|
000080d0  46 46 30 33 0d 20 32 31  30 30 20 20 20 20 20 20  |FF03. 2100      |
000080e0  20 20 20 45 51 55 44 20  26 30 35 46 46 46 46 30  |   EQUD &05FFFF0|
000080f0  34 20 0d 20 32 31 31 30  20 20 20 20 20 20 20 20  |4 . 2110        |
00008100  20 45 51 55 44 20 26 46  46 30 34 30 34 30 34 20  | EQUD &FF040404 |
00008110  0d 20 32 31 32 30 20 20  20 20 20 20 20 20 20 45  |. 2120         E|
00008120  51 55 44 20 26 46 46 30  46 30 32 46 46 20 0d 20  |QUD &FF0F02FF . |
00008130  32 31 33 30 20 20 20 20  20 20 20 20 20 45 51 55  |2130         EQU|
00008140  44 20 26 30 37 46 46 46  46 30 34 0d 20 32 31 34  |D &07FFFF04. 214|
00008150  30 20 20 20 20 20 20 20  20 20 45 51 55 44 20 26  |0         EQUD &|
00008160  30 35 30 35 30 35 46 46  20 0d 20 32 31 35 30 20  |050505FF . 2150 |
00008170  20 20 20 20 20 20 20 20  45 51 55 44 20 26 30 35  |        EQUD &05|
00008180  46 46 46 46 30 34 20 0d  20 32 31 36 30 20 20 20  |FFFF04 . 2160   |
00008190  20 20 20 20 20 20 45 51  55 44 20 26 30 35 46 46  |      EQUD &05FF|
000081a0  46 46 30 36 20 0d 20 32  31 37 30 20 20 20 20 20  |FF06 . 2170     |
000081b0  20 20 20 20 45 51 55 44  20 26 46 46 30 33 30 45  |    EQUD &FF030E|
000081c0  46 46 0d 20 32 31 38 30  20 20 20 20 20 20 20 20  |FF. 2180        |
000081d0  20 45 51 55 44 20 26 46  46 30 31 30 43 46 46 20  | EQUD &FF010CFF |
000081e0  0d 20 32 31 39 30 20 20  20 20 20 20 20 20 20 45  |. 2190         E|
000081f0  51 55 44 20 26 30 39 46  46 46 46 30 41 20 0d 20  |QUD &09FFFF0A . |
00008200  32 32 30 30 20 20 20 20  20 20 20 20 20 45 51 55  |2200         EQU|
00008210  44 20 26 30 42 46 46 46  46 30 41 20 0d 20 32 32  |D &0BFFFF0A . 22|
00008220  31 30 20 20 20 20 20 20  20 20 20 45 51 55 44 20  |10         EQUD |
00008230  26 46 46 30 41 30 41 30  41 0d 20 32 32 32 30 20  |&FF0A0A0A. 2220 |
00008240  20 20 20 20 20 20 20 20  45 51 55 44 20 26 30 42  |        EQUD &0B|
00008250  46 46 46 46 30 38 20 0d  20 32 32 33 30 20 20 20  |FFFF08 . 2230   |
00008260  20 20 20 20 20 20 45 51  55 44 20 26 46 46 30 44  |      EQUD &FF0D|
00008270  30 30 46 46 20 0d 20 32  32 34 30 20 20 20 20 20  |00FF . 2240     |
00008280  20 20 20 20 45 51 55 44  20 26 30 42 30 42 30 42  |    EQUD &0B0B0B|
00008290  46 46 20 0d 20 32 32 35  30 20 20 20 20 20 20 20  |FF . 2250       |
000082a0  20 20 45 51 55 44 20 26  30 42 46 46 46 46 30 41  |  EQUD &0BFFFF0A|
000082b0  0d 20 32 32 36 30 20 20  20 20 20 20 20 20 20 45  |. 2260         E|
000082c0  51 55 44 20 26 30 43 46  46 30 43 30 43 20 0d 20  |QUD &0CFF0C0C . |
000082d0  32 32 37 30 20 20 20 20  20 20 20 20 20 45 51 55  |2270         EQU|
000082e0  44 20 26 46 46 30 44 30  43 46 46 20 0d 20 32 32  |D &FF0D0CFF . 22|
000082f0  38 30 20 20 20 20 20 20  20 20 20 45 51 55 44 20  |80         EQUD |
00008300  26 46 46 30 46 30 43 46  46 20 0d 20 32 32 39 30  |&FF0F0CFF . 2290|
00008310  20 20 20 20 20 20 20 20  20 45 51 55 44 20 26 30  |         EQUD &0|
00008320  37 46 46 46 46 30 41 0d  20 32 33 30 30 20 20 20  |7FFFF0A. 2300   |
00008330  20 20 20 20 20 20 45 51  55 44 20 26 46 46 30 44  |      EQUD &FF0D|
00008340  30 43 46 46 20 0d 20 32  33 31 30 20 20 20 20 20  |0CFF . 2310     |
00008350  20 20 20 20 45 51 55 44  20 26 30 44 30 44 46 46  |    EQUD &0D0DFF|
00008360  30 44 20 0d 20 32 33 32  30 20 20 20 20 20 20 20  |0D . 2320       |
00008370  20 20 45 51 55 44 20 26  30 42 46 46 46 46 30 36  |  EQUD &0BFFFF06|
00008380  20 0d 20 32 33 33 30 20  20 20 20 20 20 20 20 20  | . 2330         |
00008390  45 51 55 44 20 26 46 46  30 44 30 45 46 46 0d 20  |EQUD &FF0D0EFF. |
000083a0  32 33 34 30 20 20 20 20  20 20 20 20 20 45 51 55  |2340         EQU|
000083b0  44 20 26 30 39 46 46 46  46 30 38 20 0d 20 32 33  |D &09FFFF08 . 23|
000083c0  35 30 20 20 20 20 20 20  20 20 20 45 51 55 44 20  |50         EQUD |
000083d0  26 30 39 30 39 30 39 46  46 20 0d 20 32 33 36 30  |&090909FF . 2360|
000083e0  20 20 20 20 20 20 20 20  20 45 51 55 44 20 26 46  |         EQUD &F|
000083f0  46 30 46 30 32 46 46 20  0d 20 32 33 37 30 20 20  |F0F02FF . 2370  |
00008400  20 20 20 20 20 20 20 45  51 55 44 20 26 30 39 46  |       EQUD &09F|
00008410  46 46 46 30 41 0d 20 32  33 38 30 20 20 20 20 20  |FFF0A. 2380     |
00008420  20 20 20 20 45 51 55 44  20 26 46 46 30 38 30 38  |    EQUD &FF0808|
00008430  30 38 20 0d 20 32 33 39  30 20 20 20 20 20 20 20  |08 . 2390       |
00008440  20 20 45 51 55 44 20 26  30 39 46 46 46 46 30 38  |  EQUD &09FFFF08|
00008450  20 0d 20 32 34 30 30 20  20 20 20 20 20 20 20 20  | . 2400         |
00008460  45 51 55 44 20 26 30 42  46 46 46 46 30 38 20 0d  |EQUD &0BFFFF08 .|
00008470  20 32 34 31 30 20 20 20  20 20 20 20 20 20 45 51  | 2410         EQ|
00008480  55 44 20 26 46 46 30 33  30 45 46 46 0d 20 32 34  |UD &FF030EFF. 24|
00008490  32 30 20 20 20 20 20 20  20 20 20 45 51 55 44 20  |20         EQUD |
000084a0  26 46 46 30 46 30 43 46  46 20 0d 20 32 34 33 30  |&FF0F0CFF . 2430|
000084b0  20 20 20 20 20 20 20 20  20 45 51 55 44 20 26 30  |         EQUD &0|
000084c0  39 46 46 46 46 30 34 20  0d 20 32 34 34 30 20 20  |9FFFF04 . 2440  |
000084d0  20 20 20 20 20 20 20 45  51 55 44 20 26 30 46 30  |       EQUD &0F0|
000084e0  46 46 46 30 46 20 0d 20  32 34 35 30 20 20 20 20  |FFF0F . 2450    |
000084f0  20 20 20 20 20 45 51 55  44 20 26 46 46 30 46 30  |     EQUD &FF0F0|
00008500  45 46 46 0d 20 32 34 36  30 20 20 20 20 20 20 20  |EFF. 2460       |
00008510  20 20 45 51 55 44 20 26  30 35 46 46 46 46 30 38  |  EQUD &05FFFF08|
00008520  20 0d 20 32 34 37 30 20  20 20 20 20 20 20 20 20  | . 2470         |
00008530  45 51 55 44 20 26 46 46  30 44 30 45 46 46 20 0d  |EQUD &FF0D0EFF .|
00008540  20 32 34 38 30 20 20 20  20 20 20 20 20 20 45 51  | 2480         EQ|
00008550  55 44 20 26 46 46 30 46  30 45 46 46 20 0d 20 32  |UD &FF0F0EFF . 2|
00008560  34 39 30 20 20 20 20 20  20 20 20 20 45 51 55 44  |490         EQUD|
00008570  20 26 30 45 46 46 30 45  30 45 0d 20 32 35 30 30  | &0EFF0E0E. 2500|
00008580  20 5d 0d 20 32 35 31 30  20 4e 45 58 54 0d 20 32  | ]. 2510 NEXT. 2|
00008590  35 32 30 20 45 4e 44 50  52 4f 43 0d              |520 ENDPROC.|
0000859c