Star Micronics NX-15 Printer User Manual


 
79
trol the paper-out detector, along with the other codes that we
have just looked at are in the following table.
Table 6-1
Some miscellaneous commands
Function
Control code
Soundbell
CHR$(7)
Master rest
(ESC) “@”
Offline
CHR$(19)
On line
CHR$(17)
Paper-outdetector off
(ESC) “8”
Paper-outdetector on
(ESC) “9”
Moveprint head back one space
CHR$(8)
Deletelast character sent
CHR$(127)
Canceltext in print buffer
CHR$(24)
Print “slashzero”
(ESC) “-” 1
Print “normalzero”
(ESC) “-” O
Immediate-printon
(ESC) “i” 1
Immediate-printoff
(ESC) “i” O
Addn dotspacesbetweencharacters (ESC) CHR$(34CHR$(@
Backspace, delete, and cancel text
Backspace (CHR$(8)) “backs up” the print head so that you
can print two characters right on top of each other. Each time
your printer receives a backspace it moves the print head one
character to the left, instead of to the right. You can strike over
multiple letters by sending more than one backspace code.
Delete (CHR$(127))also “backs up” one character, but then it
“erases” the previous character (it’s erased from your printer’s
buffer, not from the paper).
Cancel text (CHR$(24))deletes all the text in the print buffer;
that is, in the line before the delete text command. Since your
printer prints one line of text at a time, only that line will be
deleted.
The following program shows how these codes works.
1“0LPRINT
20 LPRINT
30 LF’RINT
40 LPRINT
50 LPRINT
60 LPRINT
70 LPRINT
“BACKSPACEDOESNOT”;
CHR$(8) ;CHR$(8 ) ;CHR$(8) :
“=== WORK”
“DELETEDOESNOT”;
CI-IR$( 127) ;CHR$(127) ;CHR$(127) ;
“WORK”
“CANCELLINE”;