home *** CD-ROM | disk | FTP | other *** search
-
- LASM-TDL Description
-
- This is an enhanced version of the public domain LINKASM assembler.
- Originally authored by Digital Research, rewritten and 'LINKed' by Ward
- Christenson, improved by Pete Mack, expanded by Steve Schlaifer and now
- compatabile with TDL operands by Pete Rudenko. The major remaining step
- would be to MACROize it. Current primary enhancement is the accomodation
- of the TDL Z80 operands and a 'COPY' directive. This variation is now
- compatable with two Z80 disassemblers also in the public domain.
-
- Directives which are recognized by this assembler but not by ASM are
- LINK, COPY, XREF, SYM, TITLE, EJECT and DEF.
-
- LINK 'file'
-
- LINK closes the current input source file, opens the named file which
- must be on the same drive and with the extension .ASM and continues the
- assembly process using this new file as a continuation of the previous.
-
- COPY 'file'
-
- COPY is similar to the LINK above except it will return to the invoking
- source file after end of file on the included member. Currently only 1
- level of COPY will be accomodated.
-
- XREF
-
- XREF has no operands. It causes a cross reference of all the labels in
- the assembled source file to be listed at the end of the source listing
- with the line numbers where they are defined followed by the line
- numbers where they are used.
-
- SYM
-
- SYM has no operands. It causes a file with the extension .SYM to be
- created on the same drive on which the .HEX file is being written.
- This file contains a list of all the labels and their assembled
- addresses.
-
- TITLE 'title string'
-
- TITLE takes a string operand. It causes the string to be printed at
- the top of each page of the source listing for titling the listing.
-
- EJECT
-
- EJECT merely causes the assembly listing to do a page break. This is
- usefull for creating white space seperators at the appropriate points.
-
- DEF
-
- There is one other incompatibility between this assembler and the ASM
- assembler. ASM has a SET directive which is like EQU but allows later
- redefinition of the label. The Z80 has an op code called SET for setting
- a selected bit in a byte. Since the SET directive is rarely used in ASM,
- the SET directive is replaced by DEF.
-
-
-
- Operand symbols
-
- r Registers A,B,C,D,E,H,L
- n Any 8 bit value, + or -
- ii Index Registers X or Y
- d An 8 bit displacement, -128<d<127
- zz Double registers B=BC and D=DE
- nn Any 16 bit value, + or -
- rr Double registers B, D, H, SP
- qq Double registers B, D, H, PSW
- s any above r, M or [ii+-d]
- tt Double registers B, D, SP, X
- uu Double registers B, D, SP, Y
- b Bit position right to left, 0 to 7
-
-
- Pseudo OPs
-
- ORG END
- DB DW DS
- IF ENDIF
- EQU DEF
- TITLE EJECT
- SYM XREF
- LINK COPY
-
-
- Operand Operations
-
- AND (
- NOT )
- SHL +
- SHR -
- OR *
- XOR /
- MOD
-
-
- OP codes -- 8 Bit Loads
-
- MVI s,n
- MOV r,s MOV s,r
- LDA nn STA nn
- LDAX zz STAX zz
- LDAI STAI
- LDAR STAR
-
-
- OP codes -- 8 Bit math & logic
-
- ADD s ADI n
- ADC s ACI n
- SUB s SUI n
- SBB s SBI n
- ANA s ANI n
- ORA s ORI n
- XRA s XRI n
- CMP s CPI n
- INR s DCR s
- CMA NEG
- DAA
-
-
- OP codes -- 8 Bit Rotate & Shift
-
- RLD RRD
- RLC RAL
- RRC RAR
- RLCR s RALR s
- RRCR s RARR s
- SLAR s SRAR s SRLR s
-
-
- OP codes -- Bit manipulation
-
- SET b,s RES b,s BIT b,s
-
-
- OP codes -- Exchange, Move and Search
-
- LDI LDIR
- LDD LDDR
- CCI CCIR
- CCD CCDR
- XCHG EXAF EXX
- XTHL XTIX XTIY
-
-
- OP codes -- Input & Output
-
- IN n INP r
- INI INIR
- IND INDR
- OUT n OUTP r
- OUTI OUTIR
- OUTD OUTDR
-
-
- OP codes -- 16 Bit Loads
-
- LXI rr,nn LXI ii,nn
- LBCD nn SBCD nn
- LDED nn SDED nn
- LHLD nn SHLD nn
- LIXD nn SIXD nn
- LIYD nn SIYD nn
- LSPD nn SSPD nn
- POP ii POP qq
- PUSH ii PUSH qq
- SPHL SPIX SPIY
-
-
- OP codes -- 16 Bit arithmetic
-
- DSBC rr
- DAD rr DADC rr
- DADX tt DADY uu
- INX rr INX ii
- DCX rr DCX ii
-
-
- OP codes -- Misc control ops
-
- EI DI
- NOP HLT
- STC CMC
- IM0 IM1 IM2
-
-
- OP codes -- Jumps Abs & Rel
-
- JMP nn JZ JNZ JC JNC JPO JPE JP JM
- JMPR nn JRZ JRNZ JRC JRNC
- DJNZ nn -126<nn-PC<+129
- PCHL PCIX PCIY
-
-
- OP codes -- Calls & Returns
-
- CALL nn CZ CNZ CC CNC CPO CPE CP CM
- RET RZ RNZ RC RNC RPO RPE RP RM
- RST n n=0,1,2,3,4,5,6,7,8
- RETI RETN
-
-