Star Micronics NP-IO User Manual

Specifications and Main Features

  • Device Type: Printer
  • Print Head: Nine pin typography
  • Printing speed: Draft Quality (Print Mode dependant)
  • Connectivity: Standard Parallel Connector
  • Paper Handling: Single sheets and sprocket-feed papers are optional
  • Measurements: Included in the technical requirements
  • Electrical Characteristics: Should not deviate by more than 10% the quoted voltage on the identification plate
  • Other Aspects:
  • Technology for Near Letter Quality (NLQ) printing
  • Supports text with different formats: italicized, underlined, superscripts and subscripts
  • Printing pitch is tunable (10 cpi, 12 cpi)
  • Both condensed and expanded type styles
  • LCD control Indicators; for power and paper
  • Integrated self-diagnostic tests for the printer
  • Configuration DIP switch
  • Designed to enable different PC systems: IBM and Apple II systems.

Frequently Asked Questions

Q1: The ribbons used on this printer are of which types?

A1: This type of printer is equipped with a ribbon cartridge which is easy to exchange as it is constructed with automatic threading.

Q2: Is there a way to adjust the print head toward the specifc thickness of paper?

A2: Yes, the print head can be adjusted by the aid of an adjustment lever under the cover of the printer.

Q3: What do I do in the event of a paper shortage for the printer?

A3: A Power LED will start blinking from the Printer’ s controller board to mean the printer is out of paper. You can press the paper feed key to load additional paper or modify the paper settings.

Q4: Is it possible to use other paper types with this printer?

A4: Yes, our printer accepts continual sprocket-feed paper and numerous loose sheets as well.

Q5: How do I conduct a self-test on the printer?

A5: For self-test one, power on the printer while pressing the Paper Feed key and for a self-test two press on Line key while powering the printer on.

Q6: What is the function of DIP switches?

A6: The postcode provides low hopes in defining critical settings including interfacing with various computers, adjusting page length, and selecting appropriate international character sets.

Q7: What kind of modern computers would be able to run this printer?

A7: A type of printer anticipated for use in conjunction with computers IBM or the Apple II systems, which interfacing cables and drivers are needed in addition to the printer in order for it to be connected to more modern systems.

Q8: Which section of the Procedure Manual has specifications for this printer?

A8: Detailed Printer specifications are available in Appendix F of this manual.

User Manual

