Table 8-7 Macro Instruction - Star Micronics SG-10 User Manual

Star micronics printer user's manual
Table of Contents

Advertisement

Function
Define macro
Use macro
Table 8-7
Macro instruction commands
Mode
Control code
STAR
< ESC > " +"....codes
you zhclude...CHR$(30)
IBM
<ESC>
"+"....codes
you include...CHR%(30)
STAR
< ESC > "!"
IBM
<ESC>
"?,'
18 LPRINT CHRS(27) "+'I; ' START DEFINITION
OF MACRO
20
LPRINT CHR$(18);
' PICA
30
LPRINT CHR$(27) "Wfl"; ' EXPANDED OFF
40
LPRINT CHR$(27) "F";
' EMPHASIZED OFF
50 LPRINT CHR$(27) "H";
' DOUBLE-STRIKE OFF
60 LPRINT CHR$(27)
"-0";
' UNDERLINE
OFF
70 LPRINT CHR$(27) "T";
' SUPER 6 SUBSCRIPTS
OFF
80
LPRINT CHR$(30);
' END MACRO DEFINITION
As the comments in the program listing show this will define
a macro that will reset all the print style functions.
SG-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.
-
-
10 LPRINT CHR$(27) "-1"; ' UNDERLINE
20 LPRINT CHR$(27) "G";
' DOUBLE- STRIKE
30 LPRINT CHR$(27) "Wl"; ' EXPANDED
40 LPRINT "TESTING ONE, TWO, THREE"
50 LPRINT CHR$(27) "!";
' USE THE MACRO
60 LPRINT "TESTING FOUR, FIVE, SIX"
If you are using with the IBM mode, change the line 50 as shown
below.
50 LPRINT CHR$(27) "?";
' USE THE MACRO
-l-ESiTING
C3NE.n
-T"wcl,
-T-HE;i:EE
-
TESTING
FOLJR,
FIVE,
SIX
-
-__
.~
78

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sg-15

Table of Contents