Star Micronics NB24-10/15 Printer User Manual


 
100
In this program line 20 determines that the following 32
characters should be printed as printable characters. So, the
characters in the control code area are printed as shown below.
v+i4
irtj + 0
If you want to print more characters using the (ESC) “\”
command you must tell the printer how many characters should
be printed. The total number of characters is equal to nl + (n2
x 256).
For example, if you want to print 300 characters, nl = 44 and
n2 = 1 (300 = 44 + 1 x 256), the control code will be the
following:
(ESC) “\” CHR$(44) CHR$(l)
There is one more command to print a character in the control
code area: (ESC) A
n. This command prints one character
determined by the value of n. You’ll get the same results as
shown above with the following program.
10 '
Demo of one character print
20
FOR I=0 TO 31
30
LPRINT CHR$(27);"h";
40
LPRINT CHR$(I);
50
NEXT I
60
LPRINT
70
END
A note for IBM-PC users:
When you run these programs, you cannot get the right-
pointed arrow (CHR$(26)) with the IBM-PC computer. This is
because the IBM-PC does not send this code to the printer.
To avoid this problem, change line 40, and add line 100 and
120 to either of the following lists.
40 GOSUB 100
100 O=INP(&H379) : IF 0<128 THEN 100