NP-IO
USER’S MANUAL
NOT INTENDED FOR SALE
[ PN 80820191]
Federal Communications Commission
Radio Fre
This equipment generates and uses radio frequency energy and if not installed and used properly, that is, in strict accordance with the manufacturer’s instructions, may cause in­terference to radio and television reception. It has been type tested and found to comply with the limits for a Class B computing device in accordance with the specifications in Subpart J of Part 15 of FCC Rules, which are designed to provide reasonable protection against such interference in a residential installation. However, there is no guarantee
uency Interference
tatement
that interference will not occur in a particular installation. If this equipment does cause interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures:
*Reorient the receiving antenna *Relocate the cornouter with resoect to the receiver *Move the computkr away from ‘the receiver *Plug the computer into a different outlet so that computer and receiver are on dif-
ferent branch circuits.
If necessary! the user should consult the dealer or an experienced radio/television techni­cian for additional suggestions. The user may find the following booklet, prepared by the Federal Communications Commission helpful: “How to Identify and Resolve Radio­TV Interference Problems.” This booklet is available from the U.S. Government Prin­ting Office, Washington, D.C., 20402, Stock No. 004-000-00345-4.
For compliance with Federal Noise Interference Standard, this equipment requires a shielded cable.
This statement will be applied only for the printers marketed in U.S.A.
Self Declaration
Radio interferences regarding this equipment has been eliminated according to Vfg 1046/1984 announced by the DBP. DBP has been informed about the introduction of this special equipment and has been conceded the right to examine the whole series. It is upon the responsibility of the user to assume that his own assembled system is in ac­cordance with the technical regulations under Vfg 1046/1984. To observe FTZ-regulations it is necessary, to establish all connections to the printer with shielded cable. The equipment may only be opened by qualified service representatives.
This statement will be applied only for the printers marketed in West Germany.
Trademark Acknowledgement
NP-10: Star Micronics Co., Ltd. Apple II : Apple computer Inc. IBM Personal Computer, IBM PC: International Business Machines Corp. Microsoft BASIC: Microsoft Corporation
NOTICE
*All rights reserved. Reproduction of any part of this manual in any form what-
soever, without STAR’s express permission is forbidden. *The contents of this manual are subject to change without notice. *All efforts have been made to ensure the accuracy of the contents of this manual at
the time of going to press. However, should any errors be detected, STAR would be
eatly appreciate being informed of them.
F
l he above notwithstanding, STAR can assume no responsibility for any errors in
this manual.
@Kopyright 1986 Star Micronics Co., Ltd.
-
Table of Contents
Chapter 1
Chapter 2
Chapter 3
Setting Up Your Printer
Locating the printer Check the carton contents
Removing the printer cover Removing the packing tube Installing the ribbon cartridge
Getting to Know Your Printer
Controls and parts of the printer
Parts of the printer Controls and indicators Extra functions Other controls
Selecting and loading paper
Loading single sheets Loading sprocket-feed paper
Adjusting the print head Testing the printer Connecting the printer
Printing with BASIC
Some basics of BASIC
First steps
ASCII codes and the CHR$ function
Control codes
The escape codes
A note on command syntax
Some special kinds of text
Near Letter Quality characters Italic printing Underlining Superscripts and subscripts
Changing the print pitch
Expanded print Condensed print
Proportional printing Making words stand out Mixing print modes
1
7
19
Chapter 4
Formatting Text
Lines and line spacing
Starting a new line Reverse line feeds Changing the line spacing
Moving down the page without a carriage re-
turn
Page control
Form feed Reverse form feed Changing the page length
Top and bottom margins Setting left and right margins Horizontal and vertical tabs
Horizontal tabs One-time horizontal tabs Vertical tabs Vertical tab channels
Centering and aligning text
37
.-
Chapter 5
Special Features of the Printer
59
Now hear this
Resetting the printer Taking the printer off line Printing the bottom of the sheet Backspace, delete, and cancel text Printing zeroes
Immediate-print Adjusting the width of space between ­characters
Uni-directional printing
The seven bit dilemma
Block graphics characters and special symbols
International character sets Printing characters in the control code area Printing BIG characters The macro control code Reading a hex dump
Chapter 6
Download Characters and Dot Graphics
Dot matrix printing
Designing your own characters
Defining proportional characters Designing your own NLQ characters User-designed dot graphics Higher resolution graphics More graphics programming tips
Redefining alternate graphics codes g-pin graphics mode
79
Chapter 7
Appendix A DIP Switch Settings
Appendix B Appendix C Appendix D Function Codes
Caring for Your Printer
Cleaning the printer Replacing the ribbon
Replacing the print head
Switch functions
ASCII Code Conversion Chart Character Code Table
Commands to control print style
Font style controls Font pitch controls Special print modes
Controlling the vertical print position
Line feed and reverse line feed controls Form feed and related commands Top/bottom margins and vertical tabs
Controlling the horizontal print position
Download character commands Dot graphics commands Macro instruction commands
Other commands
95
101
105 107 115
Appendix E
Command Summary in Numeric Order
161
---
Appendix F Technical Specifications Appendix G The Parallel Interface
Functions of the Connector Signals
Index
165 169
173
CHAPTER I
SETTING UP YOUR
PRINTER
Subjects covered in Chapter 1 include-
. Choosing a suitable place for your printer
l Unpacking l Setting up
LOCATING THE PRINTER
Give some thought to the best place to put the printer. Both the printer and computer should be used in normal home sur­roundings. For best performance, we recommend:
l Use the printer on a flat surface. l Keep it out of direct sunlight and away from heat-
producing appliances.
l Use it only in temperatures where you are comfortable. l Avoid locations with dust, grease, or high humidity. l Supply it “clean”
same circuit used by large, noise-producing appliances (such as refrigerators).
l Make sure the line voltage is within 10% of the voltage
specified on the identification plate.
electricity. Don’t connect it to the
CHECK THE CARTON CONTENTS
Open the carton and check each item in the box against Figure l-l to make sure that you have everything (there should be four items).
igure l- 1.
Check to make sure you have all tour items: 1) Printer,
.._ . _. -
2) Paper separator, 3) Ribbon cartridge, and 4) User’s manual.
n Removing the printer cover
The printer’s cover is important for two reasons - it keeps dust and dirt away from the printer’s delicate mechanism, and it absorbs nearly all of the printer’s operating sounds. Don’t take off the cover unless you have to change the ribbon or make an adjustment.
To remove the cover, lift up the back of the cover to disengage the two tabs at the front, then lift it off the rest of the way. To replace the cover, slide the tabs in at the front and
lower it into place. Figure 1-2 shows the proper position and movement for both removing and replacing the cover.
3
Figure 1-2.
Remove the printer cover by lifting carefully.
W Removing the packing tube
Figure 1-3.
Remove the protective tube from the carriage rail.
4
The printer is shipped with a protective spiral tube to keep the print head from being damaged during shipping. This tube must be removed before use. First, take off the printer cover. The protective tube is split along its bottom side to allow easy removal. Grasp one end of the spiral tube and firmly pull it up­ward and away from the carriage rail.
n Installing the ribbon cartridge
This printer uses a neat, easy-to-change ribbon cartridge with
automatic threading. To fit or change the ribbon cartridge:
Ggure 1-4. Press the cartridge into place until the holding springs
snap into place.
1. Turn off the power and remove the printer cover.
2. Slide the print head gently to the center of the printer.
Warning: The print head gets hot during operation, so
let it cool off before you touch it.
3. Set the release lever to either single sheet (a) or sprocket-feed paper (P).
I
-
-
Print
T. _- - _ __ .__
‘.igure l-5.
.l’o thread the ribbon, slide the print head carriage
_._ _
manually to the right or left, and the ribbon will slip down by itself into its proper position.
4.
With the ribbon facing away from you, use the guide holders as a fulcrum, and lightly press the cartridge down until the two holder springs snap shut to hold the cartridge firmly in place. See Figure l-4.
5.
Check that the cartridge fits so that the drive pins engage the cartridge teeth, by turning the ribbon ad­vance knob. Advance the ribbon to take up any slack.
6.
Gently slide the print head carriage manually all the way to your right or left until the ribbon automatically slips down into its proper place between the print head and the silver ribbon guide.
7.
Replace the printer cover.
6
-
MEMO
-
CHAPTER 2
GETTING TO KNOW
YOUR PRINTER
Subjects covered in Chapter 2 include-
* Parts of the printer - what they’re for and how
to use them
l Paper selection and loading l Adjustment l Testing printer operation
CONTROLS AND PARTS OF THE PRINTER
n Parts of the printer
PRINTER COVER - This protects the ribbon and the print head from dust and dirt, and cuts down the sound of the printer.
PAPER SEPARATOR - This metal guide is used with sprocket-feed paper. POWER CORD - This cord connects the printer to its power source, usually a wall outlet. It’s located at the left rear of the printer. PRINT HEAD - This is the device that does the actual print­ing. Like the strike lever in a typewriter, tiny pins in the print head hit the paper through a ribbon.
TRACTOR FEED UNIT - The drive gear and sprockets of the tractor feed unit move sprocket-feed paper through the printer. PLATEN - This is the rubber cylinder that carries paper to the print head. INTERFACE CONNECTOR - On the back of the printer, this connector is used to connect your computer to the printer.
8 I
Pow\er cord
. . .
Figure 2- 1.
Front and rear views of the prmter.
H Controls and indicators
Now let’s go over the controls and indicators of the printer, starting with the control panel on the right. There are three in­dicators and three keys on the control panel.
-
9
I
Figure 2-2. The control panel.
POWER INDICATOR - Glows orange when the power is
on. This indicator flickers when the printer runs out of paper and when certain printer malfunctions occur.
NLQ KEY and INDICATOR - Changes the character style
(draft or NLQ) when the On Line indicator is off, and glows green when the NLQ mode is selected.
PAPER FEED KEY - Advances the paper one line at a time
when the On Line indicator is off. If you hold the key down, you get consecutive line feeds. If you push the On Line key while
holding this key, you can advance the paper to the top of the next page or a new form. ON LINE KEY and INDICATOR - Glows green when the
printer is ready to receive data from your computer (on line). When the printer is off line, it sends a signal to the computer in­dicating that it cannot accept data. Pressing the On Line key switches the printer between on line and off line.
n Extra functions
There are seven more functions that are not directly specified on the control panel. You can access four of them by pressing one particular key when you turn on the power; three others are activated by pressing two control keys at once.
I
Figure 2-3.
Extra functions while turning on the printer.
We’ll explain about the “Panel” mode, which is powerful func-
tion of the printer. Some commercial software does not support
defining your own selections. In this case, use the “Panel” mode.
Selection of the Panel Mode at power-on ensures that your choices remain in effect until you turn the power off. This means that the printer will ignore any codes sent by the soft­ware that you are using. The Panel Mode allows selection of the character quality (Draft or NLQ).
If you want to set the Panel mode, press the NLQ key on the
control panel when you turn on the power. After a second, you will hear a beep, and the ON LINE indicator will glow. If you want to change the character, press the ON LINE key, press the NLQ key once again to make your choice, and press the ON LINE key again.
Forward micro-feed
Reverse micro-feed
I
* *
I
**
-
-
Form feed’
+*: Hold down *: Press
Ggure 2-4.
You can set many functions by the combinations of the
control panel keys while in the Off Line mode.
When you want to align the print start position, you can set it by the micro-feed operation with the control panel, instead of turning the platen knob manually.
1.
Set the Off Line mode by pressing the On Line key.
2.
While holding down the On Line key, press one of the following keys.
Paper Feed key - Forward micro-feed
NLQ key - Reverse micro-feed
3. When you can set the print start position, release the Paper Feed key or the NLQ key first, then release the On Line key.
n Other controls
There are other controls, not connected to the control panel.
Some of the more important ones are:
POWER SWITCH - The switch that turns the printer on
and off is at the back, on the left side. PLATEN KNOB - This knob is at the middle of the right side and lets you turn the platen by hand, like a typewriter.
Caution: Turn the platen knob only with the Power switch ~$5
Turning the knob with the power on could damage the drive gears. RELEASE LEVER - The release lever is on top of the printer, near the left rear corner. It controls how strongly the paper is held against the platen. The release lever has four posi­tions: the top setting is used for inserting paper, the next is for
single sheets, the third is for sprocket-feed paper, and the bot-
tom one is used when adjusting the paper. PAPER BAIL - The bail is the movable bar that holds the paper against the platen. Its position depends on the setting of the release lever. DIP SWITCHES - There is one set of eight switches that is
used in interfacing the printer to your particular computer. There are also switches to set page length, and international character set. See Appendix A for a complete list and explana-
tion.
i E
SELECTING AND LOADING PAPER
Your printer handles two basic types of paper - single sheets (stationery, envelopes, multipart business forms, etc.) and con­tinuous paper (fan-fold perforated paper).
The release lever controls the pressure of the paper against the platen, It has four settings:
12 -
.wo
3 - The top setting is used when you want to load paper in
the printer. P - The second setting is for normal single sheets. C - The third is for sprocket-feed paper.
4lU - The bottom one is used when you want to release the
paper completely to adjust it.
Release lever
‘igure 2-5. Use friction feed for single sheets and tractor feed for
.
contmuous paper.
The paper bail holds the paper against the platen according to the setting of the release lever. The bail is opened when the release lever is in the top position, closed when the lever is in the second or third positions, and opened by the printer when the lever is in the bottom position.
n Loading single sheets
Instead of feeding the paper in manually by turning the platen knob, you can use the release lever for automatic feeding (the printer must be turned on). Single sheets from 5.5 to 8.5 inches wide can be used:
1. Flip the clamp Levers backward and move the sprockets on the tractor feed unit all the way to the ends.
-I
13
-.2
Figure 2-6. Move the sprockets on the tracktor feed unit all the
way to the ends.
2. Install the printer cover on the printer.
3. Set the release lever for single sheets - the second posi­tion from the top.
4. Insert a sheet of paper to the paper chute on the printer cover.
5. Turn on the power switch. (The Power indicator will blink because there is no paper.)
6. Now set the release lever to the auto-feed setting - the
top position. The printer will advance the paper automatically.
7. When the paper stops, set the release lever for single
sheets again.
To align paper that is not in straight -
l Set the release lever to the adjustment setting. l Straighten the paper and adjust it for the margins you
want.
l Move the release lever back to its original setting.
14
Release lever
F
‘igure 2-7.
the release lever.
You can insert a sheet of paper automatically by using
n Loading sprocket-feed paper
This is standard computer paper, with the holes along the sides and perforations between the sheets, It is also called sprocket, punched, fan-fold, or just plain “computer paper”. It can be as narrow as 4.5 inches, and up to 10 inches wide.
1.
Remove the printer cover.
2.
Place a stack of fan-fold paper behind the printer.
3.
Turn on the printer and set the release lever for sprocket-feed paper.
4.
Open the sprocket covers, on the right and left sprocket units, as shown in Figure 2-8.
5. Flip the clamp levers backward. This allows the two
sprocket units to move freely right and left so you can align them with the holes in the paper.
Feed the end of the paper into the slot next to the platen
6.
cover plate.
Fit the holes in the paper over the sprocket pins so the
7.
paper is even, and clamp the sprocket units in place.
Figure 2-8. Open the sprocket covers to expose the sprocket teeth.
8. Check that the paper is still positioned correctly, and close the sprocket covers.
9. Set the release lever to the auto-feed setting. The printer will advance the paper automatically.
10. When the paper stops, set the release lever for sprocket­feed paper again.
11. Install the paper separator on the printer, as shown in Figure 2-9. Then, install the printer cover.
Figure 2-9. Ready to load the sprocket-feed paper
16
ADJUSTING THE PRINT HEAD
The distance between the print head and the platen must be adjusted to accommodate papers of different thicknesses. To make this adjustment, move the adjustment lever, which is under the printer cover and immediately in front of the release lever (Figure 2-10). Pulling the adjustment lever towards you will widen the gap; pushing it away from you will narrow the
gap.
There are four positions; you can feel the lever clicking into the various notches. The first step (shown) is the one most corn­monly used for single sheets of paper.
Try different positions until you get the best printing results.
Release lever
Figure 2-10. The adjustment lever allows for different thicknesses
of paper.
TESTING THE PRINTER
Your printer has two built-in programs that printout sample lines of letters, numbers, and other characters - to show you that everything’s in good working order. Self-test 1 is the long
version, and self-test 2 is the short one. You can use either one to show the characters available in the printer, to check the in­stallation of the ribbon and paper, and to check the adjustment of the head-to-platen gap.
You can print the self-test without hooking up the printer to
your computer. Simply:
1. Plug in the printer (don’t turn it on yet).
2. Insert a sheet of paper (or sprocket paper, either one).
3. While holding down one of the following keys, turn on the power switch:
Paper Feed key - Self-test 1 (long) On Line key - Self-test 2 (short)
Self-test 1
I Standard mode I
“flS%PI‘ c 1 *1 , ~.
pL(I sI.IIYw::y: : I : -
“‘#6X’, ,+~.-./01Z345a~89:JC=,.
py,-rtuv*\y7(.'?'
1 “~0%~‘O~+,-./0123Y567ES:;~-~T@~ECDEFGHIJKLnNoPDRSTUUWXYZC\l~~’~bcd~f~h~~klmno
?"I$Z&'Or+,-./Ol134S67~9~~~->?~~~CgEfgHlJKL~NOP~RS~UUU~YIC~3~~'abcdrfghi~kl~n~
[IBM
/1.,1L’;4w!7f39: ;~-~70~6CI)EF6H,Jt.LMNOPORSTUVWXYZL\I’~~ebcdc~gh..,k~~~,no
\7ePBCD~fGHlJbLMN*PU~~~"""~~iL-,,,'-'~b~~~fg,~~~~l~,,~
Self-test
Figure 2- 11. The show you the printer print.
When want to the long function, turn
the power
CONNECTING THE PRINTER
Now that you’ve assembled and tested your printer, all that re-
mains is to connect it to your computer as follows:
Interface (
Interface cable
Figure 2-12. Connect the cable like this.
1. Make sure that both your computer and printer are turned off.
2. Connect the printer end of the interface cable to the con­nector socket at the right rear of the printer as shown in Figure 2-12.
3. Connect the other end of the cable to your computer as described in the computer manual.
CHAPTER 3
PRINTING WITH BASIC
Subjects covered in Chapter 3 include-
. Listing BASIC programs on the printer
l How a program prints things
l Control codes, escape codes, and command syn-
tax
l Near letter quality (NLQ) characters l Fixed and proportional character spacing l Special printing-
Printing in italics Underlining Superscripts and subscripts Boldface and emphasized text Mixing print modes
To show you how to control your printer from a program, we have chosen BASIC because it is easy to learn and easy to use. Also, more personal computer users program in BASIC than in any other language.
The rest of this manual will show you a little BASIC - just enough for you to use your printer. We’re not going to try to make you an expert programmer, though, only get you started. There are many excellent books that will teach you BASIC, so if you discover that you like to program you should have no trou­ble learning more about it.
20
SOME BASICS OF BASIC
n First steps
The first things that a beginner learns to do are to list a pro­gram and to print a character string. Certainly these are the easiest operations one can do, but even they may depend on what computer you have. In Microsoft BASIC, we can list all the steps in a program by entering LIST. This lists them on the CRT screen; if we want to print them on a printer, we prefix the command with an L (enter LLIST).
The Microsoft BASIC command for outputting information is PRINT. Like the LIST command, this displays the information on the CRT screen so we have to add an L (-+ LPRINT) if we
want to use the printer. Just put whatever you want to print be­tween quotes and after LPRINT (anything enclosed in quotes is called a character string). For example, we would use LPRINT
“Hello!” to output “Hello!” to the printer. We’ll see later how to
LPRINT more than just character strings.
We started with Microsoft BASIC because it is the most wide­ly used version of BASIC. The programs in this manual are written in Microsoft BASIC so they should run on most com­puters. But if strange things happen when you try to run a pro­gram, check the BASIC manual that came with your computer.
Let’s consider Apple 11 computers for a minute. These popular computers use their own brand of BASIC. To use an Apple II, enter the following-
PR#l PR#l LIST PRINT "Hello!" PR#O
PR#O
The PR#l tells the Apple to send everything to the printer,
the LIST or PRINT command sends it, and the PR#O returns output to the screen.
Now that we know how to address the printer, let’s try listing a BASIC program. We will load a program into memory ready to program printer operation - just as soon as we learn a little bit about the ASCII codes.
n ASCII codes and the CHR$ function
You can talk to your computer in BASIC, but your computer and your printer talk to each other in what are known as ASCII codes. In the ASCII code, each number from 0 to 255 has a par­ticular meaning - 36, for example, makes the printer print a dollar sign. Some numbers cause the printer to do other things,
too. For instance, sending a 7 sounds the printer’s bell.
Taken together, these numbers and their meanings make up the ASCII code (pronounced ask-lzey), which stands for the
American Standard Code for Information Interchange. There are
ASCII codes for all the letters of the alphabet (upper case and lower case), 0 to 9, most punctuation marks, and some (but not all) of the functions of the printer.
There are a number of different ways to represent an ASCII code, depending on how you are using it. For example, the ASCII codes for the upper-case letter “A” are 65 (decimal) or &H41 (hexadecimal). Or you can just call it “A”. Appendix B shows all of the ASCII codes.
BASIC uses the CHR$ function to represent ASCII characters and many functions. To print the letter “A” we
would enter LPRINT CHR$(65). To make the printer’s bell
sound, we would enter LPRINT CHR$(7). In general, we print a character by entering LPRINT CHR$(ASCII code) to the
printer.
We can also use hex ASCII codes. Although we use only decimal ASCII codes in this manual, in some applications it will help if you understand what a hex code is. “Hex” is short for hex­adecimal and refers to a base-16 number (the numbers we use in everyday life are base 10). Since the hex system needs 16 digits, it uses the numerals 0 through 9 and also the letters A through F. In BASIC programs, you can always tell that a number is in hexadecimal by the “&H” immediately preceding it. The ASCII code for the letter “A” (65 in decimal) is &H41 in hex.
n Control codes
ASCII codes with values of 32 or less do not correspond to keys on the keyboard. These codes control many of the printer’s functions, so we call them control codes. To enter a control code from the keyboard, we have to press two keys at the same time
22
- the “control” key and one other. The other key determines
what code is sent - pressing the control (CTRL) key and A
sends ASCII code 1, CTRL B sends ASCII code 2, and so on.
Your printer has a lot of control codes to let you do some useful things. Let’s try one that we’ve mentioned several times already:
' Demo of ASCII code :i LPRINT CJlR$(7) 30 END
RUN
That’s the printer’s bell (we call it that even though it sounds like a buzzer). We’ll learn more about it in later - we just wanted to show you a control code that would get your attention right away!
There are four common ways of referring to a control code: the name of the code or its abbreviation, the decimal ASCII value, the hexadecimal ASCII value, and the “CTRL-” value. For example, the ASCII code that causes the printer to advance the paper one line is decimal 10. This code may be referred to by any of the following:
line feed - the name of the code (LF> - its abbreviation ASCII 10 - its decimal value ASCII &HOA - its hexadecimal value (the &H
signifies hex) CHR$( 10) - the way it’s used in BASIC CTRL- J
- the way you send it from a keyboard
Of course, most of the time we don’t need to bother with these. The computer is smart enough to know that when we press the “A” key we want to print the letter “A” - it takes care of all the intermediate steps.
Appendix B is a table that shows the various names for each code so you can convert back and forth. The microcomputer world is not very consistent in describing ASCII codes, so it’s important that you have a basic knowledge of them.
23
n The escape codes
Back when the ASCII system was set up, computer equip­ment was relatively simple and thirty-three control codes were considered sufficient at the time. The American Standards peo­ple realized that eventually more control codes would be need­ed, so they included the escape (ESC) code to allow almost any number of additional codes to be defined when they became necessary.
ESC allows us to “escape” from the ordinary set of control codes so we can specify additional functions and other informa­tion needed for a printer function. In this manual, we’ll write the
ESC code inside broken brackets, like this - (ESC).
(ESC) - decimal 27 - is always followed by at least one other number; it is never used alone. The whole series of related numbers is called an escape sequence.
n A note on command syntax
Because the readers of this manual will be running such a wide variety of applications on so many different computers, we can’t show the exact way of sending codes to the printer for each one of them. Instead, as we introduce you to each new com­mand, we will show the commands as in this example:
(ESC) “W” 1
This command turns on expanded printing. (ESC), as we mentioned earlier, is the escape code (which is ASCII code 27). A letter or number in quotes (such as the “W” above) means that the character should be sent to the printer, but without the
quotes. In our example, you should send a capital W following the escape code. In BASIC, you could do this in a couple of ways: by sending the character itself (e.g. LPRINT “W”;), or by
using the CHR$ function to send the ASCII code for the character (e.g. LPRINT CHR$(87);).
Many of printer commands end with a 1 or 0. When shown as in the above example (i.e., no quotes and no “CHR$“), you can use either ASCII code 1 (i.e., CHR$(l)) or the character “1” (which is ASCII code 49). The same principle applies to com­mands ending with 0.
24
So for our example above, any of these BASIC statements will
have the same result:
LPRINT CHR$(27);CHR$(87);CHR$(l) LPRINT CHR$(27>;CHR$(87);CHR$(49) LPRINT CHRS(27) ;"W";CHR$(l)
LPRINT CHR$(27);"W";CHR$(49) LPRINT CHR$(27);"Wl"
Even though there are many commands that require the use of ASCII code 0 (the (NUL) character), the number “0” (zero or ASCII code 48) cannot be substituted. In these cases, instead of an unadorned 0 we will show CHR$(O) each time these com­mands are referenced.
That’s it for the basics. You are now ready to learn how to use the many features of your printer.
SOME SPECIAL KINDS OF TEXT
If you looked carefully at your printer’s self test, you probably noticed that it can print in italics. But that’s not all! Your printer can underline characters, print superscripts and subscripts, and perhaps most exciting, print near letter quality characters.
n Near Letter Quality characters
This printer’s Near Letter Quality (sometimes abbreviated as NLQ) character set is ideal for correspondence and other impor­tant printing, as it produces very high quality characters. Nor­mally, your printer prints draft quality characters. This is ade­quate for most work and has the fastest printing speed. For the final printout, try NLQ. The program below shows an example.
10 ' Demo of NLQ character set 20 LPRINT CHR$(27) ;"xl"; 30 LPRINT "This line shows NEAR LETTER QUALITY!" 40 LPRINT CHR$(27);"xO"; 50 LPRINT "This line shows standard print."
Loading...
+ 70 hidden pages