Dot Graphics - Star Micronics Rainbow NX-1000C User Manual

Table of Contents

Advertisement

1
')
1
J
I
I
I
I
I
I
J
I
I
I
I
)
I
I
J
J
J
Other page-formatting capabilities of the printer include right-margin
alignment, vertical tabulation, and horizontal tabulation. Details can be
found in Appendix
B.
For horizontal tabulation in the Commodore mode
you must use the
<
16> command. The following code fragment, for ex-
ample, makes T$ into a printer command that tabs to column 22.
100 T$=CHR$(16)+122"
DOT GRAPHICS
The graphic characters of the Commodore character sets do not exhaust
the printer's graphics capabilities. It can also do bar charts-th«re is a simple
command for this purpose-and with a little work you can create arbitrary
bit-mapped images. We will start with a bar chart.
In the Commodore mode the command sequence < 8 > < 26 > <
n >
<
255 >
<
15 > prints a horizontal bar
n
dots long, where
n
can be from
1 to 255. (Ifn
=
0 the bar is 256 dots long). Here is a simple barchart program:
100 REM
BAR CHART
110 OPEN4,4
120 PRINT#4, CHR$(27);CHR$(93);CHR$(48)
130 FOR 1=1 TO 6
140
READ N
150
PRINT#4, CHR$(8);CHR$(26);CHR$(N);
160
PRINT#4, CHR$(255);CHR$(15);N
170 NEXT I
180 CLOSE4 :END
190 DATA 34, 57. 75, 93, 120, 183
_ _ :::;:4
~1l!lII57
~IIHll75
IIlIIlIllIIIlIIllIIlIlll1UIDlllln.lIllIIlII'.llIllllllllOO
<) ::::.
l20
_ _ _ _ _ _ _ _ _ _ 1ll!IIIlIlIIl1lll!!lll1lllll 18:::::
Line 120 in this program ensures that the printer is operating in Com-
modore mode. (The program will not work in ASCII mode.) The
<
8
>
command begins seven-bit graphics printing. The < 26 > < n > < 255 >
command prints a bar seven dots high and n dots long. The < 15> command
returns from seven-bit graphics printing to character printing.
41

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents