home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Guide / c-cplusplus-interactive-guide.iso / c_ref / csource4 / 267_01 / test26.asm < prev    next >
Assembly Source File  |  1989-01-13  |  5KB  |  351 lines

  1.         TITL    "2650 Cross-Assembler Test Source File"
  2.         EJE    60
  3. ;
  4. ; The 2650 opcodes in opcode numerical order:
  5. ;
  6. BYTE    EQU        012H
  7. MASK    EQU        034H
  8. PORT    EQU        056H
  9. ADDRESS    EQU        01234H
  10.  
  11. R0    EQU        0
  12. R1    EQU        1
  13. R2    EQU        2
  14. R3    EQU        3
  15.  
  16. ZERO    EQU        00B
  17. PLUS    EQU        01B
  18. MINUS    EQU        10B
  19. ANY    EQU        11B
  20.  
  21. ; 000H - 00FH.
  22.  
  23.     LODZ        R0        ; This opcode will change to 060H.
  24.     LODZ        R1
  25.     LODZ        R2
  26.     LODZ        R3
  27.     LODI,R0        BYTE
  28.     LODI,R1        BYTE
  29.     LODI,R2        BYTE
  30.     LODI,R3        BYTE
  31.     LODR,R0        $
  32.     LODR,R1        *$
  33.     LODR,R2        ($)
  34.     LODR,R3        *($)
  35.     LODA,R0        ADDRESS
  36.     LODA,R1        *ADDRESS
  37.     LODA,R2        (ADDRESS)
  38.     LODA,R3        *(ADDRESS)
  39.  
  40. ; 010H - 01FH.
  41.  
  42.                     ; 010H is undefined.
  43.                     ; 011H is undefined.
  44.     SPSU
  45.     SPSL
  46.     RETC,ZERO
  47.     RETC,PLUS
  48.     RETC,MINUS
  49.     RETC,ANY
  50.     BCTR,ZERO    $
  51.     BCTR,PLUS    *$
  52.     BCTR,MINUS    ($)
  53.     BCTR,ANY    *($)
  54.     BCTA,ZERO    ADDRESS
  55.     BCTA,PLUS    *ADDRESS
  56.     BCTA,MINUS    (ADDRESS)
  57.     BCTA,ANY    *(ADDRESS)
  58.  
  59. ; 020H - 02FH.
  60.  
  61.     EORZ        R0
  62.     EORZ        R1
  63.     EORZ        R2
  64.     EORZ        R3
  65.     EORI,R0        BYTE
  66.     EORI,R1        BYTE
  67.     EORI,R2        BYTE
  68.     EORI,R3        BYTE
  69.     EORR,R0        $
  70.     EORR,R1        *$
  71.     EORR,R2        ($)
  72.     EORR,R3        *($)
  73.     EORA,R0        ADDRESS,R1
  74.     EORA,R1        *ADDRESS
  75.     EORA,R2        (ADDRESS)
  76.     EORA,R3        *(ADDRESS)
  77.  
  78. ; 030H - 03FH.
  79.  
  80.     REDC,R0
  81.     REDC,R1
  82.     REDC,R2
  83.     REDC,R3
  84.     RETE,ZERO
  85.     RETE,PLUS
  86.     RETE,MINUS
  87.     RETE,ANY
  88.     BSTR,ZERO    $
  89.     BSTR,PLUS    *$
  90.     BSTR,MINUS    ($)
  91.     BSTR,ANY    *($)
  92.     BSTA,ZERO    ADDRESS
  93.     BSTA,PLUS    *ADDRESS
  94.     BSTA,MINUS    (ADDRESS)
  95.     BSTA,ANY    *(ADDRESS)
  96.  
  97. ; 040H - 04FH.
  98.  
  99.     HALT
  100.     ANDZ        R1
  101.     ANDZ        R2
  102.     ANDZ        R3
  103.     ANDI,R0        BYTE
  104.     ANDI,R1        BYTE
  105.     ANDI,R2        BYTE
  106.     ANDI,R3        BYTE
  107.     ANDR,R0        $
  108.     ANDR,R1        *$
  109.     ANDR,R2        ($)
  110.     ANDR,R3        *($)
  111.     ANDA,R0        *ADDRESS,R1
  112.     ANDA,R1        *ADDRESS
  113.     ANDA,R2        (ADDRESS)
  114.     ANDA,R3        *(ADDRESS)
  115.  
  116. ; 050H - 05FH.
  117.  
  118.     RRR,R0
  119.     RRR,R1
  120.     RRR,R2
  121.     RRR,R3
  122.     REDE,R0        PORT
  123.     REDE,R1        PORT
  124.     REDE,R2        PORT
  125.     REDE,R3        PORT
  126.     BRNR,R0        $
  127.     BRNR,R1        *$
  128.     BRNR,R2        ($)
  129.     BRNR,R3        *($)
  130.     BRNA,R0        ADDRESS
  131.     BRNA,R1        *ADDRESS
  132.     BRNA,R2        (ADDRESS)
  133.     BRNA,R3        *(ADDRESS)
  134.  
  135. ; 060H - 06FH.
  136.  
  137.     IORZ        R0
  138.     IORZ        R1
  139.     IORZ        R2
  140.     IORZ        R3
  141.     IORI,R0        BYTE
  142.     IORI,R1        BYTE
  143.     IORI,R2        BYTE
  144.     IORI,R3        BYTE
  145.     IORR,R0        $
  146.     IORR,R1        *$
  147.     IORR,R2        ($)
  148.     IORR,R3        *($)
  149.     IORA,R0        ADDRESS,R1,+
  150.     IORA,R1        *ADDRESS
  151.     IORA,R2        (ADDRESS)
  152.     IORA,R3        *(ADDRESS)
  153.  
  154. ; 070H - 07FH.
  155.  
  156.     REDD,R0
  157.     REDD,R1
  158.     REDD,R2
  159.     REDD,R3
  160.     CPSU        MASK
  161.     CPSL        MASK
  162.     PPSU        MASK
  163.     PPSL        MASK
  164.     BSNR,R0        $
  165.     BSNR,R1        *$
  166.     BSNR,R2        ($)
  167.     BSNR,R3        *($)
  168.     BSNA,R0        ADDRESS
  169.     BSNA,R1        *ADDRESS
  170.     BSNA,R2        (ADDRESS)
  171.     BSNA,R3        *(ADDRESS)
  172.  
  173. ; 080H - 08FH.
  174.  
  175.     ADDZ        R0
  176.     ADDZ        R1
  177.     ADDZ        R2
  178.     ADDZ        R3
  179.     ADDI,R0        BYTE
  180.     ADDI,R1        BYTE
  181.     ADDI,R2        BYTE
  182.     ADDI,R3        BYTE
  183.     ADDR,R0        $
  184.     ADDR,R1        *$
  185.     ADDR,R2        ($)
  186.     ADDR,R3        *($)
  187.     ADDA,R0        *ADDRESS,R1,+
  188.     ADDA,R1        *ADDRESS
  189.     ADDA,R2        (ADDRESS)
  190.     ADDA,R3        *(ADDRESS)
  191.  
  192. ; 090H - 09FH.
  193.  
  194.                     ; 090H is undefined.
  195.                     ; 091H is undefined.
  196.     LPSU
  197.     LPSL
  198.     DAR,R0
  199.     DAR,R1
  200.     DAR,R2
  201.     DAR,R3
  202.     BCFR,ZERO    $
  203.     BCFR,PLUS    *$
  204.     BCFR,MINUS    ($)
  205.     ZBRR        0004H
  206.     BCFA,ZERO    ADDRESS
  207.     BCFA,PLUS    *ADDRESS
  208.     BCFA,MINUS    (ADDRESS)
  209.     BXA        ADDRESS,R3
  210.  
  211. ; 0A0H - 0AFH.
  212.  
  213.     SUBZ        R0
  214.     SUBZ        R1
  215.     SUBZ        R2
  216.     SUBZ        R3
  217.     SUBI,R0        BYTE
  218.     SUBI,R1        BYTE
  219.     SUBI,R2        BYTE
  220.     SUBI,R3        BYTE
  221.     SUBR,R0        $
  222.     SUBR,R1        *$
  223.     SUBR,R2        ($)
  224.     SUBR,R3        *($)
  225.     SUBA,R0        ADDRESS,R1,-
  226.     SUBA,R1        *ADDRESS
  227.     SUBA,R2        (ADDRESS)
  228.     SUBA,R3        *(ADDRESS)
  229.  
  230. ; 0B0H - 0BFH.
  231.  
  232.     WRTC,R0
  233.     WRTC,R1
  234.     WRTC,R2
  235.     WRTC,R3
  236.     TPSU        MASK
  237.     TPSL        MASK
  238.                     ; 0B6H is undefined.
  239.                     ; 0B7H is undefined.
  240.     BSFR,ZERO    $
  241.     BSFR,PLUS    *$
  242.     BSFR,MINUS    ($)
  243.     ZBSR        *1FFCH
  244.     BSFA,ZERO    ADDRESS
  245.     BSFA,PLUS    *ADDRESS
  246.     BSFA,MINUS    (ADDRESS)
  247.     BSXA        *ADDRESS,R3
  248.  
  249. ; 0C0H - 0CFH.
  250.  
  251.     NOP
  252.     STRZ        R1
  253.     STRZ        R2
  254.     STRZ        R3
  255.                     ; 0C4H is undefined.
  256.                     ; 0C5H is undefined.
  257.                     ; 0C6H is undefined.
  258.                     ; 0C7H is undefined.
  259.     STRR,R0        $
  260.     STRR,R1        *$
  261.     STRR,R2        ($)
  262.     STRR,R3        *($)
  263.     STRA,R0        *ADDRESS,R1,-
  264.     STRA,R1        *ADDRESS
  265.     STRA,R2        (ADDRESS)
  266.     STRA,R3        *(ADDRESS)
  267.  
  268. ; 0D0H - 0DFH.
  269.  
  270.     RRL,R0
  271.     RRL,R1
  272.     RRL,R2
  273.     RRL,R3
  274.     WRTE,R0        PORT
  275.     WRTE,R1        PORT
  276.     WRTE,R2        PORT
  277.     WRTE,R3        PORT
  278.     BIRR,R0        $
  279.     BIRR,R1        *$
  280.     BIRR,R2        ($)
  281.     BIRR,R3        *($)
  282.     BIRA,R0        ADDRESS
  283.     BIRA,R1        *ADDRESS
  284.     BIRA,R2        (ADDRESS)
  285.     BIRA,R3        *(ADDRESS)
  286.  
  287. ; 0E0H - 0EFH.
  288.  
  289.     COMZ        R0
  290.     COMZ        R1
  291.     COMZ        R2
  292.     COMZ        R3
  293.     COMI,R0        BYTE
  294.     COMI,R1        BYTE
  295.     COMI,R2        BYTE
  296.     COMI,R3        BYTE
  297.     COMR,R0        $
  298.     COMR,R1        *$
  299.     COMR,R2        ($)
  300.     COMR,R3        *($)
  301.     COMA,R0        ADDRESS
  302.     COMA,R1        *ADDRESS
  303.     COMA,R2        (ADDRESS)
  304.     COMA,R3        *(ADDRESS)
  305.  
  306. ; 0F0H - 0FFH.
  307.  
  308.     WRTD,R0
  309.     WRTD,R1
  310.     WRTD,R2
  311.     WRTD,R3
  312.     TMI,R0        MASK
  313.     TMI,R1        MASK
  314.     TMI,R2        MASK
  315.     TMI,R3        MASK
  316.     BDRR,R0        $
  317.     BDRR,R1        *$
  318.     BDRR,R2        ($)
  319.     BDRR,R3        *($)
  320.     BDRA,R0        ADDRESS
  321.     BDRA,R1        *ADDRESS
  322.     BDRA,R2        (ADDRESS)
  323.     BDRA,R3        *(ADDRESS)
  324.  
  325. ;
  326. ; Let's test the rest of the pseudo-ops while we're at it:
  327. ;
  328. VARIABLE    SET    -1
  329.  
  330.         IF    VARIABLE
  331.         DATA    -1, , +1
  332.         ELSE
  333.         DATA    +1, , -1
  334.         ENDI
  335.  
  336. VARIABLE    SET    VARIABLE EQ 0
  337.  
  338.         IF    VARIABLE
  339.         ACON    , 7FFFH
  340.         ELSE
  341.         ACON    7FFFH, 0
  342.         ENDI
  343.  
  344.         RES    10H
  345.  
  346.         DATA    "EXPLOSION", 0DH, 0AH, 0
  347.  
  348.         END
  349. 
  350.     WRTE,R1        PORT
  351.     WRTE,R2        POR