Home » CEEFAX disks » telesoftware14.adl » 27-03-89/T\TTX03

27-03-89/T\TTX03

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » CEEFAX disks » telesoftware14.adl
Filename: 27-03-89/T\TTX03
Read OK:
File size: 65EF bytes
Load address: 0000
Exec address: FFFFFFFF
File contents
Interfacing with the Acorn Teletext Adaptor - by - Gordon Horsington
--------------------------------------------------------------------

Module 3. A Simple page grabber
-------------------------------

The most important part of designing a page grabber is being able to
determine where a page begins and ends. The data stored in the header
packet are used to find the start of a page. The magazine, page and
sub-page numbers are stored in every header and the magazine number is
stored in every packet. This information is used to find the start of a
page and to identify every packet which is associated with that page. A
page is complete when a header with the same magazine number, but a
different page number, is received. Page number FF always indicates the
end of a page but not the start of a new page. A page, and the packets
within a page, can be identified using the following rules:


1) A page starts when a header with the required magazine, page and
   sub-page numbers is received.

2) A header with a page number FF and the same magazine number as the page
   being loaded marks the end of a page.

3) A header with the same magazine number but a different page number to
   the page being loaded marks the end of a page. If the page number is
   not FF this packet also marks the beginning of the next page.

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

5) Packets 30 and 31 are page independent.

6) Packet numbers greater than 24 can be ignored unless the CRC bytes from
   packet 27 type 0 are to be used.


These rules can be used to identify any page in either serial or parallel
magazines with the exception of subtitles. The program GRABBER uses these
rules to identify pages. If you decide to modify GRABBER to display
subtitles you need to know that subtitles are the only page currently
broadcast in magazine 0 (interpreted as magazine 8) so that the only page
number that can be different from the subtitle page (page 888) can be page
0FF (ie. page 8FF). If this header is not broadcast then the page grabber
will never find the end of the page it is loading and therefore never
display the subtitle. One way of identifying a subtitle page is to test
for the presence of the subtitle control bit in the header packet to find
the start of a subtitle page, and the absence of the subtitle control bit
to find the end of the page.

The simple page grabber program GRABBER is used to illustrate the
techniques needed to display a complete Teletext page. In order to keep
the program reasonably small and easy to understand it does not include
all the features of the more sophisticated page grabber used by the ATS
and TFS. The demonstration program looks for a particular page using only
the magazine and page number to identify the page. It does not search for
specific sub-pages. All data are erased from the page buffer after they
are displayed and the inhibit display control bit is ignored. Subtitles
are not displayed, but all concealed characters are displayed.

Because the use of the header packet is central to understanding the
design of a page grabber, the table in figure 1 shows the complete format
of the header packet and where the program GRABBER stores the header data
it reads from the adaptor.

The byte number in the left hand column of figure 1 shows the order in
which the data are stored in the adaptor. The next column shows whether or
not the data are hamming coded (hc = hamming coded, blank = not coded),
the third column gives a brief description of the byte (or bits from the
byte), the next column shows where the byte (or bits from the byte) are
stored in the page buffer, and the last column describes the format in
which the program GRABBER stores the data (blank = stored as read).


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

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


The flag byte labelled grabflag can take three values in the program
GRABBER. It stores the number &00 when the program is searching for a
specific page. It stores &40 when the header for a page has been found and
the packets associated with that page are being loaded, and it stores &80
when the header which marks the end of the page has been found. When
grabflag stores the number &80 the foreground task prints the contents of
the page grabber buffer on a mode 7 screen and, after printing, it clears
the flag byte. The foreground task also prints the header data bytes
whenever it has the opportunity to do so (lines 640 to 720).

Some, but not all, of the header control bits are used to control the
display of the Teletext page. Because subtitles would not be displayed
correctly by this program, they are identified by the subtitle control bit
and rejected (lines 1900 to 1920). Suppressed and out of sequence headers
are identified so that they are not displayed (lines 2060 to 2080).
Parallel magazines are also identified so that, if they are used, only the
headers from the magazine being searched for will be displayed (lines 2090
to 2130).

Figure 2 shows the format of packets 1 to 24. These, with bytes 14 to 45
of the header, are the only packets displayed on the screen. Packets 25 to
31 are neither stored nor displayed.


+-------+----+---------------------------+------------------+-----------+
|byte no|code| description               | stored in        | format    |
+-------+----+---------------------------+------------------+-----------+
|  1    |    | clock run-in              | (not read)       |           |
|  2    |    | clock run-in              | (not read)       |           |
|  3    |    | framing code              | (not stored)     |           |
|  4    | hc | magazine no. in bits 0-2  | magazine         | de-hammed |
|  4    | hc | bit 4 of pack no in bit 3 | packet           | de-hammed |
|  5    | hc | packet number             | packet           | de-hammed |
| 6-45  |    | data for display          | using offset     |           |
|       |    |                           | from bufftable   |           |
+-------+----+---------------------------+------------------+-----------+

Figure 2. The data transmitted in packets 1 to 24
-------------------------------------------------


The packet number is used to determine where the data read from the
adaptor are stored in the page buffer, and hence where on the screen they
are displayed. A look up table labelled 'bufftable' is used to find the
address within the page buffer. Packets 1 to 23 from the page buffer are
displayed on the screen when all the packets from the required page have
been downloaded from the adaptor. As the data are read from the buffer and
written to the screen the buffer is filled with the space character (lines
3040 and 3050). Because data are only ever stored in the buffer when the
required page has been identified, any packets that have not been
broadcast are displayed as spaces. There is an exception to this rule
which is dealt with by the subroutine checkdouble (lines 2330 to 2750).

Double height characters are only broadcast once but have to be displayed
twice on consecutive screen rows. The subroutine checkdouble searches the
page buffer for the double height character and, when it is found,
duplicates the packet to ensure the correct display is produced. You can
remove line 590 to see the effect of not making this correction. The
conceal display character is also identified and replaced with a space
character (line 2670 and lines 2760 to 2820). This is a short cut avoiding
the use of a reveal control. There is plenty of scope for improving this
part of the program.

