Printer Control Codes
04-Nov-90 19:29:39
Sb: #2270-Printer Control Codes
Fm: David Art 72017,1130
To: Lee DeWitt 73577,2202
Lee,
It is possible to bypass the printer driver by opening the printer as an
independent device instead of using the built-in's. Assuming that your
printer is attached to the parallel port, you would open the device "PAR:"
instead of "PRT:". This is covered a little bit in the "Generalized Device
I/O" section of the AmigaBasic manual. (Chapter 5 in my book, pp 5-3 to
5-4.)
You need to specify special characters such as the double-quote in their
CHR$(x) equivalents. From memory, I believe that the doublequote is
CHR$(34), but you can check it.
You're running into the same trouble that printer-driver makers have with
regard to whether the 2 in the manual is an ASCII 2 or CHR$(2). I've worked
with printers where it was both in different commands. Usually, though,
they are ASCII. The only way to find out for certain is to experiment.
Your example string of ESC[2"z would most likely be coded as
CHR$(27);"[2";CHR$(34);"z";
Using a Preferences driver is really the preferred way to use a printer on
the Amiga. Have you checked the Printer Utilities DL (8) in the AmigaUser
Forum for a driver specifically for your KX-P1124? It might pay off.
There also used to be a printer driver generator program for 1.2 printer
drivers, but I don't know whether it was ever updated for 1.3 or not.
Hope this helps. 8)
David