If you have made changes to a program and want to see all of it on
the screen, type LIST and then press
RETURN
to see the program on
your screen. When you are completely through with one program and
want to start another, type NEW and press
RETURN.
How to Send Control Codes to the Printer
The short program. that follows illustrates the concepts of control
codes and ESCape sequences. This exercise may help you make better
use of the next three chapters. Type and run the program. It should
produce the printout you see below it. After the printout is a detailed
description of the operation of the program.
10 LPRINT "BASIC programs for the"
20 LPRINT CHR$(70)CHR$(88)CHR$(45)CHR$(50)CHR$(56)CHR$(54)
30
LPRINT CHR$(&H46)CHR$(&H58)CHR$(&H2D)CHR$(&H32)CHR$(&H38)CHR$(&H36)
40 LPRINT "Wl "CHR$(87)CHR$(49)
50 LPRINT CHR$(27)"Wl";"Double-width print"
60 LPRINT "Still double-width"
BASIC programs for the
FX-286
F X - 2 8 6
W1 W1
D o u b l e - w i d t h p r i n t
S t i l l d o u b l e - w i d t h
In each line LPRINT signals that the rest of the information on the
line is to be sent to the printer. In line 10 the letters inside the quotation
marks are printed just as they appear in the program.
Line 20 shows an alternate way of printing characters. It uses the
CHR$ (character string) function with the decimal code for each letter.
Line 30 uses the same method except that it uses hexadecimal numbers
instead of decimal numbers. (The symbols &H before each number
are required to signal that the numbers are hex, not decimal.)
Line 40 prints the characters
W1
using the two different methods
(quotation marks and the character string function). Line
50
shows
that if the ESCape code, which is CHR$(27) in BASIC, comes before
the characters
W1,
those characters are not printed. Instead, they
4-6
Summary of Contents for FX-286 - Impact Printer
Page 1: ......
Page 2: ......
Page 35: ......
Page 40: ...2 4 ...
Page 48: ...3 8 ...
Page 56: ...4 8 ...
Page 91: ...6 16 ...
Page 118: ...C 10 ...
Page 133: ...Epson Mode Commands G 5 ...
Page 134: ...G 6 ...
Page 166: ...H 4 ...
Page 173: ...International Character Width Table Roman characters Italic characters I 7 ...
Page 174: ...I 8 ...
Page 180: ...J 6 ...
Page 181: ...IBM Proprinter Mode Commands J 7 ...
Page 182: ...J 8 ...
Page 202: ...J 28 ...
Page 208: ...K 6 ...
Page 216: ......
Page 220: ...IBM Mode See Appendix J for detailed explanations of codes Character Width Pitch ...
Page 221: ...Notes ...
Page 223: ......