Download System 8813 Macro Assembler - PolyMorphic
Transcript
MACRO-8S Assembler Manual Page 11 o polyMorphic Systems merely counts them and returns their total number. In other words, if the same string given to LEN[] is substituted into a DB pop in the operand field, the outputted object code will occupy the number of bytes in memory that LEN[] returns as its value. As an example, consider th& following: DB LEN['Hi there!']+2, 'Hi there!',CR,LF This statement will assemble first a byte with value 11 (decimal), then 9 bytes of ASCII character information followed by 2 symbolically defined constants. 2.2.1.5.2 NULL(] In a macro, it is possible to pass a parameter which contains no characters at all. This happens when a position in the operand field of the macro invocation is left empty. The parameter is then considered non-existent or "null." The NULL[] function allows a macro to take appropriate action when an optional parameter has been omitted. It returns a logical value of TRUE (-lor 0FFFF hex) when there is a null parameter between the brackets and FALSE (0) when any number of valid parameters can be found there. Example: DW NULL['I am not nullt],NULL[] This assembles a 0000H followed by a 0FFFH. Example of use inside a macro: MAYBE MACRO IF DW ENDIF ENDM NOT NULL [ #: 1] #1 i I f there's a parameter #1, jthen assemble it. Thus the invocation MAYBE 5 expands into OW 5 But with a null operand field, MAYBE assembles nothing. 2.2.1.6 Mathematical expressions It was said above, in the discussion on numbers, symbols, the dollar sign, and short strings, that each of these things is a