home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / uploads / zmac.doc < prev    next >
Encoding:
Text File  |  1993-06-07  |  9.6 KB  |  262 lines

  1.  
  2.  
  3.               ZMAC/ZML, THE Z-SYSTEM ASSEMBLER/LINKER
  4.  
  5. VERSATILE, FAST, SUPPORTED, and a BARGAIN at $50 (plus S&H).  ZMAC,ì
  6. ZML, ZMLIB, support utilities, and documentation (WS format) are allì
  7. included on disk (printed manual is extra).  All are ZCPR3x-compatible,ì
  8. are optimized for use with ZEX, and have on-line HELP.  Friendly toì
  9. first time users; competent for experienced programmers.  For CP/Mì
  10. compatible systems using a Z80 compatible CPU.
  11.  
  12. This bulletin is in three sections devoted to ZMAC, ZML, and ZMLIB
  13. respectively. At the end of the bulletin you will find a list of
  14. the principal sources for these programs and a list of references
  15. to published articles on the art of assembly language programming.
  16. The manual itself contains these and even more references to help
  17. both beginning and advanced programmers.
  18.  
  19.             Al Hawley (213) 649-3575 (voice)
  20.                   (213) 670-9465 (modem)
  21.  
  22. ================================================================
  23.  
  24.                           ZMAC, the Assembler
  25.  
  26. ZMAC is a two-pass assembler for ZILOG/HITACHI mnemonics.  It makesì
  27. HEX, REL, SYM, and listing files from sources prepared for olderì
  28. assemblers as well as those using the powerful ZMAC syntax.  Allowsì
  29. nested INCLUDE files, redefinable macros and pseudo-ops, datestampedì
  30. listings, error logging, and up to 13 named common bases.  Relativeì
  31. jump opportunities are flagged in the PRN listing!  The help screenì
  32. reflects the status of the main configuration options; ZCNFG reportsì
  33. the rest.  ZCNFG is the public domain Z-System configuration utilityì
  34. included with ZMAC.
  35.  
  36. Here is the ZMAC help screen, copied to this file with RECORDER.IOP.
  37.  
  38. B3:LINK>zmac //
  39.  
  40.  
  41. ZMAC Relocating Macro Assembler v 1.1, 03/06/90
  42.   Copyright 1988,1989 by A.E. Hawley
  43.  
  44.    Syntax: 
  45.         ZMAC [dir:]name[.typ]   [[/]option, ...]
  46.  
  47.    Options:                                         defaults:
  48.          C - listing to Console                      NO 
  49.          L - Listing to printer                      NO 
  50.          H - object code format (HEX/REL)            REL
  51.          Q - display assembly statistics?            YES
  52.  
  53.          O[filespec] - Object file    (name.REL)     YES
  54.          P[filespec] - listing file   (name.PRN)     NO 
  55.          S[filespec] - Symbol file    (name.SYM)     NO 
  56.          E[filespec] - Error Log file (name.ERR)     YES
  57.  
  58. - Use options in any combination, separated by " " or ",".
  59. - Single option letters (no filespec) toggle the default.
  60. - When a filespec is included, the file is produced as required.
  61. - "filespec" is  [dir:]filename[.typ]
  62. - Use ZCNFG to Review & Set defaults.
  63.  
  64. B3:LINK>record off;NOTE this turns off RECORDER.IOP
  65.  
  66. ----------------------------------------------------------------
  67.  
  68.                 ZMAC PSEUDO-OPS
  69.  
  70. ZMAC implements a large number of pseudo-ops. If you're familiar with
  71. another popular assembler, you'll find many old friends here.
  72.  
  73.     $INCLUDE    .180        .ACCEPT        .COMMENT
  74.     .DEPHASE    .HD64        .IF1        .IF16    
  75.     .IN        .LALL        .LCTL        .LFCOND    
  76.     .LIST        .PHASE        .PRINT        .PRINTX    
  77.     .RADIX        .REQUEST    .RLIST        .SALL    
  78.     .SBTTL        .SFCOND        .SLIST        .TITLE    
  79.     .XALL        .XCTL        .XLIST        .Z80    
  80.     ASEG        ASET        COMMON        CSEG    
  81.     DB        DC        DEFB        DEFC    
  82.     DEFL        DEFM        DEFS        DEFW    
  83.     DEFZ        DS        DSEG        DW    
  84.     DZ        ELSE        END        ENDIF    
  85.     ENDM        ENT        ENTRY        EQU    
  86.     EXITM        EXT        EXTERNAL    EXTRN    
  87.     GLOBAL        IF        IF1        IF2    
  88.     IFB        IFDEF        IFE        IFF    
  89.     IFG        IFGE        IFL        IFLE    
  90.     IFN        IFNB        IFNDEF        IFP1    
  91.     IFP2        IFT        INCLUDE        IRP    
  92.     IRPC        LOCAL        MACLIB        MACRO    
  93.     NAME        ORG        PAGE        PUBLIC    
  94.     REPT        SET        SUBTTL        TITLE    
  95.  
  96.  
  97. ================================================================
  98.  
  99.                             ZML, the Linker
  100.  
  101. ZML links Microsoft format REL and Z-System ZRL files to make COM, BIN,ì
  102. PRL, SRL, and RSX type files.  ZML is friendly for occasional use onì
  103. small jobs and sophisticated enough to handle the really demandingì
  104. ones.  The HELP screen is always just a keystroke away.  For complexì
  105. jobs, ZML has an interactive mode designed for operation from a ZEXì
  106. script.  You can tell it what relocation address to use for ANYì
  107. relocatable segment (that's how ZRL files are linked).  It handles anì
  108. unlimited number of named commons, any of which can be named as aì
  109. code/data type segment.  ZML truncates uninitialized data at the end ofì
  110. the linked code.
  111.  
  112. The HELP screen for ZML (renamed to LINK for this demonstration)
  113. summarizes the powerful command structure of this linker. Note that
  114. the actual name assigned is used in the SYNTAX definition.
  115.  
  116. B3:LINK>link //
  117.  
  118. ZML Linker V1.2- 02/18/90
  119. Syntax:  LINK      item [,item...] [<space> or ,]
  120.  
  121.                   item = filespec[modifier]  or  option[ option...]
  122.                                 space required--^-------^
  123.  
  124. ________ Modifiers __________       ____ Options or Modifiers _____
  125. (none)       file to link           /M or /Y   Make global symbol file
  126. / or /S      library to Search      /P or /K   Provide Prl/sPr header
  127. = or /N      Names output file      /I         Insert rsx header file
  128.                                     /Q         Quit and exit
  129.                                     /E         link and Exit
  130.  
  131.     ________________  Options ( / is optional )  ________________
  132.     /A<hex>               main load Address (default: 100h)
  133.     /C<hex>, D<hex>       load address for Cseg, Dseg
  134.     /R[<seg><sp>]<hex>    set Reloc addr for <seg>, (default: CSEG)
  135.     /T<seg>               Tag <seg> as a CODE type segment
  136.     /S                    global Symbol listing to default file
  137.     /L                    List global symbols on console
  138.     -S,-M,-Y,-L,-K,-P,-I  negation turns these functions OFF
  139.  
  140. B3:LINK>record off;NOTE that this screen is courtesy of RECORDER
  141.  
  142. ================================================================
  143.  
  144.                     ZMLIB, the mREL Library Utility
  145.  
  146. ZMLIB is a simple, easy-to-use library manager for MREL format objectì
  147. libraries.  It creates and modifies libraries by adding or deletingì
  148. modules.  Want to see what's in a library?  ZMLIB displays the moduleì
  149. names and entry symbols in a neat, paginated format.  Z3LIB, SYSLIB,ì
  150. and VLIB can all be managed with ZMLIB.
  151.  
  152. The ZMLIB (here renamed to LIB) help screen:
  153.  
  154. B1:ZMAC>lib //
  155.  
  156.  
  157. Z/CPM Library Manager, Version 1.5 Copyright 1988 A.E. Hawley
  158. Function: Create, Modify, or display contents of
  159.           a REL format Library file (LIB).
  160. Syntax:
  161.           LIB   LIB[=MOD[,MOD...]]  [[/]<option>]
  162. <option> is one of:
  163.         M - Display names of modules in LIB
  164.         P - Display names and public symbols in LIB
  165.         D - Delete modules MOD 
  166.         R - Replace MOD(s) in LIB
  167.         A - Append MOD(s) to LIB, create new LIB if required
  168. If no option is present, then
  169.         Default is P if LIB is the only argument (no "="), and
  170.         Default is A if the form "LIB=MOD[,MOD...]" is present.
  171.  
  172. B1:ZMAC>record off
  173.  
  174. ----------------------------------------------------------------
  175.  
  176. Here is the display produced by ZMLIB for a portion of the VLIB
  177. rel library used by many Z-system utilities. Note that the screen
  178. display is organized and paginated for easy reading and reference.
  179.  
  180. B3:LINK>lib 8:vlib
  181.  
  182. Z/CPM Library Manager, Version 1.5 Copyright 1988 A.E. Hawley
  183. module:   Entry Point Symbol(s):
  184. VIDQ      CLRPDM    
  185. VIDP      SELPDM    
  186. VIDJ      DRFBOX    DRBOX     ERABOX    GFBOX     GBOX      
  187.           GERBOX    CHKBOX    
  188. VIDH      DRHBAR    DRHORZ    ERAHOR    GHBAR     ERAHBA    
  189.  
  190. VIDF      ULEFT     URIGHT    LLEFT     LRIGHT    
  191. VIDG      LTISEC    RTISEC    UISEC     LISEC     ISEC      
  192.  
  193. VIDD      DRFULL    DRHASH    @GSET0    
  194. VIDI      DRVBAR    DRVERT    ERAVER    GVBAR     ERAVBA    
  195.  
  196. VIDE      GRXON     GRXOFF    
  197. VIDK      MCLS      
  198. VIDL      SPDMCH    ISPDM     
  199. VIDM      ISCUR     
  200. VIDO      SETPDM    SETPDR    PDMINI    @PDMCH    @PDMBF    
  201.           @MBUFF    
  202. VIDN      GZ3INI    
  203. VLGXYM    GXYMSG    VPRINT    VPSTR     
  204.  
  205. CR or Space to continue
  206.  
  207. B3:LINK>record off
  208.  
  209. ================================================================
  210.  
  211.                          ASSEMBLY REFERENCES
  212.  
  213. Further reading on assembly language principles, strategies, and
  214. coding tricks. These start where your favorite Assembly Language
  215. Programming textbook leaves off (usually). The ZMAC manual is also
  216. a source for insight into assembly language principles and further
  217. references on programming.
  218.  
  219.     Microsystems, V4 Number 9, Sep 1983, p.86
  220.      "Relocating Assemblers and Linkage Editors: Part 1"
  221.       by Andrew Bender
  222.  
  223.     Microsystems, V4 Number 10, Oct 1983, p.114
  224.      "Relocating Assemblers and Linkage Editors: Part 2"
  225.       by Andrew Bender
  226.  
  227.     Microsystems, V5 Number 1, Jan 1984, p.120
  228.      "Relocating Assemblers and Linkage Editors: Part 3"
  229.       by Andrew Bender
  230.  
  231.     Micro/Systems Journal, V1 Number 3, Jul/Aug 1985, p.26
  232.      "Structured Programming with M80", by Dennis N. Quinn
  233.  
  234.     TCJ #35 Nov/Dec 1988, P 27
  235.      Rel-Style Assembly Language for CP/M and Z-System, 
  236.          by Bruce Morgan
  237.  
  238.     TCJ #36 Jan/Feb 1989, P 38 (part 2)
  239.      Rel-Style Assembly Language for CP/M and Z-System, 
  240.          by Bruce Morgan
  241.  
  242.     TCJ #39 Jul/Aug 1989, P 3
  243.      Programming for performance, by Lee A. Hart
  244.  
  245.  
  246. ================================================================
  247.  
  248.           AVAILABLE FROM PARTICIPATING Z-NODES, AND
  249.  
  250.     ALPHA SYSTEMS            PLU*PERFECT SYSTEMS
  251.     711 Chatsworth Place        410 23rd Street
  252.     San Jose, CA 95128        Santa Monica, CA 90402
  253.     (408) 297-5583 (voice)        (213) 393-6105 (voice)
  254.     (213) 670-9465 (modem)        (213) 670-9465 (modem)
  255.     
  256.     SAGE MICROSYSTEMS EAST        REVASCO
  257.     1435 Centre Street        6032 Chariton Ave.
  258.     Newton Centre, MA 02159        Los Angeles, CA 90056
  259.     (617) 965-3552 (voice)        (213) 649-3575 (voice)
  260.     (617) 965-7259 (modem)        (213) 670-9465 (modem)
  261.  
  262.