Coding Printer Commands - Star Micronics Rainbow NX-1000C User Manual

Table of Contents

Advertisement

To redirect output back to the CRT screen after the CMD command,
you must send the printer a blank line. That is done by the PRINT#4
command after the LIST command. To close the printer, a separate CLOSE4
command is required after the PRINT#4 command.
Program listings are enhanced if they have a title, and the title is enhanced
if it is printed in large characters. Try listing the program again, but this
time instead of CMD4, type:
CMD4. CHR$ (14) : "PROGRAM LISTING": CHR$ (15)
CHR$(14) is a command that causes the printer to expand all characters
to double width. CHR$(15) cancels this command and returns to normal
width. The printed listing should now look like this:
F
n
lF<:OGRA .... 1
L I S T I U ....... G
READY.
10 OPEN4,4
20 PRINT#4, "PRINT SAMPLE"
30 PRINT#4
40 PF:: I NT#4 , " THE SQUAF::E r.:OOT OF 1000 IS";
50 PRINT#4, SQR(1000)
60
PRINT#4, ",. BYE"
70
CLOSE4
80
END
f':EADY.
CMD can also be used within programs, although this is not recommended.
If you use a CMD statement in a program, remember that a blank line is
required to get back to the CRT screen.
CODING PRINTER COMMANDS
In addition to CHR$(14) and CHR$(15), there are many other com-
mands for controlling the printer. A complete list of the commands and their
coding can be found in Appendix B. The coding is given by showing decimal
character codes in angle brackets. In the Font Control section of Appendix
B, for example, you will find the command for italics listed as follows:
Select italic characters
<27> <52>
30
11
rl
r:
r:
r;
r:
r:
I;
I:
I
I :
I~
r
(
I
L
t:
II
u

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents