home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / utils / asmutl / lasm-tdl.lbr / LASM.DQC / LASM.DOC
Encoding:
Text File  |  1986-02-15  |  6.0 KB  |  206 lines

  1.  
  2.                          LASM-TDL Description
  3.  
  4.     This  is  an  enhanced version of the public domain  LINKASM  assembler.
  5.     Originally authored by Digital Research, rewritten and 'LINKed' by Ward
  6.     Christenson, improved by Pete Mack, expanded by Steve Schlaifer and now
  7.     compatabile with TDL operands by Pete Rudenko.  The major remaining step
  8.     would be to MACROize it.  Current primary enhancement is the accomodation
  9.     of the TDL Z80  operands and a 'COPY' directive.   This variation is now
  10.     compatable with two Z80 disassemblers also in the public domain.
  11.  
  12.     Directives  which  are recognized by this assembler but not by ASM are
  13.     LINK, COPY, XREF, SYM, TITLE, EJECT and DEF.
  14.  
  15.          LINK      'file'
  16.  
  17.     LINK closes the current input source file,  opens the named file  which
  18.     must be on the same drive and with the extension .ASM and continues the
  19.     assembly process using this new file as a continuation of the previous.
  20.  
  21.          COPY      'file'
  22.  
  23.     COPY is similar to the LINK above except it will return to the invoking
  24.     source file after end of file on the included member.  Currently only 1
  25.     level of COPY will be accomodated.
  26.  
  27.          XREF
  28.  
  29.     XREF has no operands.  It causes a cross reference of all the labels in
  30.     the assembled source file to be listed at the end of the source listing
  31.     with  the  line  numbers where they are defined followed  by  the  line
  32.     numbers where they are used.
  33.  
  34.          SYM
  35.  
  36.     SYM  has no operands.   It causes a file with the extension .SYM to  be
  37.     created  on  the same drive on which the .HEX file  is  being  written.
  38.     This  file  contains  a  list of all the  labels  and  their  assembled
  39.     addresses.
  40.  
  41.          TITLE     'title string'
  42.  
  43.     TITLE  takes a string operand.   It causes the string to be printed  at
  44.     the top of each page of the source listing for titling the listing.
  45.  
  46.          EJECT
  47.  
  48.     EJECT merely causes the assembly listing to do a page break.  This is
  49.     usefull for creating white space seperators at the appropriate points.
  50.  
  51.          DEF
  52.  
  53.     There is one other incompatibility between this assembler  and  the  ASM
  54.     assembler.  ASM  has a SET directive which is like EQU but allows later
  55.     redefinition of the label.  The Z80 has an op code called SET for setting
  56.     a selected bit in a byte.  Since the SET directive is rarely used in ASM,
  57.     the SET directive is replaced by DEF.
  58.  
  59.  
  60.  
  61.     Operand symbols
  62.  
  63.         r     Registers A,B,C,D,E,H,L
  64.         n     Any 8 bit value, + or -
  65.         ii    Index Registers X or Y
  66.         d     An 8 bit displacement, -128<d<127
  67.         zz    Double registers B=BC and D=DE
  68.         nn    Any 16 bit value, + or -
  69.         rr    Double registers B, D, H, SP
  70.         qq    Double registers B, D, H, PSW
  71.         s     any above r, M or [ii+-d]
  72.         tt    Double registers B, D, SP, X
  73.         uu    Double registers B, D, SP, Y
  74.         b     Bit position right to left, 0 to 7
  75.  
  76.  
  77.     Pseudo OPs
  78.  
  79.         ORG            END
  80.         DB      DW     DS
  81.         IF             ENDIF
  82.         EQU            DEF
  83.         TITLE          EJECT
  84.         SYM            XREF
  85.         LINK           COPY
  86.  
  87.  
  88.     Operand Operations
  89.  
  90.         AND            (
  91.         NOT            )
  92.         SHL            +
  93.         SHR            -
  94.         OR             *
  95.         XOR            /
  96.         MOD
  97.  
  98.  
  99.     OP codes -- 8 Bit Loads
  100.  
  101.         MVI   s,n
  102.         MOV   r,s      MOV   s,r
  103.         LDA   nn       STA   nn
  104.         LDAX  zz       STAX  zz
  105.         LDAI           STAI
  106.         LDAR           STAR
  107.  
  108.  
  109.     OP codes -- 8 Bit math & logic
  110.  
  111.         ADD   s        ADI   n
  112.         ADC   s        ACI   n
  113.         SUB   s        SUI   n
  114.         SBB   s        SBI   n
  115.         ANA   s        ANI   n
  116.         ORA   s        ORI   n
  117.         XRA   s        XRI   n
  118.         CMP   s        CPI   n
  119.         INR   s        DCR   s
  120.         CMA            NEG
  121.         DAA
  122.  
  123.  
  124.     OP codes -- 8 Bit Rotate & Shift
  125.  
  126.         RLD            RRD
  127.         RLC            RAL
  128.         RRC            RAR
  129.         RLCR  s        RALR  s
  130.         RRCR  s        RARR  s
  131.         SLAR  s        SRAR  s        SRLR  s
  132.  
  133.  
  134.     OP codes -- Bit manipulation
  135.  
  136.         SET   b,s      RES   b,s      BIT   b,s
  137.  
  138.  
  139.     OP codes -- Exchange, Move and Search
  140.  
  141.         LDI            LDIR
  142.         LDD            LDDR
  143.         CCI            CCIR
  144.         CCD            CCDR
  145.         XCHG           EXAF           EXX
  146.         XTHL           XTIX           XTIY
  147.  
  148.  
  149.     OP codes -- Input & Output
  150.  
  151.         IN    n        INP   r
  152.         INI            INIR
  153.         IND            INDR
  154.         OUT   n        OUTP  r
  155.         OUTI           OUTIR
  156.         OUTD           OUTDR
  157.  
  158.  
  159.     OP codes -- 16 Bit Loads
  160.  
  161.         LXI   rr,nn    LXI   ii,nn
  162.         LBCD  nn       SBCD  nn
  163.         LDED  nn       SDED  nn
  164.         LHLD  nn       SHLD  nn
  165.         LIXD  nn       SIXD  nn
  166.         LIYD  nn       SIYD  nn
  167.         LSPD  nn       SSPD  nn
  168.         POP   ii       POP   qq
  169.         PUSH  ii       PUSH  qq
  170.         SPHL           SPIX           SPIY
  171.  
  172.  
  173.     OP codes -- 16 Bit arithmetic
  174.  
  175.         DSBC  rr
  176.         DAD   rr       DADC  rr
  177.         DADX  tt       DADY  uu
  178.         INX   rr       INX   ii
  179.         DCX   rr       DCX   ii
  180.  
  181.  
  182.     OP codes -- Misc control ops
  183.  
  184.         EI             DI
  185.         NOP            HLT
  186.         STC            CMC
  187.         IM0            IM1            IM2
  188.  
  189.  
  190.     OP codes -- Jumps Abs & Rel
  191.  
  192.         JMP   nn       JZ   JNZ   JC   JNC   JPO   JPE   JP  JM
  193.         JMPR  nn       JRZ  JRNZ  JRC  JRNC
  194.         DJNZ  nn       -126<nn-PC<+129
  195.         PCHL           PCIX           PCIY
  196.  
  197.  
  198.     OP codes -- Calls & Returns
  199.  
  200.         CALL  nn       CZ   CNZ   CC   CNC   CPO   CPE   CP  CM
  201.         RET            RZ   RNZ   RC   RNC   RPO   RPE   RP  RM
  202.         RST   n        n=0,1,2,3,4,5,6,7,8
  203.         RETI           RETN
  204.  
  205.  
  206.