home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / prog-asm / asm.lzh / ASM / INCLUDE / COMMON / ASMCOM.I next >
Encoding:
Text File  |  1991-08-16  |  1.0 KB  |  42 lines

  1. ;    File:    asmcom.i    (common to all)
  2. ;    asm(1.0) macro package - Various defines/macros that
  3. ;    may be found useful.
  4. ;
  5. ;    This macro package has been written and placed in the
  6. ;    public domain by Douglas J Leavitt, 1986.  This macro
  7. ;    package is based on Commodore-Amiga header files printed
  8. ;    In The ROM Kernel Manuals, published and printed by
  9. ;    Commodore-Amiga, and Addison-Wesley publishing.
  10. ;
  11. ;    The goal of this macro file is to be upwardly compatible
  12. ;    with the include file of the same name.
  13. ;
  14. ;
  15. ;    Global Macro Variables start with ___
  16. ;    ___argchk is a local temp variable used by various macros
  17. ;    To pass extra params to the ARGCHK macro
  18. ;
  19.  
  20. ;    ARGCHK    min_args,max_args,nargs
  21. ;
  22. ;    Check a macro invocation for the proper number of arguments
  23.  
  24.     ifnd    ASM_COMMON
  25.     ASM_COMMON = 1
  26.  
  27. ARGCHK    macro
  28.     ifne    narg-2
  29.         ___badarg=2    ; args to ARGCHK are bad
  30.         mexit
  31.     endc
  32.     ___badarg=0        ; Just the right amount
  33.     iflt    ___argchk-\\1
  34.         ___badarg=-1    ; Not enough args
  35.     endc
  36.     ifgt    ___argchk-\\2
  37.         ___badarg=1    ; Too many args
  38.     endc
  39.     endm
  40.  
  41.     endc            ; ASM_COMMON
  42.