home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / program / compiler / fasbin21 / doc / asz8.lp < prev    next >
Text File  |  1992-09-13  |  14KB  |  529 lines

  1.  
  2.  
  3.  
  4.                                   - 1 -
  5.  
  6.  
  7.  
  8.        A.  A✓A✓A✓Ap✓p✓p✓pp✓p✓p✓pe✓e✓e✓en✓n✓n✓nd✓d✓d✓di✓i✓i✓ix✓x✓x✓x f✓f✓f✓fo✓o✓o✓or✓r✓r✓r a✓a✓a✓as✓s✓s✓sz✓z✓z✓z8✓8✓8✓8 F✓F✓F✓Fr✓r✓r✓ra✓a✓a✓an✓n✓n✓nk✓k✓k✓ke✓e✓e✓en✓n✓n✓ns✓s✓s✓st✓t✓t✓te✓e✓e✓ei✓i✓i✓in✓n✓n✓n A✓A✓A✓As✓s✓s✓ss✓s✓s✓se✓e✓e✓em✓m✓m✓mb✓b✓b✓bl✓l✓l✓le✓e✓e✓er✓r✓r✓r
  9.  
  10.        A.1  P✓P✓P✓Ps✓s✓s✓se✓e✓e✓eu✓u✓u✓ud✓d✓d✓do✓o✓o✓o O✓O✓O✓Op✓p✓p✓pe✓e✓e✓er✓r✓r✓ra✓a✓a✓at✓t✓t✓ti✓i✓i✓io✓o✓o✓on✓n✓n✓ns✓s✓s✓s
  11.  
  12.        A.1.1  _✓S_✓t_✓a_✓n_✓d_✓a_✓r_✓d__✓P_✓s_✓e_✓u_✓d_✓o__✓O_✓p_✓e_✓r_✓a_✓t_✓i_✓o_✓n__✓M_✓n_✓e_✓m_✓o_✓n_✓i_✓c_✓s
  13.  
  14.             End                                END
  15.             File Inclusion                     INCL INCLUDE
  16.             If                                 IF
  17.             Else                               ELSE
  18.             End If                             ENDI
  19.             Equate                             EQU
  20.             Set                                SET
  21.             Org                                ORG
  22.             Reserve Memory                     RESERVE RMB
  23.             Define Byte Data                   BYTE DB FCB
  24.             Define Word Data                   DW FDB WORD
  25.             Define String Data                 FCC STRING
  26.             Define Character Set Translation   CHARSET
  27.             Define Character Value             CHARDEF CHD
  28.             Use Character Translation          CHARUSE
  29.  
  30.        A.1.2  _✓M_✓a_✓c_✓h_✓i_✓n_✓e__✓D_✓e_✓p_✓e_✓n_✓d_✓e_✓n_✓t__✓P_✓s_✓e_✓u_✓d_✓o__✓O_✓p_✓e_✓r_✓a_✓t_✓i_✓o_✓n_✓s
  31.  
  32.        A.1.2.1  _✓R_✓e_✓g_✓i_✓s_✓t_✓e_✓r__✓S_✓y_✓m_✓b_✓o_✓l__✓D_✓e_✓f_✓i_✓n_✓i_✓t_✓i_✓o_✓n_✓s
  33.  
  34.             Label REG RegisterSymbol
  35.             Label RREG RegisterSymbol
  36.             Label REG expression
  37.             Label RREG expression
  38.             Label REG
  39.             Label RREG
  40.  
  41.        Symbols in the register address space are defined with the
  42.        REG, and RREG pseudooperations.  The symbol in the label
  43.        field is added to the symbol table as a register symbol.
  44.        The symbols defined with the REG are single byte registers.
  45.        The symbols defined with RREG are double registers, and must
  46.        be on even boundries.
  47.  
  48.        The operand can be in three forms.
  49.  
  50.        When the operand is a register symbol, the label symbol is
  51.        defined with the same register address as the symbol, with
  52.        the size determined by which pseudoop is used.  Aliases to
  53.        working registers must use this form.
  54.  
  55.        When the operand is an expression, the label symbol is
  56.        defined at the value of the expression, with the size
  57.        determined by which pseudoop is used.  The value must be in
  58.        the range 0 to 127 (or 223 for the UPC register set), or 240
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                                   - 2 -
  71.  
  72.  
  73.  
  74.        to 255, and must be defined at the first pass.
  75.  
  76.        With no operand, the label symbol is defined at the register
  77.        address following the previous REG or RREG instruction.  If
  78.        a previous Register Definition used a working register as
  79.        its operand, the current definition will be in the working
  80.        set, otherwise it will be in the register file.
  81.  
  82.        Register Symbols must be surrounded by parenthesis when used
  83.        in expressions.
  84.  
  85.        A.1.2.2  _✓R_✓e_✓g_✓i_✓s_✓t_✓e_✓r__✓S_✓e_✓t__✓S_✓e_✓l_✓e_✓c_✓t_✓i_✓o_✓n
  86.  
  87.             CPU string
  88.  
  89.        The register set can be specified in the source file with
  90.        the CPU pseudooperation.  The string, delimited by quotes or
  91.        apostrophes, is scanned for a substring which selects which
  92.        register set is used.  When the program is invoked, this
  93.        operation is performed on the name of the program, then the
  94.        -p optional arguement, if any, and then any CPU statements.
  95.        The last one selects the which subset of the registers the
  96.        assembler will accept.
  97.  
  98.             Register Architecture    Substrings
  99.  
  100.             z8                       86 z8 Z8
  101.  
  102.             Universal                UPC upc 9
  103.             Peripheral
  104.             Controller
  105.  
  106.        A.2  I✓I✓I✓In✓n✓n✓ns✓s✓s✓st✓t✓t✓tr✓r✓r✓ru✓u✓u✓uc✓c✓c✓ct✓t✓t✓ti✓i✓i✓io✓o✓o✓on✓n✓n✓ns✓s✓s✓s
  107.  
  108.        A.2.1  _✓I_✓n_✓s_✓t_✓r_✓u_✓c_✓t_✓i_✓o_✓n__✓L_✓i_✓s_✓t
  109.  
  110.        Opcode   Syntax                                 Selection Criteria
  111.  
  112.  
  113.        ADC       '@' REGISTER ',' '#' expr
  114.        ADC       REGISTER ',' '#' expr
  115.        ADC       REGISTER ',' '@' REGISTER
  116.        ADC       REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  117.        ADC       REGISTER ',' REGISTER
  118.        ADC       REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  119.  
  120.        ADD       '@' REGISTER ',' '#' expr
  121.        ADD       REGISTER ',' '#' expr
  122.        ADD       REGISTER ',' '@' REGISTER
  123.        ADD       REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  124.        ADD       REGISTER ',' REGISTER
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                                   - 3 -
  137.  
  138.  
  139.  
  140.        Opcode   Syntax                                 Selection Criteria
  141.  
  142.        ADD       REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  143.  
  144.        AND       '@' REGISTER ',' '#' expr
  145.        AND       REGISTER ',' '#' expr
  146.        AND       REGISTER ',' '@' REGISTER
  147.        AND       REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  148.        AND       REGISTER ',' REGISTER
  149.        AND       REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  150.  
  151.        CALL      '@' REGISTER                          DSTDBL
  152.        CALL      expr
  153.  
  154.        CCF
  155.  
  156.        CLR       '@' REGISTER
  157.        CLR       REGISTER
  158.  
  159.        COM       '@' REGISTER
  160.        COM       REGISTER
  161.  
  162.        CP        '@' REGISTER ',' '#' expr
  163.        CP        REGISTER ',' '#' expr
  164.        CP        REGISTER ',' '@' REGISTER
  165.        CP        REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  166.        CP        REGISTER ',' REGISTER
  167.        CP        REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  168.  
  169.        DA        '@' REGISTER
  170.        DA        REGISTER
  171.  
  172.        DEC       '@' REGISTER
  173.        DEC       REGISTER
  174.  
  175.        DECW      '@' REGISTER
  176.        DECW      REGISTER                              DSTDBL
  177.  
  178.        DI
  179.  
  180.        DJNZ      REGISTER ',' expr                     DSTWORK
  181.  
  182.        EI
  183.  
  184.        INC       '@' REGISTER
  185.        INC       REGISTER
  186.        INC       REGISTER                              DSTWORK
  187.  
  188.        INCW      '@' REGISTER
  189.        INCW      REGISTER                              DSTDBL
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.                                   - 4 -
  203.  
  204.  
  205.  
  206.        Opcode   Syntax                                 Selection Criteria
  207.  
  208.        IRET
  209.  
  210.        JP        '@' REGISTER                          DSTDBL
  211.        JP        CONDITION ',' expr
  212.        JP        expr
  213.  
  214.        JR        CONDITION ',' expr
  215.        JR        expr
  216.  
  217.        LD        '@' REGISTER ',' '#' expr
  218.        LD        '@' REGISTER ',' REGISTER
  219.        LD        '@' REGISTER ',' REGISTER             DSTWORK+SRCWORK
  220.        LD        REGISTER ',' '#' expr
  221.        LD        REGISTER ',' '#' expr                 DSTWORK
  222.        LD        REGISTER ',' '@' REGISTER
  223.        LD        REGISTER ',' '@' REGISTER             DSTWORK+SRCWORK
  224.        LD        REGISTER ',' REGISTER
  225.        LD        REGISTER ',' REGISTER                 DSTWORK
  226.        LD        REGISTER ',' REGISTER                 SRCWORK
  227.        LD        REGISTER ',' expr '(' REGISTER ')'    DSTWORK+SRCWORK
  228.        LD        expr '(' REGISTER ')' ',' REGISTER    DSTWORK+SRCWORK
  229.  
  230.        LDC       '@' REGISTER ',' REGISTER             DSTWORK+SRCWORK
  231.        LDC       REGISTER ',' '@' REGISTER             DSTWORK+SRCWORK
  232.  
  233.        LDCI      '@' REGISTER ',' '@' REGISTER         DSTDBL+DSTWORK+SRCWORK
  234.        LDCI      '@' REGISTER ',' '@' REGISTER         SRCDBL+DSTWORK+SRCWORK
  235.  
  236.        LDE       '@' REGISTER ',' REGISTER             DSTWORK+SRCWORK
  237.        LDE       REGISTER ',' '@' REGISTER             DSTWORK+SRCWORK
  238.  
  239.        LDEI      '@' REGISTER ',' '@' REGISTER         DSTDBL+DSTWORK+SRCWORK
  240.        LDEI      '@' REGISTER ',' '@' REGISTER         SRCDBL+DSTWORK+SRCWORK
  241.  
  242.        NOP
  243.  
  244.        OR        '@' REGISTER ',' '#' expr
  245.        OR        REGISTER ',' '#' expr
  246.        OR        REGISTER ',' '@' REGISTER
  247.        OR        REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  248.        OR        REGISTER ',' REGISTER
  249.        OR        REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  250.  
  251.        POP       '@' REGISTER
  252.        POP       REGISTER
  253.  
  254.        PUSH      '@' REGISTER
  255.        PUSH      REGISTER
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.                                   - 5 -
  269.  
  270.  
  271.  
  272.        Opcode   Syntax                                 Selection Criteria
  273.  
  274.        RCF
  275.  
  276.        RET
  277.  
  278.        RL        '@' REGISTER
  279.        RL        REGISTER
  280.  
  281.        RLC       '@' REGISTER
  282.        RLC       REGISTER
  283.  
  284.        RR        '@' REGISTER
  285.        RR        REGISTER
  286.  
  287.        RRC       '@' REGISTER
  288.        RRC       REGISTER
  289.  
  290.        SBC       '@' REGISTER ',' '#' expr
  291.        SBC       REGISTER ',' '#' expr
  292.        SBC       REGISTER ',' '@' REGISTER
  293.        SBC       REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  294.        SBC       REGISTER ',' REGISTER
  295.        SBC       REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  296.  
  297.        SCF
  298.  
  299.        SRA       '@' REGISTER
  300.        SRA       REGISTER
  301.  
  302.        SRP       '#' expr
  303.  
  304.        SUB       '@' REGISTER ',' '#' expr
  305.        SUB       REGISTER ',' '#' expr
  306.        SUB       REGISTER ',' '@' REGISTER
  307.        SUB       REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  308.        SUB       REGISTER ',' REGISTER
  309.        SUB       REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  310.  
  311.        SWAP      '@' REGISTER
  312.        SWAP      REGISTER
  313.  
  314.        TCM       '@' REGISTER ',' '#' expr
  315.        TCM       REGISTER ',' '#' expr
  316.        TCM       REGISTER ',' '@' REGISTER
  317.        TCM       REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  318.        TCM       REGISTER ',' REGISTER
  319.        TCM       REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  320.  
  321.        TM        '@' REGISTER ',' '#' expr
  322.        TM        REGISTER ',' '#' expr
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.                                   - 6 -
  335.  
  336.  
  337.  
  338.        Opcode   Syntax                                 Selection Criteria
  339.  
  340.        TM        REGISTER ',' '@' REGISTER
  341.        TM        REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  342.        TM        REGISTER ',' REGISTER
  343.        TM        REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  344.  
  345.        XOR       '@' REGISTER ',' '#' expr
  346.        XOR       REGISTER ',' '#' expr
  347.        XOR       REGISTER ',' '@' REGISTER
  348.        XOR       REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  349.        XOR       REGISTER ',' REGISTER
  350.        XOR       REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  351.  
  352.        A.2.2  _✓S_✓e_✓l_✓e_✓c_✓t_✓i_✓o_✓n__✓C_✓r_✓i_✓t_✓e_✓r_✓i_✓a__✓K_✓e_✓y_✓w_✓o_✓r_✓d_✓s
  353.  
  354.             DSTWORK             The instruction will use the short
  355.                                 form if the register is in the
  356.                                 working set.
  357.  
  358.             DSTDBL              The instruction requires that the
  359.                                 destination register be a double
  360.                                 register.
  361.  
  362.             SRCWORK             The instruction will use the short
  363.                                 form if the register is in the
  364.                                 working set.
  365.  
  366.             SRCDBL              The instruction requires that the
  367.                                 source register be a double
  368.                                 register.
  369.  
  370.        A.2.3  _✓A_✓p_✓o_✓s_✓t_✓r_✓o_✓p_✓h_✓e_✓s  The apostrophes in the syntax field are
  371.        a notation used for the parser generator and are not put in
  372.        the assembler source statement.
  373.  
  374.        A.3  N✓N✓N✓No✓o✓o✓ot✓t✓t✓te✓e✓e✓es✓s✓s✓s
  375.  
  376.        A.3.1  _✓R_✓e_✓g_✓i_✓s_✓t_✓e_✓r_✓s  Registers are treated as symbols with a
  377.        different syntactic type than memory addresses. This
  378.        seperates symbols which would have the same numeric value
  379.        into the different address spaces, register and memory.
  380.        Using a symbol that is already defined as a Register as a
  381.        statement label for an instruction or a SET/EQU will result
  382.        in a "Syntax Error".
  383.  
  384.        Registers are represented by the reserved symbols R0 thru
  385.        R15 and RR0 thru RR14 for the working set registers. Other
  386.        registers are defined with the REG and RREG
  387.        pseudooperations.
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.                                   - 7 -
  401.  
  402.  
  403.  
  404.        Register Symbols must be surrounded by parenthesis when used
  405.        in expressions.  Converted register values are meaningless
  406.        as ROM or Data memory addresses.  Working set registers have
  407.        a value between 0e0h and 0efh.
  408.  
  409.             Example
  410.  
  411.             ld r3, #(buffstart)
  412.  
  413.        A.3.2  _✓D_✓a_✓t_✓a__✓M_✓e_✓m_✓o_✓r_✓y  ROM and Data memory addresses are not
  414.        differentiated.
  415.  
  416.        A.3.3  _✓C_✓o_✓n_✓d_✓i_✓t_✓i_✓o_✓n_✓s  Conditions are represented by the
  417.        reserved symbols F, C, NC, Z, NZ, PL, MI, OV, NOV, EQ, NE,
  418.        GE, LT, GT, LE, UGE, ULT, UGT, ULE
  419.  
  420.        Note that the EQ, NE, GT, LE, GE, LT operators are not
  421.        available in this assembler, the =, <>, >, <=, >=, < special
  422.        character representations must be used.
  423.  
  424.        A.3.4  _✓R_✓e_✓s_✓e_✓r_✓v_✓e_✓d__✓S_✓y_✓m_✓b_✓o_✓l_✓s
  425.  
  426.        A.3.4.1  _✓M_✓a_✓c_✓h_✓i_✓n_✓e__✓D_✓e_✓p_✓e_✓n_✓d_✓e_✓n_✓t__✓R_✓e_✓s_✓e_✓r_✓v_✓e_✓d__✓S_✓y_✓m_✓b_✓o_✓l_✓s  AND C DEFINED
  427.        EQ F GE GT HIGH LE LOW LT MI MOD NC NE NOT NOV NZ OR OV PL
  428.        R0 R1 R10 R11 R12 R13 R14 R15 R2 R3 R4 R5 R6 R7 R8 R9 RR0
  429.        RR10 RR12 RR14 RR2 RR4 RR6 RR8 SHL SHR UGE UGT ULE ULT XOR Z
  430.        and defined high low mod not or shl shr xor
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.                                  CONTENTS
  471.  
  472.  
  473.        A.  Appendix for asz8 Frankenstein Assembler.............  1
  474.            A.1  Pseudo Operations...............................  1
  475.            A.2  Instructions....................................  2
  476.            A.3  Notes...........................................  6
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.                                   - i -
  525.  
  526.  
  527.  
  528.  
  529.