A First Example: PUTC
A First Example: PUTC
MACRO
&INIT PUTC &CHAR, &DEV
&INIT STA PUTCSAVE
LDCH &CHAR
J PUTCLOOP
PUTCSAVE RESW 1
PUTCLOOP TD &DEV
JEQ PUTCLOOP
WD &DEV
LDA PUTCSAVE
MEND
If our assembler comes with a macro facility for handling this format,
then PUTC can be used in a program in the same manner as an
instruction. In particular, if the definition of PUTC is in the macro
library or included “in-line” in the assembly code, then the
preprocessor will be able to expand any statement whose op code is
PUTC.