forthemacro:one to defineit,and one to use it.They are

given in the Table 6-9.

Table 6-9

Macro instruction commands

Function

Control code

Definemacro

Usemacro

To see how this works we the printing style to normal, to start with. The following do this.

<ESC > “ + ” ... (codes you include)

... CHR%(30)

<ESC > “ + ” CHR$( 1)

can build a macro that will reset no matter what style it may be program will define a macro to

10

LPRINT CHR$(27);“+“;

‘Start macro

20

LPRINT CHR$(27);“h”;CHR$(O); ‘Big character off

30

LPRINT CHR$(~~);“!“;CHR$(O); ‘Select normal pica

40

LPRINT CHR$(27);“T”;

‘Super & subscripts

 

off

 

50

LPRINT CHR$(27);“a”;CHR$(O); ‘Left-aligned

 

printing

 

60

LPRINT CHR$(30)

‘End macro

 

definition

 

As the comments in the program show, we started to define 1the macro in line 10. Line 20 cancels big character printing.

Line 30 sets normal pica, and this command also cancels proportional pitch, condensed print, expanded print, boldface, emphasized, italics, and underlining. Line 40 cancels super- scripts and subscripts. Line 50 sets left-aligned printing. Then, line 60 ends the macro definition. This printer 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 eleven.

Now that you have defined a macro, let’s see how to use it. This program will print one line using several printing features. Then it “calls” the macro in line 60. When line 70 prints the style is “plain vanilla” because the macro has reset it.

Page 105
Image 105
Star Micronics ND-10/15 user manual Given in the Table