#printer and BASIC
5 messages in this thread
I just purchased an EPSON L-1000 printer. It works great with my word
processor, etc. Now I am trying to write some BASIC programs and use the
escape sequences to change the font, or make the text bold, etc the printer
just ignores them. The control codes for form feed work. Is there something
other than sending an ESC M for example ? If I try to use one that requires
a parameter such as ESC w 1, it prints the 1. This is my first attempt at
writing BASIC with a printer, give me a CICS COBOL program any day.
Bob,
I was willing to help you until the last line in your message,
concerning CICS COBOL. Now you really have my sympathies! <grin>
The problem you're running into with your printer is that the Amiga uses
a "device driver" to communicate with the printer. This driver knows a
"standard" set of escape sequences that programs use, and translates them
to the specific escape-sequences used by specific printers (as they all
vary). The printer.device doesn't know the sequences you're trying to
send, as you are sending printer-specific codes.
You can solve this problem in one of two ways. The preferred way is to
use the Amiga-standard sequences and let the printer driver translate them
to the specific codes your printer wants to see. A second way, which is
less "Amiga-like" is to open the file "PAR:" (assuming that your printer is
connected to the parallel-port), and send the printer-specific codes to
that file along with whatever text you want printed. This will bypass the
printer.device and write directly to your printer. The biggest drawback to
this approach is that the program will no longer work properly when you get
a different printer (or want to run it on someone else's system).
Hope this helps….
…BobR
Why, no sympathies needed. I live for "EXEC CICS …….. END-EXEC". <grin>
Actually on my current assignment I've been relegated to batch. At least
the system is huge enough to be challenging. I'd forgotten how frustrating
it can be to debug batch vs online where you can watch it. At least they
have some debugging tools that make almost an online environment to test
with.
Thanks alot for the help. I knew about the printer drivers, and assumed
they were part of the 'problem', but wasn't sure exactly how. Now as soon
as I get ahold of an AMIGADOS manual I should be all set. Another trip to
the AMIGA store.
Again thanks, from an experienced mainframer, almost beginner Amiga
programmer.
Bob,
If you are going to access the printer's specific codes then from
Basic you must open the PAR: device. If you use ANSI codes then you use
the PRT: device. If you use the PRT: device and have selected the proper
Amiga printer driver you use the ANSI printer codes. You can find these in
your Amiga documentation of the OS.
Thanks alot for the advice. It should come in most helpful over the next
few weeks as I develop the 3 new systems.