Star Micronics SR-10/I5 user manual Define macro

Models: SR-10/I5

1 130
Download 130 pages 19.46 Kb
Page 88
Image 88
Define macro

 

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 >

“?.’

18 LPRINT CHR$(27) "+"; ' START DEFINITION OF MACRO

24)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. 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.

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) I'?"; ' USE THE MACRO

-I-EE3TINtONE, -rWQ, 7HREE

TESTING FOUR, FIVE, SIX

____..

-

-

78

Page 88
Image 88
Star Micronics SR-10/I5 user manual Define macro