The Rate of Print: 200 characters in each second, being a maximum of 240 CPS for spaces in between.
The Quality of Print: prints that are free from dots, enabling clearer prints, even near letter quality prints.
Types of Fonts available: A total of 9, with the inclusion of a new font type.
Handling of Paper: Automated sheets feeding for a single sheet and a sprocket-fed paper, both.
Driven in Tractor Format: Unusual format for reduction of wastage on a paper during the first boot.
Paper Feed from Reverse: Multi column printing or special purposes printing application is possible.
Printing of Graphics: Horizontal and vertical graphic quadruple densities are six different form dot graphic prints.
Feature of Macro Instruction: Uses a single code to call and define a set of codes arranged in a particular order.
DIP Switches that are Easily Reachable: Changing parameters and accessibility to printer connection to a computer becomes easy.
Cartridge of Ink Ribbon: As it is contained within itself, installing it is absolutely straightforward.
Frequently Asked Questions
How speed is the fastest possible printing of the device SR-10/15?
It is 200 characters per second, with a maximum of 240 when blank spaces are printed.
What type of paper is able to be processed by the SR-10/15 printer?
Single sheets, multi-part carbonless types of forms and sprocket feed paper types.
What is the feature that allows changing print styles easily?
Macro Instruction is the feature that enables users to enter a number of codes and then invoke them in their whole number with one code.
How difficult is it to fit the ink ribbon cartridge?
No, it is easy to fit the ink ribbon cartridge since the fitting is designed in such a manner that the cartridge can be fitted by merely snapping it into position.
How many different typefaces does the SR-10/15 provide?
The SR-10/15 does much better than some typewriters in providing at least 9 typefaces to choose from.
Is it possible for the SR-10/15 to print pictures?
Yes, it provides for the printing of pictures in six different dot graphic densities some of which is quadruple density.
User Manual
SR-IO/I5
USER’S MANUAL
,,,
NOT INTENDED FOR SALE
Federal Communications Commission
Radio Frequency Interference
Statement
The 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 interference 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 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:
OReorient the receiving antenna
@Relocate the computer with respect to the receiver
*Move the computer away from the receiver
@Plug the computer into a different outlet so that computer and receiver are on different
branch circuits.
If necessary, the user should consult the dealer or an experienced redio/television technician
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 Printing Office, Washington,
D.C., 20402, Stock No. 004-000-00345-4.
For compliance with Federal Noise Interference Standard, this equipment requires a shielded
cable.
A note about the programs in this manual:
This manual contains several programs that help to demonstrate the versatility of the
SR-lo/l5 printers. Star Mfg. Co., Ltd. has made every effort to insure that the programs
are functional and accurate. However, Star Mfg. Co., Ltd. cannot guarantee their accuracy
or suitability to any particular application.
-
-
Trademark Acknowledgement
SR-10, SR-15: Star Mfg. Co., Ltd.
grafstar: Star Micronics
Apple, Apple II, Apple II + , Apple IIe, Applesoft: Apple computer Inc.
Commodore C-64: Commodore Business Machines, Inc.
Compaq: Compaq Computer corporation
CP/M: Digital Research
IBM Personal Computer, IBM PC: International Business Machines Corp.
Kaypro: Kaypro Computer Corporation
Microsoft BASIC: Microsoft Corporation
Osborne 1: Osborne Computer Corporation
TRS-IIO: Radio Shack, a division of Tandy Corporation
@Copyright 1984 Star Mfg. Co., Ltd.
-
.-
i h..
I L.
/
/ ‘
/ .,
A Special Message
to the New Owner
You’re to be congratulated on selecting the printer of choice
for both the sophisticated as well as the first-time user/owner
-
the new SR-lo/Is!
Right now, before you even start readying your SR-lo/15
for action, we’d like to impress you with these two thoughts:
1. In as few words as possible, we’ll highlight the several
special features that SR-lo/15 offers you, and
2. We’ll show you how this manual can help you get the
most from your SR-10/l& while saving you time, effort,
and money.
Taking up the special features first, so they’ll be fresh in your
mind as you ramble through this manual . . . specifically . . .
Speed - At 200 characters per second top printing speed, It’s
one of the fastest in its class. And SR-lo/15 is smart too: when
printing blank spaces, SR- 10/l 5 speeds up to a blistering 240
CPS!
634 Characters - Allows printing in no less than nine different
fonts of type faces, including a brand new face which we call .
. .
Near Letter Quality - A solid black dot-free, high-resolution type
face that looks more like typewriter than computer-generated
printing. Perfect for correspondence.
Faster Paper Handling - More economical, too. Automatic
feeding for both single sheets and sprocket paper. And the unique
built-in tractor design - behind the platen - avoids wasting a
sheet each time you start printing, as in conventional loading.
It also permits “reverse paper feed”, for multiple colunm printing
.
or other special applications, with a neater appearance, too.
Graphics - If you’re designing your own, you’ll be delighted at
finding six different dot graphic densities with varying degrees
of resolution or sharpness. There’s even a quadruple density, with
240 dots per inch horizontal by 72 dots per inch vertical! And,
you can print double density graphics at double speed !
Macro Instruction - A real timesaver on the keyboard. This
feature allows you to define a sequence of codes and call (transmit)
that entire sequence with a single code.
Easy Everything. r - All the DIP switches are quickly accessible
for ease in connecting your computer and changing print parameters; the ink ribbon comes in its own enclosed cartidge, ready
to snap into place; paper is machine-fed, not cranked into place
manually. Easy is the word for SR~l0/15!
We think you’ll also find this manual easy and pleasant to
use. We’ve gone to great lengths to make it so. As a first example,
look over the table of contents and you’ll see what we mean.
Whether greenhorn or wizard, everybody will find what they need
to know to fulfill their expectations. We suggest that each new
user/owner, before you even unpack the box, read or at least scan
Chapters 2 and 3 - “Getting to Know Your SR-10/15” and
“Getting Started with SR-10/15” - as well as Chapter 1, “Setting
Up SR-10/15.“iNow you can unpack the box and start putting
things together.
When you’re ready to connect your computer to your
SR-10/15, look at Appendix J for directions applying to your
make of computer.
For you who wish to design your own characters, do your
own plotting, your own infinite variety of dot graphic patterns
and densities, you’ll have a ball! For you, Chapters 5 through
10 are a must, and of course everybody should look at Chapter
11, which tells how to maintain your SR-lo/15 for a long and
carefree life.
In this manual there are plenty of example programs to demonstrate and show off all of SR- 10/l 5’s features. Since many
SR-lO/ 15 users have IBM Personal Computers (or the equivalent)
all the example programs are written in Microsoft BASIC for
the IBM. But throughout the manual, users of other computers
will find hints on how to make SR-lo/15 work with their computer.
So, gentle reader, with this manual we hand you the key to
the wonderful world of SR-10/15. May you enjoy years of
handsome, fast, and carefree printing!
-
-
Table of Contents
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Setting Up SR-lo/15
Where Shall We Put It?
What Have We Here?
Removing the printer covers
Removing packing and shipping screws
Installing the platen knob
Installing the ribbon cartridge
Connecting SR-lo/15 to Your Computer
Getting to Know Your SR-lo/15
Components and Controls
Paper Selection and Loading
Loading single sheets
Loading sprocket-feed paper
Ribbon Installation
Adjusting the Gap
Self-Test
Some Tips for Smoother Operation
Getting Started With SR-lo/15
Using Commercial Software
First, some terminology
The escape code
Using this book without learning BASIC
Controlling SR-10/l!! With BASIC
Some Basics About BASIC
Establishing communications
The CHR$ function
Control codes
The escape code
Some problem codes
Command Syntax Used in This Manual
Selecting The Right Software Mode
Printing Text With SR-lo/15
Some Special Kinds of Text
Near Letter Quality characters
Italic printing
Underlining
1
9
23
27
35
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Superscripts and subscripts
Changing the Print Pitch
Expanded print
Making SR-lo/15 Print Darker
Mixing Modes
Summary
Line Spacing and Forms Control
Starting New Lines
Reverse line feeds
Changing Line Spacing
Moving down the page without a carriage return
Forms Controls
Form feed
Reverse form feed
Changing the Page Length
Top and Bottom Margins
Summary
Formatting Your Output
Using Horizontal Tabs
A one-shot tab command
Setting Left and Right tiargins
Using Vertical Tabs
A one-shot vertical tab command
Summary
Special Features of the SR-lo/15
Now hear this
Initializing SR- 1 O/ 15
Putting SR-lo/15 to sleep
Printing to the bottom of the sheet
Backspace, delete, and cancel text
“Zero” printing
Unidirectional printing
The seven bit dilemma
Block graphics characters and special symbols
International character sets
The macro control code
Summary
Creating Your Own Characters
Dot Matrix Printing
The Print Matrix
Defining Your Own Characters
Rule 1: Download chamcters are eight dots high
Rule 2: Dots cannot overlap
Add up each column of dots
Assigning a value to your character
Download character definition command
47
61
67
81
-
-
-
-
--
Chapter 10
Chapter 11
Appendix A
Appendix B
Appendix C
Appendix D
Appendix E
Appendix F
Printing Download Characters
Erasing Download Character Definitions
Defining Proportional Characters
Connecting characters
Summary
Printing With Dot Graphics
Comparing Dot Grapphics With Download
Characters
Using the Dot Graphics Commands
Specifying the number of columns of dots
Specifying the graphics data
Combining text and graphics
Printing a Design or Logo
Plotting With SR-lo/15
How the program works
High Resolution Graphics
If You Have Problems With BASIC
Summary
Basic Maintenance
Cleaning SR- 1 O/ 15
Replacing the Ink Ribbon
Replacing a Fuse
Replacing the Print Head
DIP Switch Settings
Switch Functions
ASCII Codes
Character Style Charts
Function Code Reference
Commands to Control Print Style
Front style controls
Font pitch controls
Special print modes
Commands to Control Vertical Position of
Print Head
Line feed controls
Form feed controls
Vertical tabs
Commands to Control Horizontal Position of
Print Head
Download Character Commands
Commands to Control Graphics
Macro Instruction Commands
Other Commands
Command Summary in Numeric Order
ASCII Code Conversion Chart
103
121
129
133
141
159
203
207
Appendix G Technical Specifications
Appendix H The Parallel Interface
Functions of the Connector Signals
Appendix I
Serial Interface Specifications
Configuring the Serial Interface
SR-10/15’s Serial Protocols
Serial busy protocols
XON/XOFF protocol
ACK protocol
Appendix J
Connecting With Computer
Connecting with IBM-PC and Compaq
BASIC programming
Listing programs
Connecting with Apple II computers
Applesoft BASIC
Listing programs
Connecting with TRS-80 computers
TRS-80 BASIC
Listing programs
Connecting with Kaypro, Osborne, and
other CP/M computers
Table 2-1 Left margin on the single sheet guide
Table 5-l Near letter quality commands
Table 5-2 Italic commands
Table 5-3 Underline commands
Table 5-4 Superscript and subscript commands
Table 5-5 Print pitch commands
Table 5-6 Expanded print commands
Table 5-7 Print emphasis commands
Table 5-8 Master select and the 256 ASCII codes
Table 6-1 Line feed commands
Table 6-2 Line spacing commands
Table 6-3 Form feed commands
Table 6-4 Form length commands
Table 6-5 Top and bottom margin commands
Table 7-1 Horizontal tab commands
Table 7-2 Left and right margin commands
Table 7-3 Vertical tab commands
Table 8-1 Bell commands
Table 8-2 Some miscellaneous commands
Table 8-3 Printing direction commands
Table 8-4 Eight bit control commands
Table 8-5 International character set commands
Table 8-6 International character sets
Table 8-7 Macro instruction commands
Table 9-l Download character commands
Table 10-l Calculating nl and n2
Table 10-2 Dot graphics commands
Table A-l DIP switch settings
Table A-2 International character sets
Table H-l Parallel interface pin functions
Table I-l Serial interface pin functions
Table I-2 DIP switch 3
Table I-3 Handshaking protocols
Table I-4 Data transfer rates
Table J-l IBM-PC parallel cable
Table J-2 Apple parallel cable
Table J-3 TRS-80 Model I parallel cable
Table J-4 TRS-80 Model II parallel cable
Table J-5 Kaypro parallel cable
Table J-6 Osborne 1 parallel cable
:;
97
105
116
130
132
221
224
225
225
225
229
231
233
233
235
235
CHAPTER 1
L..
SETTING UP SR- 1 O/ 15
L”
; c.,
In this chapter, we’ll show you how to unpack your new
SR-lo/15 printer, set it up in the right location, and get it ready
for you to load it with paper and start printing. But first . . .
WHERE SHALL WE PUT IT?
Before you do anything else, give some thought to where you’ll
I-.
be using your printer. Obviously, it will be somewhere near your
computer. And both printer and computer will lead longer,
healthier lives if they like their environment. For a congenial
environment, we recommend . . .
. .
l Placing the printer on a flat surface
l Keeping it out of direct sunlight and away from
heat-producing appliances
l Using it only in temperatures where you are comfortable
l Avoiding areas with a lot of dust, grease, or humidity
l Giving it “clean” electricity. Don’t connect it to the same
circuit as large, noise-producing motors
l Power supply voltage should be the same voltage that’s
specified on the identification plate - not over 10% more
or less than the recommended AC voltage.
Warning: Extremely high or low voltage can damage your
printer.
WHAT HAVE WE HERE?
Now let’s take a look at what’s in the carton. Take it slow and
easy, and check each item in the box against Figure l-l. There
should be exactly 8 items.
Figure l-l. Inside the carton you should have received: 1) SR-lo/15
printer, 2) cut sheet guide, 3) continuous paper guide, 4) power cord, 5)
platen knob, 6) spare fuse, 7) ribbon cartridge, and 8) this user’s manual.
-
-
Let’s move on the next step . . .
m Removing the printer covers
What are covers for, really? Primarily, for two reasons: one,
to keep dust and dirt away from the delicate “innards,” and two,
to keep the noise level down. The front cover must be on or
SR-lo/15 will not print. So, you should keep the covers on all
the time, except when setting the ink ribbon cartridge in place,
loading paper, or making other adjustments when the cover might
be in the way.
SR-lo/15 has ~WU covers, front and back. Both operate in the
same way. To remove them, lift up the free end (nearest the center
of the printer) so that the cover makes approximately a 45” angle
----~___- - ____ -.----
2
-
d
-
-
-
-
-
_
with the printer frame, then with a slight rocking motion, lift it
straight up and off the machine. To replace, just reverse the
procedure.
Figure l-2 illustrates the proper position and
movement for both removal and replacement of the covers.
R/ear cover
Figure l-2. Remove the printer covers by tilting them up to about 45”,
then lifting straight up.
n Removing packing and shipping screws
There are three (on an SR-10 ) or four (on an SR-15 ) shipping
screws on the bottom of the printer, used to hold the internal
chassis securely to the external frame during shipping. To get
at these, carefully place the printer upside down on a soft surface
like a foam cushion. Remove the screws with a Phillips screwdriver
as shown in Figure l-3.
Next, remove the front cover, and remove the spiral tube on
the carriage stay which protects the print head, per Figure 1-4.
You’ll be smart to save these screws, along with the rest of the
packing material and the shipping carton, in case you ever have
to ship the printer. Tape the screws somewhere on the carton
or packing.
3
Figure l-3. SR-10 has three screws which secure the chassis during
shipping; SR-15 has four. They should be removed before use.
n Installing the platen knob
This is the knob that turns the rubber platen cylinder. It fits
into the hole on the right side of the printer case. Just match the
odd-shaped hole in the knob with the same shape on the shaft
you’ll see inside the hole in the case, and press it on firmly. Give
4
-
-
Figure 14. Remove the spiral tube on the carriage stay that protects
SR-10/15’s print head.
the knob a few turns to see that it’s turning the platen easily and
smoothly.
n Installing the ribbon cartridge
The ribbon cartridge greatly simplifies installing the ink ribbon.
For easy installation, though, it’s wise to follow the sequence
and diagrams shown here.
1. Turn the power switch off, and remove the front cover
(as explained earlier.)
2. Slide the print head gently with your fingers to the approximate center of its pathway.
3. Note the position of the guide pins on the cartridge as
shown in Figure l-5. Then hold the cartridge at each end,
with the ribbon facing away from you, and insert the guide
pins into the cut-out hooks of the printer frame. You’ll
find this easier if you tilt the cartridge forward as you
do this, as Figure l-6 shows.
4. Using the guide pins as a fulcrum, lightly press the car-
tridge down until the two holder springs snap shut to
hold the cartridge firmly in place.
Guide pin
Figure l-5.
A guide pin on each side of the ribbon cartridge helps to
align the cartridge during installation.
Guide pin
-
-
Figure l-6. Tilt the ribbon cartridge in until the guide pins meet the hooks
in the printer frame, then lower the front edge until the holder springs
hold it-in place.
__--
6
_---
5. Now thread the ribbon carefully between the print head
and the ribbon guide next to the platen. (Take a good
look at Figure l-7.) You might want to use a ball point
pen to lightly press the ribbon guide against the platen
(runbber roller) while you insert the ribbon into the thin
space between the print head and ribbon guide. Zmporiant:
Center the ribbon vertically in the middle of the print
head to avoid misprints or the ribbon coming off during
printing.
6. Turn the spool gear knob in the direction of the arrow
printed on the top left side of the cartridge to take up
the slack in the ribbon; continue turning the spool gear
four or five times to verify that everything is properly set
and ready to roll.
7. As a final step, replace the front cover. As you’ll learn
in Chapter 2, SR-lo/15 refuses to print unless the front
cover is securely in place! A glowing, “pause” lamp warns
of a loose cover. When this occurs, do the obvious thing:
fasten the cover securely, press the pause button to douse
the green light, and you’re back in business!
Figure 1-7. Use a ball point pen to place the ribbon between the print
head and the ribbon guide. It’s important that the ribbon is centered
vertically between the print head and the ribbon guide.
7
CONNECTING SR-lo/15 TO YOUR COMPUTER
To complete the installation, you’ll need to connect SR-lo/15
to your computer. Figure l-8 shows where the cable connects,
but there’s more that you need to know. Find the appendix and
follow the guidelines for making connections (“interfacing”) and
for setting the DIP switches.
If you cannot connect to your
computer, then your Star dealer will give you advice on connecting
SR-lo/15 to your computer.
--
Figure 1-8. SR-lo/15 has parallel interface as standard.
Then, in Chapter 2, you’ll learn how to load paper (here’s where
you’ll use the paper guides) and operate SR-10/15.
8
-
-
-
-
I
CHAPTER 2
GETTING TO KNOW
YOUR SR-lo/15
.^
li.
L.
L..,
Lr
The more you learn about SR-lo/15 and its sophisticated
.-
features, old and new, the better SR-lo/15 is going to perform
for you. Remember, it’s not just what you know - it’s what
you know how to use! So, let’s start getting acquainted!
Subjects we’ll cover in this chapter include:
l Components and controls
l Paper-out and front-cover-open detectors
l Paper selection and loading
l Adjusting the gap -
l Self-test - printout of available characters
l Some tips for smoother operation
for different paper thickness
COMPONENTS AND CONTROLS
First, the components. You saw most of these when you unpacked you printer. Now we’ll give you a condensed rundown
on what they do. (For details on your initial set-up of
SR-10/15, with all components in place, see Chapter 1.)
PRINTER COVERS - There are two, front and rear. Their
function is to protect the ribbon and print head from dust and
dirt, and also to reduce the sound level.
SINGLE SHEET GUIDE - As you’ve guessed, this plastic rack
is used to support and guide the single sheets during printing.
SPROCKET PAPER GUIDE - This wire rack serves the same
function, but for sprocket paper.
INK RIBBON CARTRIDGE - A neat and tidy timesaver, which
snaps into place within a few seconds.
POWER CORD - Connects the printer to its power source,
usually a wall outlet. It’s located at the right rear.
PRINT HEAD - This is the unit which does the actual printing.
Ground terminal
-
-
Power cord connector
Figure 2-1. Front and rear views of SR-IO.
Like a typewriter, the print head prints through an ink ribbon.
TRACTOR - This built-in unit sits in the rear of your printer,
under the rear cover. Its sprocket wheels carry the sprocket-feed
paper on its pathway through the printer.
PLATEN - This is the rubber cylinder that carries paper to the
print head.
-
Control ,Ll W
.Bail lever
Power cord conndr ‘\
Figure 2-2. Front and rear views of SR-15.
INTERFACE CONNECTOR - Around on the back, this is the
place where you connect your computer to SR-10/15, so that they
are able to communicate with each other.
Now let’s take a tour around the controls, starting with the
control panel board, located at the right front. There are 5 lamps
and 5 buttons on the panel:
--.-____
11
Figure 2-3. SR-10/15’s controls.
POWER LAMP - Glows green when the power is on.
READY LAMP - Glows green when the printer is ready to accept
data. This light flickers during transmission. Don’t worry about
the flicker; it’s normal!
ON LINE LAMP - Glows green when the communication lines
to your computer are open.
PAPER-OUT LAMP - Glows red when the printer is out of
paper and stops printing. It works only when you’re using
sprocket paper.
PAUSE LAMP - A very important control! It glows green when
the pause button has been pressed or when the front cover has
been opened. When the pause lamp is on, you can feed paper
with the LF, FF, or Feed buttons - but there’s no printing
possible. When the pause lamp is off, the printer will print but you can’t feed paper.
PAUSE BUTTON - Basically, this button allows you to change
the printer status from “printing” to “not printing” or vice versa,
with the results stated above under the Pause Lamp heading.
This allows you to stop printing to advance the paper - a few
lines or to the top of the next page.
FEED BUTTON - This is used for automatic feeding of single
sheets, which is described in detail later in this chapter.
LF BUTTON - Stands for “Line Feed,” and allows you to
advance the paper one line at a time when the pause lamp is on.
If you hold the button down, you’ll get consecutive line feeds,
one after the other.
FF BUTTON - Stands for “Form Feed.” When you tap this
button while the pause lamp is on, you advance the paper to the
top of a new page or “form.”
ON LINE BUTTON - Lets you change the printer status between
“off line,” and “on line”. When it’s on line, the printer can receive
-.
12
data from the computer. When it’s off line, the printer sends a
signal to the computer indicating that it cannot accept data.
When you turn the power switch on, you are automatically on
line.
There are other kinds of controls, not connected to the control
panel board. Some of the more important ones are:
POWER SWITCH - Towards the back on the right side. This
turns on the electricity to your machine.
PLATEN KNOB - Middle, right side. Lets you manually turn
the platen, just like a typewriter. CAUTION: Turn this knob
only with power switch c$J Turning it with the power on could
damage the platen drive gears.
RELEASE LEVER - On top, near the left rear corner. You’ll
be using this particular control often. What it does is control the
pressure of the paper against the platen. Its position is crucial
to feeding the different paper types - sprocket and single sheets.
It has three settings: “Friction,
two are used for single sheet printing, and the Tractor position
for sprocket paper. This will be fully explained in the section
describing paper loading procedures.
BAIL LEVER - The bail is the movable bar that presses the
paper against the platen during printing, and when moved away
from the platen, allows the paper to reach its proper position
during the loading operation. The lever which controls it is on
the right side of the platen.
PAPER-OUT DETECTOR - This sensor automatically stops
printing and tells you when the printer runs out of sprocket paper.
The paper-out lamp glows red and a beep tone alerts you when
the printer runs out of paper. The pause lamp also glows, so you
are ready to load more paper. The lamp also glows if the release
lever is not set in the tractor position for sprocket paper loading.
FRONT-COVER-OPEN DETECTOR - When the front cover
is not fully closed, this magnetic detector causes the pause lamp
to glow, and printing is interrupted (or won’t begin). If this
happens, printing may be re-started by securely closing the cover
and pressing the pause button.
DIP SWITCHES - Primarily, these switches are used in inter-
facing SR- 10/l 5 to your particular brand of computer. But there
are also switches to set the power-on default settings for print
style, and page size. See the appendix for a complete explanation.
” “Set,” and “Tractor.” The first
13
PAPER SELECTION AND LOADING
Now we’ll look at paper. Your SR-lo/15 can handle single
sheets - standard-size stationery, multi-part carbonless business
forms, or almost any other kind of cut sheet. You can also print
on “computer paper” with the holes along the sides, which is
also called sprocket, punched, or perforated fan-fold. The loading
procedures are quite different for single sheet and sprocket paper.
We’ll try to keep it short and sweet, but without sacrificing clarity
and preciseness in our explanations.
-
H Loading single sheets
Start with the proper paper. Paper width must be between 5%
and 8 ‘/z inches (5 l/z and 14 % inches for the SR- 15) and paper
thickness between .07 mm and .lOmm (16 pound to 24 pound
bond falls in this range). Loading is done automatically and
instantly by pushing the Feed button. Here’s the correct sequence.
1. Attach the single sheet guide to the printer (Figure 2-4).
2. To set the margin, use the little metal guide (shown in
Figure 2-5) in one of its 3 positions.
3. Put the release lever in the “set” position. This step is
very important for proper sheet alignment.
4. Putting the left edge of the sheet against the metal guide,
insert a sheet into the paper chute until the bottom edge
of the paper touches the paper stopper. (The set position
of the release lever permits you to get the paper in straight.)
5. Now, push the release lever away from you to the
“friction” position. This grips the paper securely for
proper feeding.
6. Make sure that the bail is resting against the platen (you
should push the bail lever away from the front of the
printer). SR-lo/15 will automatically lift it out of the
way at the proper time!
7. With the power on, press the Feed button, and the paper
automatically moves around the platen to the correct
position to start printing, just one inch from the top edge
of the sheet!
Note: If you’d like to start the first line of printing lower
down on the sheet, as for letter correspondence for example,
just press the Pause, then the LF (line feed) button to move
the paper to the desired starting point. Hold down the LF
button for multiple line feeds.
-
-
-
--
-
-
-
14
Figure 2-4. Use the single sheet guide for loading cut paper.
Table 2-1
Left margin on the single sheet guide
Position of
Guide
Left
Middle
Right
Distance from Left-Hand Edge of Paper
For SR-10
Approx. .6 inch
Approx. .3 inch
Approx. .l inch
For SR-15
Approx. .8 inch
Approx. .5 inch
Approx. .3 inch
a Loading sprocket-feed paper
Continuous paper feeds into the printer from the rear. So, the
paper should be stacked directly back of the printer, either on
the same surface, if there’s room, or on the floor.
Figure 2-5. The metal guide is used to align the left margin.
Here’s the proper sequence for loading:
--
-
-
1. Turn off the power and remove the rear cover. (After
you’ve practiced a few times, you’ll find it easy to load
paper by just opening the cover.)
2. Attach the wire paper guide to the rear of the upper case,
as shown in Figure 2-6.
3. Pull the release lever towards you to put it in the “tractor”
position.
4. Pull the bail lever towards you to the open position.
5. Open the tractor covers, located on top of the left- and
right-hand sprocket units (Figure 2-7).
6. Flip the sprocket clamp levers towards the rear. This
unlocks the sprocket wheels to move left and right so you
can align them with the holes in the paper.
16
-,
-
-
-_
-
-
Figure 2-6. The wire paper guide keeps continuous paper away from the
cables.
Figure 2-7. The tractors, which guide the paper, are underneath the rear
cover.
17
Figure 2-8. With the tractors in place, you’re ready to close the covers
and advance the paper.
7. Bring the paper up from the back, over the wire guide,
and into the back of the printer. When the holes in the
paper fit snugly over the nubby teeth in both sprockets,
close the tractor covers and snap the clamp levers back
into their locked positions (Figure 2-8).
8. Now we’ll feed the paper around the platen automatically.
To do this, close the rear cover, turn on the power, then
push the Pause button and hold down the LF button until
the paper moves smoothly into position.
9. Close the bail lever (push away from you). The top edge
of the paper should line up with the cutter edge of the
front cover so that printing will start one inch from the
top edge.
-
-
- -
-
-
.-
RIBBON INSTALLATION
This is described in two places: installation of the ribbon cartridge is explained in Chapter 1; replacing the ink ribbon inside
the ribbon cartridge casing is described in Chapter 11
(“Maintenance”).
18
-
-
-
ADJUSTING THE GAP
The gap is the space between the print head and the platen.
Adjusting the gap is simply adjusting the printer to accommodate
different thicknesses of paper.
To make this adjustment, move the adjustment lever which is
under the front cover, immediately in front of the release lever
shown in Figure 2-9. Pulling the adjustment lever towards you
will widen the’ gap; pushing it away from you will narrow the
gap.
Figure 2-9. The adjustment lever allows for different thicknesses of paper.
Five positions are available; you can feel the lever clicking into
the various notches. The second step (illustrated) is the one most
commonly used for single sheets of paper. The lever is nearly
straight up in this position.
You shouldn’t encounter any difficulty in finding the right gap
setting to fit your paper. If necessary, experiment; you’ll soon
find the best position for the paper you’re using.
19
SELF-TEST
The “self-test” is a trial run of your beautiful new machine.
SR-lo/15 carries a built-in program that prints out sample lines
of letters, numbers, and other characters - to show you that
everything’s in good working order. It also serves as a display
of the characters available in the SR-10/15. And finally, it’s a
“warm-up” that permits you to check your installation of ribbon
and paper, and the adjustment of the print head gap.
Best of all, you don’t have to wait another minute - you can
print the self-test without hooking up the SR-lo/15 to your
computer! It’s as simple as 1, 2, 3...
1. Plug the printer’s power cord into an electrical outlet.
2. Insert a sheet of paper (or sprocket paper, either one).
3. While holding down the LF button, turn the power switch
on.
Were you surprised? It’s speedy, isn’t it? 200 characters a second,
to be exact (when printing normal pica type).
-
-
-.
-
-
-
-
-
Figure 2-10. SR-10/15’s self-test gives a preview of its capabilities.
SOME TIPS FOR SMOOTHER OPERATION
Here are some ideas that might save time and trouble with
SR-10/15.
l When setting the left-hand margin on sprocket paper,
you’ll find the bail bar is marked with pica size unit
measurements, so it’s a handy reference. (There are 10
pica characters to the inch, so the markings 10, 20, 30
and so on also correspond exactly to inches, 1, 2, 3, etc.)
l The sprocket paper is perforated in page size units, to
facilitate easy folding (that’s the way it comes, in a stack).
It is this edge that you should align with the front cover
cutter edge so that printing will start just one inch below
that point.
l When loading sprocket paper, never place the release lever
in either the “set” or “friction” position. You’ll know
when this happens by the beep tone and the paper-out
lamp glowing red. Use the “tractor” setting at all times
when loading or running sprocket paper.
l When you use multi-layer paper, such as a 3-part car-
bonless form, you should adjust the print head gap to
lit the greater paper thickness, as explained earlier in this
chapter.
l If paper should jam when loading sprocket paper, it’s
usually because you forgot to put the bail lever in the
open position (by pulling it towards you). Best thing to
do then is to turn the power off, open the front cover,
and roll the paper backwards by turning the platen knob.
l If the printing is faint, first check the thickness adjustment
lever, then try a new ribbon. If it’s still too faint, perhaps
it’s finally time for a new print head.
21
..,
CHAPTER 3
GETTING STARTED
WITH SR-lo/l5
i.
_.
_.
L
.
L-.
LI
-_
In this chapter you’ll learn about:
l Using SR-lo/15 with commercial software
l ASCII codes
You have assembled and tested your printer, and seen a quick
sample of SR- lo/15 ‘s capabilities in the self-test. Now it’s time
to do what you bought SR-lo/15 to do: print information from
your computer.
USING COMMERCIAL SOFTWARE
Many of you purchased SR- 10/l 5 to use with commercial
software. You made a good choice because SR-lo/l5 is com-
patible with most commercial programs, from word processing
programs to spreadsheet programs to accounting programs.
Many of these programs have a routine for describing your
printer. These routines are often in “installation programs”.
They typically give you a choice of printers or printer types to
pick from. Some typical descriptions that you might pick for
SR-lo/15 are:
matrix printer”,
printer”.
“TTY type printer with backspace”, “IBM-dot
“Centronics-type printer”, “Dot matrix ASCII
SR- lo/15 should work fine with any of these descrip-
tions.
Some printer lists are not very clear, and may not include
anything that you think describes SR-10/15, If you can’t decide
which description best fits SR-lo/15 we recommend that you
narrow the list to two or three choices (you can quickly eliminate
all the daisywheel printer types) and then experiment. You won’t
hurt anything if you guess wrong; it just won’t work right. This
should quickly tell you if your guess is right. If all else fails,
though, your Star dealer will be happy to give you some advice.
Some programs don’t ask you what kind of printer you have,
but instead they ask some questions about what your printer can
do. Here are the answers to the “most asked” questions. SR-lO/ 15
can do a “backspace”.
With these questions answered, you are ready to start printing.
Read the manual that came with your commercial software to
see how to make it send information for SR-lo/15 to print. This
is all you need to know to use SR-lo/15 as a regular printer.
But SR-IO/l5 isn’t just a regular printer.
has many capabilities that your commercial software isn’t aware
of. A little later we will see what it takes to use some of SR- lo/ 15’s
advanced features with commercial software.
n First, some terminology
SR- 1 O/ 15 knows what to print because it knows how to interpret
the codes that the computer sends to it. These codes are numbers
that the computer sends to SR-10/15. Both the computer and
SR- 10/l 5 know the meaning of these codes because they are a
set of standard codes used by almost all microcomputers. This
set of codes is the American Standard Code for Information In-
terchange, which is usually referred to as ASCII (pronounced
ask-key ). There are ASCII codes for all the letters of the alphabet,
both lower case and capital, the numbers from 0 to 9, most
punctuation marks, and some (but not all) of SR-10/15’s functions.
ASCII codes are referred to in several different ways, depending
on the way they are used. Some times these codes are treated
as regular numbers. For example, the letter “A” is represented
by the number 65 in ASCII. Appendix F shows all of the ASCII
codes.
In BASIC, ASCII codes are used in the CHR$ function. This
function is used to print the character that is represented by the
number in the CHR$ function. The BASIC statement PRINT
CHR$ (65) will print an “A” on the terminal.
In some other programming languages, ASCII codes are referred to by their hex value. “Hex” is short for hexadecimal which
is a base- 16 number system (our usual numbers are base- 10). Since
hex needs 16 digits, it uses the numbers 0 through 9 and then
it uses the letters A through F for digits. The ASCII code for
the letter “A” is 41 in hex.
Of course, most of the time we don’t even need to think about
this code system. Our computers are smart enough to know that
SR-lo/15 can do a “hardware form feed”.
SR- lo/15
24
when we press the “A” key on our keyboard we want to print
the letter “A”. The computer takes care of all the rest.
But there are a number of ASCII codes that don’t have keys
on the keyboard. The most important of these codes are the codes
that have ASCII values below 32. These codes control many of
SR- 10/l 5’s functions. Even though there aren’t keys for these
codes, most keyboards can send these codes. It’s done by holding
down the “control” key (many times marked CTRL) and simultaneously pressing a letter key. The particular letter key that
is pressed determines what code is sent. Control and A sends
ASCII code 1, control and B sends ASCII code 2, and so on.
Because of the way they are created, these codes are often referred
to as “control-A” etc.
So there are four common ways of referring to the same set
of codes: the character or name of the code, the decimal ASCII
value, the hexadecimal ASCII value, and the “control-” value.
For example, the code that causes SR-lo/15 to advance the
paper one line is ASCII 10 (decimal). This code is commonly
referred to by all the following names:
line feed - its name
<LF> - the abbreviation of its name
ASCII 10 - its decimal value
ASCII OAH - its hexadecimal value (the H signifies hex)
CHR$( 10)
control-J -
- the way it’s used in BASIC
the way you send it from a keyboard.
There’s a chart in Appendix F that shows these side-by-side so
that you can convert back and forth.
The reason that we are telling you all this about ASCII codes
is that people are not very consistent about how they describe
ASCII codes. We are going to help you use SR- 10/l 5 with
commercial software, but we don’t know what its documentation
is going to call the various codes. So if you know all the different
things that the codes might be called, it will be easier to figure
out what it is trying to tell you.
Now, armed with the knowledge of what to look for, you can
delve into the manuals of your commercial software and dig out
the secrets of how to send “control codes” to your printer. When
you find the method that your program uses, then you can shop
through this manual to find the function that you want to use.
25
By translating the codes from the system that we use, to the system
that your commercial software uses, you should be able to use
many of SR-10/15’s advanced features. It may help, however if
we look at a couple of examples.
n The escape code
There’s one particular ASCII code that we are going to be using
more than all the rest. This is ASCII 27, which is called escape.
With all of SR-10/15’s advanced features, there weren’t enough
single ASCII codes to go around. So escape is used to start se-
quences of control codes that open a wider range of functions
to us.
While you must call this code CHR$(27) in BASIC, we are
going to refer to it as < ESC > in this book. This will make it
much easier to recognize when we use it.
A typical escape code sequence starts with < ESC > which is
followed by one or more codes. As an example, the escape code
sequence to turn on emphasized print is:
<ESC> “E”
We’ll learn more about these escape code sequences and how
to use them in the chapters that follow.
-
-
-
n Using this book without learning BASIC
Throughout the latter part of this book we will be teaching
you how to use all of SR- 10/15’s features using the BASIC
programming language in our examples. This is because it is easy
to communicate with SR- 1 O/ 15 from BASIC and because, despite
its shortcomings, BASIC is the nearest thing to a universal language among users of personal computers. But it’s not the only way to communicate with SR-10/15. Even if you don’t know
BASIC, you can learn how to use SR- 1 O/ 15’s features by reading
on. When you find a function that you want to use, just apply
what you already know about translating from one name for codes
to another. The examples will still show you how the commands
are used, even if you are not using BASIC.
26
-
-
CHAPTER 4
CONTROLLING
SR-lo/15 WITH BASIC
Throughout the rest of this book we will be teaching you how
to use SR-lo/15 ‘s features using the BASIC programming language in our examples. It is easy to communicate with SR-lo/15
from BASIC and, though it has its detractors, BASIC is the
nearest thing to a universal language among users of personal
computers. But remember that it’s not the only way to communicate with SR-10/15, as we have already seen.
Subjects covered in this chapter include:
l Listing BASIC programs on the printer
l Printing from BASIC
l CHR$ function
l Problem codes
l Command syntax used in this manual
l Selecting the right software mode
All of the examples in this manual are written in Microsoft
BASIC (specifically, Microsoft BASIC for the IBM Personal
Computer). With minor modifications, the examples can be
adapted to run in any version of BASIC. In this chapter, we’ll
tell you what modifications need to be made and how to do it.
In this chapter we assume that you have some familiarity with
BASIC.
SOME BASICS ABOUT BASIC
Probably the simplest thing to do with your printer in BASIC
is to list a program on the printer. But in this world of proliferating
microcomputers even this presents a problem. It seems that every
computer uses a different system of communicating with the
printer. We are going to tell you about some of the more common
ways, and hope that between this and your computer’s BASIC
manual you will be able to stay with us.
First on our list is Microsoft BASIC’s way of communicating
with the printer. They just add an “L” to the beginning of the
LIST and PRINT commands, making them LLIST and LPRINT.
This method is used by more computers than any other and so
we will use it throughout this book, after telling the rest of you
how to follow along.
Microsoft BASIC is used by TRS-80 computers, IBM-PC
computers, many CP/M computers, and many other computers.
(Look in your BASIC manual; it will probably say if it’s Microsoft
BASIC.)
Next we need to talk about Apple II computers. They have a
real simple system. To list a program that you have loaded into
memory, just type:
PR#l
LIST
PR#@
-
-
The PR#l says “send everything to the printer,” the LIST sends
it, and the PR#O says “OK, back to the screen now.”
Some other computers require you to open the printer as a
numbered device, and then direct the output to that device. For
example, to list a program on the printer with a Commodore
C-64 computer you type the following:
OPEN4,4
cMD4
LIST
CLOSE4
This says that the printer is device 4, directs the output to it,
lists the program, and finally closes device 4.
The appendix gives more information about listing programs
on various computers. Find the appendix that tells how your
computer works, and try it.
Now that we all know how our computers address the printer,
let’s try listing a BASIC program. Load a BASIC program and
28
-
LLIST it (or however your computer does it). We’ve crossed the
first major hurdle-learning how to list programs on SR-10/15.
Now we are ready to jump into the world of programming with
SR- 10/l 5. But first, there are a few fundamentals that we need
L.
to cover.
: i.
L-..
L.
L, ‘-
L.
hr.
h.
L.
n Establishing communications
We’ve learned something about communicating with our
printer. Now we need to adapt what we know to printing in a
BASIC program. Generally, computers use about the same
procedure for printing in a program as they do to list a program.
Let’s try what we learned. Type the following:
NEW
10 LPRINT "TESTING"
RUN
Remember-we use LPRINT; you may have to use something
else!
At any rate, you should have the word “TESTING” on your
printer. Quite an achievement, isn’t it? Let’s get done with this
simple stuff so that we can go on to something interesting.
n The CHR$ function
We mentioned CHR$ in Chapter 3 as one way to express ASCII
codes. We are going to use it a lot in communicating with
SR- 10/l 5. SR-lo/15 uses many of the ASCII code that don’t
represent letters and numbers. The CHR$ function gives us an
‘-
easy way to send these codes to the printer. Try this to see how
the CHR$ function works:
L
NEW
10 LPRINT CHR$(83)
L
L
i
b...
L
RUN
That should print an “S” for Star. If you check the chart in
Appendix B you will see that 83 is the ASCII code for “S”.
29
r
;
‘_
w Control codes
SR-lo/15 uses many of the non-printing ASCII codes for
control codes. These codes perform a function rather than printing
a character. Let’s try an easy one right now:
NEW
10 LPRINT CHR$(7)
RUN
Where did that noise come from? That’s SR-10/15’s bell. We
will learn more about it in Chapter 8. We just wanted to illustrate
a code that causes SR-lo/15 to perform a function.
n The escape code
There’s one ASCII code that we are going to be using more
than all the rest. This is ASCII 27, which is called escape. In
BASIC it is CHR$(27). With all of SR-10/15’s advanced features,
there weren’t enough single ASCII codes to access all of them.
So escape is used to start sequences of control codes that open
a wider range of functions to us.
While you must call this code CHR$(27) in BASIC, we are
going to refer to it as < ESC > in this book. This will make it
much easier to recognize when we use it.
A typical escape code sequence starts with < ESC > which is
followed by one or more CHR$ codes. As an example, the escape
code sequence to turn on emphasized print is:
-
<ESC> CHR$(69)
In a program, this would look like this:
NEW
10 LPRINT CHR$(27) CHRS(69);
24) LPRINT "TESTING"
RUN
Try this program. It will print the word TESTING in emphasized print.
30
-
-
-
-
-
Some of you fast students may have noticed that CHR$(69)
is the same as “E”. That’s right, the program will work just as
well if line 10 is changed like this:
10 LPRINT CHR$(27) "E";
That’s just another form of the same ASCII code, and it’s all
the same to SR-10/15.
Here’s another shortcut for BASIC programmers: since
< ESC > is used so often, assign it to a variable. In a long
program, typing ESC$ is much easier than typing CHRS(27) each
time! Now our program looks like this:
5 ESC$=CHR$(27)
10 LPRINT ESC$ "E";
Turn your printer off and back on now, or you will be printing
in emphasized for quite a while!
n Some problem codes
Before we go too far we need to mention some codes that may
cause you problems.
Like most of the subjects in this chapter,
we have to be a little vague because of the differences in computers. Nearly all BASICS change some of the ASCII codes
between your BASIC program and your printer. Some turn
CHR$( 10) (a line feed) into a CHR$( 13) (a carriage return) before
sending it on. Some other problem codes are 0, 7, and 9 through
13.
COMMAND SYNTAX USED IN THIS MANUAL
Because SR-lo/15 users will be running such a wide variety
of applications we just couldn’t show the precise method of
sending printer control codes to SR-lo/15 for every one of them!
Instead, as we introduce you to each command, we will show
the commands like this example:
<ESC> "W" 1
31
This is the command to turn on expanded print < ESC > , as
we mentioned earlier, is the way we will indicate the escape code,
which is ASCII code 27.
A letter or number enclosed in quote marks (such as the “W”
above) means that character should be sent to the printer (without
the quote marks). 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 SR- lo/ 15’s 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 idea applies to commands
ending with 0.
So for our example above, any of these BASIC statements
will have the same result:
There are three commands that require the use of ASCII code
0; the character “0” (ASCII code 48) cannot be substituted. In
these cases, instead of an unadorned 0 we will show CHR$(O)
each time these commands are referenced. The commands are
< ESC > “C” CHR$(O) n (set page length to n inches), < ESC >
“D”... CHR%(O) (set horizontal tabs), and < ESC > “P”...
CHR$(O) or < ESC > “B”... CHR$(O) (set vertical tabs).
There are other non-printing codes that are used ( such as ASCII
code 15, which is used to turn on condensed pitch). These
commands will be introduced using the BASIC CHR$ function
(e.g.CHR$(lS)).
SELECTING THE RIGHT SOFTWARE MODE
For SR-IO/15 to correctly respond to control codes, you must
make sure that you’ve set its DIP switch properly. If you’re using
the IBM Personal Computer, you should put SR-lo/15 in IBM
mode. If you’re using other computer, you should put SR-lo/15
32
-
-
in STAR mode. There are some cases where you would use IBM
mode with your computer, if you wish.
Chapters 5 through 10 discuss the control codes you send to
SR-lo/15 to control printing style, horizontal and vertical for-
matting, graphics, and other features. You’ll find that many
features have different codes for IBM mode and STAR mode.
That’s it for the basics. You are ready to learn how to use the
many features of SR- 10/l 5.
6..
L
.
33
-
-
-
-
-
CHAPTER 5
PRINTING TEXT
WITH SR-lo/15
Beginning with this chapter we will be exploring all the features
of SR-10/15.
In this chapter we’ll cover:
l Near letter quality characters
l Italics
l Underlining
l Superscript and subscripts
l Print pitch
l Print emphasis
All our examples will be given in Microsoft BASIC as used
by the IBM Personal Computer, but remember that you don’t
need to know BASIC to use SR-10/15’s features. Just use the
same ASCII codes as we do in our examples.
You have already printed a few lines on your SR- 10/l 5 printer.
Now it’s time to start looking at the many variations of printing
style that you have available to you.
SOME SPECIAL KINDS OF TEXT
n Near Letter Quality characters
SR-10/15’s Near Letter Quality (sometimes abbreviated as
NLQ) character set is ideal for correspondence and other important printing, for it takes a keen eye to detect that it is from
a dot matrix printer. Normally (unless you have turned DIP switch
l-4 off), SR-lo/15 prints draft quality characters.This is adequate
for most work and it prints fastest. But for the final printout,
try NLQ. The program below shows how.
18 'Demo near letter quality character set.
24) LPRINT CHR$(27) "B" CHR$(4) ; 'Select NLQ.
30 LPRINT "This line shows NEAR LETTER QUALITY!"
40 LPRINT CHRS(27) "B" CHR$(5) ; 'Select draft.
50 LPRINT "This line shows standard Drint."
In this program, line 20 selects NLQ characters with the
< ESC > “B” CHR$(4) command. Line 30 prints a sample before
line 40 switchs SR-lo/15 back to draft printing with an < ESC >
“B” CHR$(S). When you run the program you should get this:
This line shows NEAR LETTER QUALITY!
This,
1 i ne shows c,tandat-d print .
If you are using with the IBM mode, change the following lines
to the program given above.
20 LPRINT CHR$(27) "4" ; 'Select NLQ.
44) LPRINT CHR$(27) "5" ; 'Select draft.
Table 5-1
Near letter quality commands
H Italic printing
Italic letters are letters that are slanted to the right. SR-lo/15
can print all of its letters except NLQ characters in italic as well
as the roman (standerd) letters you are accustomed to. Italics
can be used to give extra emphasis to certain words. The cornmand codes to turn italic on and off are shown in Table 5-2.
Table 5-2
Italic commands
Function
Italic ON
Italic OFF
Mode Control code
STAR <ESC > “4”
IBM
< ESC > “I” 1
STAR < ESC > “5”
IBM
< ESC > “I” 0
Use this program with STAR mode to see italic characters:
36
,l@ ‘Demo italic and roman.
20 LPRINT CHR$(27) “4” ; ‘Italic on.
30 LPRINT "This line is in ITALIC characters."
40 LPRINT CHR$(27) "5" ; 'Italic off.
5@ LPRINT "This line is in ROMAN (normal) characters."
Here is what you should get:
I. c
: . .
This program is easy; line 20 turns italic on with < ESC > “4”,
and line 40 turns it off with < ESC > “5”.
n Underlining
Not only can SR- lo/ 15 print all styles ot printing in both roman
and italic, but it can underline them too. The control codes are
shown in Table 5-3.
Table 5-3
Underline commands
Function
Underline ON
Underline OFF
Mode Control code
STAR <ESC> “-” 1
IBM
<ESC> “-” 1
STAR <ESC> “-? 0
[IBM 1
<ESC> “-” 0
Again, that’s simple. Let’s try it with this program:
In this program underline is turned on in line 20 with < ESC >
‘L _ 97
CHR$(l), and then off in line 40 with < ESC > “ - ”
CHR$(O). There’s a new little wrinkle in this program, though.
It all printed on one line. The semicolons at the end of the first
three lines told BASIC that those lines were to be contin-
37
ued.Therefore, BASIC didn’t send a carriage return and line feed
at the end of those lines. We just did this to illustrate that all
these control codes can be used in the middle of a line. It’s easy
to underline or italicize only part of a line.
n Superscripts and subscripts
SR-lo/15 can print in two different heights of characters. The
smaller characters are called superscripts and subscripts and are
half the height of normal characters. Superscripts print even
with the tops of regular printing while subscripts print even with
the bottom of regular printing. They are frequently used to
reference footnotes, and in mathematical formulas.
Table 5-4 has the codes for using superscripts and subscripts.
79 LPRINT CHR$(27) "S" CHR$(l) ; 'Subscripts on.
80 LPRINT "subscripts w ;
98 LPRINT CHR$(27) "T" ; 'Cancel subscripts.
108 LPRINT "on one line."
Here line 30 turns on superscripts with < ESC > “S” CHR$(O).
It’s turned off in line 50 with < ESC > “T”. Then, between
printing text, subscripts are turned on in line 70 with < ESC >
38
-
“S” CHR$( l), and finally off in line 90. Again, everything prints
on one line because of the semicolons.
CHANGING THE PRINT PITCH
In “printer talk,” character width is called pitch. Normally,
SR-lo/15 prints 10 characters per inch. This is called pica pitch
because it’s the same spacing as a standard pica typewriter.
SR- 10/l 5 can also print 12 characters per inch. This is called
elite pitch because it is the same spacing as an elite typewriter.
Condensed print is approximately 17 characters per inch.
Condensed pitch allows you to get 136 columns of printing on
an 8 ‘/z inch page.
Proportional spacing provides an alternative to the block-style
output of a defined pitch. It moves its print head only as far as
each character needs. Thus, the print head moves further for “M”s
and “W”s than for “1”s and “i”s.
The table below shows four options of this command.
Table 5-5
Print pitch commands
Pitch
Pica
Characten$ncb Mode Control code
10 STAR < ESC > “B” CHR!$(l)
or CHR$( 18)
IBM
<ESC> “pl’
or CHR$(18)
1 Elite I 12 1 STAR i < ESC > “B” CHR!N2)
IBM 1
Condensed 17
STAR <ESC> “B” CHR$(3)
I
< ESC > “M”
.\ I
or CHR$(lS)
IBM CHR!!( 15)
Proportional ON
STAR < ESC > “p” 1
IBM < ESC > “D” 1
Proportional OFF STAR < ESC > “p” 0
IBM < ESC > “p” 0
I
I
Let’s see how these four pitches look. Try this program with
STAR mode:
Line 20 turns on condensed pitch with < ESC > “B” CHR$(3).
Line 30 prints a line at 17 characters per inch. The < ESC > “B”
CHR$(2) in line 40 changes SR-lo/l5 to elite pitch and line 50
prints a line in elite pitch. Line 60 turns on proportional spacing
with < ESC > “p” CHR$(l),
and line 70 prints a line with
proportional spacing. Line 80 and line 90 reset SR-lo/15 to pica
pitch and line 100 prints a line in pica pitch.
Pica pitch and condensed pitch can be set with “shortcut” codes.
Instead of using < ESC >
a single code.
CHR$(18) sets pica pitch and CHR$( 15) sets
“B” CHR$(n), you can set the,m with
condensed pitch. You can not set elite pitch with a single code.
-
-
n Expanded print
Each of SR-10/15’s four print pitches can be enlarged to twice
its normal width. This is called expanded print.Try this program
100 LPRINT "automatically turns off at end of a line."
40
-
-
-
-.
-
-
-
-
Expanded print set with CHR$(14) is automatically canceled
at the end of the line. This is convenient in many applications,
such as for one line titles. Note that you don’t need to put an
< ESC > in front of the CHR$( 14), although < ESC > CHR$( 14)
works just the same.
You can also cancel one line expanded print before a carriage
return with CHR$(20), as done in line 50.
Sometimes you may wish to stay in expanded print for more
than one line. Change your program to this*
10 'Demo permanent expanded mode
20 LPRINT CHR$(27) "W" CHR$(l) ; 'Expanded mode on
permanently.
30 LPRINT "Permanent expanded"
44) LPRINT "mode stays on until"
50 LPRINT "it is w ;
6Q LPRINT CHR$(27) "W" CHR$(fl) ; 'Expanded mode off.
70 LPRINT "turned off."
Now the results look like this:
F’~rmea17ent
rn 0 d ez
it i?si. turned off .
c,t:z’ly~ al-b ur-ktil
expanded
When you turn on expanded print with < ESC > “W” CHR%( 1)
it stays on until you turn it off with < ESC > “W” CHR!§(O).
Table 5-6
Expanded print commands
Function
One line expanded ON STAR CHR$(14)
One line expanded OFF
Expanded ON
Expanded OFF
Mode Control’ code
or < ESC> CHR$(14)
IBM
STAR CHR$(20)
IBM
STAR <ESC> “w” 1
IBM <ESC> “w” 1
STAR <ESC> “w” 0
IBM
CHR$(14)
or <ESC> CHR$(14)
CHR$(20)
<ESC> “w”0
41
By combining expanded print with the four pitches, SR-lo/15
has eight different character widths available.
Enter this program to see how the print pitches and expanded
print can be combined:
10 'Demo pitches in combination with expanded mode.
In addition, the NLQ characters can be printed with expanded
print as shown below.
42
-
__
-
-
MAKING SR-lo/15 PRINT DARKER
SR-lo/15 has very good print density when it’s just printing
regularly. But sometimes you may want something to stand out
from the rest of the page.
SR-lo/15 provides two ways to do
this: double-strike and emphasized print. Both of these go over
the characters twice, but they use slightly different methods to
darken the characters. Let’s try them and see what the difference
is.
The following table shows the control codes for getting into
and out of double-strike and emphasized modes.
Table 5-7
Print emphasis commands
Function
Double-strike ON
Double-strike OFF
Emphasized ON
I
Emphasized OFF
Mode Control code
STAR <ESC> “G”
IBM
<ESC> “G”
STAR <ESC> “II”
IBM
<ESC> “H”
STAR <ESC> “E”
t IBM
1 <ESC > “I?’
STAR <ESC> “F”
IBM
<ESC> “F”
I
'-
Try them now with this little program:
10 'Demo double-strike and emphasized.
20 LPRINT CHR$(27) "G" ; 'Double strike on.
30 LPRINT "This line is DOUBLE-STRIKE printing."
44) LPRINT CHR$(27) "E" ; 'Emphasized on.
50 LPRINT "This line is DOUBLE-STRIKE and EMPHASIZED."
60 LPRINT CHR$(27) "H" ; 'Double strike off.
70 LPRINT "This line is EMPHASIZED printing."
80 LPRINT CHR$(27) "F" ; 'Emphasized off.
90 LPRINT "This line is normal printing."
Run this program. The results will look like this:
Thilr linr im DOUBLE-STRIKE printing.
This linm im DOUBLE-8TRIKE and EMPHASIZED.
This line is EMPHASIZED printing.
This line isj normal printing.
43
Line 20 turns on double-strike with < ESC > “G” and line
30 prints a line of text. In line 40 emphasized is turned on with
< ESC > “E”.
Line 50 prints a line of text in double-strike and
emphasized. Line 60 then turns double-strike off with < ESC >
“H” so that line 70 can print in emphasized only. Finally, line
80 turns emphasized off, so that SR-lo/15 is set for normal
printing.
Look closely at the different lines of printing. In the line of
double-strike printing each character has been printed twice, and
they are moved down just slightly the second time they are printed.
In emphasized printing, they are moved slightly to the right the
second time SR- lo/ 15 prints. The last line combined both of these
so that each character was printed 4 times. Now that’s pretty
nice printing, isn’t it?
MIXING MODES
We have learned how to use SR- lO/ 15’s many different prmting
modes individually.
Star’s engineers have given a unique control command that lets
you choose at will between any of different printing styles. This
command is called Master Select. The Master Select command
consists of < ESC > “?” followed by a single ASCII code. (At
IBM mode, use “!” instead of “?“.) The value of the ASCII code
determines the printing style that is selected, as shown the table
below.
Let’s see how this master select looks. Try this program with
STAR mode:
-.
-
-
~_
18 'Demo master select print
2fl LPRINT CHR$(27) "?" CHR$(16) ;
3@ LPRINT "This line is DOUBLE-STRIKE printing."
40 LPRINT CHR$(27) "?" CHR$(24) ;
50 LPRINT "This line is DOUBLE-STRIKE and EMPHASIZED."
60 LPRINT CHR$(27) "?" CHRS(8) ;
74) LPRINT "This line is EMPHASIZED printing."
80 LPRINT CHR$(27) "?" CHR$(2) ;
90 LPRINT "This line is normal printing."
When you run this program you should get the same as the
Near letter quality on (for STAR mode)
Near letter quality off (for STAR mode)
Near letter quality on (for IBM mode)
Near letter quality off (for IBM mode)
Italic on (for STAR mode)
Italic off (for STAR mode)
Italic on (for IBM mode)
Italic off (for IBM mode)
Underline on
Underline off
Superscript on
Subscript on
Super & subscript off
Sets pica pitch (for STAR mode)
Sets pica pitch (for IBM mode)
Sets elite pitch (for STAR mode)
Sets elite pitch (for IBM mode)
Sets condensed pitch (for STAR mode)
Proportional on
Proportional off
Sets pica pitch
Sets condensed pitch
One line expanded
One line expanded
One line expanded off
Expanded on
Expanded off
Double-strike on
Double-strike off
Emphasized on
Emphasized off
Master select (for STAR mode)
Master select (for IBM mode)
-
-
-
-.
-.-
-
d
-
46
-
CHAPTER 6
LINE SPACING AND
FORMS CONTROL
.
We have learned how to print in many different ways, but so
far we haven’t looked at how to position the printing on the page.
In this chapter we will learn how to:
l Change the vertical spacing
l Change the length of the page
l Set top and bottom margins
STARTING NEW LINES
Up until now the only time we have thought about printing
on a new line is when we didn’t want it to happen. We learned
that putting a semicolon (;) at the end of a BASIC line will not
end the line of printing. So somehow, the computer is telling the
printer when to end one line and start another.
There are two codes that are used to end one line and start
another. They are carriage return (CHR$(13)) and line feed
(CHR$(lO)). Like the espace code, they have been given abbreviations which you’ll find in many texts (including this one):
<CR > and < LF >. The codes are simple, but their action is
a little confusing (especially with BASIC). Carriage return is the
easiest. Each time that the printer receives a CHR$( 13) it returns
the print head to the left margin. It does not advance the paper
(if DIP switch 2-3 is on; see below).
Line feed is more complicated. Each time the printer receives
a CHR$( 10) it both advances the paper one line and returns the
print head to the left margin, ready to start a new line.
Now to add a little confusion - most (but not all) versions
of BASIC add a line feed (CHR$(lO)) to every carriage return
(CHR$( 13)) that they send. If your version of BASIC doesn’t
do this, then you should turn DIP switch 2-3 off so that SR- 10/l 5
will add the line feed for you. When you have DIP switch 2-3
off the printer will do the same thing when it receives a carriage
return as it does when it receives a line feed.
If you find that your printer double spaces when it should single
space, then you probably need to turn DIP switch 2-3 on.
-
n Reverse line feeds
Your SR-lo/15 printer has a unique capability: it can move
the paper up or down! Its unique tractor design allows the paper
to be fed in either direction without jamming. This allows you
to move around the page at will. You can use this feature to
print several columns of text side by side, or print a graph and
then move back up and insert descriptive legends. As you ex-
periment you’re bound to come up with more uses!
The simplest form of reverse paper feeding is a reverse line feed.
The code is < ESC > < LF > , which causes the paper to move
down (in effect, moving the printing up) one line. A “1ine”used
in a reverse line feed is the same size as a line in a regular line
feed (this is normally l/6 inch). When you change the line spacing
(which you’ll read about next), you change it for both forward
and reverse line feeds.
Table 6-l
Line feed commands
Function
Return print head to left margin STAR CHR$(13)
Advance paper one line
Reverse paper one line
Mode Control code
IBM
STAR CHR$(lO)
IBM
STAR <ESC > CHR!$(lO)
IBM
CHR$(13)
CHR$(lO)
< ESC > CHR$(lO)
-
-
._.
-
-
-
-
CHANGING LINE SPACING
When you turn SR- 10/l 5 on the line spacing is set to 6 lines
per inch. This is fine for most printing applications, but sometimes
you may want something different. SR- 10/l 5 makes it easy to
set the line spacing to whatever value you want.
Try this program with STAR mode to see how easy it is to
change the line spacing:
48
-
:
NEW
18 FOR I = 1 TO 25
20 IF I
30 LPRINT CHR$(27) "A" CHR$(I);
= 13 THEN 50
4@ LPRINT "This line spacing is set to" I
50 NEXT
60 LPRINT "Line spacing is set to l/6 inch (normal)."
70 LPRINT CHR$(27) "2"
This is what you will get:
This line
This line spacing is set to 10
This line spacing is s.et to 51
This line spacing is set to 12
This line
This line spacing is set to 15
This
This line spacing is set to 17
line spacing is set to 16
spacing is set to 14
This line spacing is set tu 18
This line spacing is set to 19
This line spacing is set to 26
This line spacing is set to 21
This line
This line spacing is set to 23
This line
This line spacing is set to 25
Line
---___
spacing ir-- set to l/b inch Crt@mal).
spacing is set to 22
spacing is 5et to 24
__-.-~_~__----__-._-
49
_____
Line 30 changes the line spacing. The command < ESC > “A”
CHR$(n) changes the line spacing to n/72 of an inch. The loop
that is started in line 10 increases the value of n (the variable I
in the program) each time it is executed. So the line spacing increases as the program continues. Line 20 just shortcuts the loop
when I = 13, since BASIC won’t let us send CHR$( 13) without
adding an unwanted CHR$( 10) to it. Finally, the < ESC > “2”
-
in line 60 resets the line spacing to 6 lines per inch. This is a
shortcut that is the same as < ESC > “A” CHR$(12).
-
When you run this program with IBM mode, you cannot get
the printout as shown above.
The command < ESC> “A” CHR$(n) in IBM mode only
defines the line spacing as n/72 of an inch; the < ESC > “2”
command changes the line spacing to the amount defind by the
previous < ESC > “A”.
So, you need to change the following lines to the previous
program as shown below for the IBM mode:
30 LPRINT CHR$(27) "A" CHR$(I); : LPRINT CHR$(27) --
II II.
2 ,
79 LPRINT CHR$(27) "A" CHR$(12); : LPRINT CHR$(27)
fl 11
2
-
-
You may wonder why they picked l/72 of an inch as the increment for the line spacing command. There’s a good reason:
the dots that the printer makes are l/72 inch apart. So this means
that you can vary the line spacing in increments as line as one
dot-unless you want finer spacing, like one half dot spacing
(STAR mode) or one third dot spacing (IBM mode).
The < ESC > “3” CHR$(n) command sets the line spacing in
increments of l/ 144 inch (STAR mode) or i/216 inch (IMB mode).
Change line 30 in your program so it is like this:
30 LPRINT CHR$(27) "3" CHR$(I);
and run the program again. Now the results will look like this:
50
__
-
-
-
(STAR mode)
This line spacing is set to 19
This line spacing is set to 20
This line spacing is set to 21
This line spacing is set to 22
This line spacing is set to 23
This line spacing is set to 24
This line spacing is set to 25
Line
s.pacing is set to l/6 inch Inomal).
(IBM mode)
This line
This line
Line spaci
rm.31) .
The program works just the same as before, but the line spacing
are just half (STAR mode) or one-third (IBM mode) what they
were. This is because < ESC > “3” CHR$(n) sets the line spacing
to n/144 inch in the STAR mode, or n/216 inch in the IBM mode.
Table 6-2 shows all the line spacing commands, including
several “shortcut” commands for commonly used line spacings.
51
Line spacing c
1 Function
spacing to l/8 inch STAR
Set line spacing to 7172 inch
Set line spacing to n/72 inch
Table t
1 Mode
IBM
I-
-2
lmmands
Control code
<ESC> “0”
<ESC> “0”
(not attached)
< ESC > “A”
I
-
CHR$h)
..-
Set to <ESC > “A” definition 1 STAR (not attached)
I IBM
~Setlinespacington/l#inch~~
Set line spacing to n/216 inch STAR
One-time line feed of n/144 STAR
inch
Note: If your computer does not s pport lowercase characters, use
IBM
I-
<ESC> “2”
< ESC > “3” CHR%(n)
<ESC> “.I” CHRWz)
< ESC > “i” CHR!fXn)
CHR$(106) and CHR$(97) for “j” ant “a,” respectively.
-
-
-
I
--
I -
n Moving down the page without a carriage return
So far, all the commands that move the paper also move the
print head to the left margin. And normally this is what you
want. Sometimes, though, you may wish to move down the page
without moving the printhead back to the left margin. The following commands do just that.
The < ESC > “J” CHR$(n) command causes the printer to
make one line feed of n/144 inch (STAR mode), or n/216 inch
(IBM mode), but does not change the setting of the line spacing.
Try this program to see how it works:
10 'Demo one-time line feeds.
29) LPRINT "Line number 1.”
341 LPRINT "Line number 2." ;
441 'One time line feed.
in line 50 changes the spacing
to 100/144 inches (100/216 inches for IBM mode) for one line
only without moving the printhead. The rest of the lines printed
with the normal line spacing. Notice that both line 30 and line
50 end with semicolons. This prevents the normal line feed from
occuring.
The <ESC> “j” CHR$(n) command works the same way
except that the paper moves in the opposite direction. Try this
simple change to your program and see what a difference it makes!
40 'One time reverse line feed.
50 LPRINT CHR$(27) "j" CHR$(lQ)@) ;
53
-
The < ESC > “a” CHR$(n) command advances the paper n
lines (using whatever the current line spacing is) without moving
the printhead. Change line 40 and 50 of your program so that
they are like this.
4p) 'Advance paper 3 lines.
50 LPRINT CHR$(27) "a" CHR$(3) ;
Now when you run the program the results will look like this.
The new line 50 moves the paper up 3 lines, but the printhead
doesn’t move. Therefore, line 60 prints its message starting in
the column that the printhead was left in at the end of line 30.
-
-
FORMS CONTROLS
We have seen how to control the spacing between lines on a
page. SR-lo/15 also has commands that control the placement
of printing on the page, and even adjust for different size pages.
n Form feed
The simplest forms control code is the form feed. Form feed
(or < FF > ) is CHR$(12) and causes the printer to move the
paper to the top of the next sheet. Try it by changing lines 40
and 50 to this:
54
--
40 'Form feed.
50 LPRINT CHR$(12) ;
Before you run the program, turn your printer off and adjust
the paper so that the top of the sheet is even with the top of the
ribbon guide on the print head, then turn the printer back on.
If you don’t remember how to do this, review Chapter 2. When
you run the program, the results will look like this:
0 ’
- L - - - - - - - - --
0
Line number 1.
Line number 2.
0 j
-i---------
0
O I
0
O 1
0 /
The form feed (CHR$(12)) in line 50 caused the printer to
move to the top of a new page before printing the last two lines.
A note to TRS-80 users: CHR$(12) is a problem code for the
TRS-80. To send a form feed command to SR-IO/l5 you must
add 128 to it making it CHR$( 140). Use CHR$( 140) where we
use CHR$(12) in these programs.
n Reverse form feed
Just as SR-lo/15 can perform a reverse line feed, it can do a
reverse form feed. This code moves the paper so that the print
head is positioned at the top of the current page. This can be
used, for example, to print text in a multi-column magazine
format; print the first column, then reverse form feed back to
the top of the page to start the second column. The code for
reverse form feed is easy to remember: < ESC > < FF > .
Line number 3.
, Line number 4.
I
55
Table 63
Form feed commands
CHANGING THE PAGE LENGTH
You may have some computer forms that you wish to use with
SR- lo/ 15 that are not 11 inches high. That’s no problem, because
you can tell SR-lo/15 how high the forms are that you are using.
There are two commands for doing this, shown in this table:
Table 6-4
Form length commands
11
Setthepage length toninches STAR < ESC> “C"CHR$(O)CHR$@)
Let’s set up a 7 inch high form length, which is typical of many
computer checks. The following program will do it.
This program should print “Pay to the order of:” twice, and
they should be 7 inches apart. Line 20 sets the form length to 7
inches. After line 30 prints, line 40 sends a form feed advance
the paper to the top of the next form. Line 50 then prints its
message.
56
-
-
__
-
-
After you have run this program, turn off the printer and adjust
the top of form position.
When you turn the printer back on
the page length will be reset to its normal setting (usually 11
inches).
TOP AND BOTTOM MARGINS
Many programs that use a printer don’t keep track of where
they are printing on the page. This causes a problem when you
get to the bottom of a page because these programs just keep
on printing, right over the perforation. This makes it very hard
to read, especially if a line happens to fall right on the perforation.
And if you separate the pages then you are really in trouble.
Of course SR-lo/15 has a solution to this predicament.
SR- 10/l 5 can keep track of the position on the page, and advance
the paper so that you won’t print too near the perforation. There
are two commands to do this. One controls the space at the top
of the page and the other controls the space at the bottom of
the page. The control codes are given in the following table.
Table 65
Top and bottom margin commands
Function Mode Control code
Set top margin
Set bottom margin
Clear top and bottom margins STAR <ESC> “0”
STAR
IBM < ESC > “r” CHR$(n)
STAR 1 <ESC> “N” CHR$(n)
IBM 1 <ESC > “N” CHR!Nnj
IBM
< ESC > “R” CHR!li(n)
<ESC> “0”
In both cases the value of n tells SR-lo/15 how many lines to
skip, although there is a slight difference in the usage. When you
set the top margin with < ESC > “R” CHR%(n) in STAR mode,
or with < ESC > “r” CHR$(n) in IBM mode, the value of n tells
SR-lo/15 what line to start printing on. When you set the bottom
margin with c ESC > “N” CHR$(n), the value of n tells SR-IO/l5
how many blank lines should be left at the bottom of the page.
Let’s try a simple application to see how these margins work.
Enter this program, which will print 150 lines without top and
bottom margins.
57
10 'Demo top and bottom margins
20 LPRINT CHR$(12) ; 'Form feed.
30 FOR I = 1 TO 150
40 LPRINT "This is line" I
50 NEXT I
60 LPRINT CHR$(12) ; 'Form feed.
When you run this program it will print 150 lines right down
the page and across the perforations. When it’s done line 60 sends
a form feed to advance the paper to the top of the next page.
Look at the lines that have printed near the perforations.
Separate
the sheets and see if any of the lines have been torn in half. These
are the problems that the top and bottom margins will solve.
Now add the following lines to your program. (Don’t forget
the semicolons or you won’t get quite the same results that we
did.)
11 'Leave 6 blank lines at bottom of page.
12 LPRINT CHR$(27) 'IN" CHR$(G) ;
13 'Start top of page at line 6.
14 LPRINT CHR$(27) "R" CHR$(G) ;
55 LPRINT CHR$(27) "0" ;
'Clear top d bottom margins.
Now when you run the program with STAR mode SR- lo/15
will skip the first six lines and the last six lines on’each page.
Always send a form feed after setting the top margin, or it will
not work on the tirst page printed. That’s because the top margin
only takes effect after a form feed.
Line 14 sets the top margin, line 12 sets the bottom margin,
and line 55 clears both margins when we are done.
SUMMARY
Control code
CHRT( 10)
< ESC > CHR$( 10)
CHR$( 13)
< ESC > “A” CHR$(n)
Function
Line feed
Reverse line feed
Carriage return
Set line spacing to n/72 inch
(for STAR mode)
< ESC > “3” CHR$(n)
Set line spacing to n/144 inch
(for STAR mode)
58
-
-
- -
-
-
-
-
< ESC > “0”
< ESC > “1”
< ESC > “2”
< ESC > “J” CHR$(n)
< ESC > “j” CHR$(n)
-c ESC > “a” CHR$(n)
< ESC > “A” CHR$(n)
< ESC > “2”
< ESC > “3” CHR$(n)
< ESC > “J”CHR$(n)
Set line spacing to l/8 inch
Set line spacing to 7/72 inch
Set line spacing to l/6 inch
(for STAR mode)
One-time line feed of
n/144 inch (for STAR mode)
One-time reverse line feed of
n/144 inch (for STAR mode)
Advance the paper n lines
Define line spacing of n/72 inch
(for IBM mode)
Use < ESC > “A” definition
(for IBM mode)
Set line spacing to n/216 inch
(for IBM mode)
One-time line feed of n/21 6
inch (for IBM mode)
One-time reverse line feed of
n/216 inch (for IBM mode)
Form feed
Reverse form feed
Set page length to n lines
Set page length to n inches
Set top margin; start printing
on line n (for STAR mode)
Set top margin; start printing
on line n (for IBM mode)
Set bottom margin; leave n lines
blank
Clear top and bottom margins
60
I
CHAPTER 7
FORMATTING YOUR
OUTPUT
*.
Y.
c
“_
h
You have probably used the tab and margin features on a
typewriter. They make it easier to format the text on a page.
SR-lo/15 also has tabs and margins that you can set. But it goes
beyond the capabilities of a typewriter because besides having
tabs that go across the page, called horizontal tabs, SR-lo/15
has verticaZ tabs that go down the page.
In this chapter we will discover how to use:
l Horizontal tabs
l Vertical tabs
l Left and right margins
USING HORIZONTAL TABS
When you turn SR-lo/15 on there are horizontal tabs set au-
tomatically every eight spaces. It’s easy to use these tabs; you
just send a CHR$(9) to SR-lo/15 and the print head will move
to the next tab position. CHR$(9) is the ASCII code < HT >
for horizontal tab.
Try this one line program to demonstrate the use of the default
Even though the words are different lengths, they are spaced
out evenly by the horizontal tabs.
CHR$(9) is a problem with some computers. Some BASICS
convert CHR$(9) to a group of spaces that act like a sort of
pseudo-tab. This is fine if the computer and the printer have the
same tab settings, but it doesn’t allow us to use our own tab
settings on SR-10/15. We can “outsmart” these computer by
adding 128 to the ASCII value that we use. Instead of using
CHR$(9), use CHR$(137) for a tab command. Even this trick
won’t work for Apple II computers, for they use CHR$(9) for
something else entirely. Apple users can get some help in Appendix
J.
Now add the following line to your program to set different
c ESC > “D” is the command to begin setting horizontal tabs.
It must be followed by characters representing the positions that
you want the tabs set. In our program we are setting tabs in
columns 7, 14, and 21. The CHR$(O) at the end ends the string
of tabs. In fact, any character that is not greater than the previous
one will stop setting tabs. This means that you must put all your
tab values in order, from least to greatest, or they won’t all get
set. (It also means that a CHR$(l) is just as good as a CHR$(O)
for ending a group of tabs; some computers have trouble sending
CHR$(O).)
When you run the program now it produces this:
one t.wo three
four
The words are now closer together, but still evenly spaced.
Turn your printer off and on again to reset the default tabs.
n A one-shot tab command
Suppose you need to move to a position across the page, but
you only need to do it once. It doesn’t make much sense to set
up a tab to use only one time. There must be an easier way-and
of course there is.
The solution is called a one-time tab and is < ESC > “b”
CHR$(n). This command moves the print head n columns to the
right. It has the same effect as sending n spaces to the printer.
62
-
Table 7-l
Horizontal tab commands
Function
Advance to next tab position STAR CHR$(9)
Set tabs at nl, n2, etc.
One-time tab of n spaces
Note: If your computer does not support lowercase characters, use
CHR$(98) for “b.”
Mode Control code
IBM
L I
STAR
IBM .z
t-r
STAR <ESC> “b” CHR!$(n)
IBM <ESC > “b” CHR$(n)
CHRU9)
\ I
< ESC > “D" CHR$(nl)
CHR!$(n2)...CHR$(O)
: ESC > “D" CHR$(nZ)
CHR$(n2)...CHR$(O)
SETTING LEFT AND RIGHT MARGINS
SR-10/15’s left and right margins work just like a
typewriter-once they are set all the printing is done between them.
The commands to set the margins are given in the following table:
The first thing that this program does is to branch to the
subroutine that starts in line 70. This subroutine prints 80 X’s
in a row. The first time that the subroutine is used, all the X’s
tit in one line. Then line 30 sets the left margin to 10, and line
40 sets the right margin to 70. Once again the subroutine is used,
but this time the X’s won’t all fit on one line since there is now
only room for 60 characters between the margins.
Run the program. The results will look like this:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
When you want to reset the margins to the default values, you
have two choices. You can either turn the printer off and back
on, or you can set margin values equal to the default values.
This means that you should set a left margin of 0 and a right
margin of 80 on SR-10 or 136 on SR-15
If you change the pitch of your printing after you set your
margins, the margins will not change. They stay at the same place
on the page. So if you set the margins to give you 65 columns
of printing when you are using pica type, and then you change
to elite type you will have room for more than 65 columns of
elite printing between the margins.
USING VERTICAL TABS
Vertical tabs have the same kinds of uses that horizontal tabs
do-they just work in the other direction. Horizontal tabs allow
you to reach a specific column on the page no matter where you
start from. Vertical tabs are the same. If you have a vertical tab
set at line 20, a <VT > (or vertical tab) will move you to line
20 whether you start from line 5 or line 19.
The vertical tab is not set at the power-on default. If you send
a CHR$(l l), which is the ASCII code for < VT > , before we
have set up tabs it will advance the paper one line. Enter this
program to see how this works.
< ESC > “P” is the command to set vertical tabs for the STAR
mode. Like the horizontal tab setting command, tab positions
must be defined in ascending order. Our example sets vertical
tabs at lines 10, 20, 40 and 50. Then the CHR$( 11) in each of
the following lines advances the paper to the next vertical tab.
The printout is shown below.
First tab.
Second tab.
Third tab.
. .
Fourth tab.
L
Add one more line to the program to demonstrate one more
feature of vertical tabs.
L
60 LPRINT CHR$(ll) "Fifth tab."
Now when you run the program the first page looks just like
*
m...
before, but line 60 sends one more <VT > than there are tabs.
65
This doesn’t confuse SR-10/15--it advances the paper to the next
tab position which happens to be the first tab position on the
next page. That’s nice, isn’t it?
n A one-shot vertical tab command
There’s a one-time vertical tab command that works just like
the one-time horizontal tab command. It is < ESC > “a”
CHR$(n), and it causes the paper to advance n lines. It doesn’t
change the settings of the vertical tabs.
Table 7-3
Vertical tab commands
Function
Advance paper to next tab
position
Set vertical tabs at nl, n2, etc. STAR < ESC > “I”’ CHR$(nl)
Advance paper n lines
Note:If your computer does not support lowercase characters, use
CHR$(97) for “a.”
Mode Control code
STAR CHR$( 11)
IBM CHR$(ll)
CHR$(n2)...CHR!$(O)
IBM
STAR < ESC > “a” CHR$(n)
IBM
< ESC > “B” CHR$(nZ)
CHR$(n2)...CHR$(O)
-c ESC > “a” CHR$(n)
SUMMARY
Control code
CHR$(9)
Function
Horizontal tab
< ESC > “D” nl n2 n3 . ..CHR$(O) Set horizontal tabs
< ESC > “b” n
One-time horizontal tab of n
spaces
< ESC > “M” n
Set left margin (for STAR
mode)
< ESC > “1” n
Set left margin (for IBM
mode)
< ESC > “Q” n
CHR$( 11)
< ESC > “P” nl n2 rt3 . ..CHR!$(O)
Set right margin
Vertical tab
Set vertical tabs (for STAR
mode)
-c ESC > “B” nl n2 d . ..CHR!$(O)
Set vertical tabs (for IBM
mode)
< ESC > “a” n
One-time vertical tab of n lines
66
-
__ -
-
r
i
CHAPTER 8
SPECIAL FEATURES
OF THE SR-lo/15
In the previous chapters we have learned about several groups
of control codes. In this chapter we will look at more control
codes. These codes don’t fit neatly into any of the groupings that
we have studied, but they add a lot of capability to SR-10/15.
So here goes.
Commands covered in this chapter include:
l Bell
l Master reset
l Unidirectional printing
l Eighth bit control
l Block graphics
l International character sets
l Macro instruction
n Now hear this
You may have heard SR-10/15’s bell if you have ever run out
of paper. And you may have wondered why it’s called a bell
when it beeps instead of ringing! It’s a long story that goes back
to the early days of computers, when teletype machines were used
for computer 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 belZ 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 SR-10/15’s “bell” is CHR$(7), which is
ASCII code 7 or < BEL > . Any time SR- lo/15 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. Note to Apple users: Entering a
CHR$(7) will sound AppZe’s bell; the code will not be sent to
SR-10/15.
You can try this by typing:
LPRINT CHR$(7);
There are two other codes that affect the bell. One disables the
bell, so that SR-lo/15 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 8-I
,
Function Mode Control code
Sound bell STAR CHR$(7)
Disable bell STAR <ESC> “Y,, 0
I
Enable bell
Note: If your computer does not support lowercase characters, use
CHR$(121) for “y”.
Bell commands
IBM CHR$(7)
I
IBM < ESC > “y” 0
STAR <ESC> “Y” 1
IBM <ESC> “v” 1
I
n Initializing SR- lo/ 15
Up to now when we wanted to reset SR-lo/15 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
features. There is an easier way. The control code < ESC > “a”
will reset all of SR-10/15’s features to the power on condition
(as determined by the DIP switches), with two exceptions. Those
exceptions are that < ESC > “@” will not erase any characters
that you have stored in SR-10/15’s RAM memory (Chapter 9
tells you how to create your own characters), and it won’t erase
the macro if you have one stored in SR- 10/l 5’s RAM (this chapter
will tell you how to create a macro).
n Putting SR-lo/15 to sleep
You know how to put SR-lo/15 off-line with the On Line
button.
SR- 10/l 5 has another off--line state that can be controlled
from your computer. When you turn SR- 10/l 5 off--line from your
computer, SR-lo/15 will ignore anything that you send it, except
----___ ___--
68
for the code to go on-line again. CHR$( 19) is the code to turn
SR-IO/l5 off-line; CHR$( 17) returns SR-lo/15 to on-line status.
n Printing to the bottom of the sheet
Sometimes when you are using sprocket paper you may want
to print near the bottom of the last sheet. The paper-out detector
usually stops SR-lo/15 when you are about 3 inches from the
bottom of the sheet. This is to notify you if you are running out
of continuous paper.
SR-lo/15 has the ability to print right to the bottom of the
sheet. You can disable the paper-out detector so that it doesn’t
stop the printer. This will allow you to print to the end of the
sheet, and even beyond if you are not careful. The codes to control
the paper-out detector, along with the other codes that we have
just learned are in the following table.
Table 8-2
Some miscellaneous commands
Function
Master reset
Off line
I
On-line
1 Mode 1 Control code
STAR
IBM
< ESC > “@,”
< ESC > “@,”
STAR CHR$( 19)
1 IBM
1 CHR%( 19)
STAR CHR$(17)
IBM CHR$(17)
Paper-out detector off
Paper-out detector on
Move print head back one
STAR <ESC > “8”
IBM
STAR <ESC> “9”
IBM
< ESC > “8”
< ESC > “9”
STAR CHR$(S)
Print “zero” with slash
Print “zero” without slash
STAR <ESC> “\,, 1
IBM
STAR <ESC > “\,’ 0
<ESC> “\,’ 1
69
n Backspace, delete, and cancel text
Backspace (CHR$@)) “backs up” the printhead so that you
can print two characters right on top of each other. Each time
SR- 1 O/ 15 receives a backspace it moves the printhead 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 SR-10/15’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 SR- 10/l 5
prints one line of text at a time, only that line will be deleted.
The following program shows how these three codes work.
BACt:::SF’ACE DOES WM WORK
DELETE DOES WORK
DOES NOT F’RINT
The backspace codes in line 20 move the printhead a total of
three spaces to the left so that the first part of line 30 will overprint
the word “NOT”. The delete codes in line 50 “erase” the three
letters in the word “NOT” so that it doesn’t even print.
In line 80, CHR$(24) deletes the words in line 70. The semicolon
at the end of line 70 prevents a line feed from causing that line
to print before SR- lo/15 receives the CHR$(24) code. The text
in line 90 prints as it normally would because it is after CHR$(24).
W “Zero” printing
Sometimes, you want to print “zero” with slash to distinguish
between “0” and “0”. Your SR- lO/ 15 can print either “0” or
“fY’ as you wish.
70
-
-
n Unidirectional printing
Unidirectional printing is a big word that means printing in
one direction only. SR-lo/15 normally prints when the printhead
is moving in both directions. But once in a while you may have
an application where you are more concerned about how the
vertical lines align than with how fast it prints. SR-lo/15 lets
you make this choice. The table below shows the commands for
controlling how SR-lo/15 prints.
Table 8-3
Printing direction commands
Function
Print in one direction
Print in both directions
One-time print in one
direction
Mode Control code
STAR <ESC> “U” 1
IBM
STAR <ESC > “U” 0
IBM < ESC > “U” 0
STAR <ESC> “<”
IBM
< ESC > “U” 1
<ESC> “<”
Try this program to see the difference that printing in one
direction makes.
10 'Demo unidirectional printing.
20 LPRINT CHR$(27) "A" CHR$(7) ; 'Line spacing = 7/72".
30 FOR I = 1 TO 18
44) LPRINT "I"
54) NEXT I
60 LPRINT : LPRINT
70 LPRINT CHR$(27) "U" CHR$(
printing.
80 FOR I = 1 TO 10
90 LPRINT "I"
100 NEXT I
110 LPRINT CHR$(12) CHR$(27)
reset.
1) ;
'Turn on unidirectional
1’ II ;
@ ,
'Form feed, master
Here is what you will get. The top line is printed bidirectionally,
and the bottom is printed undirectionally. You will have to look
hard because there isn’t much difference.
Let’s analyze the program. Line 20 sets the line spacing to 7/72
of an inch so that the characters that we print will touch top to
bottom. Lines 30-50 print 10 vertical line characters. Then line
70 sets one-direction printing and the vertical lines are printed
71
again. Finally line 110 sends a form feed to advance the paper
to the top of a new page, and then uses the master reset to restore
SR-IO/l5 to the power-on condition.
You can also set SR-lo/15 to print in one direction for one
line only by using the command < ESC > “ < “. This command
immediately moves the printhead to the left margin and then
prints the remainder of the line from left to right.
n The seven bit dilemma
Certain computers (most notably the Apple II) don’t have the
capability to send eight bits on their parallel interface. They can
only send seven bits. This would make it impossible for these
computers to use SR- lo/ 15’s block graphics characters and special
symbols if Star’s engineers hadn’t thought of a solution. (All of
these characters have ASCII codes greater than 127 which means
that the eighth bit must be on to use them.) The solution lies
in the three control codes given in the following table.
Table 8-4
Eight bit control commands
Function
Turn the eighth bit ON
Turn the eighth bit OFF STAR < ESC > “ = ”
Accept the eighth bit “as is” STAR < ESC > “##”
from the computer
Mode Control code
STAR < ESC > “>”
IBM
IBM
IBM
<ESC> “>”
<ESC> “=”
<ESC> YL”
-
-
72
n Block graphics characters and special symbols
Besides the upper and lower case letters and symbols that we
are by now familiar with, SR-IO/l5 has a whole different set of
characters that are for special uses. These characters include block
graphics characters for drawing forms and graphs, and special
symbols for mathematical, engineering and professional uses.
The following program will print out all of the graphics characters
available in STAR mode.
Figure 8-l shows what this program will print. If your chart
doesn’t look like this because it has regular letters and numbers
instead of the special symbols, then your computer is only using
seven bits. You can get the correct printout by adding these lines:
85 LPRINT CHR$(27) 'I>" ; 'Turn on 8th bit.
95 LPRINT CHR$(27) "=" ; 'Turn off 8th bit.
The special characters for IBM mode are included in two
character sets. The character set you normally use is called
character set #l. The special characters are printed out when
you send ASCII codes 160-255 to the printer.
SR- lo/ 15 also offers character set #2 which is almost the same
as character set #l except for the addition of ASCII codes 3-6,
21, and 128-159. Character set #2 is selected with < ESC > “6”;
to go back to character set #l, use < ESC > “7”.
You can also specify the power-on default character set by
setting DIP switch l-2 on for character set #l and off for character
set #2 when DIP switch 2-2 is set off. The following program
will print out all of the graphics characters available.
73
Figure 8-1.
Figure 8-2.
2.
133 C
138 P
148 ij
158 pt
168 L
178 $$j
.:....
188 J
198 /-
2(:)f3 1
218 r
233 C
238 <
248 o
4 +
129 ii
139 i:
14? b
159 f
16s r
179 1
189 J
6 3
131 ;is:
141 i
15 1 111
161 i
171 !?’
181 1
1Yl ,
2 (:l 1
r
211 L
182 j
192 L
?(-)3 L
L-A
212 L
.-
-
74
134 A
144 I2
154 ti
164 iT
1 7 4 .<::
184 ,
194 l-
2!34
214 r
224 IX
--I-r
L .J
244 c’
254 I
t
4 - ?!
NEW
18 LPRINT CHR$(27) "9"
20 LPRINT CHR$(27) "6"
30 FOR J
= 3 TO 6
40 LPRINT " " J CHR$(J) " ";
50 NEXT
60 LPRINT
" 21 " CHR$(21)
70 LPRINT
80 FOR J
= 128 TO 254 STEP 10
90 FOR I = J TO J + 9
95 IF I >
254 THEN 110
100 LPRINT I CHR$(I) " ";
110 NEXT
I : LPRINT : LPRINT
:
NEXT J
Figure 8-2. shows what this program will print. If your chart
doesn’t look like this because it has regular letters and numbers
instead of the special symbols, then your computer is only using
seven bits. You can get the correct printout by changing line 100
to this:
100 LPRINT I CHR$(27) I'>" CHR$(I) CHR$(27) 'I="
CHR$(g) ;
n International character sets
Table 8-5
International character set commands
--
-
-
-
76
-
-
-
-
-
SR-IO/15 is a multi-lingual printer for it can speak in eight
languages! SR-lo/15 changes languages by changing 11 char-
acters that are different for the different languages. These sets
of characters are called international character sets. The control
codes to select the international character sets are given in Table
8-5.
The characters that change are shown beneath their ASCII code
in Table 8-6.
Table 84
Internationad character sets
countly 35 64 91 92 93 94
U.S.A # @ [
\ I A
, .
96 123 124 125 126
* { I 1 N
.
Denmark 1’ # 1 @ 1 ,
Sweden I # I B I X I 0 I
W The macro control code
The last of our group of miscellaneous control codes is definitely
not the least. It is a user-defined control code, called a macro
control code.
The term macro is from the jargonese
macro-instruction which refers to an instruction that “calls,” or
uses a group of normal instructions. In computer programming
macro-instructions (which are similar to subroutines) save pro-
grammers a lot of time and effort. SR-10/15’s macro can save
you a lot of time and effort also.
Here is how SR-10/15’s macro works. You define your macro
by telling SR- 10/l 5 what normal control codes are to be included
in the macro. Then you can use the macro any time that you
want and SR-IO/l5 will do all the things that you included in
the macro definition. You can include up to 16 codes in a single
macro. You can even use the macro to store a frequently used
word or phrase. There are two control codes for the macro: one
to define it, and one to use it. They are given in the Table 8-7.
To see how this works we can build a macro that will reset the
printing style to normal, no matter what style it may be to start
with. The following program will define a macro to do this.
As the comments in the program listing show this will define
a macro that will reset all the print style functions. SR-lo/15
will remember this macro until the power is turned off or until
a new macro is defined. A macro can hold up to 16 bytes
(characters) of information. The one that we defined contains
thirteen.
Now that you have defined a macro, let’s see how to use it.
This program will print one line using several printing style
features. Then it “calls” the macro in line 60. When line 70 prints
the style is “plain vanilla” because the macro has reset it.
If you are using with the IBM mode, change the line 50 as shown
below.
50 LPRINT CHR$(27) I'?"; ' USE THE MACRO
-I-EE3TINt ONE,
TESTING FOUR, FIVE, SIX
78
-rWQ, 7HREE
-
____..
In this chapter we have learned many different commands that
have many different uses. In the next chapter we will make up
for this diversity-the whole chapter only covers three commands!
But they are some of the most powerful that SR- lo/l5 offers.
They give you the ability to create your own characters.
Bell
Disable bell (for STAR mode)
Enable bell (for STAR mode)
Disable bell (for IBM mode)
Enable bell (for IBM mode)
Reset
Off-line
On-line
Paper-out detector off
Paper-out detector on
Print in one direction for one line only
Unidirectional printing
Bidirectional printing
Backspace
Delete character
Cancel line
Print “zero” with slash
Print “zero” without slash
Eighth bit on
Eighth bit off
Eighth bit as-is
Select international character set (for
STAR mode)
Select international character set (for
STAR mode)
. .CHR$(30) Define macro
Use macro (for STAR mode)
Use macro (for IBM mode)
79
__--
CHAPTER 9
CREATING YOUR
OWN CHARACTERS
In this chapter we’ll cover:
l Designing and printing your own characters
l Designing proportional characters
In the previous four chapters of this manual you’ve learned
how to control the SR- lO/ 15 printer to give you dozens of different
typefaces. By using various combinations of pitches, character
weights, and font selections, you can create nearly any effect you
want to in text. And with international character sets and the
special text and graphics characters described in Chapter 8, you
can print almost any character you can think of.
But if “almost any character” isn’t good enough for you, then
it’s a good thing you have an SR-lo/15 printer! With it you can
actually create your own characters. As you’ll see in this chapter,
downloud characters can be used to print a logo, special characters
for foreign languages, scientific and professional applications,
or any other specific printing task.
DOT MATRIX PRINTING
In order to create download characters, you’ll need some understanding of how dot matrix printers work. They’re called “dot
matrix” because each character is made up of a group of dots.
Look closely at some printed characters produced by your
SR-lo/15 and you will see the dots. Figure 9-1 shows how the
letter “C” is formed by printing 15 dots.
The printhead in SR-lo/15 consists of nine thin wires stacked
one atop the other. Figure 9-2 shows an enlarged schematic view
of the front of the printhead, showing the ends of the wires and
their relationship to the printed characters. As you can see, the
capital letters use the top seven wires of the printhead, and the
0.0.
0 .
0
0
0
0 0
0.0.
-
--
-
Figure 9-l. The letter “C” is created by printing 15 dots.
descenders (such as the lower case “p” shown) use the bottom
seven pins. As the printhead moves across the page (in either
direction-that’s what is meant by bi-directional printing) it prints
one column of dots at a time. Each time a dot is supposed to
print an electromagnet inside the printhead causes the appropriate
wire to strike the ribbon (making the SR- 1 O/l 5 an impact printer).
0.0.
: .
0
:
l oao :-
Figure 9-2. As the printhead moves across the page, each of the wires
prints one row of dots.
:0
: .
00 0
0
0.0.
0.0.
0
0.0.
_ I
-
-
-
-
-
-_
--
THE PRINT MATRIX
All of the standard characters that the SR-lo/15 prints are
formed from patterns of dots that are permanently stored in the
printer’s ROM (read-only Memory). This includes all of the
standard ASCII characters, the block graphics and special
characters, the international character sets, the NLQ characters
and the italic characters.
82 -
-
-
But there is another area of memory in the SR-lo/15 reserved
for user-defined characters. These are characters that you design
and download into SR-10/15. When download characters are
defined they are stored in RAM (random access memory), which
allows you to define or modify them at any time.
Each of these characters, whether it is from the standard
character ROM or in download RAM, is constructed on a grid
which is six “boxes” wide by nine “boxes” high. The dots used
to print a character can be inside any of the boxes. In addition,
a dot can straddle any of the vertical lines. As an example, take
a look at the enlarged “9” superimposed on the grid in Figure
9-3. As you can see, some dots are inside the boxes, and some
are centered on the vertical lines. This, in effect, makes the
character grid 11 dots wide by 9 dots high. To see how the rest
of the characters in the standard character ROM are constructed,
t.ake a look at Appendix C.
Figure 9-3. Dots can be inside boxes or straddle the vertical lines of the
grid.
DEFINING YOUR OWN CHARACTERS
You’ve seen how the engineers at Star designed their characters
by using a grid to lay out the dots. Now you can define characters
exactly the same way. Make up some grids (photocopy Figure
9-4 if you wish) and get ready to be creative! (Just in case you
are not feeling creative, and to make our explanations a little
clearer, we’ll be using a picture of a chemist’s flask as an example
of a download character. You can see how we’ve laid it out in
83
Figure 9-5. Later in this chapter we’ll use this character to create
a small graph.)
You’ll notice that Figure 9-4 includes a lot of information
around the grid. Don’t be intimidated; we’ll explain each item
as we come to it in our discussion of defining and actually printing
download characters. You may have noticed another difference
between this grid and the one shown in Figure 9-3: it’s only eight
boxes high. Which leads us to...
ASCII Code
Descender
Start column
End column
16
M, = Descender l 128 + (Start l 16) + End
-
Wal
Figure 9-4. Use this grid (or one similar to it) to define your own
characters.
n Rule 1: Download characters are eight dots high
As you noticed in Figure 9-2, capital letters, most lowercase
letters, and most special characters use only the top seven pins
of the printhead. Download characters can go one better: they
can use as many as eight of the nine wires in the print head. So
our grid is eight dots high.
It’s also possible to use the bottom eight pins, just as the “g”,
“‘9, “ ,,
1, P,
“q”, and “y” of the standard character sets do. These
are called descenders (because the bottom of the character descends below the baseline of the rest of the characters).
One bit in the download character definition command is used
to tell SR- IO/ 15 whether a character is to be treated as a descender
or not. We’ll get to the command in due time. For now, if your
84
character uses the top eight dots, write in a one next to the word
“Descender” on the layout grid; if it uses the bottom eight dots,
write in a zero. In our example, we’ll want the bottom of the flask
to line up with the baseline of the other characters, so it will not
be a descender. As shown in Figure 9-5, we’ve written in a “1”
on our grid.
12* I
64 I
32 I
Total
Figure 9-5. We’ve designed a character and decided that rt would not
be a descender, hence the “1” written in.
H Rule 2: Dots cannot overlap
As you can see in Figure 9-5 our flask has a nearly continuous
outline. But, you may ask, why not make it a reaZZy solid line
and print all the intermediate dots, as shown in Figure 9-6? Because the dots that straddle the vertical lines in the grid actually
overlap those inside the boxes. If we tried to print overlapping
dots, the SR-IO/l5 printhead would have to slow down and back
up to print both dots-not very efficient! To avoid this inefficiency,
SR-IO/l5 will not allow you to define a character like Figure
9-6. (Actually, you can define it, but when it prints, SR-10115
will leave out the overlapping dots, so that it would print like
Figure 9-5.)
I
I! 7 :t
I
ASCII Code
Descender 1
Start column
End column
M, = Descender * 128 + (Start l 16) + End
85
128
64
ASCII Code
WRONG!
Descender
32
16
8
btal
Start column
End column
M, = Descender * 128 + (Start l 16) + End
Figure 9-6. Dots cannot overlap; those in immediately adjacent “half
columns” will be ignored when the character is printed.
n Add up each column of dots
Now it’s time to give our creative side a break and get down
to some basic arithmetic. That’s where the numbers down the
left side of the grid come in. Notice that there is a number for
each row of dots and that each number is twice the number below
it. By making these numbers powers of two we can take any
combination of dots in a vertical column and assign them a unique
128
64 l - 64
32 0 - 32
16 0 - 16
8
4 m-4 O-4
2 O-2 O-2
1 O-l 0 -1
Sum 103 58
0 - 32
O-8
0 -128
0 - 64
0 - 32
0 - 16
o-8
0 -2
255
Figure 9-7. By adding the values of each dot in a column, you’ll get a
unique description for any combination of dots.
86
value. Some examples will make this clearer. As shown in Figure
9-7, if we add the numbers for the dots that print in a column,
the sum will be a number in the range of 0 to 255. Each number
from O-255 represents a unique combination of dots.
._
So add up the values of the dots in each column using this
system. In Figure 9-8 we’ve shown our grid with the sums of the
columns filled in across the bottom (see if these agree with your
answers!). Across the top of the grid you’ve probably noticed
.
the cryptic labeling of each column: ml, m2, m3, etc. These labels
correspond to the labels in the command syntax statement, which
L..
we’ll get to shortly.
m, m, m, m, m, m, m, m, m, m,, m,,
128
64
32
16
c
ASCII Code
Descender
Start column
End column
M, = Descender l 128 + (Start l 16) + End
Figure 9-8. Add the values of the dots in each column and write the sum
of each column at the bottom.
w Assigning a value to your character
We’ve done a pretty thorough job of designing and describing
a user-defined character. But the SR-lo/15 has room for 240
download characters-how does it know which user-defined
character we want to print? Exactly the same way it knows which
standard character we want to print: every character is assigned
a unique number.
The standard characters are assigned the ASCII codesnumbers from 0 to 255. For the download character sets you
87
can define any positions except the defined control code positions.
This means that once a character is defined and assigned a value
(and the download character set is selected), you can use that
character on the printer the same way you would any standard
character. You can send the character with the same ASCII value
(for instance, if you had assigned your character a code of 66,
it would print each time you sent a character “B” to the printer).
You can also access the character from a BASIC program with
the CHR$ function-in this case LPRINT CHR$(66) would print
the character.
Except for the limitation that download characters must be
avoid the defined control code positions, there are no rules or
restrictions on the use of numbers. This means you can use
whatever is most convenient for you-perhaps seldom-used keys
can be replaced by more useful characters. In our example, we’ll
assign the flask a value of 160, which is the code for the character
“J ”
or “a”. A rather arbitrary selection, but SR-lo/15 doesn’t
care!
Figure 9-9. Character designs for the three graph symbols.
88
-
.-
Our chart would hardly be complete with just a picture of a
chemist’s flask, so in Figure 9-9 we’ve made completed grids for
some other symbols: an automobile and a gun (quite a strange
mix of characters!). The information on the grids is now complete
(except for proportional width data-a more advanced topic we’ll
take up shortly).
n Download character definition command
You’ve read through a long explanation of download characters
and we haven’t even told you the command syntax yet! Now the
wait is over. This is the most complex command in the SR-lo/15
repertoire and now you’ve got the necessary knowledge to implement it. Here it is:
(For STAR mode)
<ESC> "*" 1 nl n2 m@ ml m2 m3 m4 m5 m6 m7 m8
m9 mlg ml1
(For IBM mode)
<ESC>
"&" CHR$(@) nl n2 rn0 ml m2 m3 m4 m5 m6
m7 m8 m9 ml@ ml1
Like the other SR-lo/15 commands, it starts with an < ESC >
(CHR$(27)). The next character is an asterisk (*) (CHR$(42))
followed by 1, or an ampersand (&) (CHR$(38)) followed by a
CHR$(O).
nl and n2 are used to specify the ASCII values of the characters
you are defining. The reason that there are two bytes reserved
for this is that SR- lo/15 allows you to define many characters
with just a single command. nl is used to specify the beginning
of a range of characters to be defined; n2 specifies the end of the
range.
For instance, if you wanted to change the appearance
of the numerals from 0 to 9 (which have ASCII codes 48 through
57) for the STAR mode, the command would begin with < ESC >
“*” CHR$(l) CHR$(48) CHR$(57)... Of course, you can also
define individual characters by making nl and n2 equal.
m0 is called the attribute byte, for it describes two attributes
of the character we have designed: descender data and proportional width information. A byte consists of eigth bits. In the
attribute byte, the first (high order) bit is used for the descender
data, and the last seven bits are used for proportional widths.
89
We’ll be discussing proportional character widths in detail later
in this chapter; for now, we’ll leave it at 11. The descender data
was discussed earlier: to use the top eight pins, this bit should
be 1; to use the bottom eight pins this bit should be 0. Figure
9-10 shows the bits of the attribute byte as we’ll use them for
our flask character. By now you’ve probably seen an easier way
to determine the value of the attribute byte. Instead of translating
everything to binary, merely assign the descender data a value
of 128 (the value of the first bit) if you dont’t want descenders,
or 0 if you want descenders. Then just add the descender data
to the proportional width. This way, it’s simply a matter of adding
two decimal numbers. (In our case, it’s 128 + 11 = 139.)
0 000 1011 = Il(decimal) 1
Descender Starting Ending
data
print column
Figure 9-10. The attribute byte (m0) for our flask character.
You’ll probably recognize ml...mll from the top of our layout
grid. That’s right, each column is described by one byte. Now
we’ve got everything we need to download one character to the
printer. The complete command for our flask character with the
Figure 9-11. This is the complete command to send our flask character
to the SR-lo/15 printer.
m9
ml0
ml1
Now let’s send the information to the printer. But, before you
send the information, be sure that the DIP switch l-5 is set off
position. If not, set it correctly while the power is off, then, turn
the power on again. The following program will send the character
definitions for all three characters with the STAR mode to the
printer. Enter the program and run it.
~-
90
.
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.