Preparation; Defining Characters - Epson FX-80 User Manual

Hide thumbs Also See for FX-80:
Table of Contents

Advertisement

Preparation
Internal switch 1-4 controls the use of the FX-80's 2K RAM buffer.
This RAM memory can be used as a large text buffer to smooth
printer/computer communications, or it can be programmed with a
set of user-defined characters. Unfortunately, it can't serve both ways
at the same time. In this and succeeding chapters, we'll use this RAM
area for user-defined characters. So set switch 1-4 o/fbefore proceed-
ing.
There's one more bit of preparation before you begin. LOAD the
program that you saved as LOGO in Chapter 14-we will add to
it
in
this chapter.
Defining Characters
Characters are defined with the (ESC)"
&"
command sequence.
The format is:
LPRINT CHR$(27)" &"CHR$(
r)
CHR$(
c
1 )
CHR$(
c
2 ) ;
The r tells the printer in which RAM area the characters are to be
stored. With a stock printer, there is only one area available: RAM
area O. (And
it
is only available if switch 1-4 is off!)
The notations
C
1
and
C
z
specify the range of characters to be defined.
The entire range of ASCII numbers from 0 to 255 (for which the ROM
characters are shown in Appendix A) can be used, except for those
areas where control codes reside (0 to 31, 127, 128 to 159,255). Some
of the control codes can also be used, but only after special ESCape
codes are issued. We'll get to that a bit later.
Here's how
C
1
and
C
z
work. Suppose you want to redefine the letters
from A to E. The associated ASCII numbers are 65 and 69, so you
simply let
C
1
be 65 (A) and
C
z
be 69 (E). Any of the keyboard characters
can be redefined in a similar manner. For example,
C
1
=
97;
C
z
=
101
would select lower-case letters a through e; and
C
1
=
33;
C
z
=
43
would select the symbols ! through
+.
To simplify things a bit, the ASCII symbols can be used in place of
CHR$(c
1 )
and CHR$(c
z )'
For example, either:
196

Advertisement

Table of Contents
loading

Table of Contents