Home » CEEFAX disks » telesoftware15.adl » 14-04-89/T\TTX06

14-04-89/T\TTX06

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 » telesoftware15.adl
Filename: 14-04-89/T\TTX06
Read OK:
File size: 490D bytes
Load address: 0000
Exec address: FFFFFFFF
File contents
Interfacing with the Acorn Teletext Adaptor - by - Gordon Horsington
--------------------------------------------------------------------

Module 6. The Teletext Independent Data Packets, Channels 0 to 7, Part 2
------------------------------------------------------------------------

Packets 30 and 31 have been set aside for page independent data. These
packets are not associated with any Teletext magazine or page and can be
transmitted at any time. The MRAG of these packets is used to define 15
independent data channels. Because these packets are not associated with
paged data in any way the term magazine is not used with packets 30 and
31 and channel number is used instead. The channel number is the
(de-hammed) first byte of the MRAG. Channels 0 to 7 are equivalent to
packet 30, magazines 0 to 7 and channels 8 to 15 are equivalent to packet
31, magazines 0 to 7. It is still necessary to decode the MRAG to identify
the packet as being either 30 or 31, but a short-cut may be to check the
second MRAG byte which will always decode to 15 for independent channels.

The Television Service Data Packet (TSDP) is broadcast on independent data
channel 0 (ie. packet 30, magazine 0). This channel is sometimes referred
to as "Packet 8/30".

There are two types of TSDP format transmitted by the BBC. These are known
as type 0 and type 2 and both use independent data channel 0.  The ITV
network only uses the BBC format type 0.

German TV stations transmit a bi-phase modulated signal which carries a
video programme service data packet (VPS). These data can be used to allow
video recorders to be set to record a specific program, or type of
program, regardless of what time it actually starts and without
advertisements if required. The BBC has put forward a proposal to use a
version of the TSDP to carry similar information. This is known as the
type 2 TSDP format or "Packet 8/30 Format 2". The BBC type 2 format is
broadcast on both BBC 1 and BBC 2 but it is only experimental at the
moment.


The type 2 TSDP
---------------

Figure 1 shows the proposed format for the type 2 TSDP and where these
data are stored by the demonstration program TSDP2. The type 2 TSDP is
broadcast on both BBC 1 and BBC 2 about 3 times every 4 or 5 seconds but,
at the time of writing, the information contained in the VPS data bytes is
not being updated to correspond with the TV programmes. The reason why it
is not being updated is that the bytes for the experimental system were
calculated (by hand) and blown into a ROM used by the CEEFAX computer!


+-------+----+---------------------------+------------------+-----------+
|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 | channel number            | magazine         | de-hammed |
|  4    | hc | bit 0 of pack no in bit 3 | packet bit 0     | de-hammed |
|  5    | hc | packet number bits 1-4    | packet bits 1-4  | de-hammed |
|  6    | hc | TSDP type                 | buff?0           | de-hammed |
|  7    | hc | initial page, low nybble  | buff?1           | de-hammed |
|  8    | hc | initial page, high nybble | buff?2           | de-hammed |
|  9    | hc | init subpage, low nybble  | buff?3           | de-hammed |
| 10    | hc | init subp nyb 1 in bit 0-2| buff?4 bits 0-2  | de-hammed |
| 10    | hc | bit 0 of init mag in bit 3| buff?4 bit 3     | de-hammed |
| 11    | hc | initial subpage, nybble 2 | buff?5           | de-hammed |
| 12    | hc | init subpage hi in bit 0-1| buff?6 bits 0-1  | de-hammed |
| 12    | hc | bit 1 of init mag in bit 2| buff?6 bit 2     | de-hammed |
| 12    | hc | bit 2 of init mag in bit 3| buff?6 bit 3     | de-hammed |
| 13-16 | hc | network identification    | buff?7 - buff?10 | de-hammed |
| 17-25 | hc | video prog. service data  | buff?11 - buff?19| de-hammed |
| 26-45 |    | status display message    | buff?20 - buff?39|           |
+-------+----+---------------------------+------------------+-----------+

Figure 1. The data transmitted in the BBC type 2 TSDP
-----------------------------------------------------


There are no plans to implement the VPS service at the moment, nor has it
been decided if the type 2 format is the best one to use. The current
specification for the VPS data is shown in figure 2. The bits in figure 2
are taken from the de-hammed bytes 17 to 25 of the type 2 TSDP.


+---------+----------------------------------------------+
| bits    | interpretation                               |
+---------+----------------------------------------------+
| 1 - 2   | 10 = mono, 01 = stereo, else 2 channel sound |
| 3 - 4   | 10 = unrated, else restricted audience       |
| 5 - 6   | 11 or 01 = valid data, else invalid data     |
| 7 - 11  | scheduled programme date, day                |
| 12 - 15 | scheduled programme date, month              |
| 16 - 20 | scheduled programme time, hours              |
| 21 - 26 | scheduled programme time, minutes            |
| 27 - 30 | country of origin, 12 = UK                   |
| 31 - 36 | programme source                             |
+---------+----------------------------------------------+

Figure 2. Video programme service data (36 bits in bytes 17 to 25)
------------------------------------------------------------------


Unlike the type 0 TSDP, the data bits in the VPS data are transmitted most
significant bit first. Nine groups of 4 data bits are assembled with
hamming protection into bytes 17 to 25. These bits can be interpreted as
shown in figure 3.


Byte no     17     18     19     20     21     22     23     24     25
Data byte   73     EA     73     49     5E     FD     B6     A1     EA
DeHam'd      5      F      5      2      3      E      D      C      F
reversed   1010   1111   1010   0100   1100   0111   1011   0011   1111
           / /    / \      /\     /\      /   \       /\     /\       /
 mono sound / valid  \----/  \---/  \----/     \-----/  \---/  \-----/
    unrated/  data    day    month   hours     minutes country  source
                       29      2      12         30     12=UK     63

Figure 3. The VPS transmitted with a dummy date of 29th. of February
--------------------------------------------------------------------


