Path: utzoo!mnetor!uunet!mcvax!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.sys.atari.st Subject: Re: how do I print-screen (Alt) on Epson LQ-500/800? Message-ID: <476@philmds.UUCP> Date: 3 May 88 09:37:28 GMT References: <8804281839.AA00314@ucbvax.Berkeley.EDU> Reply-To: leo@philmds.UUCP (L.J.M. de Wit) Organization: Philips I&E DTS Eindhoven Lines: 50 In article <8804281839.AA00314@ucbvax.Berkeley.EDU> SYSTEM@UVPHYS.BITNET (NIK ZAPANTIS) writes: > >I would like to use the print-screen (Alt) feature of the ST for fast >dumps of graphics to an Epson LQ-500 printer. Since the TOS printer driver >is for an Epson fx/mx printer, it does not work with the LQ-500--I guess the >two printers use different esc. sequences for graphics--. >Is there a way to somehow install an LQ-500 driver (in GDOS?) and re-direct >the output thru this driver instead of the default WITHOUT going thru one of >the progrmas that do use such drivers (eg. DEGAS ELITE). >Bear in mind that, although I know how to write a DEGAS printer driver, I have >no information on how to write the driver and install it, so that TOS can >use it. >Is there anyone who could help me solve this problem? Some code in C would be >of great help as well. >[...rest of message deleted...] A few suggestions: 1) Alter the bios, as follows. Save the old bios vector. The new bios vector must point to a function that does the following: a) If the bios function is not conout (3 I guess??) jump to the old vector. b) If the output device is not the printer jump to the old vector. c) Now if the character to be printed is one of the graphic esc. sequences for an Epson fx/mx printer, note this (in variable(s)). Other characters must be printed using the old vector. d) At the end of a graphic sequence (use the variable(s)) you print the corresponding sequence for the LQ-500, using the old vector. You will have to fiddle somewhat here, because you can't use the old vector as a subroutine (having a RTE at the end). Et voila! If you want some more detailed information,I suggest you read the book Tips und Tricks ... from Data Becker; it contains a bios 'redirection' in the way I just described. 2) Catch the Alt-Help combination yourself, by adding a VBL (vertical blank) interrupt. Find an empty slot in the list of vertical blank vectors (a nil pointer). Make it point to a routine of yours that checks on Alt-Help pressed (this info is kept in a system variable, 0x4??). If so, reset this flag and print the screen. There is a problem however: you cannot use bios, being in a interrupt (would cause problems with interrupted bios calls). So you have to do it using I/O addresses and the like: nice and dirty! I've done something similar: I use the Alt-Help for a quick dump of my screen. The program is called FASTDUMP and I'm planning to forward it to the comp.sources.atari.st group. It scans the screen memory and tries to match on the TOS characters. If the character matches, it is send out as an ASCII character to the printer. If not, a space is send (or CR-LF if more appropriate). It is as fast as printing a file (and thus much faster than graphic dumping). It is very nice for programs that do not have a printer option or for catching e.g. the output of a compiler (or printing a page whilst in the editor). It is also suitable for any printer that can do ASCII characters (and which cannot?); only graphics cannot be printed. If you will have a little patience?? leo. P.S.: Now I come to think of it, altering the bios won't help if you use Alt-Help; maybe it does when you use the Print File option? I dunno...