Table 8-7

 

Macro

instruction

commands

 

Function

Mode

Control code

Define macro

STAR

< ESC >

“ + “....codes

 

 

you include...CHR$(30)

 

IBM

< ESC > “+“....codes

 

 

you include...CHR$(30)

use macro

STAR

< ESC >

“!”

 

IBM

<ESC>

“r.

10 LPRINT CHR$(27) "+"; ' 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 & SUBSCRIPTS OFF

80 LPRINT CHR$(3Q)); ' END MACRO DEFINITION

As the comments in the program listing show this will define

a macro that will reset all the print style functions. SD-lo/l5 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) 'I!"; ' 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

ne~53T1NC=iC3NEm -l-MO, “T-t-iF;:EE

TESTING FOUR, FIVE, SIX

-

-

-

-

-

-

78

Page 86
Image 86
Star Micronics SB-15 user manual Define macro, Ne~53T1NC=iC3NEm -l-MO, T-t-iFEE