62

Delta User’s Manual

days of computers, when teletype machines were used for com- puter terminals. These mechanical marvels had a bell in them that could be heard for blocks. This bell was used to signal the operator that something needed attention. The code that the computer sent to the teletype machine to ring the bell was, reasonably enough, called a bell code. Well the name bell code is still with us, even if the bell has changed to a beeper, and a lot of people still call the beeper a bell, even if it doesn’t sound like one. So with our trivia lesson out of the way, let’s see how we can “ring the bell.”

The code to sound Delta’s “bell” is CHR$(7), which is ASCII code 7 or (BEL). Any time Delta receives this code it will sound the bell for a quarter of a second. This can be used to remind an operator to change the paper or to make another adjustment to the printer.

You can try this by typing:

-

-

-

-

-

-

LPRINTCHR$(7);

There are two other codes that affect the bell. One disables the bell, so that Delta will ignore a CHR$(7), and the other turns the bell back on. All three codes that affect the bell are shown in the following table.

-

-.

-

-

 

Table

6-l

 

 

 

Bell commands

 

 

Function

Control

code

 

Sound

bell

CHRW)

 

 

Disable

bell

(ESC)

“Y” CHR$(O)

-

Enable

bell

(ESC)

“Y” CHR$(l)

 

Initializing Delta

Up to now when we wanted to reset Delta to the power on condition we have had to either turn the printer off and then on again, or to send the specific codes that reset the particular fea- tures. There is an easier way. The control code (ESC) “@” will reset all of Delta’s features to the power on condition (as deter- mined by the DIP switches), with two exceptions. Those excep- tions are that (ESC) “@” will not erase any characters that you have stored in Delta’s RAM memory (Chapter 7 tells you how to create your own characters), and it won’t erase the macro if you

-

-

-

Page 74
Image 74
Star Micronics user manual Bell commands, Initializing Delta