home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol127 / lasm.dqc / LASM.DOC
Encoding:
Text File  |  1985-02-10  |  3.6 KB  |  134 lines

  1. ************************************************************************
  2. *                                       *
  3. *  10/01/82                                   *
  4. *                                       *
  5. *  LASM is an update of LINKASM, with the minor change that it prints  *
  6. *  the name of each linked file before it is opened.  This helps track *
  7. *  progress, and helps find misspelled names.                   *
  8. *                                       *
  9. *                        - Ward Christensen     *
  10. *                                       *
  11. ************************************************************************
  12.  
  13. LINKASM.COM
  14. 01/07/80        by Ward Christensen
  15.  
  16. OVERVIEW:
  17.     LINKASM is based on CP/M assembler 1.0, and is compatible with
  18. 1.0, 1.3, and 1.4 assemblers.  (2.0? Dunno.)
  19.  
  20.              ----------------
  21.  
  22. LINKASM is a rewrite of CP/M 1.0 ASM.COM, incorporating:
  23.  
  24. *    A new pseudo-op code, LINK.
  25. *    Smaller .COM file size (6K vs 8K).
  26. *    Faster execution via larger ASM, HEX, and PRN buffers
  27. *       (about 29% faster with PRN file, about 17% faster without)
  28. *    Corrections to properly handle lower case DB values.
  29. *    Prints the number of source lines read
  30. *    Produces a symbol table for use under SID
  31.  
  32.     The LINK pseudo-op allows a file to "chain" to the next .ASM
  33. file, thereby allowing very large source files to be processed without
  34. having to PIP them together.
  35.  
  36. RESTRICTIONS:
  37.     All the linked .ASM files must be on the same disk.
  38.     Nested IFs are not handled (ASM.COM didn't either).  Note that
  39. you can use IF to conditionally link to the next module:
  40.  
  41.      IF    CLOCK
  42.     LINK    CLOCKRTN
  43.      ENDIF
  44. ;
  45.      IF    NOT CLOCK
  46.     LINK    OTHERRTN
  47.      ENDIF
  48.  
  49.  
  50.     For example, if CLOCK is true, then LINK CLOCKRTN (i.e.,
  51. CLOCKRTN.ASM) will take place, and the assembler will never see the
  52. ENDIF.  This is not a problem as the next encountered IF will be handled
  53. properly.
  54.             ----------------
  55. USAGE:
  56.     LINKASM is totally compatible with ASM.COM, and you may there-
  57. fore replace ASM.  Its performance will be slightly better than ASM.COM,
  58. and it takes less space on disk (6K vs 8K).  Execute it just like ASM.COM:
  59.     
  60.     LINKASM NAME.ABZ
  61.  
  62. where:    A is the .ASM file disk (A, etc.)
  63.     B is the .HEX file disk (A, etc., or Z for none)
  64.     Z is the .PRN file disk (A, B,... or Z for none, X for console)
  65.  
  66.     The default is the logged in disk for all 3.
  67.  
  68.     If you wish to write a symbol table file, follow the command line
  69. with the disk to be written to (A, B, ...) then a colon.  For example, to
  70. assemble MODEM from the A: disk, put the .HEX on the A: disk, send the
  71. .SYM file to B:, and the listing to the console:
  72.  
  73.     LINKASM MODEM.AAX B:
  74.  
  75.     To assemble it doing everything on the A: disk (assuming A: is
  76. the logged in disk):
  77.  
  78.     LINKASM MODEM A:
  79.  
  80.     The ":" must be specified after the .SYM disk.  The .SYM file is
  81. "partially" sorted, i.e., all Axxxx then all Bxxxx etc.  SID fully scans
  82. the symbol table anyway, so sorting it is not necessary, so I did this
  83. quick sort hack just to make it eaiser for YOU to find a symbol.
  84.  
  85.             ----------------
  86.  
  87.     The LINK pseudo ops take a single operand:  The name of an .ASM
  88. file to be processed next.  For example:
  89.  
  90. A:TEST1.ASM:
  91.  
  92.     ORG     100H
  93.     LXI     H,MSG
  94.     MVI     C,9
  95.     CALL    BDOS
  96.     RET
  97.  
  98.     LINK    TEST2
  99.  
  100. ----------------
  101.  
  102. A:TEST2.ASM:
  103.  
  104. MSG:  DB      'LINKED'
  105. BDOS: EQU     5
  106.  
  107. ----------------
  108.  
  109.     Then assemble it:
  110.  
  111. A>LASM TEST1.AZX
  112. LASM AS OF 07/06/82
  113.  
  114.  
  115.  0100            ORG    100H
  116.  
  117.  0100 210901        LXI     H,MSG
  118.  0103 0E09        MVI    C,9
  119.  0105 CD0500        CALL    BDOS
  120.  0108 C9        RET
  121.  
  122.                         LINK    TEST2
  123.  
  124.  0109 4C494E4B45MSG:    DB    'LINKED'
  125.  0005 =        BDOS:    EQU    5
  126. 010F
  127. 000H USE FACTOR
  128. 8 INPUT LINES READ
  129. END OF ASSEMBLY
  130.  
  131.             ----------------
  132.  
  133.                 Ward Christensen
  134.