Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_27.ADF » P/+COD5_1

P/+COD5_1

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 » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_27.ADF
Filename: P/+COD5_1
Read OK:
File size: 18C6 bytes
Load address: D204556
Exec address: 0000
File contents
 
CODE5 - AN EXPLANATION
~~~~~~~~~~~~~~~~~~~~~~
(or How EUG ticks!!)
By Richard Dimond

Since the Assembler for my latest coding for the running of EUG has been
published , I thought that it was time I explained how it works.

First, I will give a brief account of its development.

When EUG first appeared on disc, the text was written into BASIC programs
and all text files had to be converted.  To avoid this, it was necessary
to find a way to print a text file to screen.

Programs like *TYPE were not satisfactory since the View control codes (16
& 26) for formatting caused problems.  Also the disc was read direct with
the text loaded in 256 byte blocks which caused a lot of screen flashing
in MODE3.

I decided that the files should be LOADed into memory in MODE6 with HIMEM
lowered.  The text could then be read to screen in MODE3,  ignoring the
formatting bytes.  This prints the text as if unformatted and avoids the
flashing of the screen.

At first this was done with a short BASIC routine added to the menu but
later I made up a simple M/code routine to do this.

When the question of 40 column printing was asked for, I again initially
made a BASIC listing as before.  This was also followed by a coded
version.

Gus had also asked me whether it would be possible to  provide for a
different type of printing so that he need not use capitals only.  After
much thought I made up CODE4 which has been used for some time now.   This
also included the perforation skip routine which had also been asked for.

Since I got my Master, I realised that the different styles of print did
not work on the Master as CHR$255 used by the routine prints an inverted
space.  So I have added a short routine which sets up the new character
using VDU23 as required with the Master and renamed the code CODE5.  This
made it necessary to make a small change to V-TYPE and so it is now
VTYPE5.

I made up this little program so that you could see how your text files
would appear in the mag.  I found that the version on EUG26 was an early
one and I had since modified this so that you could alter HIMEM if you
wish.  On default it will enter &2600 as on the discs.  This version is
now on this disc.

PROGRAM OPERATION
~~~~~~~~~~~~~~~~~
The program reads the value of HIMEM and this must be set to a lower value
before the code is used.  

Lines 90 -120 set up the variable addresses and lines 130 - 150 set up the
printer codes.

The routine 'clear', lines 190- 280 is a simple loop which loads a zero
into all bytes from HIMEM up to the screen start address (&4000 in MODE3).
This is necessary as I found that the easiest way to find the end of the
file was to check for a zero byte.

The assembly of the print routine starts at line 770.  The two flags
(bdflg & itflg) for the two highlights are set to zero (off) at line 775.

Line 780 is equivalent of *FX135 which returns the MODE number into Y
register.  This is compared with 3 and if equal the modeflag is set to
zero, if not it is set to 255(-1) to indicate MODE 6 (lines 790 -810).  

Line 820 is another *FX call (117).  This sets bit 0 if the printer is
enabled and this is read by ANDing with 1.  This sets 'prtflg' to 0
(printer off) or 1 (printer enabled).

Ignoring the instruction in line 850 for the moment, lines 860 & 870 set
the address in &70,71 to HIMEM.  The print loop is assembled in lines 880
- 970. Line 900 returns to BASIC if zero byte found (end of file).

Lines 910,920 toggle the highlight flags if the View codes &1C or &1D are
found for bold or italic printing and the formatting codes are skipped at
lines 930,940.  
 
The byte to be printed is PUSHed onto the stack while the modeflag is
tested.  If this is zero (MODE 3) the program continues and the byte
PULLed from the stack for the character to be printed.

If this is a CR (&0D) a  jump is made to 'newl' line 1040.  This calls
osnewl (&FFE7) and then tests the value in skip.  If this is zero the
program returns to 'inc' line 1010 to return to the print loop.

If skip is not zero, the program goes to 'skp' line 1050.  The value in
'count', initially set to the value of 'lines', is decreased to count the
number of lines tobe printed, returning to the print loop until count
reaches zero.  It is then  loaded with the value in skiplines to count the
number of times the loop 'skp1' is used to skip the perforations.  The
variable count is then loaded with the value of lines for printing the
next page.

40 COLUMN PRINTING
~~~~~~~~~~~~~~~~~~
If MODE 6 is selected, the modeflag is not zero and a branch is made at
line 950 to 'm6' (line 980).  The character byte is PULLed from the stack
and is first compared wih &0D (CR) and if equal a jump is made to test. 
This checks the following byte by increasing the index Y.  If this is &7E
(~), &0D (CR) or &20 (space) a jump to 'ok1', the index decreased and a CR
character printed.  If none of these are found, the index Y is decreased
twice to point to the byte before.  If this is &7E (~) or &0D (CR) a
branch goes to 'ok2' the index Y increased and a CR printed.  If a branch
is not made the index Y increased and a space printed.  

This then prints the CR characters where it is needed for printing the
headings and underlines but prints space instead of the others.

The text is then printed using a word-wrapping routine.  If the byte is a
space (&20) a jump is made to the space routine (line 1060).  This first
checks the value in address &318 - the current text cursor X co-ordinate. 
If this is zero, the beginning of the line, the 'sp' routine line 1120 is
called.  This is a simple loop which checks for further spaces and loops
back until another character is found before returning to the print
routine.  This left justifies all titles, etc which would otherwise be
split.
 
If the address &318 holds a value greater than zero, ie not the beginning
of the line, the value is compared with the value loaded into A register
in line 1060.  If the carry flag is clear, ie the X co-ord less than 30,
printing continues normally.  When the carry flag is set, printing will
continue until a space is found when a CR character is printed to start a
new line.