The buffer used to store the Teletext packets is cleared before calling
the machine code page grabber (lines 60 to 80). This ensures that only the
Teletext data from the required page are printed on the screen. As the
bytes in the buffer are printed (lines 2950 to 3120) the buffer is cleared
for the next page (lines 3040 to 3050). Clearing the buffer as it is
printed ensures that the next page to be grabbed will have a clear buffer
in which to store its data. This is perhaps the most simple method of
making sure that only the received data are displayed. This technique can
be used because the buffer only ever needs to store any data when a page
is either loaded or being loaded. In the program used to illustrate the
next module, this simple method of clearing the buffer after printing will
not work because the program searches for a page which contains specific
data and the contents of the buffer are always changing as new data are
stored and searched.


   10 REM> GRABBER
   20 MODE7
   30 DIM mcode &1000 :REM: space for machine code
   40 DIM buffer &400 :REM: page grabber buffer
   50 end=buffer+&3E4
   60 FORpass=buffer TO end STEP4
   70 pass!0=0 :REM: clear buffer
   80 NEXT
   90 PROCmcode :REM: assemble machine code
  100 INPUT"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 INPUT"Page number (3 digits) = "answer$
  150 usermag?0=(EVAL("&"+LEFT$(answer$,1))AND 7)
  160 userpage?1=EVAL("&"+MID$(answer$,2,1))
  170 ?userpage=EVAL("&"+MID$(answer$,3,1))
  180 VDU12,23,1,0;0;0;0;
  190 CALL mcode
  200 VDU30,23,1,1;0;0;0;
  210 END
  220 DEFPROCmcode
  230 packet=&70 :REM: row number of current packet
  240 magazine=&71 :REM: magazine number of current page
  250 grabflag=&72 :REM: 0=searching, &40=loading, &80=loaded
  260 usermag=&73 :REM: search for magazine
  270 userpage=&74 :REM: search for page, low byte + high byte
  280 workspace=&76 :REM: 2 byte workspace
  290 destination=&78 :REM: another 2 byte workspace
  300 channel=&7A :REM: TV channel
  310 irq2v=&206 :REM: IRQ2 vector
  320 ttxcontrol=&FC10 :REM: TTX control register, write only
  330 ttxstatus=&FC10 :REM: TTX status register, read only
  340 rowreg=&FC11 :REM: TTX row register, write only
  350 datareg=&FC12 :REM: TTX data register, read & write
  360 statclr=&FC13 :REM: TTX clear status register, read & write
  370 oswrch=&FFEE
  380 osbyte=&FFF4
  390 FOR pass=0 TO 2 STEP 2
  400 P%=mcode
  410 [       OPT pass
  420         LDA #&00
  430         STA grabflag  \ grabflag = searching
  440         LDX irq2v     \ load secondary interrupt vector
  450         LDY irq2v+1
  460         STX oldirq2v  \ save secondary interrupt vector
  470         STY oldirq2v+1
  480         LDX #interrupt MOD 256 \ install new interrupt routine
  490         LDY #interrupt DIV 256
  500         SEI           \ disable interrupts when altering vectors
  510         STX irq2v
  520         STY irq2v+1
  530         CLI           \ re-enable interrupts
  540         LDA channel   \ load (channel number + #&1C)
  550         STA ttxcontrol \ enable TTX
  560 .mainloop
  570         LDA grabflag  \ bit 7 set if read to display
  580         BPL continue  \ branch if searching or loading
  590         JSR checkdouble \ check for double height characters
  600         JSR transfer  \ transfer data to screen
  610         LDA #&00
  620         STA grabflag  \ searching again
  630 .continue
  640         LDX #&00      \ screen row
  650         LDY #&08      \ screen column
  660         JSR vdu31     \ VDU 31,8,0
  670 .headloop
  680         LDA buffer,Y
  690         JSR oswrch    \ write header on screen
  700         INY
  710         CPY #&28      \ decimal 40
  720         BCC headloop
  730         BIT &FF       \ poll escape flag
  740         BPL mainloop  \ loop if escape not pressed
  750         LDA #&7E      \ decimal 126
  760         JSR osbyte    \ acknowledge escape
  770         LDA #&00
  780         STA ttxcontrol \ disable TTX
  790         LDX oldirq2v  \ load original vector
  800         LDY oldirq2v+1
  810         SEI           \ disable interrupts when altering vector
  820         STX irq2v     \ restore original vector
  830         STY irq2v+1
  840         CLI           \ re-enable interrupts
  850         RTS           \ return to BASIC
  860 .interrupt
  870         BIT ttxstatus \ poll TTX hardware
  880         BMI ttxinter  \ branch if TTX interrupt
  890         JMP (oldirq2v) \ not TTX interrupt
  900 .ttxinter
  910         LDA &FC       \ interrupt accumulator save register
  920         PHA           \ push interrupt accumulator save register
  930         TXA
  940         PHA           \ push X
  950         TYA
  960         PHA           \ push Y
  970         BIT grabflag  \ is a page ready for display?
  980         BMI clearstatus \ clear status and RTI if page grabbed
  990         CLD           \ clear decimal flag
 1000         LDY #&00      \ start with row 0
 1010 .readttxt
 1020         STY rowreg    \ try rows 0 to 15
 1030         LDA datareg   \ load framing code (#&27)
 1040         BEQ emptyrow  \ if zero try next row
 1050         TYA
 1060         PHA           \ save row number
 1070         JSR readpacket
 1080         PLA
 1090         TAY           \ restore row number
 1100 .emptyrow
 1110         INY           \ increment row number
 1120         CPY #&10      \ try rows 0 - 15
 1130         BNE readttxt
 1140 .clearstatus
 1150         LDA #&00
 1160         LDY #&0F      \ clear 16 rows in adaptor
 1170 .clearloop
 1180         STY rowreg
 1190         STA datareg
 1200         DEY
 1210         BPL clearloop
 1220         STA statclr   \ clear status flags before returning
 1230         PLA
 1240         TAY           \ restore Y
 1250         PLA
 1260         TAX           \ restore X
 1270         PLA
 1280         STA &FC       \ restore interrupt accumulator save register
 1290         RTI           \ return from interrupt
 1300 .testflag
 1310         LDA grabflag
 1320         BEQ exit      \ exit if searching
 1330         LDA #&80      \ if loading mark as loaded
 1340         STA grabflag  \ page loaded
 1350 .exit
 1360         RTS
 1370 .readpacket
 1380         LDY datareg   \ read magazine number
 1390         LDA hamtable,Y \ de-ham it
 1400         BMI testflag  \ stop loading if error
 1410         STA magazine  \ save magazine number
 1420         LDY datareg   \ read packet number
 1430         LDA hamtable,Y \ de-ham it
 1440         BMI testflag  \ stop loading if error
 1450         STA packet    \ save packet number
 1460         LDA magazine  \ load magazine number
 1470         CMP #&08      \ bit 3 of mag. number is bit 0 of packet
                            \ number
 1480         ROL packet    \ 5 bit packet number
 1490         AND #&07      \ use only bits 0-2
 1500         STA magazine  \ 3 bit magazine number
 1510         LDA packet
 1520         CMP #&18      \ ignore TSDP, Datacast, etc.
 1530         BCS exit      \ ie. use Level 1 Teletext only
 1540         PHA           \ push packet number
 1550         ASL A         \ packet number * 2
 1560         TAY
 1570         LDA bufftable,Y \ load buffer address, lsb
 1580         STA workspace \ store in zero page
 1590         LDA bufftable+1,Y \ load buffer address, msb
 1600         STA workspace+1 \ store in zero page
 1610         PLA           \ pull packet number
 1620         CMP #&00      \ is it a header?
 1630         BNE notheader \ branch if not header
 1640         TAX           \ init index for hammed data
 1650 .readheader
 1660         LDY datareg   \ read data register
 1670         LDA hamtable,Y \ de-ham it
 1680         BMI testflag  \ stop loading if error
 1690         STA buffer,X  \ store de-hammed data
 1700         INX           \ increment index
 1710         CPX #&08      \ use X = 0-7
 1720         BCC readheader \ continue reading hammed data
 1730         LDA grabflag  \ are we loading or searching?
 1740         BEQ checkstart \ branch if searching
 1750         LDA magazine  \ we must be loading a page
 1760         CMP usermag   \ is it the magazine we want?
 1770         BNE out       \ branch if not the one we want
 1780         LDA buffer    \ low nybble of page number
 1790         CMP userpage  \ is this the same as the one we are loading?
 1800         BNE endfound  \ end of page when different
 1810         LDA buffer+1  \ high nybble of page number
 1820         CMP userpage+1 \ is this the same as the one we are loading?
 1830         BEQ out       \ not end of page if the same
 1840 .endfound
 1850         LDA #&80      \ same magazine but different page numbers
 1860         STA grabflag  \ page grabbed
 1870 .out
 1880         RTS
 1890 .checkstart
 1900         LDA buffer+5  \ check for subtitle
 1910         AND #&08      \ check bit 3
 1920         BNE out       \ reject subtitles
 1930         LDA magazine  \ load the header magazine number
 1940         CMP usermag   \ is it the one we want?
 1950         BNE nextbyte  \ branch if not the one
 1960         LDA userpage  \ load lsb of wanted page number
 1970         CMP buffer    \ the page we have
 1980         BNE nextbyte  \ branch if not the one we want
 1990         LDA userpage+1 \ load msb of wanted page number
 2000         CMP buffer+1  \ the page we have
 2010         BNE nextbyte  \ branch if not the one we want
 2020         LDA #&40      \ load this page
 2030         STA grabflag  \ page loading
 2040         RTS
 2050 .nextbyte
 2060         LDA buffer+6  \ check for suppress and out of sequence
 2070         AND #&05      \ check bits 0 and 2
 2080         BNE return    \ reject suppress and out of sequence
 2090         LSR buffer+7  \ check for serial magazine
 2100         BCS display   \ load the rest of the header
 2110         LDA magazine  \ current magazine number
 2120         CMP usermag   \ load if same magazine
 2130         BNE return    \ don't load if different magazine
 2140 .display
 2150         LDY #&08      \ header data starts at byte 8
 2160         BNE readmore  \ go to read the header
 2170 .notheader
 2180         BIT grabflag  \ is a page loading?
 2190         BVC return    \ return if page not loading
 2200         LDA magazine  \ is the magazine number the one we want?
 2210         CMP usermag
 2220         BNE return    \ return if different magazine
 2230         LDY #&00      \ read bytes 0 - 39
 2240 .readmore
 2250         LDA datareg   \ read data register
 2260         ORA #&80      \ set bit 7
 2270         STA (workspace),Y \ store in buffer
 2280         INY           \ increment index
 2290         CPY #&28      \ decimal 40
 2300         BNE readmore  \ more data in this packet
 2310 .return
 2320         RTS
 2330 .checkdouble
 2340         LDX #&01      \ screen row numbers 1-23
 2350 .nextcolumn
 2360         LDY #&00      \ screen column numbers 0-40
 2370         JSR setup     \ set up workspace for indirect addressing
 2380 .singleloop
 2390         LDA (workspace),Y
 2400         JSR conceal   \ check for concealed display
 2410         CMP #&8D      \ TTX double height character
 2420         BEQ doubleheight
 2430         INY
 2440         CPY #&28      \ decimal 40
 2450         BCC singleloop
 2460 .carryset
 2470         INX
 2480         CPX #&18      \ decimal 24
 2490         BCC nextcolumn
 2500         RTS
 2510 .doubleheight
 2520         LDY #&00
 2530         TXA
 2540         PHA           \ store row number
 2550         INX
 2560         TXA
 2570         ASL A         \ (row number + 1) * 2
 2580         TAX
 2590         LDA bufftable,X
 2600         STA destination
 2610         LDA bufftable+1,X
 2620         STA destination+1
 2630         PLA
 2640         TAX           \ restore row number
 2650 .doubleloop
 2660         LDA (workspace),Y
 2670         JSR conceal   \ check for concealed display
 2680         STA (destination),Y
 2690         INY
 2700         CPY #&28      \ decimal 40
 2710         BCC doubleloop
 2720         INX
 2730         CPX #&17      \ decimal 23
 2740         BCC carryset
 2750         RTS
 2760 .conceal
 2770         CMP #&98      \ TTX conceal display character
 2780         BNE goback
 2790         LDA #ASC(" ") \ substitute with a space
 2800         STA (workspace),Y
 2810 .goback
 2820         RTS
 2830 .setup
 2840         TXA
 2850         PHA           \ store row number
 2860         ASL A         \ (row number) * 2
 2870         TAX
 2880         LDA bufftable,X
 2890         STA workspace
 2900         LDA bufftable+1,X
 2910         STA workspace+1
 2920         PLA
 2930         TAX           \ restore row number
 2940         RTS
 2950 .transfer
 2960         LDX #&01      \ screen rows 1-23
 2970 .nextline
 2980         LDY #&00      \ columns 0-39
 2990         JSR vdu31
 3000         JSR setup     \ set up workspace for indirect addressing
 3010 .writescreen
 3020         LDA (workspace),Y \ load data from buffer
 3030         JSR oswrch    \ write to screen
 3040         LDA #ASC(" ") \ space character
 3050         STA (workspace),Y \ clear buffer
 3060         INY
 3070         CPY #&28      \ decimal 40
 3080         BCC writescreen
 3090         INX
 3100         CPX #&18      \ decimal 24
 3110         BCC nextline
 3120         RTS
 3130 .vdu31
 3140         LDA #&1F      \ decimal 31
 3150         JSR oswrch
 3160         TYA
 3170         JSR oswrch
 3180         TXA
 3190         JMP oswrch    \ and return
 3200 .oldirq2v
 3210         EQUW &00
 3220 .hamtable
 3230         EQUD &0101FF01
 3240         EQUD &FF0100FF
 3250         EQUD &FF0102FF
 3260         EQUD &07FFFF0A
 3270         EQUD &FF0100FF
 3280         EQUD &00FF0000
 3290         EQUD &0BFFFF06
 3300         EQUD &FF0300FF
 3310         EQUD &FF010CFF
 3320         EQUD &07FFFF04
 3330         EQUD &07FFFF06
 3340         EQUD &070707FF
 3350         EQUD &05FFFF06
 3360         EQUD &FF0D00FF
 3370         EQUD &FF060606
 3380         EQUD &07FFFF06
 3390         EQUD &FF0102FF
 3400         EQUD &09FFFF04
 3410         EQUD &02FF0202
 3420         EQUD &FF0302FF
 3430         EQUD &05FFFF08
 3440         EQUD &FF0300FF
 3450         EQUD &FF0302FF
 3460         EQUD &0303FF03
 3470         EQUD &05FFFF04
 3480         EQUD &FF040404
 3490         EQUD &FF0F02FF
 3500         EQUD &07FFFF04
 3510         EQUD &050505FF
 3520         EQUD &05FFFF04
 3530         EQUD &05FFFF06
 3540         EQUD &FF030EFF
 3550         EQUD &FF010CFF
 3560         EQUD &09FFFF0A
 3570         EQUD &0BFFFF0A
 3580         EQUD &FF0A0A0A
 3590         EQUD &0BFFFF08
 3600         EQUD &FF0D00FF
 3610         EQUD &0B0B0BFF
 3620         EQUD &0BFFFF0A
 3630         EQUD &0CFF0C0C
 3640         EQUD &FF0D0CFF
 3650         EQUD &FF0F0CFF
 3660         EQUD &07FFFF0A
 3670         EQUD &FF0D0CFF
 3680         EQUD &0D0DFF0D
 3690         EQUD &0BFFFF06
 3700         EQUD &FF0D0EFF
 3710         EQUD &09FFFF08
 3720         EQUD &090909FF
 3730         EQUD &FF0F02FF
 3740         EQUD &09FFFF0A
 3750         EQUD &FF080808
 3760         EQUD &09FFFF08
 3770         EQUD &0BFFFF08
 3780         EQUD &FF030EFF
 3790         EQUD &FF0F0CFF
 3800         EQUD &09FFFF04
 3810         EQUD &0F0FFF0F
 3820         EQUD &FF0F0EFF
 3830         EQUD &05FFFF08
 3840         EQUD &FF0D0EFF
 3850         EQUD &FF0F0EFF
 3860         EQUD &0EFF0E0E
 3870 .bufftable
 3880         EQUW buffer
 3890         EQUW buffer+40
 3900         EQUW buffer+(2*40)
 3910         EQUW buffer+(3*40)
 3920         EQUW buffer+(4*40)
 3930         EQUW buffer+(5*40)
 3940         EQUW buffer+(6*40)
 3950         EQUW buffer+(7*40)
 3960         EQUW buffer+(8*40)
 3970         EQUW buffer+(9*40)
 3980         EQUW buffer+(10*40)
 3990         EQUW buffer+(11*40)
 4000         EQUW buffer+(12*40)
 4010         EQUW buffer+(13*40)
 4020         EQUW buffer+(14*40)
 4030         EQUW buffer+(15*40)
 4040         EQUW buffer+(16*40)
 4050         EQUW buffer+(17*40)
 4060         EQUW buffer+(18*40)
 4070         EQUW buffer+(19*40)
 4080         EQUW buffer+(20*40)
 4090         EQUW buffer+(21*40)
 4100         EQUW buffer+(22*40)
 4110         EQUW buffer+(23*40)
 4120         EQUW buffer+(24*40)
 4130 ]
 4140 NEXT
 4150 ENDPROC
00000000  49 6e 74 65 72 66 61 63  69 6e 67 20 77 69 74 68  |Interfacing with|
00000010  20 74 68 65 20 41 63 6f  72 6e 20 54 65 6c 65 74  | the Acorn Telet|
00000020  65 78 74 20 41 64 61 70  74 6f 72 20 2d 20 62 79  |ext Adaptor - by|
00000030  20 2d 20 47 6f 72 64 6f  6e 20 48 6f 72 73 69 6e  | - Gordon Horsin|
00000040  67 74 6f 6e 0d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |gton.-----------|
00000050  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000080  2d 2d 2d 2d 2d 2d 2d 2d  2d 0d 0d 4d 6f 64 75 6c  |---------..Modul|
00000090  65 20 33 2e 20 41 20 53  69 6d 70 6c 65 20 70 61  |e 3. A Simple pa|
000000a0  67 65 20 67 72 61 62 62  65 72 0d 2d 2d 2d 2d 2d  |ge grabber.-----|
000000b0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
000000c0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 0d 0d 54 68 65 20  |----------..The |
000000d0  6d 6f 73 74 20 69 6d 70  6f 72 74 61 6e 74 20 70  |most important p|
000000e0  61 72 74 20 6f 66 20 64  65 73 69 67 6e 69 6e 67  |art of designing|
000000f0  20 61 20 70 61 67 65 20  67 72 61 62 62 65 72 20  | a page grabber |
00000100  69 73 20 62 65 69 6e 67  20 61 62 6c 65 20 74 6f  |is being able to|
00000110  0d 64 65 74 65 72 6d 69  6e 65 20 77 68 65 72 65  |.determine where|
00000120  20 61 20 70 61 67 65 20  62 65 67 69 6e 73 20 61  | a page begins a|
00000130  6e 64 20 65 6e 64 73 2e  20 54 68 65 20 64 61 74  |nd ends. The dat|
00000140  61 20 73 74 6f 72 65 64  20 69 6e 20 74 68 65 20  |a stored in the |
00000150  68 65 61 64 65 72 0d 70  61 63 6b 65 74 20 61 72  |header.packet ar|
00000160  65 20 75 73 65 64 20 74  6f 20 66 69 6e 64 20 74  |e used to find t|
00000170  68 65 20 73 74 61 72 74  20 6f 66 20 61 20 70 61  |he start of a pa|
00000180  67 65 2e 20 54 68 65 20  6d 61 67 61 7a 69 6e 65  |ge. The magazine|
00000190  2c 20 70 61 67 65 20 61  6e 64 0d 73 75 62 2d 70  |, page and.sub-p|
000001a0  61 67 65 20 6e 75 6d 62  65 72 73 20 61 72 65 20  |age numbers are |
000001b0  73 74 6f 72 65 64 20 69  6e 20 65 76 65 72 79 20  |stored in every |
000001c0  68 65 61 64 65 72 20 61  6e 64 20 74 68 65 20 6d  |header and the m|
000001d0  61 67 61 7a 69 6e 65 20  6e 75 6d 62 65 72 20 69  |agazine number i|
000001e0  73 0d 73 74 6f 72 65 64  20 69 6e 20 65 76 65 72  |s.stored in ever|
000001f0  79 20 70 61 63 6b 65 74  2e 20 54 68 69 73 20 69  |y packet. This i|
00000200  6e 66 6f 72 6d 61 74 69  6f 6e 20 69 73 20 75 73  |nformation is us|
00000210  65 64 20 74 6f 20 66 69  6e 64 20 74 68 65 20 73  |ed to find the s|
00000220  74 61 72 74 20 6f 66 20  61 0d 70 61 67 65 20 61  |tart of a.page a|
00000230  6e 64 20 74 6f 20 69 64  65 6e 74 69 66 79 20 65  |nd to identify e|
00000240  76 65 72 79 20 70 61 63  6b 65 74 20 77 68 69 63  |very packet whic|
00000250  68 20 69 73 20 61 73 73  6f 63 69 61 74 65 64 20  |h is associated |
00000260  77 69 74 68 20 74 68 61  74 20 70 61 67 65 2e 20  |with that page. |
00000270  41 0d 70 61 67 65 20 69  73 20 63 6f 6d 70 6c 65  |A.page is comple|
00000280  74 65 20 77 68 65 6e 20  61 20 68 65 61 64 65 72  |te when a header|
00000290  20 77 69 74 68 20 74 68  65 20 73 61 6d 65 20 6d  | with the same m|
000002a0  61 67 61 7a 69 6e 65 20  6e 75 6d 62 65 72 2c 20  |agazine number, |
000002b0  62 75 74 20 61 0d 64 69  66 66 65 72 65 6e 74 20  |but a.different |
000002c0  70 61 67 65 20 6e 75 6d  62 65 72 2c 20 69 73 20  |page number, is |
000002d0  72 65 63 65 69 76 65 64  2e 20 50 61 67 65 20 6e  |received. Page n|
000002e0  75 6d 62 65 72 20 46 46  20 61 6c 77 61 79 73 20  |umber FF always |
000002f0  69 6e 64 69 63 61 74 65  73 20 74 68 65 0d 65 6e  |indicates the.en|
00000300  64 20 6f 66 20 61 20 70  61 67 65 20 62 75 74 20  |d of a page but |
00000310  6e 6f 74 20 74 68 65 20  73 74 61 72 74 20 6f 66  |not the start of|
00000320  20 61 20 6e 65 77 20 70  61 67 65 2e 20 41 20 70  | a new page. A p|
00000330  61 67 65 2c 20 61 6e 64  20 74 68 65 20 70 61 63  |age, and the pac|
00000340  6b 65 74 73 0d 77 69 74  68 69 6e 20 61 20 70 61  |kets.within a pa|
00000350  67 65 2c 20 63 61 6e 20  62 65 20 69 64 65 6e 74  |ge, can be ident|
00000360  69 66 69 65 64 20 75 73  69 6e 67 20 74 68 65 20  |ified using the |
00000370  66 6f 6c 6c 6f 77 69 6e  67 20 72 75 6c 65 73 3a  |following rules:|
00000380  0d 0d 0d 31 29 20 41 20  70 61 67 65 20 73 74 61  |...1) A page sta|
00000390  72 74 73 20 77 68 65 6e  20 61 20 68 65 61 64 65  |rts when a heade|
000003a0  72 20 77 69 74 68 20 74  68 65 20 72 65 71 75 69  |r with the requi|
000003b0  72 65 64 20 6d 61 67 61  7a 69 6e 65 2c 20 70 61  |red magazine, pa|
000003c0  67 65 20 61 6e 64 0d 20  20 20 73 75 62 2d 70 61  |ge and.   sub-pa|
000003d0  67 65 20 6e 75 6d 62 65  72 73 20 69 73 20 72 65  |ge numbers is re|
000003e0  63 65 69 76 65 64 2e 0d  0d 32 29 20 41 20 68 65  |ceived...2) A he|
000003f0  61 64 65 72 20 77 69 74  68 20 61 20 70 61 67 65  |ader with a page|
00000400  20 6e 75 6d 62 65 72 20  46 46 20 61 6e 64 20 74  | number FF and t|
00000410  68 65 20 73 61 6d 65 20  6d 61 67 61 7a 69 6e 65  |he same magazine|
00000420  20 6e 75 6d 62 65 72 20  61 73 20 74 68 65 20 70  | number as the p|
00000430  61 67 65 0d 20 20 20 62  65 69 6e 67 20 6c 6f 61  |age.   being loa|
00000440  64 65 64 20 6d 61 72 6b  73 20 74 68 65 20 65 6e  |ded marks the en|
00000450  64 20 6f 66 20 61 20 70  61 67 65 2e 0d 0d 33 29  |d of a page...3)|
00000460  20 41 20 68 65 61 64 65  72 20 77 69 74 68 20 74  | A header with t|
00000470  68 65 20 73 61 6d 65 20  6d 61 67 61 7a 69 6e 65  |he same magazine|
00000480  20 6e 75 6d 62 65 72 20  62 75 74 20 61 20 64 69  | number but a di|
00000490  66 66 65 72 65 6e 74 20  70 61 67 65 20 6e 75 6d  |fferent page num|
000004a0  62 65 72 20 74 6f 0d 20  20 20 74 68 65 20 70 61  |ber to.   the pa|
000004b0  67 65 20 62 65 69 6e 67  20 6c 6f 61 64 65 64 20  |ge being loaded |
000004c0  6d 61 72 6b 73 20 74 68  65 20 65 6e 64 20 6f 66  |marks the end of|
000004d0  20 61 20 70 61 67 65 2e  20 49 66 20 74 68 65 20  | a page. If the |
000004e0  70 61 67 65 20 6e 75 6d  62 65 72 20 69 73 0d 20  |page number is. |
000004f0  20 20 6e 6f 74 20 46 46  20 74 68 69 73 20 70 61  |  not FF this pa|
00000500  63 6b 65 74 20 61 6c 73  6f 20 6d 61 72 6b 73 20  |cket also marks |
00000510  74 68 65 20 62 65 67 69  6e 6e 69 6e 67 20 6f 66  |the beginning of|
00000520  20 74 68 65 20 6e 65 78  74 20 70 61 67 65 2e 0d  | the next page..|
00000530  0d 34 29 20 41 6c 6c 20  74 68 65 20 70 61 63 6b  |.4) All the pack|
00000540  65 74 73 20 77 69 74 68  69 6e 20 61 20 70 61 67  |ets within a pag|
00000550  65 20 68 61 76 65 20 74  68 65 20 73 61 6d 65 20  |e have the same |
00000560  6d 61 67 61 7a 69 6e 65  20 6e 75 6d 62 65 72 2e  |magazine number.|
00000570  0d 0d 35 29 20 50 61 63  6b 65 74 73 20 33 30 20  |..5) Packets 30 |
00000580  61 6e 64 20 33 31 20 61  72 65 20 70 61 67 65 20  |and 31 are page |
00000590  69 6e 64 65 70 65 6e 64  65 6e 74 2e 0d 0d 36 29  |independent...6)|
000005a0  20 50 61 63 6b 65 74 20  6e 75 6d 62 65 72 73 20  | Packet numbers |
000005b0  67 72 65 61 74 65 72 20  74 68 61 6e 20 32 34 20  |greater than 24 |
000005c0  63 61 6e 20 62 65 20 69  67 6e 6f 72 65 64 20 75  |can be ignored u|
000005d0  6e 6c 65 73 73 20 74 68  65 20 43 52 43 20 62 79  |nless the CRC by|
000005e0  74 65 73 20 66 72 6f 6d  0d 20 20 20 70 61 63 6b  |tes from.   pack|
000005f0  65 74 20 32 37 20 74 79  70 65 20 30 20 61 72 65  |et 27 type 0 are|
00000600  20 74 6f 20 62 65 20 75  73 65 64 2e 0d 0d 0d 54  | to be used....T|
00000610  68 65 73 65 20 72 75 6c  65 73 20 63 61 6e 20 62  |hese rules can b|
00000620  65 20 75 73 65 64 20 74  6f 20 69 64 65 6e 74 69  |e used to identi|
00000630  66 79 20 61 6e 79 20 70  61 67 65 20 69 6e 20 65  |fy any page in e|
00000640  69 74 68 65 72 20 73 65  72 69 61 6c 20 6f 72 20  |ither serial or |
00000650  70 61 72 61 6c 6c 65 6c  0d 6d 61 67 61 7a 69 6e  |parallel.magazin|
00000660  65 73 20 77 69 74 68 20  74 68 65 20 65 78 63 65  |es with the exce|
00000670  70 74 69 6f 6e 20 6f 66  20 73 75 62 74 69 74 6c  |ption of subtitl|
00000680  65 73 2e 20 54 68 65 20  70 72 6f 67 72 61 6d 20  |es. The program |
00000690  47 52 41 42 42 45 52 20  75 73 65 73 20 74 68 65  |GRABBER uses the|
000006a0  73 65 0d 72 75 6c 65 73  20 74 6f 20 69 64 65 6e  |se.rules to iden|
000006b0  74 69 66 79 20 70 61 67  65 73 2e 20 49 66 20 79  |tify pages. If y|
000006c0  6f 75 20 64 65 63 69 64  65 20 74 6f 20 6d 6f 64  |ou decide to mod|
000006d0  69 66 79 20 47 52 41 42  42 45 52 20 74 6f 20 64  |ify GRABBER to d|
000006e0  69 73 70 6c 61 79 0d 73  75 62 74 69 74 6c 65 73  |isplay.subtitles|
000006f0  20 79 6f 75 20 6e 65 65  64 20 74 6f 20 6b 6e 6f  | you need to kno|
00000700  77 20 74 68 61 74 20 73  75 62 74 69 74 6c 65 73  |w that subtitles|
00000710  20 61 72 65 20 74 68 65  20 6f 6e 6c 79 20 70 61  | are the only pa|
00000720  67 65 20 63 75 72 72 65  6e 74 6c 79 0d 62 72 6f  |ge currently.bro|
00000730  61 64 63 61 73 74 20 69  6e 20 6d 61 67 61 7a 69  |adcast in magazi|
00000740  6e 65 20 30 20 28 69 6e  74 65 72 70 72 65 74 65  |ne 0 (interprete|
00000750  64 20 61 73 20 6d 61 67  61 7a 69 6e 65 20 38 29  |d as magazine 8)|
00000760  20 73 6f 20 74 68 61 74  20 74 68 65 20 6f 6e 6c  | so that the onl|
00000770  79 20 70 61 67 65 0d 6e  75 6d 62 65 72 20 74 68  |y page.number th|
00000780  61 74 20 63 61 6e 20 62  65 20 64 69 66 66 65 72  |at can be differ|
00000790  65 6e 74 20 66 72 6f 6d  20 74 68 65 20 73 75 62  |ent from the sub|
000007a0  74 69 74 6c 65 20 70 61  67 65 20 28 70 61 67 65  |title page (page|
000007b0  20 38 38 38 29 20 63 61  6e 20 62 65 20 70 61 67  | 888) can be pag|
000007c0  65 0d 30 46 46 20 28 69  65 2e 20 70 61 67 65 20  |e.0FF (ie. page |
000007d0  38 46 46 29 2e 20 49 66  20 74 68 69 73 20 68 65  |8FF). If this he|
000007e0  61 64 65 72 20 69 73 20  6e 6f 74 20 62 72 6f 61  |ader is not broa|
000007f0  64 63 61 73 74 20 74 68  65 6e 20 74 68 65 20 70  |dcast then the p|
00000800  61 67 65 20 67 72 61 62  62 65 72 0d 77 69 6c 6c  |age grabber.will|
00000810  20 6e 65 76 65 72 20 66  69 6e 64 20 74 68 65 20  | never find the |
00000820  65 6e 64 20 6f 66 20 74  68 65 20 70 61 67 65 20  |end of the page |
00000830  69 74 20 69 73 20 6c 6f  61 64 69 6e 67 20 61 6e  |it is loading an|
00000840  64 20 74 68 65 72 65 66  6f 72 65 20 6e 65 76 65  |d therefore neve|
00000850  72 0d 64 69 73 70 6c 61  79 20 74 68 65 20 73 75  |r.display the su|
00000860  62 74 69 74 6c 65 2e 20  4f 6e 65 20 77 61 79 20  |btitle. One way |
00000870  6f 66 20 69 64 65 6e 74  69 66 79 69 6e 67 20 61  |of identifying a|
00000880  20 73 75 62 74 69 74 6c  65 20 70 61 67 65 20 69  | subtitle page i|
00000890  73 20 74 6f 20 74 65 73  74 0d 66 6f 72 20 74 68  |s to test.for th|
000008a0  65 20 70 72 65 73 65 6e  63 65 20 6f 66 20 74 68  |e presence of th|
000008b0  65 20 73 75 62 74 69 74  6c 65 20 63 6f 6e 74 72  |e subtitle contr|
000008c0  6f 6c 20 62 69 74 20 69  6e 20 74 68 65 20 68 65  |ol bit in the he|
000008d0  61 64 65 72 20 70 61 63  6b 65 74 20 74 6f 20 66  |ader packet to f|
000008e0  69 6e 64 0d 74 68 65 20  73 74 61 72 74 20 6f 66  |ind.the start of|
000008f0  20 61 20 73 75 62 74 69  74 6c 65 20 70 61 67 65  | a subtitle page|
00000900  2c 20 61 6e 64 20 74 68  65 20 61 62 73 65 6e 63  |, and the absenc|
00000910  65 20 6f 66 20 74 68 65  20 73 75 62 74 69 74 6c  |e of the subtitl|
00000920  65 20 63 6f 6e 74 72 6f  6c 20 62 69 74 0d 74 6f  |e control bit.to|
00000930  20 66 69 6e 64 20 74 68  65 20 65 6e 64 20 6f 66  | find the end of|
00000940  20 74 68 65 20 70 61 67  65 2e 0d 0d 54 68 65 20  | the page...The |
00000950  73 69 6d 70 6c 65 20 70  61 67 65 20 67 72 61 62  |simple page grab|
00000960  62 65 72 20 70 72 6f 67  72 61 6d 20 47 52 41 42  |ber program GRAB|
00000970  42 45 52 20 69 73 20 75  73 65 64 20 74 6f 20 69  |BER is used to i|
00000980  6c 6c 75 73 74 72 61 74  65 20 74 68 65 0d 74 65  |llustrate the.te|
00000990  63 68 6e 69 71 75 65 73  20 6e 65 65 64 65 64 20  |chniques needed |
000009a0  74 6f 20 64 69 73 70 6c  61 79 20 61 20 63 6f 6d  |to display a com|
000009b0  70 6c 65 74 65 20 54 65  6c 65 74 65 78 74 20 70  |plete Teletext p|
000009c0  61 67 65 2e 20 49 6e 20  6f 72 64 65 72 20 74 6f  |age. In order to|
000009d0  20 6b 65 65 70 0d 74 68  65 20 70 72 6f 67 72 61  | keep.the progra|
000009e0  6d 20 72 65 61 73 6f 6e  61 62 6c 79 20 73 6d 61  |m reasonably sma|
000009f0  6c 6c 20 61 6e 64 20 65  61 73 79 20 74 6f 20 75  |ll and easy to u|
00000a00  6e 64 65 72 73 74 61 6e  64 20 69 74 20 64 6f 65  |nderstand it doe|
00000a10  73 20 6e 6f 74 20 69 6e  63 6c 75 64 65 0d 61 6c  |s not include.al|
00000a20  6c 20 74 68 65 20 66 65  61 74 75 72 65 73 20 6f  |l the features o|
00000a30  66 20 74 68 65 20 6d 6f  72 65 20 73 6f 70 68 69  |f the more sophi|
00000a40  73 74 69 63 61 74 65 64  20 70 61 67 65 20 67 72  |sticated page gr|
00000a50  61 62 62 65 72 20 75 73  65 64 20 62 79 20 74 68  |abber used by th|
00000a60  65 20 41 54 53 0d 61 6e  64 20 54 46 53 2e 20 54  |e ATS.and TFS. T|
00000a70  68 65 20 64 65 6d 6f 6e  73 74 72 61 74 69 6f 6e  |he demonstration|
00000a80  20 70 72 6f 67 72 61 6d  20 6c 6f 6f 6b 73 20 66  | program looks f|
00000a90  6f 72 20 61 20 70 61 72  74 69 63 75 6c 61 72 20  |or a particular |
00000aa0  70 61 67 65 20 75 73 69  6e 67 20 6f 6e 6c 79 0d  |page using only.|
00000ab0  74 68 65 20 6d 61 67 61  7a 69 6e 65 20 61 6e 64  |the magazine and|
00000ac0  20 70 61 67 65 20 6e 75  6d 62 65 72 20 74 6f 20  | page number to |
00000ad0  69 64 65 6e 74 69 66 79  20 74 68 65 20 70 61 67  |identify the pag|
00000ae0  65 2e 20 49 74 20 64 6f  65 73 20 6e 6f 74 20 73  |e. It does not s|
00000af0  65 61 72 63 68 20 66 6f  72 0d 73 70 65 63 69 66  |earch for.specif|
00000b00  69 63 20 73 75 62 2d 70  61 67 65 73 2e 20 41 6c  |ic sub-pages. Al|
00000b10  6c 20 64 61 74 61 20 61  72 65 20 65 72 61 73 65  |l data are erase|
00000b20  64 20 66 72 6f 6d 20 74  68 65 20 70 61 67 65 20  |d from the page |
00000b30  62 75 66 66 65 72 20 61  66 74 65 72 20 74 68 65  |buffer after the|
00000b40  79 0d 61 72 65 20 64 69  73 70 6c 61 79 65 64 20  |y.are displayed |
00000b50  61 6e 64 20 74 68 65 20  69 6e 68 69 62 69 74 20  |and the inhibit |
00000b60  64 69 73 70 6c 61 79 20  63 6f 6e 74 72 6f 6c 20  |display control |
00000b70  62 69 74 20 69 73 20 69  67 6e 6f 72 65 64 2e 20  |bit is ignored. |
00000b80  53 75 62 74 69 74 6c 65  73 0d 61 72 65 20 6e 6f  |Subtitles.are no|
00000b90  74 20 64 69 73 70 6c 61  79 65 64 2c 20 62 75 74  |t displayed, but|
00000ba0  20 61 6c 6c 20 63 6f 6e  63 65 61 6c 65 64 20 63  | all concealed c|
00000bb0  68 61 72 61 63 74 65 72  73 20 61 72 65 20 64 69  |haracters are di|
00000bc0  73 70 6c 61 79 65 64 2e  0d 0d 42 65 63 61 75 73  |splayed...Becaus|
00000bd0  65 20 74 68 65 20 75 73  65 20 6f 66 20 74 68 65  |e the use of the|
00000be0  20 68 65 61 64 65 72 20  70 61 63 6b 65 74 20 69  | header packet i|
00000bf0  73 20 63 65 6e 74 72 61  6c 20 74 6f 20 75 6e 64  |s central to und|
00000c00  65 72 73 74 61 6e 64 69  6e 67 20 74 68 65 0d 64  |erstanding the.d|
00000c10  65 73 69 67 6e 20 6f 66  20 61 20 70 61 67 65 20  |esign of a page |
00000c20  67 72 61 62 62 65 72 2c  20 74 68 65 20 74 61 62  |grabber, the tab|
00000c30  6c 65 20 69 6e 20 66 69  67 75 72 65 20 31 20 73  |le in figure 1 s|
00000c40  68 6f 77 73 20 74 68 65  20 63 6f 6d 70 6c 65 74  |hows the complet|
00000c50  65 20 66 6f 72 6d 61 74  0d 6f 66 20 74 68 65 20  |e format.of the |
00000c60  68 65 61 64 65 72 20 70  61 63 6b 65 74 20 61 6e  |header packet an|
00000c70  64 20 77 68 65 72 65 20  74 68 65 20 70 72 6f 67  |d where the prog|
00000c80  72 61 6d 20 47 52 41 42  42 45 52 20 73 74 6f 72  |ram GRABBER stor|
00000c90  65 73 20 74 68 65 20 68  65 61 64 65 72 20 64 61  |es the header da|
00000ca0  74 61 0d 69 74 20 72 65  61 64 73 20 66 72 6f 6d  |ta.it reads from|
00000cb0  20 74 68 65 20 61 64 61  70 74 6f 72 2e 0d 0d 54  | the adaptor...T|
00000cc0  68 65 20 62 79 74 65 20  6e 75 6d 62 65 72 20 69  |he byte number i|
00000cd0  6e 20 74 68 65 20 6c 65  66 74 20 68 61 6e 64 20  |n the left hand |
00000ce0  63 6f 6c 75 6d 6e 20 6f  66 20 66 69 67 75 72 65  |column of figure|
00000cf0  20 31 20 73 68 6f 77 73  20 74 68 65 20 6f 72 64  | 1 shows the ord|
00000d00  65 72 20 69 6e 0d 77 68  69 63 68 20 74 68 65 20  |er in.which the |
00000d10  64 61 74 61 20 61 72 65  20 73 74 6f 72 65 64 20  |data are stored |
00000d20  69 6e 20 74 68 65 20 61  64 61 70 74 6f 72 2e 20  |in the adaptor. |
00000d30  54 68 65 20 6e 65 78 74  20 63 6f 6c 75 6d 6e 20  |The next column |
00000d40  73 68 6f 77 73 20 77 68  65 74 68 65 72 20 6f 72  |shows whether or|
00000d50  0d 6e 6f 74 20 74 68 65  20 64 61 74 61 20 61 72  |.not the data ar|
00000d60  65 20 68 61 6d 6d 69 6e  67 20 63 6f 64 65 64 20  |e hamming coded |
00000d70  28 68 63 20 3d 20 68 61  6d 6d 69 6e 67 20 63 6f  |(hc = hamming co|
00000d80  64 65 64 2c 20 62 6c 61  6e 6b 20 3d 20 6e 6f 74  |ded, blank = not|
00000d90  20 63 6f 64 65 64 29 2c  0d 74 68 65 20 74 68 69  | coded),.the thi|
00000da0  72 64 20 63 6f 6c 75 6d  6e 20 67 69 76 65 73 20  |rd column gives |
00000db0  61 20 62 72 69 65 66 20  64 65 73 63 72 69 70 74  |a brief descript|
00000dc0  69 6f 6e 20 6f 66 20 74  68 65 20 62 79 74 65 20  |ion of the byte |
00000dd0  28 6f 72 20 62 69 74 73  20 66 72 6f 6d 20 74 68  |(or bits from th|
00000de0  65 0d 62 79 74 65 29 2c  20 74 68 65 20 6e 65 78  |e.byte), the nex|
00000df0  74 20 63 6f 6c 75 6d 6e  20 73 68 6f 77 73 20 77  |t column shows w|
00000e00  68 65 72 65 20 74 68 65  20 62 79 74 65 20 28 6f  |here the byte (o|
00000e10  72 20 62 69 74 73 20 66  72 6f 6d 20 74 68 65 20  |r bits from the |
00000e20  62 79 74 65 29 20 61 72  65 0d 73 74 6f 72 65 64  |byte) are.stored|
00000e30  20 69 6e 20 74 68 65 20  70 61 67 65 20 62 75 66  | in the page buf|
00000e40  66 65 72 2c 20 61 6e 64  20 74 68 65 20 6c 61 73  |fer, and the las|
00000e50  74 20 63 6f 6c 75 6d 6e  20 64 65 73 63 72 69 62  |t column describ|
00000e60  65 73 20 74 68 65 20 66  6f 72 6d 61 74 20 69 6e  |es the format in|
00000e70  0d 77 68 69 63 68 20 74  68 65 20 70 72 6f 67 72  |.which the progr|
00000e80  61 6d 20 47 52 41 42 42  45 52 20 73 74 6f 72 65  |am GRABBER store|
00000e90  73 20 74 68 65 20 64 61  74 61 20 28 62 6c 61 6e  |s the data (blan|
00000ea0  6b 20 3d 20 73 74 6f 72  65 64 20 61 73 20 72 65  |k = stored as re|
00000eb0  61 64 29 2e 0d 0d 0d 2b  2d 2d 2d 2d 2d 2d 2d 2b  |ad)....+-------+|
00000ec0  2d 2d 2d 2d 2b 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----+-----------|
00000ed0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000ee0  2b 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |+---------------|
00000ef0  2d 2d 2d 2b 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2b  |---+-----------+|
00000f00  0d 7c 62 79 74 65 20 6e  6f 7c 63 6f 64 65 7c 20  |.|byte no|code| |
00000f10  64 65 73 63 72 69 70 74  69 6f 6e 20 20 20 20 20  |description     |
00000f20  20 20 20 20 20 20 20 20  20 20 7c 20 73 74 6f 72  |          | stor|
00000f30  65 64 20 69 6e 20 20 20  20 20 20 20 20 7c 20 66  |ed in        | f|
00000f40  6f 72 6d 61 74 20 20 20  20 7c 0d 2b 2d 2d 2d 2d  |ormat    |.+----|
00000f50  2d 2d 2d 2b 2d 2d 2d 2d  2b 2d 2d 2d 2d 2d 2d 2d  |---+----+-------|
00000f60  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000f70  2d 2d 2d 2d 2b 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----+-----------|
00000f80  2d 2d 2d 2d 2d 2d 2d 2b  2d 2d 2d 2d 2d 2d 2d 2d  |-------+--------|
00000f90  2d 2d 2d 2b 0d 7c 20 20  31 20 20 20 20 7c 20 20  |---+.|  1    |  |
00000fa0  20 20 7c 20 63 6c 6f 63  6b 20 72 75 6e 2d 69 6e  |  | clock run-in|
00000fb0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 7c 20  |              | |
00000fc0  28 6e 6f 74 20 72 65 61  64 29 20 20 20 20 20 20  |(not read)      |
00000fd0  20 7c 20 20 20 20 20 20  20 20 20 20 20 7c 0d 7c  | |           |.||
00000fe0  20 20 32 20 20 20 20 7c  20 20 20 20 7c 20 63 6c  |  2    |    | cl|
00000ff0  6f 63 6b 20 72 75 6e 2d  69 6e 20 20 20 20 20 20  |ock run-in      |
00001000  20 20 20 20 20 20 20 20  7c 20 28 6e 6f 74 20 72  |        | (not r|
00001010  65 61 64 29 20 20 20 20  20 20 20 7c 20 20 20 20  |ead)       |    |
00001020  20 20 20 20 20 20 20 7c  0d 7c 20 20 33 20 20 20  |       |.|  3   |
00001030  20 7c 20 20 20 20 7c 20  66 72 61 6d 69 6e 67 20  | |    | framing |
00001040  63 6f 64 65 20 20 20 20  20 20 20 20 20 20 20 20  |code            |
00001050  20 20 7c 20 28 6e 6f 74  20 73 74 6f 72 65 64 29  |  | (not stored)|
00001060  20 20 20 20 20 7c 20 20  20 20 20 20 20 20 20 20  |     |          |
00001070  20 7c 0d 7c 20 20 34 20  20 20 20 7c 20 68 63 20  | |.|  4    | hc |
00001080  7c 20 6d 61 67 61 7a 69  6e 65 20 6e 6f 2e 20 69  || magazine no. i|
00001090  6e 20 62 69 74 73 20 30  2d 32 20 20 7c 20 6d 61  |n bits 0-2  | ma|
000010a0  67 61 7a 69 6e 65 20 20  20 20 20 20 20 20 20 7c  |gazine         ||
000010b0  20 64 65 2d 68 61 6d 6d  65 64 20 7c 0d 7c 20 20  | de-hammed |.|  |
000010c0  34 20 20 20 20 7c 20 68  63 20 7c 20 62 69 74 20  |4    | hc | bit |
000010d0  30 20 6f 66 20 70 61 63  6b 20 6e 6f 20 69 6e 20  |0 of pack no in |
000010e0  62 69 74 20 33 20 7c 20  70 61 63 6b 65 74 20 62  |bit 3 | packet b|
000010f0  69 74 20 30 20 20 20 20  20 7c 20 64 65 2d 68 61  |it 0     | de-ha|
00001100  6d 6d 65 64 20 7c 0d 7c  20 20 35 20 20 20 20 7c  |mmed |.|  5    ||
00001110  20 68 63 20 7c 20 70 61  63 6b 65 74 20 6e 75 6d  | hc | packet num|
00001120  62 65 72 20 62 69 74 73  20 31 2d 34 20 20 20 20  |ber bits 1-4    |
00001130  7c 20 70 61 63 6b 65 74  20 62 69 74 73 20 31 2d  || packet bits 1-|
00001140  34 20 20 7c 20 64 65 2d  68 61 6d 6d 65 64 20 7c  |4  | de-hammed ||
00001150  0d 7c 20 20 36 20 20 20  20 7c 20 68 63 20 7c 20  |.|  6    | hc | |
00001160  70 61 67 65 20 6e 75 6d  62 65 72 2c 20 6c 6f 77  |page number, low|
00001170  20 6e 79 62 62 6c 65 20  20 20 7c 20 62 75 66 66  | nybble   | buff|
00001180  65 72 3f 30 20 20 20 20  20 20 20 20 20 7c 20 64  |er?0         | d|
00001190  65 2d 68 61 6d 6d 65 64  20 7c 0d 7c 20 20 37 20  |e-hammed |.|  7 |
000011a0  20 20 20 7c 20 68 63 20  7c 20 70 61 67 65 20 6e  |   | hc | page n|
000011b0  75 6d 62 65 72 2c 20 68  69 67 68 20 6e 79 62 62  |umber, high nybb|
000011c0  6c 65 20 20 7c 20 62 75  66 66 65 72 3f 31 20 20  |le  | buffer?1  |
000011d0  20 20 20 20 20 20 20 7c  20 64 65 2d 68 61 6d 6d  |       | de-hamm|
000011e0  65 64 20 7c 0d 7c 20 20  38 20 20 20 20 7c 20 68  |ed |.|  8    | h|
000011f0  63 20 7c 20 73 75 62 2d  70 61 67 65 2c 20 6c 6f  |c | sub-page, lo|
00001200  77 20 6e 79 62 62 6c 65  20 20 20 20 20 20 7c 20  |w nybble      | |
00001210  62 75 66 66 65 72 3f 32  20 20 20 20 20 20 20 20  |buffer?2        |
00001220  20 7c 20 64 65 2d 68 61  6d 6d 65 64 20 7c 0d 7c  | | de-hammed |.||
00001230  20 20 39 20 20 20 20 7c  20 68 63 20 7c 20 73 75  |  9    | hc | su|
00001240  62 2d 70 61 67 65 20 69  6e 20 62 69 74 73 20 30  |b-page in bits 0|
00001250  20 2d 20 32 20 20 20 20  7c 20 62 75 66 66 65 72  | - 2    | buffer|
00001260  3f 33 20 62 69 74 73 20  30 2d 32 7c 20 64 65 2d  |?3 bits 0-2| de-|
00001270  68 61 6d 6d 65 64 20 7c  0d 7c 20 20 39 20 20 20  |hammed |.|  9   |
00001280  20 7c 20 68 63 20 7c 20  65 72 61 73 65 20 70 61  | | hc | erase pa|
00001290  67 65 20 63 6f 6e 74 72  6f 6c 20 62 69 74 20 20  |ge control bit  |
000012a0  20 20 7c 20 62 75 66 66  65 72 3f 33 20 62 69 74  |  | buffer?3 bit|
000012b0  20 33 20 20 20 7c 20 64  65 2d 68 61 6d 6d 65 64  | 3   | de-hammed|
000012c0  20 7c 0d 7c 20 31 30 20  20 20 20 7c 20 68 63 20  | |.| 10    | hc |
000012d0  7c 20 73 75 62 2d 70 61  67 65 20 20 20 20 20 20  || sub-page      |
000012e0  20 20 20 20 20 20 20 20  20 20 20 20 7c 20 62 75  |            | bu|
000012f0  66 66 65 72 3f 34 20 20  20 20 20 20 20 20 20 7c  |ffer?4         ||
00001300  20 64 65 2d 68 61 6d 6d  65 64 20 7c 0d 7c 20 31  | de-hammed |.| 1|
00001310  31 20 20 20 20 7c 20 68  63 20 7c 20 73 75 62 70  |1    | hc | subp|
00001320  61 67 65 2c 68 69 20 6e  79 62 62 6c 65 2c 62 69  |age,hi nybble,bi|
00001330  74 73 20 30 2c 31 7c 20  62 75 66 66 65 72 3f 35  |ts 0,1| buffer?5|
00001340  20 62 69 74 73 20 30 2c  31 7c 20 64 65 2d 68 61  | bits 0,1| de-ha|
00001350  6d 6d 65 64 20 7c 0d 7c  20 31 31 20 20 20 20 7c  |mmed |.| 11    ||
00001360  20 68 63 20 7c 20 6e 65  77 73 66 6c 61 73 68 20  | hc | newsflash |
00001370  63 6f 6e 74 72 6f 6c 20  62 69 74 20 20 20 20 20  |control bit     |
00001380  7c 20 62 75 66 66 65 72  3f 35 20 62 69 74 20 32  || buffer?5 bit 2|
00001390  20 20 20 7c 20 64 65 2d  68 61 6d 6d 65 64 20 7c  |   | de-hammed ||
000013a0  0d 7c 20 31 31 20 20 20  20 7c 20 68 63 20 7c 20  |.| 11    | hc | |
000013b0  73 75 62 74 69 74 6c 65  20 63 6f 6e 74 72 6f 6c  |subtitle control|
000013c0  20 62 69 74 20 20 20 20  20 20 7c 20 62 75 66 66  | bit      | buff|
000013d0  65 72 3f 35 20 62 69 74  20 33 20 20 20 7c 20 64  |er?5 bit 3   | d|
000013e0  65 2d 68 61 6d 6d 65 64  20 7c 0d 7c 20 31 32 20  |e-hammed |.| 12 |
000013f0  20 20 20 7c 20 68 63 20  7c 20 73 75 70 70 72 65  |   | hc | suppre|
00001400  73 73 20 68 65 61 64 65  72 20 63 6f 6e 74 2e 20  |ss header cont. |
00001410  62 69 74 20 7c 20 62 75  66 66 65 72 3f 36 20 62  |bit | buffer?6 b|
00001420  69 74 20 30 20 20 20 7c  20 64 65 2d 68 61 6d 6d  |it 0   | de-hamm|
00001430  65 64 20 7c 0d 7c 20 31  32 20 20 20 20 7c 20 68  |ed |.| 12    | h|
00001440  63 20 7c 20 75 70 64 61  74 65 20 69 6e 64 69 63  |c | update indic|
00001450  61 74 6f 72 20 63 6f 6e  74 20 62 69 74 20 7c 20  |ator cont bit | |
00001460  62 75 66 66 65 72 3f 36  20 62 69 74 20 31 20 20  |buffer?6 bit 1  |
00001470  20 7c 20 64 65 2d 68 61  6d 6d 65 64 20 7c 0d 7c  | | de-hammed |.||
00001480  20 31 32 20 20 20 20 7c  20 68 63 20 7c 20 6f 75  | 12    | hc | ou|
00001490  74 20 6f 66 20 73 65 71  75 65 6e 63 65 20 63 6f  |t of sequence co|
000014a0  6e 74 2e 20 62 69 74 20  7c 20 62 75 66 66 65 72  |nt. bit | buffer|
000014b0  3f 36 20 62 69 74 20 32  20 20 20 7c 20 64 65 2d  |?6 bit 2   | de-|
000014c0  68 61 6d 6d 65 64 20 7c  0d 7c 20 31 32 20 20 20  |hammed |.| 12   |
000014d0  20 7c 20 68 63 20 7c 20  69 6e 68 69 62 69 74 20  | | hc | inhibit |
000014e0  64 69 73 70 6c 61 79 20  63 6f 6e 74 2e 20 62 69  |display cont. bi|
000014f0  74 20 7c 20 62 75 66 66  65 72 3f 36 20 62 69 74  |t | buffer?6 bit|
00001500  20 33 20 20 20 7c 20 64  65 2d 68 61 6d 6d 65 64  | 3   | de-hammed|
00001510  20 7c 0d 7c 20 31 33 20  20 20 20 7c 20 68 63 20  | |.| 13    | hc |
00001520  7c 20 73 65 72 69 61 6c  2f 70 61 72 61 6c 6c 65  || serial/paralle|
00001530  6c 20 6d 61 67 61 7a 69  6e 65 20 20 7c 20 62 75  |l magazine  | bu|
00001540  66 66 65 72 3f 37 20 62  69 74 20 30 20 20 20 7c  |ffer?7 bit 0   ||
00001550  20 64 65 2d 68 61 6d 6d  65 64 20 7c 0d 7c 20 31  | de-hammed |.| 1|
00001560  33 20 20 20 20 7c 20 68  63 20 7c 20 75 6e 75 73  |3    | hc | unus|
00001570  65 64 20 62 69 74 20 20  20 20 20 20 20 20 20 20  |ed bit          |
00001580  20 20 20 20 20 20 7c 20  62 75 66 66 65 72 3f 37  |      | buffer?7|
00001590  20 62 69 74 20 31 20 20  20 7c 20 64 65 2d 68 61  | bit 1   | de-ha|
000015a0  6d 6d 65 64 20 7c 0d 7c  20 31 33 20 20 20 20 7c  |mmed |.| 13    ||
000015b0  20 68 63 20 7c 20 75 6e  75 73 65 64 20 62 69 74  | hc | unused bit|
000015c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000015d0  7c 20 62 75 66 66 65 72  3f 37 20 62 69 74 20 32  || buffer?7 bit 2|
000015e0  20 20 20 7c 20 64 65 2d  68 61 6d 6d 65 64 20 7c  |   | de-hammed ||
000015f0  0d 7c 20 31 33 20 20 20  20 7c 20 68 63 20 7c 20  |.| 13    | hc | |
00001600  75 6e 75 73 65 64 20 62  69 74 20 20 20 20 20 20  |unused bit      |
00001610  20 20 20 20 20 20 20 20  20 20 7c 20 62 75 66 66  |          | buff|
00001620  65 72 3f 37 20 62 69 74  20 33 20 20 20 7c 20 64  |er?7 bit 3   | d|
00001630  65 2d 68 61 6d 6d 65 64  20 7c 0d 7c 20 31 34 2d  |e-hammed |.| 14-|
00001640  34 35 20 7c 20 20 20 20  7c 20 68 65 61 64 65 72  |45 |    | header|
00001650  20 64 69 73 70 6c 61 79  20 6d 65 73 73 61 67 65  | display message|
00001660  20 20 20 20 7c 62 75 66  66 65 72 3f 38 2d 62 75  |    |buffer?8-bu|
00001670  66 66 65 72 3f 33 39 7c  20 20 20 20 20 20 20 20  |ffer?39|        |
00001680  20 20 20 7c 0d 2b 2d 2d  2d 2d 2d 2d 2d 2b 2d 2d  |   |.+-------+--|
00001690  2d 2d 2b 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |--+-------------|
000016a0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2b 2d  |--------------+-|
000016b0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
000016c0  2d 2b 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2b 0d 0d  |-+-----------+..|
000016d0  46 69 67 75 72 65 20 31  2e 20 54 68 65 20 64 61  |Figure 1. The da|
000016e0  74 61 20 74 72 61 6e 73  6d 69 74 74 65 64 20 69  |ta transmitted i|
000016f0  6e 20 74 68 65 20 68 65  61 64 65 72 20 70 61 63  |n the header pac|
00001700  6b 65 74 0d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |ket.------------|
00001710  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001730  2d 2d 2d 2d 2d 2d 2d 0d  0d 0d 54 68 65 20 66 6c  |-------...The fl|
00001740  61 67 20 62 79 74 65 20  6c 61 62 65 6c 6c 65 64  |ag byte labelled|
00001750  20 67 72 61 62 66 6c 61  67 20 63 61 6e 20 74 61  | grabflag can ta|
00001760  6b 65 20 74 68 72 65 65  20 76 61 6c 75 65 73 20  |ke three values |
00001770  69 6e 20 74 68 65 20 70  72 6f 67 72 61 6d 0d 47  |in the program.G|
00001780  52 41 42 42 45 52 2e 20  49 74 20 73 74 6f 72 65  |RABBER. It store|
00001790  73 20 74 68 65 20 6e 75  6d 62 65 72 20 26 30 30  |s the number &00|
000017a0  20 77 68 65 6e 20 74 68  65 20 70 72 6f 67 72 61  | when the progra|
000017b0  6d 20 69 73 20 73 65 61  72 63 68 69 6e 67 20 66  |m is searching f|
000017c0  6f 72 20 61 0d 73 70 65  63 69 66 69 63 20 70 61  |or a.specific pa|
000017d0  67 65 2e 20 49 74 20 73  74 6f 72 65 73 20 26 34  |ge. It stores &4|
000017e0  30 20 77 68 65 6e 20 74  68 65 20 68 65 61 64 65  |0 when the heade|
000017f0  72 20 66 6f 72 20 61 20  70 61 67 65 20 68 61 73  |r for a page has|
00001800  20 62 65 65 6e 20 66 6f  75 6e 64 20 61 6e 64 0d  | been found and.|
00001810  74 68 65 20 70 61 63 6b  65 74 73 20 61 73 73 6f  |the packets asso|
00001820  63 69 61 74 65 64 20 77  69 74 68 20 74 68 61 74  |ciated with that|
00001830  20 70 61 67 65 20 61 72  65 20 62 65 69 6e 67 20  | page are being |
00001840  6c 6f 61 64 65 64 2c 20  61 6e 64 20 69 74 20 73  |loaded, and it s|
00001850  74 6f 72 65 73 20 26 38  30 0d 77 68 65 6e 20 74  |tores &80.when t|
00001860  68 65 20 68 65 61 64 65  72 20 77 68 69 63 68 20  |he header which |
00001870  6d 61 72 6b 73 20 74 68  65 20 65 6e 64 20 6f 66  |marks the end of|
00001880  20 74 68 65 20 70 61 67  65 20 68 61 73 20 62 65  | the page has be|
00001890  65 6e 20 66 6f 75 6e 64  2e 20 57 68 65 6e 0d 67  |en found. When.g|
000018a0  72 61 62 66 6c 61 67 20  73 74 6f 72 65 73 20 74  |rabflag stores t|
000018b0  68 65 20 6e 75 6d 62 65  72 20 26 38 30 20 74 68  |he number &80 th|
000018c0  65 20 66 6f 72 65 67 72  6f 75 6e 64 20 74 61 73  |e foreground tas|
000018d0  6b 20 70 72 69 6e 74 73  20 74 68 65 20 63 6f 6e  |k prints the con|
000018e0  74 65 6e 74 73 20 6f 66  0d 74 68 65 20 70 61 67  |tents of.the pag|
000018f0  65 20 67 72 61 62 62 65  72 20 62 75 66 66 65 72  |e grabber buffer|
00001900  20 6f 6e 20 61 20 6d 6f  64 65 20 37 20 73 63 72  | on a mode 7 scr|
00001910  65 65 6e 20 61 6e 64 2c  20 61 66 74 65 72 20 70  |een and, after p|
00001920  72 69 6e 74 69 6e 67 2c  20 69 74 20 63 6c 65 61  |rinting, it clea|
00001930  72 73 0d 74 68 65 20 66  6c 61 67 20 62 79 74 65  |rs.the flag byte|
00001940  2e 20 54 68 65 20 66 6f  72 65 67 72 6f 75 6e 64  |. The foreground|
00001950  20 74 61 73 6b 20 61 6c  73 6f 20 70 72 69 6e 74  | task also print|
00001960  73 20 74 68 65 20 68 65  61 64 65 72 20 64 61 74  |s the header dat|
00001970  61 20 62 79 74 65 73 0d  77 68 65 6e 65 76 65 72  |a bytes.whenever|
00001980  20 69 74 20 68 61 73 20  74 68 65 20 6f 70 70 6f  | it has the oppo|
00001990  72 74 75 6e 69 74 79 20  74 6f 20 64 6f 20 73 6f  |rtunity to do so|
000019a0  20 28 6c 69 6e 65 73 20  36 34 30 20 74 6f 20 37  | (lines 640 to 7|
000019b0  32 30 29 2e 0d 0d 53 6f  6d 65 2c 20 62 75 74 20  |20)...Some, but |
000019c0  6e 6f 74 20 61 6c 6c 2c  20 6f 66 20 74 68 65 20  |not all, of the |
000019d0  68 65 61 64 65 72 20 63  6f 6e 74 72 6f 6c 20 62  |header control b|
000019e0  69 74 73 20 61 72 65 20  75 73 65 64 20 74 6f 20  |its are used to |
000019f0  63 6f 6e 74 72 6f 6c 20  74 68 65 0d 64 69 73 70  |control the.disp|
00001a00  6c 61 79 20 6f 66 20 74  68 65 20 54 65 6c 65 74  |lay of the Telet|
00001a10  65 78 74 20 70 61 67 65  2e 20 42 65 63 61 75 73  |ext page. Becaus|
00001a20  65 20 73 75 62 74 69 74  6c 65 73 20 77 6f 75 6c  |e subtitles woul|
00001a30  64 20 6e 6f 74 20 62 65  20 64 69 73 70 6c 61 79  |d not be display|
00001a40  65 64 0d 63 6f 72 72 65  63 74 6c 79 20 62 79 20  |ed.correctly by |
00001a50  74 68 69 73 20 70 72 6f  67 72 61 6d 2c 20 74 68  |this program, th|
00001a60  65 79 20 61 72 65 20 69  64 65 6e 74 69 66 69 65  |ey are identifie|
00001a70  64 20 62 79 20 74 68 65  20 73 75 62 74 69 74 6c  |d by the subtitl|
00001a80  65 20 63 6f 6e 74 72 6f  6c 20 62 69 74 0d 61 6e  |e control bit.an|
00001a90  64 20 72 65 6a 65 63 74  65 64 20 28 6c 69 6e 65  |d rejected (line|
00001aa0  73 20 31 39 30 30 20 74  6f 20 31 39 32 30 29 2e  |s 1900 to 1920).|
00001ab0  20 53 75 70 70 72 65 73  73 65 64 20 61 6e 64 20  | Suppressed and |
00001ac0  6f 75 74 20 6f 66 20 73  65 71 75 65 6e 63 65 20  |out of sequence |
00001ad0  68 65 61 64 65 72 73 0d  61 72 65 20 69 64 65 6e  |headers.are iden|
00001ae0  74 69 66 69 65 64 20 73  6f 20 74 68 61 74 20 74  |tified so that t|
00001af0  68 65 79 20 61 72 65 20  6e 6f 74 20 64 69 73 70  |hey are not disp|
00001b00  6c 61 79 65 64 20 28 6c  69 6e 65 73 20 32 30 36  |layed (lines 206|
00001b10  30 20 74 6f 20 32 30 38  30 29 2e 0d 50 61 72 61  |0 to 2080)..Para|
00001b20  6c 6c 65 6c 20 6d 61 67  61 7a 69 6e 65 73 20 61  |llel magazines a|
00001b30  72 65 20 61 6c 73 6f 20  69 64 65 6e 74 69 66 69  |re also identifi|
00001b40  65 64 20 73 6f 20 74 68  61 74 2c 20 69 66 20 74  |ed so that, if t|
00001b50  68 65 79 20 61 72 65 20  75 73 65 64 2c 20 6f 6e  |hey are used, on|
00001b60  6c 79 20 74 68 65 0d 68  65 61 64 65 72 73 20 66  |ly the.headers f|
00001b70  72 6f 6d 20 74 68 65 20  6d 61 67 61 7a 69 6e 65  |rom the magazine|
00001b80  20 62 65 69 6e 67 20 73  65 61 72 63 68 65 64 20  | being searched |
00001b90  66 6f 72 20 77 69 6c 6c  20 62 65 20 64 69 73 70  |for will be disp|
00001ba0  6c 61 79 65 64 20 28 6c  69 6e 65 73 20 32 30 39  |layed (lines 209|
00001bb0  30 0d 74 6f 20 32 31 33  30 29 2e 0d 0d 46 69 67  |0.to 2130)...Fig|
00001bc0  75 72 65 20 32 20 73 68  6f 77 73 20 74 68 65 20  |ure 2 shows the |
00001bd0  66 6f 72 6d 61 74 20 6f  66 20 70 61 63 6b 65 74  |format of packet|
00001be0  73 20 31 20 74 6f 20 32  34 2e 20 54 68 65 73 65  |s 1 to 24. These|
00001bf0  2c 20 77 69 74 68 20 62  79 74 65 73 20 31 34 20  |, with bytes 14 |
00001c00  74 6f 20 34 35 0d 6f 66  20 74 68 65 20 68 65 61  |to 45.of the hea|
00001c10  64 65 72 2c 20 61 72 65  20 74 68 65 20 6f 6e 6c  |der, are the onl|
00001c20  79 20 70 61 63 6b 65 74  73 20 64 69 73 70 6c 61  |y packets displa|
00001c30  79 65 64 20 6f 6e 20 74  68 65 20 73 63 72 65 65  |yed on the scree|
00001c40  6e 2e 20 50 61 63 6b 65  74 73 20 32 35 20 74 6f  |n. Packets 25 to|
00001c50  0d 33 31 20 61 72 65 20  6e 65 69 74 68 65 72 20  |.31 are neither |
00001c60  73 74 6f 72 65 64 20 6e  6f 72 20 64 69 73 70 6c  |stored nor displ|
00001c70  61 79 65 64 2e 0d 0d 0d  2b 2d 2d 2d 2d 2d 2d 2d  |ayed....+-------|
00001c80  2b 2d 2d 2d 2d 2b 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |+----+----------|
00001c90  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00001ca0  2d 2b 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |-+--------------|
00001cb0  2d 2d 2d 2d 2b 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----+-----------|
00001cc0  2b 0d 7c 62 79 74 65 20  6e 6f 7c 63 6f 64 65 7c  |+.|byte no|code||
00001cd0  20 64 65 73 63 72 69 70  74 69 6f 6e 20 20 20 20  | description    |
00001ce0  20 20 20 20 20 20 20 20  20 20 20 7c 20 73 74 6f  |           | sto|
00001cf0  72 65 64 20 69 6e 20 20  20 20 20 20 20 20 7c 20  |red in        | |
00001d00  66 6f 72 6d 61 74 20 20  20 20 7c 0d 2b 2d 2d 2d  |format    |.+---|
00001d10  2d 2d 2d 2d 2b 2d 2d 2d  2d 2b 2d 2d 2d 2d 2d 2d  |----+----+------|
00001d20  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00001d30  2d 2d 2d 2d 2d 2b 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |-----+----------|
00001d40  2d 2d 2d 2d 2d 2d 2d 2d  2b 2d 2d 2d 2d 2d 2d 2d  |--------+-------|
00001d50  2d 2d 2d 2d 2b 0d 7c 20  20 31 20 20 20 20 7c 20  |----+.|  1    | |
00001d60  20 20 20 7c 20 63 6c 6f  63 6b 20 72 75 6e 2d 69  |   | clock run-i|
00001d70  6e 20 20 20 20 20 20 20  20 20 20 20 20 20 20 7c  |n              ||
00001d80  20 28 6e 6f 74 20 72 65  61 64 29 20 20 20 20 20  | (not read)     |
00001d90  20 20 7c 20 20 20 20 20  20 20 20 20 20 20 7c 0d  |  |           |.|
00001da0  7c 20 20 32 20 20 20 20  7c 20 20 20 20 7c 20 63  ||  2    |    | c|
00001db0  6c 6f 63 6b 20 72 75 6e  2d 69 6e 20 20 20 20 20  |lock run-in     |
00001dc0  20 20 20 20 20 20 20 20  20 7c 20 28 6e 6f 74 20  |         | (not |
00001dd0  72 65 61 64 29 20 20 20  20 20 20 20 7c 20 20 20  |read)       |   |
00001de0  20 20 20 20 20 20 20 20  7c 0d 7c 20 20 33 20 20  |        |.|  3  |
00001df0  20 20 7c 20 20 20 20 7c  20 66 72 61 6d 69 6e 67  |  |    | framing|
00001e00  20 63 6f 64 65 20 20 20  20 20 20 20 20 20 20 20  | code           |
00001e10  20 20 20 7c 20 28 6e 6f  74 20 73 74 6f 72 65 64  |   | (not stored|
00001e20  29 20 20 20 20 20 7c 20  20 20 20 20 20 20 20 20  |)     |         |
00001e30  20 20 7c 0d 7c 20 20 34  20 20 20 20 7c 20 68 63  |  |.|  4    | hc|
00001e40  20 7c 20 6d 61 67 61 7a  69 6e 65 20 6e 6f 2e 20  | | magazine no. |
00001e50  69 6e 20 62 69 74 73 20  30 2d 32 20 20 7c 20 6d  |in bits 0-2  | m|
00001e60  61 67 61 7a 69 6e 65 20  20 20 20 20 20 20 20 20  |agazine         |
00001e70  7c 20 64 65 2d 68 61 6d  6d 65 64 20 7c 0d 7c 20  || de-hammed |.| |
00001e80  20 34 20 20 20 20 7c 20  68 63 20 7c 20 62 69 74  | 4    | hc | bit|
00001e90  20 34 20 6f 66 20 70 61  63 6b 20 6e 6f 20 69 6e  | 4 of pack no in|
00001ea0  20 62 69 74 20 33 20 7c  20 70 61 63 6b 65 74 20  | bit 3 | packet |
00001eb0  20 20 20 20 20 20 20 20  20 20 7c 20 64 65 2d 68  |          | de-h|
00001ec0  61 6d 6d 65 64 20 7c 0d  7c 20 20 35 20 20 20 20  |ammed |.|  5    |
00001ed0  7c 20 68 63 20 7c 20 70  61 63 6b 65 74 20 6e 75  || hc | packet nu|
00001ee0  6d 62 65 72 20 20 20 20  20 20 20 20 20 20 20 20  |mber            |
00001ef0  20 7c 20 70 61 63 6b 65  74 20 20 20 20 20 20 20  | | packet       |
00001f00  20 20 20 20 7c 20 64 65  2d 68 61 6d 6d 65 64 20  |    | de-hammed |
00001f10  7c 0d 7c 20 36 2d 34 35  20 20 7c 20 20 20 20 7c  ||.| 6-45  |    ||
00001f20  20 64 61 74 61 20 66 6f  72 20 64 69 73 70 6c 61  | data for displa|
00001f30  79 20 20 20 20 20 20 20  20 20 20 7c 20 75 73 69  |y          | usi|
00001f40  6e 67 20 6f 66 66 73 65  74 20 20 20 20 20 7c 20  |ng offset     | |
00001f50  20 20 20 20 20 20 20 20  20 20 7c 0d 7c 20 20 20  |          |.|   |
00001f60  20 20 20 20 7c 20 20 20  20 7c 20 20 20 20 20 20  |    |    |      |
00001f70  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001f80  20 20 20 20 20 7c 20 66  72 6f 6d 20 62 75 66 66  |     | from buff|
00001f90  74 61 62 6c 65 20 20 20  7c 20 20 20 20 20 20 20  |table   |       |
00001fa0  20 20 20 20 7c 0d 2b 2d  2d 2d 2d 2d 2d 2d 2b 2d  |    |.+-------+-|
00001fb0  2d 2d 2d 2b 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |---+------------|
00001fc0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2b  |---------------+|
00001fd0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00001fe0  2d 2d 2b 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2b 0d  |--+-----------+.|
00001ff0  0d 46 69 67 75 72 65 20  32 2e 20 54 68 65 20 64  |.Figure 2. The d|
00002000  61 74 61 20 74 72 61 6e  73 6d 69 74 74 65 64 20  |ata transmitted |
00002010  69 6e 20 70 61 63 6b 65  74 73 20 31 20 74 6f 20  |in packets 1 to |
00002020  32 34 0d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |24.-------------|
00002030  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002050  2d 2d 2d 2d 0d 0d 0d 54  68 65 20 70 61 63 6b 65  |----...The packe|
00002060  74 20 6e 75 6d 62 65 72  20 69 73 20 75 73 65 64  |t number is used|
00002070  20 74 6f 20 64 65 74 65  72 6d 69 6e 65 20 77 68  | to determine wh|
00002080  65 72 65 20 74 68 65 20  64 61 74 61 20 72 65 61  |ere the data rea|
00002090  64 20 66 72 6f 6d 20 74  68 65 0d 61 64 61 70 74  |d from the.adapt|
000020a0  6f 72 20 61 72 65 20 73  74 6f 72 65 64 20 69 6e  |or are stored in|
000020b0  20 74 68 65 20 70 61 67  65 20 62 75 66 66 65 72  | the page buffer|
000020c0  2c 20 61 6e 64 20 68 65  6e 63 65 20 77 68 65 72  |, and hence wher|
000020d0  65 20 6f 6e 20 74 68 65  20 73 63 72 65 65 6e 20  |e on the screen |
000020e0  74 68 65 79 0d 61 72 65  20 64 69 73 70 6c 61 79  |they.are display|
000020f0  65 64 2e 20 41 20 6c 6f  6f 6b 20 75 70 20 74 61  |ed. A look up ta|
00002100  62 6c 65 20 6c 61 62 65  6c 6c 65 64 20 27 62 75  |ble labelled 'bu|
00002110  66 66 74 61 62 6c 65 27  20 69 73 20 75 73 65 64  |fftable' is used|
00002120  20 74 6f 20 66 69 6e 64  20 74 68 65 0d 61 64 64  | to find the.add|
00002130  72 65 73 73 20 77 69 74  68 69 6e 20 74 68 65 20  |ress within the |
00002140  70 61 67 65 20 62 75 66  66 65 72 2e 20 50 61 63  |page buffer. Pac|
00002150  6b 65 74 73 20 31 20 74  6f 20 32 33 20 66 72 6f  |kets 1 to 23 fro|
00002160  6d 20 74 68 65 20 70 61  67 65 20 62 75 66 66 65  |m the page buffe|
00002170  72 20 61 72 65 0d 64 69  73 70 6c 61 79 65 64 20  |r are.displayed |
00002180  6f 6e 20 74 68 65 20 73  63 72 65 65 6e 20 77 68  |on the screen wh|
00002190  65 6e 20 61 6c 6c 20 74  68 65 20 70 61 63 6b 65  |en all the packe|
000021a0  74 73 20 66 72 6f 6d 20  74 68 65 20 72 65 71 75  |ts from the requ|
000021b0  69 72 65 64 20 70 61 67  65 20 68 61 76 65 0d 62  |ired page have.b|
000021c0  65 65 6e 20 64 6f 77 6e  6c 6f 61 64 65 64 20 66  |een downloaded f|
000021d0  72 6f 6d 20 74 68 65 20  61 64 61 70 74 6f 72 2e  |rom the adaptor.|
000021e0  20 41 73 20 74 68 65 20  64 61 74 61 20 61 72 65  | As the data are|
000021f0  20 72 65 61 64 20 66 72  6f 6d 20 74 68 65 20 62  | read from the b|
00002200  75 66 66 65 72 20 61 6e  64 0d 77 72 69 74 74 65  |uffer and.writte|
00002210  6e 20 74 6f 20 74 68 65  20 73 63 72 65 65 6e 20  |n to the screen |
00002220  74 68 65 20 62 75 66 66  65 72 20 69 73 20 66 69  |the buffer is fi|
00002230  6c 6c 65 64 20 77 69 74  68 20 74 68 65 20 73 70  |lled with the sp|
00002240  61 63 65 20 63 68 61 72  61 63 74 65 72 20 28 6c  |ace character (l|
00002250  69 6e 65 73 0d 33 30 34  30 20 61 6e 64 20 33 30  |ines.3040 and 30|
00002260  35 30 29 2e 20 42 65 63  61 75 73 65 20 64 61 74  |50). Because dat|
00002270  61 20 61 72 65 20 6f 6e  6c 79 20 65 76 65 72 20  |a are only ever |
00002280  73 74 6f 72 65 64 20 69  6e 20 74 68 65 20 62 75  |stored in the bu|
00002290  66 66 65 72 20 77 68 65  6e 20 74 68 65 0d 72 65  |ffer when the.re|
000022a0  71 75 69 72 65 64 20 70  61 67 65 20 68 61 73 20  |quired page has |
000022b0  62 65 65 6e 20 69 64 65  6e 74 69 66 69 65 64 2c  |been identified,|
000022c0  20 61 6e 79 20 70 61 63  6b 65 74 73 20 74 68 61  | any packets tha|
000022d0  74 20 68 61 76 65 20 6e  6f 74 20 62 65 65 6e 0d  |t have not been.|
000022e0  62 72 6f 61 64 63 61 73  74 20 61 72 65 20 64 69  |broadcast are di|
000022f0  73 70 6c 61 79 65 64 20  61 73 20 73 70 61 63 65  |splayed as space|
00002300  73 2e 20 54 68 65 72 65  20 69 73 20 61 6e 20 65  |s. There is an e|
00002310  78 63 65 70 74 69 6f 6e  20 74 6f 20 74 68 69 73  |xception to this|
00002320  20 72 75 6c 65 0d 77 68  69 63 68 20 69 73 20 64  | rule.which is d|
00002330  65 61 6c 74 20 77 69 74  68 20 62 79 20 74 68 65  |ealt with by the|
00002340  20 73 75 62 72 6f 75 74  69 6e 65 20 63 68 65 63  | subroutine chec|
00002350  6b 64 6f 75 62 6c 65 20  28 6c 69 6e 65 73 20 32  |kdouble (lines 2|
00002360  33 33 30 20 74 6f 20 32  37 35 30 29 2e 0d 0d 44  |330 to 2750)...D|
00002370  6f 75 62 6c 65 20 68 65  69 67 68 74 20 63 68 61  |ouble height cha|
00002380  72 61 63 74 65 72 73 20  61 72 65 20 6f 6e 6c 79  |racters are only|
00002390  20 62 72 6f 61 64 63 61  73 74 20 6f 6e 63 65 20  | broadcast once |
000023a0  62 75 74 20 68 61 76 65  20 74 6f 20 62 65 20 64  |but have to be d|
000023b0  69 73 70 6c 61 79 65 64  0d 74 77 69 63 65 20 6f  |isplayed.twice o|
000023c0  6e 20 63 6f 6e 73 65 63  75 74 69 76 65 20 73 63  |n consecutive sc|
000023d0  72 65 65 6e 20 72 6f 77  73 2e 20 54 68 65 20 73  |reen rows. The s|
000023e0  75 62 72 6f 75 74 69 6e  65 20 63 68 65 63 6b 64  |ubroutine checkd|
000023f0  6f 75 62 6c 65 20 73 65  61 72 63 68 65 73 20 74  |ouble searches t|
00002400  68 65 0d 70 61 67 65 20  62 75 66 66 65 72 20 66  |he.page buffer f|
00002410  6f 72 20 74 68 65 20 64  6f 75 62 6c 65 20 68 65  |or the double he|
00002420  69 67 68 74 20 63 68 61  72 61 63 74 65 72 20 61  |ight character a|
00002430  6e 64 2c 20 77 68 65 6e  20 69 74 20 69 73 20 66  |nd, when it is f|
00002440  6f 75 6e 64 2c 0d 64 75  70 6c 69 63 61 74 65 73  |ound,.duplicates|
00002450  20 74 68 65 20 70 61 63  6b 65 74 20 74 6f 20 65  | the packet to e|
00002460  6e 73 75 72 65 20 74 68  65 20 63 6f 72 72 65 63  |nsure the correc|
00002470  74 20 64 69 73 70 6c 61  79 20 69 73 20 70 72 6f  |t display is pro|
00002480  64 75 63 65 64 2e 20 59  6f 75 20 63 61 6e 0d 72  |duced. You can.r|
00002490  65 6d 6f 76 65 20 6c 69  6e 65 20 35 39 30 20 74  |emove line 590 t|
000024a0  6f 20 73 65 65 20 74 68  65 20 65 66 66 65 63 74  |o see the effect|
000024b0  20 6f 66 20 6e 6f 74 20  6d 61 6b 69 6e 67 20 74  | of not making t|
000024c0  68 69 73 20 63 6f 72 72  65 63 74 69 6f 6e 2e 20  |his correction. |
000024d0  54 68 65 0d 63 6f 6e 63  65 61 6c 20 64 69 73 70  |The.conceal disp|
000024e0  6c 61 79 20 63 68 61 72  61 63 74 65 72 20 69 73  |lay character is|
000024f0  20 61 6c 73 6f 20 69 64  65 6e 74 69 66 69 65 64  | also identified|
00002500  20 61 6e 64 20 72 65 70  6c 61 63 65 64 20 77 69  | and replaced wi|
00002510  74 68 20 61 20 73 70 61  63 65 0d 63 68 61 72 61  |th a space.chara|
00002520  63 74 65 72 20 28 6c 69  6e 65 20 32 36 37 30 20  |cter (line 2670 |
00002530  61 6e 64 20 6c 69 6e 65  73 20 32 37 36 30 20 74  |and lines 2760 t|
00002540  6f 20 32 38 32 30 29 2e  20 54 68 69 73 20 69 73  |o 2820). This is|
00002550  20 61 20 73 68 6f 72 74  20 63 75 74 20 61 76 6f  | a short cut avo|
00002560  69 64 69 6e 67 0d 74 68  65 20 75 73 65 20 6f 66  |iding.the use of|
00002570  20 61 20 72 65 76 65 61  6c 20 63 6f 6e 74 72 6f  | a reveal contro|
00002580  6c 2e 20 54 68 65 72 65  20 69 73 20 70 6c 65 6e  |l. There is plen|
00002590  74 79 20 6f 66 20 73 63  6f 70 65 20 66 6f 72 20  |ty of scope for |
000025a0  69 6d 70 72 6f 76 69 6e  67 20 74 68 69 73 0d 70  |improving this.p|
000025b0  61 72 74 20 6f 66 20 74  68 65 20 70 72 6f 67 72  |art of the progr|
000025c0  61 6d 2e 0d 0d 54 68 65  20 62 75 66 66 65 72 20  |am...The buffer |
000025d0  75 73 65 64 20 74 6f 20  73 74 6f 72 65 20 74 68  |used to store th|
000025e0  65 20 54 65 6c 65 74 65  78 74 20 70 61 63 6b 65  |e Teletext packe|
000025f0  74 73 20 69 73 20 63 6c  65 61 72 65 64 20 62 65  |ts is cleared be|
00002600  66 6f 72 65 20 63 61 6c  6c 69 6e 67 0d 74 68 65  |fore calling.the|
00002610  20 6d 61 63 68 69 6e 65  20 63 6f 64 65 20 70 61  | machine code pa|
00002620  67 65 20 67 72 61 62 62  65 72 20 28 6c 69 6e 65  |ge grabber (line|
00002630  73 20 36 30 20 74 6f 20  38 30 29 2e 20 54 68 69  |s 60 to 80). Thi|
00002640  73 20 65 6e 73 75 72 65  73 20 74 68 61 74 20 6f  |s ensures that o|
00002650  6e 6c 79 20 74 68 65 0d  54 65 6c 65 74 65 78 74  |nly the.Teletext|
00002660  20 64 61 74 61 20 66 72  6f 6d 20 74 68 65 20 72  | data from the r|
00002670  65 71 75 69 72 65 64 20  70 61 67 65 20 61 72 65  |equired page are|
00002680  20 70 72 69 6e 74 65 64  20 6f 6e 20 74 68 65 20  | printed on the |
00002690  73 63 72 65 65 6e 2e 20  41 73 20 74 68 65 0d 62  |screen. As the.b|
000026a0  79 74 65 73 20 69 6e 20  74 68 65 20 62 75 66 66  |ytes in the buff|
000026b0  65 72 20 61 72 65 20 70  72 69 6e 74 65 64 20 28  |er are printed (|
000026c0  6c 69 6e 65 73 20 32 39  35 30 20 74 6f 20 33 31  |lines 2950 to 31|
000026d0  32 30 29 20 74 68 65 20  62 75 66 66 65 72 20 69  |20) the buffer i|
000026e0  73 20 63 6c 65 61 72 65  64 0d 66 6f 72 20 74 68  |s cleared.for th|
000026f0  65 20 6e 65 78 74 20 70  61 67 65 20 28 6c 69 6e  |e next page (lin|
00002700  65 73 20 33 30 34 30 20  74 6f 20 33 30 35 30 29  |es 3040 to 3050)|
00002710  2e 20 43 6c 65 61 72 69  6e 67 20 74 68 65 20 62  |. Clearing the b|
00002720  75 66 66 65 72 20 61 73  20 69 74 20 69 73 0d 70  |uffer as it is.p|
00002730  72 69 6e 74 65 64 20 65  6e 73 75 72 65 73 20 74  |rinted ensures t|
00002740  68 61 74 20 74 68 65 20  6e 65 78 74 20 70 61 67  |hat the next pag|
00002750  65 20 74 6f 20 62 65 20  67 72 61 62 62 65 64 20  |e to be grabbed |
00002760  77 69 6c 6c 20 68 61 76  65 20 61 20 63 6c 65 61  |will have a clea|
00002770  72 20 62 75 66 66 65 72  0d 69 6e 20 77 68 69 63  |r buffer.in whic|
00002780  68 20 74 6f 20 73 74 6f  72 65 20 69 74 73 20 64  |h to store its d|
00002790  61 74 61 2e 20 54 68 69  73 20 69 73 20 70 65 72  |ata. This is per|
000027a0  68 61 70 73 20 74 68 65  20 6d 6f 73 74 20 73 69  |haps the most si|
000027b0  6d 70 6c 65 20 6d 65 74  68 6f 64 20 6f 66 0d 6d  |mple method of.m|
000027c0  61 6b 69 6e 67 20 73 75  72 65 20 74 68 61 74 20  |aking sure that |
000027d0  6f 6e 6c 79 20 74 68 65  20 72 65 63 65 69 76 65  |only the receive|
000027e0  64 20 64 61 74 61 20 61  72 65 20 64 69 73 70 6c  |d data are displ|
000027f0  61 79 65 64 2e 20 54 68  69 73 20 74 65 63 68 6e  |ayed. This techn|
00002800  69 71 75 65 20 63 61 6e  0d 62 65 20 75 73 65 64  |ique can.be used|
00002810  20 62 65 63 61 75 73 65  20 74 68 65 20 62 75 66  | because the buf|
00002820  66 65 72 20 6f 6e 6c 79  20 65 76 65 72 20 6e 65  |fer only ever ne|
00002830  65 64 73 20 74 6f 20 73  74 6f 72 65 20 61 6e 79  |eds to store any|
00002840  20 64 61 74 61 20 77 68  65 6e 20 61 20 70 61 67  | data when a pag|
00002850  65 0d 69 73 20 65 69 74  68 65 72 20 6c 6f 61 64  |e.is either load|
00002860  65 64 20 6f 72 20 62 65  69 6e 67 20 6c 6f 61 64  |ed or being load|
00002870  65 64 2e 20 49 6e 20 74  68 65 20 70 72 6f 67 72  |ed. In the progr|
00002880  61 6d 20 75 73 65 64 20  74 6f 20 69 6c 6c 75 73  |am used to illus|
00002890  74 72 61 74 65 20 74 68  65 0d 6e 65 78 74 20 6d  |trate the.next m|
000028a0  6f 64 75 6c 65 2c 20 74  68 69 73 20 73 69 6d 70  |odule, this simp|
000028b0  6c 65 20 6d 65 74 68 6f  64 20 6f 66 20 63 6c 65  |le method of cle|
000028c0  61 72 69 6e 67 20 74 68  65 20 62 75 66 66 65 72  |aring the buffer|
000028d0  20 61 66 74 65 72 20 70  72 69 6e 74 69 6e 67 20  | after printing |
000028e0  77 69 6c 6c 0d 6e 6f 74  20 77 6f 72 6b 20 62 65  |will.not work be|
000028f0  63 61 75 73 65 20 74 68  65 20 70 72 6f 67 72 61  |cause the progra|
00002900  6d 20 73 65 61 72 63 68  65 73 20 66 6f 72 20 61  |m searches for a|
00002910  20 70 61 67 65 20 77 68  69 63 68 20 63 6f 6e 74  | page which cont|
00002920  61 69 6e 73 20 73 70 65  63 69 66 69 63 0d 64 61  |ains specific.da|
00002930  74 61 20 61 6e 64 20 74  68 65 20 63 6f 6e 74 65  |ta and the conte|
00002940  6e 74 73 20 6f 66 20 74  68 65 20 62 75 66 66 65  |nts of the buffe|
00002950  72 20 61 72 65 20 61 6c  77 61 79 73 20 63 68 61  |r are always cha|
00002960  6e 67 69 6e 67 20 61 73  20 6e 65 77 20 64 61 74  |nging as new dat|
00002970  61 20 61 72 65 0d 73 74  6f 72 65 64 20 61 6e 64  |a are.stored and|
00002980  20 73 65 61 72 63 68 65  64 2e 0d 0d 0d 20 20 20  | searched....   |
00002990  31 30 20 52 45 4d 3e 20  47 52 41 42 42 45 52 0d  |10 REM> GRABBER.|
000029a0  20 20 20 32 30 20 4d 4f  44 45 37 0d 20 20 20 33  |   20 MODE7.   3|
000029b0  30 20 44 49 4d 20 6d 63  6f 64 65 20 26 31 30 30  |0 DIM mcode &100|
000029c0  30 20 3a 52 45 4d 3a 20  73 70 61 63 65 20 66 6f  |0 :REM: space fo|
000029d0  72 20 6d 61 63 68 69 6e  65 20 63 6f 64 65 0d 20  |r machine code. |
000029e0  20 20 34 30 20 44 49 4d  20 62 75 66 66 65 72 20  |  40 DIM buffer |
000029f0  26 34 30 30 20 3a 52 45  4d 3a 20 70 61 67 65 20  |&400 :REM: page |
00002a00  67 72 61 62 62 65 72 20  62 75 66 66 65 72 0d 20  |grabber buffer. |
00002a10  20 20 35 30 20 65 6e 64  3d 62 75 66 66 65 72 2b  |  50 end=buffer+|
00002a20  26 33 45 34 0d 20 20 20  36 30 20 46 4f 52 70 61  |&3E4.   60 FORpa|
00002a30  73 73 3d 62 75 66 66 65  72 20 54 4f 20 65 6e 64  |ss=buffer TO end|
00002a40  20 53 54 45 50 34 0d 20  20 20 37 30 20 70 61 73  | STEP4.   70 pas|
00002a50  73 21 30 3d 30 20 3a 52  45 4d 3a 20 63 6c 65 61  |s!0=0 :REM: clea|
00002a60  72 20 62 75 66 66 65 72  0d 20 20 20 38 30 20 4e  |r buffer.   80 N|
00002a70  45 58 54 0d 20 20 20 39  30 20 50 52 4f 43 6d 63  |EXT.   90 PROCmc|
00002a80  6f 64 65 20 3a 52 45 4d  3a 20 61 73 73 65 6d 62  |ode :REM: assemb|
00002a90  6c 65 20 6d 61 63 68 69  6e 65 20 63 6f 64 65 0d  |le machine code.|
00002aa0  20 20 31 30 30 20 49 4e  50 55 54 22 54 56 20 63  |  100 INPUT"TV c|
00002ab0  68 61 6e 6e 65 6c 20 28  31 2d 34 29 20 3d 20 22  |hannel (1-4) = "|
00002ac0  61 6e 73 77 65 72 24 0d  20 20 31 31 30 20 63 68  |answer$.  110 ch|
00002ad0  61 6e 6e 65 6c 3f 30 3d  45 56 41 4c 28 22 26 22  |annel?0=EVAL("&"|
00002ae0  2b 4c 45 46 54 24 28 61  6e 73 77 65 72 24 2c 31  |+LEFT$(answer$,1|
00002af0  29 29 2b 26 31 42 0d 20  20 31 32 30 20 49 46 20  |))+&1B.  120 IF |
00002b00  63 68 61 6e 6e 65 6c 3f  30 20 3c 20 26 31 43 20  |channel?0 < &1C |
00002b10  54 48 45 4e 20 63 68 61  6e 6e 65 6c 3f 30 20 3d  |THEN channel?0 =|
00002b20  20 26 31 43 0d 20 20 31  33 30 20 49 46 20 63 68  | &1C.  130 IF ch|
00002b30  61 6e 6e 65 6c 3f 30 20  3e 20 26 31 46 20 54 48  |annel?0 > &1F TH|
00002b40  45 4e 20 63 68 61 6e 6e  65 6c 3f 30 20 3d 20 26  |EN channel?0 = &|
00002b50  31 46 0d 20 20 31 34 30  20 49 4e 50 55 54 22 50  |1F.  140 INPUT"P|
00002b60  61 67 65 20 6e 75 6d 62  65 72 20 28 33 20 64 69  |age number (3 di|
00002b70  67 69 74 73 29 20 3d 20  22 61 6e 73 77 65 72 24  |gits) = "answer$|
00002b80  0d 20 20 31 35 30 20 75  73 65 72 6d 61 67 3f 30  |.  150 usermag?0|
00002b90  3d 28 45 56 41 4c 28 22  26 22 2b 4c 45 46 54 24  |=(EVAL("&"+LEFT$|
00002ba0  28 61 6e 73 77 65 72 24  2c 31 29 29 41 4e 44 20  |(answer$,1))AND |
00002bb0  37 29 0d 20 20 31 36 30  20 75 73 65 72 70 61 67  |7).  160 userpag|
00002bc0  65 3f 31 3d 45 56 41 4c  28 22 26 22 2b 4d 49 44  |e?1=EVAL("&"+MID|
00002bd0  24 28 61 6e 73 77 65 72  24 2c 32 2c 31 29 29 0d  |$(answer$,2,1)).|
00002be0  20 20 31 37 30 20 3f 75  73 65 72 70 61 67 65 3d  |  170 ?userpage=|
00002bf0  45 56 41 4c 28 22 26 22  2b 4d 49 44 24 28 61 6e  |EVAL("&"+MID$(an|
00002c00  73 77 65 72 24 2c 33 2c  31 29 29 0d 20 20 31 38  |swer$,3,1)).  18|
00002c10  30 20 56 44 55 31 32 2c  32 33 2c 31 2c 30 3b 30  |0 VDU12,23,1,0;0|
00002c20  3b 30 3b 30 3b 0d 20 20  31 39 30 20 43 41 4c 4c  |;0;0;.  190 CALL|
00002c30  20 6d 63 6f 64 65 0d 20  20 32 30 30 20 56 44 55  | mcode.  200 VDU|
00002c40  33 30 2c 32 33 2c 31 2c  31 3b 30 3b 30 3b 30 3b  |30,23,1,1;0;0;0;|
00002c50  0d 20 20 32 31 30 20 45  4e 44 0d 20 20 32 32 30  |.  210 END.  220|
00002c60  20 44 45 46 50 52 4f 43  6d 63 6f 64 65 0d 20 20  | DEFPROCmcode.  |
00002c70  32 33 30 20 70 61 63 6b  65 74 3d 26 37 30 20 3a  |230 packet=&70 :|
00002c80  52 45 4d 3a 20 72 6f 77  20 6e 75 6d 62 65 72 20  |REM: row number |
00002c90  6f 66 20 63 75 72 72 65  6e 74 20 70 61 63 6b 65  |of current packe|
00002ca0  74 0d 20 20 32 34 30 20  6d 61 67 61 7a 69 6e 65  |t.  240 magazine|
00002cb0  3d 26 37 31 20 3a 52 45  4d 3a 20 6d 61 67 61 7a  |=&71 :REM: magaz|
00002cc0  69 6e 65 20 6e 75 6d 62  65 72 20 6f 66 20 63 75  |ine number of cu|
00002cd0  72 72 65 6e 74 20 70 61  67 65 0d 20 20 32 35 30  |rrent page.  250|
00002ce0  20 67 72 61 62 66 6c 61  67 3d 26 37 32 20 3a 52  | grabflag=&72 :R|
00002cf0  45 4d 3a 20 30 3d 73 65  61 72 63 68 69 6e 67 2c  |EM: 0=searching,|
00002d00  20 26 34 30 3d 6c 6f 61  64 69 6e 67 2c 20 26 38  | &40=loading, &8|
00002d10  30 3d 6c 6f 61 64 65 64  0d 20 20 32 36 30 20 75  |0=loaded.  260 u|
00002d20  73 65 72 6d 61 67 3d 26  37 33 20 3a 52 45 4d 3a  |sermag=&73 :REM:|
00002d30  20 73 65 61 72 63 68 20  66 6f 72 20 6d 61 67 61  | search for maga|
00002d40  7a 69 6e 65 0d 20 20 32  37 30 20 75 73 65 72 70  |zine.  270 userp|
00002d50  61 67 65 3d 26 37 34 20  3a 52 45 4d 3a 20 73 65  |age=&74 :REM: se|
00002d60  61 72 63 68 20 66 6f 72  20 70 61 67 65 2c 20 6c  |arch for page, l|
00002d70  6f 77 20 62 79 74 65 20  2b 20 68 69 67 68 20 62  |ow byte + high b|
00002d80  79 74 65 0d 20 20 32 38  30 20 77 6f 72 6b 73 70  |yte.  280 worksp|
00002d90  61 63 65 3d 26 37 36 20  3a 52 45 4d 3a 20 32 20  |ace=&76 :REM: 2 |
00002da0  62 79 74 65 20 77 6f 72  6b 73 70 61 63 65 0d 20  |byte workspace. |
00002db0  20 32 39 30 20 64 65 73  74 69 6e 61 74 69 6f 6e  | 290 destination|
00002dc0  3d 26 37 38 20 3a 52 45  4d 3a 20 61 6e 6f 74 68  |=&78 :REM: anoth|
00002dd0  65 72 20 32 20 62 79 74  65 20 77 6f 72 6b 73 70  |er 2 byte worksp|
00002de0  61 63 65 0d 20 20 33 30  30 20 63 68 61 6e 6e 65  |ace.  300 channe|
00002df0  6c 3d 26 37 41 20 3a 52  45 4d 3a 20 54 56 20 63  |l=&7A :REM: TV c|
00002e00  68 61 6e 6e 65 6c 0d 20  20 33 31 30 20 69 72 71  |hannel.  310 irq|
00002e10  32 76 3d 26 32 30 36 20  3a 52 45 4d 3a 20 49 52  |2v=&206 :REM: IR|
00002e20  51 32 20 76 65 63 74 6f  72 0d 20 20 33 32 30 20  |Q2 vector.  320 |
00002e30  74 74 78 63 6f 6e 74 72  6f 6c 3d 26 46 43 31 30  |ttxcontrol=&FC10|
00002e40  20 3a 52 45 4d 3a 20 54  54 58 20 63 6f 6e 74 72  | :REM: TTX contr|
00002e50  6f 6c 20 72 65 67 69 73  74 65 72 2c 20 77 72 69  |ol register, wri|
00002e60  74 65 20 6f 6e 6c 79 0d  20 20 33 33 30 20 74 74  |te only.  330 tt|
00002e70  78 73 74 61 74 75 73 3d  26 46 43 31 30 20 3a 52  |xstatus=&FC10 :R|
00002e80  45 4d 3a 20 54 54 58 20  73 74 61 74 75 73 20 72  |EM: TTX status r|
00002e90  65 67 69 73 74 65 72 2c  20 72 65 61 64 20 6f 6e  |egister, read on|
00002ea0  6c 79 0d 20 20 33 34 30  20 72 6f 77 72 65 67 3d  |ly.  340 rowreg=|
00002eb0  26 46 43 31 31 20 3a 52  45 4d 3a 20 54 54 58 20  |&FC11 :REM: TTX |
00002ec0  72 6f 77 20 72 65 67 69  73 74 65 72 2c 20 77 72  |row register, wr|
00002ed0  69 74 65 20 6f 6e 6c 79  0d 20 20 33 35 30 20 64  |ite only.  350 d|
00002ee0  61 74 61 72 65 67 3d 26  46 43 31 32 20 3a 52 45  |atareg=&FC12 :RE|
00002ef0  4d 3a 20 54 54 58 20 64  61 74 61 20 72 65 67 69  |M: TTX data regi|
00002f00  73 74 65 72 2c 20 72 65  61 64 20 26 20 77 72 69  |ster, read & wri|
00002f10  74 65 0d 20 20 33 36 30  20 73 74 61 74 63 6c 72  |te.  360 statclr|
00002f20  3d 26 46 43 31 33 20 3a  52 45 4d 3a 20 54 54 58  |=&FC13 :REM: TTX|
00002f30  20 63 6c 65 61 72 20 73  74 61 74 75 73 20 72 65  | clear status re|
00002f40  67 69 73 74 65 72 2c 20  72 65 61 64 20 26 20 77  |gister, read & w|
00002f50  72 69 74 65 0d 20 20 33  37 30 20 6f 73 77 72 63  |rite.  370 oswrc|
00002f60  68 3d 26 46 46 45 45 0d  20 20 33 38 30 20 6f 73  |h=&FFEE.  380 os|
00002f70  62 79 74 65 3d 26 46 46  46 34 0d 20 20 33 39 30  |byte=&FFF4.  390|
00002f80  20 46 4f 52 20 70 61 73  73 3d 30 20 54 4f 20 32  | FOR pass=0 TO 2|
00002f90  20 53 54 45 50 20 32 0d  20 20 34 30 30 20 50 25  | STEP 2.  400 P%|
00002fa0  3d 6d 63 6f 64 65 0d 20  20 34 31 30 20 5b 20 20  |=mcode.  410 [  |
00002fb0  20 20 20 20 20 4f 50 54  20 70 61 73 73 0d 20 20  |     OPT pass.  |
00002fc0  34 32 30 20 20 20 20 20  20 20 20 20 4c 44 41 20  |420         LDA |
00002fd0  23 26 30 30 0d 20 20 34  33 30 20 20 20 20 20 20  |#&00.  430      |
00002fe0  20 20 20 53 54 41 20 67  72 61 62 66 6c 61 67 20  |   STA grabflag |
00002ff0  20 5c 20 67 72 61 62 66  6c 61 67 20 3d 20 73 65  | \ grabflag = se|
00003000  61 72 63 68 69 6e 67 0d  20 20 34 34 30 20 20 20  |arching.  440   |
00003010  20 20 20 20 20 20 4c 44  58 20 69 72 71 32 76 20  |      LDX irq2v |
00003020  20 20 20 20 5c 20 6c 6f  61 64 20 73 65 63 6f 6e  |    \ load secon|
00003030  64 61 72 79 20 69 6e 74  65 72 72 75 70 74 20 76  |dary interrupt v|
00003040  65 63 74 6f 72 0d 20 20  34 35 30 20 20 20 20 20  |ector.  450     |
00003050  20 20 20 20 4c 44 59 20  69 72 71 32 76 2b 31 0d  |    LDY irq2v+1.|
00003060  20 20 34 36 30 20 20 20  20 20 20 20 20 20 53 54  |  460         ST|
00003070  58 20 6f 6c 64 69 72 71  32 76 20 20 5c 20 73 61  |X oldirq2v  \ sa|
00003080  76 65 20 73 65 63 6f 6e  64 61 72 79 20 69 6e 74  |ve secondary int|
00003090  65 72 72 75 70 74 20 76  65 63 74 6f 72 0d 20 20  |errupt vector.  |
000030a0  34 37 30 20 20 20 20 20  20 20 20 20 53 54 59 20  |470         STY |
000030b0  6f 6c 64 69 72 71 32 76  2b 31 0d 20 20 34 38 30  |oldirq2v+1.  480|
000030c0  20 20 20 20 20 20 20 20  20 4c 44 58 20 23 69 6e  |         LDX #in|
000030d0  74 65 72 72 75 70 74 20  4d 4f 44 20 32 35 36 20  |terrupt MOD 256 |
000030e0  5c 20 69 6e 73 74 61 6c  6c 20 6e 65 77 20 69 6e  |\ install new in|
000030f0  74 65 72 72 75 70 74 20  72 6f 75 74 69 6e 65 0d  |terrupt routine.|
00003100  20 20 34 39 30 20 20 20  20 20 20 20 20 20 4c 44  |  490         LD|
00003110  59 20 23 69 6e 74 65 72  72 75 70 74 20 44 49 56  |Y #interrupt DIV|
00003120  20 32 35 36 0d 20 20 35  30 30 20 20 20 20 20 20  | 256.  500      |
00003130  20 20 20 53 45 49 20 20  20 20 20 20 20 20 20 20  |   SEI          |
00003140  20 5c 20 64 69 73 61 62  6c 65 20 69 6e 74 65 72  | \ disable inter|
00003150  72 75 70 74 73 20 77 68  65 6e 20 61 6c 74 65 72  |rupts when alter|
00003160  69 6e 67 20 76 65 63 74  6f 72 73 0d 20 20 35 31  |ing vectors.  51|
00003170  30 20 20 20 20 20 20 20  20 20 53 54 58 20 69 72  |0         STX ir|
00003180  71 32 76 0d 20 20 35 32  30 20 20 20 20 20 20 20  |q2v.  520       |
00003190  20 20 53 54 59 20 69 72  71 32 76 2b 31 0d 20 20  |  STY irq2v+1.  |
000031a0  35 33 30 20 20 20 20 20  20 20 20 20 43 4c 49 20  |530         CLI |
000031b0  20 20 20 20 20 20 20 20  20 20 5c 20 72 65 2d 65  |          \ re-e|
000031c0  6e 61 62 6c 65 20 69 6e  74 65 72 72 75 70 74 73  |nable interrupts|
000031d0  0d 20 20 35 34 30 20 20  20 20 20 20 20 20 20 4c  |.  540         L|
000031e0  44 41 20 63 68 61 6e 6e  65 6c 20 20 20 5c 20 6c  |DA channel   \ l|
000031f0  6f 61 64 20 28 63 68 61  6e 6e 65 6c 20 6e 75 6d  |oad (channel num|
00003200  62 65 72 20 2b 20 23 26  31 43 29 0d 20 20 35 35  |ber + #&1C).  55|
00003210  30 20 20 20 20 20 20 20  20 20 53 54 41 20 74 74  |0         STA tt|
00003220  78 63 6f 6e 74 72 6f 6c  20 5c 20 65 6e 61 62 6c  |xcontrol \ enabl|
00003230  65 20 54 54 58 0d 20 20  35 36 30 20 2e 6d 61 69  |e TTX.  560 .mai|
00003240  6e 6c 6f 6f 70 0d 20 20  35 37 30 20 20 20 20 20  |nloop.  570     |
00003250  20 20 20 20 4c 44 41 20  67 72 61 62 66 6c 61 67  |    LDA grabflag|
00003260  20 20 5c 20 62 69 74 20  37 20 73 65 74 20 69 66  |  \ bit 7 set if|
00003270  20 72 65 61 64 20 74 6f  20 64 69 73 70 6c 61 79  | read to display|
00003280  0d 20 20 35 38 30 20 20  20 20 20 20 20 20 20 42  |.  580         B|
00003290  50 4c 20 63 6f 6e 74 69  6e 75 65 20 20 5c 20 62  |PL continue  \ b|
000032a0  72 61 6e 63 68 20 69 66  20 73 65 61 72 63 68 69  |ranch if searchi|
000032b0  6e 67 20 6f 72 20 6c 6f  61 64 69 6e 67 0d 20 20  |ng or loading.  |
000032c0  35 39 30 20 20 20 20 20  20 20 20 20 4a 53 52 20  |590         JSR |
000032d0  63 68 65 63 6b 64 6f 75  62 6c 65 20 5c 20 63 68  |checkdouble \ ch|
000032e0  65 63 6b 20 66 6f 72 20  64 6f 75 62 6c 65 20 68  |eck for double h|
000032f0  65 69 67 68 74 20 63 68  61 72 61 63 74 65 72 73  |eight characters|
00003300  0d 20 20 36 30 30 20 20  20 20 20 20 20 20 20 4a  |.  600         J|
00003310  53 52 20 74 72 61 6e 73  66 65 72 20 20 5c 20 74  |SR transfer  \ t|
00003320  72 61 6e 73 66 65 72 20  64 61 74 61 20 74 6f 20  |ransfer data to |
00003330  73 63 72 65 65 6e 0d 20  20 36 31 30 20 20 20 20  |screen.  610    |
00003340  20 20 20 20 20 4c 44 41  20 23 26 30 30 0d 20 20  |     LDA #&00.  |
00003350  36 32 30 20 20 20 20 20  20 20 20 20 53 54 41 20  |620         STA |
00003360  67 72 61 62 66 6c 61 67  20 20 5c 20 73 65 61 72  |grabflag  \ sear|
00003370  63 68 69 6e 67 20 61 67  61 69 6e 0d 20 20 36 33  |ching again.  63|
00003380  30 20 2e 63 6f 6e 74 69  6e 75 65 0d 20 20 36 34  |0 .continue.  64|
00003390  30 20 20 20 20 20 20 20  20 20 4c 44 58 20 23 26  |0         LDX #&|
000033a0  30 30 20 20 20 20 20 20  5c 20 73 63 72 65 65 6e  |00      \ screen|
000033b0  20 72 6f 77 0d 20 20 36  35 30 20 20 20 20 20 20  | row.  650      |
000033c0  20 20 20 4c 44 59 20 23  26 30 38 20 20 20 20 20  |   LDY #&08     |
000033d0  20 5c 20 73 63 72 65 65  6e 20 63 6f 6c 75 6d 6e  | \ screen column|
000033e0  0d 20 20 36 36 30 20 20  20 20 20 20 20 20 20 4a  |.  660         J|
000033f0  53 52 20 76 64 75 33 31  20 20 20 20 20 5c 20 56  |SR vdu31     \ V|
00003400  44 55 20 33 31 2c 38 2c  30 0d 20 20 36 37 30 20  |DU 31,8,0.  670 |
00003410  2e 68 65 61 64 6c 6f 6f  70 0d 20 20 36 38 30 20  |.headloop.  680 |
00003420  20 20 20 20 20 20 20 20  4c 44 41 20 62 75 66 66  |        LDA buff|
00003430  65 72 2c 59 0d 20 20 36  39 30 20 20 20 20 20 20  |er,Y.  690      |
00003440  20 20 20 4a 53 52 20 6f  73 77 72 63 68 20 20 20  |   JSR oswrch   |
00003450  20 5c 20 77 72 69 74 65  20 68 65 61 64 65 72 20  | \ write header |
00003460  6f 6e 20 73 63 72 65 65  6e 0d 20 20 37 30 30 20  |on screen.  700 |
00003470  20 20 20 20 20 20 20 20  49 4e 59 0d 20 20 37 31  |        INY.  71|
00003480  30 20 20 20 20 20 20 20  20 20 43 50 59 20 23 26  |0         CPY #&|
00003490  32 38 20 20 20 20 20 20  5c 20 64 65 63 69 6d 61  |28      \ decima|
000034a0  6c 20 34 30 0d 20 20 37  32 30 20 20 20 20 20 20  |l 40.  720      |
000034b0  20 20 20 42 43 43 20 68  65 61 64 6c 6f 6f 70 0d  |   BCC headloop.|
000034c0  20 20 37 33 30 20 20 20  20 20 20 20 20 20 42 49  |  730         BI|
000034d0  54 20 26 46 46 20 20 20  20 20 20 20 5c 20 70 6f  |T &FF       \ po|
000034e0  6c 6c 20 65 73 63 61 70  65 20 66 6c 61 67 0d 20  |ll escape flag. |
000034f0  20 37 34 30 20 20 20 20  20 20 20 20 20 42 50 4c  | 740         BPL|
00003500  20 6d 61 69 6e 6c 6f 6f  70 20 20 5c 20 6c 6f 6f  | mainloop  \ loo|
00003510  70 20 69 66 20 65 73 63  61 70 65 20 6e 6f 74 20  |p if escape not |
00003520  70 72 65 73 73 65 64 0d  20 20 37 35 30 20 20 20  |pressed.  750   |
00003530  20 20 20 20 20 20 4c 44  41 20 23 26 37 45 20 20  |      LDA #&7E  |
00003540  20 20 20 20 5c 20 64 65  63 69 6d 61 6c 20 31 32  |    \ decimal 12|
00003550  36 0d 20 20 37 36 30 20  20 20 20 20 20 20 20 20  |6.  760         |
00003560  4a 53 52 20 6f 73 62 79  74 65 20 20 20 20 5c 20  |JSR osbyte    \ |
00003570  61 63 6b 6e 6f 77 6c 65  64 67 65 20 65 73 63 61  |acknowledge esca|
00003580  70 65 0d 20 20 37 37 30  20 20 20 20 20 20 20 20  |pe.  770        |
00003590  20 4c 44 41 20 23 26 30  30 0d 20 20 37 38 30 20  | LDA #&00.  780 |
000035a0  20 20 20 20 20 20 20 20  53 54 41 20 74 74 78 63  |        STA ttxc|
000035b0  6f 6e 74 72 6f 6c 20 5c  20 64 69 73 61 62 6c 65  |ontrol \ disable|
000035c0  20 54 54 58 0d 20 20 37  39 30 20 20 20 20 20 20  | TTX.  790      |
000035d0  20 20 20 4c 44 58 20 6f  6c 64 69 72 71 32 76 20  |   LDX oldirq2v |
000035e0  20 5c 20 6c 6f 61 64 20  6f 72 69 67 69 6e 61 6c  | \ load original|
000035f0  20 76 65 63 74 6f 72 0d  20 20 38 30 30 20 20 20  | vector.  800   |
00003600  20 20 20 20 20 20 4c 44  59 20 6f 6c 64 69 72 71  |      LDY oldirq|
00003610  32 76 2b 31 0d 20 20 38  31 30 20 20 20 20 20 20  |2v+1.  810      |
00003620  20 20 20 53 45 49 20 20  20 20 20 20 20 20 20 20  |   SEI          |
00003630  20 5c 20 64 69 73 61 62  6c 65 20 69 6e 74 65 72  | \ disable inter|
00003640  72 75 70 74 73 20 77 68  65 6e 20 61 6c 74 65 72  |rupts when alter|
00003650  69 6e 67 20 76 65 63 74  6f 72 0d 20 20 38 32 30  |ing vector.  820|
00003660  20 20 20 20 20 20 20 20  20 53 54 58 20 69 72 71  |         STX irq|
00003670  32 76 20 20 20 20 20 5c  20 72 65 73 74 6f 72 65  |2v     \ restore|
00003680  20 6f 72 69 67 69 6e 61  6c 20 76 65 63 74 6f 72  | original vector|
00003690  0d 20 20 38 33 30 20 20  20 20 20 20 20 20 20 53  |.  830         S|
000036a0  54 59 20 69 72 71 32 76  2b 31 0d 20 20 38 34 30  |TY irq2v+1.  840|
000036b0  20 20 20 20 20 20 20 20  20 43 4c 49 20 20 20 20  |         CLI    |
000036c0  20 20 20 20 20 20 20 5c  20 72 65 2d 65 6e 61 62  |       \ re-enab|
000036d0  6c 65 20 69 6e 74 65 72  72 75 70 74 73 0d 20 20  |le interrupts.  |
000036e0  38 35 30 20 20 20 20 20  20 20 20 20 52 54 53 20  |850         RTS |
000036f0  20 20 20 20 20 20 20 20  20 20 5c 20 72 65 74 75  |          \ retu|
00003700  72 6e 20 74 6f 20 42 41  53 49 43 0d 20 20 38 36  |rn to BASIC.  86|
00003710  30 20 2e 69 6e 74 65 72  72 75 70 74 0d 20 20 38  |0 .interrupt.  8|
00003720  37 30 20 20 20 20 20 20  20 20 20 42 49 54 20 74  |70         BIT t|
00003730  74 78 73 74 61 74 75 73  20 5c 20 70 6f 6c 6c 20  |txstatus \ poll |
00003740  54 54 58 20 68 61 72 64  77 61 72 65 0d 20 20 38  |TTX hardware.  8|
00003750  38 30 20 20 20 20 20 20  20 20 20 42 4d 49 20 74  |80         BMI t|
00003760  74 78 69 6e 74 65 72 20  20 5c 20 62 72 61 6e 63  |txinter  \ branc|
00003770  68 20 69 66 20 54 54 58  20 69 6e 74 65 72 72 75  |h if TTX interru|
00003780  70 74 0d 20 20 38 39 30  20 20 20 20 20 20 20 20  |pt.  890        |
00003790  20 4a 4d 50 20 28 6f 6c  64 69 72 71 32 76 29 20  | JMP (oldirq2v) |
000037a0  5c 20 6e 6f 74 20 54 54  58 20 69 6e 74 65 72 72  |\ not TTX interr|
000037b0  75 70 74 0d 20 20 39 30  30 20 2e 74 74 78 69 6e  |upt.  900 .ttxin|
000037c0  74 65 72 0d 20 20 39 31  30 20 20 20 20 20 20 20  |ter.  910       |
000037d0  20 20 4c 44 41 20 26 46  43 20 20 20 20 20 20 20  |  LDA &FC       |
000037e0  5c 20 69 6e 74 65 72 72  75 70 74 20 61 63 63 75  |\ interrupt accu|
000037f0  6d 75 6c 61 74 6f 72 20  73 61 76 65 20 72 65 67  |mulator save reg|
00003800  69 73 74 65 72 0d 20 20  39 32 30 20 20 20 20 20  |ister.  920     |
00003810  20 20 20 20 50 48 41 20  20 20 20 20 20 20 20 20  |    PHA         |
00003820  20 20 5c 20 70 75 73 68  20 69 6e 74 65 72 72 75  |  \ push interru|
00003830  70 74 20 61 63 63 75 6d  75 6c 61 74 6f 72 20 73  |pt accumulator s|
00003840  61 76 65 20 72 65 67 69  73 74 65 72 0d 20 20 39  |ave register.  9|
00003850  33 30 20 20 20 20 20 20  20 20 20 54 58 41 0d 20  |30         TXA. |
00003860  20 39 34 30 20 20 20 20  20 20 20 20 20 50 48 41  | 940         PHA|
00003870  20 20 20 20 20 20 20 20  20 20 20 5c 20 70 75 73  |           \ pus|
00003880  68 20 58 0d 20 20 39 35  30 20 20 20 20 20 20 20  |h X.  950       |
00003890  20 20 54 59 41 0d 20 20  39 36 30 20 20 20 20 20  |  TYA.  960     |
000038a0  20 20 20 20 50 48 41 20  20 20 20 20 20 20 20 20  |    PHA         |
000038b0  20 20 5c 20 70 75 73 68  20 59 0d 20 20 39 37 30  |  \ push Y.  970|
000038c0  20 20 20 20 20 20 20 20  20 42 49 54 20 67 72 61  |         BIT gra|
000038d0  62 66 6c 61 67 20 20 5c  20 69 73 20 61 20 70 61  |bflag  \ is a pa|
000038e0  67 65 20 72 65 61 64 79  20 66 6f 72 20 64 69 73  |ge ready for dis|
000038f0  70 6c 61 79 3f 0d 20 20  39 38 30 20 20 20 20 20  |play?.  980     |
00003900  20 20 20 20 42 4d 49 20  63 6c 65 61 72 73 74 61  |    BMI clearsta|
00003910  74 75 73 20 5c 20 63 6c  65 61 72 20 73 74 61 74  |tus \ clear stat|
00003920  75 73 20 61 6e 64 20 52  54 49 20 69 66 20 70 61  |us and RTI if pa|
00003930  67 65 20 67 72 61 62 62  65 64 0d 20 20 39 39 30  |ge grabbed.  990|
00003940  20 20 20 20 20 20 20 20  20 43 4c 44 20 20 20 20  |         CLD    |
00003950  20 20 20 20 20 20 20 5c  20 63 6c 65 61 72 20 64  |       \ clear d|
00003960  65 63 69 6d 61 6c 20 66  6c 61 67 0d 20 31 30 30  |ecimal flag. 100|
00003970  30 20 20 20 20 20 20 20  20 20 4c 44 59 20 23 26  |0         LDY #&|
00003980  30 30 20 20 20 20 20 20  5c 20 73 74 61 72 74 20  |00      \ start |
00003990  77 69 74 68 20 72 6f 77  20 30 0d 20 31 30 31 30  |with row 0. 1010|
000039a0  20 2e 72 65 61 64 74 74  78 74 0d 20 31 30 32 30  | .readttxt. 1020|
000039b0  20 20 20 20 20 20 20 20  20 53 54 59 20 72 6f 77  |         STY row|
000039c0  72 65 67 20 20 20 20 5c  20 74 72 79 20 72 6f 77  |reg    \ try row|
000039d0  73 20 30 20 74 6f 20 31  35 0d 20 31 30 33 30 20  |s 0 to 15. 1030 |
000039e0  20 20 20 20 20 20 20 20  4c 44 41 20 64 61 74 61  |        LDA data|
000039f0  72 65 67 20 20 20 5c 20  6c 6f 61 64 20 66 72 61  |reg   \ load fra|
00003a00  6d 69 6e 67 20 63 6f 64  65 20 28 23 26 32 37 29  |ming code (#&27)|
00003a10  0d 20 31 30 34 30 20 20  20 20 20 20 20 20 20 42  |. 1040         B|
00003a20  45 51 20 65 6d 70 74 79  72 6f 77 20 20 5c 20 69  |EQ emptyrow  \ i|
00003a30  66 20 7a 65 72 6f 20 74  72 79 20 6e 65 78 74 20  |f zero try next |
00003a40  72 6f 77 0d 20 31 30 35  30 20 20 20 20 20 20 20  |row. 1050       |
00003a50  20 20 54 59 41 0d 20 31  30 36 30 20 20 20 20 20  |  TYA. 1060     |
00003a60  20 20 20 20 50 48 41 20  20 20 20 20 20 20 20 20  |    PHA         |
00003a70  20 20 5c 20 73 61 76 65  20 72 6f 77 20 6e 75 6d  |  \ save row num|
00003a80  62 65 72 0d 20 31 30 37  30 20 20 20 20 20 20 20  |ber. 1070       |
00003a90  20 20 4a 53 52 20 72 65  61 64 70 61 63 6b 65 74  |  JSR readpacket|
00003aa0  0d 20 31 30 38 30 20 20  20 20 20 20 20 20 20 50  |. 1080         P|
00003ab0  4c 41 0d 20 31 30 39 30  20 20 20 20 20 20 20 20  |LA. 1090        |
00003ac0  20 54 41 59 20 20 20 20  20 20 20 20 20 20 20 5c  | TAY           \|
00003ad0  20 72 65 73 74 6f 72 65  20 72 6f 77 20 6e 75 6d  | restore row num|
00003ae0  62 65 72 0d 20 31 31 30  30 20 2e 65 6d 70 74 79  |ber. 1100 .empty|
00003af0  72 6f 77 0d 20 31 31 31  30 20 20 20 20 20 20 20  |row. 1110       |
00003b00  20 20 49 4e 59 20 20 20  20 20 20 20 20 20 20 20  |  INY           |
00003b10  5c 20 69 6e 63 72 65 6d  65 6e 74 20 72 6f 77 20  |\ increment row |
00003b20  6e 75 6d 62 65 72 0d 20  31 31 32 30 20 20 20 20  |number. 1120    |
00003b30  20 20 20 20 20 43 50 59  20 23 26 31 30 20 20 20  |     CPY #&10   |
00003b40  20 20 20 5c 20 74 72 79  20 72 6f 77 73 20 30 20  |   \ try rows 0 |
00003b50  2d 20 31 35 0d 20 31 31  33 30 20 20 20 20 20 20  |- 15. 1130      |
00003b60  20 20 20 42 4e 45 20 72  65 61 64 74 74 78 74 0d  |   BNE readttxt.|
00003b70  20 31 31 34 30 20 2e 63  6c 65 61 72 73 74 61 74  | 1140 .clearstat|
00003b80  75 73 0d 20 31 31 35 30  20 20 20 20 20 20 20 20  |us. 1150        |
00003b90  20 4c 44 41 20 23 26 30  30 0d 20 31 31 36 30 20  | LDA #&00. 1160 |
00003ba0  20 20 20 20 20 20 20 20  4c 44 59 20 23 26 30 46  |        LDY #&0F|
00003bb0  20 20 20 20 20 20 5c 20  63 6c 65 61 72 20 31 36  |      \ clear 16|
00003bc0  20 72 6f 77 73 20 69 6e  20 61 64 61 70 74 6f 72  | rows in adaptor|
00003bd0  0d 20 31 31 37 30 20 2e  63 6c 65 61 72 6c 6f 6f  |. 1170 .clearloo|
00003be0  70 0d 20 31 31 38 30 20  20 20 20 20 20 20 20 20  |p. 1180         |
00003bf0  53 54 59 20 72 6f 77 72  65 67 0d 20 31 31 39 30  |STY rowreg. 1190|
00003c00  20 20 20 20 20 20 20 20  20 53 54 41 20 64 61 74  |         STA dat|
00003c10  61 72 65 67 0d 20 31 32  30 30 20 20 20 20 20 20  |areg. 1200      |
00003c20  20 20 20 44 45 59 0d 20  31 32 31 30 20 20 20 20  |   DEY. 1210    |
00003c30  20 20 20 20 20 42 50 4c  20 63 6c 65 61 72 6c 6f  |     BPL clearlo|
00003c40  6f 70 0d 20 31 32 32 30  20 20 20 20 20 20 20 20  |op. 1220        |
00003c50  20 53 54 41 20 73 74 61  74 63 6c 72 20 20 20 5c  | STA statclr   \|
00003c60  20 63 6c 65 61 72 20 73  74 61 74 75 73 20 66 6c  | clear status fl|
00003c70  61 67 73 20 62 65 66 6f  72 65 20 72 65 74 75 72  |ags before retur|
00003c80  6e 69 6e 67 0d 20 31 32  33 30 20 20 20 20 20 20  |ning. 1230      |
00003c90  20 20 20 50 4c 41 0d 20  31 32 34 30 20 20 20 20  |   PLA. 1240    |
00003ca0  20 20 20 20 20 54 41 59  20 20 20 20 20 20 20 20  |     TAY        |
00003cb0  20 20 20 5c 20 72 65 73  74 6f 72 65 20 59 0d 20  |   \ restore Y. |
00003cc0  31 32 35 30 20 20 20 20  20 20 20 20 20 50 4c 41  |1250         PLA|
00003cd0  0d 20 31 32 36 30 20 20  20 20 20 20 20 20 20 54  |. 1260         T|
00003ce0  41 58 20 20 20 20 20 20  20 20 20 20 20 5c 20 72  |AX           \ r|
00003cf0  65 73 74 6f 72 65 20 58  0d 20 31 32 37 30 20 20  |estore X. 1270  |
00003d00  20 20 20 20 20 20 20 50  4c 41 0d 20 31 32 38 30  |       PLA. 1280|
00003d10  20 20 20 20 20 20 20 20  20 53 54 41 20 26 46 43  |         STA &FC|
00003d20  20 20 20 20 20 20 20 5c  20 72 65 73 74 6f 72 65  |       \ restore|
00003d30  20 69 6e 74 65 72 72 75  70 74 20 61 63 63 75 6d  | interrupt accum|
00003d40  75 6c 61 74 6f 72 20 73  61 76 65 20 72 65 67 69  |ulator save regi|
00003d50  73 74 65 72 0d 20 31 32  39 30 20 20 20 20 20 20  |ster. 1290      |
00003d60  20 20 20 52 54 49 20 20  20 20 20 20 20 20 20 20  |   RTI          |
00003d70  20 5c 20 72 65 74 75 72  6e 20 66 72 6f 6d 20 69  | \ return from i|
00003d80  6e 74 65 72 72 75 70 74  0d 20 31 33 30 30 20 2e  |nterrupt. 1300 .|
00003d90  74 65 73 74 66 6c 61 67  0d 20 31 33 31 30 20 20  |testflag. 1310  |
00003da0  20 20 20 20 20 20 20 4c  44 41 20 67 72 61 62 66  |       LDA grabf|
00003db0  6c 61 67 0d 20 31 33 32  30 20 20 20 20 20 20 20  |lag. 1320       |
00003dc0  20 20 42 45 51 20 65 78  69 74 20 20 20 20 20 20  |  BEQ exit      |
00003dd0  5c 20 65 78 69 74 20 69  66 20 73 65 61 72 63 68  |\ exit if search|
00003de0  69 6e 67 0d 20 31 33 33  30 20 20 20 20 20 20 20  |ing. 1330       |
00003df0  20 20 4c 44 41 20 23 26  38 30 20 20 20 20 20 20  |  LDA #&80      |
00003e00  5c 20 69 66 20 6c 6f 61  64 69 6e 67 20 6d 61 72  |\ if loading mar|
00003e10  6b 20 61 73 20 6c 6f 61  64 65 64 0d 20 31 33 34  |k as loaded. 134|
00003e20  30 20 20 20 20 20 20 20  20 20 53 54 41 20 67 72  |0         STA gr|
00003e30  61 62 66 6c 61 67 20 20  5c 20 70 61 67 65 20 6c  |abflag  \ page l|
00003e40  6f 61 64 65 64 0d 20 31  33 35 30 20 2e 65 78 69  |oaded. 1350 .exi|
00003e50  74 0d 20 31 33 36 30 20  20 20 20 20 20 20 20 20  |t. 1360         |
00003e60  52 54 53 0d 20 31 33 37  30 20 2e 72 65 61 64 70  |RTS. 1370 .readp|
00003e70  61 63 6b 65 74 0d 20 31  33 38 30 20 20 20 20 20  |acket. 1380     |
00003e80  20 20 20 20 4c 44 59 20  64 61 74 61 72 65 67 20  |    LDY datareg |
00003e90  20 20 5c 20 72 65 61 64  20 6d 61 67 61 7a 69 6e  |  \ read magazin|
00003ea0  65 20 6e 75 6d 62 65 72  0d 20 31 33 39 30 20 20  |e number. 1390  |
00003eb0  20 20 20 20 20 20 20 4c  44 41 20 68 61 6d 74 61  |       LDA hamta|
00003ec0  62 6c 65 2c 59 20 5c 20  64 65 2d 68 61 6d 20 69  |ble,Y \ de-ham i|
00003ed0  74 0d 20 31 34 30 30 20  20 20 20 20 20 20 20 20  |t. 1400         |
00003ee0  42 4d 49 20 74 65 73 74  66 6c 61 67 20 20 5c 20  |BMI testflag  \ |
00003ef0  73 74 6f 70 20 6c 6f 61  64 69 6e 67 20 69 66 20  |stop loading if |
00003f00  65 72 72 6f 72 0d 20 31  34 31 30 20 20 20 20 20  |error. 1410     |
00003f10  20 20 20 20 53 54 41 20  6d 61 67 61 7a 69 6e 65  |    STA magazine|
00003f20  20 20 5c 20 73 61 76 65  20 6d 61 67 61 7a 69 6e  |  \ save magazin|
00003f30  65 20 6e 75 6d 62 65 72  0d 20 31 34 32 30 20 20  |e number. 1420  |
00003f40  20 20 20 20 20 20 20 4c  44 59 20 64 61 74 61 72  |       LDY datar|
00003f50  65 67 20 20 20 5c 20 72  65 61 64 20 70 61 63 6b  |eg   \ read pack|
00003f60  65 74 20 6e 75 6d 62 65  72 0d 20 31 34 33 30 20  |et number. 1430 |
00003f70  20 20 20 20 20 20 20 20  4c 44 41 20 68 61 6d 74  |        LDA hamt|
00003f80  61 62 6c 65 2c 59 20 5c  20 64 65 2d 68 61 6d 20  |able,Y \ de-ham |
00003f90  69 74 0d 20 31 34 34 30  20 20 20 20 20 20 20 20  |it. 1440        |
00003fa0  20 42 4d 49 20 74 65 73  74 66 6c 61 67 20 20 5c  | BMI testflag  \|
00003fb0  20 73 74 6f 70 20 6c 6f  61 64 69 6e 67 20 69 66  | stop loading if|
00003fc0  20 65 72 72 6f 72 0d 20  31 34 35 30 20 20 20 20  | error. 1450    |
00003fd0  20 20 20 20 20 53 54 41  20 70 61 63 6b 65 74 20  |     STA packet |
00003fe0  20 20 20 5c 20 73 61 76  65 20 70 61 63 6b 65 74  |   \ save packet|
00003ff0  20 6e 75 6d 62 65 72 0d  20 31 34 36 30 20 20 20  | number. 1460   |
00004000  20 20 20 20 20 20 4c 44  41 20 6d 61 67 61 7a 69  |      LDA magazi|
00004010  6e 65 20 20 5c 20 6c 6f  61 64 20 6d 61 67 61 7a  |ne  \ load magaz|
00004020  69 6e 65 20 6e 75 6d 62  65 72 0d 20 31 34 37 30  |ine number. 1470|
00004030  20 20 20 20 20 20 20 20  20 43 4d 50 20 23 26 30  |         CMP #&0|
00004040  38 20 20 20 20 20 20 5c  20 62 69 74 20 33 20 6f  |8      \ bit 3 o|
00004050  66 20 6d 61 67 2e 20 6e  75 6d 62 65 72 20 69 73  |f mag. number is|
00004060  20 62 69 74 20 30 20 6f  66 20 70 61 63 6b 65 74  | bit 0 of packet|
00004070  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00004080  20 20 20 20 20 20 20 20  20 20 20 20 20 5c 20 6e  |             \ n|
00004090  75 6d 62 65 72 0d 20 31  34 38 30 20 20 20 20 20  |umber. 1480     |
000040a0  20 20 20 20 52 4f 4c 20  70 61 63 6b 65 74 20 20  |    ROL packet  |
000040b0  20 20 5c 20 35 20 62 69  74 20 70 61 63 6b 65 74  |  \ 5 bit packet|
000040c0  20 6e 75 6d 62 65 72 0d  20 31 34 39 30 20 20 20  | number. 1490   |
000040d0  20 20 20 20 20 20 41 4e  44 20 23 26 30 37 20 20  |      AND #&07  |
000040e0  20 20 20 20 5c 20 75 73  65 20 6f 6e 6c 79 20 62  |    \ use only b|
000040f0  69 74 73 20 30 2d 32 0d  20 31 35 30 30 20 20 20  |its 0-2. 1500   |
00004100  20 20 20 20 20 20 53 54  41 20 6d 61 67 61 7a 69  |      STA magazi|
00004110  6e 65 20 20 5c 20 33 20  62 69 74 20 6d 61 67 61  |ne  \ 3 bit maga|
00004120  7a 69 6e 65 20 6e 75 6d  62 65 72 0d 20 31 35 31  |zine number. 151|
00004130  30 20 20 20 20 20 20 20  20 20 4c 44 41 20 70 61  |0         LDA pa|
00004140  63 6b 65 74 0d 20 31 35  32 30 20 20 20 20 20 20  |cket. 1520      |
00004150  20 20 20 43 4d 50 20 23  26 31 38 20 20 20 20 20  |   CMP #&18     |
00004160  20 5c 20 69 67 6e 6f 72  65 20 54 53 44 50 2c 20  | \ ignore TSDP, |
00004170  44 61 74 61 63 61 73 74  2c 20 65 74 63 2e 0d 20  |Datacast, etc.. |
00004180  31 35 33 30 20 20 20 20  20 20 20 20 20 42 43 53  |1530         BCS|
00004190  20 65 78 69 74 20 20 20  20 20 20 5c 20 69 65 2e  | exit      \ ie.|
000041a0  20 75 73 65 20 4c 65 76  65 6c 20 31 20 54 65 6c  | use Level 1 Tel|
000041b0  65 74 65 78 74 20 6f 6e  6c 79 0d 20 31 35 34 30  |etext only. 1540|
000041c0  20 20 20 20 20 20 20 20  20 50 48 41 20 20 20 20  |         PHA    |
000041d0  20 20 20 20 20 20 20 5c  20 70 75 73 68 20 70 61  |       \ push pa|
000041e0  63 6b 65 74 20 6e 75 6d  62 65 72 0d 20 31 35 35  |cket number. 155|
000041f0  30 20 20 20 20 20 20 20  20 20 41 53 4c 20 41 20  |0         ASL A |
00004200  20 20 20 20 20 20 20 20  5c 20 70 61 63 6b 65 74  |        \ packet|
00004210  20 6e 75 6d 62 65 72 20  2a 20 32 0d 20 31 35 36  | number * 2. 156|
00004220  30 20 20 20 20 20 20 20  20 20 54 41 59 0d 20 31  |0         TAY. 1|
00004230  35 37 30 20 20 20 20 20  20 20 20 20 4c 44 41 20  |570         LDA |
00004240  62 75 66 66 74 61 62 6c  65 2c 59 20 5c 20 6c 6f  |bufftable,Y \ lo|
00004250  61 64 20 62 75 66 66 65  72 20 61 64 64 72 65 73  |ad buffer addres|
00004260  73 2c 20 6c 73 62 0d 20  31 35 38 30 20 20 20 20  |s, lsb. 1580    |
00004270  20 20 20 20 20 53 54 41  20 77 6f 72 6b 73 70 61  |     STA workspa|
00004280  63 65 20 5c 20 73 74 6f  72 65 20 69 6e 20 7a 65  |ce \ store in ze|
00004290  72 6f 20 70 61 67 65 0d  20 31 35 39 30 20 20 20  |ro page. 1590   |
000042a0  20 20 20 20 20 20 4c 44  41 20 62 75 66 66 74 61  |      LDA buffta|
000042b0  62 6c 65 2b 31 2c 59 20  5c 20 6c 6f 61 64 20 62  |ble+1,Y \ load b|
000042c0  75 66 66 65 72 20 61 64  64 72 65 73 73 2c 20 6d  |uffer address, m|
000042d0  73 62 0d 20 31 36 30 30  20 20 20 20 20 20 20 20  |sb. 1600        |
000042e0  20 53 54 41 20 77 6f 72  6b 73 70 61 63 65 2b 31  | STA workspace+1|
000042f0  20 5c 20 73 74 6f 72 65  20 69 6e 20 7a 65 72 6f  | \ store in zero|
00004300  20 70 61 67 65 0d 20 31  36 31 30 20 20 20 20 20  | page. 1610     |
00004310  20 20 20 20 50 4c 41 20  20 20 20 20 20 20 20 20  |    PLA         |
00004320  20 20 5c 20 70 75 6c 6c  20 70 61 63 6b 65 74 20  |  \ pull packet |
00004330  6e 75 6d 62 65 72 0d 20  31 36 32 30 20 20 20 20  |number. 1620    |
00004340  20 20 20 20 20 43 4d 50  20 23 26 30 30 20 20 20  |     CMP #&00   |
00004350  20 20 20 5c 20 69 73 20  69 74 20 61 20 68 65 61  |   \ is it a hea|
00004360  64 65 72 3f 0d 20 31 36  33 30 20 20 20 20 20 20  |der?. 1630      |
00004370  20 20 20 42 4e 45 20 6e  6f 74 68 65 61 64 65 72  |   BNE notheader|
00004380  20 5c 20 62 72 61 6e 63  68 20 69 66 20 6e 6f 74  | \ branch if not|
00004390  20 68 65 61 64 65 72 0d  20 31 36 34 30 20 20 20  | header. 1640   |
000043a0  20 20 20 20 20 20 54 41  58 20 20 20 20 20 20 20  |      TAX       |
000043b0  20 20 20 20 5c 20 69 6e  69 74 20 69 6e 64 65 78  |    \ init index|
000043c0  20 66 6f 72 20 68 61 6d  6d 65 64 20 64 61 74 61  | for hammed data|
000043d0  0d 20 31 36 35 30 20 2e  72 65 61 64 68 65 61 64  |. 1650 .readhead|
000043e0  65 72 0d 20 31 36 36 30  20 20 20 20 20 20 20 20  |er. 1660        |
000043f0  20 4c 44 59 20 64 61 74  61 72 65 67 20 20 20 5c  | LDY datareg   \|
00004400  20 72 65 61 64 20 64 61  74 61 20 72 65 67 69 73  | read data regis|
00004410  74 65 72 0d 20 31 36 37  30 20 20 20 20 20 20 20  |ter. 1670       |
00004420  20 20 4c 44 41 20 68 61  6d 74 61 62 6c 65 2c 59  |  LDA hamtable,Y|
00004430  20 5c 20 64 65 2d 68 61  6d 20 69 74 0d 20 31 36  | \ de-ham it. 16|
00004440  38 30 20 20 20 20 20 20  20 20 20 42 4d 49 20 74  |80         BMI t|
00004450  65 73 74 66 6c 61 67 20  20 5c 20 73 74 6f 70 20  |estflag  \ stop |
00004460  6c 6f 61 64 69 6e 67 20  69 66 20 65 72 72 6f 72  |loading if error|
00004470  0d 20 31 36 39 30 20 20  20 20 20 20 20 20 20 53  |. 1690         S|
00004480  54 41 20 62 75 66 66 65  72 2c 58 20 20 5c 20 73  |TA buffer,X  \ s|
00004490  74 6f 72 65 20 64 65 2d  68 61 6d 6d 65 64 20 64  |tore de-hammed d|
000044a0  61 74 61 0d 20 31 37 30  30 20 20 20 20 20 20 20  |ata. 1700       |
000044b0  20 20 49 4e 58 20 20 20  20 20 20 20 20 20 20 20  |  INX           |
000044c0  5c 20 69 6e 63 72 65 6d  65 6e 74 20 69 6e 64 65  |\ increment inde|
000044d0  78 0d 20 31 37 31 30 20  20 20 20 20 20 20 20 20  |x. 1710         |
000044e0  43 50 58 20 23 26 30 38  20 20 20 20 20 20 5c 20  |CPX #&08      \ |
000044f0  75 73 65 20 58 20 3d 20  30 2d 37 0d 20 31 37 32  |use X = 0-7. 172|
00004500  30 20 20 20 20 20 20 20  20 20 42 43 43 20 72 65  |0         BCC re|
00004510  61 64 68 65 61 64 65 72  20 5c 20 63 6f 6e 74 69  |adheader \ conti|
00004520  6e 75 65 20 72 65 61 64  69 6e 67 20 68 61 6d 6d  |nue reading hamm|
00004530  65 64 20 64 61 74 61 0d  20 31 37 33 30 20 20 20  |ed data. 1730   |
00004540  20 20 20 20 20 20 4c 44  41 20 67 72 61 62 66 6c  |      LDA grabfl|
00004550  61 67 20 20 5c 20 61 72  65 20 77 65 20 6c 6f 61  |ag  \ are we loa|
00004560  64 69 6e 67 20 6f 72 20  73 65 61 72 63 68 69 6e  |ding or searchin|
00004570  67 3f 0d 20 31 37 34 30  20 20 20 20 20 20 20 20  |g?. 1740        |
00004580  20 42 45 51 20 63 68 65  63 6b 73 74 61 72 74 20  | BEQ checkstart |
00004590  5c 20 62 72 61 6e 63 68  20 69 66 20 73 65 61 72  |\ branch if sear|
000045a0  63 68 69 6e 67 0d 20 31  37 35 30 20 20 20 20 20  |ching. 1750     |
000045b0  20 20 20 20 4c 44 41 20  6d 61 67 61 7a 69 6e 65  |    LDA magazine|
000045c0  20 20 5c 20 77 65 20 6d  75 73 74 20 62 65 20 6c  |  \ we must be l|
000045d0  6f 61 64 69 6e 67 20 61  20 70 61 67 65 0d 20 31  |oading a page. 1|
000045e0  37 36 30 20 20 20 20 20  20 20 20 20 43 4d 50 20  |760         CMP |
000045f0  75 73 65 72 6d 61 67 20  20 20 5c 20 69 73 20 69  |usermag   \ is i|
00004600  74 20 74 68 65 20 6d 61  67 61 7a 69 6e 65 20 77  |t the magazine w|
00004610  65 20 77 61 6e 74 3f 0d  20 31 37 37 30 20 20 20  |e want?. 1770   |
00004620  20 20 20 20 20 20 42 4e  45 20 6f 75 74 20 20 20  |      BNE out   |
00004630  20 20 20 20 5c 20 62 72  61 6e 63 68 20 69 66 20  |    \ branch if |
00004640  6e 6f 74 20 74 68 65 20  6f 6e 65 20 77 65 20 77  |not the one we w|
00004650  61 6e 74 0d 20 31 37 38  30 20 20 20 20 20 20 20  |ant. 1780       |
00004660  20 20 4c 44 41 20 62 75  66 66 65 72 20 20 20 20  |  LDA buffer    |
00004670  5c 20 6c 6f 77 20 6e 79  62 62 6c 65 20 6f 66 20  |\ low nybble of |
00004680  70 61 67 65 20 6e 75 6d  62 65 72 0d 20 31 37 39  |page number. 179|
00004690  30 20 20 20 20 20 20 20  20 20 43 4d 50 20 75 73  |0         CMP us|
000046a0  65 72 70 61 67 65 20 20  5c 20 69 73 20 74 68 69  |erpage  \ is thi|
000046b0  73 20 74 68 65 20 73 61  6d 65 20 61 73 20 74 68  |s the same as th|
000046c0  65 20 6f 6e 65 20 77 65  20 61 72 65 20 6c 6f 61  |e one we are loa|
000046d0  64 69 6e 67 3f 0d 20 31  38 30 30 20 20 20 20 20  |ding?. 1800     |
000046e0  20 20 20 20 42 4e 45 20  65 6e 64 66 6f 75 6e 64  |    BNE endfound|
000046f0  20 20 5c 20 65 6e 64 20  6f 66 20 70 61 67 65 20  |  \ end of page |
00004700  77 68 65 6e 20 64 69 66  66 65 72 65 6e 74 0d 20  |when different. |
00004710  31 38 31 30 20 20 20 20  20 20 20 20 20 4c 44 41  |1810         LDA|
00004720  20 62 75 66 66 65 72 2b  31 20 20 5c 20 68 69 67  | buffer+1  \ hig|
00004730  68 20 6e 79 62 62 6c 65  20 6f 66 20 70 61 67 65  |h nybble of page|
00004740  20 6e 75 6d 62 65 72 0d  20 31 38 32 30 20 20 20  | number. 1820   |
00004750  20 20 20 20 20 20 43 4d  50 20 75 73 65 72 70 61  |      CMP userpa|
00004760  67 65 2b 31 20 5c 20 69  73 20 74 68 69 73 20 74  |ge+1 \ is this t|
00004770  68 65 20 73 61 6d 65 20  61 73 20 74 68 65 20 6f  |he same as the o|
00004780  6e 65 20 77 65 20 61 72  65 20 6c 6f 61 64 69 6e  |ne we are loadin|
00004790  67 3f 0d 20 31 38 33 30  20 20 20 20 20 20 20 20  |g?. 1830        |
000047a0  20 42 45 51 20 6f 75 74  20 20 20 20 20 20 20 5c  | BEQ out       \|
000047b0  20 6e 6f 74 20 65 6e 64  20 6f 66 20 70 61 67 65  | not end of page|
000047c0  20 69 66 20 74 68 65 20  73 61 6d 65 0d 20 31 38  | if the same. 18|
000047d0  34 30 20 2e 65 6e 64 66  6f 75 6e 64 0d 20 31 38  |40 .endfound. 18|
000047e0  35 30 20 20 20 20 20 20  20 20 20 4c 44 41 20 23  |50         LDA #|
000047f0  26 38 30 20 20 20 20 20  20 5c 20 73 61 6d 65 20  |&80      \ same |
00004800  6d 61 67 61 7a 69 6e 65  20 62 75 74 20 64 69 66  |magazine but dif|
00004810  66 65 72 65 6e 74 20 70  61 67 65 20 6e 75 6d 62  |ferent page numb|
00004820  65 72 73 0d 20 31 38 36  30 20 20 20 20 20 20 20  |ers. 1860       |
00004830  20 20 53 54 41 20 67 72  61 62 66 6c 61 67 20 20  |  STA grabflag  |
00004840  5c 20 70 61 67 65 20 67  72 61 62 62 65 64 0d 20  |\ page grabbed. |
00004850  31 38 37 30 20 2e 6f 75  74 0d 20 31 38 38 30 20  |1870 .out. 1880 |
00004860  20 20 20 20 20 20 20 20  52 54 53 0d 20 31 38 39  |        RTS. 189|
00004870  30 20 2e 63 68 65 63 6b  73 74 61 72 74 0d 20 31  |0 .checkstart. 1|
00004880  39 30 30 20 20 20 20 20  20 20 20 20 4c 44 41 20  |900         LDA |
00004890  62 75 66 66 65 72 2b 35  20 20 5c 20 63 68 65 63  |buffer+5  \ chec|
000048a0  6b 20 66 6f 72 20 73 75  62 74 69 74 6c 65 0d 20  |k for subtitle. |
000048b0  31 39 31 30 20 20 20 20  20 20 20 20 20 41 4e 44  |1910         AND|
000048c0  20 23 26 30 38 20 20 20  20 20 20 5c 20 63 68 65  | #&08      \ che|
000048d0  63 6b 20 62 69 74 20 33  0d 20 31 39 32 30 20 20  |ck bit 3. 1920  |
000048e0  20 20 20 20 20 20 20 42  4e 45 20 6f 75 74 20 20  |       BNE out  |
000048f0  20 20 20 20 20 5c 20 72  65 6a 65 63 74 20 73 75  |     \ reject su|
00004900  62 74 69 74 6c 65 73 0d  20 31 39 33 30 20 20 20  |btitles. 1930   |
00004910  20 20 20 20 20 20 4c 44  41 20 6d 61 67 61 7a 69  |      LDA magazi|
00004920  6e 65 20 20 5c 20 6c 6f  61 64 20 74 68 65 20 68  |ne  \ load the h|
00004930  65 61 64 65 72 20 6d 61  67 61 7a 69 6e 65 20 6e  |eader magazine n|
00004940  75 6d 62 65 72 0d 20 31  39 34 30 20 20 20 20 20  |umber. 1940     |
00004950  20 20 20 20 43 4d 50 20  75 73 65 72 6d 61 67 20  |    CMP usermag |
00004960  20 20 5c 20 69 73 20 69  74 20 74 68 65 20 6f 6e  |  \ is it the on|
00004970  65 20 77 65 20 77 61 6e  74 3f 0d 20 31 39 35 30  |e we want?. 1950|
00004980  20 20 20 20 20 20 20 20  20 42 4e 45 20 6e 65 78  |         BNE nex|
00004990  74 62 79 74 65 20 20 5c  20 62 72 61 6e 63 68 20  |tbyte  \ branch |
000049a0  69 66 20 6e 6f 74 20 74  68 65 20 6f 6e 65 0d 20  |if not the one. |
000049b0  31 39 36 30 20 20 20 20  20 20 20 20 20 4c 44 41  |1960         LDA|
000049c0  20 75 73 65 72 70 61 67  65 20 20 5c 20 6c 6f 61  | userpage  \ loa|
000049d0  64 20 6c 73 62 20 6f 66  20 77 61 6e 74 65 64 20  |d lsb of wanted |
000049e0  70 61 67 65 20 6e 75 6d  62 65 72 0d 20 31 39 37  |page number. 197|
000049f0  30 20 20 20 20 20 20 20  20 20 43 4d 50 20 62 75  |0         CMP bu|
00004a00  66 66 65 72 20 20 20 20  5c 20 74 68 65 20 70 61  |ffer    \ the pa|
00004a10  67 65 20 77 65 20 68 61  76 65 0d 20 31 39 38 30  |ge we have. 1980|
00004a20  20 20 20 20 20 20 20 20  20 42 4e 45 20 6e 65 78  |         BNE nex|
00004a30  74 62 79 74 65 20 20 5c  20 62 72 61 6e 63 68 20  |tbyte  \ branch |
00004a40  69 66 20 6e 6f 74 20 74  68 65 20 6f 6e 65 20 77  |if not the one w|
00004a50  65 20 77 61 6e 74 0d 20  31 39 39 30 20 20 20 20  |e want. 1990    |
00004a60  20 20 20 20 20 4c 44 41  20 75 73 65 72 70 61 67  |     LDA userpag|
00004a70  65 2b 31 20 5c 20 6c 6f  61 64 20 6d 73 62 20 6f  |e+1 \ load msb o|
00004a80  66 20 77 61 6e 74 65 64  20 70 61 67 65 20 6e 75  |f wanted page nu|
00004a90  6d 62 65 72 0d 20 32 30  30 30 20 20 20 20 20 20  |mber. 2000      |
00004aa0  20 20 20 43 4d 50 20 62  75 66 66 65 72 2b 31 20  |   CMP buffer+1 |
00004ab0  20 5c 20 74 68 65 20 70  61 67 65 20 77 65 20 68  | \ the page we h|
00004ac0  61 76 65 0d 20 32 30 31  30 20 20 20 20 20 20 20  |ave. 2010       |
00004ad0  20 20 42 4e 45 20 6e 65  78 74 62 79 74 65 20 20  |  BNE nextbyte  |
00004ae0  5c 20 62 72 61 6e 63 68  20 69 66 20 6e 6f 74 20  |\ branch if not |
00004af0  74 68 65 20 6f 6e 65 20  77 65 20 77 61 6e 74 0d  |the one we want.|
00004b00  20 32 30 32 30 20 20 20  20 20 20 20 20 20 4c 44  | 2020         LD|
00004b10  41 20 23 26 34 30 20 20  20 20 20 20 5c 20 6c 6f  |A #&40      \ lo|
00004b20  61 64 20 74 68 69 73 20  70 61 67 65 0d 20 32 30  |ad this page. 20|
00004b30  33 30 20 20 20 20 20 20  20 20 20 53 54 41 20 67  |30         STA g|
00004b40  72 61 62 66 6c 61 67 20  20 5c 20 70 61 67 65 20  |rabflag  \ page |
00004b50  6c 6f 61 64 69 6e 67 0d  20 32 30 34 30 20 20 20  |loading. 2040   |
00004b60  20 20 20 20 20 20 52 54  53 0d 20 32 30 35 30 20  |      RTS. 2050 |
00004b70  2e 6e 65 78 74 62 79 74  65 0d 20 32 30 36 30 20  |.nextbyte. 2060 |
00004b80  20 20 20 20 20 20 20 20  4c 44 41 20 62 75 66 66  |        LDA buff|
00004b90  65 72 2b 36 20 20 5c 20  63 68 65 63 6b 20 66 6f  |er+6  \ check fo|
00004ba0  72 20 73 75 70 70 72 65  73 73 20 61 6e 64 20 6f  |r suppress and o|
00004bb0  75 74 20 6f 66 20 73 65  71 75 65 6e 63 65 0d 20  |ut of sequence. |
00004bc0  32 30 37 30 20 20 20 20  20 20 20 20 20 41 4e 44  |2070         AND|
00004bd0  20 23 26 30 35 20 20 20  20 20 20 5c 20 63 68 65  | #&05      \ che|
00004be0  63 6b 20 62 69 74 73 20  30 20 61 6e 64 20 32 0d  |ck bits 0 and 2.|
00004bf0  20 32 30 38 30 20 20 20  20 20 20 20 20 20 42 4e  | 2080         BN|
00004c00  45 20 72 65 74 75 72 6e  20 20 20 20 5c 20 72 65  |E return    \ re|
00004c10  6a 65 63 74 20 73 75 70  70 72 65 73 73 20 61 6e  |ject suppress an|
00004c20  64 20 6f 75 74 20 6f 66  20 73 65 71 75 65 6e 63  |d out of sequenc|
00004c30  65 0d 20 32 30 39 30 20  20 20 20 20 20 20 20 20  |e. 2090         |
00004c40  4c 53 52 20 62 75 66 66  65 72 2b 37 20 20 5c 20  |LSR buffer+7  \ |
00004c50  63 68 65 63 6b 20 66 6f  72 20 73 65 72 69 61 6c  |check for serial|
00004c60  20 6d 61 67 61 7a 69 6e  65 0d 20 32 31 30 30 20  | magazine. 2100 |
00004c70  20 20 20 20 20 20 20 20  42 43 53 20 64 69 73 70  |        BCS disp|
00004c80  6c 61 79 20 20 20 5c 20  6c 6f 61 64 20 74 68 65  |lay   \ load the|
00004c90  20 72 65 73 74 20 6f 66  20 74 68 65 20 68 65 61  | rest of the hea|
00004ca0  64 65 72 0d 20 32 31 31  30 20 20 20 20 20 20 20  |der. 2110       |
00004cb0  20 20 4c 44 41 20 6d 61  67 61 7a 69 6e 65 20 20  |  LDA magazine  |
00004cc0  5c 20 63 75 72 72 65 6e  74 20 6d 61 67 61 7a 69  |\ current magazi|
00004cd0  6e 65 20 6e 75 6d 62 65  72 0d 20 32 31 32 30 20  |ne number. 2120 |
00004ce0  20 20 20 20 20 20 20 20  43 4d 50 20 75 73 65 72  |        CMP user|
00004cf0  6d 61 67 20 20 20 5c 20  6c 6f 61 64 20 69 66 20  |mag   \ load if |
00004d00  73 61 6d 65 20 6d 61 67  61 7a 69 6e 65 0d 20 32  |same magazine. 2|
00004d10  31 33 30 20 20 20 20 20  20 20 20 20 42 4e 45 20  |130         BNE |
00004d20  72 65 74 75 72 6e 20 20  20 20 5c 20 64 6f 6e 27  |return    \ don'|
00004d30  74 20 6c 6f 61 64 20 69  66 20 64 69 66 66 65 72  |t load if differ|
00004d40  65 6e 74 20 6d 61 67 61  7a 69 6e 65 0d 20 32 31  |ent magazine. 21|
00004d50  34 30 20 2e 64 69 73 70  6c 61 79 0d 20 32 31 35  |40 .display. 215|
00004d60  30 20 20 20 20 20 20 20  20 20 4c 44 59 20 23 26  |0         LDY #&|
00004d70  30 38 20 20 20 20 20 20  5c 20 68 65 61 64 65 72  |08      \ header|
00004d80  20 64 61 74 61 20 73 74  61 72 74 73 20 61 74 20  | data starts at |
00004d90  62 79 74 65 20 38 0d 20  32 31 36 30 20 20 20 20  |byte 8. 2160    |
00004da0  20 20 20 20 20 42 4e 45  20 72 65 61 64 6d 6f 72  |     BNE readmor|
00004db0  65 20 20 5c 20 67 6f 20  74 6f 20 72 65 61 64 20  |e  \ go to read |
00004dc0  74 68 65 20 68 65 61 64  65 72 0d 20 32 31 37 30  |the header. 2170|
00004dd0  20 2e 6e 6f 74 68 65 61  64 65 72 0d 20 32 31 38  | .notheader. 218|
00004de0  30 20 20 20 20 20 20 20  20 20 42 49 54 20 67 72  |0         BIT gr|
00004df0  61 62 66 6c 61 67 20 20  5c 20 69 73 20 61 20 70  |abflag  \ is a p|
00004e00  61 67 65 20 6c 6f 61 64  69 6e 67 3f 0d 20 32 31  |age loading?. 21|
00004e10  39 30 20 20 20 20 20 20  20 20 20 42 56 43 20 72  |90         BVC r|
00004e20  65 74 75 72 6e 20 20 20  20 5c 20 72 65 74 75 72  |eturn    \ retur|
00004e30  6e 20 69 66 20 70 61 67  65 20 6e 6f 74 20 6c 6f  |n if page not lo|
00004e40  61 64 69 6e 67 0d 20 32  32 30 30 20 20 20 20 20  |ading. 2200     |
00004e50  20 20 20 20 4c 44 41 20  6d 61 67 61 7a 69 6e 65  |    LDA magazine|
00004e60  20 20 5c 20 69 73 20 74  68 65 20 6d 61 67 61 7a  |  \ is the magaz|
00004e70  69 6e 65 20 6e 75 6d 62  65 72 20 74 68 65 20 6f  |ine number the o|
00004e80  6e 65 20 77 65 20 77 61  6e 74 3f 0d 20 32 32 31  |ne we want?. 221|
00004e90  30 20 20 20 20 20 20 20  20 20 43 4d 50 20 75 73  |0         CMP us|
00004ea0  65 72 6d 61 67 0d 20 32  32 32 30 20 20 20 20 20  |ermag. 2220     |
00004eb0  20 20 20 20 42 4e 45 20  72 65 74 75 72 6e 20 20  |    BNE return  |
00004ec0  20 20 5c 20 72 65 74 75  72 6e 20 69 66 20 64 69  |  \ return if di|
00004ed0  66 66 65 72 65 6e 74 20  6d 61 67 61 7a 69 6e 65  |fferent magazine|
00004ee0  0d 20 32 32 33 30 20 20  20 20 20 20 20 20 20 4c  |. 2230         L|
00004ef0  44 59 20 23 26 30 30 20  20 20 20 20 20 5c 20 72  |DY #&00      \ r|
00004f00  65 61 64 20 62 79 74 65  73 20 30 20 2d 20 33 39  |ead bytes 0 - 39|
00004f10  0d 20 32 32 34 30 20 2e  72 65 61 64 6d 6f 72 65  |. 2240 .readmore|
00004f20  0d 20 32 32 35 30 20 20  20 20 20 20 20 20 20 4c  |. 2250         L|
00004f30  44 41 20 64 61 74 61 72  65 67 20 20 20 5c 20 72  |DA datareg   \ r|
00004f40  65 61 64 20 64 61 74 61  20 72 65 67 69 73 74 65  |ead data registe|
00004f50  72 0d 20 32 32 36 30 20  20 20 20 20 20 20 20 20  |r. 2260         |
00004f60  4f 52 41 20 23 26 38 30  20 20 20 20 20 20 5c 20  |ORA #&80      \ |
00004f70  73 65 74 20 62 69 74 20  37 0d 20 32 32 37 30 20  |set bit 7. 2270 |
00004f80  20 20 20 20 20 20 20 20  53 54 41 20 28 77 6f 72  |        STA (wor|
00004f90  6b 73 70 61 63 65 29 2c  59 20 5c 20 73 74 6f 72  |kspace),Y \ stor|
00004fa0  65 20 69 6e 20 62 75 66  66 65 72 0d 20 32 32 38  |e in buffer. 228|
00004fb0  30 20 20 20 20 20 20 20  20 20 49 4e 59 20 20 20  |0         INY   |
00004fc0  20 20 20 20 20 20 20 20  5c 20 69 6e 63 72 65 6d  |        \ increm|
00004fd0  65 6e 74 20 69 6e 64 65  78 0d 20 32 32 39 30 20  |ent index. 2290 |
00004fe0  20 20 20 20 20 20 20 20  43 50 59 20 23 26 32 38  |        CPY #&28|
00004ff0  20 20 20 20 20 20 5c 20  64 65 63 69 6d 61 6c 20  |      \ decimal |
00005000  34 30 0d 20 32 33 30 30  20 20 20 20 20 20 20 20  |40. 2300        |
00005010  20 42 4e 45 20 72 65 61  64 6d 6f 72 65 20 20 5c  | BNE readmore  \|
00005020  20 6d 6f 72 65 20 64 61  74 61 20 69 6e 20 74 68  | more data in th|
00005030  69 73 20 70 61 63 6b 65  74 0d 20 32 33 31 30 20  |is packet. 2310 |
00005040  2e 72 65 74 75 72 6e 0d  20 32 33 32 30 20 20 20  |.return. 2320   |
00005050  20 20 20 20 20 20 52 54  53 0d 20 32 33 33 30 20  |      RTS. 2330 |
00005060  2e 63 68 65 63 6b 64 6f  75 62 6c 65 0d 20 32 33  |.checkdouble. 23|
00005070  34 30 20 20 20 20 20 20  20 20 20 4c 44 58 20 23  |40         LDX #|
00005080  26 30 31 20 20 20 20 20  20 5c 20 73 63 72 65 65  |&01      \ scree|
00005090  6e 20 72 6f 77 20 6e 75  6d 62 65 72 73 20 31 2d  |n row numbers 1-|
000050a0  32 33 0d 20 32 33 35 30  20 2e 6e 65 78 74 63 6f  |23. 2350 .nextco|
000050b0  6c 75 6d 6e 0d 20 32 33  36 30 20 20 20 20 20 20  |lumn. 2360      |
000050c0  20 20 20 4c 44 59 20 23  26 30 30 20 20 20 20 20  |   LDY #&00     |
000050d0  20 5c 20 73 63 72 65 65  6e 20 63 6f 6c 75 6d 6e  | \ screen column|
000050e0  20 6e 75 6d 62 65 72 73  20 30 2d 34 30 0d 20 32  | numbers 0-40. 2|
000050f0  33 37 30 20 20 20 20 20  20 20 20 20 4a 53 52 20  |370         JSR |
00005100  73 65 74 75 70 20 20 20  20 20 5c 20 73 65 74 20  |setup     \ set |
00005110  75 70 20 77 6f 72 6b 73  70 61 63 65 20 66 6f 72  |up workspace for|
00005120  20 69 6e 64 69 72 65 63  74 20 61 64 64 72 65 73  | indirect addres|
00005130  73 69 6e 67 0d 20 32 33  38 30 20 2e 73 69 6e 67  |sing. 2380 .sing|
00005140  6c 65 6c 6f 6f 70 0d 20  32 33 39 30 20 20 20 20  |leloop. 2390    |
00005150  20 20 20 20 20 4c 44 41  20 28 77 6f 72 6b 73 70  |     LDA (worksp|
00005160  61 63 65 29 2c 59 0d 20  32 34 30 30 20 20 20 20  |ace),Y. 2400    |
00005170  20 20 20 20 20 4a 53 52  20 63 6f 6e 63 65 61 6c  |     JSR conceal|
00005180  20 20 20 5c 20 63 68 65  63 6b 20 66 6f 72 20 63  |   \ check for c|
00005190  6f 6e 63 65 61 6c 65 64  20 64 69 73 70 6c 61 79  |oncealed display|
000051a0  0d 20 32 34 31 30 20 20  20 20 20 20 20 20 20 43  |. 2410         C|
000051b0  4d 50 20 23 26 38 44 20  20 20 20 20 20 5c 20 54  |MP #&8D      \ T|
000051c0  54 58 20 64 6f 75 62 6c  65 20 68 65 69 67 68 74  |TX double height|
000051d0  20 63 68 61 72 61 63 74  65 72 0d 20 32 34 32 30  | character. 2420|
000051e0  20 20 20 20 20 20 20 20  20 42 45 51 20 64 6f 75  |         BEQ dou|
000051f0  62 6c 65 68 65 69 67 68  74 0d 20 32 34 33 30 20  |bleheight. 2430 |
00005200  20 20 20 20 20 20 20 20  49 4e 59 0d 20 32 34 34  |        INY. 244|
00005210  30 20 20 20 20 20 20 20  20 20 43 50 59 20 23 26  |0         CPY #&|
00005220  32 38 20 20 20 20 20 20  5c 20 64 65 63 69 6d 61  |28      \ decima|
00005230  6c 20 34 30 0d 20 32 34  35 30 20 20 20 20 20 20  |l 40. 2450      |
00005240  20 20 20 42 43 43 20 73  69 6e 67 6c 65 6c 6f 6f  |   BCC singleloo|
00005250  70 0d 20 32 34 36 30 20  2e 63 61 72 72 79 73 65  |p. 2460 .carryse|
00005260  74 0d 20 32 34 37 30 20  20 20 20 20 20 20 20 20  |t. 2470         |
00005270  49 4e 58 0d 20 32 34 38  30 20 20 20 20 20 20 20  |INX. 2480       |
00005280  20 20 43 50 58 20 23 26  31 38 20 20 20 20 20 20  |  CPX #&18      |
00005290  5c 20 64 65 63 69 6d 61  6c 20 32 34 0d 20 32 34  |\ decimal 24. 24|
000052a0  39 30 20 20 20 20 20 20  20 20 20 42 43 43 20 6e  |90         BCC n|
000052b0  65 78 74 63 6f 6c 75 6d  6e 0d 20 32 35 30 30 20  |extcolumn. 2500 |
000052c0  20 20 20 20 20 20 20 20  52 54 53 0d 20 32 35 31  |        RTS. 251|
000052d0  30 20 2e 64 6f 75 62 6c  65 68 65 69 67 68 74 0d  |0 .doubleheight.|
000052e0  20 32 35 32 30 20 20 20  20 20 20 20 20 20 4c 44  | 2520         LD|
000052f0  59 20 23 26 30 30 0d 20  32 35 33 30 20 20 20 20  |Y #&00. 2530    |
00005300  20 20 20 20 20 54 58 41  0d 20 32 35 34 30 20 20  |     TXA. 2540  |
00005310  20 20 20 20 20 20 20 50  48 41 20 20 20 20 20 20  |       PHA      |
00005320  20 20 20 20 20 5c 20 73  74 6f 72 65 20 72 6f 77  |     \ store row|
00005330  20 6e 75 6d 62 65 72 0d  20 32 35 35 30 20 20 20  | number. 2550   |
00005340  20 20 20 20 20 20 49 4e  58 0d 20 32 35 36 30 20  |      INX. 2560 |
00005350  20 20 20 20 20 20 20 20  54 58 41 0d 20 32 35 37  |        TXA. 257|
00005360  30 20 20 20 20 20 20 20  20 20 41 53 4c 20 41 20  |0         ASL A |
00005370  20 20 20 20 20 20 20 20  5c 20 28 72 6f 77 20 6e  |        \ (row n|
00005380  75 6d 62 65 72 20 2b 20  31 29 20 2a 20 32 0d 20  |umber + 1) * 2. |
00005390  32 35 38 30 20 20 20 20  20 20 20 20 20 54 41 58  |2580         TAX|
000053a0  0d 20 32 35 39 30 20 20  20 20 20 20 20 20 20 4c  |. 2590         L|
000053b0  44 41 20 62 75 66 66 74  61 62 6c 65 2c 58 0d 20  |DA bufftable,X. |
000053c0  32 36 30 30 20 20 20 20  20 20 20 20 20 53 54 41  |2600         STA|
000053d0  20 64 65 73 74 69 6e 61  74 69 6f 6e 0d 20 32 36  | destination. 26|
000053e0  31 30 20 20 20 20 20 20  20 20 20 4c 44 41 20 62  |10         LDA b|
000053f0  75 66 66 74 61 62 6c 65  2b 31 2c 58 0d 20 32 36  |ufftable+1,X. 26|
00005400  32 30 20 20 20 20 20 20  20 20 20 53 54 41 20 64  |20         STA d|
00005410  65 73 74 69 6e 61 74 69  6f 6e 2b 31 0d 20 32 36  |estination+1. 26|
00005420  33 30 20 20 20 20 20 20  20 20 20 50 4c 41 0d 20  |30         PLA. |
00005430  32 36 34 30 20 20 20 20  20 20 20 20 20 54 41 58  |2640         TAX|
00005440  20 20 20 20 20 20 20 20  20 20 20 5c 20 72 65 73  |           \ res|
00005450  74 6f 72 65 20 72 6f 77  20 6e 75 6d 62 65 72 0d  |tore row number.|
00005460  20 32 36 35 30 20 2e 64  6f 75 62 6c 65 6c 6f 6f  | 2650 .doubleloo|
00005470  70 0d 20 32 36 36 30 20  20 20 20 20 20 20 20 20  |p. 2660         |
00005480  4c 44 41 20 28 77 6f 72  6b 73 70 61 63 65 29 2c  |LDA (workspace),|
00005490  59 0d 20 32 36 37 30 20  20 20 20 20 20 20 20 20  |Y. 2670         |
000054a0  4a 53 52 20 63 6f 6e 63  65 61 6c 20 20 20 5c 20  |JSR conceal   \ |
000054b0  63 68 65 63 6b 20 66 6f  72 20 63 6f 6e 63 65 61  |check for concea|
000054c0  6c 65 64 20 64 69 73 70  6c 61 79 0d 20 32 36 38  |led display. 268|
000054d0  30 20 20 20 20 20 20 20  20 20 53 54 41 20 28 64  |0         STA (d|
000054e0  65 73 74 69 6e 61 74 69  6f 6e 29 2c 59 0d 20 32  |estination),Y. 2|
000054f0  36 39 30 20 20 20 20 20  20 20 20 20 49 4e 59 0d  |690         INY.|
00005500  20 32 37 30 30 20 20 20  20 20 20 20 20 20 43 50  | 2700         CP|
00005510  59 20 23 26 32 38 20 20  20 20 20 20 5c 20 64 65  |Y #&28      \ de|
00005520  63 69 6d 61 6c 20 34 30  0d 20 32 37 31 30 20 20  |cimal 40. 2710  |
00005530  20 20 20 20 20 20 20 42  43 43 20 64 6f 75 62 6c  |       BCC doubl|
00005540  65 6c 6f 6f 70 0d 20 32  37 32 30 20 20 20 20 20  |eloop. 2720     |
00005550  20 20 20 20 49 4e 58 0d  20 32 37 33 30 20 20 20  |    INX. 2730   |
00005560  20 20 20 20 20 20 43 50  58 20 23 26 31 37 20 20  |      CPX #&17  |
00005570  20 20 20 20 5c 20 64 65  63 69 6d 61 6c 20 32 33  |    \ decimal 23|
00005580  0d 20 32 37 34 30 20 20  20 20 20 20 20 20 20 42  |. 2740         B|
00005590  43 43 20 63 61 72 72 79  73 65 74 0d 20 32 37 35  |CC carryset. 275|
000055a0  30 20 20 20 20 20 20 20  20 20 52 54 53 0d 20 32  |0         RTS. 2|
000055b0  37 36 30 20 2e 63 6f 6e  63 65 61 6c 0d 20 32 37  |760 .conceal. 27|
000055c0  37 30 20 20 20 20 20 20  20 20 20 43 4d 50 20 23  |70         CMP #|
000055d0  26 39 38 20 20 20 20 20  20 5c 20 54 54 58 20 63  |&98      \ TTX c|
000055e0  6f 6e 63 65 61 6c 20 64  69 73 70 6c 61 79 20 63  |onceal display c|
000055f0  68 61 72 61 63 74 65 72  0d 20 32 37 38 30 20 20  |haracter. 2780  |
00005600  20 20 20 20 20 20 20 42  4e 45 20 67 6f 62 61 63  |       BNE gobac|
00005610  6b 0d 20 32 37 39 30 20  20 20 20 20 20 20 20 20  |k. 2790         |
00005620  4c 44 41 20 23 41 53 43  28 22 20 22 29 20 5c 20  |LDA #ASC(" ") \ |
00005630  73 75 62 73 74 69 74 75  74 65 20 77 69 74 68 20  |substitute with |
00005640  61 20 73 70 61 63 65 0d  20 32 38 30 30 20 20 20  |a space. 2800   |
00005650  20 20 20 20 20 20 53 54  41 20 28 77 6f 72 6b 73  |      STA (works|
00005660  70 61 63 65 29 2c 59 0d  20 32 38 31 30 20 2e 67  |pace),Y. 2810 .g|
00005670  6f 62 61 63 6b 0d 20 32  38 32 30 20 20 20 20 20  |oback. 2820     |
00005680  20 20 20 20 52 54 53 0d  20 32 38 33 30 20 2e 73  |    RTS. 2830 .s|
00005690  65 74 75 70 0d 20 32 38  34 30 20 20 20 20 20 20  |etup. 2840      |
000056a0  20 20 20 54 58 41 0d 20  32 38 35 30 20 20 20 20  |   TXA. 2850    |
000056b0  20 20 20 20 20 50 48 41  20 20 20 20 20 20 20 20  |     PHA        |
000056c0  20 20 20 5c 20 73 74 6f  72 65 20 72 6f 77 20 6e  |   \ store row n|
000056d0  75 6d 62 65 72 0d 20 32  38 36 30 20 20 20 20 20  |umber. 2860     |
000056e0  20 20 20 20 41 53 4c 20  41 20 20 20 20 20 20 20  |    ASL A       |
000056f0  20 20 5c 20 28 72 6f 77  20 6e 75 6d 62 65 72 29  |  \ (row number)|
00005700  20 2a 20 32 0d 20 32 38  37 30 20 20 20 20 20 20  | * 2. 2870      |
00005710  20 20 20 54 41 58 0d 20  32 38 38 30 20 20 20 20  |   TAX. 2880    |
00005720  20 20 20 20 20 4c 44 41  20 62 75 66 66 74 61 62  |     LDA bufftab|
00005730  6c 65 2c 58 0d 20 32 38  39 30 20 20 20 20 20 20  |le,X. 2890      |
00005740  20 20 20 53 54 41 20 77  6f 72 6b 73 70 61 63 65  |   STA workspace|
00005750  0d 20 32 39 30 30 20 20  20 20 20 20 20 20 20 4c  |. 2900         L|
00005760  44 41 20 62 75 66 66 74  61 62 6c 65 2b 31 2c 58  |DA bufftable+1,X|
00005770  0d 20 32 39 31 30 20 20  20 20 20 20 20 20 20 53  |. 2910         S|
00005780  54 41 20 77 6f 72 6b 73  70 61 63 65 2b 31 0d 20  |TA workspace+1. |
00005790  32 39 32 30 20 20 20 20  20 20 20 20 20 50 4c 41  |2920         PLA|
000057a0  0d 20 32 39 33 30 20 20  20 20 20 20 20 20 20 54  |. 2930         T|
000057b0  41 58 20 20 20 20 20 20  20 20 20 20 20 5c 20 72  |AX           \ r|
000057c0  65 73 74 6f 72 65 20 72  6f 77 20 6e 75 6d 62 65  |estore row numbe|
000057d0  72 0d 20 32 39 34 30 20  20 20 20 20 20 20 20 20  |r. 2940         |
000057e0  52 54 53 0d 20 32 39 35  30 20 2e 74 72 61 6e 73  |RTS. 2950 .trans|
000057f0  66 65 72 0d 20 32 39 36  30 20 20 20 20 20 20 20  |fer. 2960       |
00005800  20 20 4c 44 58 20 23 26  30 31 20 20 20 20 20 20  |  LDX #&01      |
00005810  5c 20 73 63 72 65 65 6e  20 72 6f 77 73 20 31 2d  |\ screen rows 1-|
00005820  32 33 0d 20 32 39 37 30  20 2e 6e 65 78 74 6c 69  |23. 2970 .nextli|
00005830  6e 65 0d 20 32 39 38 30  20 20 20 20 20 20 20 20  |ne. 2980        |
00005840  20 4c 44 59 20 23 26 30  30 20 20 20 20 20 20 5c  | LDY #&00      \|
00005850  20 63 6f 6c 75 6d 6e 73  20 30 2d 33 39 0d 20 32  | columns 0-39. 2|
00005860  39 39 30 20 20 20 20 20  20 20 20 20 4a 53 52 20  |990         JSR |
00005870  76 64 75 33 31 0d 20 33  30 30 30 20 20 20 20 20  |vdu31. 3000     |
00005880  20 20 20 20 4a 53 52 20  73 65 74 75 70 20 20 20  |    JSR setup   |
00005890  20 20 5c 20 73 65 74 20  75 70 20 77 6f 72 6b 73  |  \ set up works|
000058a0  70 61 63 65 20 66 6f 72  20 69 6e 64 69 72 65 63  |pace for indirec|
000058b0  74 20 61 64 64 72 65 73  73 69 6e 67 0d 20 33 30  |t addressing. 30|
000058c0  31 30 20 2e 77 72 69 74  65 73 63 72 65 65 6e 0d  |10 .writescreen.|
000058d0  20 33 30 32 30 20 20 20  20 20 20 20 20 20 4c 44  | 3020         LD|
000058e0  41 20 28 77 6f 72 6b 73  70 61 63 65 29 2c 59 20  |A (workspace),Y |
000058f0  5c 20 6c 6f 61 64 20 64  61 74 61 20 66 72 6f 6d  |\ load data from|
00005900  20 62 75 66 66 65 72 0d  20 33 30 33 30 20 20 20  | buffer. 3030   |
00005910  20 20 20 20 20 20 4a 53  52 20 6f 73 77 72 63 68  |      JSR oswrch|
00005920  20 20 20 20 5c 20 77 72  69 74 65 20 74 6f 20 73  |    \ write to s|
00005930  63 72 65 65 6e 0d 20 33  30 34 30 20 20 20 20 20  |creen. 3040     |
00005940  20 20 20 20 4c 44 41 20  23 41 53 43 28 22 20 22  |    LDA #ASC(" "|
00005950  29 20 5c 20 73 70 61 63  65 20 63 68 61 72 61 63  |) \ space charac|
00005960  74 65 72 0d 20 33 30 35  30 20 20 20 20 20 20 20  |ter. 3050       |
00005970  20 20 53 54 41 20 28 77  6f 72 6b 73 70 61 63 65  |  STA (workspace|
00005980  29 2c 59 20 5c 20 63 6c  65 61 72 20 62 75 66 66  |),Y \ clear buff|
00005990  65 72 0d 20 33 30 36 30  20 20 20 20 20 20 20 20  |er. 3060        |
000059a0  20 49 4e 59 0d 20 33 30  37 30 20 20 20 20 20 20  | INY. 3070      |
000059b0  20 20 20 43 50 59 20 23  26 32 38 20 20 20 20 20  |   CPY #&28     |
000059c0  20 5c 20 64 65 63 69 6d  61 6c 20 34 30 0d 20 33  | \ decimal 40. 3|
000059d0  30 38 30 20 20 20 20 20  20 20 20 20 42 43 43 20  |080         BCC |
000059e0  77 72 69 74 65 73 63 72  65 65 6e 0d 20 33 30 39  |writescreen. 309|
000059f0  30 20 20 20 20 20 20 20  20 20 49 4e 58 0d 20 33  |0         INX. 3|
00005a00  31 30 30 20 20 20 20 20  20 20 20 20 43 50 58 20  |100         CPX |
00005a10  23 26 31 38 20 20 20 20  20 20 5c 20 64 65 63 69  |#&18      \ deci|
00005a20  6d 61 6c 20 32 34 0d 20  33 31 31 30 20 20 20 20  |mal 24. 3110    |
00005a30  20 20 20 20 20 42 43 43  20 6e 65 78 74 6c 69 6e  |     BCC nextlin|
00005a40  65 0d 20 33 31 32 30 20  20 20 20 20 20 20 20 20  |e. 3120         |
00005a50  52 54 53 0d 20 33 31 33  30 20 2e 76 64 75 33 31  |RTS. 3130 .vdu31|
00005a60  0d 20 33 31 34 30 20 20  20 20 20 20 20 20 20 4c  |. 3140         L|
00005a70  44 41 20 23 26 31 46 20  20 20 20 20 20 5c 20 64  |DA #&1F      \ d|
00005a80  65 63 69 6d 61 6c 20 33  31 0d 20 33 31 35 30 20  |ecimal 31. 3150 |
00005a90  20 20 20 20 20 20 20 20  4a 53 52 20 6f 73 77 72  |        JSR oswr|
00005aa0  63 68 0d 20 33 31 36 30  20 20 20 20 20 20 20 20  |ch. 3160        |
00005ab0  20 54 59 41 0d 20 33 31  37 30 20 20 20 20 20 20  | TYA. 3170      |
00005ac0  20 20 20 4a 53 52 20 6f  73 77 72 63 68 0d 20 33  |   JSR oswrch. 3|
00005ad0  31 38 30 20 20 20 20 20  20 20 20 20 54 58 41 0d  |180         TXA.|
00005ae0  20 33 31 39 30 20 20 20  20 20 20 20 20 20 4a 4d  | 3190         JM|
00005af0  50 20 6f 73 77 72 63 68  20 20 20 20 5c 20 61 6e  |P oswrch    \ an|
00005b00  64 20 72 65 74 75 72 6e  0d 20 33 32 30 30 20 2e  |d return. 3200 .|
00005b10  6f 6c 64 69 72 71 32 76  0d 20 33 32 31 30 20 20  |oldirq2v. 3210  |
00005b20  20 20 20 20 20 20 20 45  51 55 57 20 26 30 30 0d  |       EQUW &00.|
00005b30  20 33 32 32 30 20 2e 68  61 6d 74 61 62 6c 65 0d  | 3220 .hamtable.|
00005b40  20 33 32 33 30 20 20 20  20 20 20 20 20 20 45 51  | 3230         EQ|
00005b50  55 44 20 26 30 31 30 31  46 46 30 31 0d 20 33 32  |UD &0101FF01. 32|
00005b60  34 30 20 20 20 20 20 20  20 20 20 45 51 55 44 20  |40         EQUD |
00005b70  26 46 46 30 31 30 30 46  46 0d 20 33 32 35 30 20  |&FF0100FF. 3250 |
00005b80  20 20 20 20 20 20 20 20  45 51 55 44 20 26 46 46  |        EQUD &FF|
00005b90  30 31 30 32 46 46 0d 20  33 32 36 30 20 20 20 20  |0102FF. 3260    |
00005ba0  20 20 20 20 20 45 51 55  44 20 26 30 37 46 46 46  |     EQUD &07FFF|
00005bb0  46 30 41 0d 20 33 32 37  30 20 20 20 20 20 20 20  |F0A. 3270       |
00005bc0  20 20 45 51 55 44 20 26  46 46 30 31 30 30 46 46  |  EQUD &FF0100FF|
00005bd0  0d 20 33 32 38 30 20 20  20 20 20 20 20 20 20 45  |. 3280         E|
00005be0  51 55 44 20 26 30 30 46  46 30 30 30 30 0d 20 33  |QUD &00FF0000. 3|
00005bf0  32 39 30 20 20 20 20 20  20 20 20 20 45 51 55 44  |290         EQUD|
00005c00  20 26 30 42 46 46 46 46  30 36 0d 20 33 33 30 30  | &0BFFFF06. 3300|
00005c10  20 20 20 20 20 20 20 20  20 45 51 55 44 20 26 46  |         EQUD &F|
00005c20  46 30 33 30 30 46 46 0d  20 33 33 31 30 20 20 20  |F0300FF. 3310   |
00005c30  20 20 20 20 20 20 45 51  55 44 20 26 46 46 30 31  |      EQUD &FF01|
00005c40  30 43 46 46 0d 20 33 33  32 30 20 20 20 20 20 20  |0CFF. 3320      |
00005c50  20 20 20 45 51 55 44 20  26 30 37 46 46 46 46 30  |   EQUD &07FFFF0|
00005c60  34 0d 20 33 33 33 30 20  20 20 20 20 20 20 20 20  |4. 3330         |
00005c70  45 51 55 44 20 26 30 37  46 46 46 46 30 36 0d 20  |EQUD &07FFFF06. |
00005c80  33 33 34 30 20 20 20 20  20 20 20 20 20 45 51 55  |3340         EQU|
00005c90  44 20 26 30 37 30 37 30  37 46 46 0d 20 33 33 35  |D &070707FF. 335|
00005ca0  30 20 20 20 20 20 20 20  20 20 45 51 55 44 20 26  |0         EQUD &|
00005cb0  30 35 46 46 46 46 30 36  0d 20 33 33 36 30 20 20  |05FFFF06. 3360  |
00005cc0  20 20 20 20 20 20 20 45  51 55 44 20 26 46 46 30  |       EQUD &FF0|
00005cd0  44 30 30 46 46 0d 20 33  33 37 30 20 20 20 20 20  |D00FF. 3370     |
00005ce0  20 20 20 20 45 51 55 44  20 26 46 46 30 36 30 36  |    EQUD &FF0606|
00005cf0  30 36 0d 20 33 33 38 30  20 20 20 20 20 20 20 20  |06. 3380        |
00005d00  20 45 51 55 44 20 26 30  37 46 46 46 46 30 36 0d  | EQUD &07FFFF06.|
00005d10  20 33 33 39 30 20 20 20  20 20 20 20 20 20 45 51  | 3390         EQ|
00005d20  55 44 20 26 46 46 30 31  30 32 46 46 0d 20 33 34  |UD &FF0102FF. 34|
00005d30  30 30 20 20 20 20 20 20  20 20 20 45 51 55 44 20  |00         EQUD |
00005d40  26 30 39 46 46 46 46 30  34 0d 20 33 34 31 30 20  |&09FFFF04. 3410 |
00005d50  20 20 20 20 20 20 20 20  45 51 55 44 20 26 30 32  |        EQUD &02|
00005d60  46 46 30 32 30 32 0d 20  33 34 32 30 20 20 20 20  |FF0202. 3420    |
00005d70  20 20 20 20 20 45 51 55  44 20 26 46 46 30 33 30  |     EQUD &FF030|
00005d80  32 46 46 0d 20 33 34 33  30 20 20 20 20 20 20 20  |2FF. 3430       |
00005d90  20 20 45 51 55 44 20 26  30 35 46 46 46 46 30 38  |  EQUD &05FFFF08|
00005da0  0d 20 33 34 34 30 20 20  20 20 20 20 20 20 20 45  |. 3440         E|
00005db0  51 55 44 20 26 46 46 30  33 30 30 46 46 0d 20 33  |QUD &FF0300FF. 3|
00005dc0  34 35 30 20 20 20 20 20  20 20 20 20 45 51 55 44  |450         EQUD|
00005dd0  20 26 46 46 30 33 30 32  46 46 0d 20 33 34 36 30  | &FF0302FF. 3460|
00005de0  20 20 20 20 20 20 20 20  20 45 51 55 44 20 26 30  |         EQUD &0|
00005df0  33 30 33 46 46 30 33 0d  20 33 34 37 30 20 20 20  |303FF03. 3470   |
00005e00  20 20 20 20 20 20 45 51  55 44 20 26 30 35 46 46  |      EQUD &05FF|
00005e10  46 46 30 34 0d 20 33 34  38 30 20 20 20 20 20 20  |FF04. 3480      |
00005e20  20 20 20 45 51 55 44 20  26 46 46 30 34 30 34 30  |   EQUD &FF04040|
00005e30  34 0d 20 33 34 39 30 20  20 20 20 20 20 20 20 20  |4. 3490         |
00005e40  45 51 55 44 20 26 46 46  30 46 30 32 46 46 0d 20  |EQUD &FF0F02FF. |
00005e50  33 35 30 30 20 20 20 20  20 20 20 20 20 45 51 55  |3500         EQU|
00005e60  44 20 26 30 37 46 46 46  46 30 34 0d 20 33 35 31  |D &07FFFF04. 351|
00005e70  30 20 20 20 20 20 20 20  20 20 45 51 55 44 20 26  |0         EQUD &|
00005e80  30 35 30 35 30 35 46 46  0d 20 33 35 32 30 20 20  |050505FF. 3520  |
00005e90  20 20 20 20 20 20 20 45  51 55 44 20 26 30 35 46  |       EQUD &05F|
00005ea0  46 46 46 30 34 0d 20 33  35 33 30 20 20 20 20 20  |FFF04. 3530     |
00005eb0  20 20 20 20 45 51 55 44  20 26 30 35 46 46 46 46  |    EQUD &05FFFF|
00005ec0  30 36 0d 20 33 35 34 30  20 20 20 20 20 20 20 20  |06. 3540        |
00005ed0  20 45 51 55 44 20 26 46  46 30 33 30 45 46 46 0d  | EQUD &FF030EFF.|
00005ee0  20 33 35 35 30 20 20 20  20 20 20 20 20 20 45 51  | 3550         EQ|
00005ef0  55 44 20 26 46 46 30 31  30 43 46 46 0d 20 33 35  |UD &FF010CFF. 35|
00005f00  36 30 20 20 20 20 20 20  20 20 20 45 51 55 44 20  |60         EQUD |
00005f10  26 30 39 46 46 46 46 30  41 0d 20 33 35 37 30 20  |&09FFFF0A. 3570 |
00005f20  20 20 20 20 20 20 20 20  45 51 55 44 20 26 30 42  |        EQUD &0B|
00005f30  46 46 46 46 30 41 0d 20  33 35 38 30 20 20 20 20  |FFFF0A. 3580    |
00005f40  20 20 20 20 20 45 51 55  44 20 26 46 46 30 41 30  |     EQUD &FF0A0|
00005f50  41 30 41 0d 20 33 35 39  30 20 20 20 20 20 20 20  |A0A. 3590       |
00005f60  20 20 45 51 55 44 20 26  30 42 46 46 46 46 30 38  |  EQUD &0BFFFF08|
00005f70  0d 20 33 36 30 30 20 20  20 20 20 20 20 20 20 45  |. 3600         E|
00005f80  51 55 44 20 26 46 46 30  44 30 30 46 46 0d 20 33  |QUD &FF0D00FF. 3|
00005f90  36 31 30 20 20 20 20 20  20 20 20 20 45 51 55 44  |610         EQUD|
00005fa0  20 26 30 42 30 42 30 42  46 46 0d 20 33 36 32 30  | &0B0B0BFF. 3620|
00005fb0  20 20 20 20 20 20 20 20  20 45 51 55 44 20 26 30  |         EQUD &0|
00005fc0  42 46 46 46 46 30 41 0d  20 33 36 33 30 20 20 20  |BFFFF0A. 3630   |
00005fd0  20 20 20 20 20 20 45 51  55 44 20 26 30 43 46 46  |      EQUD &0CFF|
00005fe0  30 43 30 43 0d 20 33 36  34 30 20 20 20 20 20 20  |0C0C. 3640      |
00005ff0  20 20 20 45 51 55 44 20  26 46 46 30 44 30 43 46  |   EQUD &FF0D0CF|
00006000  46 0d 20 33 36 35 30 20  20 20 20 20 20 20 20 20  |F. 3650         |
00006010  45 51 55 44 20 26 46 46  30 46 30 43 46 46 0d 20  |EQUD &FF0F0CFF. |
00006020  33 36 36 30 20 20 20 20  20 20 20 20 20 45 51 55  |3660         EQU|
00006030  44 20 26 30 37 46 46 46  46 30 41 0d 20 33 36 37  |D &07FFFF0A. 367|
00006040  30 20 20 20 20 20 20 20  20 20 45 51 55 44 20 26  |0         EQUD &|
00006050  46 46 30 44 30 43 46 46  0d 20 33 36 38 30 20 20  |FF0D0CFF. 3680  |
00006060  20 20 20 20 20 20 20 45  51 55 44 20 26 30 44 30  |       EQUD &0D0|
00006070  44 46 46 30 44 0d 20 33  36 39 30 20 20 20 20 20  |DFF0D. 3690     |
00006080  20 20 20 20 45 51 55 44  20 26 30 42 46 46 46 46  |    EQUD &0BFFFF|
00006090  30 36 0d 20 33 37 30 30  20 20 20 20 20 20 20 20  |06. 3700        |
000060a0  20 45 51 55 44 20 26 46  46 30 44 30 45 46 46 0d  | EQUD &FF0D0EFF.|
000060b0  20 33 37 31 30 20 20 20  20 20 20 20 20 20 45 51  | 3710         EQ|
000060c0  55 44 20 26 30 39 46 46  46 46 30 38 0d 20 33 37  |UD &09FFFF08. 37|
000060d0  32 30 20 20 20 20 20 20  20 20 20 45 51 55 44 20  |20         EQUD |
000060e0  26 30 39 30 39 30 39 46  46 0d 20 33 37 33 30 20  |&090909FF. 3730 |
000060f0  20 20 20 20 20 20 20 20  45 51 55 44 20 26 46 46  |        EQUD &FF|
00006100  30 46 30 32 46 46 0d 20  33 37 34 30 20 20 20 20  |0F02FF. 3740    |
00006110  20 20 20 20 20 45 51 55  44 20 26 30 39 46 46 46  |     EQUD &09FFF|
00006120  46 30 41 0d 20 33 37 35  30 20 20 20 20 20 20 20  |F0A. 3750       |
00006130  20 20 45 51 55 44 20 26  46 46 30 38 30 38 30 38  |  EQUD &FF080808|
00006140  0d 20 33 37 36 30 20 20  20 20 20 20 20 20 20 45  |. 3760         E|
00006150  51 55 44 20 26 30 39 46  46 46 46 30 38 0d 20 33  |QUD &09FFFF08. 3|
00006160  37 37 30 20 20 20 20 20  20 20 20 20 45 51 55 44  |770         EQUD|
00006170  20 26 30 42 46 46 46 46  30 38 0d 20 33 37 38 30  | &0BFFFF08. 3780|
00006180  20 20 20 20 20 20 20 20  20 45 51 55 44 20 26 46  |         EQUD &F|
00006190  46 30 33 30 45 46 46 0d  20 33 37 39 30 20 20 20  |F030EFF. 3790   |
000061a0  20 20 20 20 20 20 45 51  55 44 20 26 46 46 30 46  |      EQUD &FF0F|
000061b0  30 43 46 46 0d 20 33 38  30 30 20 20 20 20 20 20  |0CFF. 3800      |
000061c0  20 20 20 45 51 55 44 20  26 30 39 46 46 46 46 30  |   EQUD &09FFFF0|
000061d0  34 0d 20 33 38 31 30 20  20 20 20 20 20 20 20 20  |4. 3810         |
000061e0  45 51 55 44 20 26 30 46  30 46 46 46 30 46 0d 20  |EQUD &0F0FFF0F. |
000061f0  33 38 32 30 20 20 20 20  20 20 20 20 20 45 51 55  |3820         EQU|
00006200  44 20 26 46 46 30 46 30  45 46 46 0d 20 33 38 33  |D &FF0F0EFF. 383|
00006210  30 20 20 20 20 20 20 20  20 20 45 51 55 44 20 26  |0         EQUD &|
00006220  30 35 46 46 46 46 30 38  0d 20 33 38 34 30 20 20  |05FFFF08. 3840  |
00006230  20 20 20 20 20 20 20 45  51 55 44 20 26 46 46 30  |       EQUD &FF0|
00006240  44 30 45 46 46 0d 20 33  38 35 30 20 20 20 20 20  |D0EFF. 3850     |
00006250  20 20 20 20 45 51 55 44  20 26 46 46 30 46 30 45  |    EQUD &FF0F0E|
00006260  46 46 0d 20 33 38 36 30  20 20 20 20 20 20 20 20  |FF. 3860        |
00006270  20 45 51 55 44 20 26 30  45 46 46 30 45 30 45 0d  | EQUD &0EFF0E0E.|
00006280  20 33 38 37 30 20 2e 62  75 66 66 74 61 62 6c 65  | 3870 .bufftable|
00006290  0d 20 33 38 38 30 20 20  20 20 20 20 20 20 20 45  |. 3880         E|
000062a0  51 55 57 20 62 75 66 66  65 72 0d 20 33 38 39 30  |QUW buffer. 3890|
000062b0  20 20 20 20 20 20 20 20  20 45 51 55 57 20 62 75  |         EQUW bu|
000062c0  66 66 65 72 2b 34 30 0d  20 33 39 30 30 20 20 20  |ffer+40. 3900   |
000062d0  20 20 20 20 20 20 45 51  55 57 20 62 75 66 66 65  |      EQUW buffe|
000062e0  72 2b 28 32 2a 34 30 29  0d 20 33 39 31 30 20 20  |r+(2*40). 3910  |
000062f0  20 20 20 20 20 20 20 45  51 55 57 20 62 75 66 66  |       EQUW buff|
00006300  65 72 2b 28 33 2a 34 30  29 0d 20 33 39 32 30 20  |er+(3*40). 3920 |
00006310  20 20 20 20 20 20 20 20  45 51 55 57 20 62 75 66  |        EQUW buf|
00006320  66 65 72 2b 28 34 2a 34  30 29 0d 20 33 39 33 30  |fer+(4*40). 3930|
00006330  20 20 20 20 20 20 20 20  20 45 51 55 57 20 62 75  |         EQUW bu|
00006340  66 66 65 72 2b 28 35 2a  34 30 29 0d 20 33 39 34  |ffer+(5*40). 394|
00006350  30 20 20 20 20 20 20 20  20 20 45 51 55 57 20 62  |0         EQUW b|
00006360  75 66 66 65 72 2b 28 36  2a 34 30 29 0d 20 33 39  |uffer+(6*40). 39|
00006370  35 30 20 20 20 20 20 20  20 20 20 45 51 55 57 20  |50         EQUW |
00006380  62 75 66 66 65 72 2b 28  37 2a 34 30 29 0d 20 33  |buffer+(7*40). 3|
00006390  39 36 30 20 20 20 20 20  20 20 20 20 45 51 55 57  |960         EQUW|
000063a0  20 62 75 66 66 65 72 2b  28 38 2a 34 30 29 0d 20  | buffer+(8*40). |
000063b0  33 39 37 30 20 20 20 20  20 20 20 20 20 45 51 55  |3970         EQU|
000063c0  57 20 62 75 66 66 65 72  2b 28 39 2a 34 30 29 0d  |W buffer+(9*40).|
000063d0  20 33 39 38 30 20 20 20  20 20 20 20 20 20 45 51  | 3980         EQ|
000063e0  55 57 20 62 75 66 66 65  72 2b 28 31 30 2a 34 30  |UW buffer+(10*40|
000063f0  29 0d 20 33 39 39 30 20  20 20 20 20 20 20 20 20  |). 3990         |
00006400  45 51 55 57 20 62 75 66  66 65 72 2b 28 31 31 2a  |EQUW buffer+(11*|
00006410  34 30 29 0d 20 34 30 30  30 20 20 20 20 20 20 20  |40). 4000       |
00006420  20 20 45 51 55 57 20 62  75 66 66 65 72 2b 28 31  |  EQUW buffer+(1|
00006430  32 2a 34 30 29 0d 20 34  30 31 30 20 20 20 20 20  |2*40). 4010     |
00006440  20 20 20 20 45 51 55 57  20 62 75 66 66 65 72 2b  |    EQUW buffer+|
00006450  28 31 33 2a 34 30 29 0d  20 34 30 32 30 20 20 20  |(13*40). 4020   |
00006460  20 20 20 20 20 20 45 51  55 57 20 62 75 66 66 65  |      EQUW buffe|
00006470  72 2b 28 31 34 2a 34 30  29 0d 20 34 30 33 30 20  |r+(14*40). 4030 |
00006480  20 20 20 20 20 20 20 20  45 51 55 57 20 62 75 66  |        EQUW buf|
00006490  66 65 72 2b 28 31 35 2a  34 30 29 0d 20 34 30 34  |fer+(15*40). 404|
000064a0  30 20 20 20 20 20 20 20  20 20 45 51 55 57 20 62  |0         EQUW b|
000064b0  75 66 66 65 72 2b 28 31  36 2a 34 30 29 0d 20 34  |uffer+(16*40). 4|
000064c0  30 35 30 20 20 20 20 20  20 20 20 20 45 51 55 57  |050         EQUW|
000064d0  20 62 75 66 66 65 72 2b  28 31 37 2a 34 30 29 0d  | buffer+(17*40).|
000064e0  20 34 30 36 30 20 20 20  20 20 20 20 20 20 45 51  | 4060         EQ|
000064f0  55 57 20 62 75 66 66 65  72 2b 28 31 38 2a 34 30  |UW buffer+(18*40|
00006500  29 0d 20 34 30 37 30 20  20 20 20 20 20 20 20 20  |). 4070         |
00006510  45 51 55 57 20 62 75 66  66 65 72 2b 28 31 39 2a  |EQUW buffer+(19*|
00006520  34 30 29 0d 20 34 30 38  30 20 20 20 20 20 20 20  |40). 4080       |
00006530  20 20 45 51 55 57 20 62  75 66 66 65 72 2b 28 32  |  EQUW buffer+(2|
00006540  30 2a 34 30 29 0d 20 34  30 39 30 20 20 20 20 20  |0*40). 4090     |
00006550  20 20 20 20 45 51 55 57  20 62 75 66 66 65 72 2b  |    EQUW buffer+|
00006560  28 32 31 2a 34 30 29 0d  20 34 31 30 30 20 20 20  |(21*40). 4100   |
00006570  20 20 20 20 20 20 45 51  55 57 20 62 75 66 66 65  |      EQUW buffe|
00006580  72 2b 28 32 32 2a 34 30  29 0d 20 34 31 31 30 20  |r+(22*40). 4110 |
00006590  20 20 20 20 20 20 20 20  45 51 55 57 20 62 75 66  |        EQUW buf|
000065a0  66 65 72 2b 28 32 33 2a  34 30 29 0d 20 34 31 32  |fer+(23*40). 412|
000065b0  30 20 20 20 20 20 20 20  20 20 45 51 55 57 20 62  |0         EQUW b|
000065c0  75 66 66 65 72 2b 28 32  34 2a 34 30 29 0d 20 34  |uffer+(24*40). 4|
000065d0  31 33 30 20 5d 0d 20 34  31 34 30 20 4e 45 58 54  |130 ]. 4140 NEXT|
000065e0  0d 20 34 31 35 30 20 45  4e 44 50 52 4f 43 0d     |. 4150 ENDPROC.|
000065ef
27-03-89/T\TTX03.m0
27-03-89/T\TTX03.m1
27-03-89/T\TTX03.m2
27-03-89/T\TTX03.m4
27-03-89/T\TTX03.m5