"A closed mouth gathers no feet."
YOUR SECOND GFA BASIC 3.XX MANUAL
- or -
HOW I LEARNED TO STOP WORRYING AND LOVE GFA-BASIC
PART 11
CHAPTER TEN - THE PRINTER
by Han Kempen
Printer ready
If you send data to your printer (HARDCOPY, LPRINT, etc.), your
ST will wait 30 looooooong seconds if the printer happens to be
not ready. Always check if the printer is ready before sending
data to the printer, e.g. by using GEMDOS 17 (Cprnos):
DO
EXIT IF GEMDOS(17)
ALERT 3," Printer| | not ready !!",1," OK ",k
LOOP
HARDCOPY
You can send a screendump to the printer by using the command
HARDCOPY or by pressing <Alternate> <Help>. In both cases you can
abort the screendump by pressing <Alternate> <Help>.
You can use CONTROL.ACC to change the printer-parameters. Don't
forget to save the desktop, otherwise these parameters will not
be stored in the file DESKTOP.INF. Look for '#b' in DESKTOP.INF
if you're curious. The parameters will only be read from
DESKTOP.INF if CONTROL.ACC is installed after a reset! I suggest
the use of XBIOS 33 (Setprt) in a program instead of using
CONTROL.ACC. For a screendump from the High resolution screen to
an Epson-compatible printer, clear bit 1 and set bit 2:
~XBIOS(33,&X100) ! screendump to Epson(-compatible)
printer
HARDCOPY
If you set bit 2, TOS assumes you connected an Epson-printer
(which prints 960 dots/line). Clear bit 2 and TOS assumes you
have an Atari-printer (1280 dots/line). The following table
should look familiar:
bit 0 1
0 matrix-printer daisy wheel
1 monochrome colour
2 1280 dots/line 960 dots/line
3 draft NLQ
4 parallel serial
5 fanfold paper single sheets
If you use HARDCOPY, the width/height ratio of the printout does
not correspond with that of the screen.
It should be possible to send only a (GET-)rectangle to your
printer with XBIOS 36 (Prtblk) or V_OUTPUT_WINDOW (VDI 5,Escape
21). Anybody out there who knows how?
Never, I repeat, never swap disks during a screendump, as this
could be fatal for the new disk. TOS ignores the write-protect
state during a screendump, so it will miss the disk-swap
completely. TOS will use the old FAT for the new disk, and that
usually is fatal (no pun intended).
If you have installed a GFA-Basic printer-driver (e.g.
PTEPSON.PRG), a screendump seems to be impossible. The bit-image
mode of the printer can't be used after the driver has been
installed.
Procedures (CHAPTER.10)
Init_star24 STAR24
This Procedures initializes global variables and Functions that
can be used as commands for a Star LC24-10 (24-dot matrix-
printer). You'll probably need just a few variables/Functions, so
you could delete everything you don't need in your program.
Compare the definitions with your own manual if you have another
printer. Please stick to the proposed names. One of the strong
points of Public Domain GFA-programs is that it's easy to adapt a
program. Or rather, it should be easy. Using the names in this
Procedure is one step in the right direction. To send a command
to your printer you have to LPRINT it (use a semicolon to prevent
an unwanted linefeed):
LPRINT prestige.style$;
LPRINT "This is printed in Prestige style"
LPRINT "This is ";subscript.on$;"a subscript";subscript.off$
LPRINT @lf$(5); ! 5 linefeeds
LPRINT quad.size$;
LPRINT "Quadruple size";normal.size$
LPRINT @epson.special$(5) ! prints a clubs-symbol in
Epson-mode
LPRINT ff$; ! form feed
Screendump SCRNDUMP
Ordinary screendump to an Epson-compatible matrix-printer:
@screendump
Because HARDCOPY is used, the height/width ratio is not correct.
Screendump_atari_laser LASERDMP
Screendump to Atari laser-printer:
@screendump_atari_laser
Screendump_deskjet DESKJDMP
Screendump to a HP Deskjet:
@screendump_deskjet
Screendump_epsonfx80 FX80_DMP
Screendump to an Epson FX-80 (or compatible 9-needle printer):
@screendump_epsonfx80
Reasonably fast and correct height/width ratio.
Screendump_hp_jet HP_DMP
Screendump to HP Laserjet or to HP Deskjet (500/Plus):
@screendump_hp_jet
Screendump_star24 STR24DMP
Screendump to a Star LC24-10 (or compatible 24-needle printer):
@screendump_star24
I don't think a faster screendump is possible. The height/width
ratio is correct and it looks good if the ribbon contains enough
ink.
Screendump_star24_degas STR24DEG
Slow but flexible screendump to a Star LC24-10:
@screendump_star24_degas
The Procedure uses two Degas assembly-routines. You can choose
one of the following formats (in cm): 27x16 18x11 13.5x8.5
9x5.5
Functions (CHAPTER.10)
Printer_ready PRTREADY
Test if printer is ready:
IF @printer_ready
(...) ! send data to the printer
ELSE
(...) ! user doesn't want to print
ENDIF
Disclaimer
The text of the articles is identical to the originals like they appeared
in old ST NEWS issues. Please take into consideration that the author(s)
was (were) a lot younger and less responsible back then. So bad jokes,
bad English, youthful arrogance, insults, bravura, over-crediting and
tastelessness should be taken with at least a grain of salt. Any contact
and/or payment information, as well as deadlines/release dates of any
kind should be regarded as outdated. Due to the fact that these pages are
not actually contained in an Atari executable here, references to scroll
texts, featured demo screens and hidden articles may also be irrelevant.