Using The Printer With Basic Programs - Epson 8133 User Manual

New apple ii intelligent parallel interface
Table of Contents

Advertisement

they are on a 40 column screen. When you have finished printing a
listing, use the
PR
#
0 command to switch the output from the printer
back to the screen. Unfortunately this also prints the letters 'PR#O'
after the listing. This can be overcome by pressing the
<CTRL>
and
I
keys together, and then the Y key without holding down the control
key. A syntax error message will be displayed on the screen because
APPLESOFT does not understand the characters as a command; this
will not appear on the printer.
You can also catalog disks onto the printer to have a permanent
record. Simply type
PR#
1 and press
I
RETURN
I .
then type
CATALOG,
with the drive number if necessary and press
I
RETURN
I
again; this is
the same as displaying a catalog on the screen, but the catalog of the
disk will only appear on the printer. In the case of a long directory, it
will be necessary to press a key, in order to display another 'screenful',
and so for the remainder of the catalog to be printed.
USING THE PRINTER WITH BASIC PROGRAMS
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
Apart from producing listings and disk catalogs, the printer has
many other applications. The process of printing on the printer is very
similar to printing on the screen, and this makes printing a
straightforward programming task.
There are many occasions when only a few lines are needed on the
printer, while the main program prints the instructions on the screen.
In order to do this, insert the
PR#
1 command in your program at the
appropriate point to direct output to the printer. When you want output
to cease being printed by the printer, include the
PR#
0 command.
If the program is running under DOS, then there may be times
when the printer does not always become active in response to
PR
#
1.
It is as well to heed the advice of the APPLE DOS MANUAL and
precede the command with a
<CTRL>·D
character or
CHR$(4).
Since
<CTRL>·D
is only active if it is preceded by a carriage return, the
sequence can be added as part of a
PRINT
statement ( or as the actual
ASCII codes for the characters), as illustrated in the following
program. If you are using ProDOS you should NOT use the carriage
return as well as the
<CTRL>·D.
If you do, you will turn the
TRACE
command on.
54
10 D$
=
CHR$ (13l
+
CHR$ (4)
20 PRINT "TO THE SCREEN ONLY"
30
PRINT DS;"CATAL06"
40
PRINT D$;"PR#1"
50 PRINT CHR$
(9);
CHR$
(73)
55
REM
<CTRL>-I I TURNS ON SCREEN ECHO
60
PRINT "TO THE SCREEN
AND
PRINTER"
70
PRINT D$;"CATALOG"
80 PRINT CHR$ (9l; CHR$ 1741
85
REM
<CTRLH
J
TURNS OFF SCREEN ECHO
90 PRINT "TO THE PRINTER ONLY"
100 PRINT 0$;"CATAL06"
110 PRINT DS;"PRt0"
Line 10 sets up a string (0$) which will be used to print a carriage
return followed by
<CTRL>·D
in later lines. Line 20 prints the message
that output is to go to the screen only, and the logged in disk is then
catalogued to the screen. Line 40 switches on the printer, then line 50
issues the command
<CTRL>-11
to switch on the screen echo. This
time the catalog is printed both on the screen and on the printer. The
screen echo is switched off again by entering
<CTRL>-1 J,
as in line
80; this ensures that output goes only to the printer. Remember that if
your catalog is more than one screen in length, you will have to press
the space bar as usual to get the rest of it displayed.
When using INTEGER BASIC, it is necessary to type the
<CTRL>-D
directly inside the string. However, unless you use a special
routine or utility which makes control characters visible, you will not
see the
<CTRL>D
in the program listing. In this case you should be
especially careful if there is a need to edit the lines using the APPLE
editor, as copying over the line removes any control characters.
The example program used the
<CTRL>-11
and
<CTRL>·I J
commands to echo characters to the screen. There are a number of
other commands which control the printer. Details are given elsewhere
in the manual, with listings wherever necessary.
55

Advertisement

Table of Contents
loading

Table of Contents