The text preprocessor is a functional unit within the assembler that performs the text preprocessing translation phase. During text preprocessing, the following actions are performed:
This section also describes the various types of preprocessor directives:
┌─────────────────────────┬─────────────────────────┬─────────────────────────┐│Type │Function │Directives │ ├─────────────────────────┼─────────────────────────┼─────────────────────────┤ │Conditional Assembly │Tests for a specified │IF │ │ │condition and assembles a│IFB │ │ │block of statements if │IFDEF │ │ │the condition is true. │IFDIFI │ │ │ │IFE │ │ │ │IFIDN │ │ │ │IFNB │ │ │ │IFNDEF │ │ │ │IF1 │ │ │ │IF2 │ │ │ │ELSE │ │ │ │ENDIF │ ├─────────────────────────┼─────────────────────────┼─────────────────────────┤ │Text Equate │Allows assignment of │CATSTR │ │ │simple text strings to a │EQU │ │ │symbolic name. Provides │INSTR │ │ │functions for expanding │SIZESTR │ │ │and operating on the │SUBSTR │ │ │values. │ │ ├─────────────────────────┼─────────────────────────┼─────────────────────────┤ │Macro │Provides text processing │ENDM │ │ │that is done sequentially│EXITM │ │ │at assembly time. By the │FOR │ │ │end of assembly, ALP │FORC │ │ │expands all macros and │IRP │ │ │assembles the resulting │IRPC │ │ │text into object code. │LOCAL │ │ │ │MACRO │ │ │ │PURGE │ │ │ │REPEAT │ │ │ │REPT │ ├─────────────────────────┼─────────────────────────┼─────────────────────────┤ │Miscellaneous │Miscellaneous text │COMMENT │ │ │processing functions. │ECHO │ │ │ │%OUT │ │ │ │INCLUDE │ └─────────────────────────┴─────────────────────────┴─────────────────────────┘