Star Micronics Radix User Manual page 120

Table of Contents

Advertisement

106
Radix User's Manual
-_.
tions (which are similar to subroutines) save programmers a lot of
time and effort. Radix's macro can save you a lot of time and effort
also.
Here is how Radix's macro works. You define your macro by
telling Radix what normal control codes are to be included in the
macro. Then you can use the macro any time that you want and
Radix will do all the things that you included in the macro defini-
tion. You can include up to 16 codes in a single macro. You can
even use the macro to store a frequently used word or phrase.
There are two control codes for the macro: one to define it, and
one to use it. They are given in the table below.
_
-
-
_-
Function
Define macro
Use macro
Table 10-7
Macro instruction commands
Control code
(ESC) "+",
. . codes you include.
. . CHR!$(30)
(ESC) "!"
-
-
-
-_
-
To see how this works we can build a macro that will reset the
printing style to normal, no matter what style it may be to start
with. The following program will define a macro to do this.
-
18 'Defines a macro that will reset RADIX to normal.
2pl LPRINT CHR$(27) "+'I ; 'Start macro definition.
30 LPRINT CHR$(18) ; 'Select pica pitch.
40 LPRINT CHR$(27) "W" CHR$(p) ; 'Expanded off.
50 LPRINT CHR$(27) "F" ; 'Emphasized off.
60 LPRINT CHR$(27) f'H" ; 'Double-strike off.
70 LPRINT CHR$(27) I'-" CHR$(p) ; 'Underline off.
80 LPRINT CHR$(27) "T" ; 'Super & subscripts off.
90 LPRINT CHR$(27) "5" ; 'Select roman character set.
100 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. Radix 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 fifteen.
Now that you have defined a macro, let's see how to use it.
This program will print one line using several printing style fea-
-
-
-

Advertisement

Table of Contents
loading

Table of Contents