home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / utils / asmutl / musicbox.lbr / MACROS.LZB / MACROS.LIÂ
Encoding:
Windows Setup INFormation  |  1988-04-02  |  3.3 KB  |  87 lines

  1. ; Edit version 1.01
  2. ;**************************************************************************
  3. ;**************************************************************************
  4. ;***                                    ***
  5. ;***    Macro library.                            ***
  6. ;***                                    ***
  7. ;**************************************************************************
  8. ;**************************************************************************
  9. ;
  10. ; File Name        : MACROS.LIB
  11. ; Module Name        : MUSICBOX
  12. ; Module Build File    : MUSICBOX.ZEX
  13. ; Author        : Edmund Cramp
  14. ; Creation Date        : 16-Apr-1987
  15. ;
  16. ; Assembler Name    : Z80ASM (SLR Systems)
  17. ; Linker Name        : SLRNKP (SLR Systems)
  18. ;
  19. ; Ammendment Record
  20. ; *****************
  21. ; Name        Date        Details of Ammendment
  22. ; ----        ----        ---------------------
  23. ; Edmund Cramp    16-Apr-1987    Initial file creation
  24. ; Edmund Cramp    17-Apr-1987    Version macro added.
  25. ; Edmund Cramp    19-Mar-1988    Modified for SLR assembler/linker.
  26. ; Module Function
  27. ; ***************
  28. ;    This is the macro library for the MUSICBOX module.  It is often an
  29. ; advantage to place common macros in a seperate file so that they may be
  30. ; used in several modules.  When writing a macro it is very important to
  31. ; document with plenty of comments - you will probably only write the macro
  32. ; once but will use it many times and may not always remember the input
  33. ; parameters and limitations.  The macros below are all commented in one
  34. ; of two ways:-
  35. ;    i.    A text block ABOVE the macro describing its function and
  36. ;        input/output requirments and restrictions.
  37. ;    ii.    Internal comments starting with ";;" - these will not appear
  38. ;        in the final macro assembly listing and will not comsume
  39. ;        memory during the actual assembly as normal ";" delimited
  40. ;        comments would.
  41. ;    In general macros that are used globally (within several different
  42. ; modules) will be placed in this module - however specialised macros that
  43. ; are of a more limited application should be placed with the modules that
  44. ; use them.  This strategy will make the best use of macro table space in
  45. ; assemblers that keep their internal macro tables in mamory and will
  46. ; generally speed all assemblies.  The macro "NOTE" is in this class and is
  47. ; placed as a "Local Macro" within the modules using it.
  48. ;
  49. ;**************************************************************************
  50.  
  51. ;+
  52. ; Usage:    STRING    'ASCII text string'
  53. ; Macro to take a single ASCII text string as input and append CR,LF to it.
  54. ; The string is then terminated with a '$' for use with the CP/M BDOS print
  55. ; function.
  56. ;-
  57. STRING        MACRO    TEXT
  58.         DEFB    TEXT,0DH,0AH,'$'
  59.         ENDM
  60.  
  61. ;+
  62. ; Usage:    PRINT    label
  63. ; Macro to print a '$' terminated string on the console via CP/M function 9.
  64. ;-
  65. PRINT        MACRO    NAME
  66.         LD    DE,NAME        ;; Point to string
  67.         LD    C,9        ;; CP/M func - print terminated string.
  68.         CALL    BDOS        ;; Call operating system.
  69.         ENDM
  70.  
  71. ;+
  72. ; Usage:    VERSION
  73. ; Macro to generate a version number string from predefined symbol "VERSION".
  74. ; This symbol must have a value between 0 and 999.
  75. ;-
  76. MVERSN        MACRO
  77.         DEFB    [VERSION/100]+'0'
  78.         DEFB    '.'
  79.         DEFB    [VERSION MOD 100/10]+'0'
  80.         DEFB    [VERSION MOD 10]+'0'
  81.         ENDM
  82.  
  83. ;**************************************************************************
  84. ;***    End of MACROS.LIB                        ***
  85. ;**************************************************************************
  86.