Chain the program TSDP2 and select one of the four channels when prompted.
You can halt the program at any time by pressing the Escape key. BBC 1 and
BBC 2 both broadcast type 0 and type 2 BBC format TSDPs, but the ITV
network stations only broadcast type 0.


   10 REM> TSDP2
   20 MODE7
   30 VDU23,1,0;0;0;0;
   40 DIM mcode &500 :REM: space for machine code
   50 DIM buff 40 :REM: TSDP buffer
   60 PROCmcode :REM: assemble machine code
   70 ttx$=CHR$(141)+CHR$(132)+CHR$(157)+CHR$(131)
      +"Television Service Data Packet 2  "+CHR$(156)
   80 PRINTTAB(0,1)ttx$
   90 PRINTTAB(0,2)ttx$
  100 INPUTTAB(10,4)"TV channel (1-4) = "answer$
  110 channel?0=EVAL("&"+LEFT$(answer$,1))+&1B
  120 IF channel?0 < &1C THEN channel?0 = &1C
  130 IF channel?0 > &1F THEN channel?0 = &1F
  140 PRINTTAB(5,7)"TSDP type ="
  150 PRINTTAB(5,8)"Initial page ="
  160 PRINTTAB(5,9)"Network ID code ="
  170 PRINTTAB(5,10)"Sound ="
  180 PRINTTAB(5,11)"Rating ="
  190 PRINTTAB(5,12)"Data ="
  200 PRINTTAB(5,13)"Day ="
  210 PRINTTAB(5,14)"Month ="
  220 PRINTTAB(5,15)"Hours ="
  230 PRINTTAB(5,16)"Minutes ="
  240 PRINTTAB(5,17)"Country ="
  250 PRINTTAB(5,18)"Source ="
  260 PRINTTAB(5,19)"Message ="
  270 CALL mcode :REM: enable TTX interrupts
  280 ONERROR GOTO 320
  290 REPEAT
  300 IF grabflag?0=2 PROCdisplay
  310 UNTIL FALSE
  320 CALL mcode :REM: disable TTX interrupts
  330 VDU31,0,21,23,1,1;0;0;0;
  340 END
  350 DEFPROCdisplay
  360 PRINTTAB(17,7);buff?0 :REM: TSDP type
  370 b0=((buff?4)AND8)<>0:REM: bit 0 of magazine number
  380 b1=((buff?6)AND4)<>0:REM: bit 1 of magazine number
  390 b2=((buff?6)AND8)<>0:REM: bit 2 of magazine number
  400 init=0:REM: initial magazine number
  410 IF b0 init=1
  420 IF b1 init=init+2
  430 IF b2 init=init+4
  440 PRINTTAB(20,8);~init;:REM: initial magazine
  450 PRINT;~buff?2;~buff?1;:REM: initial page
  460 PRINT;" ";~((buff?6)AND3);~buff?5;~((buff?4)AND7);~buff?3
      :REM: initial sub-page
  470 PRINTTAB(23,9);~buff?7;~buff?8;~buff?9;~buff?10
      :REM: Network ID code
  480 CALL reverse :REM: reverse bits in VPS
  490 sound=((vps?0)AND192)DIV64
  500 IF sound=0 OR sound=3 PRINTTAB(13,10)"two channel sound"
  510 IF sound=1 PRINTTAB(13,10)"stereo"
  520 IF sound=2 PRINTTAB(13,10)"mono"
  530 rate=((vps?0)AND48)DIV16
  540 IF rate=2 PRINTTAB(14,11)"unrated"
      ELSE PRINTTAB(14,11)"restricted" :REM: programme rating
  550 valid=((vps?0)AND12)DIV4 :REM: data validity
  560 IF valid>1 PRINTTAB(12,12)"valid"
      ELSE PRINTTAB(12,12)"invalid":GOTO 650
  570 PRINTTAB(11,13);(((vps?0)AND3)*8)+(((vps?1)AND224)DIV32)
      :REM: day
  580 PRINTTAB(13,14);((vps?1)AND30)DIV2 :REM: month
  590 PRINTTAB(13,15);(((vps?1)AND1)*32)+(((vps?2)AND240)DIV16)
      :REM: hours
  600 PRINTTAB(15,16);(((vps?2)AND15)*4)+(((vps?3)AND192)DIV64)
      :REM: minutes
  610 country=((vps?3)AND61)DIV4 :REM: country of origin
  620 IF country=12 PRINTTAB(15,17)"UK" ELSE PRINTTAB(15,17);country
  630 PRINTTAB(14,18);(((vps?3)AND3)*16)+(((vps?4)AND240)DIV16)
      :REM: source
  640 VDU31,15,19 :REM: print message
  650 FOR byte=20 TO 39
  660 VDU (buff?byte OR &80)
  670 NEXT
  680 VDU7
  690 grabflag?0=0 :REM: grabflag = searching
  700 ENDPROC
  710 DEFPROCmcode
  720 packet=&70 :REM: row number of current packet
  730 magazine=&71 :REM: magazine number of current page
  740 grabflag=&72 :REM: page grabber flag
  750 channel=&73 :REM: TV channel
  760 temp=&74 :REM: temporary store
  770 vps=&75 :REM: decoded VPS, 5 bytes
  780 savereg=&FC :REM: interrupt accumulator save register
  790 irq2v=&206 :REM: IRQ2 vector
  800 ttxcontrol=&FC10 :REM: TTX control register, write only
  810 ttxstatus=&FC10 :REM: TTX status register, read only
  820 rowreg=&FC11 :REM: TTX row register, write only
  830 datareg=&FC12 :REM: TTX data register, read & write
  840 statclr=&FC13 :REM: TTX clear status register, read & write
  850 FOR pass=0 TO 2 STEP 2
  860 P%=mcode
  870 [       OPT pass
  880         LDA #&00
  890         STA grabflag  \ grabflag = searching
  900         LDX irq2v     \ load secondary interrupt vector
  910         LDY irq2v+1
  920         CPY #interrupt DIV 256 \ has the vector been altered?
  930         BEQ disable   \ branch if interrupt vector altered
  940         STX oldirq2v  \ save secondary interrupt vector
  950         STY oldirq2v+1
  960         LDX #interrupt MOD 256 \ install new interrupt routine
  970         LDY #interrupt DIV 256
  980         SEI           \ disable interrupts when altering vector
  990         STX irq2v
 1000         STY irq2v+1
 1010         CLI           \ re-enable interrupts
 1020         LDA channel   \ load (channel number + #&1C)
 1030         STA ttxcontrol \ enable TTX
 1040         RTS           \ return to BASIC
 1050 .disable
 1060         LDA #&00
 1070         STA ttxcontrol \ disable TTX
 1080         LDX oldirq2v  \ load original vector
 1090         LDY oldirq2v+1
 1100         SEI           \ disable interrupts when altering vector
 1110         STX irq2v     \ restore original vector
 1120         STY irq2v+1
 1130         CLI           \ re-enable interrupts
 1140         RTS           \ return to BASIC
 1150 .interrupt
 1160         BIT ttxstatus \ poll TTX hardware
 1170         BMI ttxinter  \ branch if TTX interrupt
 1180         JMP (oldirq2v) \ not TTX interrupt
 1190 .ttxinter
 1200         LDA savereg   \ interrupt accumulator save register
 1210         PHA           \ push interrupt accumulator save register
 1220         TXA
 1230         PHA           \ push X
 1240         TYA
 1250         PHA           \ push Y
 1260         LDA grabflag  \ has TSDP been grabbed?
 1270         BNE clearstatus \ clear status and RTI if TSDP grabbed
 1280         CLD           \ clear decimal flag
 1290         LDY #&00      \ start with row 0
 1300 .readttxt
 1310         STY rowreg    \ try rows 0 to 15
 1320         LDA datareg   \ load framing code (#&27)
 1330         BEQ emptyrow  \ if zero try next row
 1340         TYA
 1350         PHA           \ save row number
 1360         JSR readpacket
 1370         PLA
 1380         TAY           \ restore row number
 1390 .emptyrow
 1400         INY           \ increment row number
 1410         CPY #&10      \ try rows 0 - 15
 1420         BNE readttxt
 1430 .clearstatus
 1440         LDA #&00
 1450         LDY #&0F      \ clear 16 rows in adaptor
 1460 .clearloop
 1470         STY rowreg
 1480         STA datareg
 1490         DEY
 1500         BPL clearloop
 1510         STA statclr   \ clear status flags before returning
 1520         PLA
 1530         TAY           \ restore Y
 1540         PLA
 1550         TAX           \ restore X
 1560         PLA
 1570         STA savereg   \ restore interrupt accumulator save register
 1580         RTI           \ return from interrupt
 1590 .readpacket
 1600         LDA grabflag  \ just checking
 1610         BNE return
 1620         LDY datareg   \ read magazine number
 1630         LDA hamtable,Y \ de-ham it
 1640         BMI return    \ stop loading if error
 1650         STA magazine  \ save magazine number
 1660         LDY datareg   \ read packet number
 1670         LDA hamtable,Y \ de-ham it
 1680         BMI return    \ stop loading if error
 1690         STA packet    \ save packet number
 1700         LDA magazine  \ load magazine number
 1710         CMP #&08      \ bit 3 of mag. number is bit 0 of packet
                            \ number
 1720         ROL packet    \ 5 bit packet number
 1730         AND #&07      \ use only bits 0-2
 1740         CMP #&00      \ is this magazine 0?
 1750         BNE return
 1760         LDA packet
 1770         CMP #&1E      \ look for TSDP
 1780         BNE return    \ ignore all other packets
 1790         LDY #&00      \ read bytes 0 - 39
 1800 .readmore
 1810         LDX datareg   \ read data register
 1820         LDA hamtable,X \ de-ham the byte
 1830         BMI return    \ return if error
 1840         STA buff,Y    \ store in buffer
 1850         INY           \ increment index
 1860         CPY #&14
 1870         BCC readmore  \ go back for more
 1880 .readagain
 1890         LDA datareg   \ read data register
 1900         STA buff,Y    \ store in buffer
 1910         INY           \ increment index
 1920         CPY #&28      \ decimal 40
 1930         BNE readagain \ go back for more
 1940         LDA buff      \ TSDP type byte
 1950         AND #&0E      \ %00001110
 1960         STA grabflag  \ grabflag = 0 or 2
 1970 .return
 1980         RTS
 1990 .reverse
 2000         LDX #&14      \ VPS nybbles in bytes &0B - &13
 2010         LDY #&04      \ decode VPS into 5 bytes
 2020 .join
 2030         LDA buff,X    \ load VPS nybble
 2040         ASL A         \ move low nybble into high
 2050         ASL A
 2060         ASL A
 2070         ASL A
 2080         STA temp      \ temporary zero page store
 2090         DEX           \ point to next nybble
 2100         LDA buff,X    \ load VPS nybble
 2110         ORA temp      \ join two nybbles into one byte
 2120         STA vps,Y     \ and store in zero page
 2130         DEX           \ point to next nybble
 2140         DEY           \ point to next byte
 2150         BPL join      \ branch if more VPS bytes
 2160         LDX #&04      \ VPS now in 5 zero page bytes
 2170 .outerloop
 2180         LDA vps,X     \ reverse bits in all VPS bytes
 2190         STA temp      \ temporary zero page store
 2200         LDY #&07
 2210 .innerloop
 2220         ROL temp      \ bit into carry
 2230         ROR A         \ carry into accumulator
 2240         DEY
 2250         BPL innerloop
 2260         STA vps,X     \ store reversed byte
 2270         DEX
 2280         BPL outerloop \ go back if more VPS bytes
 2290         RTS
 2300 .oldirq2v
 2310         EQUW &00
 2320 .hamtable
 2330         EQUD &0101FF01 
 2340         EQUD &FF0100FF 
 2350         EQUD &FF0102FF 
 2360         EQUD &07FFFF0A
 2370         EQUD &FF0100FF 
 2380         EQUD &00FF0000 
 2390         EQUD &0BFFFF06 
 2400         EQUD &FF0300FF
 2410         EQUD &FF010CFF 
 2420         EQUD &07FFFF04 
 2430         EQUD &07FFFF06 
 2440         EQUD &070707FF
 2450         EQUD &05FFFF06 
 2460         EQUD &FF0D00FF 
 2470         EQUD &FF060606 
 2480         EQUD &07FFFF06
 2490         EQUD &FF0102FF 
 2500         EQUD &09FFFF04 
 2510         EQUD &02FF0202 
 2520         EQUD &FF0302FF
 2530         EQUD &05FFFF08 
 2540         EQUD &FF0300FF 
 2550         EQUD &FF0302FF 
 2560         EQUD &0303FF03
 2570         EQUD &05FFFF04 
 2580         EQUD &FF040404 
 2590         EQUD &FF0F02FF 
 2600         EQUD &07FFFF04
 2610         EQUD &050505FF 
 2620         EQUD &05FFFF04 
 2630         EQUD &05FFFF06 
 2640         EQUD &FF030EFF
 2650         EQUD &FF010CFF 
 2660         EQUD &09FFFF0A 
 2670         EQUD &0BFFFF0A 
 2680         EQUD &FF0A0A0A
 2690         EQUD &0BFFFF08 
 2700         EQUD &FF0D00FF 
 2710         EQUD &0B0B0BFF 
 2720         EQUD &0BFFFF0A
 2730         EQUD &0CFF0C0C 
 2740         EQUD &FF0D0CFF 
 2750         EQUD &FF0F0CFF 
 2760         EQUD &07FFFF0A
 2770         EQUD &FF0D0CFF 
 2780         EQUD &0D0DFF0D 
 2790         EQUD &0BFFFF06 
 2800         EQUD &FF0D0EFF
 2810         EQUD &09FFFF08 
 2820         EQUD &090909FF 
 2830         EQUD &FF0F02FF 
 2840         EQUD &09FFFF0A
 2850         EQUD &FF080808 
 2860         EQUD &09FFFF08 
 2870         EQUD &0BFFFF08 
 2880         EQUD &FF030EFF
 2890         EQUD &FF0F0CFF 
 2900         EQUD &09FFFF04 
 2910         EQUD &0F0FFF0F 
 2920         EQUD &FF0F0EFF
 2930         EQUD &05FFFF08 
 2940         EQUD &FF0D0EFF 
 2950         EQUD &FF0F0EFF 
 2960         EQUD &0EFF0E0E
 2970 ]
 2980 NEXT
 2990 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 0a 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 2d 0d 0a 0d 0a 4d 6f  |----------....Mo|
00000090  64 75 6c 65 20 36 2e 20  54 68 65 20 54 65 6c 65  |dule 6. The Tele|
000000a0  74 65 78 74 20 49 6e 64  65 70 65 6e 64 65 6e 74  |text Independent|
000000b0  20 44 61 74 61 20 50 61  63 6b 65 74 73 2c 20 43  | Data Packets, C|
000000c0  68 61 6e 6e 65 6c 73 20  30 20 74 6f 20 37 2c 20  |hannels 0 to 7, |
000000d0  50 61 72 74 20 32 0d 0a  2d 2d 2d 2d 2d 2d 2d 2d  |Part 2..--------|
000000e0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000120  0d 0a 0d 0a 50 61 63 6b  65 74 73 20 33 30 20 61  |....Packets 30 a|
00000130  6e 64 20 33 31 20 68 61  76 65 20 62 65 65 6e 20  |nd 31 have been |
00000140  73 65 74 20 61 73 69 64  65 20 66 6f 72 20 70 61  |set aside for pa|
00000150  67 65 20 69 6e 64 65 70  65 6e 64 65 6e 74 20 64  |ge independent d|
00000160  61 74 61 2e 20 54 68 65  73 65 0d 0a 70 61 63 6b  |ata. These..pack|
00000170  65 74 73 20 61 72 65 20  6e 6f 74 20 61 73 73 6f  |ets are not asso|
00000180  63 69 61 74 65 64 20 77  69 74 68 20 61 6e 79 20  |ciated with any |
00000190  54 65 6c 65 74 65 78 74  20 6d 61 67 61 7a 69 6e  |Teletext magazin|
000001a0  65 20 6f 72 20 70 61 67  65 20 61 6e 64 20 63 61  |e or page and ca|
000001b0  6e 20 62 65 0d 0a 74 72  61 6e 73 6d 69 74 74 65  |n be..transmitte|
000001c0  64 20 61 74 20 61 6e 79  20 74 69 6d 65 2e 20 54  |d at any time. T|
000001d0  68 65 20 4d 52 41 47 20  6f 66 20 74 68 65 73 65  |he MRAG of these|
000001e0  20 70 61 63 6b 65 74 73  20 69 73 20 75 73 65 64  | packets is used|
000001f0  20 74 6f 20 64 65 66 69  6e 65 20 31 35 0d 0a 69  | to define 15..i|
00000200  6e 64 65 70 65 6e 64 65  6e 74 20 64 61 74 61 20  |ndependent data |
00000210  63 68 61 6e 6e 65 6c 73  2e 20 42 65 63 61 75 73  |channels. Becaus|
00000220  65 20 74 68 65 73 65 20  70 61 63 6b 65 74 73 20  |e these packets |
00000230  61 72 65 20 6e 6f 74 20  61 73 73 6f 63 69 61 74  |are not associat|
00000240  65 64 20 77 69 74 68 0d  0a 70 61 67 65 64 20 64  |ed with..paged d|
00000250  61 74 61 20 69 6e 20 61  6e 79 20 77 61 79 20 74  |ata in any way t|
00000260  68 65 20 74 65 72 6d 20  6d 61 67 61 7a 69 6e 65  |he term magazine|
00000270  20 69 73 20 6e 6f 74 20  75 73 65 64 20 77 69 74  | is not used wit|
00000280  68 20 70 61 63 6b 65 74  73 20 33 30 20 61 6e 64  |h packets 30 and|
00000290  0d 0a 33 31 20 61 6e 64  20 63 68 61 6e 6e 65 6c  |..31 and channel|
000002a0  20 6e 75 6d 62 65 72 20  69 73 20 75 73 65 64 20  | number is used |
000002b0  69 6e 73 74 65 61 64 2e  20 54 68 65 20 63 68 61  |instead. The cha|
000002c0  6e 6e 65 6c 20 6e 75 6d  62 65 72 20 69 73 20 74  |nnel number is t|
000002d0  68 65 0d 0a 28 64 65 2d  68 61 6d 6d 65 64 29 20  |he..(de-hammed) |
000002e0  66 69 72 73 74 20 62 79  74 65 20 6f 66 20 74 68  |first byte of th|
000002f0  65 20 4d 52 41 47 2e 20  43 68 61 6e 6e 65 6c 73  |e MRAG. Channels|
00000300  20 30 20 74 6f 20 37 20  61 72 65 20 65 71 75 69  | 0 to 7 are equi|
00000310  76 61 6c 65 6e 74 20 74  6f 0d 0a 70 61 63 6b 65  |valent to..packe|
00000320  74 20 33 30 2c 20 6d 61  67 61 7a 69 6e 65 73 20  |t 30, magazines |
00000330  30 20 74 6f 20 37 20 61  6e 64 20 63 68 61 6e 6e  |0 to 7 and chann|
00000340  65 6c 73 20 38 20 74 6f  20 31 35 20 61 72 65 20  |els 8 to 15 are |
00000350  65 71 75 69 76 61 6c 65  6e 74 20 74 6f 20 70 61  |equivalent to pa|
00000360  63 6b 65 74 0d 0a 33 31  2c 20 6d 61 67 61 7a 69  |cket..31, magazi|
00000370  6e 65 73 20 30 20 74 6f  20 37 2e 20 49 74 20 69  |nes 0 to 7. It i|
00000380  73 20 73 74 69 6c 6c 20  6e 65 63 65 73 73 61 72  |s still necessar|
00000390  79 20 74 6f 20 64 65 63  6f 64 65 20 74 68 65 20  |y to decode the |
000003a0  4d 52 41 47 20 74 6f 20  69 64 65 6e 74 69 66 79  |MRAG to identify|
000003b0  0d 0a 74 68 65 20 70 61  63 6b 65 74 20 61 73 20  |..the packet as |
000003c0  62 65 69 6e 67 20 65 69  74 68 65 72 20 33 30 20  |being either 30 |
000003d0  6f 72 20 33 31 2c 20 62  75 74 20 61 20 73 68 6f  |or 31, but a sho|
000003e0  72 74 2d 63 75 74 20 6d  61 79 20 62 65 20 74 6f  |rt-cut may be to|
000003f0  20 63 68 65 63 6b 20 74  68 65 0d 0a 73 65 63 6f  | check the..seco|
00000400  6e 64 20 4d 52 41 47 20  62 79 74 65 20 77 68 69  |nd MRAG byte whi|
00000410  63 68 20 77 69 6c 6c 20  61 6c 77 61 79 73 20 64  |ch will always d|
00000420  65 63 6f 64 65 20 74 6f  20 31 35 20 66 6f 72 20  |ecode to 15 for |
00000430  69 6e 64 65 70 65 6e 64  65 6e 74 20 63 68 61 6e  |independent chan|
00000440  6e 65 6c 73 2e 0d 0a 0d  0a 54 68 65 20 54 65 6c  |nels.....The Tel|
00000450  65 76 69 73 69 6f 6e 20  53 65 72 76 69 63 65 20  |evision Service |
00000460  44 61 74 61 20 50 61 63  6b 65 74 20 28 54 53 44  |Data Packet (TSD|
00000470  50 29 20 69 73 20 62 72  6f 61 64 63 61 73 74 20  |P) is broadcast |
00000480  6f 6e 20 69 6e 64 65 70  65 6e 64 65 6e 74 20 64  |on independent d|
00000490  61 74 61 0d 0a 63 68 61  6e 6e 65 6c 20 30 20 28  |ata..channel 0 (|
000004a0  69 65 2e 20 70 61 63 6b  65 74 20 33 30 2c 20 6d  |ie. packet 30, m|
000004b0  61 67 61 7a 69 6e 65 20  30 29 2e 20 54 68 69 73  |agazine 0). This|
000004c0  20 63 68 61 6e 6e 65 6c  20 69 73 20 73 6f 6d 65  | channel is some|
000004d0  74 69 6d 65 73 20 72 65  66 65 72 72 65 64 0d 0a  |times referred..|
000004e0  74 6f 20 61 73 20 22 50  61 63 6b 65 74 20 38 2f  |to as "Packet 8/|
000004f0  33 30 22 2e 0d 0a 0d 0a  54 68 65 72 65 20 61 72  |30".....There ar|
00000500  65 20 74 77 6f 20 74 79  70 65 73 20 6f 66 20 54  |e two types of T|
00000510  53 44 50 20 66 6f 72 6d  61 74 20 74 72 61 6e 73  |SDP format trans|
00000520  6d 69 74 74 65 64 20 62  79 20 74 68 65 20 42 42  |mitted by the BB|
00000530  43 2e 20 54 68 65 73 65  20 61 72 65 20 6b 6e 6f  |C. These are kno|
00000540  77 6e 0d 0a 61 73 20 74  79 70 65 20 30 20 61 6e  |wn..as type 0 an|
00000550  64 20 74 79 70 65 20 32  20 61 6e 64 20 62 6f 74  |d type 2 and bot|
00000560  68 20 75 73 65 20 69 6e  64 65 70 65 6e 64 65 6e  |h use independen|
00000570  74 20 64 61 74 61 20 63  68 61 6e 6e 65 6c 20 30  |t data channel 0|
00000580  2e 20 20 54 68 65 20 49  54 56 0d 0a 6e 65 74 77  |.  The ITV..netw|
00000590  6f 72 6b 20 6f 6e 6c 79  20 75 73 65 73 20 74 68  |ork only uses th|
000005a0  65 20 42 42 43 20 66 6f  72 6d 61 74 20 74 79 70  |e BBC format typ|
000005b0  65 20 30 2e 0d 0a 0d 0a  47 65 72 6d 61 6e 20 54  |e 0.....German T|
000005c0  56 20 73 74 61 74 69 6f  6e 73 20 74 72 61 6e 73  |V stations trans|
000005d0  6d 69 74 20 61 20 62 69  2d 70 68 61 73 65 20 6d  |mit a bi-phase m|
000005e0  6f 64 75 6c 61 74 65 64  20 73 69 67 6e 61 6c 20  |odulated signal |
000005f0  77 68 69 63 68 20 63 61  72 72 69 65 73 20 61 0d  |which carries a.|
00000600  0a 76 69 64 65 6f 20 70  72 6f 67 72 61 6d 6d 65  |.video programme|
00000610  20 73 65 72 76 69 63 65  20 64 61 74 61 20 70 61  | service data pa|
00000620  63 6b 65 74 20 28 56 50  53 29 2e 20 54 68 65 73  |cket (VPS). Thes|
00000630  65 20 64 61 74 61 20 63  61 6e 20 62 65 20 75 73  |e data can be us|
00000640  65 64 20 74 6f 20 61 6c  6c 6f 77 0d 0a 76 69 64  |ed to allow..vid|
00000650  65 6f 20 72 65 63 6f 72  64 65 72 73 20 74 6f 20  |eo recorders to |
00000660  62 65 20 73 65 74 20 74  6f 20 72 65 63 6f 72 64  |be set to record|
00000670  20 61 20 73 70 65 63 69  66 69 63 20 70 72 6f 67  | a specific prog|
00000680  72 61 6d 2c 20 6f 72 20  74 79 70 65 20 6f 66 0d  |ram, or type of.|
00000690  0a 70 72 6f 67 72 61 6d  2c 20 72 65 67 61 72 64  |.program, regard|
000006a0  6c 65 73 73 20 6f 66 20  77 68 61 74 20 74 69 6d  |less of what tim|
000006b0  65 20 69 74 20 61 63 74  75 61 6c 6c 79 20 73 74  |e it actually st|
000006c0  61 72 74 73 20 61 6e 64  20 77 69 74 68 6f 75 74  |arts and without|
000006d0  0d 0a 61 64 76 65 72 74  69 73 65 6d 65 6e 74 73  |..advertisements|
000006e0  20 69 66 20 72 65 71 75  69 72 65 64 2e 20 54 68  | if required. Th|
000006f0  65 20 42 42 43 20 68 61  73 20 70 75 74 20 66 6f  |e BBC has put fo|
00000700  72 77 61 72 64 20 61 20  70 72 6f 70 6f 73 61 6c  |rward a proposal|
00000710  20 74 6f 20 75 73 65 20  61 0d 0a 76 65 72 73 69  | to use a..versi|
00000720  6f 6e 20 6f 66 20 74 68  65 20 54 53 44 50 20 74  |on of the TSDP t|
00000730  6f 20 63 61 72 72 79 20  73 69 6d 69 6c 61 72 20  |o carry similar |
00000740  69 6e 66 6f 72 6d 61 74  69 6f 6e 2e 20 54 68 69  |information. Thi|
00000750  73 20 69 73 20 6b 6e 6f  77 6e 20 61 73 20 74 68  |s is known as th|
00000760  65 0d 0a 74 79 70 65 20  32 20 54 53 44 50 20 66  |e..type 2 TSDP f|
00000770  6f 72 6d 61 74 20 6f 72  20 22 50 61 63 6b 65 74  |ormat or "Packet|
00000780  20 38 2f 33 30 20 46 6f  72 6d 61 74 20 32 22 2e  | 8/30 Format 2".|
00000790  20 54 68 65 20 42 42 43  20 74 79 70 65 20 32 20  | The BBC type 2 |
000007a0  66 6f 72 6d 61 74 20 69  73 0d 0a 62 72 6f 61 64  |format is..broad|
000007b0  63 61 73 74 20 6f 6e 20  62 6f 74 68 20 42 42 43  |cast on both BBC|
000007c0  20 31 20 61 6e 64 20 42  42 43 20 32 20 62 75 74  | 1 and BBC 2 but|
000007d0  20 69 74 20 69 73 20 6f  6e 6c 79 20 65 78 70 65  | it is only expe|
000007e0  72 69 6d 65 6e 74 61 6c  20 61 74 20 74 68 65 0d  |rimental at the.|
000007f0  0a 6d 6f 6d 65 6e 74 2e  0d 0a 0d 0a 0d 0a 54 68  |.moment.......Th|
00000800  65 20 74 79 70 65 20 32  20 54 53 44 50 0d 0a 2d  |e type 2 TSDP..-|
00000810  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 0d 0a  |--------------..|
00000820  0d 0a 46 69 67 75 72 65  20 31 20 73 68 6f 77 73  |..Figure 1 shows|
00000830  20 74 68 65 20 70 72 6f  70 6f 73 65 64 20 66 6f  | the proposed fo|
00000840  72 6d 61 74 20 66 6f 72  20 74 68 65 20 74 79 70  |rmat for the typ|
00000850  65 20 32 20 54 53 44 50  20 61 6e 64 20 77 68 65  |e 2 TSDP and whe|
00000860  72 65 20 74 68 65 73 65  0d 0a 64 61 74 61 20 61  |re these..data a|
00000870  72 65 20 73 74 6f 72 65  64 20 62 79 20 74 68 65  |re stored by the|
00000880  20 64 65 6d 6f 6e 73 74  72 61 74 69 6f 6e 20 70  | demonstration p|
00000890  72 6f 67 72 61 6d 20 54  53 44 50 32 2e 20 54 68  |rogram TSDP2. Th|
000008a0  65 20 74 79 70 65 20 32  20 54 53 44 50 20 69 73  |e type 2 TSDP is|
000008b0  0d 0a 62 72 6f 61 64 63  61 73 74 20 6f 6e 20 62  |..broadcast on b|
000008c0  6f 74 68 20 42 42 43 20  31 20 61 6e 64 20 42 42  |oth BBC 1 and BB|
000008d0  43 20 32 20 61 62 6f 75  74 20 33 20 74 69 6d 65  |C 2 about 3 time|
000008e0  73 20 65 76 65 72 79 20  34 20 6f 72 20 35 20 73  |s every 4 or 5 s|
000008f0  65 63 6f 6e 64 73 20 62  75 74 2c 0d 0a 61 74 20  |econds but,..at |
00000900  74 68 65 20 74 69 6d 65  20 6f 66 20 77 72 69 74  |the time of writ|
00000910  69 6e 67 2c 20 74 68 65  20 69 6e 66 6f 72 6d 61  |ing, the informa|
00000920  74 69 6f 6e 20 63 6f 6e  74 61 69 6e 65 64 20 69  |tion contained i|
00000930  6e 20 74 68 65 20 56 50  53 20 64 61 74 61 20 62  |n the VPS data b|
00000940  79 74 65 73 20 69 73 0d  0a 6e 6f 74 20 62 65 69  |ytes is..not bei|
00000950  6e 67 20 75 70 64 61 74  65 64 20 74 6f 20 63 6f  |ng updated to co|
00000960  72 72 65 73 70 6f 6e 64  20 77 69 74 68 20 74 68  |rrespond with th|
00000970  65 20 54 56 20 70 72 6f  67 72 61 6d 6d 65 73 2e  |e TV programmes.|
00000980  20 54 68 65 20 72 65 61  73 6f 6e 20 77 68 79 20  | The reason why |
00000990  69 74 0d 0a 69 73 20 6e  6f 74 20 62 65 69 6e 67  |it..is not being|
000009a0  20 75 70 64 61 74 65 64  20 69 73 20 74 68 61 74  | updated is that|
000009b0  20 74 68 65 20 62 79 74  65 73 20 66 6f 72 20 74  | the bytes for t|
000009c0  68 65 20 65 78 70 65 72  69 6d 65 6e 74 61 6c 20  |he experimental |
000009d0  73 79 73 74 65 6d 20 77  65 72 65 0d 0a 63 61 6c  |system were..cal|
000009e0  63 75 6c 61 74 65 64 20  28 62 79 20 68 61 6e 64  |culated (by hand|
000009f0  29 20 61 6e 64 20 62 6c  6f 77 6e 20 69 6e 74 6f  |) and blown into|
00000a00  20 61 20 52 4f 4d 20 75  73 65 64 20 62 79 20 74  | a ROM used by t|
00000a10  68 65 20 43 45 45 46 41  58 20 63 6f 6d 70 75 74  |he CEEFAX comput|
00000a20  65 72 21 0d 0a 0d 0a 0d  0a 2b 2d 2d 2d 2d 2d 2d  |er!......+------|
00000a30  2d 2b 2d 2d 2d 2d 2b 2d  2d 2d 2d 2d 2d 2d 2d 2d  |-+----+---------|
00000a40  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000a50  2d 2d 2b 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |--+-------------|
00000a60  2d 2d 2d 2d 2d 2b 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |-----+----------|
00000a70  2d 2b 0d 0a 7c 62 79 74  65 20 6e 6f 7c 63 6f 64  |-+..|byte no|cod|
00000a80  65 7c 20 64 65 73 63 72  69 70 74 69 6f 6e 20 20  |e| description  |
00000a90  20 20 20 20 20 20 20 20  20 20 20 20 20 7c 20 73  |             | s|
00000aa0  74 6f 72 65 64 20 69 6e  20 20 20 20 20 20 20 20  |tored in        |
00000ab0  7c 20 66 6f 72 6d 61 74  20 20 20 20 7c 0d 0a 2b  || format    |..+|
00000ac0  2d 2d 2d 2d 2d 2d 2d 2b  2d 2d 2d 2d 2b 2d 2d 2d  |-------+----+---|
00000ad0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000ae0  2d 2d 2d 2d 2d 2d 2d 2d  2b 2d 2d 2d 2d 2d 2d 2d  |--------+-------|
00000af0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2b 2d 2d 2d 2d  |-----------+----|
00000b00  2d 2d 2d 2d 2d 2d 2d 2b  0d 0a 7c 20 20 31 20 20  |-------+..|  1  |
00000b10  20 20 7c 20 20 20 20 7c  20 63 6c 6f 63 6b 20 72  |  |    | clock r|
00000b20  75 6e 2d 69 6e 20 20 20  20 20 20 20 20 20 20 20  |un-in           |
00000b30  20 20 20 7c 20 28 6e 6f  74 20 72 65 61 64 29 20  |   | (not read) |
00000b40  20 20 20 20 20 20 7c 20  20 20 20 20 20 20 20 20  |      |         |
00000b50  20 20 7c 0d 0a 7c 20 20  32 20 20 20 20 7c 20 20  |  |..|  2    |  |
00000b60  20 20 7c 20 63 6c 6f 63  6b 20 72 75 6e 2d 69 6e  |  | clock run-in|
00000b70  20 20 20 20 20 20 20 20  20 20 20 20 20 20 7c 20  |              | |
00000b80  28 6e 6f 74 20 72 65 61  64 29 20 20 20 20 20 20  |(not read)      |
00000b90  20 7c 20 20 20 20 20 20  20 20 20 20 20 7c 0d 0a  | |           |..|
00000ba0  7c 20 20 33 20 20 20 20  7c 20 20 20 20 7c 20 66  ||  3    |    | f|
00000bb0  72 61 6d 69 6e 67 20 63  6f 64 65 20 20 20 20 20  |raming code     |
00000bc0  20 20 20 20 20 20 20 20  20 7c 20 28 6e 6f 74 20  |         | (not |
00000bd0  73 74 6f 72 65 64 29 20  20 20 20 20 7c 20 20 20  |stored)     |   |
00000be0  20 20 20 20 20 20 20 20  7c 0d 0a 7c 20 20 34 20  |        |..|  4 |
00000bf0  20 20 20 7c 20 68 63 20  7c 20 63 68 61 6e 6e 65  |   | hc | channe|
00000c00  6c 20 6e 75 6d 62 65 72  20 20 20 20 20 20 20 20  |l number        |
00000c10  20 20 20 20 7c 20 6d 61  67 61 7a 69 6e 65 20 20  |    | magazine  |
00000c20  20 20 20 20 20 20 20 7c  20 64 65 2d 68 61 6d 6d  |       | de-hamm|
00000c30  65 64 20 7c 0d 0a 7c 20  20 34 20 20 20 20 7c 20  |ed |..|  4    | |
00000c40  68 63 20 7c 20 62 69 74  20 30 20 6f 66 20 70 61  |hc | bit 0 of pa|
00000c50  63 6b 20 6e 6f 20 69 6e  20 62 69 74 20 33 20 7c  |ck no in bit 3 ||
00000c60  20 70 61 63 6b 65 74 20  62 69 74 20 30 20 20 20  | packet bit 0   |
00000c70  20 20 7c 20 64 65 2d 68  61 6d 6d 65 64 20 7c 0d  |  | de-hammed |.|
00000c80  0a 7c 20 20 35 20 20 20  20 7c 20 68 63 20 7c 20  |.|  5    | hc | |
00000c90  70 61 63 6b 65 74 20 6e  75 6d 62 65 72 20 62 69  |packet number bi|
00000ca0  74 73 20 31 2d 34 20 20  20 20 7c 20 70 61 63 6b  |ts 1-4    | pack|
00000cb0  65 74 20 62 69 74 73 20  31 2d 34 20 20 7c 20 64  |et bits 1-4  | d|
00000cc0  65 2d 68 61 6d 6d 65 64  20 7c 0d 0a 7c 20 20 36  |e-hammed |..|  6|
00000cd0  20 20 20 20 7c 20 68 63  20 7c 20 54 53 44 50 20  |    | hc | TSDP |
00000ce0  74 79 70 65 20 20 20 20  20 20 20 20 20 20 20 20  |type            |
00000cf0  20 20 20 20 20 7c 20 62  75 66 66 3f 30 20 20 20  |     | buff?0   |
00000d00  20 20 20 20 20 20 20 20  7c 20 64 65 2d 68 61 6d  |        | de-ham|
00000d10  6d 65 64 20 7c 0d 0a 7c  20 20 37 20 20 20 20 7c  |med |..|  7    ||
00000d20  20 68 63 20 7c 20 69 6e  69 74 69 61 6c 20 70 61  | hc | initial pa|
00000d30  67 65 2c 20 6c 6f 77 20  6e 79 62 62 6c 65 20 20  |ge, low nybble  |
00000d40  7c 20 62 75 66 66 3f 31  20 20 20 20 20 20 20 20  || buff?1        |
00000d50  20 20 20 7c 20 64 65 2d  68 61 6d 6d 65 64 20 7c  |   | de-hammed ||
00000d60  0d 0a 7c 20 20 38 20 20  20 20 7c 20 68 63 20 7c  |..|  8    | hc ||
00000d70  20 69 6e 69 74 69 61 6c  20 70 61 67 65 2c 20 68  | initial page, h|
00000d80  69 67 68 20 6e 79 62 62  6c 65 20 7c 20 62 75 66  |igh nybble | buf|
00000d90  66 3f 32 20 20 20 20 20  20 20 20 20 20 20 7c 20  |f?2           | |
00000da0  64 65 2d 68 61 6d 6d 65  64 20 7c 0d 0a 7c 20 20  |de-hammed |..|  |
00000db0  39 20 20 20 20 7c 20 68  63 20 7c 20 69 6e 69 74  |9    | hc | init|
00000dc0  20 73 75 62 70 61 67 65  2c 20 6c 6f 77 20 6e 79  | subpage, low ny|
00000dd0  62 62 6c 65 20 20 7c 20  62 75 66 66 3f 33 20 20  |bble  | buff?3  |
00000de0  20 20 20 20 20 20 20 20  20 7c 20 64 65 2d 68 61  |         | de-ha|
00000df0  6d 6d 65 64 20 7c 0d 0a  7c 20 31 30 20 20 20 20  |mmed |..| 10    |
00000e00  7c 20 68 63 20 7c 20 69  6e 69 74 20 73 75 62 70  || hc | init subp|
00000e10  20 6e 79 62 20 31 20 69  6e 20 62 69 74 20 30 2d  | nyb 1 in bit 0-|
00000e20  32 7c 20 62 75 66 66 3f  34 20 62 69 74 73 20 30  |2| buff?4 bits 0|
00000e30  2d 32 20 20 7c 20 64 65  2d 68 61 6d 6d 65 64 20  |-2  | de-hammed |
00000e40  7c 0d 0a 7c 20 31 30 20  20 20 20 7c 20 68 63 20  ||..| 10    | hc |
00000e50  7c 20 62 69 74 20 30 20  6f 66 20 69 6e 69 74 20  || bit 0 of init |
00000e60  6d 61 67 20 69 6e 20 62  69 74 20 33 7c 20 62 75  |mag in bit 3| bu|
00000e70  66 66 3f 34 20 62 69 74  20 33 20 20 20 20 20 7c  |ff?4 bit 3     ||
00000e80  20 64 65 2d 68 61 6d 6d  65 64 20 7c 0d 0a 7c 20  | de-hammed |..| |
00000e90  31 31 20 20 20 20 7c 20  68 63 20 7c 20 69 6e 69  |11    | hc | ini|
00000ea0  74 69 61 6c 20 73 75 62  70 61 67 65 2c 20 6e 79  |tial subpage, ny|
00000eb0  62 62 6c 65 20 32 20 7c  20 62 75 66 66 3f 35 20  |bble 2 | buff?5 |
00000ec0  20 20 20 20 20 20 20 20  20 20 7c 20 64 65 2d 68  |          | de-h|
00000ed0  61 6d 6d 65 64 20 7c 0d  0a 7c 20 31 32 20 20 20  |ammed |..| 12   |
00000ee0  20 7c 20 68 63 20 7c 20  69 6e 69 74 20 73 75 62  | | hc | init sub|
00000ef0  70 61 67 65 20 68 69 20  69 6e 20 62 69 74 20 30  |page hi in bit 0|
00000f00  2d 31 7c 20 62 75 66 66  3f 36 20 62 69 74 73 20  |-1| buff?6 bits |
00000f10  30 2d 31 20 20 7c 20 64  65 2d 68 61 6d 6d 65 64  |0-1  | de-hammed|
00000f20  20 7c 0d 0a 7c 20 31 32  20 20 20 20 7c 20 68 63  | |..| 12    | hc|
00000f30  20 7c 20 62 69 74 20 31  20 6f 66 20 69 6e 69 74  | | bit 1 of init|
00000f40  20 6d 61 67 20 69 6e 20  62 69 74 20 32 7c 20 62  | mag in bit 2| b|
00000f50  75 66 66 3f 36 20 62 69  74 20 32 20 20 20 20 20  |uff?6 bit 2     |
00000f60  7c 20 64 65 2d 68 61 6d  6d 65 64 20 7c 0d 0a 7c  || de-hammed |..||
00000f70  20 31 32 20 20 20 20 7c  20 68 63 20 7c 20 62 69  | 12    | hc | bi|
00000f80  74 20 32 20 6f 66 20 69  6e 69 74 20 6d 61 67 20  |t 2 of init mag |
00000f90  69 6e 20 62 69 74 20 33  7c 20 62 75 66 66 3f 36  |in bit 3| buff?6|
00000fa0  20 62 69 74 20 33 20 20  20 20 20 7c 20 64 65 2d  | bit 3     | de-|
00000fb0  68 61 6d 6d 65 64 20 7c  0d 0a 7c 20 31 33 2d 31  |hammed |..| 13-1|
00000fc0  36 20 7c 20 68 63 20 7c  20 6e 65 74 77 6f 72 6b  |6 | hc | network|
00000fd0  20 69 64 65 6e 74 69 66  69 63 61 74 69 6f 6e 20  | identification |
00000fe0  20 20 20 7c 20 62 75 66  66 3f 37 20 2d 20 62 75  |   | buff?7 - bu|
00000ff0  66 66 3f 31 30 20 7c 20  64 65 2d 68 61 6d 6d 65  |ff?10 | de-hamme|
00001000  64 20 7c 0d 0a 7c 20 31  37 2d 32 35 20 7c 20 68  |d |..| 17-25 | h|
00001010  63 20 7c 20 76 69 64 65  6f 20 70 72 6f 67 2e 20  |c | video prog. |
00001020  73 65 72 76 69 63 65 20  64 61 74 61 20 20 7c 20  |service data  | |
00001030  62 75 66 66 3f 31 31 20  2d 20 62 75 66 66 3f 31  |buff?11 - buff?1|
00001040  39 7c 20 64 65 2d 68 61  6d 6d 65 64 20 7c 0d 0a  |9| de-hammed |..|
00001050  7c 20 32 36 2d 34 35 20  7c 20 20 20 20 7c 20 73  || 26-45 |    | s|
00001060  74 61 74 75 73 20 64 69  73 70 6c 61 79 20 6d 65  |tatus display me|
00001070  73 73 61 67 65 20 20 20  20 7c 20 62 75 66 66 3f  |ssage    | buff?|
00001080  32 30 20 2d 20 62 75 66  66 3f 33 39 7c 20 20 20  |20 - buff?39|   |
00001090  20 20 20 20 20 20 20 20  7c 0d 0a 2b 2d 2d 2d 2d  |        |..+----|
000010a0  2d 2d 2d 2b 2d 2d 2d 2d  2b 2d 2d 2d 2d 2d 2d 2d  |---+----+-------|
000010b0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
000010c0  2d 2d 2d 2d 2b 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----+-----------|
000010d0  2d 2d 2d 2d 2d 2d 2d 2b  2d 2d 2d 2d 2d 2d 2d 2d  |-------+--------|
000010e0  2d 2d 2d 2b 0d 0a 0d 0a  46 69 67 75 72 65 20 31  |---+....Figure 1|
000010f0  2e 20 54 68 65 20 64 61  74 61 20 74 72 61 6e 73  |. The data trans|
00001100  6d 69 74 74 65 64 20 69  6e 20 74 68 65 20 42 42  |mitted in the BB|
00001110  43 20 74 79 70 65 20 32  20 54 53 44 50 0d 0a 2d  |C type 2 TSDP..-|
00001120  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001150  2d 2d 2d 2d 0d 0a 0d 0a  0d 0a 54 68 65 72 65 20  |----......There |
00001160  61 72 65 20 6e 6f 20 70  6c 61 6e 73 20 74 6f 20  |are no plans to |
00001170  69 6d 70 6c 65 6d 65 6e  74 20 74 68 65 20 56 50  |implement the VP|
00001180  53 20 73 65 72 76 69 63  65 20 61 74 20 74 68 65  |S service at the|
00001190  20 6d 6f 6d 65 6e 74 2c  20 6e 6f 72 20 68 61 73  | moment, nor has|
000011a0  20 69 74 0d 0a 62 65 65  6e 20 64 65 63 69 64 65  | it..been decide|
000011b0  64 20 69 66 20 74 68 65  20 74 79 70 65 20 32 20  |d if the type 2 |
000011c0  66 6f 72 6d 61 74 20 69  73 20 74 68 65 20 62 65  |format is the be|
000011d0  73 74 20 6f 6e 65 20 74  6f 20 75 73 65 2e 20 54  |st one to use. T|
000011e0  68 65 20 63 75 72 72 65  6e 74 0d 0a 73 70 65 63  |he current..spec|
000011f0  69 66 69 63 61 74 69 6f  6e 20 66 6f 72 20 74 68  |ification for th|
00001200  65 20 56 50 53 20 64 61  74 61 20 69 73 20 73 68  |e VPS data is sh|
00001210  6f 77 6e 20 69 6e 20 66  69 67 75 72 65 20 32 2e  |own in figure 2.|
00001220  20 54 68 65 20 62 69 74  73 20 69 6e 20 66 69 67  | The bits in fig|
00001230  75 72 65 20 32 0d 0a 61  72 65 20 74 61 6b 65 6e  |ure 2..are taken|
00001240  20 66 72 6f 6d 20 74 68  65 20 64 65 2d 68 61 6d  | from the de-ham|
00001250  6d 65 64 20 62 79 74 65  73 20 31 37 20 74 6f 20  |med bytes 17 to |
00001260  32 35 20 6f 66 20 74 68  65 20 74 79 70 65 20 32  |25 of the type 2|
00001270  20 54 53 44 50 2e 0d 0a  0d 0a 0d 0a 2b 2d 2d 2d  | TSDP.......+---|
00001280  2d 2d 2d 2d 2d 2d 2b 2d  2d 2d 2d 2d 2d 2d 2d 2d  |------+---------|
00001290  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000012b0  2d 2d 2d 2d 2d 2b 0d 0a  7c 20 62 69 74 73 20 20  |-----+..| bits  |
000012c0  20 20 7c 20 69 6e 74 65  72 70 72 65 74 61 74 69  |  | interpretati|
000012d0  6f 6e 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |on              |
000012e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000012f0  20 7c 0d 0a 2b 2d 2d 2d  2d 2d 2d 2d 2d 2d 2b 2d  | |..+---------+-|
00001300  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001320  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2b 0d 0a  |-------------+..|
00001330  7c 20 31 20 2d 20 32 20  20 20 7c 20 31 30 20 3d  || 1 - 2   | 10 =|
00001340  20 6d 6f 6e 6f 2c 20 30  31 20 3d 20 73 74 65 72  | mono, 01 = ster|
00001350  65 6f 2c 20 65 6c 73 65  20 32 20 63 68 61 6e 6e  |eo, else 2 chann|
00001360  65 6c 20 73 6f 75 6e 64  20 7c 0d 0a 7c 20 33 20  |el sound |..| 3 |
00001370  2d 20 34 20 20 20 7c 20  31 30 20 3d 20 75 6e 72  |- 4   | 10 = unr|
00001380  61 74 65 64 2c 20 65 6c  73 65 20 72 65 73 74 72  |ated, else restr|
00001390  69 63 74 65 64 20 61 75  64 69 65 6e 63 65 20 20  |icted audience  |
000013a0  20 20 20 20 20 7c 0d 0a  7c 20 35 20 2d 20 36 20  |     |..| 5 - 6 |
000013b0  20 20 7c 20 31 31 20 6f  72 20 30 31 20 3d 20 76  |  | 11 or 01 = v|
000013c0  61 6c 69 64 20 64 61 74  61 2c 20 65 6c 73 65 20  |alid data, else |
000013d0  69 6e 76 61 6c 69 64 20  64 61 74 61 20 20 20 20  |invalid data    |
000013e0  20 7c 0d 0a 7c 20 37 20  2d 20 31 31 20 20 7c 20  | |..| 7 - 11  | |
000013f0  73 63 68 65 64 75 6c 65  64 20 70 72 6f 67 72 61  |scheduled progra|
00001400  6d 6d 65 20 64 61 74 65  2c 20 64 61 79 20 20 20  |mme date, day   |
00001410  20 20 20 20 20 20 20 20  20 20 20 20 20 7c 0d 0a  |             |..|
00001420  7c 20 31 32 20 2d 20 31  35 20 7c 20 73 63 68 65  || 12 - 15 | sche|
00001430  64 75 6c 65 64 20 70 72  6f 67 72 61 6d 6d 65 20  |duled programme |
00001440  64 61 74 65 2c 20 6d 6f  6e 74 68 20 20 20 20 20  |date, month     |
00001450  20 20 20 20 20 20 20 20  20 7c 0d 0a 7c 20 31 36  |         |..| 16|
00001460  20 2d 20 32 30 20 7c 20  73 63 68 65 64 75 6c 65  | - 20 | schedule|
00001470  64 20 70 72 6f 67 72 61  6d 6d 65 20 74 69 6d 65  |d programme time|
00001480  2c 20 68 6f 75 72 73 20  20 20 20 20 20 20 20 20  |, hours         |
00001490  20 20 20 20 20 7c 0d 0a  7c 20 32 31 20 2d 20 32  |     |..| 21 - 2|
000014a0  36 20 7c 20 73 63 68 65  64 75 6c 65 64 20 70 72  |6 | scheduled pr|
000014b0  6f 67 72 61 6d 6d 65 20  74 69 6d 65 2c 20 6d 69  |ogramme time, mi|
000014c0  6e 75 74 65 73 20 20 20  20 20 20 20 20 20 20 20  |nutes           |
000014d0  20 7c 0d 0a 7c 20 32 37  20 2d 20 33 30 20 7c 20  | |..| 27 - 30 | |
000014e0  63 6f 75 6e 74 72 79 20  6f 66 20 6f 72 69 67 69  |country of origi|
000014f0  6e 2c 20 31 32 20 3d 20  55 4b 20 20 20 20 20 20  |n, 12 = UK      |
00001500  20 20 20 20 20 20 20 20  20 20 20 20 20 7c 0d 0a  |             |..|
00001510  7c 20 33 31 20 2d 20 33  36 20 7c 20 70 72 6f 67  || 31 - 36 | prog|
00001520  72 61 6d 6d 65 20 73 6f  75 72 63 65 20 20 20 20  |ramme source    |
00001530  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001540  20 20 20 20 20 20 20 20  20 7c 0d 0a 2b 2d 2d 2d  |         |..+---|
00001550  2d 2d 2d 2d 2d 2d 2b 2d  2d 2d 2d 2d 2d 2d 2d 2d  |------+---------|
00001560  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001580  2d 2d 2d 2d 2d 2b 0d 0a  0d 0a 46 69 67 75 72 65  |-----+....Figure|
00001590  20 32 2e 20 56 69 64 65  6f 20 70 72 6f 67 72 61  | 2. Video progra|
000015a0  6d 6d 65 20 73 65 72 76  69 63 65 20 64 61 74 61  |mme service data|
000015b0  20 28 33 36 20 62 69 74  73 20 69 6e 20 62 79 74  | (36 bits in byt|
000015c0  65 73 20 31 37 20 74 6f  20 32 35 29 0d 0a 2d 2d  |es 17 to 25)..--|
000015d0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001610  0d 0a 0d 0a 0d 0a 55 6e  6c 69 6b 65 20 74 68 65  |......Unlike the|
00001620  20 74 79 70 65 20 30 20  54 53 44 50 2c 20 74 68  | type 0 TSDP, th|
00001630  65 20 64 61 74 61 20 62  69 74 73 20 69 6e 20 74  |e data bits in t|
00001640  68 65 20 56 50 53 20 64  61 74 61 20 61 72 65 20  |he VPS data are |
00001650  74 72 61 6e 73 6d 69 74  74 65 64 20 6d 6f 73 74  |transmitted most|
00001660  0d 0a 73 69 67 6e 69 66  69 63 61 6e 74 20 62 69  |..significant bi|
00001670  74 20 66 69 72 73 74 2e  20 4e 69 6e 65 20 67 72  |t first. Nine gr|
00001680  6f 75 70 73 20 6f 66 20  34 20 64 61 74 61 20 62  |oups of 4 data b|
00001690  69 74 73 20 61 72 65 20  61 73 73 65 6d 62 6c 65  |its are assemble|
000016a0  64 20 77 69 74 68 0d 0a  68 61 6d 6d 69 6e 67 20  |d with..hamming |
000016b0  70 72 6f 74 65 63 74 69  6f 6e 20 69 6e 74 6f 20  |protection into |
000016c0  62 79 74 65 73 20 31 37  20 74 6f 20 32 35 2e 20  |bytes 17 to 25. |
000016d0  54 68 65 73 65 20 62 69  74 73 20 63 61 6e 20 62  |These bits can b|
000016e0  65 20 69 6e 74 65 72 70  72 65 74 65 64 20 61 73  |e interpreted as|
000016f0  0d 0a 73 68 6f 77 6e 20  69 6e 20 66 69 67 75 72  |..shown in figur|
00001700  65 20 33 2e 0d 0a 0d 0a  0d 0a 42 79 74 65 20 6e  |e 3.......Byte n|
00001710  6f 20 20 20 20 20 31 37  20 20 20 20 20 31 38 20  |o     17     18 |
00001720  20 20 20 20 31 39 20 20  20 20 20 32 30 20 20 20  |    19     20   |
00001730  20 20 32 31 20 20 20 20  20 32 32 20 20 20 20 20  |  21     22     |
00001740  32 33 20 20 20 20 20 32  34 20 20 20 20 20 32 35  |23     24     25|
00001750  0d 0a 44 61 74 61 20 62  79 74 65 20 20 20 37 33  |..Data byte   73|
00001760  20 20 20 20 20 45 41 20  20 20 20 20 37 33 20 20  |     EA     73  |
00001770  20 20 20 34 39 20 20 20  20 20 35 45 20 20 20 20  |   49     5E    |
00001780  20 46 44 20 20 20 20 20  42 36 20 20 20 20 20 41  | FD     B6     A|
00001790  31 20 20 20 20 20 45 41  0d 0a 44 65 48 61 6d 27  |1     EA..DeHam'|
000017a0  64 20 20 20 20 20 20 35  20 20 20 20 20 20 46 20  |d      5      F |
000017b0  20 20 20 20 20 35 20 20  20 20 20 20 32 20 20 20  |     5      2   |
000017c0  20 20 20 33 20 20 20 20  20 20 45 20 20 20 20 20  |   3      E     |
000017d0  20 44 20 20 20 20 20 20  43 20 20 20 20 20 20 46  | D      C      F|
000017e0  0d 0a 72 65 76 65 72 73  65 64 20 20 20 31 30 31  |..reversed   101|
000017f0  30 20 20 20 31 31 31 31  20 20 20 31 30 31 30 20  |0   1111   1010 |
00001800  20 20 30 31 30 30 20 20  20 31 31 30 30 20 20 20  |  0100   1100   |
00001810  30 31 31 31 20 20 20 31  30 31 31 20 20 20 30 30  |0111   1011   00|
00001820  31 31 20 20 20 31 31 31  31 0d 0a 20 20 20 20 20  |11   1111..     |
00001830  20 20 20 20 20 20 2f 20  2f 20 20 20 20 2f 20 5c  |      / /    / \|
00001840  20 20 20 20 20 20 2f 5c  20 20 20 20 20 2f 5c 20  |      /\     /\ |
00001850  20 20 20 20 20 2f 20 20  20 5c 20 20 20 20 20 20  |     /   \      |
00001860  20 2f 5c 20 20 20 20 20  2f 5c 20 20 20 20 20 20  | /\     /\      |
00001870  20 2f 0d 0a 20 6d 6f 6e  6f 20 73 6f 75 6e 64 20  | /.. mono sound |
00001880  2f 20 76 61 6c 69 64 20  20 5c 2d 2d 2d 2d 2f 20  |/ valid  \----/ |
00001890  20 5c 2d 2d 2d 2f 20 20  5c 2d 2d 2d 2d 2f 20 20  | \---/  \----/  |
000018a0  20 20 20 5c 2d 2d 2d 2d  2d 2f 20 20 5c 2d 2d 2d  |   \-----/  \---|
000018b0  2f 20 20 5c 2d 2d 2d 2d  2d 2f 0d 0a 20 20 20 20  |/  \-----/..    |
000018c0  75 6e 72 61 74 65 64 2f  20 20 64 61 74 61 20 20  |unrated/  data  |
000018d0  20 20 64 61 79 20 20 20  20 6d 6f 6e 74 68 20 20  |  day    month  |
000018e0  20 68 6f 75 72 73 20 20  20 20 20 6d 69 6e 75 74  | hours     minut|
000018f0  65 73 20 63 6f 75 6e 74  72 79 20 20 73 6f 75 72  |es country  sour|
00001900  63 65 0d 0a 20 20 20 20  20 20 20 20 20 20 20 20  |ce..            |
00001910  20 20 20 20 20 20 20 20  20 20 20 32 39 20 20 20  |           29   |
00001920  20 20 20 32 20 20 20 20  20 20 31 32 20 20 20 20  |   2      12    |
00001930  20 20 20 20 20 33 30 20  20 20 20 20 31 32 3d 55  |     30     12=U|
00001940  4b 20 20 20 20 20 36 33  0d 0a 0d 0a 46 69 67 75  |K     63....Figu|
00001950  72 65 20 33 2e 20 54 68  65 20 56 50 53 20 74 72  |re 3. The VPS tr|
00001960  61 6e 73 6d 69 74 74 65  64 20 77 69 74 68 20 61  |ansmitted with a|
00001970  20 64 75 6d 6d 79 20 64  61 74 65 20 6f 66 20 32  | dummy date of 2|
00001980  39 74 68 2e 20 6f 66 20  46 65 62 72 75 61 72 79  |9th. of February|
00001990  0d 0a 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |..--------------|
000019a0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000019d0  2d 2d 2d 2d 2d 2d 0d 0a  0d 0a 0d 0a 43 68 61 69  |------......Chai|
000019e0  6e 20 74 68 65 20 70 72  6f 67 72 61 6d 20 54 53  |n the program TS|
000019f0  44 50 32 20 61 6e 64 20  73 65 6c 65 63 74 20 6f  |DP2 and select o|
00001a00  6e 65 20 6f 66 20 74 68  65 20 66 6f 75 72 20 63  |ne of the four c|
00001a10  68 61 6e 6e 65 6c 73 20  77 68 65 6e 20 70 72 6f  |hannels when pro|
00001a20  6d 70 74 65 64 2e 0d 0a  59 6f 75 20 63 61 6e 20  |mpted...You can |
00001a30  68 61 6c 74 20 74 68 65  20 70 72 6f 67 72 61 6d  |halt the program|
00001a40  20 61 74 20 61 6e 79 20  74 69 6d 65 20 62 79 20  | at any time by |
00001a50  70 72 65 73 73 69 6e 67  20 74 68 65 20 45 73 63  |pressing the Esc|
00001a60  61 70 65 20 6b 65 79 2e  20 42 42 43 20 31 20 61  |ape key. BBC 1 a|
00001a70  6e 64 0d 0a 42 42 43 20  32 20 62 6f 74 68 20 62  |nd..BBC 2 both b|
00001a80  72 6f 61 64 63 61 73 74  20 74 79 70 65 20 30 20  |roadcast type 0 |
00001a90  61 6e 64 20 74 79 70 65  20 32 20 42 42 43 20 66  |and type 2 BBC f|
00001aa0  6f 72 6d 61 74 20 54 53  44 50 73 2c 20 62 75 74  |ormat TSDPs, but|
00001ab0  20 74 68 65 20 49 54 56  0d 0a 6e 65 74 77 6f 72  | the ITV..networ|
00001ac0  6b 20 73 74 61 74 69 6f  6e 73 20 6f 6e 6c 79 20  |k stations only |
00001ad0  62 72 6f 61 64 63 61 73  74 20 74 79 70 65 20 30  |broadcast type 0|
00001ae0  2e 0d 0a 0d 0a 0d 0a 20  20 20 31 30 20 52 45 4d  |.......   10 REM|
00001af0  3e 20 54 53 44 50 32 0d  0a 20 20 20 32 30 20 4d  |> TSDP2..   20 M|
00001b00  4f 44 45 37 0d 0a 20 20  20 33 30 20 56 44 55 32  |ODE7..   30 VDU2|
00001b10  33 2c 31 2c 30 3b 30 3b  30 3b 30 3b 0d 0a 20 20  |3,1,0;0;0;0;..  |
00001b20  20 34 30 20 44 49 4d 20  6d 63 6f 64 65 20 26 35  | 40 DIM mcode &5|
00001b30  30 30 20 3a 52 45 4d 3a  20 73 70 61 63 65 20 66  |00 :REM: space f|
00001b40  6f 72 20 6d 61 63 68 69  6e 65 20 63 6f 64 65 0d  |or machine code.|
00001b50  0a 20 20 20 35 30 20 44  49 4d 20 62 75 66 66 20  |.   50 DIM buff |
00001b60  34 30 20 3a 52 45 4d 3a  20 54 53 44 50 20 62 75  |40 :REM: TSDP bu|
00001b70  66 66 65 72 0d 0a 20 20  20 36 30 20 50 52 4f 43  |ffer..   60 PROC|
00001b80  6d 63 6f 64 65 20 3a 52  45 4d 3a 20 61 73 73 65  |mcode :REM: asse|
00001b90  6d 62 6c 65 20 6d 61 63  68 69 6e 65 20 63 6f 64  |mble machine cod|
00001ba0  65 0d 0a 20 20 20 37 30  20 74 74 78 24 3d 43 48  |e..   70 ttx$=CH|
00001bb0  52 24 28 31 34 31 29 2b  43 48 52 24 28 31 33 32  |R$(141)+CHR$(132|
00001bc0  29 2b 43 48 52 24 28 31  35 37 29 2b 43 48 52 24  |)+CHR$(157)+CHR$|
00001bd0  28 31 33 31 29 0d 0a 20  20 20 20 20 20 2b 22 54  |(131)..      +"T|
00001be0  65 6c 65 76 69 73 69 6f  6e 20 53 65 72 76 69 63  |elevision Servic|
00001bf0  65 20 44 61 74 61 20 50  61 63 6b 65 74 20 32 20  |e Data Packet 2 |
00001c00  20 22 2b 43 48 52 24 28  31 35 36 29 0d 0a 20 20  | "+CHR$(156)..  |
00001c10  20 38 30 20 50 52 49 4e  54 54 41 42 28 30 2c 31  | 80 PRINTTAB(0,1|
00001c20  29 74 74 78 24 0d 0a 20  20 20 39 30 20 50 52 49  |)ttx$..   90 PRI|
00001c30  4e 54 54 41 42 28 30 2c  32 29 74 74 78 24 0d 0a  |NTTAB(0,2)ttx$..|
00001c40  20 20 31 30 30 20 49 4e  50 55 54 54 41 42 28 31  |  100 INPUTTAB(1|
00001c50  30 2c 34 29 22 54 56 20  63 68 61 6e 6e 65 6c 20  |0,4)"TV channel |
00001c60  28 31 2d 34 29 20 3d 20  22 61 6e 73 77 65 72 24  |(1-4) = "answer$|
00001c70  0d 0a 20 20 31 31 30 20  63 68 61 6e 6e 65 6c 3f  |..  110 channel?|
00001c80  30 3d 45 56 41 4c 28 22  26 22 2b 4c 45 46 54 24  |0=EVAL("&"+LEFT$|
00001c90  28 61 6e 73 77 65 72 24  2c 31 29 29 2b 26 31 42  |(answer$,1))+&1B|
00001ca0  0d 0a 20 20 31 32 30 20  49 46 20 63 68 61 6e 6e  |..  120 IF chann|
00001cb0  65 6c 3f 30 20 3c 20 26  31 43 20 54 48 45 4e 20  |el?0 < &1C THEN |
00001cc0  63 68 61 6e 6e 65 6c 3f  30 20 3d 20 26 31 43 0d  |channel?0 = &1C.|
00001cd0  0a 20 20 31 33 30 20 49  46 20 63 68 61 6e 6e 65  |.  130 IF channe|
00001ce0  6c 3f 30 20 3e 20 26 31  46 20 54 48 45 4e 20 63  |l?0 > &1F THEN c|
00001cf0  68 61 6e 6e 65 6c 3f 30  20 3d 20 26 31 46 0d 0a  |hannel?0 = &1F..|
00001d00  20 20 31 34 30 20 50 52  49 4e 54 54 41 42 28 35  |  140 PRINTTAB(5|
00001d10  2c 37 29 22 54 53 44 50  20 74 79 70 65 20 3d 22  |,7)"TSDP type ="|
00001d20  0d 0a 20 20 31 35 30 20  50 52 49 4e 54 54 41 42  |..  150 PRINTTAB|
00001d30  28 35 2c 38 29 22 49 6e  69 74 69 61 6c 20 70 61  |(5,8)"Initial pa|
00001d40  67 65 20 3d 22 0d 0a 20  20 31 36 30 20 50 52 49  |ge ="..  160 PRI|
00001d50  4e 54 54 41 42 28 35 2c  39 29 22 4e 65 74 77 6f  |NTTAB(5,9)"Netwo|
00001d60  72 6b 20 49 44 20 63 6f  64 65 20 3d 22 0d 0a 20  |rk ID code =".. |
00001d70  20 31 37 30 20 50 52 49  4e 54 54 41 42 28 35 2c  | 170 PRINTTAB(5,|
00001d80  31 30 29 22 53 6f 75 6e  64 20 3d 22 0d 0a 20 20  |10)"Sound ="..  |
00001d90  31 38 30 20 50 52 49 4e  54 54 41 42 28 35 2c 31  |180 PRINTTAB(5,1|
00001da0  31 29 22 52 61 74 69 6e  67 20 3d 22 0d 0a 20 20  |1)"Rating ="..  |
00001db0  31 39 30 20 50 52 49 4e  54 54 41 42 28 35 2c 31  |190 PRINTTAB(5,1|
00001dc0  32 29 22 44 61 74 61 20  3d 22 0d 0a 20 20 32 30  |2)"Data ="..  20|
00001dd0  30 20 50 52 49 4e 54 54  41 42 28 35 2c 31 33 29  |0 PRINTTAB(5,13)|
00001de0  22 44 61 79 20 3d 22 0d  0a 20 20 32 31 30 20 50  |"Day ="..  210 P|
00001df0  52 49 4e 54 54 41 42 28  35 2c 31 34 29 22 4d 6f  |RINTTAB(5,14)"Mo|
00001e00  6e 74 68 20 3d 22 0d 0a  20 20 32 32 30 20 50 52  |nth ="..  220 PR|
00001e10  49 4e 54 54 41 42 28 35  2c 31 35 29 22 48 6f 75  |INTTAB(5,15)"Hou|
00001e20  72 73 20 3d 22 0d 0a 20  20 32 33 30 20 50 52 49  |rs ="..  230 PRI|
00001e30  4e 54 54 41 42 28 35 2c  31 36 29 22 4d 69 6e 75  |NTTAB(5,16)"Minu|
00001e40  74 65 73 20 3d 22 0d 0a  20 20 32 34 30 20 50 52  |tes ="..  240 PR|
00001e50  49 4e 54 54 41 42 28 35  2c 31 37 29 22 43 6f 75  |INTTAB(5,17)"Cou|
00001e60  6e 74 72 79 20 3d 22 0d  0a 20 20 32 35 30 20 50  |ntry ="..  250 P|
00001e70  52 49 4e 54 54 41 42 28  35 2c 31 38 29 22 53 6f  |RINTTAB(5,18)"So|
00001e80  75 72 63 65 20 3d 22 0d  0a 20 20 32 36 30 20 50  |urce ="..  260 P|
00001e90  52 49 4e 54 54 41 42 28  35 2c 31 39 29 22 4d 65  |RINTTAB(5,19)"Me|
00001ea0  73 73 61 67 65 20 3d 22  0d 0a 20 20 32 37 30 20  |ssage ="..  270 |
00001eb0  43 41 4c 4c 20 6d 63 6f  64 65 20 3a 52 45 4d 3a  |CALL mcode :REM:|
00001ec0  20 65 6e 61 62 6c 65 20  54 54 58 20 69 6e 74 65  | enable TTX inte|
00001ed0  72 72 75 70 74 73 0d 0a  20 20 32 38 30 20 4f 4e  |rrupts..  280 ON|
00001ee0  45 52 52 4f 52 20 47 4f  54 4f 20 33 32 30 0d 0a  |ERROR GOTO 320..|
00001ef0  20 20 32 39 30 20 52 45  50 45 41 54 0d 0a 20 20  |  290 REPEAT..  |
00001f00  33 30 30 20 49 46 20 67  72 61 62 66 6c 61 67 3f  |300 IF grabflag?|
00001f10  30 3d 32 20 50 52 4f 43  64 69 73 70 6c 61 79 0d  |0=2 PROCdisplay.|
00001f20  0a 20 20 33 31 30 20 55  4e 54 49 4c 20 46 41 4c  |.  310 UNTIL FAL|
00001f30  53 45 0d 0a 20 20 33 32  30 20 43 41 4c 4c 20 6d  |SE..  320 CALL m|
00001f40  63 6f 64 65 20 3a 52 45  4d 3a 20 64 69 73 61 62  |code :REM: disab|
00001f50  6c 65 20 54 54 58 20 69  6e 74 65 72 72 75 70 74  |le TTX interrupt|
00001f60  73 0d 0a 20 20 33 33 30  20 56 44 55 33 31 2c 30  |s..  330 VDU31,0|
00001f70  2c 32 31 2c 32 33 2c 31  2c 31 3b 30 3b 30 3b 30  |,21,23,1,1;0;0;0|
00001f80  3b 0d 0a 20 20 33 34 30  20 45 4e 44 0d 0a 20 20  |;..  340 END..  |
00001f90  33 35 30 20 44 45 46 50  52 4f 43 64 69 73 70 6c  |350 DEFPROCdispl|
00001fa0  61 79 0d 0a 20 20 33 36  30 20 50 52 49 4e 54 54  |ay..  360 PRINTT|
00001fb0  41 42 28 31 37 2c 37 29  3b 62 75 66 66 3f 30 20  |AB(17,7);buff?0 |
00001fc0  3a 52 45 4d 3a 20 54 53  44 50 20 74 79 70 65 0d  |:REM: TSDP type.|
00001fd0  0a 20 20 33 37 30 20 62  30 3d 28 28 62 75 66 66  |.  370 b0=((buff|
00001fe0  3f 34 29 41 4e 44 38 29  3c 3e 30 3a 52 45 4d 3a  |?4)AND8)<>0:REM:|
00001ff0  20 62 69 74 20 30 20 6f  66 20 6d 61 67 61 7a 69  | bit 0 of magazi|
00002000  6e 65 20 6e 75 6d 62 65  72 0d 0a 20 20 33 38 30  |ne number..  380|
00002010  20 62 31 3d 28 28 62 75  66 66 3f 36 29 41 4e 44  | b1=((buff?6)AND|
00002020  34 29 3c 3e 30 3a 52 45  4d 3a 20 62 69 74 20 31  |4)<>0:REM: bit 1|
00002030  20 6f 66 20 6d 61 67 61  7a 69 6e 65 20 6e 75 6d  | of magazine num|
00002040  62 65 72 0d 0a 20 20 33  39 30 20 62 32 3d 28 28  |ber..  390 b2=((|
00002050  62 75 66 66 3f 36 29 41  4e 44 38 29 3c 3e 30 3a  |buff?6)AND8)<>0:|
00002060  52 45 4d 3a 20 62 69 74  20 32 20 6f 66 20 6d 61  |REM: bit 2 of ma|
00002070  67 61 7a 69 6e 65 20 6e  75 6d 62 65 72 0d 0a 20  |gazine number.. |
00002080  20 34 30 30 20 69 6e 69  74 3d 30 3a 52 45 4d 3a  | 400 init=0:REM:|
00002090  20 69 6e 69 74 69 61 6c  20 6d 61 67 61 7a 69 6e  | initial magazin|
000020a0  65 20 6e 75 6d 62 65 72  0d 0a 20 20 34 31 30 20  |e number..  410 |
000020b0  49 46 20 62 30 20 69 6e  69 74 3d 31 0d 0a 20 20  |IF b0 init=1..  |
000020c0  34 32 30 20 49 46 20 62  31 20 69 6e 69 74 3d 69  |420 IF b1 init=i|
000020d0  6e 69 74 2b 32 0d 0a 20  20 34 33 30 20 49 46 20  |nit+2..  430 IF |
000020e0  62 32 20 69 6e 69 74 3d  69 6e 69 74 2b 34 0d 0a  |b2 init=init+4..|
000020f0  20 20 34 34 30 20 50 52  49 4e 54 54 41 42 28 32  |  440 PRINTTAB(2|
00002100  30 2c 38 29 3b 7e 69 6e  69 74 3b 3a 52 45 4d 3a  |0,8);~init;:REM:|
00002110  20 69 6e 69 74 69 61 6c  20 6d 61 67 61 7a 69 6e  | initial magazin|
00002120  65 0d 0a 20 20 34 35 30  20 50 52 49 4e 54 3b 7e  |e..  450 PRINT;~|
00002130  62 75 66 66 3f 32 3b 7e  62 75 66 66 3f 31 3b 3a  |buff?2;~buff?1;:|
00002140  52 45 4d 3a 20 69 6e 69  74 69 61 6c 20 70 61 67  |REM: initial pag|
00002150  65 0d 0a 20 20 34 36 30  20 50 52 49 4e 54 3b 22  |e..  460 PRINT;"|
00002160  20 22 3b 7e 28 28 62 75  66 66 3f 36 29 41 4e 44  | ";~((buff?6)AND|
00002170  33 29 3b 7e 62 75 66 66  3f 35 3b 7e 28 28 62 75  |3);~buff?5;~((bu|
00002180  66 66 3f 34 29 41 4e 44  37 29 3b 7e 62 75 66 66  |ff?4)AND7);~buff|
00002190  3f 33 0d 0a 20 20 20 20  20 20 3a 52 45 4d 3a 20  |?3..      :REM: |
000021a0  69 6e 69 74 69 61 6c 20  73 75 62 2d 70 61 67 65  |initial sub-page|
000021b0  0d 0a 20 20 34 37 30 20  50 52 49 4e 54 54 41 42  |..  470 PRINTTAB|
000021c0  28 32 33 2c 39 29 3b 7e  62 75 66 66 3f 37 3b 7e  |(23,9);~buff?7;~|
000021d0  62 75 66 66 3f 38 3b 7e  62 75 66 66 3f 39 3b 7e  |buff?8;~buff?9;~|
000021e0  62 75 66 66 3f 31 30 0d  0a 20 20 20 20 20 20 3a  |buff?10..      :|
000021f0  52 45 4d 3a 20 4e 65 74  77 6f 72 6b 20 49 44 20  |REM: Network ID |
00002200  63 6f 64 65 0d 0a 20 20  34 38 30 20 43 41 4c 4c  |code..  480 CALL|
00002210  20 72 65 76 65 72 73 65  20 3a 52 45 4d 3a 20 72  | reverse :REM: r|
00002220  65 76 65 72 73 65 20 62  69 74 73 20 69 6e 20 56  |everse bits in V|
00002230  50 53 0d 0a 20 20 34 39  30 20 73 6f 75 6e 64 3d  |PS..  490 sound=|
00002240  28 28 76 70 73 3f 30 29  41 4e 44 31 39 32 29 44  |((vps?0)AND192)D|
00002250  49 56 36 34 0d 0a 20 20  35 30 30 20 49 46 20 73  |IV64..  500 IF s|
00002260  6f 75 6e 64 3d 30 20 4f  52 20 73 6f 75 6e 64 3d  |ound=0 OR sound=|
00002270  33 20 50 52 49 4e 54 54  41 42 28 31 33 2c 31 30  |3 PRINTTAB(13,10|
00002280  29 22 74 77 6f 20 63 68  61 6e 6e 65 6c 20 73 6f  |)"two channel so|
00002290  75 6e 64 22 0d 0a 20 20  35 31 30 20 49 46 20 73  |und"..  510 IF s|
000022a0  6f 75 6e 64 3d 31 20 50  52 49 4e 54 54 41 42 28  |ound=1 PRINTTAB(|
000022b0  31 33 2c 31 30 29 22 73  74 65 72 65 6f 22 0d 0a  |13,10)"stereo"..|
000022c0  20 20 35 32 30 20 49 46  20 73 6f 75 6e 64 3d 32  |  520 IF sound=2|
000022d0  20 50 52 49 4e 54 54 41  42 28 31 33 2c 31 30 29  | PRINTTAB(13,10)|
000022e0  22 6d 6f 6e 6f 22 0d 0a  20 20 35 33 30 20 72 61  |"mono"..  530 ra|
000022f0  74 65 3d 28 28 76 70 73  3f 30 29 41 4e 44 34 38  |te=((vps?0)AND48|
00002300  29 44 49 56 31 36 0d 0a  20 20 35 34 30 20 49 46  |)DIV16..  540 IF|
00002310  20 72 61 74 65 3d 32 20  50 52 49 4e 54 54 41 42  | rate=2 PRINTTAB|
00002320  28 31 34 2c 31 31 29 22  75 6e 72 61 74 65 64 22  |(14,11)"unrated"|
00002330  0d 0a 20 20 20 20 20 20  45 4c 53 45 20 50 52 49  |..      ELSE PRI|
00002340  4e 54 54 41 42 28 31 34  2c 31 31 29 22 72 65 73  |NTTAB(14,11)"res|
00002350  74 72 69 63 74 65 64 22  20 3a 52 45 4d 3a 20 70  |tricted" :REM: p|
00002360  72 6f 67 72 61 6d 6d 65  20 72 61 74 69 6e 67 0d  |rogramme rating.|
00002370  0a 20 20 35 35 30 20 76  61 6c 69 64 3d 28 28 76  |.  550 valid=((v|
00002380  70 73 3f 30 29 41 4e 44  31 32 29 44 49 56 34 20  |ps?0)AND12)DIV4 |
00002390  3a 52 45 4d 3a 20 64 61  74 61 20 76 61 6c 69 64  |:REM: data valid|
000023a0  69 74 79 0d 0a 20 20 35  36 30 20 49 46 20 76 61  |ity..  560 IF va|
000023b0  6c 69 64 3e 31 20 50 52  49 4e 54 54 41 42 28 31  |lid>1 PRINTTAB(1|
000023c0  32 2c 31 32 29 22 76 61  6c 69 64 22 0d 0a 20 20  |2,12)"valid"..  |
000023d0  20 20 20 20 45 4c 53 45  20 50 52 49 4e 54 54 41  |    ELSE PRINTTA|
000023e0  42 28 31 32 2c 31 32 29  22 69 6e 76 61 6c 69 64  |B(12,12)"invalid|
000023f0  22 3a 47 4f 54 4f 20 36  35 30 0d 0a 20 20 35 37  |":GOTO 650..  57|
00002400  30 20 50 52 49 4e 54 54  41 42 28 31 31 2c 31 33  |0 PRINTTAB(11,13|
00002410  29 3b 28 28 28 76 70 73  3f 30 29 41 4e 44 33 29  |);(((vps?0)AND3)|
00002420  2a 38 29 2b 28 28 28 76  70 73 3f 31 29 41 4e 44  |*8)+(((vps?1)AND|
00002430  32 32 34 29 44 49 56 33  32 29 0d 0a 20 20 20 20  |224)DIV32)..    |
00002440  20 20 3a 52 45 4d 3a 20  64 61 79 0d 0a 20 20 35  |  :REM: day..  5|
00002450  38 30 20 50 52 49 4e 54  54 41 42 28 31 33 2c 31  |80 PRINTTAB(13,1|
00002460  34 29 3b 28 28 76 70 73  3f 31 29 41 4e 44 33 30  |4);((vps?1)AND30|
00002470  29 44 49 56 32 20 3a 52  45 4d 3a 20 6d 6f 6e 74  |)DIV2 :REM: mont|
00002480  68 0d 0a 20 20 35 39 30  20 50 52 49 4e 54 54 41  |h..  590 PRINTTA|
00002490  42 28 31 33 2c 31 35 29  3b 28 28 28 76 70 73 3f  |B(13,15);(((vps?|
000024a0  31 29 41 4e 44 31 29 2a  33 32 29 2b 28 28 28 76  |1)AND1)*32)+(((v|
000024b0  70 73 3f 32 29 41 4e 44  32 34 30 29 44 49 56 31  |ps?2)AND240)DIV1|
000024c0  36 29 0d 0a 20 20 20 20  20 20 3a 52 45 4d 3a 20  |6)..      :REM: |
000024d0  68 6f 75 72 73 0d 0a 20  20 36 30 30 20 50 52 49  |hours..  600 PRI|
000024e0  4e 54 54 41 42 28 31 35  2c 31 36 29 3b 28 28 28  |NTTAB(15,16);(((|
000024f0  76 70 73 3f 32 29 41 4e  44 31 35 29 2a 34 29 2b  |vps?2)AND15)*4)+|
00002500  28 28 28 76 70 73 3f 33  29 41 4e 44 31 39 32 29  |(((vps?3)AND192)|
00002510  44 49 56 36 34 29 0d 0a  20 20 20 20 20 20 3a 52  |DIV64)..      :R|
00002520  45 4d 3a 20 6d 69 6e 75  74 65 73 0d 0a 20 20 36  |EM: minutes..  6|
00002530  31 30 20 63 6f 75 6e 74  72 79 3d 28 28 76 70 73  |10 country=((vps|
00002540  3f 33 29 41 4e 44 36 31  29 44 49 56 34 20 3a 52  |?3)AND61)DIV4 :R|
00002550  45 4d 3a 20 63 6f 75 6e  74 72 79 20 6f 66 20 6f  |EM: country of o|
00002560  72 69 67 69 6e 0d 0a 20  20 36 32 30 20 49 46 20  |rigin..  620 IF |
00002570  63 6f 75 6e 74 72 79 3d  31 32 20 50 52 49 4e 54  |country=12 PRINT|
00002580  54 41 42 28 31 35 2c 31  37 29 22 55 4b 22 20 45  |TAB(15,17)"UK" E|
00002590  4c 53 45 20 50 52 49 4e  54 54 41 42 28 31 35 2c  |LSE PRINTTAB(15,|
000025a0  31 37 29 3b 63 6f 75 6e  74 72 79 0d 0a 20 20 36  |17);country..  6|
000025b0  33 30 20 50 52 49 4e 54  54 41 42 28 31 34 2c 31  |30 PRINTTAB(14,1|
000025c0  38 29 3b 28 28 28 76 70  73 3f 33 29 41 4e 44 33  |8);(((vps?3)AND3|
000025d0  29 2a 31 36 29 2b 28 28  28 76 70 73 3f 34 29 41  |)*16)+(((vps?4)A|
000025e0  4e 44 32 34 30 29 44 49  56 31 36 29 0d 0a 20 20  |ND240)DIV16)..  |
000025f0  20 20 20 20 3a 52 45 4d  3a 20 73 6f 75 72 63 65  |    :REM: source|
00002600  0d 0a 20 20 36 34 30 20  56 44 55 33 31 2c 31 35  |..  640 VDU31,15|
00002610  2c 31 39 20 3a 52 45 4d  3a 20 70 72 69 6e 74 20  |,19 :REM: print |
00002620  6d 65 73 73 61 67 65 0d  0a 20 20 36 35 30 20 46  |message..  650 F|
00002630  4f 52 20 62 79 74 65 3d  32 30 20 54 4f 20 33 39  |OR byte=20 TO 39|
00002640  0d 0a 20 20 36 36 30 20  56 44 55 20 28 62 75 66  |..  660 VDU (buf|
00002650  66 3f 62 79 74 65 20 4f  52 20 26 38 30 29 0d 0a  |f?byte OR &80)..|
00002660  20 20 36 37 30 20 4e 45  58 54 0d 0a 20 20 36 38  |  670 NEXT..  68|
00002670  30 20 56 44 55 37 0d 0a  20 20 36 39 30 20 67 72  |0 VDU7..  690 gr|
00002680  61 62 66 6c 61 67 3f 30  3d 30 20 3a 52 45 4d 3a  |abflag?0=0 :REM:|
00002690  20 67 72 61 62 66 6c 61  67 20 3d 20 73 65 61 72  | grabflag = sear|
000026a0  63 68 69 6e 67 0d 0a 20  20 37 30 30 20 45 4e 44  |ching..  700 END|
000026b0  50 52 4f 43 0d 0a 20 20  37 31 30 20 44 45 46 50  |PROC..  710 DEFP|
000026c0  52 4f 43 6d 63 6f 64 65  0d 0a 20 20 37 32 30 20  |ROCmcode..  720 |
000026d0  70 61 63 6b 65 74 3d 26  37 30 20 3a 52 45 4d 3a  |packet=&70 :REM:|
000026e0  20 72 6f 77 20 6e 75 6d  62 65 72 20 6f 66 20 63  | row number of c|
000026f0  75 72 72 65 6e 74 20 70  61 63 6b 65 74 0d 0a 20  |urrent packet.. |
00002700  20 37 33 30 20 6d 61 67  61 7a 69 6e 65 3d 26 37  | 730 magazine=&7|
00002710  31 20 3a 52 45 4d 3a 20  6d 61 67 61 7a 69 6e 65  |1 :REM: magazine|
00002720  20 6e 75 6d 62 65 72 20  6f 66 20 63 75 72 72 65  | number of curre|
00002730  6e 74 20 70 61 67 65 0d  0a 20 20 37 34 30 20 67  |nt page..  740 g|
00002740  72 61 62 66 6c 61 67 3d  26 37 32 20 3a 52 45 4d  |rabflag=&72 :REM|
00002750  3a 20 70 61 67 65 20 67  72 61 62 62 65 72 20 66  |: page grabber f|
00002760  6c 61 67 0d 0a 20 20 37  35 30 20 63 68 61 6e 6e  |lag..  750 chann|
00002770  65 6c 3d 26 37 33 20 3a  52 45 4d 3a 20 54 56 20  |el=&73 :REM: TV |
00002780  63 68 61 6e 6e 65 6c 0d  0a 20 20 37 36 30 20 74  |channel..  760 t|
00002790  65 6d 70 3d 26 37 34 20  3a 52 45 4d 3a 20 74 65  |emp=&74 :REM: te|
000027a0  6d 70 6f 72 61 72 79 20  73 74 6f 72 65 0d 0a 20  |mporary store.. |
000027b0  20 37 37 30 20 76 70 73  3d 26 37 35 20 3a 52 45  | 770 vps=&75 :RE|
000027c0  4d 3a 20 64 65 63 6f 64  65 64 20 56 50 53 2c 20  |M: decoded VPS, |
000027d0  35 20 62 79 74 65 73 0d  0a 20 20 37 38 30 20 73  |5 bytes..  780 s|
000027e0  61 76 65 72 65 67 3d 26  46 43 20 3a 52 45 4d 3a  |avereg=&FC :REM:|
000027f0  20 69 6e 74 65 72 72 75  70 74 20 61 63 63 75 6d  | interrupt accum|
00002800  75 6c 61 74 6f 72 20 73  61 76 65 20 72 65 67 69  |ulator save regi|
00002810  73 74 65 72 0d 0a 20 20  37 39 30 20 69 72 71 32  |ster..  790 irq2|
00002820  76 3d 26 32 30 36 20 3a  52 45 4d 3a 20 49 52 51  |v=&206 :REM: IRQ|
00002830  32 20 76 65 63 74 6f 72  0d 0a 20 20 38 30 30 20  |2 vector..  800 |
00002840  74 74 78 63 6f 6e 74 72  6f 6c 3d 26 46 43 31 30  |ttxcontrol=&FC10|
00002850  20 3a 52 45 4d 3a 20 54  54 58 20 63 6f 6e 74 72  | :REM: TTX contr|
00002860  6f 6c 20 72 65 67 69 73  74 65 72 2c 20 77 72 69  |ol register, wri|
00002870  74 65 20 6f 6e 6c 79 0d  0a 20 20 38 31 30 20 74  |te only..  810 t|
00002880  74 78 73 74 61 74 75 73  3d 26 46 43 31 30 20 3a  |txstatus=&FC10 :|
00002890  52 45 4d 3a 20 54 54 58  20 73 74 61 74 75 73 20  |REM: TTX status |
000028a0  72 65 67 69 73 74 65 72  2c 20 72 65 61 64 20 6f  |register, read o|
000028b0  6e 6c 79 0d 0a 20 20 38  32 30 20 72 6f 77 72 65  |nly..  820 rowre|
000028c0  67 3d 26 46 43 31 31 20  3a 52 45 4d 3a 20 54 54  |g=&FC11 :REM: TT|
000028d0  58 20 72 6f 77 20 72 65  67 69 73 74 65 72 2c 20  |X row register, |
000028e0  77 72 69 74 65 20 6f 6e  6c 79 0d 0a 20 20 38 33  |write only..  83|
000028f0  30 20 64 61 74 61 72 65  67 3d 26 46 43 31 32 20  |0 datareg=&FC12 |
00002900  3a 52 45 4d 3a 20 54 54  58 20 64 61 74 61 20 72  |:REM: TTX data r|
00002910  65 67 69 73 74 65 72 2c  20 72 65 61 64 20 26 20  |egister, read & |
00002920  77 72 69 74 65 0d 0a 20  20 38 34 30 20 73 74 61  |write..  840 sta|
00002930  74 63 6c 72 3d 26 46 43  31 33 20 3a 52 45 4d 3a  |tclr=&FC13 :REM:|
00002940  20 54 54 58 20 63 6c 65  61 72 20 73 74 61 74 75  | TTX clear statu|
00002950  73 20 72 65 67 69 73 74  65 72 2c 20 72 65 61 64  |s register, read|
00002960  20 26 20 77 72 69 74 65  0d 0a 20 20 38 35 30 20  | & write..  850 |
00002970  46 4f 52 20 70 61 73 73  3d 30 20 54 4f 20 32 20  |FOR pass=0 TO 2 |
00002980  53 54 45 50 20 32 0d 0a  20 20 38 36 30 20 50 25  |STEP 2..  860 P%|
00002990  3d 6d 63 6f 64 65 0d 0a  20 20 38 37 30 20 5b 20  |=mcode..  870 [ |
000029a0  20 20 20 20 20 20 4f 50  54 20 70 61 73 73 0d 0a  |      OPT pass..|
000029b0  20 20 38 38 30 20 20 20  20 20 20 20 20 20 4c 44  |  880         LD|
000029c0  41 20 23 26 30 30 0d 0a  20 20 38 39 30 20 20 20  |A #&00..  890   |
000029d0  20 20 20 20 20 20 53 54  41 20 67 72 61 62 66 6c  |      STA grabfl|
000029e0  61 67 20 20 5c 20 67 72  61 62 66 6c 61 67 20 3d  |ag  \ grabflag =|
000029f0  20 73 65 61 72 63 68 69  6e 67 0d 0a 20 20 39 30  | searching..  90|
00002a00  30 20 20 20 20 20 20 20  20 20 4c 44 58 20 69 72  |0         LDX ir|
00002a10  71 32 76 20 20 20 20 20  5c 20 6c 6f 61 64 20 73  |q2v     \ load s|
00002a20  65 63 6f 6e 64 61 72 79  20 69 6e 74 65 72 72 75  |econdary interru|
00002a30  70 74 20 76 65 63 74 6f  72 0d 0a 20 20 39 31 30  |pt vector..  910|
00002a40  20 20 20 20 20 20 20 20  20 4c 44 59 20 69 72 71  |         LDY irq|
00002a50  32 76 2b 31 0d 0a 20 20  39 32 30 20 20 20 20 20  |2v+1..  920     |
00002a60  20 20 20 20 43 50 59 20  23 69 6e 74 65 72 72 75  |    CPY #interru|
00002a70  70 74 20 44 49 56 20 32  35 36 20 5c 20 68 61 73  |pt DIV 256 \ has|
00002a80  20 74 68 65 20 76 65 63  74 6f 72 20 62 65 65 6e  | the vector been|
00002a90  20 61 6c 74 65 72 65 64  3f 0d 0a 20 20 39 33 30  | altered?..  930|
00002aa0  20 20 20 20 20 20 20 20  20 42 45 51 20 64 69 73  |         BEQ dis|
00002ab0  61 62 6c 65 20 20 20 5c  20 62 72 61 6e 63 68 20  |able   \ branch |
00002ac0  69 66 20 69 6e 74 65 72  72 75 70 74 20 76 65 63  |if interrupt vec|
00002ad0  74 6f 72 20 61 6c 74 65  72 65 64 0d 0a 20 20 39  |tor altered..  9|
00002ae0  34 30 20 20 20 20 20 20  20 20 20 53 54 58 20 6f  |40         STX o|
00002af0  6c 64 69 72 71 32 76 20  20 5c 20 73 61 76 65 20  |ldirq2v  \ save |
00002b00  73 65 63 6f 6e 64 61 72  79 20 69 6e 74 65 72 72  |secondary interr|
00002b10  75 70 74 20 76 65 63 74  6f 72 0d 0a 20 20 39 35  |upt vector..  95|
00002b20  30 20 20 20 20 20 20 20  20 20 53 54 59 20 6f 6c  |0         STY ol|
00002b30  64 69 72 71 32 76 2b 31  0d 0a 20 20 39 36 30 20  |dirq2v+1..  960 |
00002b40  20 20 20 20 20 20 20 20  4c 44 58 20 23 69 6e 74  |        LDX #int|
00002b50  65 72 72 75 70 74 20 4d  4f 44 20 32 35 36 20 5c  |errupt MOD 256 \|
00002b60  20 69 6e 73 74 61 6c 6c  20 6e 65 77 20 69 6e 74  | install new int|
00002b70  65 72 72 75 70 74 20 72  6f 75 74 69 6e 65 0d 0a  |errupt routine..|
00002b80  20 20 39 37 30 20 20 20  20 20 20 20 20 20 4c 44  |  970         LD|
00002b90  59 20 23 69 6e 74 65 72  72 75 70 74 20 44 49 56  |Y #interrupt DIV|
00002ba0  20 32 35 36 0d 0a 20 20  39 38 30 20 20 20 20 20  | 256..  980     |
00002bb0  20 20 20 20 53 45 49 20  20 20 20 20 20 20 20 20  |    SEI         |
00002bc0  20 20 5c 20 64 69 73 61  62 6c 65 20 69 6e 74 65  |  \ disable inte|
00002bd0  72 72 75 70 74 73 20 77  68 65 6e 20 61 6c 74 65  |rrupts when alte|
00002be0  72 69 6e 67 20 76 65 63  74 6f 72 0d 0a 20 20 39  |ring vector..  9|
00002bf0  39 30 20 20 20 20 20 20  20 20 20 53 54 58 20 69  |90         STX i|
00002c00  72 71 32 76 0d 0a 20 31  30 30 30 20 20 20 20 20  |rq2v.. 1000     |
00002c10  20 20 20 20 53 54 59 20  69 72 71 32 76 2b 31 0d  |    STY irq2v+1.|
00002c20  0a 20 31 30 31 30 20 20  20 20 20 20 20 20 20 43  |. 1010         C|
00002c30  4c 49 20 20 20 20 20 20  20 20 20 20 20 5c 20 72  |LI           \ r|
00002c40  65 2d 65 6e 61 62 6c 65  20 69 6e 74 65 72 72 75  |e-enable interru|
00002c50  70 74 73 0d 0a 20 31 30  32 30 20 20 20 20 20 20  |pts.. 1020      |
00002c60  20 20 20 4c 44 41 20 63  68 61 6e 6e 65 6c 20 20  |   LDA channel  |
00002c70  20 5c 20 6c 6f 61 64 20  28 63 68 61 6e 6e 65 6c  | \ load (channel|
00002c80  20 6e 75 6d 62 65 72 20  2b 20 23 26 31 43 29 0d  | number + #&1C).|
00002c90  0a 20 31 30 33 30 20 20  20 20 20 20 20 20 20 53  |. 1030         S|
00002ca0  54 41 20 74 74 78 63 6f  6e 74 72 6f 6c 20 5c 20  |TA ttxcontrol \ |
00002cb0  65 6e 61 62 6c 65 20 54  54 58 0d 0a 20 31 30 34  |enable TTX.. 104|
00002cc0  30 20 20 20 20 20 20 20  20 20 52 54 53 20 20 20  |0         RTS   |
00002cd0  20 20 20 20 20 20 20 20  5c 20 72 65 74 75 72 6e  |        \ return|
00002ce0  20 74 6f 20 42 41 53 49  43 0d 0a 20 31 30 35 30  | to BASIC.. 1050|
00002cf0  20 2e 64 69 73 61 62 6c  65 0d 0a 20 31 30 36 30  | .disable.. 1060|
00002d00  20 20 20 20 20 20 20 20  20 4c 44 41 20 23 26 30  |         LDA #&0|
00002d10  30 0d 0a 20 31 30 37 30  20 20 20 20 20 20 20 20  |0.. 1070        |
00002d20  20 53 54 41 20 74 74 78  63 6f 6e 74 72 6f 6c 20  | STA ttxcontrol |
00002d30  5c 20 64 69 73 61 62 6c  65 20 54 54 58 0d 0a 20  |\ disable TTX.. |
00002d40  31 30 38 30 20 20 20 20  20 20 20 20 20 4c 44 58  |1080         LDX|
00002d50  20 6f 6c 64 69 72 71 32  76 20 20 5c 20 6c 6f 61  | oldirq2v  \ loa|
00002d60  64 20 6f 72 69 67 69 6e  61 6c 20 76 65 63 74 6f  |d original vecto|
00002d70  72 0d 0a 20 31 30 39 30  20 20 20 20 20 20 20 20  |r.. 1090        |
00002d80  20 4c 44 59 20 6f 6c 64  69 72 71 32 76 2b 31 0d  | LDY oldirq2v+1.|
00002d90  0a 20 31 31 30 30 20 20  20 20 20 20 20 20 20 53  |. 1100         S|
00002da0  45 49 20 20 20 20 20 20  20 20 20 20 20 5c 20 64  |EI           \ d|
00002db0  69 73 61 62 6c 65 20 69  6e 74 65 72 72 75 70 74  |isable interrupt|
00002dc0  73 20 77 68 65 6e 20 61  6c 74 65 72 69 6e 67 20  |s when altering |
00002dd0  76 65 63 74 6f 72 0d 0a  20 31 31 31 30 20 20 20  |vector.. 1110   |
00002de0  20 20 20 20 20 20 53 54  58 20 69 72 71 32 76 20  |      STX irq2v |
00002df0  20 20 20 20 5c 20 72 65  73 74 6f 72 65 20 6f 72  |    \ restore or|
00002e00  69 67 69 6e 61 6c 20 76  65 63 74 6f 72 0d 0a 20  |iginal vector.. |
00002e10  31 31 32 30 20 20 20 20  20 20 20 20 20 53 54 59  |1120         STY|
00002e20  20 69 72 71 32 76 2b 31  0d 0a 20 31 31 33 30 20  | irq2v+1.. 1130 |
00002e30  20 20 20 20 20 20 20 20  43 4c 49 20 20 20 20 20  |        CLI     |
00002e40  20 20 20 20 20 20 5c 20  72 65 2d 65 6e 61 62 6c  |      \ re-enabl|
00002e50  65 20 69 6e 74 65 72 72  75 70 74 73 0d 0a 20 31  |e interrupts.. 1|
00002e60  31 34 30 20 20 20 20 20  20 20 20 20 52 54 53 20  |140         RTS |
00002e70  20 20 20 20 20 20 20 20  20 20 5c 20 72 65 74 75  |          \ retu|
00002e80  72 6e 20 74 6f 20 42 41  53 49 43 0d 0a 20 31 31  |rn to BASIC.. 11|
00002e90  35 30 20 2e 69 6e 74 65  72 72 75 70 74 0d 0a 20  |50 .interrupt.. |
00002ea0  31 31 36 30 20 20 20 20  20 20 20 20 20 42 49 54  |1160         BIT|
00002eb0  20 74 74 78 73 74 61 74  75 73 20 5c 20 70 6f 6c  | ttxstatus \ pol|
00002ec0  6c 20 54 54 58 20 68 61  72 64 77 61 72 65 0d 0a  |l TTX hardware..|
00002ed0  20 31 31 37 30 20 20 20  20 20 20 20 20 20 42 4d  | 1170         BM|
00002ee0  49 20 74 74 78 69 6e 74  65 72 20 20 5c 20 62 72  |I ttxinter  \ br|
00002ef0  61 6e 63 68 20 69 66 20  54 54 58 20 69 6e 74 65  |anch if TTX inte|
00002f00  72 72 75 70 74 0d 0a 20  31 31 38 30 20 20 20 20  |rrupt.. 1180    |
00002f10  20 20 20 20 20 4a 4d 50  20 28 6f 6c 64 69 72 71  |     JMP (oldirq|
00002f20  32 76 29 20 5c 20 6e 6f  74 20 54 54 58 20 69 6e  |2v) \ not TTX in|
00002f30  74 65 72 72 75 70 74 0d  0a 20 31 31 39 30 20 2e  |terrupt.. 1190 .|
00002f40  74 74 78 69 6e 74 65 72  0d 0a 20 31 32 30 30 20  |ttxinter.. 1200 |
00002f50  20 20 20 20 20 20 20 20  4c 44 41 20 73 61 76 65  |        LDA save|
00002f60  72 65 67 20 20 20 5c 20  69 6e 74 65 72 72 75 70  |reg   \ interrup|
00002f70  74 20 61 63 63 75 6d 75  6c 61 74 6f 72 20 73 61  |t accumulator sa|
00002f80  76 65 20 72 65 67 69 73  74 65 72 0d 0a 20 31 32  |ve register.. 12|
00002f90  31 30 20 20 20 20 20 20  20 20 20 50 48 41 20 20  |10         PHA  |
00002fa0  20 20 20 20 20 20 20 20  20 5c 20 70 75 73 68 20  |         \ push |
00002fb0  69 6e 74 65 72 72 75 70  74 20 61 63 63 75 6d 75  |interrupt accumu|
00002fc0  6c 61 74 6f 72 20 73 61  76 65 20 72 65 67 69 73  |lator save regis|
00002fd0  74 65 72 0d 0a 20 31 32  32 30 20 20 20 20 20 20  |ter.. 1220      |
00002fe0  20 20 20 54 58 41 0d 0a  20 31 32 33 30 20 20 20  |   TXA.. 1230   |
00002ff0  20 20 20 20 20 20 50 48  41 20 20 20 20 20 20 20  |      PHA       |
00003000  20 20 20 20 5c 20 70 75  73 68 20 58 0d 0a 20 31  |    \ push X.. 1|
00003010  32 34 30 20 20 20 20 20  20 20 20 20 54 59 41 0d  |240         TYA.|
00003020  0a 20 31 32 35 30 20 20  20 20 20 20 20 20 20 50  |. 1250         P|
00003030  48 41 20 20 20 20 20 20  20 20 20 20 20 5c 20 70  |HA           \ p|
00003040  75 73 68 20 59 0d 0a 20  31 32 36 30 20 20 20 20  |ush Y.. 1260    |
00003050  20 20 20 20 20 4c 44 41  20 67 72 61 62 66 6c 61  |     LDA grabfla|
00003060  67 20 20 5c 20 68 61 73  20 54 53 44 50 20 62 65  |g  \ has TSDP be|
00003070  65 6e 20 67 72 61 62 62  65 64 3f 0d 0a 20 31 32  |en grabbed?.. 12|
00003080  37 30 20 20 20 20 20 20  20 20 20 42 4e 45 20 63  |70         BNE c|
00003090  6c 65 61 72 73 74 61 74  75 73 20 5c 20 63 6c 65  |learstatus \ cle|
000030a0  61 72 20 73 74 61 74 75  73 20 61 6e 64 20 52 54  |ar status and RT|
000030b0  49 20 69 66 20 54 53 44  50 20 67 72 61 62 62 65  |I if TSDP grabbe|
000030c0  64 0d 0a 20 31 32 38 30  20 20 20 20 20 20 20 20  |d.. 1280        |
000030d0  20 43 4c 44 20 20 20 20  20 20 20 20 20 20 20 5c  | CLD           \|
000030e0  20 63 6c 65 61 72 20 64  65 63 69 6d 61 6c 20 66  | clear decimal f|
000030f0  6c 61 67 0d 0a 20 31 32  39 30 20 20 20 20 20 20  |lag.. 1290      |
00003100  20 20 20 4c 44 59 20 23  26 30 30 20 20 20 20 20  |   LDY #&00     |
00003110  20 5c 20 73 74 61 72 74  20 77 69 74 68 20 72 6f  | \ start with ro|
00003120  77 20 30 0d 0a 20 31 33  30 30 20 2e 72 65 61 64  |w 0.. 1300 .read|
00003130  74 74 78 74 0d 0a 20 31  33 31 30 20 20 20 20 20  |ttxt.. 1310     |
00003140  20 20 20 20 53 54 59 20  72 6f 77 72 65 67 20 20  |    STY rowreg  |
00003150  20 20 5c 20 74 72 79 20  72 6f 77 73 20 30 20 74  |  \ try rows 0 t|
00003160  6f 20 31 35 0d 0a 20 31  33 32 30 20 20 20 20 20  |o 15.. 1320     |
00003170  20 20 20 20 4c 44 41 20  64 61 74 61 72 65 67 20  |    LDA datareg |
00003180  20 20 5c 20 6c 6f 61 64  20 66 72 61 6d 69 6e 67  |  \ load framing|
00003190  20 63 6f 64 65 20 28 23  26 32 37 29 0d 0a 20 31  | code (#&27).. 1|
000031a0  33 33 30 20 20 20 20 20  20 20 20 20 42 45 51 20  |330         BEQ |
000031b0  65 6d 70 74 79 72 6f 77  20 20 5c 20 69 66 20 7a  |emptyrow  \ if z|
000031c0  65 72 6f 20 74 72 79 20  6e 65 78 74 20 72 6f 77  |ero try next row|
000031d0  0d 0a 20 31 33 34 30 20  20 20 20 20 20 20 20 20  |.. 1340         |
000031e0  54 59 41 0d 0a 20 31 33  35 30 20 20 20 20 20 20  |TYA.. 1350      |
000031f0  20 20 20 50 48 41 20 20  20 20 20 20 20 20 20 20  |   PHA          |
00003200  20 5c 20 73 61 76 65 20  72 6f 77 20 6e 75 6d 62  | \ save row numb|
00003210  65 72 0d 0a 20 31 33 36  30 20 20 20 20 20 20 20  |er.. 1360       |
00003220  20 20 4a 53 52 20 72 65  61 64 70 61 63 6b 65 74  |  JSR readpacket|
00003230  0d 0a 20 31 33 37 30 20  20 20 20 20 20 20 20 20  |.. 1370         |
00003240  50 4c 41 0d 0a 20 31 33  38 30 20 20 20 20 20 20  |PLA.. 1380      |
00003250  20 20 20 54 41 59 20 20  20 20 20 20 20 20 20 20  |   TAY          |
00003260  20 5c 20 72 65 73 74 6f  72 65 20 72 6f 77 20 6e  | \ restore row n|
00003270  75 6d 62 65 72 0d 0a 20  31 33 39 30 20 2e 65 6d  |umber.. 1390 .em|
00003280  70 74 79 72 6f 77 0d 0a  20 31 34 30 30 20 20 20  |ptyrow.. 1400   |
00003290  20 20 20 20 20 20 49 4e  59 20 20 20 20 20 20 20  |      INY       |
000032a0  20 20 20 20 5c 20 69 6e  63 72 65 6d 65 6e 74 20  |    \ increment |
000032b0  72 6f 77 20 6e 75 6d 62  65 72 0d 0a 20 31 34 31  |row number.. 141|
000032c0  30 20 20 20 20 20 20 20  20 20 43 50 59 20 23 26  |0         CPY #&|
000032d0  31 30 20 20 20 20 20 20  5c 20 74 72 79 20 72 6f  |10      \ try ro|
000032e0  77 73 20 30 20 2d 20 31  35 0d 0a 20 31 34 32 30  |ws 0 - 15.. 1420|
000032f0  20 20 20 20 20 20 20 20  20 42 4e 45 20 72 65 61  |         BNE rea|
00003300  64 74 74 78 74 0d 0a 20  31 34 33 30 20 2e 63 6c  |dttxt.. 1430 .cl|
00003310  65 61 72 73 74 61 74 75  73 0d 0a 20 31 34 34 30  |earstatus.. 1440|
00003320  20 20 20 20 20 20 20 20  20 4c 44 41 20 23 26 30  |         LDA #&0|
00003330  30 0d 0a 20 31 34 35 30  20 20 20 20 20 20 20 20  |0.. 1450        |
00003340  20 4c 44 59 20 23 26 30  46 20 20 20 20 20 20 5c  | LDY #&0F      \|
00003350  20 63 6c 65 61 72 20 31  36 20 72 6f 77 73 20 69  | clear 16 rows i|
00003360  6e 20 61 64 61 70 74 6f  72 0d 0a 20 31 34 36 30  |n adaptor.. 1460|
00003370  20 2e 63 6c 65 61 72 6c  6f 6f 70 0d 0a 20 31 34  | .clearloop.. 14|
00003380  37 30 20 20 20 20 20 20  20 20 20 53 54 59 20 72  |70         STY r|
00003390  6f 77 72 65 67 0d 0a 20  31 34 38 30 20 20 20 20  |owreg.. 1480    |
000033a0  20 20 20 20 20 53 54 41  20 64 61 74 61 72 65 67  |     STA datareg|
000033b0  0d 0a 20 31 34 39 30 20  20 20 20 20 20 20 20 20  |.. 1490         |
000033c0  44 45 59 0d 0a 20 31 35  30 30 20 20 20 20 20 20  |DEY.. 1500      |
000033d0  20 20 20 42 50 4c 20 63  6c 65 61 72 6c 6f 6f 70  |   BPL clearloop|
000033e0  0d 0a 20 31 35 31 30 20  20 20 20 20 20 20 20 20  |.. 1510         |
000033f0  53 54 41 20 73 74 61 74  63 6c 72 20 20 20 5c 20  |STA statclr   \ |
00003400  63 6c 65 61 72 20 73 74  61 74 75 73 20 66 6c 61  |clear status fla|
00003410  67 73 20 62 65 66 6f 72  65 20 72 65 74 75 72 6e  |gs before return|
00003420  69 6e 67 0d 0a 20 31 35  32 30 20 20 20 20 20 20  |ing.. 1520      |
00003430  20 20 20 50 4c 41 0d 0a  20 31 35 33 30 20 20 20  |   PLA.. 1530   |
00003440  20 20 20 20 20 20 54 41  59 20 20 20 20 20 20 20  |      TAY       |
00003450  20 20 20 20 5c 20 72 65  73 74 6f 72 65 20 59 0d  |    \ restore Y.|
00003460  0a 20 31 35 34 30 20 20  20 20 20 20 20 20 20 50  |. 1540         P|
00003470  4c 41 0d 0a 20 31 35 35  30 20 20 20 20 20 20 20  |LA.. 1550       |
00003480  20 20 54 41 58 20 20 20  20 20 20 20 20 20 20 20  |  TAX           |
00003490  5c 20 72 65 73 74 6f 72  65 20 58 0d 0a 20 31 35  |\ restore X.. 15|
000034a0  36 30 20 20 20 20 20 20  20 20 20 50 4c 41 0d 0a  |60         PLA..|
000034b0  20 31 35 37 30 20 20 20  20 20 20 20 20 20 53 54  | 1570         ST|
000034c0  41 20 73 61 76 65 72 65  67 20 20 20 5c 20 72 65  |A savereg   \ re|
000034d0  73 74 6f 72 65 20 69 6e  74 65 72 72 75 70 74 20  |store interrupt |
000034e0  61 63 63 75 6d 75 6c 61  74 6f 72 20 73 61 76 65  |accumulator save|
000034f0  20 72 65 67 69 73 74 65  72 0d 0a 20 31 35 38 30  | register.. 1580|
00003500  20 20 20 20 20 20 20 20  20 52 54 49 20 20 20 20  |         RTI    |
00003510  20 20 20 20 20 20 20 5c  20 72 65 74 75 72 6e 20  |       \ return |
00003520  66 72 6f 6d 20 69 6e 74  65 72 72 75 70 74 0d 0a  |from interrupt..|
00003530  20 31 35 39 30 20 2e 72  65 61 64 70 61 63 6b 65  | 1590 .readpacke|
00003540  74 0d 0a 20 31 36 30 30  20 20 20 20 20 20 20 20  |t.. 1600        |
00003550  20 4c 44 41 20 67 72 61  62 66 6c 61 67 20 20 5c  | LDA grabflag  \|
00003560  20 6a 75 73 74 20 63 68  65 63 6b 69 6e 67 0d 0a  | just checking..|
00003570  20 31 36 31 30 20 20 20  20 20 20 20 20 20 42 4e  | 1610         BN|
00003580  45 20 72 65 74 75 72 6e  0d 0a 20 31 36 32 30 20  |E return.. 1620 |
00003590  20 20 20 20 20 20 20 20  4c 44 59 20 64 61 74 61  |        LDY data|
000035a0  72 65 67 20 20 20 5c 20  72 65 61 64 20 6d 61 67  |reg   \ read mag|
000035b0  61 7a 69 6e 65 20 6e 75  6d 62 65 72 0d 0a 20 31  |azine number.. 1|
000035c0  36 33 30 20 20 20 20 20  20 20 20 20 4c 44 41 20  |630         LDA |
000035d0  68 61 6d 74 61 62 6c 65  2c 59 20 5c 20 64 65 2d  |hamtable,Y \ de-|
000035e0  68 61 6d 20 69 74 0d 0a  20 31 36 34 30 20 20 20  |ham it.. 1640   |
000035f0  20 20 20 20 20 20 42 4d  49 20 72 65 74 75 72 6e  |      BMI return|
00003600  20 20 20 20 5c 20 73 74  6f 70 20 6c 6f 61 64 69  |    \ stop loadi|
00003610  6e 67 20 69 66 20 65 72  72 6f 72 0d 0a 20 31 36  |ng if error.. 16|
00003620  35 30 20 20 20 20 20 20  20 20 20 53 54 41 20 6d  |50         STA m|
00003630  61 67 61 7a 69 6e 65 20  20 5c 20 73 61 76 65 20  |agazine  \ save |
00003640  6d 61 67 61 7a 69 6e 65  20 6e 75 6d 62 65 72 0d  |magazine number.|
00003650  0a 20 31 36 36 30 20 20  20 20 20 20 20 20 20 4c  |. 1660         L|
00003660  44 59 20 64 61 74 61 72  65 67 20 20 20 5c 20 72  |DY datareg   \ r|
00003670  65 61 64 20 70 61 63 6b  65 74 20 6e 75 6d 62 65  |ead packet numbe|
00003680  72 0d 0a 20 31 36 37 30  20 20 20 20 20 20 20 20  |r.. 1670        |
00003690  20 4c 44 41 20 68 61 6d  74 61 62 6c 65 2c 59 20  | LDA hamtable,Y |
000036a0  5c 20 64 65 2d 68 61 6d  20 69 74 0d 0a 20 31 36  |\ de-ham it.. 16|
000036b0  38 30 20 20 20 20 20 20  20 20 20 42 4d 49 20 72  |80         BMI r|
000036c0  65 74 75 72 6e 20 20 20  20 5c 20 73 74 6f 70 20  |eturn    \ stop |
000036d0  6c 6f 61 64 69 6e 67 20  69 66 20 65 72 72 6f 72  |loading if error|
000036e0  0d 0a 20 31 36 39 30 20  20 20 20 20 20 20 20 20  |.. 1690         |
000036f0  53 54 41 20 70 61 63 6b  65 74 20 20 20 20 5c 20  |STA packet    \ |
00003700  73 61 76 65 20 70 61 63  6b 65 74 20 6e 75 6d 62  |save packet numb|
00003710  65 72 0d 0a 20 31 37 30  30 20 20 20 20 20 20 20  |er.. 1700       |
00003720  20 20 4c 44 41 20 6d 61  67 61 7a 69 6e 65 20 20  |  LDA magazine  |
00003730  5c 20 6c 6f 61 64 20 6d  61 67 61 7a 69 6e 65 20  |\ load magazine |
00003740  6e 75 6d 62 65 72 0d 0a  20 31 37 31 30 20 20 20  |number.. 1710   |
00003750  20 20 20 20 20 20 43 4d  50 20 23 26 30 38 20 20  |      CMP #&08  |
00003760  20 20 20 20 5c 20 62 69  74 20 33 20 6f 66 20 6d  |    \ bit 3 of m|
00003770  61 67 2e 20 6e 75 6d 62  65 72 20 69 73 20 62 69  |ag. number is bi|
00003780  74 20 30 20 6f 66 20 70  61 63 6b 65 74 0d 0a 20  |t 0 of packet.. |
00003790  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000037a0  20 20 20 20 20 20 20 20  20 20 20 5c 20 6e 75 6d  |           \ num|
000037b0  62 65 72 0d 0a 20 31 37  32 30 20 20 20 20 20 20  |ber.. 1720      |
000037c0  20 20 20 52 4f 4c 20 70  61 63 6b 65 74 20 20 20  |   ROL packet   |
000037d0  20 5c 20 35 20 62 69 74  20 70 61 63 6b 65 74 20  | \ 5 bit packet |
000037e0  6e 75 6d 62 65 72 0d 0a  20 31 37 33 30 20 20 20  |number.. 1730   |
000037f0  20 20 20 20 20 20 41 4e  44 20 23 26 30 37 20 20  |      AND #&07  |
00003800  20 20 20 20 5c 20 75 73  65 20 6f 6e 6c 79 20 62  |    \ use only b|
00003810  69 74 73 20 30 2d 32 0d  0a 20 31 37 34 30 20 20  |its 0-2.. 1740  |
00003820  20 20 20 20 20 20 20 43  4d 50 20 23 26 30 30 20  |       CMP #&00 |
00003830  20 20 20 20 20 5c 20 69  73 20 74 68 69 73 20 6d  |     \ is this m|
00003840  61 67 61 7a 69 6e 65 20  30 3f 0d 0a 20 31 37 35  |agazine 0?.. 175|
00003850  30 20 20 20 20 20 20 20  20 20 42 4e 45 20 72 65  |0         BNE re|
00003860  74 75 72 6e 0d 0a 20 31  37 36 30 20 20 20 20 20  |turn.. 1760     |
00003870  20 20 20 20 4c 44 41 20  70 61 63 6b 65 74 0d 0a  |    LDA packet..|
00003880  20 31 37 37 30 20 20 20  20 20 20 20 20 20 43 4d  | 1770         CM|
00003890  50 20 23 26 31 45 20 20  20 20 20 20 5c 20 6c 6f  |P #&1E      \ lo|
000038a0  6f 6b 20 66 6f 72 20 54  53 44 50 0d 0a 20 31 37  |ok for TSDP.. 17|
000038b0  38 30 20 20 20 20 20 20  20 20 20 42 4e 45 20 72  |80         BNE r|
000038c0  65 74 75 72 6e 20 20 20  20 5c 20 69 67 6e 6f 72  |eturn    \ ignor|
000038d0  65 20 61 6c 6c 20 6f 74  68 65 72 20 70 61 63 6b  |e all other pack|
000038e0  65 74 73 0d 0a 20 31 37  39 30 20 20 20 20 20 20  |ets.. 1790      |
000038f0  20 20 20 4c 44 59 20 23  26 30 30 20 20 20 20 20  |   LDY #&00     |
00003900  20 5c 20 72 65 61 64 20  62 79 74 65 73 20 30 20  | \ read bytes 0 |
00003910  2d 20 33 39 0d 0a 20 31  38 30 30 20 2e 72 65 61  |- 39.. 1800 .rea|
00003920  64 6d 6f 72 65 0d 0a 20  31 38 31 30 20 20 20 20  |dmore.. 1810    |
00003930  20 20 20 20 20 4c 44 58  20 64 61 74 61 72 65 67  |     LDX datareg|
00003940  20 20 20 5c 20 72 65 61  64 20 64 61 74 61 20 72  |   \ read data r|
00003950  65 67 69 73 74 65 72 0d  0a 20 31 38 32 30 20 20  |egister.. 1820  |
00003960  20 20 20 20 20 20 20 4c  44 41 20 68 61 6d 74 61  |       LDA hamta|
00003970  62 6c 65 2c 58 20 5c 20  64 65 2d 68 61 6d 20 74  |ble,X \ de-ham t|
00003980  68 65 20 62 79 74 65 0d  0a 20 31 38 33 30 20 20  |he byte.. 1830  |
00003990  20 20 20 20 20 20 20 42  4d 49 20 72 65 74 75 72  |       BMI retur|
000039a0  6e 20 20 20 20 5c 20 72  65 74 75 72 6e 20 69 66  |n    \ return if|
000039b0  20 65 72 72 6f 72 0d 0a  20 31 38 34 30 20 20 20  | error.. 1840   |
000039c0  20 20 20 20 20 20 53 54  41 20 62 75 66 66 2c 59  |      STA buff,Y|
000039d0  20 20 20 20 5c 20 73 74  6f 72 65 20 69 6e 20 62  |    \ store in b|
000039e0  75 66 66 65 72 0d 0a 20  31 38 35 30 20 20 20 20  |uffer.. 1850    |
000039f0  20 20 20 20 20 49 4e 59  20 20 20 20 20 20 20 20  |     INY        |
00003a00  20 20 20 5c 20 69 6e 63  72 65 6d 65 6e 74 20 69  |   \ increment i|
00003a10  6e 64 65 78 0d 0a 20 31  38 36 30 20 20 20 20 20  |ndex.. 1860     |
00003a20  20 20 20 20 43 50 59 20  23 26 31 34 0d 0a 20 31  |    CPY #&14.. 1|
00003a30  38 37 30 20 20 20 20 20  20 20 20 20 42 43 43 20  |870         BCC |
00003a40  72 65 61 64 6d 6f 72 65  20 20 5c 20 67 6f 20 62  |readmore  \ go b|
00003a50  61 63 6b 20 66 6f 72 20  6d 6f 72 65 0d 0a 20 31  |ack for more.. 1|
00003a60  38 38 30 20 2e 72 65 61  64 61 67 61 69 6e 0d 0a  |880 .readagain..|
00003a70  20 31 38 39 30 20 20 20  20 20 20 20 20 20 4c 44  | 1890         LD|
00003a80  41 20 64 61 74 61 72 65  67 20 20 20 5c 20 72 65  |A datareg   \ re|
00003a90  61 64 20 64 61 74 61 20  72 65 67 69 73 74 65 72  |ad data register|
00003aa0  0d 0a 20 31 39 30 30 20  20 20 20 20 20 20 20 20  |.. 1900         |
00003ab0  53 54 41 20 62 75 66 66  2c 59 20 20 20 20 5c 20  |STA buff,Y    \ |
00003ac0  73 74 6f 72 65 20 69 6e  20 62 75 66 66 65 72 0d  |store in buffer.|
00003ad0  0a 20 31 39 31 30 20 20  20 20 20 20 20 20 20 49  |. 1910         I|
00003ae0  4e 59 20 20 20 20 20 20  20 20 20 20 20 5c 20 69  |NY           \ i|
00003af0  6e 63 72 65 6d 65 6e 74  20 69 6e 64 65 78 0d 0a  |ncrement index..|
00003b00  20 31 39 32 30 20 20 20  20 20 20 20 20 20 43 50  | 1920         CP|
00003b10  59 20 23 26 32 38 20 20  20 20 20 20 5c 20 64 65  |Y #&28      \ de|
00003b20  63 69 6d 61 6c 20 34 30  0d 0a 20 31 39 33 30 20  |cimal 40.. 1930 |
00003b30  20 20 20 20 20 20 20 20  42 4e 45 20 72 65 61 64  |        BNE read|
00003b40  61 67 61 69 6e 20 5c 20  67 6f 20 62 61 63 6b 20  |again \ go back |
00003b50  66 6f 72 20 6d 6f 72 65  0d 0a 20 31 39 34 30 20  |for more.. 1940 |
00003b60  20 20 20 20 20 20 20 20  4c 44 41 20 62 75 66 66  |        LDA buff|
00003b70  20 20 20 20 20 20 5c 20  54 53 44 50 20 74 79 70  |      \ TSDP typ|
00003b80  65 20 62 79 74 65 0d 0a  20 31 39 35 30 20 20 20  |e byte.. 1950   |
00003b90  20 20 20 20 20 20 41 4e  44 20 23 26 30 45 20 20  |      AND #&0E  |
00003ba0  20 20 20 20 5c 20 25 30  30 30 30 31 31 31 30 0d  |    \ %00001110.|
00003bb0  0a 20 31 39 36 30 20 20  20 20 20 20 20 20 20 53  |. 1960         S|
00003bc0  54 41 20 67 72 61 62 66  6c 61 67 20 20 5c 20 67  |TA grabflag  \ g|
00003bd0  72 61 62 66 6c 61 67 20  3d 20 30 20 6f 72 20 32  |rabflag = 0 or 2|
00003be0  0d 0a 20 31 39 37 30 20  2e 72 65 74 75 72 6e 0d  |.. 1970 .return.|
00003bf0  0a 20 31 39 38 30 20 20  20 20 20 20 20 20 20 52  |. 1980         R|
00003c00  54 53 0d 0a 20 31 39 39  30 20 2e 72 65 76 65 72  |TS.. 1990 .rever|
00003c10  73 65 0d 0a 20 32 30 30  30 20 20 20 20 20 20 20  |se.. 2000       |
00003c20  20 20 4c 44 58 20 23 26  31 34 20 20 20 20 20 20  |  LDX #&14      |
00003c30  5c 20 56 50 53 20 6e 79  62 62 6c 65 73 20 69 6e  |\ VPS nybbles in|
00003c40  20 62 79 74 65 73 20 26  30 42 20 2d 20 26 31 33  | bytes &0B - &13|
00003c50  0d 0a 20 32 30 31 30 20  20 20 20 20 20 20 20 20  |.. 2010         |
00003c60  4c 44 59 20 23 26 30 34  20 20 20 20 20 20 5c 20  |LDY #&04      \ |
00003c70  64 65 63 6f 64 65 20 56  50 53 20 69 6e 74 6f 20  |decode VPS into |
00003c80  35 20 62 79 74 65 73 0d  0a 20 32 30 32 30 20 2e  |5 bytes.. 2020 .|
00003c90  6a 6f 69 6e 0d 0a 20 32  30 33 30 20 20 20 20 20  |join.. 2030     |
00003ca0  20 20 20 20 4c 44 41 20  62 75 66 66 2c 58 20 20  |    LDA buff,X  |
00003cb0  20 20 5c 20 6c 6f 61 64  20 56 50 53 20 6e 79 62  |  \ load VPS nyb|
00003cc0  62 6c 65 0d 0a 20 32 30  34 30 20 20 20 20 20 20  |ble.. 2040      |
00003cd0  20 20 20 41 53 4c 20 41  20 20 20 20 20 20 20 20  |   ASL A        |
00003ce0  20 5c 20 6d 6f 76 65 20  6c 6f 77 20 6e 79 62 62  | \ move low nybb|
00003cf0  6c 65 20 69 6e 74 6f 20  68 69 67 68 0d 0a 20 32  |le into high.. 2|
00003d00  30 35 30 20 20 20 20 20  20 20 20 20 41 53 4c 20  |050         ASL |
00003d10  41 0d 0a 20 32 30 36 30  20 20 20 20 20 20 20 20  |A.. 2060        |
00003d20  20 41 53 4c 20 41 0d 0a  20 32 30 37 30 20 20 20  | ASL A.. 2070   |
00003d30  20 20 20 20 20 20 41 53  4c 20 41 0d 0a 20 32 30  |      ASL A.. 20|
00003d40  38 30 20 20 20 20 20 20  20 20 20 53 54 41 20 74  |80         STA t|
00003d50  65 6d 70 20 20 20 20 20  20 5c 20 74 65 6d 70 6f  |emp      \ tempo|
00003d60  72 61 72 79 20 7a 65 72  6f 20 70 61 67 65 20 73  |rary zero page s|
00003d70  74 6f 72 65 0d 0a 20 32  30 39 30 20 20 20 20 20  |tore.. 2090     |
00003d80  20 20 20 20 44 45 58 20  20 20 20 20 20 20 20 20  |    DEX         |
00003d90  20 20 5c 20 70 6f 69 6e  74 20 74 6f 20 6e 65 78  |  \ point to nex|
00003da0  74 20 6e 79 62 62 6c 65  0d 0a 20 32 31 30 30 20  |t nybble.. 2100 |
00003db0  20 20 20 20 20 20 20 20  4c 44 41 20 62 75 66 66  |        LDA buff|
00003dc0  2c 58 20 20 20 20 5c 20  6c 6f 61 64 20 56 50 53  |,X    \ load VPS|
00003dd0  20 6e 79 62 62 6c 65 0d  0a 20 32 31 31 30 20 20  | nybble.. 2110  |
00003de0  20 20 20 20 20 20 20 4f  52 41 20 74 65 6d 70 20  |       ORA temp |
00003df0  20 20 20 20 20 5c 20 6a  6f 69 6e 20 74 77 6f 20  |     \ join two |
00003e00  6e 79 62 62 6c 65 73 20  69 6e 74 6f 20 6f 6e 65  |nybbles into one|
00003e10  20 62 79 74 65 0d 0a 20  32 31 32 30 20 20 20 20  | byte.. 2120    |
00003e20  20 20 20 20 20 53 54 41  20 76 70 73 2c 59 20 20  |     STA vps,Y  |
00003e30  20 20 20 5c 20 61 6e 64  20 73 74 6f 72 65 20 69  |   \ and store i|
00003e40  6e 20 7a 65 72 6f 20 70  61 67 65 0d 0a 20 32 31  |n zero page.. 21|
00003e50  33 30 20 20 20 20 20 20  20 20 20 44 45 58 20 20  |30         DEX  |
00003e60  20 20 20 20 20 20 20 20  20 5c 20 70 6f 69 6e 74  |         \ point|
00003e70  20 74 6f 20 6e 65 78 74  20 6e 79 62 62 6c 65 0d  | to next nybble.|
00003e80  0a 20 32 31 34 30 20 20  20 20 20 20 20 20 20 44  |. 2140         D|
00003e90  45 59 20 20 20 20 20 20  20 20 20 20 20 5c 20 70  |EY           \ p|
00003ea0  6f 69 6e 74 20 74 6f 20  6e 65 78 74 20 62 79 74  |oint to next byt|
00003eb0  65 0d 0a 20 32 31 35 30  20 20 20 20 20 20 20 20  |e.. 2150        |
00003ec0  20 42 50 4c 20 6a 6f 69  6e 20 20 20 20 20 20 5c  | BPL join      \|
00003ed0  20 62 72 61 6e 63 68 20  69 66 20 6d 6f 72 65 20  | branch if more |
00003ee0  56 50 53 20 62 79 74 65  73 0d 0a 20 32 31 36 30  |VPS bytes.. 2160|
00003ef0  20 20 20 20 20 20 20 20  20 4c 44 58 20 23 26 30  |         LDX #&0|
00003f00  34 20 20 20 20 20 20 5c  20 56 50 53 20 6e 6f 77  |4      \ VPS now|
00003f10  20 69 6e 20 35 20 7a 65  72 6f 20 70 61 67 65 20  | in 5 zero page |
00003f20  62 79 74 65 73 0d 0a 20  32 31 37 30 20 2e 6f 75  |bytes.. 2170 .ou|
00003f30  74 65 72 6c 6f 6f 70 0d  0a 20 32 31 38 30 20 20  |terloop.. 2180  |
00003f40  20 20 20 20 20 20 20 4c  44 41 20 76 70 73 2c 58  |       LDA vps,X|
00003f50  20 20 20 20 20 5c 20 72  65 76 65 72 73 65 20 62  |     \ reverse b|
00003f60  69 74 73 20 69 6e 20 61  6c 6c 20 56 50 53 20 62  |its in all VPS b|
00003f70  79 74 65 73 0d 0a 20 32  31 39 30 20 20 20 20 20  |ytes.. 2190     |
00003f80  20 20 20 20 53 54 41 20  74 65 6d 70 20 20 20 20  |    STA temp    |
00003f90  20 20 5c 20 74 65 6d 70  6f 72 61 72 79 20 7a 65  |  \ temporary ze|
00003fa0  72 6f 20 70 61 67 65 20  73 74 6f 72 65 0d 0a 20  |ro page store.. |
00003fb0  32 32 30 30 20 20 20 20  20 20 20 20 20 4c 44 59  |2200         LDY|
00003fc0  20 23 26 30 37 0d 0a 20  32 32 31 30 20 2e 69 6e  | #&07.. 2210 .in|
00003fd0  6e 65 72 6c 6f 6f 70 0d  0a 20 32 32 32 30 20 20  |nerloop.. 2220  |
00003fe0  20 20 20 20 20 20 20 52  4f 4c 20 74 65 6d 70 20  |       ROL temp |
00003ff0  20 20 20 20 20 5c 20 62  69 74 20 69 6e 74 6f 20  |     \ bit into |
00004000  63 61 72 72 79 0d 0a 20  32 32 33 30 20 20 20 20  |carry.. 2230    |
00004010  20 20 20 20 20 52 4f 52  20 41 20 20 20 20 20 20  |     ROR A      |
00004020  20 20 20 5c 20 63 61 72  72 79 20 69 6e 74 6f 20  |   \ carry into |
00004030  61 63 63 75 6d 75 6c 61  74 6f 72 0d 0a 20 32 32  |accumulator.. 22|
00004040  34 30 20 20 20 20 20 20  20 20 20 44 45 59 0d 0a  |40         DEY..|
00004050  20 32 32 35 30 20 20 20  20 20 20 20 20 20 42 50  | 2250         BP|
00004060  4c 20 69 6e 6e 65 72 6c  6f 6f 70 0d 0a 20 32 32  |L innerloop.. 22|
00004070  36 30 20 20 20 20 20 20  20 20 20 53 54 41 20 76  |60         STA v|
00004080  70 73 2c 58 20 20 20 20  20 5c 20 73 74 6f 72 65  |ps,X     \ store|
00004090  20 72 65 76 65 72 73 65  64 20 62 79 74 65 0d 0a  | reversed byte..|
000040a0  20 32 32 37 30 20 20 20  20 20 20 20 20 20 44 45  | 2270         DE|
000040b0  58 0d 0a 20 32 32 38 30  20 20 20 20 20 20 20 20  |X.. 2280        |
000040c0  20 42 50 4c 20 6f 75 74  65 72 6c 6f 6f 70 20 5c  | BPL outerloop \|
000040d0  20 67 6f 20 62 61 63 6b  20 69 66 20 6d 6f 72 65  | go back if more|
000040e0  20 56 50 53 20 62 79 74  65 73 0d 0a 20 32 32 39  | VPS bytes.. 229|
000040f0  30 20 20 20 20 20 20 20  20 20 52 54 53 0d 0a 20  |0         RTS.. |
00004100  32 33 30 30 20 2e 6f 6c  64 69 72 71 32 76 0d 0a  |2300 .oldirq2v..|
00004110  20 32 33 31 30 20 20 20  20 20 20 20 20 20 45 51  | 2310         EQ|
00004120  55 57 20 26 30 30 0d 0a  20 32 33 32 30 20 2e 68  |UW &00.. 2320 .h|
00004130  61 6d 74 61 62 6c 65 0d  0a 20 32 33 33 30 20 20  |amtable.. 2330  |
00004140  20 20 20 20 20 20 20 45  51 55 44 20 26 30 31 30  |       EQUD &010|
00004150  31 46 46 30 31 20 0d 0a  20 32 33 34 30 20 20 20  |1FF01 .. 2340   |
00004160  20 20 20 20 20 20 45 51  55 44 20 26 46 46 30 31  |      EQUD &FF01|
00004170  30 30 46 46 20 0d 0a 20  32 33 35 30 20 20 20 20  |00FF .. 2350    |
00004180  20 20 20 20 20 45 51 55  44 20 26 46 46 30 31 30  |     EQUD &FF010|
00004190  32 46 46 20 0d 0a 20 32  33 36 30 20 20 20 20 20  |2FF .. 2360     |
000041a0  20 20 20 20 45 51 55 44  20 26 30 37 46 46 46 46  |    EQUD &07FFFF|
000041b0  30 41 0d 0a 20 32 33 37  30 20 20 20 20 20 20 20  |0A.. 2370       |
000041c0  20 20 45 51 55 44 20 26  46 46 30 31 30 30 46 46  |  EQUD &FF0100FF|
000041d0  20 0d 0a 20 32 33 38 30  20 20 20 20 20 20 20 20  | .. 2380        |
000041e0  20 45 51 55 44 20 26 30  30 46 46 30 30 30 30 20  | EQUD &00FF0000 |
000041f0  0d 0a 20 32 33 39 30 20  20 20 20 20 20 20 20 20  |.. 2390         |
00004200  45 51 55 44 20 26 30 42  46 46 46 46 30 36 20 0d  |EQUD &0BFFFF06 .|
00004210  0a 20 32 34 30 30 20 20  20 20 20 20 20 20 20 45  |. 2400         E|
00004220  51 55 44 20 26 46 46 30  33 30 30 46 46 0d 0a 20  |QUD &FF0300FF.. |
00004230  32 34 31 30 20 20 20 20  20 20 20 20 20 45 51 55  |2410         EQU|
00004240  44 20 26 46 46 30 31 30  43 46 46 20 0d 0a 20 32  |D &FF010CFF .. 2|
00004250  34 32 30 20 20 20 20 20  20 20 20 20 45 51 55 44  |420         EQUD|
00004260  20 26 30 37 46 46 46 46  30 34 20 0d 0a 20 32 34  | &07FFFF04 .. 24|
00004270  33 30 20 20 20 20 20 20  20 20 20 45 51 55 44 20  |30         EQUD |
00004280  26 30 37 46 46 46 46 30  36 20 0d 0a 20 32 34 34  |&07FFFF06 .. 244|
00004290  30 20 20 20 20 20 20 20  20 20 45 51 55 44 20 26  |0         EQUD &|
000042a0  30 37 30 37 30 37 46 46  0d 0a 20 32 34 35 30 20  |070707FF.. 2450 |
000042b0  20 20 20 20 20 20 20 20  45 51 55 44 20 26 30 35  |        EQUD &05|
000042c0  46 46 46 46 30 36 20 0d  0a 20 32 34 36 30 20 20  |FFFF06 .. 2460  |
000042d0  20 20 20 20 20 20 20 45  51 55 44 20 26 46 46 30  |       EQUD &FF0|
000042e0  44 30 30 46 46 20 0d 0a  20 32 34 37 30 20 20 20  |D00FF .. 2470   |
000042f0  20 20 20 20 20 20 45 51  55 44 20 26 46 46 30 36  |      EQUD &FF06|
00004300  30 36 30 36 20 0d 0a 20  32 34 38 30 20 20 20 20  |0606 .. 2480    |
00004310  20 20 20 20 20 45 51 55  44 20 26 30 37 46 46 46  |     EQUD &07FFF|
00004320  46 30 36 0d 0a 20 32 34  39 30 20 20 20 20 20 20  |F06.. 2490      |
00004330  20 20 20 45 51 55 44 20  26 46 46 30 31 30 32 46  |   EQUD &FF0102F|
00004340  46 20 0d 0a 20 32 35 30  30 20 20 20 20 20 20 20  |F .. 2500       |
00004350  20 20 45 51 55 44 20 26  30 39 46 46 46 46 30 34  |  EQUD &09FFFF04|
00004360  20 0d 0a 20 32 35 31 30  20 20 20 20 20 20 20 20  | .. 2510        |
00004370  20 45 51 55 44 20 26 30  32 46 46 30 32 30 32 20  | EQUD &02FF0202 |
00004380  0d 0a 20 32 35 32 30 20  20 20 20 20 20 20 20 20  |.. 2520         |
00004390  45 51 55 44 20 26 46 46  30 33 30 32 46 46 0d 0a  |EQUD &FF0302FF..|
000043a0  20 32 35 33 30 20 20 20  20 20 20 20 20 20 45 51  | 2530         EQ|
000043b0  55 44 20 26 30 35 46 46  46 46 30 38 20 0d 0a 20  |UD &05FFFF08 .. |
000043c0  32 35 34 30 20 20 20 20  20 20 20 20 20 45 51 55  |2540         EQU|
000043d0  44 20 26 46 46 30 33 30  30 46 46 20 0d 0a 20 32  |D &FF0300FF .. 2|
000043e0  35 35 30 20 20 20 20 20  20 20 20 20 45 51 55 44  |550         EQUD|
000043f0  20 26 46 46 30 33 30 32  46 46 20 0d 0a 20 32 35  | &FF0302FF .. 25|
00004400  36 30 20 20 20 20 20 20  20 20 20 45 51 55 44 20  |60         EQUD |
00004410  26 30 33 30 33 46 46 30  33 0d 0a 20 32 35 37 30  |&0303FF03.. 2570|
00004420  20 20 20 20 20 20 20 20  20 45 51 55 44 20 26 30  |         EQUD &0|
00004430  35 46 46 46 46 30 34 20  0d 0a 20 32 35 38 30 20  |5FFFF04 .. 2580 |
00004440  20 20 20 20 20 20 20 20  45 51 55 44 20 26 46 46  |        EQUD &FF|
00004450  30 34 30 34 30 34 20 0d  0a 20 32 35 39 30 20 20  |040404 .. 2590  |
00004460  20 20 20 20 20 20 20 45  51 55 44 20 26 46 46 30  |       EQUD &FF0|
00004470  46 30 32 46 46 20 0d 0a  20 32 36 30 30 20 20 20  |F02FF .. 2600   |
00004480  20 20 20 20 20 20 45 51  55 44 20 26 30 37 46 46  |      EQUD &07FF|
00004490  46 46 30 34 0d 0a 20 32  36 31 30 20 20 20 20 20  |FF04.. 2610     |
000044a0  20 20 20 20 45 51 55 44  20 26 30 35 30 35 30 35  |    EQUD &050505|
000044b0  46 46 20 0d 0a 20 32 36  32 30 20 20 20 20 20 20  |FF .. 2620      |
000044c0  20 20 20 45 51 55 44 20  26 30 35 46 46 46 46 30  |   EQUD &05FFFF0|
000044d0  34 20 0d 0a 20 32 36 33  30 20 20 20 20 20 20 20  |4 .. 2630       |
000044e0  20 20 45 51 55 44 20 26  30 35 46 46 46 46 30 36  |  EQUD &05FFFF06|
000044f0  20 0d 0a 20 32 36 34 30  20 20 20 20 20 20 20 20  | .. 2640        |
00004500  20 45 51 55 44 20 26 46  46 30 33 30 45 46 46 0d  | EQUD &FF030EFF.|
00004510  0a 20 32 36 35 30 20 20  20 20 20 20 20 20 20 45  |. 2650         E|
00004520  51 55 44 20 26 46 46 30  31 30 43 46 46 20 0d 0a  |QUD &FF010CFF ..|
00004530  20 32 36 36 30 20 20 20  20 20 20 20 20 20 45 51  | 2660         EQ|
00004540  55 44 20 26 30 39 46 46  46 46 30 41 20 0d 0a 20  |UD &09FFFF0A .. |
00004550  32 36 37 30 20 20 20 20  20 20 20 20 20 45 51 55  |2670         EQU|
00004560  44 20 26 30 42 46 46 46  46 30 41 20 0d 0a 20 32  |D &0BFFFF0A .. 2|
00004570  36 38 30 20 20 20 20 20  20 20 20 20 45 51 55 44  |680         EQUD|
00004580  20 26 46 46 30 41 30 41  30 41 0d 0a 20 32 36 39  | &FF0A0A0A.. 269|
00004590  30 20 20 20 20 20 20 20  20 20 45 51 55 44 20 26  |0         EQUD &|
000045a0  30 42 46 46 46 46 30 38  20 0d 0a 20 32 37 30 30  |0BFFFF08 .. 2700|
000045b0  20 20 20 20 20 20 20 20  20 45 51 55 44 20 26 46  |         EQUD &F|
000045c0  46 30 44 30 30 46 46 20  0d 0a 20 32 37 31 30 20  |F0D00FF .. 2710 |
000045d0  20 20 20 20 20 20 20 20  45 51 55 44 20 26 30 42  |        EQUD &0B|
000045e0  30 42 30 42 46 46 20 0d  0a 20 32 37 32 30 20 20  |0B0BFF .. 2720  |
000045f0  20 20 20 20 20 20 20 45  51 55 44 20 26 30 42 46  |       EQUD &0BF|
00004600  46 46 46 30 41 0d 0a 20  32 37 33 30 20 20 20 20  |FFF0A.. 2730    |
00004610  20 20 20 20 20 45 51 55  44 20 26 30 43 46 46 30  |     EQUD &0CFF0|
00004620  43 30 43 20 0d 0a 20 32  37 34 30 20 20 20 20 20  |C0C .. 2740     |
00004630  20 20 20 20 45 51 55 44  20 26 46 46 30 44 30 43  |    EQUD &FF0D0C|
00004640  46 46 20 0d 0a 20 32 37  35 30 20 20 20 20 20 20  |FF .. 2750      |
00004650  20 20 20 45 51 55 44 20  26 46 46 30 46 30 43 46  |   EQUD &FF0F0CF|
00004660  46 20 0d 0a 20 32 37 36  30 20 20 20 20 20 20 20  |F .. 2760       |
00004670  20 20 45 51 55 44 20 26  30 37 46 46 46 46 30 41  |  EQUD &07FFFF0A|
00004680  0d 0a 20 32 37 37 30 20  20 20 20 20 20 20 20 20  |.. 2770         |
00004690  45 51 55 44 20 26 46 46  30 44 30 43 46 46 20 0d  |EQUD &FF0D0CFF .|
000046a0  0a 20 32 37 38 30 20 20  20 20 20 20 20 20 20 45  |. 2780         E|
000046b0  51 55 44 20 26 30 44 30  44 46 46 30 44 20 0d 0a  |QUD &0D0DFF0D ..|
000046c0  20 32 37 39 30 20 20 20  20 20 20 20 20 20 45 51  | 2790         EQ|
000046d0  55 44 20 26 30 42 46 46  46 46 30 36 20 0d 0a 20  |UD &0BFFFF06 .. |
000046e0  32 38 30 30 20 20 20 20  20 20 20 20 20 45 51 55  |2800         EQU|
000046f0  44 20 26 46 46 30 44 30  45 46 46 0d 0a 20 32 38  |D &FF0D0EFF.. 28|
00004700  31 30 20 20 20 20 20 20  20 20 20 45 51 55 44 20  |10         EQUD |
00004710  26 30 39 46 46 46 46 30  38 20 0d 0a 20 32 38 32  |&09FFFF08 .. 282|
00004720  30 20 20 20 20 20 20 20  20 20 45 51 55 44 20 26  |0         EQUD &|
00004730  30 39 30 39 30 39 46 46  20 0d 0a 20 32 38 33 30  |090909FF .. 2830|
00004740  20 20 20 20 20 20 20 20  20 45 51 55 44 20 26 46  |         EQUD &F|
00004750  46 30 46 30 32 46 46 20  0d 0a 20 32 38 34 30 20  |F0F02FF .. 2840 |
00004760  20 20 20 20 20 20 20 20  45 51 55 44 20 26 30 39  |        EQUD &09|
00004770  46 46 46 46 30 41 0d 0a  20 32 38 35 30 20 20 20  |FFFF0A.. 2850   |
00004780  20 20 20 20 20 20 45 51  55 44 20 26 46 46 30 38  |      EQUD &FF08|
00004790  30 38 30 38 20 0d 0a 20  32 38 36 30 20 20 20 20  |0808 .. 2860    |
000047a0  20 20 20 20 20 45 51 55  44 20 26 30 39 46 46 46  |     EQUD &09FFF|
000047b0  46 30 38 20 0d 0a 20 32  38 37 30 20 20 20 20 20  |F08 .. 2870     |
000047c0  20 20 20 20 45 51 55 44  20 26 30 42 46 46 46 46  |    EQUD &0BFFFF|
000047d0  30 38 20 0d 0a 20 32 38  38 30 20 20 20 20 20 20  |08 .. 2880      |
000047e0  20 20 20 45 51 55 44 20  26 46 46 30 33 30 45 46  |   EQUD &FF030EF|
000047f0  46 0d 0a 20 32 38 39 30  20 20 20 20 20 20 20 20  |F.. 2890        |
00004800  20 45 51 55 44 20 26 46  46 30 46 30 43 46 46 20  | EQUD &FF0F0CFF |
00004810  0d 0a 20 32 39 30 30 20  20 20 20 20 20 20 20 20  |.. 2900         |
00004820  45 51 55 44 20 26 30 39  46 46 46 46 30 34 20 0d  |EQUD &09FFFF04 .|
00004830  0a 20 32 39 31 30 20 20  20 20 20 20 20 20 20 45  |. 2910         E|
00004840  51 55 44 20 26 30 46 30  46 46 46 30 46 20 0d 0a  |QUD &0F0FFF0F ..|
00004850  20 32 39 32 30 20 20 20  20 20 20 20 20 20 45 51  | 2920         EQ|
00004860  55 44 20 26 46 46 30 46  30 45 46 46 0d 0a 20 32  |UD &FF0F0EFF.. 2|
00004870  39 33 30 20 20 20 20 20  20 20 20 20 45 51 55 44  |930         EQUD|
00004880  20 26 30 35 46 46 46 46  30 38 20 0d 0a 20 32 39  | &05FFFF08 .. 29|
00004890  34 30 20 20 20 20 20 20  20 20 20 45 51 55 44 20  |40         EQUD |
000048a0  26 46 46 30 44 30 45 46  46 20 0d 0a 20 32 39 35  |&FF0D0EFF .. 295|
000048b0  30 20 20 20 20 20 20 20  20 20 45 51 55 44 20 26  |0         EQUD &|
000048c0  46 46 30 46 30 45 46 46  20 0d 0a 20 32 39 36 30  |FF0F0EFF .. 2960|
000048d0  20 20 20 20 20 20 20 20  20 45 51 55 44 20 26 30  |         EQUD &0|
000048e0  45 46 46 30 45 30 45 0d  0a 20 32 39 37 30 20 5d  |EFF0E0E.. 2970 ]|
000048f0  0d 0a 20 32 39 38 30 20  4e 45 58 54 0d 0a 20 32  |.. 2980 NEXT.. 2|
00004900  39 39 30 20 45 4e 44 50  52 4f 43 0d 0a           |990 ENDPROC..|
0000490d
14-04-89/T\TTX06.m0
14-04-89/T\TTX06.m1
14-04-89/T\TTX06.m2
14-04-89/T\TTX06.m4
14-04-89/T\TTX06.m5