
                   M A C R O S  - quick reference                 by A'rpi
                  ================================               1999.01.11.

Macro definition:
~~~~~~~~~~~~~~~~~
One line macro:
  #macroname(parameters):output=commands

More lines:
  #macroname(parameters):output
    commands
    commands...
    ...
  ENDM

Remark: the parameters and the output can be left out  (#MACRO=!PROC)

In the "commands" and in the "output" the followings can be used:

 %n   = the n th parameter  ( AX:=%3)     n=1..9
 %(n) = the same, but n can be greater then 9   ( AX:=%(17)  )
 %?n  = the n th parameter, if exists, otherwise nothing  ( IF .NB %?2 THEN...)
        that means not necessary parameter
 %In %I(n) %I?n = the same as without I, but the quota sign is chopped
        if exists   #XYZ=%I1 and XYZ 'MOV AX,5'
 %N   = the number of parameters ( IF %N=3 THEN...)
 %*   = all the parameters ( #XYZ=XYZ1(%*)//XYZ2(%*)
        ( all of them joined with a ',' )
 %<   = shifting of parameters to left (delete %1, copy %2, instead of %2 comes %3 etc)
 %O   = the way the output parameter will be proceeded if ECX:=MACRO  then %O=ECX
 %R   = recursion for one line
 %%   = the character "%"

only in the "commands" part:
 %.   = separating more than one line
        (it was interesting till only one line macro existed)
         #XYZ=PUSH(ALL) !STHING %. AX+=5

Calling the macro:
~~~~~~~~~~~~~~~~~~
  MACRO(parameters)
  MACRO parameters
  MACRO'parameter'[,'param2'...]