00000000  20 0d 43 4f 44 45 35 20  2d 20 41 4e 20 45 58 50  | .CODE5 - AN EXP|
00000010  4c 41 4e 41 54 49 4f 4e  0d 7e 7e 7e 7e 7e 7e 7e  |LANATION.~~~~~~~|
00000020  7e 7e 7e 7e 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 0d  |~~~~~~~~~~~~~~~.|
00000030  28 6f 72 20 48 6f 77 20  45 55 47 20 74 69 63 6b  |(or How EUG tick|
00000040  73 21 21 29 0d 42 79 20  52 69 63 68 61 72 64 20  |s!!).By Richard |
00000050  44 69 6d 6f 6e 64 0d 0d  53 69 6e 63 65 20 74 68  |Dimond..Since th|
00000060  65 20 41 73 73 65 6d 62  6c 65 72 20 66 6f 72 20  |e Assembler for |
00000070  6d 79 1a 20 6c 61 74 65  73 74 1a 20 63 6f 64 69  |my. latest. codi|
00000080  6e 67 20 66 6f 72 20 74  68 65 20 72 75 6e 6e 69  |ng for the runni|
00000090  6e 67 20 6f 66 20 45 55  47 20 68 61 73 20 62 65  |ng of EUG has be|
000000a0  65 6e 0d 70 75 62 6c 69  73 68 65 64 20 2c 20 49  |en.published , I|
000000b0  20 74 68 6f 75 67 68 74  20 74 68 61 74 20 69 74  | thought that it|
000000c0  20 77 61 73 20 74 69 6d  65 20 49 20 65 78 70 6c  | was time I expl|
000000d0  61 69 6e 65 64 20 68 6f  77 20 69 74 20 77 6f 72  |ained how it wor|
000000e0  6b 73 2e 0d 0d 46 69 72  73 74 2c 20 49 20 77 69  |ks...First, I wi|
000000f0  6c 6c 20 67 69 76 65 20  61 20 62 72 69 65 66 20  |ll give a brief |
00000100  61 63 63 6f 75 6e 74 20  6f 66 20 69 74 73 20 64  |account of its d|
00000110  65 76 65 6c 6f 70 6d 65  6e 74 2e 0d 0d 57 68 65  |evelopment...Whe|
00000120  6e 20 45 55 47 20 66 69  72 73 74 20 61 70 70 65  |n EUG first appe|
00000130  61 72 65 64 1a 20 6f 6e  20 64 69 73 63 2c 20 74  |ared. on disc, t|
00000140  68 65 20 74 65 78 74 20  77 61 73 20 77 72 69 74  |he text was writ|
00000150  74 65 6e 20 69 6e 74 6f  20 42 41 53 49 43 20 70  |ten into BASIC p|
00000160  72 6f 67 72 61 6d 73 0d  61 6e 64 20 61 6c 6c 20  |rograms.and all |
00000170  74 65 78 74 20 66 69 6c  65 73 20 68 61 64 1a 20  |text files had. |
00000180  74 6f 1a 20 62 65 20 63  6f 6e 76 65 72 74 65 64  |to. be converted|
00000190  2e 20 20 54 6f 20 61 76  6f 69 64 20 74 68 69 73  |.  To avoid this|
000001a0  2c 20 69 74 20 77 61 73  20 6e 65 63 65 73 73 61  |, it was necessa|
000001b0  72 79 0d 74 6f 20 66 69  6e 64 20 61 20 77 61 79  |ry.to find a way|
000001c0  20 74 6f 20 70 72 69 6e  74 20 61 20 74 65 78 74  | to print a text|
000001d0  20 66 69 6c 65 20 74 6f  20 73 63 72 65 65 6e 2e  | file to screen.|
000001e0  0d 0d 50 72 6f 67 72 61  6d 73 20 6c 69 6b 65 20  |..Programs like |
000001f0  2a 54 59 50 45 20 77 65  72 65 20 6e 6f 74 20 73  |*TYPE were not s|
00000200  61 74 69 73 66 61 63 74  6f 72 79 20 73 69 6e 63  |atisfactory sinc|
00000210  65 20 74 68 65 20 56 69  65 77 20 63 6f 6e 74 72  |e the View contr|
00000220  6f 6c 20 63 6f 64 65 73  20 28 31 36 0d 26 20 32  |ol codes (16.& 2|
00000230  36 29 20 66 6f 72 20 66  6f 72 6d 61 74 74 69 6e  |6) for formattin|
00000240  67 20 63 61 75 73 65 64  1a 20 70 72 6f 62 6c 65  |g caused. proble|
00000250  6d 73 2e 20 20 41 6c 73  6f 20 74 68 65 20 64 69  |ms.  Also the di|
00000260  73 63 20 77 61 73 20 72  65 61 64 20 64 69 72 65  |sc was read dire|
00000270  63 74 20 77 69 74 68 0d  74 68 65 20 74 65 78 74  |ct with.the text|
00000280  20 6c 6f 61 64 65 64 20  69 6e 20 32 35 36 1a 20  | loaded in 256. |
00000290  62 79 74 65 1a 20 62 6c  6f 63 6b 73 20 77 68 69  |byte. blocks whi|
000002a0  63 68 20 63 61 75 73 65  64 20 61 20 6c 6f 74 20  |ch caused a lot |
000002b0  6f 66 20 73 63 72 65 65  6e 20 66 6c 61 73 68 69  |of screen flashi|
000002c0  6e 67 0d 69 6e 20 4d 4f  44 45 33 2e 0d 0d 49 20  |ng.in MODE3...I |
000002d0  64 65 63 69 64 65 64 20  74 68 61 74 20 74 68 65  |decided that the|
000002e0  20 66 69 6c 65 73 20 73  68 6f 75 6c 64 20 62 65  | files should be|
000002f0  20 4c 4f 41 44 65 64 1a  20 69 6e 74 6f 20 6d 65  | LOADed. into me|
00000300  6d 6f 72 79 20 69 6e 20  4d 4f 44 45 36 20 77 69  |mory in MODE6 wi|
00000310  74 68 20 48 49 4d 45 4d  0d 6c 6f 77 65 72 65 64  |th HIMEM.lowered|
00000320  2e 20 20 54 68 65 20 74  65 78 74 20 63 6f 75 6c  |.  The text coul|
00000330  64 20 74 68 65 6e 20 62  65 20 72 65 61 64 20 74  |d then be read t|
00000340  6f 20 73 63 72 65 65 6e  1a 20 69 6e 1a 20 4d 4f  |o screen. in. MO|
00000350  44 45 33 2c 1a 20 20 69  67 6e 6f 72 69 6e 67 20  |DE3,.  ignoring |
00000360  74 68 65 0d 66 6f 72 6d  61 74 74 69 6e 67 1a 20  |the.formatting. |
00000370  62 79 74 65 73 2e 20 20  54 68 69 73 1a 20 70 72  |bytes.  This. pr|
00000380  69 6e 74 73 20 74 68 65  20 74 65 78 74 20 61 73  |ints the text as|
00000390  20 69 66 20 75 6e 66 6f  72 6d 61 74 74 65 64 20  | if unformatted |
000003a0  61 6e 64 20 61 76 6f 69  64 73 20 74 68 65 0d 66  |and avoids the.f|
000003b0  6c 61 73 68 69 6e 67 20  6f 66 20 74 68 65 20 73  |lashing of the s|
000003c0  63 72 65 65 6e 2e 0d 0d  41 74 20 66 69 72 73 74  |creen...At first|
000003d0  20 74 68 69 73 20 77 61  73 20 64 6f 6e 65 20 77  | this was done w|
000003e0  69 74 68 20 61 20 73 68  6f 72 74 20 42 41 53 49  |ith a short BASI|
000003f0  43 20 72 6f 75 74 69 6e  65 20 61 64 64 65 64 20  |C routine added |
00000400  74 6f 1a 20 74 68 65 1a  20 6d 65 6e 75 1a 20 62  |to. the. menu. b|
00000410  75 74 0d 6c 61 74 65 72  20 49 20 6d 61 64 65 20  |ut.later I made |
00000420  75 70 20 61 20 73 69 6d  70 6c 65 20 4d 2f 63 6f  |up a simple M/co|
00000430  64 65 20 72 6f 75 74 69  6e 65 20 74 6f 20 64 6f  |de routine to do|
00000440  20 74 68 69 73 2e 0d 0d  57 68 65 6e 1a 20 74 68  | this...When. th|
00000450  65 1a 20 71 75 65 73 74  69 6f 6e 20 6f 66 20 34  |e. question of 4|
00000460  30 20 63 6f 6c 75 6d 6e  20 70 72 69 6e 74 69 6e  |0 column printin|
00000470  67 20 77 61 73 20 61 73  6b 65 64 20 66 6f 72 2c  |g was asked for,|
00000480  20 49 20 61 67 61 69 6e  20 69 6e 69 74 69 61 6c  | I again initial|
00000490  6c 79 0d 6d 61 64 65 20  61 20 42 41 53 49 43 1a  |ly.made a BASIC.|
000004a0  20 6c 69 73 74 69 6e 67  1a 20 61 73 1a 20 62 65  | listing. as. be|
000004b0  66 6f 72 65 2e 1a 20 20  54 68 69 73 1a 20 77 61  |fore..  This. wa|
000004c0  73 1a 20 61 6c 73 6f 1a  20 66 6f 6c 6c 6f 77 65  |s. also. followe|
000004d0  64 1a 20 62 79 20 61 20  63 6f 64 65 64 0d 76 65  |d. by a coded.ve|
000004e0  72 73 69 6f 6e 2e 0d 0d  47 75 73 20 68 61 64 20  |rsion...Gus had |
000004f0  61 6c 73 6f 20 61 73 6b  65 64 20 6d 65 1a 20 77  |also asked me. w|
00000500  68 65 74 68 65 72 1a 20  69 74 1a 20 77 6f 75 6c  |hether. it. woul|
00000510  64 1a 20 62 65 1a 20 70  6f 73 73 69 62 6c 65 1a  |d. be. possible.|
00000520  20 74 6f 20 20 70 72 6f  76 69 64 65 20 66 6f 72  | to  provide for|
00000530  20 61 0d 64 69 66 66 65  72 65 6e 74 20 74 79 70  | a.different typ|
00000540  65 20 6f 66 20 70 72 69  6e 74 69 6e 67 20 73 6f  |e of printing so|
00000550  20 74 68 61 74 20 68 65  20 6e 65 65 64 20 6e 6f  | that he need no|
00000560  74 20 75 73 65 20 63 61  70 69 74 61 6c 73 1a 20  |t use capitals. |
00000570  6f 6e 6c 79 2e 1a 20 20  41 66 74 65 72 0d 6d 75  |only..  After.mu|
00000580  63 68 20 74 68 6f 75 67  68 74 20 49 20 6d 61 64  |ch thought I mad|
00000590  65 20 75 70 20 43 4f 44  45 34 20 77 68 69 63 68  |e up CODE4 which|
000005a0  20 68 61 73 20 62 65 65  6e 20 75 73 65 64 20 66  | has been used f|
000005b0  6f 72 20 73 6f 6d 65 20  74 69 6d 65 20 6e 6f 77  |or some time now|
000005c0  2e 20 20 20 54 68 69 73  0d 61 6c 73 6f 20 69 6e  |.   This.also in|
000005d0  63 6c 75 64 65 64 20 74  68 65 20 70 65 72 66 6f  |cluded the perfo|
000005e0  72 61 74 69 6f 6e 20 73  6b 69 70 20 72 6f 75 74  |ration skip rout|
000005f0  69 6e 65 20 77 68 69 63  68 20 68 61 64 20 61 6c  |ine which had al|
00000600  73 6f 20 62 65 65 6e 20  61 73 6b 65 64 20 66 6f  |so been asked fo|
00000610  72 2e 0d 0d 53 69 6e 63  65 20 49 20 67 6f 74 20  |r...Since I got |
00000620  6d 79 20 4d 61 73 74 65  72 2c 20 49 20 72 65 61  |my Master, I rea|
00000630  6c 69 73 65 64 20 74 68  61 74 1a 20 74 68 65 1a  |lised that. the.|
00000640  20 64 69 66 66 65 72 65  6e 74 20 73 74 79 6c 65  | different style|
00000650  73 20 6f 66 20 70 72 69  6e 74 20 64 69 64 0d 6e  |s of print did.n|
00000660  6f 74 20 77 6f 72 6b 20  6f 6e 20 74 68 65 20 4d  |ot work on the M|
00000670  61 73 74 65 72 20 61 73  20 43 48 52 24 32 35 35  |aster as CHR$255|
00000680  1a 20 75 73 65 64 1a 20  62 79 20 74 68 65 20 72  |. used. by the r|
00000690  6f 75 74 69 6e 65 20 70  72 69 6e 74 73 20 61 6e  |outine prints an|
000006a0  20 69 6e 76 65 72 74 65  64 0d 73 70 61 63 65 2e  | inverted.space.|
000006b0  20 20 53 6f 20 49 20 68  61 76 65 20 61 64 64 65  |  So I have adde|
000006c0  64 1a 20 61 1a 20 73 68  6f 72 74 1a 20 72 6f 75  |d. a. short. rou|
000006d0  74 69 6e 65 20 77 68 69  63 68 20 73 65 74 73 20  |tine which sets |
000006e0  75 70 20 74 68 65 20 6e  65 77 20 63 68 61 72 61  |up the new chara|
000006f0  63 74 65 72 0d 75 73 69  6e 67 20 56 44 55 32 33  |cter.using VDU23|
00000700  20 61 73 20 72 65 71 75  69 72 65 64 20 77 69 74  | as required wit|
00000710  68 20 74 68 65 20 4d 61  73 74 65 72 20 61 6e 64  |h the Master and|
00000720  1a 20 72 65 6e 61 6d 65  64 20 74 68 65 20 63 6f  |. renamed the co|
00000730  64 65 20 43 4f 44 45 35  2e 20 20 54 68 69 73 0d  |de CODE5.  This.|
00000740  6d 61 64 65 1a 20 69 74  20 6e 65 63 65 73 73 61  |made. it necessa|
00000750  72 79 20 74 6f 20 6d 61  6b 65 20 61 20 73 6d 61  |ry to make a sma|
00000760  6c 6c 20 63 68 61 6e 67  65 20 74 6f 1a 20 56 2d  |ll change to. V-|
00000770  54 59 50 45 1a 20 61 6e  64 1a 20 73 6f 1a 20 69  |TYPE. and. so. i|
00000780  74 1a 20 69 73 1a 20 6e  6f 77 0d 56 54 59 50 45  |t. is. now.VTYPE|
00000790  35 2e 0d 0d 49 1a 20 6d  61 64 65 1a 20 75 70 1a  |5...I. made. up.|
000007a0  20 74 68 69 73 20 6c 69  74 74 6c 65 20 70 72 6f  | this little pro|
000007b0  67 72 61 6d 20 73 6f 20  74 68 61 74 20 79 6f 75  |gram so that you|
000007c0  20 63 6f 75 6c 64 20 73  65 65 20 68 6f 77 20 79  | could see how y|
000007d0  6f 75 72 20 74 65 78 74  20 66 69 6c 65 73 0d 77  |our text files.w|
000007e0  6f 75 6c 64 20 61 70 70  65 61 72 20 69 6e 20 74  |ould appear in t|
000007f0  68 65 20 6d 61 67 2e 20  20 49 20 66 6f 75 6e 64  |he mag.  I found|
00000800  1a 20 74 68 61 74 1a 20  74 68 65 20 76 65 72 73  |. that. the vers|
00000810  69 6f 6e 20 6f 6e 20 45  55 47 32 36 20 77 61 73  |ion on EUG26 was|
00000820  20 61 6e 20 65 61 72 6c  79 0d 6f 6e 65 20 61 6e  | an early.one an|
00000830  64 20 49 20 68 61 64 20  73 69 6e 63 65 20 6d 6f  |d I had since mo|
00000840  64 69 66 69 65 64 20 74  68 69 73 20 73 6f 20 74  |dified this so t|
00000850  68 61 74 1a 20 79 6f 75  1a 20 63 6f 75 6c 64 1a  |hat. you. could.|
00000860  20 61 6c 74 65 72 1a 20  48 49 4d 45 4d 20 69 66  | alter. HIMEM if|
00000870  20 79 6f 75 0d 77 69 73  68 2e 1a 20 20 4f 6e 1a  | you.wish..  On.|
00000880  20 64 65 66 61 75 6c 74  1a 20 69 74 20 77 69 6c  | default. it wil|
00000890  6c 20 65 6e 74 65 72 20  26 32 36 30 30 20 61 73  |l enter &2600 as|
000008a0  20 6f 6e 20 74 68 65 20  64 69 73 63 73 2e 20 20  | on the discs.  |
000008b0  54 68 69 73 20 76 65 72  73 69 6f 6e 20 69 73 0d  |This version is.|
000008c0  6e 6f 77 20 6f 6e 20 74  68 69 73 20 64 69 73 63  |now on this disc|
000008d0  2e 0d 0d 50 52 4f 47 52  41 4d 20 4f 50 45 52 41  |...PROGRAM OPERA|
000008e0  54 49 4f 4e 0d 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 7e  |TION.~~~~~~~~~~~|
000008f0  7e 7e 7e 7e 7e 7e 0d 54  68 65 20 70 72 6f 67 72  |~~~~~~.The progr|
00000900  61 6d 20 72 65 61 64 73  20 74 68 65 20 76 61 6c  |am reads the val|
00000910  75 65 20 6f 66 20 48 49  4d 45 4d 20 61 6e 64 20  |ue of HIMEM and |
00000920  74 68 69 73 20 6d 75 73  74 20 62 65 20 73 65 74  |this must be set|
00000930  20 74 6f 20 61 20 6c 6f  77 65 72 20 76 61 6c 75  | to a lower valu|
00000940  65 0d 62 65 66 6f 72 65  20 74 68 65 20 63 6f 64  |e.before the cod|
00000950  65 20 69 73 20 75 73 65  64 2e 20 20 0d 0d 4c 69  |e is used.  ..Li|
00000960  6e 65 73 20 39 30 20 2d  31 32 30 20 73 65 74 20  |nes 90 -120 set |
00000970  75 70 20 74 68 65 20 76  61 72 69 61 62 6c 65 20  |up the variable |
00000980  61 64 64 72 65 73 73 65  73 20 61 6e 64 20 6c 69  |addresses and li|
00000990  6e 65 73 20 31 33 30 20  2d 20 31 35 30 20 73 65  |nes 130 - 150 se|
000009a0  74 20 75 70 20 74 68 65  0d 70 72 69 6e 74 65 72  |t up the.printer|
000009b0  20 63 6f 64 65 73 2e 0d  0d 54 68 65 20 72 6f 75  | codes...The rou|
000009c0  74 69 6e 65 20 27 63 6c  65 61 72 27 2c 20 6c 69  |tine 'clear', li|
000009d0  6e 65 73 1a 20 31 39 30  1a 2d 20 32 38 30 1a 20  |nes. 190.- 280. |
000009e0  69 73 20 61 20 73 69 6d  70 6c 65 20 6c 6f 6f 70  |is a simple loop|
000009f0  20 77 68 69 63 68 20 6c  6f 61 64 73 20 61 20 7a  | which loads a z|
00000a00  65 72 6f 0d 69 6e 74 6f  20 61 6c 6c 20 62 79 74  |ero.into all byt|
00000a10  65 73 20 66 72 6f 6d 20  48 49 4d 45 4d 20 75 70  |es from HIMEM up|
00000a20  20 74 6f 20 74 68 65 20  73 63 72 65 65 6e 20 73  | to the screen s|
00000a30  74 61 72 74 20 61 64 64  72 65 73 73 20 28 26 34  |tart address (&4|
00000a40  30 30 30 20 69 6e 20 4d  4f 44 45 33 29 2e 0d 54  |000 in MODE3)..T|
00000a50  68 69 73 20 69 73 20 6e  65 63 65 73 73 61 72 79  |his is necessary|
00000a60  20 61 73 20 49 1a 20 66  6f 75 6e 64 1a 20 74 68  | as I. found. th|
00000a70  61 74 20 74 68 65 20 65  61 73 69 65 73 74 20 77  |at the easiest w|
00000a80  61 79 20 74 6f 20 66 69  6e 64 20 74 68 65 20 65  |ay to find the e|
00000a90  6e 64 20 6f 66 20 74 68  65 0d 66 69 6c 65 20 77  |nd of the.file w|
00000aa0  61 73 20 74 6f 20 63 68  65 63 6b 20 66 6f 72 20  |as to check for |
00000ab0  61 20 7a 65 72 6f 20 62  79 74 65 2e 0d 0d 54 68  |a zero byte...Th|
00000ac0  65 1a 20 61 73 73 65 6d  62 6c 79 1a 20 6f 66 1a  |e. assembly. of.|
00000ad0  20 74 68 65 1a 20 70 72  69 6e 74 1a 20 72 6f 75  | the. print. rou|
00000ae0  74 69 6e 65 1a 20 73 74  61 72 74 73 20 61 74 20  |tine. starts at |
00000af0  6c 69 6e 65 20 37 37 30  2e 20 20 54 68 65 20 74  |line 770.  The t|
00000b00  77 6f 20 66 6c 61 67 73  0d 28 62 64 66 6c 67 20  |wo flags.(bdflg |
00000b10  26 20 69 74 66 6c 67 29  20 66 6f 72 20 74 68 65  |& itflg) for the|
00000b20  20 74 77 6f 20 68 69 67  68 6c 69 67 68 74 73 1a  | two highlights.|
00000b30  20 61 72 65 20 73 65 74  20 74 6f 20 7a 65 72 6f  | are set to zero|
00000b40  20 28 6f 66 66 29 20 61  74 20 6c 69 6e 65 20 37  | (off) at line 7|
00000b50  37 35 2e 0d 0d 4c 69 6e  65 20 37 38 30 20 69 73  |75...Line 780 is|
00000b60  20 65 71 75 69 76 61 6c  65 6e 74 20 6f 66 20 2a  | equivalent of *|
00000b70  46 58 31 33 35 20 77 68  69 63 68 20 72 65 74 75  |FX135 which retu|
00000b80  72 6e 73 1a 20 74 68 65  1a 20 4d 4f 44 45 1a 20  |rns. the. MODE. |
00000b90  6e 75 6d 62 65 72 1a 20  69 6e 74 6f 1a 20 59 0d  |number. into. Y.|
00000ba0  72 65 67 69 73 74 65 72  2e 1a 20 20 54 68 69 73  |register..  This|
00000bb0  1a 20 69 73 1a 20 63 6f  6d 70 61 72 65 64 1a 20  |. is. compared. |
00000bc0  77 69 74 68 20 33 20 61  6e 64 20 69 66 20 65 71  |with 3 and if eq|
00000bd0  75 61 6c 20 74 68 65 20  6d 6f 64 65 66 6c 61 67  |ual the modeflag|
00000be0  20 69 73 20 73 65 74 20  74 6f 0d 7a 65 72 6f 2c  | is set to.zero,|
00000bf0  20 69 66 20 6e 6f 74 20  69 74 20 69 73 20 73 65  | if not it is se|
00000c00  74 20 74 6f 20 32 35 35  28 2d 31 29 20 74 6f 20  |t to 255(-1) to |
00000c10  69 6e 64 69 63 61 74 65  20 4d 4f 44 45 20 36 20  |indicate MODE 6 |
00000c20  28 6c 69 6e 65 73 20 37  39 30 20 2d 38 31 30 29  |(lines 790 -810)|
00000c30  2e 20 20 0d 0d 4c 69 6e  65 20 38 32 30 20 69 73  |.  ..Line 820 is|
00000c40  20 61 6e 6f 74 68 65 72  20 2a 46 58 1a 20 63 61  | another *FX. ca|
00000c50  6c 6c 1a 20 28 31 31 37  29 2e 1a 20 20 54 68 69  |ll. (117)..  Thi|
00000c60  73 1a 20 73 65 74 73 20  62 69 74 20 30 20 69 66  |s. sets bit 0 if|
00000c70  20 74 68 65 20 70 72 69  6e 74 65 72 20 69 73 0d  | the printer is.|
00000c80  65 6e 61 62 6c 65 64 20  61 6e 64 20 74 68 69 73  |enabled and this|
00000c90  20 69 73 20 72 65 61 64  1a 20 62 79 1a 20 41 4e  | is read. by. AN|
00000ca0  44 69 6e 67 1a 20 77 69  74 68 1a 20 31 2e 1a 20  |Ding. with. 1.. |
00000cb0  20 54 68 69 73 1a 20 73  65 74 73 1a 20 27 70 72  | This. sets. 'pr|
00000cc0  74 66 6c 67 27 20 74 6f  20 30 0d 28 70 72 69 6e  |tflg' to 0.(prin|
00000cd0  74 65 72 20 6f 66 66 29  20 6f 72 20 31 20 28 70  |ter off) or 1 (p|
00000ce0  72 69 6e 74 65 72 20 65  6e 61 62 6c 65 64 29 2e  |rinter enabled).|
00000cf0  0d 0d 49 67 6e 6f 72 69  6e 67 20 74 68 65 20 69  |..Ignoring the i|
00000d00  6e 73 74 72 75 63 74 69  6f 6e 20 69 6e 20 6c 69  |nstruction in li|
00000d10  6e 65 20 38 35 30 20 66  6f 72 20 74 68 65 1a 20  |ne 850 for the. |
00000d20  6d 6f 6d 65 6e 74 2c 1a  20 6c 69 6e 65 73 20 38  |moment,. lines 8|
00000d30  36 30 20 26 20 38 37 30  20 73 65 74 0d 74 68 65  |60 & 870 set.the|
00000d40  20 61 64 64 72 65 73 73  20 69 6e 20 26 37 30 2c  | address in &70,|
00000d50  37 31 20 74 6f 20 48 49  4d 45 4d 2e 20 20 54 68  |71 to HIMEM.  Th|
00000d60  65 20 70 72 69 6e 74 20  6c 6f 6f 70 20 69 73 1a  |e print loop is.|
00000d70  20 61 73 73 65 6d 62 6c  65 64 20 69 6e 20 6c 69  | assembled in li|
00000d80  6e 65 73 20 38 38 30 0d  2d 20 39 37 30 2e 20 4c  |nes 880.- 970. L|
00000d90  69 6e 65 20 39 30 30 20  72 65 74 75 72 6e 73 20  |ine 900 returns |
00000da0  74 6f 20 42 41 53 49 43  20 69 66 20 7a 65 72 6f  |to BASIC if zero|
00000db0  20 62 79 74 65 20 66 6f  75 6e 64 20 28 65 6e 64  | byte found (end|
00000dc0  20 6f 66 20 66 69 6c 65  29 2e 0d 0d 4c 69 6e 65  | of file)...Line|
00000dd0  73 20 39 31 30 2c 39 32  30 20 74 6f 67 67 6c 65  |s 910,920 toggle|
00000de0  20 74 68 65 20 68 69 67  68 6c 69 67 68 74 1a 20  | the highlight. |
00000df0  66 6c 61 67 73 20 69 66  20 74 68 65 20 56 69 65  |flags if the Vie|
00000e00  77 20 63 6f 64 65 73 20  26 31 43 20 6f 72 20 26  |w codes &1C or &|
00000e10  31 44 20 61 72 65 0d 66  6f 75 6e 64 20 66 6f 72  |1D are.found for|
00000e20  20 62 6f 6c 64 20 6f 72  20 69 74 61 6c 69 63 20  | bold or italic |
00000e30  70 72 69 6e 74 69 6e 67  1a 20 61 6e 64 20 74 68  |printing. and th|
00000e40  65 20 66 6f 72 6d 61 74  74 69 6e 67 20 63 6f 64  |e formatting cod|
00000e50  65 73 20 61 72 65 20 73  6b 69 70 70 65 64 20 61  |es are skipped a|
00000e60  74 0d 6c 69 6e 65 73 20  39 33 30 2c 39 34 30 2e  |t.lines 930,940.|
00000e70  20 20 0d 20 0d 54 68 65  20 62 79 74 65 20 74 6f  |  . .The byte to|
00000e80  20 62 65 20 70 72 69 6e  74 65 64 1a 20 69 73 1a  | be printed. is.|
00000e90  20 50 55 53 48 65 64 1a  20 6f 6e 74 6f 1a 20 74  | PUSHed. onto. t|
00000ea0  68 65 1a 20 73 74 61 63  6b 20 77 68 69 6c 65 20  |he. stack while |
00000eb0  74 68 65 20 6d 6f 64 65  66 6c 61 67 20 69 73 0d  |the modeflag is.|
00000ec0  74 65 73 74 65 64 2e 20  20 49 66 20 74 68 69 73  |tested.  If this|
00000ed0  20 69 73 20 7a 65 72 6f  1a 20 28 4d 4f 44 45 1a  | is zero. (MODE.|
00000ee0  20 33 29 1a 20 74 68 65  1a 20 70 72 6f 67 72 61  | 3). the. progra|
00000ef0  6d 1a 20 63 6f 6e 74 69  6e 75 65 73 1a 20 61 6e  |m. continues. an|
00000f00  64 20 74 68 65 20 62 79  74 65 0d 50 55 4c 4c 65  |d the byte.PULLe|
00000f10  64 20 66 72 6f 6d 20 74  68 65 20 73 74 61 63 6b  |d from the stack|
00000f20  20 66 6f 72 20 74 68 65  20 63 68 61 72 61 63 74  | for the charact|
00000f30  65 72 20 74 6f 20 62 65  20 70 72 69 6e 74 65 64  |er to be printed|
00000f40  2e 0d 0d 49 66 20 74 68  69 73 20 69 73 20 61 20  |...If this is a |
00000f50  43 52 1a 20 28 26 30 44  29 1a 20 61 1a 20 20 6a  |CR. (&0D). a.  j|
00000f60  75 6d 70 1a 20 69 73 20  6d 61 64 65 20 74 6f 20  |ump. is made to |
00000f70  27 6e 65 77 6c 27 20 6c  69 6e 65 20 31 30 34 30  |'newl' line 1040|
00000f80  2e 20 20 54 68 69 73 20  63 61 6c 6c 73 0d 6f 73  |.  This calls.os|
00000f90  6e 65 77 6c 20 28 26 46  46 45 37 29 20 61 6e 64  |newl (&FFE7) and|
00000fa0  20 74 68 65 6e 20 74 65  73 74 73 20 74 68 65 20  | then tests the |
00000fb0  76 61 6c 75 65 20 69 6e  20 73 6b 69 70 2e 1a 20  |value in skip.. |
00000fc0  20 49 66 1a 20 74 68 69  73 1a 20 69 73 1a 20 7a  | If. this. is. z|
00000fd0  65 72 6f 1a 20 74 68 65  0d 70 72 6f 67 72 61 6d  |ero. the.program|
00000fe0  20 72 65 74 75 72 6e 73  20 74 6f 20 27 69 6e 63  | returns to 'inc|
00000ff0  27 20 6c 69 6e 65 20 31  30 31 30 20 74 6f 20 72  |' line 1010 to r|
00001000  65 74 75 72 6e 20 74 6f  20 74 68 65 20 70 72 69  |eturn to the pri|
00001010  6e 74 20 6c 6f 6f 70 2e  0d 0d 49 66 20 73 6b 69  |nt loop...If ski|
00001020  70 20 69 73 20 6e 6f 74  20 7a 65 72 6f 2c 20 74  |p is not zero, t|
00001030  68 65 20 70 72 6f 67 72  61 6d 20 67 6f 65 73 20  |he program goes |
00001040  74 6f 20 27 73 6b 70 27  20 6c 69 6e 65 20 31 30  |to 'skp' line 10|
00001050  35 30 2e 1a 20 20 54 68  65 1a 20 76 61 6c 75 65  |50..  The. value|
00001060  1a 20 69 6e 0d 27 63 6f  75 6e 74 27 2c 1a 20 69  |. in.'count',. i|
00001070  6e 69 74 69 61 6c 6c 79  20 73 65 74 20 74 6f 20  |nitially set to |
00001080  74 68 65 20 76 61 6c 75  65 20 6f 66 20 27 6c 69  |the value of 'li|
00001090  6e 65 73 27 2c 20 69 73  20 64 65 63 72 65 61 73  |nes', is decreas|
000010a0  65 64 20 74 6f 20 63 6f  75 6e 74 20 74 68 65 0d  |ed to count the.|
000010b0  6e 75 6d 62 65 72 20 6f  66 1a 20 6c 69 6e 65 73  |number of. lines|
000010c0  1a 20 74 6f 1a 62 65 1a  20 70 72 69 6e 74 65 64  |. to.be. printed|
000010d0  2c 1a 20 72 65 74 75 72  6e 69 6e 67 20 74 6f 20  |,. returning to |
000010e0  74 68 65 20 70 72 69 6e  74 20 6c 6f 6f 70 20 75  |the print loop u|
000010f0  6e 74 69 6c 20 63 6f 75  6e 74 0d 72 65 61 63 68  |ntil count.reach|
00001100  65 73 20 7a 65 72 6f 2e  20 20 49 74 20 69 73 20  |es zero.  It is |
00001110  74 68 65 6e 20 20 6c 6f  61 64 65 64 20 77 69 74  |then  loaded wit|
00001120  68 20 74 68 65 20 76 61  6c 75 65 20 69 6e 20 73  |h the value in s|
00001130  6b 69 70 6c 69 6e 65 73  20 74 6f 20 63 6f 75 6e  |kiplines to coun|
00001140  74 20 74 68 65 0d 6e 75  6d 62 65 72 20 6f 66 20  |t the.number of |
00001150  74 69 6d 65 73 20 74 68  65 20 6c 6f 6f 70 20 27  |times the loop '|
00001160  73 6b 70 31 27 20 69 73  1a 20 75 73 65 64 1a 20  |skp1' is. used. |
00001170  74 6f 1a 20 73 6b 69 70  1a 20 74 68 65 20 70 65  |to. skip. the pe|
00001180  72 66 6f 72 61 74 69 6f  6e 73 2e 20 20 54 68 65  |rforations.  The|
00001190  0d 76 61 72 69 61 62 6c  65 1a 20 63 6f 75 6e 74  |.variable. count|
000011a0  1a 20 69 73 20 74 68 65  6e 20 6c 6f 61 64 65 64  |. is then loaded|
000011b0  20 77 69 74 68 20 74 68  65 20 76 61 6c 75 65 20  | with the value |
000011c0  6f 66 20 6c 69 6e 65 73  20 66 6f 72 1a 20 70 72  |of lines for. pr|
000011d0  69 6e 74 69 6e 67 1a 20  74 68 65 0d 6e 65 78 74  |inting. the.next|
000011e0  20 70 61 67 65 2e 0d 0d  34 30 20 43 4f 4c 55 4d  | page...40 COLUM|
000011f0  4e 20 50 52 49 4e 54 49  4e 47 0d 7e 7e 7e 7e 7e  |N PRINTING.~~~~~|
00001200  7e 7e 7e 7e 7e 7e 7e 7e  7e 7e 7e 7e 7e 0d 49 66  |~~~~~~~~~~~~~.If|
00001210  20 4d 4f 44 45 20 36 20  69 73 20 73 65 6c 65 63  | MODE 6 is selec|
00001220  74 65 64 2c 1a 20 74 68  65 1a 20 6d 6f 64 65 66  |ted,. the. modef|
00001230  6c 61 67 1a 20 69 73 20  6e 6f 74 20 7a 65 72 6f  |lag. is not zero|
00001240  20 61 6e 64 20 61 20 62  72 61 6e 63 68 20 69 73  | and a branch is|
00001250  20 6d 61 64 65 20 61 74  0d 6c 69 6e 65 20 39 35  | made at.line 95|
00001260  30 20 74 6f 20 27 6d 36  27 20 28 6c 69 6e 65 20  |0 to 'm6' (line |
00001270  39 38 30 29 2e 20 20 54  68 65 20 63 68 61 72 61  |980).  The chara|
00001280  63 74 65 72 1a 20 62 79  74 65 20 69 73 20 50 55  |cter. byte is PU|
00001290  4c 4c 65 64 20 66 72 6f  6d 20 74 68 65 20 73 74  |LLed from the st|
000012a0  61 63 6b 0d 61 6e 64 20  69 73 20 66 69 72 73 74  |ack.and is first|
000012b0  20 63 6f 6d 70 61 72 65  64 20 77 69 68 20 26 30  | compared wih &0|
000012c0  44 20 28 43 52 29 20 61  6e 64 20 69 66 1a 20 65  |D (CR) and if. e|
000012d0  71 75 61 6c 1a 20 61 1a  20 6a 75 6d 70 20 69 73  |qual. a. jump is|
000012e0  20 6d 61 64 65 20 74 6f  20 74 65 73 74 2e 20 0d  | made to test. .|
000012f0  54 68 69 73 20 63 68 65  63 6b 73 20 74 68 65 20  |This checks the |
00001300  66 6f 6c 6c 6f 77 69 6e  67 20 62 79 74 65 20 62  |following byte b|
00001310  79 20 69 6e 63 72 65 61  73 69 6e 67 20 74 68 65  |y increasing the|
00001320  20 69 6e 64 65 78 20 59  2e 20 20 49 66 20 74 68  | index Y.  If th|
00001330  69 73 1a 20 69 73 20 26  37 45 0d 28 7e 29 2c 20  |is. is &7E.(~), |
00001340  26 30 44 20 28 43 52 29  20 6f 72 20 26 32 30 20  |&0D (CR) or &20 |
00001350  28 73 70 61 63 65 29 20  61 20 6a 75 6d 70 20 74  |(space) a jump t|
00001360  6f 20 27 6f 6b 31 27 2c  20 74 68 65 20 69 6e 64  |o 'ok1', the ind|
00001370  65 78 20 64 65 63 72 65  61 73 65 64 20 61 6e 64  |ex decreased and|
00001380  20 61 20 43 52 0d 63 68  61 72 61 63 74 65 72 1a  | a CR.character.|
00001390  20 70 72 69 6e 74 65 64  2e 1a 20 20 49 66 20 6e  | printed..  If n|
000013a0  6f 6e 65 20 6f 66 20 74  68 65 73 65 20 61 72 65  |one of these are|
000013b0  20 66 6f 75 6e 64 2c 20  74 68 65 20 69 6e 64 65  | found, the inde|
000013c0  78 20 59 20 69 73 20 64  65 63 72 65 61 73 65 64  |x Y is decreased|
000013d0  0d 74 77 69 63 65 20 74  6f 20 70 6f 69 6e 74 1a  |.twice to point.|
000013e0  20 74 6f 1a 20 74 68 65  1a 20 62 79 74 65 1a 20  | to. the. byte. |
000013f0  62 65 66 6f 72 65 2e 1a  20 20 49 66 1a 20 74 68  |before..  If. th|
00001400  69 73 20 69 73 20 26 37  45 20 28 7e 29 20 6f 72  |is is &7E (~) or|
00001410  20 26 30 44 20 28 43 52  29 20 61 0d 62 72 61 6e  | &0D (CR) a.bran|
00001420  63 68 20 67 6f 65 73 20  74 6f 20 27 6f 6b 32 27  |ch goes to 'ok2'|
00001430  20 74 68 65 20 69 6e 64  65 78 20 59 20 69 6e 63  | the index Y inc|
00001440  72 65 61 73 65 64 20 61  6e 64 1a 20 61 20 43 52  |reased and. a CR|
00001450  20 70 72 69 6e 74 65 64  2e 20 20 49 66 20 61 20  | printed.  If a |
00001460  62 72 61 6e 63 68 0d 69  73 20 6e 6f 74 20 6d 61  |branch.is not ma|
00001470  64 65 20 74 68 65 20 69  6e 64 65 78 20 59 20 69  |de the index Y i|
00001480  6e 63 72 65 61 73 65 64  20 61 6e 64 20 61 20 73  |ncreased and a s|
00001490  70 61 63 65 20 70 72 69  6e 74 65 64 2e 20 20 0d  |pace printed.  .|
000014a0  0d 54 68 69 73 20 74 68  65 6e 20 70 72 69 6e 74  |.This then print|
000014b0  73 20 74 68 65 20 43 52  1a 20 63 68 61 72 61 63  |s the CR. charac|
000014c0  74 65 72 73 1a 20 77 68  65 72 65 1a 20 69 74 1a  |ters. where. it.|
000014d0  20 69 73 20 6e 65 65 64  65 64 20 66 6f 72 20 70  | is needed for p|
000014e0  72 69 6e 74 69 6e 67 20  74 68 65 0d 68 65 61 64  |rinting the.head|
000014f0  69 6e 67 73 20 61 6e 64  20 75 6e 64 65 72 6c 69  |ings and underli|
00001500  6e 65 73 20 62 75 74 20  70 72 69 6e 74 73 20 73  |nes but prints s|
00001510  70 61 63 65 20 69 6e 73  74 65 61 64 20 6f 66 20  |pace instead of |
00001520  74 68 65 20 6f 74 68 65  72 73 2e 0d 0d 54 68 65  |the others...The|
00001530  1a 20 74 65 78 74 20 69  73 20 74 68 65 6e 20 70  |. text is then p|
00001540  72 69 6e 74 65 64 20 75  73 69 6e 67 20 61 20 77  |rinted using a w|
00001550  6f 72 64 2d 77 72 61 70  70 69 6e 67 20 72 6f 75  |ord-wrapping rou|
00001560  74 69 6e 65 2e 20 20 49  66 20 74 68 65 20 62 79  |tine.  If the by|
00001570  74 65 20 69 73 20 61 0d  73 70 61 63 65 20 28 26  |te is a.space (&|
00001580  32 30 29 1a 20 61 1a 20  6a 75 6d 70 20 69 73 20  |20). a. jump is |
00001590  6d 61 64 65 20 74 6f 20  74 68 65 20 73 70 61 63  |made to the spac|
000015a0  65 20 72 6f 75 74 69 6e  65 20 28 6c 69 6e 65 20  |e routine (line |
000015b0  31 30 36 30 29 2e 20 20  54 68 69 73 20 66 69 72  |1060).  This fir|
000015c0  73 74 0d 63 68 65 63 6b  73 20 74 68 65 20 76 61  |st.checks the va|
000015d0  6c 75 65 20 69 6e 1a 20  61 64 64 72 65 73 73 20  |lue in. address |
000015e0  26 33 31 38 20 2d 20 74  68 65 20 63 75 72 72 65  |&318 - the curre|
000015f0  6e 74 20 74 65 78 74 20  63 75 72 73 6f 72 20 58  |nt text cursor X|
00001600  20 63 6f 2d 6f 72 64 69  6e 61 74 65 2e 20 0d 49  | co-ordinate. .I|
00001610  66 20 74 68 69 73 20 69  73 20 7a 65 72 6f 2c 20  |f this is zero, |
00001620  74 68 65 1a 20 62 65 67  69 6e 6e 69 6e 67 20 6f  |the. beginning o|
00001630  66 20 74 68 65 20 6c 69  6e 65 2c 20 74 68 65 20  |f the line, the |
00001640  27 73 70 27 20 72 6f 75  74 69 6e 65 20 6c 69 6e  |'sp' routine lin|
00001650  65 20 31 31 32 30 20 69  73 0d 63 61 6c 6c 65 64  |e 1120 is.called|
00001660  2e 20 20 54 68 69 73 20  69 73 1a 20 61 1a 20 73  |.  This is. a. s|
00001670  69 6d 70 6c 65 20 6c 6f  6f 70 20 77 68 69 63 68  |imple loop which|
00001680  20 63 68 65 63 6b 73 20  66 6f 72 20 66 75 72 74  | checks for furt|
00001690  68 65 72 20 73 70 61 63  65 73 20 61 6e 64 20 6c  |her spaces and l|
000016a0  6f 6f 70 73 0d 62 61 63  6b 1a 20 75 6e 74 69 6c  |oops.back. until|
000016b0  20 61 6e 6f 74 68 65 72  20 63 68 61 72 61 63 74  | another charact|
000016c0  65 72 20 69 73 1a 20 66  6f 75 6e 64 1a 20 62 65  |er is. found. be|
000016d0  66 6f 72 65 1a 20 72 65  74 75 72 6e 69 6e 67 1a  |fore. returning.|
000016e0  20 74 6f 1a 20 74 68 65  1a 20 70 72 69 6e 74 0d  | to. the. print.|
000016f0  72 6f 75 74 69 6e 65 2e  20 20 54 68 69 73 1a 20  |routine.  This. |
00001700  6c 65 66 74 1a 20 6a 75  73 74 69 66 69 65 73 1a  |left. justifies.|
00001710  20 61 6c 6c 1a 20 74 69  74 6c 65 73 2c 20 65 74  | all. titles, et|
00001720  63 20 77 68 69 63 68 20  77 6f 75 6c 64 20 6f 74  |c which would ot|
00001730  68 65 72 77 69 73 65 20  62 65 0d 73 70 6c 69 74  |herwise be.split|
00001740  2e 0d 20 0d 49 66 20 74  68 65 20 61 64 64 72 65  |.. .If the addre|
00001750  73 73 20 26 33 31 38 20  68 6f 6c 64 73 20 61 20  |ss &318 holds a |
00001760  76 61 6c 75 65 20 67 72  65 61 74 65 72 20 74 68  |value greater th|
00001770  61 6e 20 7a 65 72 6f 2c  20 69 65 1a 20 6e 6f 74  |an zero, ie. not|
00001780  20 74 68 65 20 62 65 67  69 6e 6e 69 6e 67 0d 6f  | the beginning.o|
00001790  66 20 74 68 65 20 6c 69  6e 65 2c 20 74 68 65 20  |f the line, the |
000017a0  76 61 6c 75 65 20 69 73  20 63 6f 6d 70 61 72 65  |value is compare|
000017b0  64 20 77 69 74 68 20 74  68 65 20 76 61 6c 75 65  |d with the value|
000017c0  20 6c 6f 61 64 65 64 20  69 6e 74 6f 1a 20 41 1a  | loaded into. A.|
000017d0  20 72 65 67 69 73 74 65  72 0d 69 6e 20 6c 69 6e  | register.in lin|
000017e0  65 20 31 30 36 30 2e 20  20 49 66 20 74 68 65 1a  |e 1060.  If the.|
000017f0  20 63 61 72 72 79 1a 20  66 6c 61 67 20 69 73 20  | carry. flag is |
00001800  63 6c 65 61 72 2c 20 69  65 20 74 68 65 20 58 20  |clear, ie the X |
00001810  63 6f 2d 6f 72 64 20 6c  65 73 73 20 74 68 61 6e  |co-ord less than|
00001820  20 33 30 2c 0d 70 72 69  6e 74 69 6e 67 20 63 6f  | 30,.printing co|
00001830  6e 74 69 6e 75 65 73 20  6e 6f 72 6d 61 6c 6c 79  |ntinues normally|
00001840  2e 20 20 57 68 65 6e 20  74 68 65 20 63 61 72 72  |.  When the carr|
00001850  79 20 66 6c 61 67 1a 20  69 73 1a 20 73 65 74 2c  |y flag. is. set,|
00001860  1a 20 70 72 69 6e 74 69  6e 67 20 77 69 6c 6c 0d  |. printing will.|
00001870  63 6f 6e 74 69 6e 75 65  20 75 6e 74 69 6c 20 61  |continue until a|
00001880  20 73 70 61 63 65 20 69  73 20 66 6f 75 6e 64 20  | space is found |
00001890  77 68 65 6e 20 61 20 43  52 20 63 68 61 72 61 63  |when a CR charac|
000018a0  74 65 72 1a 20 69 73 20  70 72 69 6e 74 65 64 20  |ter. is printed |
000018b0  74 6f 20 73 74 61 72 74  20 61 0d 6e 65 77 20 6c  |to start a.new l|
000018c0  69 6e 65 2e 0d 0d                                 |ine...|
000018c6
P/+COD5_1.m0
P/+COD5_1.m1
P/+COD5_1.m2
P/+COD5_1.m4
P/+COD5_1.m5