Star Micronics Radix User Manual page 206

Table of Contents

Advertisement

192
Radix User's Manual
-
BASIC programming
All the programs in this book are written in the BASIC used
by the IBM-PC. That makes it easy to do the things that we show
you. But when you start writing your own programs there are
several things that you should know.
IBM BASIC defaults to a printer width of 80. This means that
it will automatically insert a carriage return and line feed after
every 80 characters. If you want to print lines longer than 80 char-
acters you will need to change the width of the printer. If you set
the printer width to 255, then the IBM will never insert a line feed
and carriage return, unless you start a new line. (This is what you
want usually.) To set the width of the printer to 255, use this state-
ment:
-
-
l@J WIDTH "LPTl:", 255
IBM BASIC has one other little trick that will mess up your
graphics if you let it. IBM BASIC is very insistent about adding a
line feed to a carriage return. This is fine if you are printing text,
but if an ASCII 13 pops up in the middle of your graphics printout,
IBM BASIC will still add a line feed to it. This will put strange
things in the middle of your graphics, and leave you with extra
characters at the end of your line.
There is an easy way to avoid this problem. You just open the
printer as a random file. The following program shows how this is
done.
-
10 OPEN "LPTl:" AS #l
' RANDOM ACCESS
20 WIDTH #l, 255
' SET WIDTH TO 255
30 PRINT #l, ~~TESTINCI~
' PRINT A LINE
40 PRINT #l, G-03$(10)
' ADD YOUR OWN LF
Listing programs
To list programs on Radix, make sure the program is in the
IBM's memory and use the LLIST command. This directs the list-
ing to the printer instead of the screen.
-
-.
-
-

Advertisement

Table of Contents
loading

Table of Contents