Home » CEEFAX disks » telesoftware14.adl » 18-03-89/ProgInf
18-03-89/ProgInf
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » CEEFAX disks » telesoftware14.adl |
Filename: | 18-03-89/ProgInf |
Read OK: | ✔ |
File size: | 1C9D bytes |
Load address: | 0000 |
Exec address: | FFFFFFFF |
Duplicates
There is 1 duplicate copy of this file in the archive:
- CEEFAX disks » telesoftware14.adl » 18-03-89/ProgInf
- CEEFAX disks » telesoftware8.adl » 19-08-88/PROGINF
File contents
Programming of BBC Printer Fonts Each character on the BBC's screen is, like a dot matrix printer character, made up of a series of dots. Normally these dots merge to form one character but anyone who has ever defined their own UDG will probably have seen the individual dots. Each character is made up on an 8x8 matrix, as is the case with most personal computers. On the dot matrix printer the situation is slightly different. Most printers now have 9 pins arranged vertically in the head, a few printers have 8 ( usally older ones ) and new printers are constantly being launched with 24 pin heads, these provide a much better ( i.e. nearer Daisy Wheel quality ) characters. For the moment we have to stick to 9. When the BBC sends data the printer it sends 8 bits which the printer normally interprets either as an ASCII code, a direct command or an ESC code. The BBC is not alone in sending 8 bits to the printer most modern micros do - the old Apple IIs only sent 7 bits. Unfortunately, this means that when graphics data is sent to the printer the printer operates on a one bit, one pin idea so the ninth pin can only be used by the printers own fonts. When it comes to horizontal patterns the only limit is the width of printer. Because the pins are arranged horizontally and moved they can move the full carriage length, usually this means 480 dots ( 60 dots an inch ) in single density bit image mode or 960 dots ( 120 dots an inch ) in double density mode. Normally printer character sets stay around the 8 dots per character width range. I decided to limit each character to 8 dots width since this seems ample width to me, it is also familar as the BBC characters are each 8 bits wide and it's easier to program! - 1 byte is 8 bits. Each point on both the BBC and printer is either on or off, 1 or 0 - traditional binary. When storing the characters each point could have been given a byte of it's own, this would have needed 8*8*(32-126)=6016 bytes. ( 32 being the minimum character value and 126 being the maximum). This seemed a bit extravagant on memory since only an eighth of each byte would be used and the bytes would have to be converted into bit form for both the printer and BBC to use. So each line of dots is represented by 1 byte so only 8*(32-126)=752 bytes are needed. The BBC's clear character set stems from the fact that it's characters user 2 vertical rows where often one will do ( you can see this for yourself by examining any character on the Editing grid after setting it to default). Many computers and most printers only use one row, this means that if you use the BBC character set directly with the printer ( e.g. set all characters to default and compile ) the characters that appear on the printer will appear to big to rectify this just "trim" the characters. At this point things seem quite satisfactory, each character is stored as 8 bytes each using 8 bits, the BBC expects characters made of 8 bytes with all 8 bits used, the printer expects 1 byte ( 8 bits ) of data for each row of rots and 8 rows are needed for a character. BUT the printer expects each byte to represent 1 row of vertical dots and the BBC expects one byte to represent 1 row of horizontal dots. I opted to store the characters in vertical form, e.g. the way the printer expected them. This made no difference to the operation of the grid but was a problem for the UDG display to the left of the grid. At first I converted the characters from printer format to BBC format using BASIC but this was a very slow process. To speed things up I wrote the machine code routine set_up_udg. When entered the A register is set to the character to be converted. The program then uses a series of masks to change vertical to horizontal and present the final definition in character 130. ( The menu option "Give setting for UDG" actually calls this routine, but ignores what is defined in CHR$ 130, instead it reads from the routines own data block.) The other machine code routines were written either to speed up the program ( set_up_udg and fill_box ) or because I though it would be easier to write them in machine code ( get_default and the move grid routines ). Locate_char is the exception, it was written to allow the other routines to find the character they want. The same code has also been included in a slightly different form in the Trap program. The Editor program itself is a series of procedure blocks. Some of the options provided by the function keys in the editor have similar functions e.g. flip and reverse vertically, in such cases I have been able to write one procedure for reversing one line which is then used by both reverse vertically and flip. To access each character matrix 4 routines are used. PROCpoke(char,x,y,value) and FNpeek(char,x,y) work with individual bits of a character. char gives the character to be effected, x and y give it's position and value denotes if it is to be cleared, set or reversed. The other two routines operate on whole vertical rows, in this case the y co-ordinate is not needed, they are PROCrow_poke(char,x,value) and FNrow_peek(char,x). By forcing all procedures to access the grid though these 4 routines great flexibility is gained. The Trap Program Although held inside the editor program and assembled there Trap ( assembled by FNassemble_trap ) is actually a separate program. Trap itself is less the 256 bytes long but data for each font takes the length of the file upto 1280 bytes. When Trap has been "compiled" into a file of it's own it is a separate program. When called up by it's file name it takes control of the OSWRCH vector WRCHV - watch for any ROMs or other utilities that try to do this before or especially after Trap has been run - a crash could occure. Once Trap has control of WRCHV it censors all characters outputed. If the printer is not active nothing happens but once the printer is switched on with VDU 2 trap comes to life. Firstly it censors all characters sent to the printer, though the use of *FX 3 output continues to the screen as normal while the printer is sent the special font characters. If the special font characters were to be displayed on the BBC's screen anything could occur to the display. Before each set of font codes is sent to the printer Trap sends the sequence VDU 1,27,1,75,1,8,1,0. This means, to an Epson compatible printer "Expect 8 bits of graphics data for single density printing." If the 75 is changed to a 76 then double density is used for the printing of each character. ( FNassemble_trap has a remark in the right place if you wish to change this - it's worth it just to see the difference ). If you printer is not Epson compatible you will have to change this control sequence. I have not been able to test Fonts on a Master but, from what I know of the Master I can see no reason for it not to work. Choosing the memory to be used will depend on the machine you are using and personal preference. I usally word process in mode 3. Draft copies can be printed out immediately from this mode but if I want to use a special program like this one, I will usally set it to run in the memory normally used by mode 3. Before printing I change to mode 7 and run the special program then print it.
00000000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000010 20 20 50 72 6f 67 72 61 6d 6d 69 6e 67 20 6f 66 | Programming of| 00000020 20 42 42 43 20 50 72 69 6e 74 65 72 20 46 6f 6e | BBC Printer Fon| 00000030 74 73 0d 0d 20 20 20 45 61 63 68 20 63 68 61 72 |ts.. Each char| 00000040 61 63 74 65 72 20 6f 6e 20 74 68 65 20 42 42 43 |acter on the BBC| 00000050 27 73 20 73 63 72 65 65 6e 20 69 73 2c 20 6c 69 |'s screen is, li| 00000060 6b 65 20 61 20 64 6f 74 20 6d 61 74 72 69 78 20 |ke a dot matrix | 00000070 70 72 69 6e 74 65 72 0d 63 68 61 72 61 63 74 65 |printer.characte| 00000080 72 2c 20 6d 61 64 65 20 75 70 20 6f 66 20 61 20 |r, made up of a | 00000090 73 65 72 69 65 73 20 6f 66 20 64 6f 74 73 2e 20 |series of dots. | 000000a0 4e 6f 72 6d 61 6c 6c 79 20 74 68 65 73 65 20 64 |Normally these d| 000000b0 6f 74 73 20 6d 65 72 67 65 20 74 6f 20 66 6f 72 |ots merge to for| 000000c0 6d 0d 6f 6e 65 20 63 68 61 72 61 63 74 65 72 20 |m.one character | 000000d0 62 75 74 20 61 6e 79 6f 6e 65 20 77 68 6f 20 68 |but anyone who h| 000000e0 61 73 20 65 76 65 72 20 64 65 66 69 6e 65 64 20 |as ever defined | 000000f0 74 68 65 69 72 20 6f 77 6e 20 55 44 47 20 77 69 |their own UDG wi| 00000100 6c 6c 20 70 72 6f 62 61 62 6c 79 0d 68 61 76 65 |ll probably.have| 00000110 20 73 65 65 6e 20 74 68 65 20 69 6e 64 69 76 69 | seen the indivi| 00000120 64 75 61 6c 20 64 6f 74 73 2e 20 45 61 63 68 20 |dual dots. Each | 00000130 63 68 61 72 61 63 74 65 72 20 69 73 20 6d 61 64 |character is mad| 00000140 65 20 75 70 20 6f 6e 20 61 6e 20 38 78 38 0d 6d |e up on an 8x8.m| 00000150 61 74 72 69 78 2c 20 61 73 20 69 73 20 74 68 65 |atrix, as is the| 00000160 20 63 61 73 65 20 77 69 74 68 20 6d 6f 73 74 20 | case with most | 00000170 70 65 72 73 6f 6e 61 6c 20 63 6f 6d 70 75 74 65 |personal compute| 00000180 72 73 2e 0d 20 20 20 4f 6e 20 74 68 65 20 64 6f |rs.. On the do| 00000190 74 20 6d 61 74 72 69 78 20 70 72 69 6e 74 65 72 |t matrix printer| 000001a0 20 74 68 65 20 73 69 74 75 61 74 69 6f 6e 20 69 | the situation i| 000001b0 73 20 73 6c 69 67 68 74 6c 79 20 64 69 66 66 65 |s slightly diffe| 000001c0 72 65 6e 74 2e 20 4d 6f 73 74 0d 70 72 69 6e 74 |rent. Most.print| 000001d0 65 72 73 20 6e 6f 77 20 68 61 76 65 20 39 20 70 |ers now have 9 p| 000001e0 69 6e 73 20 61 72 72 61 6e 67 65 64 20 76 65 72 |ins arranged ver| 000001f0 74 69 63 61 6c 6c 79 20 69 6e 20 74 68 65 20 68 |tically in the h| 00000200 65 61 64 2c 20 61 20 66 65 77 20 70 72 69 6e 74 |ead, a few print| 00000210 65 72 73 0d 68 61 76 65 20 38 20 28 20 75 73 61 |ers.have 8 ( usa| 00000220 6c 6c 79 20 6f 6c 64 65 72 20 6f 6e 65 73 20 29 |lly older ones )| 00000230 20 61 6e 64 20 6e 65 77 20 70 72 69 6e 74 65 72 | and new printer| 00000240 73 20 61 72 65 20 63 6f 6e 73 74 61 6e 74 6c 79 |s are constantly| 00000250 20 62 65 69 6e 67 0d 6c 61 75 6e 63 68 65 64 20 | being.launched | 00000260 77 69 74 68 20 32 34 20 70 69 6e 20 68 65 61 64 |with 24 pin head| 00000270 73 2c 20 74 68 65 73 65 20 70 72 6f 76 69 64 65 |s, these provide| 00000280 20 61 20 6d 75 63 68 20 62 65 74 74 65 72 20 28 | a much better (| 00000290 20 69 2e 65 2e 20 6e 65 61 72 65 72 0d 44 61 69 | i.e. nearer.Dai| 000002a0 73 79 20 57 68 65 65 6c 20 71 75 61 6c 69 74 79 |sy Wheel quality| 000002b0 20 29 20 63 68 61 72 61 63 74 65 72 73 2e 20 46 | ) characters. F| 000002c0 6f 72 20 74 68 65 20 6d 6f 6d 65 6e 74 20 77 65 |or the moment we| 000002d0 20 68 61 76 65 20 74 6f 20 73 74 69 63 6b 20 74 | have to stick t| 000002e0 6f 20 20 39 2e 0d 20 20 20 57 68 65 6e 20 74 68 |o 9.. When th| 000002f0 65 20 42 42 43 20 73 65 6e 64 73 20 64 61 74 61 |e BBC sends data| 00000300 20 74 68 65 20 70 72 69 6e 74 65 72 20 69 74 20 | the printer it | 00000310 73 65 6e 64 73 20 38 20 62 69 74 73 20 77 68 69 |sends 8 bits whi| 00000320 63 68 20 74 68 65 20 70 72 69 6e 74 65 72 0d 6e |ch the printer.n| 00000330 6f 72 6d 61 6c 6c 79 20 69 6e 74 65 72 70 72 65 |ormally interpre| 00000340 74 73 20 65 69 74 68 65 72 20 61 73 20 61 6e 20 |ts either as an | 00000350 41 53 43 49 49 20 63 6f 64 65 2c 20 61 20 64 69 |ASCII code, a di| 00000360 72 65 63 74 20 63 6f 6d 6d 61 6e 64 20 6f 72 20 |rect command or | 00000370 61 6e 20 45 53 43 0d 63 6f 64 65 2e 20 54 68 65 |an ESC.code. The| 00000380 20 42 42 43 20 69 73 20 6e 6f 74 20 61 6c 6f 6e | BBC is not alon| 00000390 65 20 69 6e 20 73 65 6e 64 69 6e 67 20 38 20 62 |e in sending 8 b| 000003a0 69 74 73 20 74 6f 20 74 68 65 20 70 72 69 6e 74 |its to the print| 000003b0 65 72 20 6d 6f 73 74 20 6d 6f 64 65 72 6e 0d 6d |er most modern.m| 000003c0 69 63 72 6f 73 20 64 6f 20 2d 20 74 68 65 20 6f |icros do - the o| 000003d0 6c 64 20 41 70 70 6c 65 20 49 49 73 20 6f 6e 6c |ld Apple IIs onl| 000003e0 79 20 73 65 6e 74 20 37 20 62 69 74 73 2e 20 55 |y sent 7 bits. U| 000003f0 6e 66 6f 72 74 75 6e 61 74 65 6c 79 2c 20 74 68 |nfortunately, th| 00000400 69 73 20 6d 65 61 6e 73 0d 74 68 61 74 20 77 68 |is means.that wh| 00000410 65 6e 20 67 72 61 70 68 69 63 73 20 64 61 74 61 |en graphics data| 00000420 20 69 73 20 73 65 6e 74 20 74 6f 20 74 68 65 20 | is sent to the | 00000430 70 72 69 6e 74 65 72 20 74 68 65 20 70 72 69 6e |printer the prin| 00000440 74 65 72 20 6f 70 65 72 61 74 65 73 20 6f 6e 20 |ter operates on | 00000450 61 0d 6f 6e 65 20 62 69 74 2c 20 6f 6e 65 20 70 |a.one bit, one p| 00000460 69 6e 20 69 64 65 61 20 73 6f 20 74 68 65 20 6e |in idea so the n| 00000470 69 6e 74 68 20 70 69 6e 20 63 61 6e 20 6f 6e 6c |inth pin can onl| 00000480 79 20 62 65 20 75 73 65 64 20 62 79 20 74 68 65 |y be used by the| 00000490 20 70 72 69 6e 74 65 72 73 0d 6f 77 6e 20 66 6f | printers.own fo| 000004a0 6e 74 73 2e 0d 20 20 57 68 65 6e 20 69 74 20 63 |nts.. When it c| 000004b0 6f 6d 65 73 20 74 6f 20 68 6f 72 69 7a 6f 6e 74 |omes to horizont| 000004c0 61 6c 20 70 61 74 74 65 72 6e 73 20 74 68 65 20 |al patterns the | 000004d0 6f 6e 6c 79 20 6c 69 6d 69 74 20 69 73 20 74 68 |only limit is th| 000004e0 65 20 77 69 64 74 68 20 6f 66 0d 70 72 69 6e 74 |e width of.print| 000004f0 65 72 2e 20 42 65 63 61 75 73 65 20 74 68 65 20 |er. Because the | 00000500 70 69 6e 73 20 61 72 65 20 61 72 72 61 6e 67 65 |pins are arrange| 00000510 64 20 68 6f 72 69 7a 6f 6e 74 61 6c 6c 79 20 61 |d horizontally a| 00000520 6e 64 20 6d 6f 76 65 64 20 74 68 65 79 20 63 61 |nd moved they ca| 00000530 6e 0d 6d 6f 76 65 20 74 68 65 20 66 75 6c 6c 20 |n.move the full | 00000540 63 61 72 72 69 61 67 65 20 6c 65 6e 67 74 68 2c |carriage length,| 00000550 20 75 73 75 61 6c 6c 79 20 74 68 69 73 20 6d 65 | usually this me| 00000560 61 6e 73 20 34 38 30 20 64 6f 74 73 20 28 20 36 |ans 480 dots ( 6| 00000570 30 20 64 6f 74 73 20 61 6e 0d 69 6e 63 68 20 29 |0 dots an.inch )| 00000580 20 69 6e 20 73 69 6e 67 6c 65 20 64 65 6e 73 69 | in single densi| 00000590 74 79 20 62 69 74 20 69 6d 61 67 65 20 6d 6f 64 |ty bit image mod| 000005a0 65 20 6f 72 20 39 36 30 20 64 6f 74 73 20 28 20 |e or 960 dots ( | 000005b0 31 32 30 20 64 6f 74 73 20 61 6e 20 69 6e 63 68 |120 dots an inch| 000005c0 20 29 0d 69 6e 20 64 6f 75 62 6c 65 20 64 65 6e | ).in double den| 000005d0 73 69 74 79 20 6d 6f 64 65 2e 20 4e 6f 72 6d 61 |sity mode. Norma| 000005e0 6c 6c 79 20 70 72 69 6e 74 65 72 20 63 68 61 72 |lly printer char| 000005f0 61 63 74 65 72 20 73 65 74 73 20 73 74 61 79 20 |acter sets stay | 00000600 61 72 6f 75 6e 64 20 74 68 65 20 38 0d 64 6f 74 |around the 8.dot| 00000610 73 20 70 65 72 20 63 68 61 72 61 63 74 65 72 20 |s per character | 00000620 77 69 64 74 68 20 72 61 6e 67 65 2e 0d 20 20 20 |width range.. | 00000630 49 20 64 65 63 69 64 65 64 20 74 6f 20 6c 69 6d |I decided to lim| 00000640 69 74 20 65 61 63 68 20 63 68 61 72 61 63 74 65 |it each characte| 00000650 72 20 74 6f 20 38 20 64 6f 74 73 20 77 69 64 74 |r to 8 dots widt| 00000660 68 20 73 69 6e 63 65 20 74 68 69 73 20 73 65 65 |h since this see| 00000670 6d 73 0d 61 6d 70 6c 65 20 77 69 64 74 68 20 74 |ms.ample width t| 00000680 6f 20 6d 65 2c 20 69 74 20 69 73 20 61 6c 73 6f |o me, it is also| 00000690 20 66 61 6d 69 6c 61 72 20 61 73 20 74 68 65 20 | familar as the | 000006a0 42 42 43 20 63 68 61 72 61 63 74 65 72 73 20 61 |BBC characters a| 000006b0 72 65 20 65 61 63 68 20 38 0d 62 69 74 73 20 77 |re each 8.bits w| 000006c0 69 64 65 20 61 6e 64 20 69 74 27 73 20 65 61 73 |ide and it's eas| 000006d0 69 65 72 20 74 6f 20 70 72 6f 67 72 61 6d 21 20 |ier to program! | 000006e0 2d 20 31 20 62 79 74 65 20 69 73 20 38 20 62 69 |- 1 byte is 8 bi| 000006f0 74 73 2e 0d 20 20 20 45 61 63 68 20 70 6f 69 6e |ts.. Each poin| 00000700 74 20 6f 6e 20 62 6f 74 68 20 74 68 65 20 42 42 |t on both the BB| 00000710 43 20 61 6e 64 20 70 72 69 6e 74 65 72 20 69 73 |C and printer is| 00000720 20 65 69 74 68 65 72 20 6f 6e 20 6f 72 20 6f 66 | either on or of| 00000730 66 2c 20 31 20 6f 72 20 30 20 2d 0d 74 72 61 64 |f, 1 or 0 -.trad| 00000740 69 74 69 6f 6e 61 6c 20 62 69 6e 61 72 79 2e 20 |itional binary. | 00000750 57 68 65 6e 20 73 74 6f 72 69 6e 67 20 74 68 65 |When storing the| 00000760 20 63 68 61 72 61 63 74 65 72 73 20 65 61 63 68 | characters each| 00000770 20 70 6f 69 6e 74 20 63 6f 75 6c 64 20 68 61 76 | point could hav| 00000780 65 0d 62 65 65 6e 20 67 69 76 65 6e 20 61 20 62 |e.been given a b| 00000790 79 74 65 20 6f 66 20 69 74 27 73 20 6f 77 6e 2c |yte of it's own,| 000007a0 20 74 68 69 73 20 77 6f 75 6c 64 20 68 61 76 65 | this would have| 000007b0 20 6e 65 65 64 65 64 20 38 2a 38 2a 28 33 32 2d | needed 8*8*(32-| 000007c0 31 32 36 29 3d 36 30 31 36 0d 62 79 74 65 73 2e |126)=6016.bytes.| 000007d0 20 28 20 33 32 20 62 65 69 6e 67 20 74 68 65 20 | ( 32 being the | 000007e0 6d 69 6e 69 6d 75 6d 20 63 68 61 72 61 63 74 65 |minimum characte| 000007f0 72 20 76 61 6c 75 65 20 61 6e 64 20 31 32 36 20 |r value and 126 | 00000800 62 65 69 6e 67 20 74 68 65 20 6d 61 78 69 6d 75 |being the maximu| 00000810 6d 29 2e 0d 54 68 69 73 20 73 65 65 6d 65 64 20 |m)..This seemed | 00000820 61 20 62 69 74 20 65 78 74 72 61 76 61 67 61 6e |a bit extravagan| 00000830 74 20 6f 6e 20 6d 65 6d 6f 72 79 20 73 69 6e 63 |t on memory sinc| 00000840 65 20 6f 6e 6c 79 20 61 6e 20 65 69 67 68 74 68 |e only an eighth| 00000850 20 6f 66 20 65 61 63 68 20 62 79 74 65 0d 77 6f | of each byte.wo| 00000860 75 6c 64 20 62 65 20 75 73 65 64 20 61 6e 64 20 |uld be used and | 00000870 74 68 65 20 62 79 74 65 73 20 77 6f 75 6c 64 20 |the bytes would | 00000880 68 61 76 65 20 74 6f 20 62 65 20 63 6f 6e 76 65 |have to be conve| 00000890 72 74 65 64 20 69 6e 74 6f 20 62 69 74 20 66 6f |rted into bit fo| 000008a0 72 6d 20 66 6f 72 0d 62 6f 74 68 20 74 68 65 20 |rm for.both the | 000008b0 70 72 69 6e 74 65 72 20 61 6e 64 20 42 42 43 20 |printer and BBC | 000008c0 74 6f 20 75 73 65 2e 20 53 6f 20 65 61 63 68 20 |to use. So each | 000008d0 6c 69 6e 65 20 6f 66 20 64 6f 74 73 20 69 73 20 |line of dots is | 000008e0 72 65 70 72 65 73 65 6e 74 65 64 20 62 79 20 31 |represented by 1| 000008f0 0d 62 79 74 65 20 73 6f 20 6f 6e 6c 79 20 38 2a |.byte so only 8*| 00000900 28 33 32 2d 31 32 36 29 3d 37 35 32 20 62 79 74 |(32-126)=752 byt| 00000910 65 73 20 61 72 65 20 6e 65 65 64 65 64 2e 0d 20 |es are needed.. | 00000920 20 20 54 68 65 20 42 42 43 27 73 20 63 6c 65 61 | The BBC's clea| 00000930 72 20 63 68 61 72 61 63 74 65 72 20 73 65 74 20 |r character set | 00000940 73 74 65 6d 73 20 66 72 6f 6d 20 74 68 65 20 66 |stems from the f| 00000950 61 63 74 20 74 68 61 74 20 69 74 27 73 20 63 68 |act that it's ch| 00000960 61 72 61 63 74 65 72 73 0d 75 73 65 72 20 32 20 |aracters.user 2 | 00000970 76 65 72 74 69 63 61 6c 20 72 6f 77 73 20 77 68 |vertical rows wh| 00000980 65 72 65 20 6f 66 74 65 6e 20 6f 6e 65 20 77 69 |ere often one wi| 00000990 6c 6c 20 64 6f 20 28 20 79 6f 75 20 63 61 6e 20 |ll do ( you can | 000009a0 73 65 65 20 74 68 69 73 20 66 6f 72 0d 79 6f 75 |see this for.you| 000009b0 72 73 65 6c 66 20 62 79 20 65 78 61 6d 69 6e 69 |rself by examini| 000009c0 6e 67 20 61 6e 79 20 63 68 61 72 61 63 74 65 72 |ng any character| 000009d0 20 6f 6e 20 74 68 65 20 45 64 69 74 69 6e 67 20 | on the Editing | 000009e0 67 72 69 64 20 61 66 74 65 72 20 73 65 74 74 69 |grid after setti| 000009f0 6e 67 20 69 74 0d 74 6f 20 64 65 66 61 75 6c 74 |ng it.to default| 00000a00 29 2e 20 4d 61 6e 79 20 63 6f 6d 70 75 74 65 72 |). Many computer| 00000a10 73 20 61 6e 64 20 6d 6f 73 74 20 70 72 69 6e 74 |s and most print| 00000a20 65 72 73 20 6f 6e 6c 79 20 75 73 65 20 6f 6e 65 |ers only use one| 00000a30 20 72 6f 77 2c 20 74 68 69 73 0d 6d 65 61 6e 73 | row, this.means| 00000a40 20 74 68 61 74 20 69 66 20 79 6f 75 20 75 73 65 | that if you use| 00000a50 20 74 68 65 20 42 42 43 20 63 68 61 72 61 63 74 | the BBC charact| 00000a60 65 72 20 73 65 74 20 64 69 72 65 63 74 6c 79 20 |er set directly | 00000a70 77 69 74 68 20 74 68 65 20 70 72 69 6e 74 65 72 |with the printer| 00000a80 20 28 0d 65 2e 67 2e 20 73 65 74 20 61 6c 6c 20 | (.e.g. set all | 00000a90 63 68 61 72 61 63 74 65 72 73 20 74 6f 20 64 65 |characters to de| 00000aa0 66 61 75 6c 74 20 61 6e 64 20 63 6f 6d 70 69 6c |fault and compil| 00000ab0 65 20 29 20 74 68 65 20 63 68 61 72 61 63 74 65 |e ) the characte| 00000ac0 72 73 20 74 68 61 74 0d 61 70 70 65 61 72 20 6f |rs that.appear o| 00000ad0 6e 20 74 68 65 20 70 72 69 6e 74 65 72 20 77 69 |n the printer wi| 00000ae0 6c 6c 20 61 70 70 65 61 72 20 74 6f 20 62 69 67 |ll appear to big| 00000af0 20 74 6f 20 72 65 63 74 69 66 79 20 74 68 69 73 | to rectify this| 00000b00 20 6a 75 73 74 20 22 74 72 69 6d 22 20 74 68 65 | just "trim" the| 00000b10 0d 63 68 61 72 61 63 74 65 72 73 2e 0d 20 20 20 |.characters.. | 00000b20 41 74 20 74 68 69 73 20 70 6f 69 6e 74 20 74 68 |At this point th| 00000b30 69 6e 67 73 20 73 65 65 6d 20 71 75 69 74 65 20 |ings seem quite | 00000b40 73 61 74 69 73 66 61 63 74 6f 72 79 2c 20 65 61 |satisfactory, ea| 00000b50 63 68 20 63 68 61 72 61 63 74 65 72 20 69 73 20 |ch character is | 00000b60 73 74 6f 72 65 64 0d 61 73 20 38 20 62 79 74 65 |stored.as 8 byte| 00000b70 73 20 65 61 63 68 20 75 73 69 6e 67 20 38 20 62 |s each using 8 b| 00000b80 69 74 73 2c 20 74 68 65 20 42 42 43 20 65 78 70 |its, the BBC exp| 00000b90 65 63 74 73 20 63 68 61 72 61 63 74 65 72 73 20 |ects characters | 00000ba0 6d 61 64 65 20 6f 66 20 38 20 62 79 74 65 73 0d |made of 8 bytes.| 00000bb0 77 69 74 68 20 61 6c 6c 20 38 20 62 69 74 73 20 |with all 8 bits | 00000bc0 75 73 65 64 2c 20 74 68 65 20 70 72 69 6e 74 65 |used, the printe| 00000bd0 72 20 65 78 70 65 63 74 73 20 31 20 62 79 74 65 |r expects 1 byte| 00000be0 20 28 20 38 20 62 69 74 73 20 29 20 6f 66 20 64 | ( 8 bits ) of d| 00000bf0 61 74 61 20 66 6f 72 0d 65 61 63 68 20 72 6f 77 |ata for.each row| 00000c00 20 6f 66 20 72 6f 74 73 20 61 6e 64 20 38 20 72 | of rots and 8 r| 00000c10 6f 77 73 20 61 72 65 20 6e 65 65 64 65 64 20 66 |ows are needed f| 00000c20 6f 72 20 61 20 63 68 61 72 61 63 74 65 72 2e 20 |or a character. | 00000c30 42 55 54 20 74 68 65 20 70 72 69 6e 74 65 72 0d |BUT the printer.| 00000c40 65 78 70 65 63 74 73 20 65 61 63 68 20 62 79 74 |expects each byt| 00000c50 65 20 74 6f 20 72 65 70 72 65 73 65 6e 74 20 31 |e to represent 1| 00000c60 20 72 6f 77 20 6f 66 20 76 65 72 74 69 63 61 6c | row of vertical| 00000c70 20 64 6f 74 73 20 61 6e 64 20 74 68 65 20 42 42 | dots and the BB| 00000c80 43 20 65 78 70 65 63 74 73 0d 6f 6e 65 20 62 79 |C expects.one by| 00000c90 74 65 20 74 6f 20 72 65 70 72 65 73 65 6e 74 20 |te to represent | 00000ca0 31 20 72 6f 77 20 6f 66 20 68 6f 72 69 7a 6f 6e |1 row of horizon| 00000cb0 74 61 6c 20 64 6f 74 73 2e 0d 20 20 20 49 20 6f |tal dots.. I o| 00000cc0 70 74 65 64 20 74 6f 20 73 74 6f 72 65 20 74 68 |pted to store th| 00000cd0 65 20 63 68 61 72 61 63 74 65 72 73 20 69 6e 20 |e characters in | 00000ce0 76 65 72 74 69 63 61 6c 20 66 6f 72 6d 2c 20 65 |vertical form, e| 00000cf0 2e 67 2e 20 74 68 65 20 77 61 79 20 74 68 65 0d |.g. the way the.| 00000d00 70 72 69 6e 74 65 72 20 65 78 70 65 63 74 65 64 |printer expected| 00000d10 20 74 68 65 6d 2e 20 54 68 69 73 20 6d 61 64 65 | them. This made| 00000d20 20 6e 6f 20 64 69 66 66 65 72 65 6e 63 65 20 74 | no difference t| 00000d30 6f 20 74 68 65 20 6f 70 65 72 61 74 69 6f 6e 20 |o the operation | 00000d40 6f 66 20 74 68 65 0d 67 72 69 64 20 62 75 74 20 |of the.grid but | 00000d50 77 61 73 20 61 20 70 72 6f 62 6c 65 6d 20 66 6f |was a problem fo| 00000d60 72 20 74 68 65 20 55 44 47 20 64 69 73 70 6c 61 |r the UDG displa| 00000d70 79 20 74 6f 20 74 68 65 20 6c 65 66 74 20 6f 66 |y to the left of| 00000d80 20 74 68 65 20 67 72 69 64 2e 20 41 74 0d 66 69 | the grid. At.fi| 00000d90 72 73 74 20 49 20 63 6f 6e 76 65 72 74 65 64 20 |rst I converted | 00000da0 74 68 65 20 63 68 61 72 61 63 74 65 72 73 20 66 |the characters f| 00000db0 72 6f 6d 20 70 72 69 6e 74 65 72 20 66 6f 72 6d |rom printer form| 00000dc0 61 74 20 74 6f 20 42 42 43 20 66 6f 72 6d 61 74 |at to BBC format| 00000dd0 20 75 73 69 6e 67 0d 42 41 53 49 43 20 62 75 74 | using.BASIC but| 00000de0 20 74 68 69 73 20 77 61 73 20 61 20 20 76 65 72 | this was a ver| 00000df0 79 20 20 73 6c 6f 77 20 20 70 72 6f 63 65 73 73 |y slow process| 00000e00 2e 20 20 54 6f 20 73 70 65 65 64 20 74 68 69 6e |. To speed thin| 00000e10 67 73 20 75 70 20 49 20 77 72 6f 74 65 0d 74 68 |gs up I wrote.th| 00000e20 65 20 6d 61 63 68 69 6e 65 20 63 6f 64 65 20 72 |e machine code r| 00000e30 6f 75 74 69 6e 65 20 73 65 74 5f 75 70 5f 75 64 |outine set_up_ud| 00000e40 67 2e 20 57 68 65 6e 20 65 6e 74 65 72 65 64 20 |g. When entered | 00000e50 74 68 65 20 41 20 72 65 67 69 73 74 65 72 20 69 |the A register i| 00000e60 73 20 73 65 74 0d 74 6f 20 74 68 65 20 63 68 61 |s set.to the cha| 00000e70 72 61 63 74 65 72 20 74 6f 20 62 65 20 63 6f 6e |racter to be con| 00000e80 76 65 72 74 65 64 2e 20 54 68 65 20 70 72 6f 67 |verted. The prog| 00000e90 72 61 6d 20 74 68 65 6e 20 75 73 65 73 20 61 20 |ram then uses a | 00000ea0 73 65 72 69 65 73 20 6f 66 20 6d 61 73 6b 73 0d |series of masks.| 00000eb0 74 6f 20 63 68 61 6e 67 65 20 76 65 72 74 69 63 |to change vertic| 00000ec0 61 6c 20 74 6f 20 68 6f 72 69 7a 6f 6e 74 61 6c |al to horizontal| 00000ed0 20 61 6e 64 20 70 72 65 73 65 6e 74 20 74 68 65 | and present the| 00000ee0 20 66 69 6e 61 6c 20 64 65 66 69 6e 69 74 69 6f | final definitio| 00000ef0 6e 20 69 6e 0d 63 68 61 72 61 63 74 65 72 20 31 |n in.character 1| 00000f00 33 30 2e 20 28 20 54 68 65 20 6d 65 6e 75 20 6f |30. ( The menu o| 00000f10 70 74 69 6f 6e 20 22 47 69 76 65 20 73 65 74 74 |ption "Give sett| 00000f20 69 6e 67 20 66 6f 72 20 55 44 47 22 20 61 63 74 |ing for UDG" act| 00000f30 75 61 6c 6c 79 20 63 61 6c 6c 73 0d 74 68 69 73 |ually calls.this| 00000f40 20 72 6f 75 74 69 6e 65 2c 20 62 75 74 20 69 67 | routine, but ig| 00000f50 6e 6f 72 65 73 20 77 68 61 74 20 69 73 20 64 65 |nores what is de| 00000f60 66 69 6e 65 64 20 69 6e 20 43 48 52 24 20 31 33 |fined in CHR$ 13| 00000f70 30 2c 20 69 6e 73 74 65 61 64 20 69 74 20 72 65 |0, instead it re| 00000f80 61 64 73 0d 66 72 6f 6d 20 74 68 65 20 72 6f 75 |ads.from the rou| 00000f90 74 69 6e 65 73 20 6f 77 6e 20 64 61 74 61 20 62 |tines own data b| 00000fa0 6c 6f 63 6b 2e 29 0d 20 20 20 54 68 65 20 6f 74 |lock.). The ot| 00000fb0 68 65 72 20 6d 61 63 68 69 6e 65 20 63 6f 64 65 |her machine code| 00000fc0 20 72 6f 75 74 69 6e 65 73 20 77 65 72 65 20 77 | routines were w| 00000fd0 72 69 74 74 65 6e 20 65 69 74 68 65 72 20 74 6f |ritten either to| 00000fe0 20 73 70 65 65 64 20 75 70 20 74 68 65 0d 70 72 | speed up the.pr| 00000ff0 6f 67 72 61 6d 20 28 20 73 65 74 5f 75 70 5f 75 |ogram ( set_up_u| 00001000 64 67 20 61 6e 64 20 66 69 6c 6c 5f 62 6f 78 20 |dg and fill_box | 00001010 29 20 6f 72 20 62 65 63 61 75 73 65 20 49 20 74 |) or because I t| 00001020 68 6f 75 67 68 20 69 74 20 77 6f 75 6c 64 20 62 |hough it would b| 00001030 65 0d 65 61 73 69 65 72 20 74 6f 20 77 72 69 74 |e.easier to writ| 00001040 65 20 74 68 65 6d 20 69 6e 20 6d 61 63 68 69 6e |e them in machin| 00001050 65 20 63 6f 64 65 20 28 20 67 65 74 5f 64 65 66 |e code ( get_def| 00001060 61 75 6c 74 20 61 6e 64 20 74 68 65 20 6d 6f 76 |ault and the mov| 00001070 65 20 67 72 69 64 0d 72 6f 75 74 69 6e 65 73 20 |e grid.routines | 00001080 29 2e 20 4c 6f 63 61 74 65 5f 63 68 61 72 20 69 |). Locate_char i| 00001090 73 20 74 68 65 20 65 78 63 65 70 74 69 6f 6e 2c |s the exception,| 000010a0 20 69 74 20 77 61 73 20 77 72 69 74 74 65 6e 20 | it was written | 000010b0 74 6f 20 61 6c 6c 6f 77 20 74 68 65 0d 6f 74 68 |to allow the.oth| 000010c0 65 72 20 72 6f 75 74 69 6e 65 73 20 74 6f 20 66 |er routines to f| 000010d0 69 6e 64 20 74 68 65 20 63 68 61 72 61 63 74 65 |ind the characte| 000010e0 72 20 74 68 65 79 20 77 61 6e 74 2e 20 54 68 65 |r they want. The| 000010f0 20 73 61 6d 65 20 63 6f 64 65 20 68 61 73 20 61 | same code has a| 00001100 6c 73 6f 0d 62 65 65 6e 20 69 6e 63 6c 75 64 65 |lso.been include| 00001110 64 20 69 6e 20 61 20 73 6c 69 67 68 74 6c 79 20 |d in a slightly | 00001120 64 69 66 66 65 72 65 6e 74 20 66 6f 72 6d 20 69 |different form i| 00001130 6e 20 74 68 65 20 54 72 61 70 20 70 72 6f 67 72 |n the Trap progr| 00001140 61 6d 2e 0d 20 20 20 54 68 65 20 45 64 69 74 6f |am.. The Edito| 00001150 72 20 70 72 6f 67 72 61 6d 20 69 74 73 65 6c 66 |r program itself| 00001160 20 20 69 73 20 20 61 20 73 65 72 69 65 73 20 6f | is a series o| 00001170 66 20 70 72 6f 63 65 64 75 72 65 20 62 6c 6f 63 |f procedure bloc| 00001180 6b 73 2e 20 53 6f 6d 65 20 6f 66 0d 74 68 65 20 |ks. Some of.the | 00001190 6f 70 74 69 6f 6e 73 20 70 72 6f 76 69 64 65 64 |options provided| 000011a0 20 62 79 20 74 68 65 20 66 75 6e 63 74 69 6f 6e | by the function| 000011b0 20 6b 65 79 73 20 69 6e 20 74 68 65 20 65 64 69 | keys in the edi| 000011c0 74 6f 72 20 68 61 76 65 20 73 69 6d 69 6c 61 72 |tor have similar| 000011d0 0d 66 75 6e 63 74 69 6f 6e 73 20 65 2e 67 2e 20 |.functions e.g. | 000011e0 66 6c 69 70 20 61 6e 64 20 72 65 76 65 72 73 65 |flip and reverse| 000011f0 20 76 65 72 74 69 63 61 6c 6c 79 2c 20 69 6e 20 | vertically, in | 00001200 73 75 63 68 20 63 61 73 65 73 20 49 20 68 61 76 |such cases I hav| 00001210 65 20 62 65 65 6e 0d 61 62 6c 65 20 74 6f 20 77 |e been.able to w| 00001220 72 69 74 65 20 6f 6e 65 20 70 72 6f 63 65 64 75 |rite one procedu| 00001230 72 65 20 66 6f 72 20 72 65 76 65 72 73 69 6e 67 |re for reversing| 00001240 20 6f 6e 65 20 6c 69 6e 65 20 77 68 69 63 68 20 | one line which | 00001250 69 73 20 74 68 65 6e 20 75 73 65 64 20 62 79 0d |is then used by.| 00001260 62 6f 74 68 20 72 65 76 65 72 73 65 20 76 65 72 |both reverse ver| 00001270 74 69 63 61 6c 6c 79 20 61 6e 64 20 66 6c 69 70 |tically and flip| 00001280 2e 0d 20 20 20 54 6f 20 61 63 63 65 73 73 20 65 |.. To access e| 00001290 61 63 68 20 63 68 61 72 61 63 74 65 72 20 6d 61 |ach character ma| 000012a0 74 72 69 78 20 34 20 72 6f 75 74 69 6e 65 73 20 |trix 4 routines | 000012b0 61 72 65 20 75 73 65 64 2e 0d 50 52 4f 43 70 6f |are used..PROCpo| 000012c0 6b 65 28 63 68 61 72 2c 78 2c 79 2c 76 61 6c 75 |ke(char,x,y,valu| 000012d0 65 29 20 61 6e 64 20 46 4e 70 65 65 6b 28 63 68 |e) and FNpeek(ch| 000012e0 61 72 2c 78 2c 79 29 20 77 6f 72 6b 20 77 69 74 |ar,x,y) work wit| 000012f0 68 20 69 6e 64 69 76 69 64 75 61 6c 20 62 69 74 |h individual bit| 00001300 73 0d 6f 66 20 61 20 63 68 61 72 61 63 74 65 72 |s.of a character| 00001310 2e 20 63 68 61 72 20 67 69 76 65 73 20 74 68 65 |. char gives the| 00001320 20 63 68 61 72 61 63 74 65 72 20 74 6f 20 62 65 | character to be| 00001330 20 65 66 66 65 63 74 65 64 2c 20 78 20 61 6e 64 | effected, x and| 00001340 20 79 20 67 69 76 65 0d 69 74 27 73 20 70 6f 73 | y give.it's pos| 00001350 69 74 69 6f 6e 20 61 6e 64 20 76 61 6c 75 65 20 |ition and value | 00001360 64 65 6e 6f 74 65 73 20 69 66 20 69 74 20 69 73 |denotes if it is| 00001370 20 74 6f 20 62 65 20 63 6c 65 61 72 65 64 2c 20 | to be cleared, | 00001380 73 65 74 20 6f 72 20 72 65 76 65 72 73 65 64 2e |set or reversed.| 00001390 0d 54 68 65 20 6f 74 68 65 72 20 74 77 6f 20 72 |.The other two r| 000013a0 6f 75 74 69 6e 65 73 20 6f 70 65 72 61 74 65 20 |outines operate | 000013b0 6f 6e 20 77 68 6f 6c 65 20 76 65 72 74 69 63 61 |on whole vertica| 000013c0 6c 20 72 6f 77 73 2c 20 69 6e 20 74 68 69 73 20 |l rows, in this | 000013d0 63 61 73 65 20 74 68 65 20 79 0d 63 6f 2d 6f 72 |case the y.co-or| 000013e0 64 69 6e 61 74 65 20 69 73 20 6e 6f 74 20 6e 65 |dinate is not ne| 000013f0 65 64 65 64 2c 20 74 68 65 79 20 61 72 65 20 50 |eded, they are P| 00001400 52 4f 43 72 6f 77 5f 70 6f 6b 65 28 63 68 61 72 |ROCrow_poke(char| 00001410 2c 78 2c 76 61 6c 75 65 29 20 61 6e 64 0d 46 4e |,x,value) and.FN| 00001420 72 6f 77 5f 70 65 65 6b 28 63 68 61 72 2c 78 29 |row_peek(char,x)| 00001430 2e 20 20 42 79 20 66 6f 72 63 69 6e 67 20 61 6c |. By forcing al| 00001440 6c 20 70 72 6f 63 65 64 75 72 65 73 20 74 6f 20 |l procedures to | 00001450 61 63 63 65 73 73 20 74 68 65 20 67 72 69 64 20 |access the grid | 00001460 74 68 6f 75 67 68 0d 74 68 65 73 65 20 34 20 72 |though.these 4 r| 00001470 6f 75 74 69 6e 65 73 20 67 72 65 61 74 20 66 6c |outines great fl| 00001480 65 78 69 62 69 6c 69 74 79 20 69 73 20 67 61 69 |exibility is gai| 00001490 6e 65 64 2e 0d 0d 20 20 20 20 20 20 20 54 68 65 |ned... The| 000014a0 20 54 72 61 70 20 50 72 6f 67 72 61 6d 0d 20 20 | Trap Program. | 000014b0 20 41 6c 74 68 6f 75 67 68 20 68 65 6c 64 20 69 | Although held i| 000014c0 6e 73 69 64 65 20 74 68 65 20 65 64 69 74 6f 72 |nside the editor| 000014d0 20 70 72 6f 67 72 61 6d 20 61 6e 64 20 61 73 73 | program and ass| 000014e0 65 6d 62 6c 65 64 20 74 68 65 72 65 20 54 72 61 |embled there Tra| 000014f0 70 20 28 0d 61 73 73 65 6d 62 6c 65 64 20 62 79 |p (.assembled by| 00001500 20 46 4e 61 73 73 65 6d 62 6c 65 5f 74 72 61 70 | FNassemble_trap| 00001510 20 29 20 69 73 20 61 63 74 75 61 6c 6c 79 20 20 | ) is actually | 00001520 61 20 20 73 65 70 61 72 61 74 65 20 20 70 72 6f |a separate pro| 00001530 67 72 61 6d 2e 20 20 54 72 61 70 0d 69 74 73 65 |gram. Trap.itse| 00001540 6c 66 20 69 73 20 6c 65 73 73 20 74 68 65 20 20 |lf is less the | 00001550 32 35 36 20 62 79 74 65 73 20 6c 6f 6e 67 20 62 |256 bytes long b| 00001560 75 74 20 64 61 74 61 20 66 6f 72 20 65 61 63 68 |ut data for each| 00001570 20 66 6f 6e 74 20 74 61 6b 65 73 20 74 68 65 0d | font takes the.| 00001580 6c 65 6e 67 74 68 20 6f 66 20 74 68 65 20 66 69 |length of the fi| 00001590 6c 65 20 75 70 74 6f 20 31 32 38 30 20 62 79 74 |le upto 1280 byt| 000015a0 65 73 2e 0d 20 20 20 57 68 65 6e 20 54 72 61 70 |es.. When Trap| 000015b0 20 68 61 73 20 62 65 65 6e 20 22 63 6f 6d 70 69 | has been "compi| 000015c0 6c 65 64 22 20 69 6e 74 6f 20 61 20 66 69 6c 65 |led" into a file| 000015d0 20 6f 66 20 69 74 27 73 20 6f 77 6e 20 69 74 20 | of it's own it | 000015e0 69 73 20 61 20 73 65 70 61 72 61 74 65 0d 70 72 |is a separate.pr| 000015f0 6f 67 72 61 6d 2e 20 57 68 65 6e 20 63 61 6c 6c |ogram. When call| 00001600 65 64 20 75 70 20 62 79 20 69 74 27 73 20 66 69 |ed up by it's fi| 00001610 6c 65 20 6e 61 6d 65 20 69 74 20 74 61 6b 65 73 |le name it takes| 00001620 20 63 6f 6e 74 72 6f 6c 20 6f 66 20 74 68 65 20 | control of the | 00001630 4f 53 57 52 43 48 0d 76 65 63 74 6f 72 20 57 52 |OSWRCH.vector WR| 00001640 43 48 56 20 2d 20 77 61 74 63 68 20 66 6f 72 20 |CHV - watch for | 00001650 61 6e 79 20 52 4f 4d 73 20 6f 72 20 6f 74 68 65 |any ROMs or othe| 00001660 72 20 75 74 69 6c 69 74 69 65 73 20 74 68 61 74 |r utilities that| 00001670 20 74 72 79 20 74 6f 20 64 6f 20 74 68 69 73 0d | try to do this.| 00001680 62 65 66 6f 72 65 20 6f 72 20 65 73 70 65 63 69 |before or especi| 00001690 61 6c 6c 79 20 61 66 74 65 72 20 54 72 61 70 20 |ally after Trap | 000016a0 68 61 73 20 62 65 65 6e 20 72 75 6e 20 2d 20 61 |has been run - a| 000016b0 20 63 72 61 73 68 20 63 6f 75 6c 64 20 6f 63 63 | crash could occ| 000016c0 75 72 65 2e 0d 20 20 20 4f 6e 63 65 20 54 72 61 |ure.. Once Tra| 000016d0 70 20 68 61 73 20 63 6f 6e 74 72 6f 6c 20 6f 66 |p has control of| 000016e0 20 57 52 43 48 56 20 69 74 20 63 65 6e 73 6f 72 | WRCHV it censor| 000016f0 73 20 61 6c 6c 20 63 68 61 72 61 63 74 65 72 73 |s all characters| 00001700 20 6f 75 74 70 75 74 65 64 2e 20 49 66 0d 74 68 | outputed. If.th| 00001710 65 20 70 72 69 6e 74 65 72 20 69 73 20 6e 6f 74 |e printer is not| 00001720 20 61 63 74 69 76 65 20 6e 6f 74 68 69 6e 67 20 | active nothing | 00001730 68 61 70 70 65 6e 73 20 62 75 74 20 6f 6e 63 65 |happens but once| 00001740 20 74 68 65 20 70 72 69 6e 74 65 72 20 69 73 0d | the printer is.| 00001750 73 77 69 74 63 68 65 64 20 6f 6e 20 77 69 74 68 |switched on with| 00001760 20 56 44 55 20 32 20 74 72 61 70 20 63 6f 6d 65 | VDU 2 trap come| 00001770 73 20 74 6f 20 6c 69 66 65 2e 20 46 69 72 73 74 |s to life. First| 00001780 6c 79 20 69 74 20 63 65 6e 73 6f 72 73 20 61 6c |ly it censors al| 00001790 6c 0d 63 68 61 72 61 63 74 65 72 73 20 73 65 6e |l.characters sen| 000017a0 74 20 74 6f 20 74 68 65 20 70 72 69 6e 74 65 72 |t to the printer| 000017b0 2c 20 74 68 6f 75 67 68 20 74 68 65 20 75 73 65 |, though the use| 000017c0 20 6f 66 20 2a 46 58 20 33 20 6f 75 74 70 75 74 | of *FX 3 output| 000017d0 20 63 6f 6e 74 69 6e 75 65 73 0d 74 6f 20 74 68 | continues.to th| 000017e0 65 20 73 63 72 65 65 6e 20 61 73 20 6e 6f 72 6d |e screen as norm| 000017f0 61 6c 20 77 68 69 6c 65 20 74 68 65 20 70 72 69 |al while the pri| 00001800 6e 74 65 72 20 69 73 20 73 65 6e 74 20 74 68 65 |nter is sent the| 00001810 20 73 70 65 63 69 61 6c 20 66 6f 6e 74 0d 63 68 | special font.ch| 00001820 61 72 61 63 74 65 72 73 2e 20 49 66 20 74 68 65 |aracters. If the| 00001830 20 73 70 65 63 69 61 6c 20 66 6f 6e 74 20 63 68 | special font ch| 00001840 61 72 61 63 74 65 72 73 20 77 65 72 65 20 74 6f |aracters were to| 00001850 20 62 65 20 64 69 73 70 6c 61 79 65 64 20 6f 6e | be displayed on| 00001860 20 74 68 65 0d 42 42 43 27 73 20 73 63 72 65 65 | the.BBC's scree| 00001870 6e 20 61 6e 79 74 68 69 6e 67 20 63 6f 75 6c 64 |n anything could| 00001880 20 6f 63 63 75 72 20 74 6f 20 74 68 65 20 64 69 | occur to the di| 00001890 73 70 6c 61 79 2e 0d 20 20 20 42 65 66 6f 72 65 |splay.. Before| 000018a0 20 65 61 63 68 20 73 65 74 20 6f 66 20 66 6f 6e | each set of fon| 000018b0 74 20 63 6f 64 65 73 20 69 73 20 73 65 6e 74 20 |t codes is sent | 000018c0 74 6f 20 74 68 65 20 70 72 69 6e 74 65 72 20 54 |to the printer T| 000018d0 72 61 70 20 73 65 6e 64 73 20 74 68 65 0d 73 65 |rap sends the.se| 000018e0 71 75 65 6e 63 65 20 56 44 55 20 31 2c 32 37 2c |quence VDU 1,27,| 000018f0 31 2c 37 35 2c 31 2c 38 2c 31 2c 30 2e 20 54 68 |1,75,1,8,1,0. Th| 00001900 69 73 20 6d 65 61 6e 73 2c 20 74 6f 20 61 6e 20 |is means, to an | 00001910 45 70 73 6f 6e 20 63 6f 6d 70 61 74 69 62 6c 65 |Epson compatible| 00001920 0d 70 72 69 6e 74 65 72 20 22 45 78 70 65 63 74 |.printer "Expect| 00001930 20 38 20 62 69 74 73 20 6f 66 20 67 72 61 70 68 | 8 bits of graph| 00001940 69 63 73 20 64 61 74 61 20 66 6f 72 20 73 69 6e |ics data for sin| 00001950 67 6c 65 20 64 65 6e 73 69 74 79 20 70 72 69 6e |gle density prin| 00001960 74 69 6e 67 2e 22 20 49 66 0d 74 68 65 20 37 35 |ting." If.the 75| 00001970 20 69 73 20 63 68 61 6e 67 65 64 20 74 6f 20 61 | is changed to a| 00001980 20 37 36 20 74 68 65 6e 20 64 6f 75 62 6c 65 20 | 76 then double | 00001990 64 65 6e 73 69 74 79 20 69 73 20 75 73 65 64 20 |density is used | 000019a0 66 6f 72 20 74 68 65 20 70 72 69 6e 74 69 6e 67 |for the printing| 000019b0 20 6f 66 0d 65 61 63 68 20 63 68 61 72 61 63 74 | of.each charact| 000019c0 65 72 2e 20 28 20 46 4e 61 73 73 65 6d 62 6c 65 |er. ( FNassemble| 000019d0 5f 74 72 61 70 20 68 61 73 20 61 20 72 65 6d 61 |_trap has a rema| 000019e0 72 6b 20 69 6e 20 74 68 65 20 72 69 67 68 74 20 |rk in the right | 000019f0 70 6c 61 63 65 20 69 66 20 79 6f 75 0d 77 69 73 |place if you.wis| 00001a00 68 20 74 6f 20 63 68 61 6e 67 65 20 74 68 69 73 |h to change this| 00001a10 20 2d 20 69 74 27 73 20 77 6f 72 74 68 20 69 74 | - it's worth it| 00001a20 20 6a 75 73 74 20 74 6f 20 73 65 65 20 74 68 65 | just to see the| 00001a30 20 64 69 66 66 65 72 65 6e 63 65 20 29 2e 0d 20 | difference ).. | 00001a40 20 20 49 66 20 79 6f 75 20 70 72 69 6e 74 65 72 | If you printer| 00001a50 20 69 73 20 6e 6f 74 20 45 70 73 6f 6e 20 63 6f | is not Epson co| 00001a60 6d 70 61 74 69 62 6c 65 20 79 6f 75 20 77 69 6c |mpatible you wil| 00001a70 6c 20 68 61 76 65 20 74 6f 20 63 68 61 6e 67 65 |l have to change| 00001a80 20 74 68 69 73 0d 63 6f 6e 74 72 6f 6c 20 73 65 | this.control se| 00001a90 71 75 65 6e 63 65 2e 0d 20 20 20 49 20 68 61 76 |quence.. I hav| 00001aa0 65 20 6e 6f 74 20 62 65 65 6e 20 61 62 6c 65 20 |e not been able | 00001ab0 74 6f 20 74 65 73 74 20 46 6f 6e 74 73 20 6f 6e |to test Fonts on| 00001ac0 20 61 20 4d 61 73 74 65 72 20 62 75 74 2c 20 66 | a Master but, f| 00001ad0 72 6f 6d 20 77 68 61 74 20 49 20 6b 6e 6f 77 0d |rom what I know.| 00001ae0 6f 66 20 74 68 65 20 4d 61 73 74 65 72 20 49 20 |of the Master I | 00001af0 63 61 6e 20 73 65 65 20 6e 6f 20 72 65 61 73 6f |can see no reaso| 00001b00 6e 20 66 6f 72 20 69 74 20 6e 6f 74 20 74 6f 20 |n for it not to | 00001b10 77 6f 72 6b 2e 0d 20 20 20 43 68 6f 6f 73 69 6e |work.. Choosin| 00001b20 67 20 74 68 65 20 6d 65 6d 6f 72 79 20 74 6f 20 |g the memory to | 00001b30 62 65 20 75 73 65 64 20 77 69 6c 6c 20 64 65 70 |be used will dep| 00001b40 65 6e 64 20 6f 6e 20 74 68 65 20 6d 61 63 68 69 |end on the machi| 00001b50 6e 65 20 79 6f 75 20 61 72 65 0d 75 73 69 6e 67 |ne you are.using| 00001b60 20 61 6e 64 20 70 65 72 73 6f 6e 61 6c 20 70 72 | and personal pr| 00001b70 65 66 65 72 65 6e 63 65 2e 20 49 20 75 73 61 6c |eference. I usal| 00001b80 6c 79 20 77 6f 72 64 20 70 72 6f 63 65 73 73 20 |ly word process | 00001b90 69 6e 20 6d 6f 64 65 20 33 2e 20 44 72 61 66 74 |in mode 3. Draft| 00001ba0 0d 63 6f 70 69 65 73 20 63 61 6e 20 62 65 20 70 |.copies can be p| 00001bb0 72 69 6e 74 65 64 20 6f 75 74 20 69 6d 6d 65 64 |rinted out immed| 00001bc0 69 61 74 65 6c 79 20 66 72 6f 6d 20 74 68 69 73 |iately from this| 00001bd0 20 6d 6f 64 65 20 62 75 74 20 69 66 20 49 20 77 | mode but if I w| 00001be0 61 6e 74 20 74 6f 20 75 73 65 0d 61 20 73 70 65 |ant to use.a spe| 00001bf0 63 69 61 6c 20 70 72 6f 67 72 61 6d 20 6c 69 6b |cial program lik| 00001c00 65 20 74 68 69 73 20 6f 6e 65 2c 20 49 20 77 69 |e this one, I wi| 00001c10 6c 6c 20 75 73 61 6c 6c 79 20 73 65 74 20 69 74 |ll usally set it| 00001c20 20 74 6f 20 72 75 6e 20 69 6e 20 74 68 65 0d 6d | to run in the.m| 00001c30 65 6d 6f 72 79 20 6e 6f 72 6d 61 6c 6c 79 20 75 |emory normally u| 00001c40 73 65 64 20 62 79 20 6d 6f 64 65 20 33 2e 20 42 |sed by mode 3. B| 00001c50 65 66 6f 72 65 20 70 72 69 6e 74 69 6e 67 20 49 |efore printing I| 00001c60 20 63 68 61 6e 67 65 20 74 6f 20 6d 6f 64 65 20 | change to mode | 00001c70 37 20 61 6e 64 0d 72 75 6e 20 74 68 65 20 73 70 |7 and.run the sp| 00001c80 65 63 69 61 6c 20 70 72 6f 67 72 61 6d 20 74 68 |ecial program th| 00001c90 65 6e 20 70 72 69 6e 74 20 69 74 2e 0d |en print it..| 00001c9d