|★ APPLICATIONS ★ DIVERS ★ SIDEWAYS LKS ★|
|Sideways Dump|Your Computer)||Sideways Lks|The Amstrad User)||Sideways Printing|The Amstrad User)|
I was very interested in Mr. Walker's SIDEWAYS program (TAU, June 1987). However, I do not think I could leave the printer running and go to sleep (I distrust anything that moves), so I had a look if the printing could be speeded up.
First of all, his line 1190 docs an enormous amount of processing for each character, and this could be minimized by storing the pattern in a string rather than in a numeric array. A string can contain codes 0 to 255, not only the printables. SIDEWAY0 shows the method, and the timings. Sending the pattern as a string requires only one fifth the time needed to assemble each character just before sending it to the printer. This docs not mean that the overall printing time will be reduced to one fifth, but it should produce a significant saving in time and leave more memory for text.
Most printers now have an area of memory which can be initialized with custom character patterns (the jargon is to "download characters"). When selected by a command, this set can be accessed in the same manner as the usual set, i.e. by sending the printer just the number of the character rather than the 9 bit matrix. I have used this facility in SIDEWAY , but at this point you will need to consult your printer manual to sec whether your printer can be used in this manner, and if so, what the relevant control code sequences are.
Rather than typing in 94 DATA lines with 8 values each, I used the computer character set. The set is transferred to known memory location (just above HIMEM) by invoking SYMBOL AFTER 33 and can be sent to the printer by PEEK and PRINT#8, after the printer is advised to treat the next 9 bytes as the download character of the given number. The computer characters arc stored row-by-row whereas the printer prints column-by-column, so that the charactcrs are already sideways so far as the printer is concerned.
Different printers process the columns differently, so you will need to experiment to get the charactcrs facing the right way (not upside-down or left-to-right). The lack of the 8th bit on the printer port may require the charactcr to be shifted up or down (by c=c/2 or c=c+c). The remarks on the relevant lines should help, but patience will be required.
Some of the copied characters may not be suitable, but they can be replaced by your own design. The downloaded set will remain in the printer memory so long as it is switched on, selected or de-selected by the relevant control sequences, so the set-up program is not needed after initialization. The printer will operate at its normal speed whichever set is selected.