Subversion Repositories pentevo

Rev

Blame | Last modification | View Log | Download | RSS feed

  1.         cpu     pdp-11/94
  2.         supmode on
  3.         page    0
  4.  
  5. data    equ     0x100
  6.  
  7.         if 0
  8.         ; Similar to MACRO-11, only the form %n to address registers
  9.         ; is built in (we however do not allow arbitrary arithmetic
  10.         ; expressions for n, just 0..7).  There are default built-in
  11.         ; aliases to refer to %n as Rn, %6 as SP and %7 as PC.  This
  12.         ; may be turned off via the reg directive (without a name in
  13.         ; the label column), but similar to MACRO-11, turning the default
  14.         ; aliases off is discouraged:
  15.  
  16.         reg     off
  17. r0      reg     %0
  18. r1      reg     %1
  19. r2      reg     %2
  20. r3      reg     %3
  21. r4      reg     %4
  22. r5      reg     %5
  23. r6      reg     %6
  24. r7      reg     %7
  25. sp      reg     %6
  26. pc      reg     %7
  27.  
  28.         endif
  29.  
  30.         ; register aliases
  31.  
  32. src     reg     r2
  33. dest    equ     r5
  34.  
  35.         ; test addressing modes:
  36.  
  37.         ; -> register direct (0n)
  38.  
  39.         adc     %4
  40.         adc     sp
  41.         adc     pc
  42.         adc     src
  43.         adc     dest
  44.  
  45.         ; -> register deferred (1n)
  46.  
  47.         adc     @r4
  48.         adc     (r4)
  49.         adc     @sp
  50.         adc     (sp)
  51.         adc     @pc
  52.         adc     (pc)
  53.         adc     @src
  54.         adc     (src)
  55.         adc     @dest
  56.         adc     (dest)
  57.         if      mompass > 1
  58.         expect  1010
  59.         endif
  60.         adc     (undefined)
  61.         if      mompass > 1
  62.         endexpect
  63.         endif
  64.  
  65.         ; -> autoincrement (2n)
  66.  
  67.         adc     (%4)+
  68.         adc     ( sp )+
  69.         adc     (pc)+
  70.         adc     (src)+
  71.         adc     (dest)+
  72.         ; Without defined register, we get undefined register error in
  73.         ; second pass, since (...)+ cannot be an arbitrary arithmetic
  74.         ; expression:
  75.         if      mompass > 1
  76.         expect  1445
  77.         endif
  78.         adc     (undefined)+
  79.         if      mompass > 1
  80.         endexpect
  81.         endif
  82.  
  83.         ; -> autoincrement deferred (3n)
  84.  
  85.         adc     @( r4 )+
  86.         adc     @ (sp)+
  87.         adc     @ ( pc )+
  88.         adc     @(src)+
  89.         adc     @(dest)+
  90.         ; Without defined register, we get undefined register error in
  91.         ; second pass, since (...)+ cannot be an arbitrary arithmetic
  92.         ; expression:
  93.         if      mompass > 1
  94.         expect  1445
  95.         endif
  96.         adc     @(undefined)+
  97.         if      mompass > 1
  98.         endexpect
  99.         endif
  100.  
  101.         ; -> autodecrement (4n)
  102.  
  103.         adc     -(%4)
  104.         adc     -( sp )
  105.         adc     -(pc)
  106.         adc     -(src)
  107.         adc     -(dest)
  108.         ; without defined register, we get undefined symbol error in
  109.         ; second pass, since -(...) may be an arbitrary arithmetic
  110.         ; expression (sign toggle)
  111.         if      mompass > 1
  112.         expect  1010
  113.         endif
  114.         adc     -(undefined)
  115.         if      mompass > 1
  116.         endexpect
  117.         endif
  118.  
  119.         ; -> autodecrement deferred (5n)
  120.  
  121.         adc     @-( r4 )
  122.         adc     @ -(sp)
  123.         adc     @ -( pc )
  124.         adc     @-(src)
  125.         adc     @-(dest)
  126.         ; without defined register, we get undefined symbol error in
  127.         ; second pass, since -(...) may be an arbitrary arithmetic
  128.         ; expression (sign toggle)
  129.         if      mompass > 1
  130.         expect  1010
  131.         endif
  132.         adc     @-(undefined)
  133.         if      mompass > 1
  134.         endexpect
  135.         endif
  136.  
  137.         ; -> index
  138.  
  139.         adc     10(%4)
  140.         adc     -20(sp)
  141.         adc     30(pc)
  142.         adc     -40(src)
  143.         adc     50(dest)
  144.         if      mompass > 1
  145.         expect  1010
  146.         endif
  147.         ; register may be forward defined, so error occurs in pass 2
  148.         adc     -60(undefined)
  149.         if      mompass > 1
  150.         endexpect
  151.         endif
  152.  
  153.         ; -> index deferred
  154.  
  155.         adc     @10(r4)
  156.         adc     @-20(sp)
  157.         adc     @30(pc)
  158.         adc     @-40(src)
  159.         adc     @50(dest)
  160.         if      mompass > 1
  161.         expect  1010
  162.         endif
  163.         ; register may be forward defined, so error occurs in pass 2
  164.         adc     @-60(undefined)
  165.         if      mompass > 1
  166.         endexpect
  167.         endif
  168.  
  169.         ; @(Rn) was wrongly 'optimized' to @Rn up to Build 242:
  170.  
  171.         adc     @(r4)
  172.  
  173.         ; -> immediate, which is actually (PC)+
  174.  
  175.         mov     #1234,r3
  176.         movb    #12,r3
  177.         expect  1320
  178.         movb    #300,r3
  179.         endexpect
  180.  
  181.         ; -> absolute, which is actually @(PC)+
  182.  
  183.         mov     @#1234,r3
  184.  
  185.         ; "plain label" is PC-relative
  186.  
  187.         adc     data
  188.         adc     @data
  189.  
  190.         ; now we iterate though the instructions:
  191.  
  192.         adc     r1
  193.         adc     @r2
  194.         adc     (r3)+
  195.         adc     @(r4)+
  196.         adc     -(r5)
  197.         adc     @-(r6)
  198.         adc     0123456(r1)
  199.         adc     @0123456(r2)
  200.         expect  1350
  201.         adc     #0123456
  202.         endexpect
  203.         adc     @#0123456
  204.         adc     0123456
  205.         adc     @0123456
  206.  
  207.         adcb    r1
  208.         adcb    @r2
  209.         adcb    (r3)+
  210.         adcb    @(r4)+
  211.         adcb    -(r5)
  212.         adcb    @-(r6)
  213.         adcb    0123456(r1)
  214.         adcb    @0123456(r2)
  215.         expect  1350
  216.         adcb    #0123456
  217.         endexpect
  218.         adcb    @#0123456
  219.         adcb    0123456
  220.         adcb    @0123456
  221.  
  222.         add     %1,%2
  223.         add     @r2,@r3
  224.         add     (r3)+,(r4)+
  225.         add     @(r4)+,@(r5)+
  226.         add     -(r5),-(r6)
  227.         add     @-(r6),@-(r1)
  228.         add     0123456(r1),0134567(r2)
  229.         add     @0123456(r2),@0134567(r3)
  230.         expect  1350
  231.         add     #0123456,#0134567
  232.         endexpect
  233.         add     #0123456,r4
  234.         add     @#0123456,@#0134567
  235.         add     0123456,0134567
  236.         add     @0123456,@0134567
  237.  
  238.         ash     r1,r6
  239.         ash     @r2,r6
  240.         ash     (r3)+,r6
  241.         ash     @(r4)+,r6
  242.         ash     -(r5),r6
  243.         ash     @-(r6),r6
  244.         ash     0123456(r1),r6
  245.         ash     @0123456(r2),r6
  246.         ash     #0123456,r6
  247.         ash     @#0123456,r6
  248.         ash     0123456,r6
  249.         ash     @0123456,r6
  250.         expect  1350
  251.         ash     r1,@r6
  252.         endexpect
  253.  
  254.         ashc    r1,r4
  255.         ashc    @r2,r4
  256.         ashc    (r3)+,r4
  257.         ashc    @(r4)+,r4
  258.         ashc    -(r5),r4
  259.         ashc    @-(r6),r4
  260.         ashc    0123456(r1),r4
  261.         ashc    @0123456(r2),r4
  262.         ashc    #0123456,r4
  263.         ashc    @#0123456,r4
  264.         ashc    0123456,r4
  265.         ashc    @0123456,r4
  266.         expect  1350
  267.         ashc    r1,@r4
  268.         endexpect
  269.  
  270.         asl     %1
  271.         asl     @r2
  272.         asl     (r3)+
  273.         asl     @(r4)+
  274.         asl     -(r5)
  275.         asl     @-(r6)
  276.         asl     0123456(r1)
  277.         asl     @0123456(r2)
  278.         expect  1350
  279.         asl     #0123456
  280.         endexpect
  281.         asl     @#0123456
  282.         asl     0123456
  283.         asl     @0123456
  284.  
  285.         aslb    r1
  286.         aslb    @r2
  287.         aslb    (r3)+
  288.         aslb    @(r4)+
  289.         aslb    -(r5)
  290.         aslb    @-(r6)
  291.         aslb    0123456(r1)
  292.         aslb    @0123456(r2)
  293.         expect  1350
  294.         aslb    #0123456
  295.         endexpect
  296.         aslb    @#0123456
  297.         aslb    0123456
  298.         aslb    @0123456
  299.  
  300.         asr     r1
  301.         asr     @r2
  302.         asr     (r3)+
  303.         asr     @(r4)+
  304.         asr     -(r5)
  305.         asr     @-(r6)
  306.         asr     0123456(r1)
  307.         asr     @0123456(r2)
  308.         expect  1350
  309.         asr     #0123456
  310.         endexpect
  311.         asr     @#0123456
  312.         asr     0123456
  313.         asr     @0123456
  314.  
  315.         asrb    r1
  316.         asrb    @r2
  317.         asrb    (r3)+
  318.         asrb    @(r4)+
  319.         asrb    -(r5)
  320.         asrb    @-(r6)
  321.         asrb    0123456(r1)
  322.         asrb    @0123456(r2)
  323.         expect  1350
  324.         asrb    #0123456
  325.         endexpect
  326.         asrb    @#0123456
  327.         asrb    0123456
  328.         asrb    @0123456
  329.  
  330.         bcc     *+20
  331.  
  332.         bcs     *-30
  333.  
  334.         beq     *+40
  335.  
  336.         bge     *-50
  337.  
  338.         bgt     *+60
  339.  
  340.         bhi     *-70
  341.  
  342.         bhis    *+80
  343.  
  344.         bic     r1,r2
  345.         bic     @r2,@r3
  346.         bic     (r3)+,(r4)+
  347.         bic     @(r4)+,@(r5)+
  348.         bic     -(r5),-(r6)
  349.         bic     @-(r6),@-(r1)
  350.         bic     0123456(r1),0134567(r2)
  351.         bic     @0123456(r2),@0134567(r3)
  352.         expect  1350
  353.         bic     #0123456,#0134567
  354.         endexpect
  355.         bic     #0123456,r4
  356.         bic     @#0123456,@#0134567
  357.         bic     0123456,0134567
  358.         bic     @0123456,@0134567
  359.  
  360.         bicb    r1,r2
  361.         bicb    @r2,@r3
  362.         bicb    (r3)+,(r4)+
  363.         bicb    @(r4)+,@(r5)+
  364.         bicb    -(r5),-(r6)
  365.         bicb    @-(r6),@-(r1)
  366.         bicb    0123456(r1),0134567(r2)
  367.         bicb    @0123456(r2),@0134567(r3)
  368.         expect  1350
  369.         bicb    #0123,#0134
  370.         endexpect
  371.         bicb    #0123,r4
  372.         bicb    @#0123456,@#0134567
  373.         bicb    0123456,0134567
  374.         bicb    @0123456,@0134567
  375.  
  376.         bis     r1,r2
  377.         bis     @r2,@r3
  378.         bis     (r3)+,(r4)+
  379.         bis     @(r4)+,@(r5)+
  380.         bis     -(r5),-(r6)
  381.         bis     @-(r6),@-(r1)
  382.         bis     0123456(r1),0134567(r2)
  383.         bis     @0123456(r2),@0134567(r3)
  384.         expect  1350
  385.         bis     #0123456,#0134567
  386.         endexpect
  387.         bis     #0123456,r4
  388.         bis     @#0123456,@#0134567
  389.         bis     0123456,0134567
  390.         bis     @0123456,@0134567
  391.  
  392.         bisb    %1,%2
  393.         bisb    @r2,@r3
  394.         bisb    (r3)+,(r4)+
  395.         bisb    @(r4)+,@(r5)+
  396.         bisb    -(r5),-(r6)
  397.         bisb    @-(r6),@-(r1)
  398.         bisb    0123456(r1),0134567(r2)
  399.         bisb    @0123456(r2),@0134567(r3)
  400.         expect  1350
  401.         bisb    #0123,#0134
  402.         endexpect
  403.         bisb    #0123,r4
  404.         bisb    @#0123456,@#0134567
  405.         bisb    0123456,0134567
  406.         bisb    @0123456,@0134567
  407.  
  408.         bit     r1,r2
  409.         bit     @r2,@r3
  410.         bit     (r3)+,(r4)+
  411.         bit     @(r4)+,@(r5)+
  412.         bit     -(r5),-(r6)
  413.         bit     @-(r6),@-(r1)
  414.         bit     0123456(r1),0134567(r2)
  415.         bit     @0123456(r2),@0134567(r3)
  416.         bit     #0123456,#0134567
  417.         bit     #0123456,r4
  418.         bit     @#0123456,@#0134567
  419.         bit     0123456,0134567
  420.         bit     @0123456,@0134567
  421.  
  422.         bitb    r1,r2
  423.         bitb    @r2,@r3
  424.         bitb    (r3)+,(r4)+
  425.         bitb    @(r4)+,@(r5)+
  426.         bitb    -(r5),-(r6)
  427.         bitb    @-(r6),@-(r1)
  428.         bitb    0123456(r1),0134567(r2)
  429.         bitb    @0123456(r2),@0134567(r3)
  430.         bitb    #0123,#0134
  431.         bitb    #0123,r4
  432.         bitb    @#0123456,@#0134567
  433.         bitb    0123456,0134567
  434.         bitb    @0123456,@0134567
  435.  
  436.         ble     *-90
  437.  
  438.         blo     *+100
  439.  
  440.         blos    *-110
  441.  
  442.         blt     *+120
  443.  
  444.         bmi     *-130
  445.  
  446.         bne     *+140
  447.  
  448.         bpl     *-150
  449.  
  450.         bpt
  451.  
  452.         br      *-170
  453.         expect  1375,1375
  454.         br      *+77            ; odd displacement not OK
  455.         br      *-79
  456.         endexpect
  457.         br      *+256           ; just OK
  458.         br      *-254
  459.         expect  1370,1370
  460.         br      *+258
  461.         br      *-256
  462.         endexpect
  463.  
  464.         bvc     *+180
  465.  
  466.         bvs     *-190
  467.  
  468.         c       7
  469.         expect  1320
  470.         c       20
  471.         endexpect
  472.  
  473.         ; CALL is JSR with register 6 (SP)
  474.  
  475.         call    r1
  476.         call    @r2
  477.         call    (r3)+
  478.         call    @(r4)+
  479.         call    -(r5)
  480.         call    @-(r6)
  481.         call    0123456(r1)
  482.         call    @0123456(r2)
  483.         call    #0123456
  484.         call    @#0123456
  485.         call    0123456
  486.         call    @0123456
  487.  
  488.         clr     r1
  489.         clr     @r2
  490.         clr     (r3)+
  491.         clr     @(r4)+
  492.         clr     -(r5)
  493.         clr     @-(r6)
  494.         clr     0123456(r1)
  495.         clr     @0123456(r2)
  496.         expect  1350
  497.         clr     #0123456
  498.         endexpect
  499.         clr     @#0123456
  500.         clr     0123456
  501.         clr     @0123456
  502.  
  503.         clrb    r1
  504.         clrb    @r2
  505.         clrb    (r3)+
  506.         clrb    @(r4)+
  507.         clrb    -(r5)
  508.         clrb    @-(r6)
  509.         clrb    0123456(r1)
  510.         clrb    @0123456(r2)
  511.         expect  1350
  512.         clrb    #0123456
  513.         endexpect
  514.         clrb    @#0123456
  515.         clrb    0123456
  516.         clrb    @0123456
  517.  
  518.         ccc
  519.         clc
  520.         cln
  521.         clv
  522.         clz
  523.  
  524.         cmp     r1,r2
  525.         cmp     @r2,@r3
  526.         cmp     (r3)+,(r4)+
  527.         cmp     @(r4)+,@(r5)+
  528.         cmp     -(r5),-(r6)
  529.         cmp     @-(r6),@-(r1)
  530.         cmp     0123456(r1),0134567(r2)
  531.         cmp     @0123456(r2),@0134567(r3)
  532.         cmp     #0123456,#0134567       ; immediate allowed for both args!
  533.         cmp     #0123456,r4
  534.         cmp     @#0123456,@#0134567
  535.         cmp     0123456,0134567
  536.         cmp     @0123456,@0134567
  537.  
  538.         cmpb    r1,r2
  539.         cmpb    @r2,@r3
  540.         cmpb    (r3)+,(r4)+
  541.         cmpb    @(r4)+,@(r5)+
  542.         cmpb    -(r5),-(r6)
  543.         cmpb    @-(r6),@-(r1)
  544.         cmpb    0123456(r1),0134567(r2)
  545.         cmpb    @0123456(r2),@0134567(r3)
  546.         cmpb    #0123,#0134             ; immediate allowed for both args!
  547.         cmpb    #0123,r4
  548.         cmpb    @#0123456,@#0134567
  549.         cmpb    0123456,0134567
  550.         cmpb    @0123456,@0134567
  551.  
  552.         com     r1
  553.         com     @r2
  554.         com     (r3)+
  555.         com     @(r4)+
  556.         com     -(r5)
  557.         com     @-(r6)
  558.         com     0123456(r1)
  559.         com     @0123456(r2)
  560.         expect  1350
  561.         com     #0123456
  562.         endexpect
  563.         com     @#0123456
  564.         com     0123456
  565.         com     @0123456
  566.  
  567.         comb    r1
  568.         comb    @r2
  569.         comb    (r3)+
  570.         comb    @(r4)+
  571.         comb    -(r5)
  572.         comb    @-(r6)
  573.         comb    0123456(r1)
  574.         comb    @0123456(r2)
  575.         expect  1350
  576.         comb    #0123456
  577.         endexpect
  578.         comb    @#0123456
  579.         comb    0123456
  580.         comb    @0123456
  581.  
  582.         csm     r1
  583.         csm     @r2
  584.         csm     (r3)+
  585.         csm     @(r4)+
  586.         csm     -(r5)
  587.         csm     @-(r6)
  588.         csm     0123456(r1)
  589.         csm     @0123456(r2)
  590.         csm     #0123456
  591.         csm     @#0123456
  592.         csm     0123456
  593.         csm     @0123456
  594.  
  595.         dec     r1
  596.         dec     @r2
  597.         dec     (r3)+
  598.         dec     @(r4)+
  599.         dec     -(r5)
  600.         dec     @-(r6)
  601.         dec     0123456(r1)
  602.         dec     @0123456(r2)
  603.         expect  1350
  604.         dec     #0123456
  605.         endexpect
  606.         dec     @#0123456
  607.         dec     0123456
  608.         dec     @0123456
  609.  
  610.         decb    r1
  611.         decb    @r2
  612.         decb    (r3)+
  613.         decb    @(r4)+
  614.         decb    -(r5)
  615.         decb    @-(r6)
  616.         decb    0123456(r1)
  617.         decb    @0123456(r2)
  618.         expect  1350
  619.         decb    #0123456
  620.         endexpect
  621.         decb    @#0123456
  622.         decb    0123456
  623.         decb    @0123456
  624.  
  625.         div     r1,r4
  626.         div     @r2,r4
  627.         div     (r3)+,r4
  628.         div     @(r4)+,r4
  629.         div     -(r5),r4
  630.         div     @-(r6),r4
  631.         div     0123456(r1),r4
  632.         div     @0123456(r2),r4
  633.         div     #0123456,r4
  634.         div     @#0123456,r4
  635.         div     0123456,r4
  636.         div     @0123456,r4
  637.         expect  1350
  638.         div     r1,@r4
  639.         endexpect
  640.  
  641.         emt
  642.         emt     20
  643.         expect  1320
  644.         emt     256
  645.         endexpect
  646.  
  647.         halt
  648.  
  649.         inc     r1
  650.         inc     @r2
  651.         inc     (r3)+
  652.         inc     @(r4)+
  653.         inc     -(r5)
  654.         inc     @-(r6)
  655.         inc     0123456(r1)
  656.         inc     @0123456(r2)
  657.         expect  1350
  658.         inc     #0123456
  659.         endexpect
  660.         inc     @#0123456
  661.         inc     0123456
  662.         inc     @0123456
  663.  
  664.         incb    r1
  665.         incb    @r2
  666.         incb    (r3)+
  667.         incb    @(r4)+
  668.         incb    -(r5)
  669.         incb    @-(r6)
  670.         incb    0123456(r1)
  671.         incb    @0123456(r2)
  672.         expect  1350
  673.         incb    #0123456
  674.         endexpect
  675.         incb    @#0123456
  676.         incb    0123456
  677.         incb    @0123456
  678.  
  679.         iot
  680.  
  681.         expect  1350
  682.         jmp     r1
  683.         endexpect
  684.         jmp     @r2
  685.         jmp     (r3)+
  686.         jmp     @(r4)+
  687.         jmp     -(r5)
  688.         jmp     @-(r6)
  689.         jmp     0123456(r1)
  690.         jmp     @0123456(r2)
  691.         jmp     #0123456
  692.         jmp     @#0123456
  693.         jmp     0123456
  694.         jmp     @0123456
  695.  
  696.         jsr     r4,r1
  697.         jsr     r4,@r2
  698.         jsr     r4,(r3)+
  699.         jsr     r4,@(r4)+
  700.         jsr     r4,-(r5)
  701.         jsr     r4,@-(r6)
  702.         jsr     r4,0123456(r1)
  703.         jsr     r4,@0123456(r2)
  704.         jsr     r4,#0123456
  705.         jsr     r4,@#0123456
  706.         jsr     r4,0123456
  707.         jsr     r4,@0123456
  708.         expect  1350
  709.         jsr     @r4,r1
  710.         endexpect
  711.  
  712.         mark    4
  713.         expect  1320
  714.         mark    64
  715.         endexpect
  716.  
  717.         mfpd    r1
  718.         mfpd    @r2
  719.         mfpd    (r3)+
  720.         mfpd    @(r4)+
  721.         mfpd    -(r5)
  722.         mfpd    @-(r6)
  723.         mfpd    0123456(r1)
  724.         mfpd    @0123456(r2)
  725.         mfpd    #0123456
  726.         mfpd    @#0123456
  727.         mfpd    0123456
  728.         mfpd    @0123456
  729.  
  730.         mfpi    r1
  731.         mfpi    @r2
  732.         mfpi    (r3)+
  733.         mfpi    @(r4)+
  734.         mfpi    -(r5)
  735.         mfpi    @-(r6)
  736.         mfpi    0123456(r1)
  737.         mfpi    @0123456(r2)
  738.         mfpi    #0123456
  739.         mfpi    @#0123456
  740.         mfpi    0123456
  741.         mfpi    @0123456
  742.  
  743.         mfps    r1
  744.         mfps    @r2
  745.         mfps    (r3)+
  746.         mfps    @(r4)+
  747.         mfps    -(r5)
  748.         mfps    @-(r6)
  749.         mfps    0123456(r1)
  750.         mfps    @0123456(r2)
  751.         expect  1350
  752.         mfps    #0123456
  753.         endexpect
  754.         mfps    @#0123456
  755.         mfps    0123456
  756.         mfps    @0123456
  757.  
  758.         mfpt
  759.  
  760.         mov     r1,r2
  761.         mov     @r2,@r3
  762.         mov     (r3)+,(r4)+
  763.         mov     @(r4)+,@(r5)+
  764.         mov     -(r5),-(r6)
  765.         mov     @-(r6),@-(r1)
  766.         mov     0123456(r1),0134567(r2)
  767.         mov     @0123456(r2),@0134567(r3)
  768.         expect  1350
  769.         mov     #0123456,#0134567
  770.         endexpect
  771.         mov     #0123456,r4
  772.         mov     @#0123456,@#0134567
  773.         mov     0123456,0134567
  774.         mov     @0123456,@0134567
  775.  
  776.         movb    r1,r2
  777.         movb    @r2,@r3
  778.         movb    (r3)+,(r4)+
  779.         movb    @(r4)+,@(r5)+
  780.         movb    -(r5),-(r6)
  781.         movb    @-(r6),@-(r1)
  782.         movb    0123456(r1),0134567(r2)
  783.         movb    @0123456(r2),@0134567(r3)
  784.         expect  1350
  785.         movb    #0123,#0134
  786.         endexpect
  787.         movb    #0123,r4
  788.         movb    @#0123456,@#0134567
  789.         movb    0123456,0134567
  790.         movb    @0123456,@0134567
  791.  
  792.         mtpd    r1
  793.         mtpd    @r2
  794.         mtpd    (r3)+
  795.         mtpd    @(r4)+
  796.         mtpd    -(r5)
  797.         mtpd    @-(r6)
  798.         mtpd    0123456(r1)
  799.         mtpd    @0123456(r2)
  800.         expect  1350
  801.         mtpd    #0123456
  802.         endexpect
  803.         mtpd    @#0123456
  804.         mtpd    0123456
  805.         mtpd    @0123456
  806.  
  807.         mtpi    r1
  808.         mtpi    @r2
  809.         mtpi    (r3)+
  810.         mtpi    @(r4)+
  811.         mtpi    -(r5)
  812.         mtpi    @-(r6)
  813.         mtpi    0123456(r1)
  814.         mtpi    @0123456(r2)
  815.         expect  1350
  816.         mtpi    #0123456
  817.         endexpect
  818.         mtpi    @#0123456
  819.         mtpi    0123456
  820.         mtpi    @0123456
  821.  
  822.         mtps    r1
  823.         mtps    @r2
  824.         mtps    (r3)+
  825.         mtps    @(r4)+
  826.         mtps    -(r5)
  827.         mtps    @-(r6)
  828.         mtps    0123456(r1)
  829.         mtps    @0123456(r2)
  830.         expect  1320
  831.         mtps    #0123456
  832.         endexpect
  833.         mtps    #0123
  834.         mtps    @#0123456
  835.         mtps    0123456
  836.         mtps    @0123456
  837.  
  838.         mul     r1,r4
  839.         mul     @r2,r4
  840.         mul     (r3)+,r4
  841.         mul     @(r4)+,r4
  842.         mul     -(r5),r4
  843.         mul     @-(r6),r4
  844.         mul     0123456(r1),r4
  845.         mul     @0123456(r2),r4
  846.         mul     #0123456,r4
  847.         mul     @#0123456,r4
  848.         mul     0123456,r4
  849.         mul     @0123456,r4
  850.         expect  1350
  851.         mul     r1,@r4
  852.         endexpect
  853.  
  854.         neg     r1
  855.         neg     @r2
  856.         neg     (r3)+
  857.         neg     @(r4)+
  858.         neg     -(r5)
  859.         neg     @-(r6)
  860.         neg     0123456(r1)
  861.         neg     @0123456(r2)
  862.         expect  1350
  863.         neg     #0123456
  864.         endexpect
  865.         neg     @#0123456
  866.         neg     0123456
  867.         neg     @0123456
  868.  
  869.         negb    r1
  870.         negb    @r2
  871.         negb    (r3)+
  872.         negb    @(r4)+
  873.         negb    -(r5)
  874.         negb    @-(r6)
  875.         negb    0123456(r1)
  876.         negb    @0123456(r2)
  877.         expect  1350
  878.         negb    #0123456
  879.         endexpect
  880.         negb    @#0123456
  881.         negb    0123456
  882.         negb    @0123456
  883.  
  884.         nop
  885.  
  886.         reset
  887.  
  888.         rol     r1
  889.         rol     @r2
  890.         rol     (r3)+
  891.         rol     @(r4)+
  892.         rol     -(r5)
  893.         rol     @-(r6)
  894.         rol     0123456(r1)
  895.         rol     @0123456(r2)
  896.         expect  1350
  897.         rol     #0123456
  898.         endexpect
  899.         rol     @#0123456
  900.         rol     0123456
  901.         rol     @0123456
  902.  
  903.         rolb    r1
  904.         rolb    @r2
  905.         rolb    (r3)+
  906.         rolb    @(r4)+
  907.         rolb    -(r5)
  908.         rolb    @-(r6)
  909.         rolb    0123456(r1)
  910.         rolb    @0123456(r2)
  911.         expect  1350
  912.         rolb    #0123456
  913.         endexpect
  914.         rolb    @#0123456
  915.         rolb    0123456
  916.         rolb    @0123456
  917.  
  918.         ror     r1
  919.         ror     @r2
  920.         ror     (r3)+
  921.         ror     @(r4)+
  922.         ror     -(r5)
  923.         ror     @-(r6)
  924.         ror     0123456(r1)
  925.         ror     @0123456(r2)
  926.         expect  1350
  927.         ror     #0123456
  928.         endexpect
  929.         ror     @#0123456
  930.         ror     0123456
  931.         ror     @0123456
  932.  
  933.         rorb    r1
  934.         rorb    @r2
  935.         rorb    (r3)+
  936.         rorb    @(r4)+
  937.         rorb    -(r5)
  938.         rorb    @-(r6)
  939.         rorb    0123456(r1)
  940.         rorb    @0123456(r2)
  941.         expect  1350
  942.         rorb    #0123456
  943.         endexpect
  944.         rorb    @#0123456
  945.         rorb    0123456
  946.         rorb    @0123456
  947.  
  948.         rti
  949.  
  950.         rts     r4
  951.         expect  1350
  952.         rts     (r4)
  953.         endexpect
  954.  
  955.         rtt
  956.  
  957.         sbc     r1
  958.         sbc     @r2
  959.         sbc     (r3)+
  960.         sbc     @(r4)+
  961.         sbc     -(r5)
  962.         sbc     @-(r6)
  963.         sbc     0123456(r1)
  964.         sbc     @0123456(r2)
  965.         expect  1350
  966.         sbc     #0123456
  967.         endexpect
  968.         sbc     @#0123456
  969.         sbc     0123456
  970.         sbc     @0123456
  971.  
  972.         sbcb    r1
  973.         sbcb    @r2
  974.         sbcb    (r3)+
  975.         sbcb    @(r4)+
  976.         sbcb    -(r5)
  977.         sbcb    @-(r6)
  978.         sbcb    0123456(r1)
  979.         sbcb    @0123456(r2)
  980.         expect  1350
  981.         sbcb    #0123456
  982.         endexpect
  983.         sbcb    @#0123456
  984.         sbcb    0123456
  985.         sbcb    @0123456
  986.  
  987.         s       7
  988.         expect  1320
  989.         s       20
  990.         endexpect
  991.  
  992.         scc
  993.         sec
  994.         sen
  995.         sev
  996.         sez
  997.  
  998.         expect  1350,1350
  999.         sob     (r4),*          ; counter must be register
  1000.         sob     #0123456,*
  1001.         endexpect
  1002.         sob     r4,*
  1003.         expect  1375
  1004.         sob     r4,*+1          ; no odd displacement
  1005.         endexpect
  1006.         sob     r4,*+2          ; just allowed (distance 0 words)
  1007.         expect  1370
  1008.         sob     r4,*+4          ; not allowed (would be distance +1 word)
  1009.         endexpect
  1010.         sob     r4,*-124        ; just allowed (distance -63 words)
  1011.         expect  1370
  1012.         sob     r4,*-126        ; not allowed (would be distance -64 words)
  1013.         endexpect
  1014.  
  1015.         spl     2
  1016.         expect  1320
  1017.         spl     8
  1018.         endexpect
  1019.  
  1020.         sub     r1,r2
  1021.         sub     @r2,@r3
  1022.         sub     (r3)+,(r4)+
  1023.         sub     @(r4)+,@(r5)+
  1024.         sub     -(r5),-(r6)
  1025.         sub     @-(r6),@-(r1)
  1026.         sub     0123456(r1),0134567(r2)
  1027.         sub     @0123456(r2),@0134567(r3)
  1028.         expect  1350
  1029.         sub     #0123456,#0134567
  1030.         endexpect
  1031.         sub     #0123456,r4
  1032.         sub     @#0123456,@#0134567
  1033.         sub     0123456,0134567
  1034.         sub     @0123456,@0134567
  1035.  
  1036.         swab    r1
  1037.         swab    @r2
  1038.         swab    (r3)+
  1039.         swab    @(r4)+
  1040.         swab    -(r5)
  1041.         swab    @-(r6)
  1042.         swab    0123456(r1)
  1043.         swab    @0123456(r2)
  1044.         expect  1350
  1045.         swab    #0123456
  1046.         endexpect
  1047.         swab    @#0123456
  1048.         swab    0123456
  1049.         swab    @0123456
  1050.  
  1051.         sxt     r1
  1052.         sxt     @r2
  1053.         sxt     (r3)+
  1054.         sxt     @(r4)+
  1055.         sxt     -(r5)
  1056.         sxt     @-(r6)
  1057.         sxt     0123456(r1)
  1058.         sxt     @0123456(r2)
  1059.         expect  1350
  1060.         sxt     #0123456
  1061.         endexpect
  1062.         sxt     @#0123456
  1063.         sxt     0123456
  1064.         sxt     @0123456
  1065.  
  1066.         trap
  1067.         trap    20
  1068.         expect  1320
  1069.         trap    256
  1070.         endexpect
  1071.  
  1072.         tst     r1
  1073.         tst     @r2
  1074.         tst     (r3)+
  1075.         tst     @(r4)+
  1076.         tst     -(r5)
  1077.         tst     @-(r6)
  1078.         tst     0123456(r1)
  1079.         tst     @0123456(r2)
  1080.         expect  1350
  1081.         tst     #0123456
  1082.         endexpect
  1083.         tst     @#0123456
  1084.         tst     0123456
  1085.         tst     @0123456
  1086.  
  1087.         tstb    r1
  1088.         tstb    @r2
  1089.         tstb    (r3)+
  1090.         tstb    @(r4)+
  1091.         tstb    -(r5)
  1092.         tstb    @-(r6)
  1093.         tstb    0123456(r1)
  1094.         tstb    @0123456(r2)
  1095.         expect  1350
  1096.         tstb    #0123456
  1097.         endexpect
  1098.         tstb    @#0123456
  1099.         tstb    0123456
  1100.         tstb    @0123456
  1101.  
  1102.         tstset  r1
  1103.         tstset  @r2
  1104.         tstset  (r3)+
  1105.         tstset  @(r4)+
  1106.         tstset  -(r5)
  1107.         tstset  @-(r6)
  1108.         tstset  0123456(r1)
  1109.         tstset  @0123456(r2)
  1110.         expect  1350
  1111.         tstset  #0123456
  1112.         endexpect
  1113.         tstset  @#0123456
  1114.         tstset  0123456
  1115.         tstset  @0123456
  1116.  
  1117.         wait
  1118.  
  1119.         expect  1350
  1120.         wrtlck  r1
  1121.         endexpect
  1122.         wrtlck  @r2
  1123.         wrtlck  (r3)+
  1124.         wrtlck  @(r4)+
  1125.         wrtlck  -(r5)
  1126.         wrtlck  @-(r6)
  1127.         wrtlck  0123456(r1)
  1128.         wrtlck  @0123456(r2)
  1129.         expect  1350
  1130.         wrtlck  #0123456
  1131.         endexpect
  1132.         wrtlck  @#0123456
  1133.         wrtlck  0123456
  1134.         wrtlck  @0123456
  1135.  
  1136.         xor     r4,r1
  1137.         xor     r4,@r2
  1138.         xor     r4,(r3)+
  1139.         xor     r4,@(r4)+
  1140.         xor     r4,-(r5)
  1141.         xor     r4,@-(r6)
  1142.         xor     r4,0123456(r1)
  1143.         xor     r4,@0123456(r2)
  1144.         expect  1350
  1145.         xor     r4,#0123456
  1146.         endexpect
  1147.         xor     r4,@#0123456
  1148.         xor     r4,0123456
  1149.         xor     r4,@0123456
  1150.         expect  1350
  1151.         xor     @r4,r1
  1152.         endexpect
  1153.  
  1154.         ; -------------------------------
  1155.         ; FIS instruction set on selected models,
  1156.         ; with proper option installed:
  1157.  
  1158.         cpu     pdp-11/40
  1159.         fis     off
  1160.         expect  1500
  1161.         fadd    r4
  1162.         endexpect
  1163.  
  1164.         fis     on
  1165.         fadd    r4
  1166.         fsub    r4
  1167.         fmul    r4
  1168.         fdiv    r4
  1169.  
  1170.         ; -------------------------------
  1171.         ; similar to FP11 extension:
  1172.  
  1173.         cpu     pdp-11/45
  1174.         fp11    on
  1175.  
  1176. fsrc    equ     ac2
  1177. fdest   reg     ac5
  1178.  
  1179.         ; test aliases & invalid operands once:
  1180.  
  1181.         absf    ac2
  1182.         absf    fsrc
  1183.         absf    ac5
  1184.         absf    fdest
  1185.         expect  1149
  1186.         absf    r5              ; no CPU registers for FP11
  1187.         endexpect
  1188.         if      mompass>1
  1189.         expect  1010
  1190.         endif
  1191.         absf    ac6
  1192.         if      mompass>1
  1193.         endexpect
  1194.         endif
  1195.         absf    @r2
  1196.         absf    (r3)+
  1197.         absf    @(r4)+
  1198.         absf    -(r5)
  1199.         absf    @-(r6)
  1200.         absf    0123456(r1)
  1201.         absf    @0123456(r2)
  1202.         expect  1350
  1203.         absf    #0123456
  1204.         endexpect
  1205.         absf    @#0123456
  1206.         absf    0123456
  1207.         absf    @0123456
  1208.  
  1209.         absd    ac2
  1210.         absd    ac5
  1211.         absd    @r2
  1212.         absd    (r3)+
  1213.         absd    @(r4)+
  1214.         absd    -(r5)
  1215.         absd    @-(r6)
  1216.         absd    0123456(r1)
  1217.         absd    @0123456(r2)
  1218.         expect  1350
  1219.         absd    #0123456
  1220.         endexpect
  1221.         absd    @#0123456
  1222.         absd    0123456
  1223.         absd    @0123456
  1224.  
  1225.         addf    ac4,ac2
  1226.         addf    @r2,ac2
  1227.         addf    (r3)+,ac2
  1228.         addf    @(r4)+,ac2
  1229.         addf    -(r5),ac2
  1230.         addf    @-(r6),ac2
  1231.         addf    0123456(r1),ac2
  1232.         addf    @0123456(r2),ac2
  1233.         addf    #1.5,ac2
  1234.         addf    @#0123456,ac2
  1235.         addf    0123456,ac2
  1236.         addf    @0123456,ac2
  1237.  
  1238.         addd    ac4,ac2
  1239.         addd    @r2,ac2
  1240.         addd    (r3)+,ac2
  1241.         addd    @(r4)+,ac2
  1242.         addd    -(r5),ac2
  1243.         addd    @-(r6),ac2
  1244.         addd    0123456(r1),ac2
  1245.         addd    @0123456(r2),ac2
  1246.         addd    #1.5,ac2
  1247.         addd    @#0123456,ac2
  1248.         addd    0123456,ac2
  1249.         addd    @0123456,ac2
  1250.  
  1251.         cfcc
  1252.  
  1253.         clrf    ac2
  1254.         clrf    ac5
  1255.         clrf    @r2
  1256.         clrf    (r3)+
  1257.         clrf    @(r4)+
  1258.         clrf    -(r5)
  1259.         clrf    @-(r6)
  1260.         clrf    0123456(r1)
  1261.         clrf    @0123456(r2)
  1262.         expect  1350
  1263.         clrf    #0123456
  1264.         endexpect
  1265.         clrf    @#0123456
  1266.         clrf    0123456
  1267.         clrf    @0123456
  1268.  
  1269.         clrd    ac2
  1270.         clrd    ac5
  1271.         clrd    @r2
  1272.         clrd    (r3)+
  1273.         clrd    @(r4)+
  1274.         clrd    -(r5)
  1275.         clrd    @-(r6)
  1276.         clrd    0123456(r1)
  1277.         clrd    @0123456(r2)
  1278.         expect  1350
  1279.         clrd    #0123456
  1280.         endexpect
  1281.         clrd    @#0123456
  1282.         clrd    0123456
  1283.         clrd    @0123456
  1284.  
  1285.         cmpf    ac4,ac2
  1286.         cmpf    @r2,ac2
  1287.         cmpf    (r3)+,ac2
  1288.         cmpf    @(r4)+,ac2
  1289.         cmpf    -(r5),ac2
  1290.         cmpf    @-(r6),ac2
  1291.         cmpf    0123456(r1),ac2
  1292.         cmpf    @0123456(r2),ac2
  1293.         cmpf    #1.5,ac2
  1294.         cmpf    @#0123456,ac2
  1295.         cmpf    0123456,ac2
  1296.         cmpf    @0123456,ac2
  1297.  
  1298.         cmpd    ac4,ac2
  1299.         cmpd    @r2,ac2
  1300.         cmpd    (r3)+,ac2
  1301.         cmpd    @(r4)+,ac2
  1302.         cmpd    -(r5),ac2
  1303.         cmpd    @-(r6),ac2
  1304.         cmpd    0123456(r1),ac2
  1305.         cmpd    @0123456(r2),ac2
  1306.         cmpd    #1.5,ac2
  1307.         cmpd    @#0123456,ac2
  1308.         cmpd    0123456,ac2
  1309.         cmpd    @0123456,ac2
  1310.  
  1311.         divf    ac4,ac2
  1312.         divf    @r2,ac2
  1313.         divf    (r3)+,ac2
  1314.         divf    @(r4)+,ac2
  1315.         divf    -(r5),ac2
  1316.         divf    @-(r6),ac2
  1317.         divf    0123456(r1),ac2
  1318.         divf    @0123456(r2),ac2
  1319.         divf    #1.5,ac2
  1320.         divf    @#0123456,ac2
  1321.         divf    0123456,ac2
  1322.         divf    @0123456,ac2
  1323.  
  1324.         divd    ac4,ac2
  1325.         divd    @r2,ac2
  1326.         divd    (r3)+,ac2
  1327.         divd    @(r4)+,ac2
  1328.         divd    -(r5),ac2
  1329.         divd    @-(r6),ac2
  1330.         divd    0123456(r1),ac2
  1331.         divd    @0123456(r2),ac2
  1332.         divd    #1.5,ac2
  1333.         divd    @#0123456,ac2
  1334.         divd    0123456,ac2
  1335.         divd    @0123456,ac2
  1336.  
  1337.         ldcfd   ac4,ac2                 ; load F32 from memory into F64 AC
  1338.         ldcfd   @r2,ac2
  1339.         ldcfd   (r3)+,ac2
  1340.         ldcfd   @(r4)+,ac2
  1341.         ldcfd   -(r5),ac2
  1342.         ldcfd   @-(r6),ac2
  1343.         ldcfd   0123456(r1),ac2
  1344.         ldcfd   @0123456(r2),ac2
  1345.         ldcfd   #1.5,ac2
  1346.         ldcfd   @#0123456,ac2
  1347.         ldcfd   0123456,ac2
  1348.         ldcfd   @0123456,ac2
  1349.  
  1350.         ldcdf   ac4,ac2                 ; load F64 from memory into F32 AC
  1351.         ldcdf   @r2,ac2
  1352.         ldcdf   (r3)+,ac2
  1353.         ldcdf   @(r4)+,ac2
  1354.         ldcdf   -(r5),ac2
  1355.         ldcdf   @-(r6),ac2
  1356.         ldcdf   0123456(r1),ac2
  1357.         ldcdf   @0123456(r2),ac2
  1358.         ldcdf   #1.5,ac2
  1359.         ldcdf   @#0123456,ac2
  1360.         ldcdf   0123456,ac2
  1361.         ldcdf   @0123456,ac2
  1362.  
  1363.         ldcif   r4,ac2                  ; load I16 from memory into F32 AC
  1364.         expect  1134
  1365.         ldcif   ac4,ac2
  1366.         endexpect
  1367.         ldcif   @r2,ac2
  1368.         ldcif   (r3)+,ac2
  1369.         ldcif   @(r4)+,ac2
  1370.         ldcif   -(r5),ac2
  1371.         ldcif   @-(r6),ac2
  1372.         ldcif   0123456(r1),ac2
  1373.         ldcif   @0123456(r2),ac2
  1374.         expect  1133
  1375.         ldcif   #1.5,ac2
  1376.         endexpect
  1377.         expect  1320
  1378.         ldcif   #150000,ac2
  1379.         endexpect
  1380.         ldcif   #1500,ac2
  1381.         ldcif   @#0123456,ac2
  1382.         ldcif   0123456,ac2
  1383.         ldcif   @0123456,ac2
  1384.  
  1385.         ldcid   r4,ac2                  ; load I16 from memory into F64 AC
  1386.         expect  1134
  1387.         ldcid   ac4,ac2
  1388.         endexpect
  1389.         ldcid   @r2,ac2
  1390.         ldcid   (r3)+,ac2
  1391.         ldcid   @(r4)+,ac2
  1392.         ldcid   -(r5),ac2
  1393.         ldcid   @-(r6),ac2
  1394.         ldcid   0123456(r1),ac2
  1395.         ldcid   @0123456(r2),ac2
  1396.         expect  1133
  1397.         ldcid   #1.5,ac2
  1398.         endexpect
  1399.         expect  1320
  1400.         ldcid   #15000000,ac2
  1401.         endexpect
  1402.         ldcid   #1500,ac2
  1403.         ldcid   @#0123456,ac2
  1404.         ldcid   0123456,ac2
  1405.         ldcid   @0123456,ac2
  1406.  
  1407.         ldclf   r4,ac2                  ; load I32 from memory into F32 AC
  1408.         expect  1134
  1409.         ldclf   ac4,ac2
  1410.         endexpect
  1411.         ldclf   @r2,ac2
  1412.         ldclf   (r3)+,ac2
  1413.         ldclf   @(r4)+,ac2
  1414.         ldclf   -(r5),ac2
  1415.         ldclf   @-(r6),ac2
  1416.         ldclf   0123456(r1),ac2
  1417.         ldclf   @0123456(r2),ac2
  1418.         expect  1133
  1419.         ldclf   #1.5,ac2
  1420.         endexpect
  1421.         ldclf   #150000,ac2
  1422.         ldclf   #1500,ac2
  1423.         ldclf   @#0123456,ac2
  1424.         ldclf   0123456,ac2
  1425.         ldclf   @0123456,ac2
  1426.  
  1427.         ldcld   r4,ac2                  ; load I32 from memory into F64 AC
  1428.         expect  1134
  1429.         ldcld   ac4,ac2
  1430.         endexpect
  1431.         ldcld   @r2,ac2
  1432.         ldcld   (r3)+,ac2
  1433.         ldcld   @(r4)+,ac2
  1434.         ldcld   -(r5),ac2
  1435.         ldcld   @-(r6),ac2
  1436.         ldcld   0123456(r1),ac2
  1437.         ldcld   @0123456(r2),ac2
  1438.         expect  1133
  1439.         ldcld   #1.5,ac2
  1440.         endexpect
  1441.         ldcld   #15000000,ac2
  1442.         ldcld   #1500,ac2
  1443.         ldcld   @#0123456,ac2
  1444.         ldcld   0123456,ac2
  1445.         ldcld   @0123456,ac2
  1446.  
  1447.         ldexp   r4,ac2
  1448.         expect  1134
  1449.         ldexp   ac4,ac2
  1450.         endexpect
  1451.         ldexp   @r2,ac2
  1452.         ldexp   (r3)+,ac2
  1453.         ldexp   @(r4)+,ac2
  1454.         ldexp   -(r5),ac2
  1455.         ldexp   @-(r6),ac2
  1456.         ldexp   0123456(r1),ac2
  1457.         ldexp   @0123456(r2),ac2
  1458.         expect  1133
  1459.         ldexp   #1.5,ac2
  1460.         endexpect
  1461.         expect  1320
  1462.         ldexp   #15000000,ac2
  1463.         endexpect
  1464.         ldexp   #1500,ac2
  1465.         ldexp   @#0123456,ac2
  1466.         ldexp   0123456,ac2
  1467.         ldexp   @0123456,ac2
  1468.  
  1469.         ldf     ac4,ac2
  1470.         ldf     @r2,ac2
  1471.         ldf     (r3)+,ac2
  1472.         ldf     @(r4)+,ac2
  1473.         ldf     -(r5),ac2
  1474.         ldf     @-(r6),ac2
  1475.         ldf     0123456(r1),ac2
  1476.         ldf     @0123456(r2),ac2
  1477.         ldf     #1.5,ac2
  1478.         ldf     @#0123456,ac2
  1479.         ldf     0123456,ac2
  1480.         ldf     @0123456,ac2
  1481.  
  1482.         ldd     ac4,ac2
  1483.         ldd     @r2,ac2
  1484.         ldd     (r3)+,ac2
  1485.         ldd     @(r4)+,ac2
  1486.         ldd     -(r5),ac2
  1487.         ldd     @-(r6),ac2
  1488.         ldd     0123456(r1),ac2
  1489.         ldd     @0123456(r2),ac2
  1490.         ldd     #1.5,ac2
  1491.         ldd     @#0123456,ac2
  1492.         ldd     0123456,ac2
  1493.         ldd     @0123456,ac2
  1494.  
  1495.         ldfps   r1
  1496.         ldfps   @r2
  1497.         ldfps   (r3)+
  1498.         ldfps   @(r4)+
  1499.         ldfps   -(r5)
  1500.         ldfps   @-(r6)
  1501.         ldfps   0123456(r1)
  1502.         ldfps   @0123456(r2)
  1503.         ldfps   #0123456
  1504.         ldfps   @#0123456
  1505.         ldfps   0123456
  1506.         ldfps   @0123456
  1507.  
  1508.         modf    ac4,ac2
  1509.         modf    @r2,ac2
  1510.         modf    (r3)+,ac2
  1511.         modf    @(r4)+,ac2
  1512.         modf    -(r5),ac2
  1513.         modf    @-(r6),ac2
  1514.         modf    0123456(r1),ac2
  1515.         modf    @0123456(r2),ac2
  1516.         modf    #1.5,ac2
  1517.         modf    @#0123456,ac2
  1518.         modf    0123456,ac2
  1519.         modf    @0123456,ac2
  1520.  
  1521.         modd    ac4,ac2
  1522.         modd    @r2,ac2
  1523.         modd    (r3)+,ac2
  1524.         modd    @(r4)+,ac2
  1525.         modd    -(r5),ac2
  1526.         modd    @-(r6),ac2
  1527.         modd    0123456(r1),ac2
  1528.         modd    @0123456(r2),ac2
  1529.         modd    #1.5,ac2
  1530.         modd    @#0123456,ac2
  1531.         modd    0123456,ac2
  1532.         modd    @0123456,ac2
  1533.  
  1534.         mulf    ac4,ac2
  1535.         mulf    @r2,ac2
  1536.         mulf    (r3)+,ac2
  1537.         mulf    @(r4)+,ac2
  1538.         mulf    -(r5),ac2
  1539.         mulf    @-(r6),ac2
  1540.         mulf    0123456(r1),ac2
  1541.         mulf    @0123456(r2),ac2
  1542.         mulf    #1.5,ac2
  1543.         mulf    @#0123456,ac2
  1544.         mulf    0123456,ac2
  1545.         mulf    @0123456,ac2
  1546.  
  1547.         muld    ac4,ac2
  1548.         muld    @r2,ac2
  1549.         muld    (r3)+,ac2
  1550.         muld    @(r4)+,ac2
  1551.         muld    -(r5),ac2
  1552.         muld    @-(r6),ac2
  1553.         muld    0123456(r1),ac2
  1554.         muld    @0123456(r2),ac2
  1555.         muld    #1.5,ac2
  1556.         muld    @#0123456,ac2
  1557.         muld    0123456,ac2
  1558.         muld    @0123456,ac2
  1559.  
  1560.         negf    ac2
  1561.         negf    ac5
  1562.         negf    @r2
  1563.         negf    (r3)+
  1564.         negf    @(r4)+
  1565.         negf    -(r5)
  1566.         negf    @-(r6)
  1567.         negf    0123456(r1)
  1568.         negf    @0123456(r2)
  1569.         expect  1350
  1570.         negf    #0123456
  1571.         endexpect
  1572.         negf    @#0123456
  1573.         negf    0123456
  1574.         negf    @0123456
  1575.  
  1576.         negd    ac2
  1577.         negd    ac5
  1578.         negd    @r2
  1579.         negd    (r3)+
  1580.         negd    @(r4)+
  1581.         negd    -(r5)
  1582.         negd    @-(r6)
  1583.         negd    0123456(r1)
  1584.         negd    @0123456(r2)
  1585.         expect  1350
  1586.         negd    #0123456
  1587.         endexpect
  1588.         negd    @#0123456
  1589.         negd    0123456
  1590.         negd    @0123456
  1591.  
  1592.         setd
  1593.         setf
  1594.         seti
  1595.         setl
  1596.  
  1597.         stcfd   ac2,ac4                 ; store F32 AC into F64 in memory
  1598.         stcfd   ac2,@r2
  1599.         stcfd   ac2,(r3)+
  1600.         stcfd   ac2,@(r4)+
  1601.         stcfd   ac2,-(r5)
  1602.         stcfd   ac2,@-(r6)
  1603.         stcfd   ac2,0123456(r1)
  1604.         stcfd   ac2,@0123456(r2)
  1605.         expect  1350
  1606.         stcfd   ac2,#1.5
  1607.         endexpect
  1608.         stcfd   ac2,@#0123456
  1609.         stcfd   ac2,0123456
  1610.         stcfd   ac2,@0123456
  1611.  
  1612.         stcdf   ac2,ac4                 ; store F64 AC into F32 in memory
  1613.         stcdf   ac2,@r2
  1614.         stcdf   ac2,(r3)+
  1615.         stcdf   ac2,@(r4)+
  1616.         stcdf   ac2,-(r5)
  1617.         stcdf   ac2,@-(r6)
  1618.         stcdf   ac2,0123456(r1)
  1619.         stcdf   ac2,@0123456(r2)
  1620.         expect  1350
  1621.         stcdf   ac2,#1.5
  1622.         endexpect
  1623.         stcdf   ac2,@#0123456
  1624.         stcdf   ac2,0123456
  1625.         stcdf   ac2,@0123456
  1626.  
  1627.         stf     ac2,ac4
  1628.         stf     ac2,@r2
  1629.         stf     ac2,(r3)+
  1630.         stf     ac2,@(r4)+
  1631.         stf     ac2,-(r5)
  1632.         stf     ac2,@-(r6)
  1633.         stf     ac2,0123456(r1)
  1634.         stf     ac2,@0123456(r2)
  1635.         expect  1350
  1636.         stf     ac2,#1.5
  1637.         endexpect
  1638.         stf     ac2,@#0123456
  1639.         stf     ac2,0123456
  1640.         stf     ac2,@0123456
  1641.  
  1642.         std     ac2,ac4
  1643.         std     ac2,@r2
  1644.         std     ac2,(r3)+
  1645.         std     ac2,@(r4)+
  1646.         std     ac2,-(r5)
  1647.         std     ac2,@-(r6)
  1648.         std     ac2,0123456(r1)
  1649.         std     ac2,@0123456(r2)
  1650.         expect  1350
  1651.         std     ac2,#1.5
  1652.         endexpect
  1653.         std     ac2,@#0123456
  1654.         std     ac2,0123456
  1655.         std     ac2,@0123456
  1656.  
  1657.         stcfi   ac2,r4                  ; store F32 AC to I16 in memory
  1658.         expect  1134
  1659.         stcfi   ac2,ac4
  1660.         endexpect
  1661.         stcfi   ac2,@r2
  1662.         stcfi   ac2,(r3)+
  1663.         stcfi   ac2,@(r4)+
  1664.         stcfi   ac2,-(r5)
  1665.         stcfi   ac2,@-(r6)
  1666.         stcfi   ac2,0123456(r1)
  1667.         stcfi   ac2,@0123456(r2)
  1668.         expect  1350
  1669.         stcfi   ac2,#1500
  1670.         endexpect
  1671.         stcfi   ac2,@#0123456
  1672.         stcfi   ac2,0123456
  1673.         stcfi   ac2,@0123456
  1674.  
  1675.         stcdi   ac2,r4                  ; store F64 AC to I16 in memory
  1676.         expect  1134
  1677.         stcdi   ac2,ac4
  1678.         endexpect
  1679.         stcdi   ac2,@r2
  1680.         stcdi   ac2,(r3)+
  1681.         stcdi   ac2,@(r4)+
  1682.         stcdi   ac2,-(r5)
  1683.         stcdi   ac2,@-(r6)
  1684.         stcdi   ac2,0123456(r1)
  1685.         stcdi   ac2,@0123456(r2)
  1686.         expect  1350
  1687.         stcdi   ac2,#1500
  1688.         endexpect
  1689.         stcdi   ac2,@#0123456
  1690.         stcdi   ac2,0123456
  1691.         stcdi   ac2,@0123456
  1692.  
  1693.         stcfl   ac2,r4                  ; store F32 AC to I32 in memory
  1694.         expect  1134
  1695.         stcfl   ac2,ac4
  1696.         endexpect
  1697.         stcfl   ac2,@r2
  1698.         stcfl   ac2,(r3)+
  1699.         stcfl   ac2,@(r4)+
  1700.         stcfl   ac2,-(r5)
  1701.         stcfl   ac2,@-(r6)
  1702.         stcfl   ac2,0123456(r1)
  1703.         stcfl   ac2,@0123456(r2)
  1704.         expect  1350
  1705.         stcfl   ac2,#1500
  1706.         endexpect
  1707.         stcfl   ac2,@#0123456
  1708.         stcfl   ac2,0123456
  1709.         stcfl   ac2,@0123456
  1710.  
  1711.         stcdl   ac2,r4                  ; store F64 AC to I32 in memory
  1712.         expect  1134
  1713.         stcdl   ac2,ac4
  1714.         endexpect
  1715.         stcdl   ac2,@r2
  1716.         stcdl   ac2,(r3)+
  1717.         stcdl   ac2,@(r4)+
  1718.         stcdl   ac2,-(r5)
  1719.         stcdl   ac2,@-(r6)
  1720.         stcdl   ac2,0123456(r1)
  1721.         stcdl   ac2,@0123456(r2)
  1722.         expect  1350
  1723.         stcdl   ac2,#1500
  1724.         endexpect
  1725.         stcdl   ac2,@#0123456
  1726.         stcdl   ac2,0123456
  1727.         stcdl   ac2,@0123456
  1728.  
  1729.         stexp   ac2,r4
  1730.         expect  1134
  1731.         stexp   ac2,ac4
  1732.         endexpect
  1733.         stexp   ac2,@r2
  1734.         stexp   ac2,(r3)+
  1735.         stexp   ac2,@(r4)+
  1736.         stexp   ac2,-(r5)
  1737.         stexp   ac2,@-(r6)
  1738.         stexp   ac2,0123456(r1)
  1739.         stexp   ac2,@0123456(r2)
  1740.         expect  1350
  1741.         stexp   ac2,#1500
  1742.         endexpect
  1743.         stexp   ac2,@#0123456
  1744.         stexp   ac2,0123456
  1745.         stexp   ac2,@0123456
  1746.  
  1747.         stfps   r1
  1748.         stfps   @r2
  1749.         stfps   (r3)+
  1750.         stfps   @(r4)+
  1751.         stfps   -(r5)
  1752.         stfps   @-(r6)
  1753.         stfps   0123456(r1)
  1754.         stfps   @0123456(r2)
  1755.         expect  1350
  1756.         stfps   #0123456
  1757.         endexpect
  1758.         stfps   @#0123456
  1759.         stfps   0123456
  1760.         stfps   @0123456
  1761.  
  1762.         stst    r1
  1763.         stst    @r2
  1764.         stst    (r3)+
  1765.         stst    @(r4)+
  1766.         stst    -(r5)
  1767.         stst    @-(r6)
  1768.         stst    0123456(r1)
  1769.         stst    @0123456(r2)
  1770.         expect  1350
  1771.         stst    #0123456
  1772.         endexpect
  1773.         stst    @#0123456
  1774.         stst    0123456
  1775.         stst    @0123456
  1776.  
  1777.         subf    ac4,ac2
  1778.         subf    @r2,ac2
  1779.         subf    (r3)+,ac2
  1780.         subf    @(r4)+,ac2
  1781.         subf    -(r5),ac2
  1782.         subf    @-(r6),ac2
  1783.         subf    0123456(r1),ac2
  1784.         subf    @0123456(r2),ac2
  1785.         subf    #1.5,ac2
  1786.         subf    @#0123456,ac2
  1787.         subf    0123456,ac2
  1788.         subf    @0123456,ac2
  1789.  
  1790.         subd    ac4,ac2
  1791.         subd    @r2,ac2
  1792.         subd    (r3)+,ac2
  1793.         subd    @(r4)+,ac2
  1794.         subd    -(r5),ac2
  1795.         subd    @-(r6),ac2
  1796.         subd    0123456(r1),ac2
  1797.         subd    @0123456(r2),ac2
  1798.         subd    #1.5,ac2
  1799.         subd    @#0123456,ac2
  1800.         subd    0123456,ac2
  1801.         subd    @0123456,ac2
  1802.  
  1803.         tstf    ac2
  1804.         tstf    ac5
  1805.         tstf    @r2
  1806.         tstf    (r3)+
  1807.         tstf    @(r4)+
  1808.         tstf    -(r5)
  1809.         tstf    @-(r6)
  1810.         tstf    0123456(r1)
  1811.         tstf    @0123456(r2)
  1812.         tstf    #1.5
  1813.         tstf    @#0123456
  1814.         tstf    0123456
  1815.         tstf    @0123456
  1816.  
  1817.         tstd    ac2
  1818.         tstd    ac5
  1819.         tstd    @r2
  1820.         tstd    (r3)+
  1821.         tstd    @(r4)+
  1822.         tstd    -(r5)
  1823.         tstd    @-(r6)
  1824.         tstd    0123456(r1)
  1825.         tstd    @0123456(r2)
  1826.         tstd    #1.5
  1827.         tstd    @#0123456
  1828.         tstd    0123456
  1829.         tstd    @0123456
  1830.  
  1831.         flt2    0.5             ; 4000 0000 (hex) 040000 000000 (oct)
  1832.         flt2    1.5             ; 40C0 0000 (hex) 040300 000000 (oct)
  1833.         flt2    12              ; 4240 0000 (hex) 041100 000000 (oct)
  1834.         expect  1320
  1835.         flt2    1e39
  1836.         endexpect
  1837.  
  1838.         flt4    0.5             ; 4000 0000 0000 0000 (hex) 040000 000000 000000 000000 (oct)
  1839.         flt4    -0.5            ; C000 0000 0000 0000 (hex) 140000 000000 000000 000000 (oct)
  1840.         flt4    1.5             ; 40C0 0000 0000 0000 (hex) 040300 000000 000000 000000 (oct)
  1841.         flt4    -1.5            ; C0C0 0000 0000 0000 (hex) 140300 000000 000000 000000 (oct)
  1842.         flt4    12              ; 4240 0000 0000 0000 (hex) 041100 000000 000000 000000 (oct)
  1843.         flt4    -12             ; C240 0000 0000 0000 (hex) 141100 000000 000000 000000 (oct)
  1844.         ;flt4   0.1             ; 3ECC CCCC CCCC CCD0 (hex) 037314 146314 146314 146320 (oct)
  1845.         ;flt4   1.0/3           ; 3FAA AAAA AAAA AAA8 (hex) 037652 125252 125252 125250 (oct)
  1846.         expect  1320
  1847.         flt4    1e39
  1848.         endexpect
  1849.  
  1850.         ; --------------------
  1851.         ; CIS extensions
  1852.  
  1853.         cpu     pdp-11/03
  1854.         cis     on
  1855.  
  1856.         addn
  1857.         addni   0123456,0123462,0123466
  1858.  
  1859.         addp
  1860.         addpi   0123456,0123462,0123466
  1861.  
  1862.         ashn
  1863.         ashni   0123456,0123462,-3
  1864.  
  1865.         ashp
  1866.         ashpi   0123456,0123462,3
  1867.  
  1868.         cmpc
  1869.         cmpci   0123456,0123462,' '
  1870.  
  1871.         cmpn
  1872.         cmpni   0123456,0123462
  1873.  
  1874.         cmpp
  1875.         cmppi   0123456,0123462
  1876.  
  1877.         cvtln
  1878.         cvtlni  0123456,0123462
  1879.  
  1880.         cvtlp
  1881.         cvtlpi  0123456,0123462
  1882.  
  1883.         cvtnl
  1884.         cvtnli  0123456,0123462
  1885.  
  1886.         cvtpl
  1887.         cvtpli  0123456,0123462
  1888.  
  1889.         cvtnp
  1890.         cvtnpi  0123456,0123462
  1891.  
  1892.         cvtpn
  1893.         cvtpni  0123456,0123462
  1894.  
  1895.         divp
  1896.         divpi   0123456,0123462,0123466
  1897.  
  1898.         locc
  1899.         locci   0123456,0123462,'a'
  1900.  
  1901.         l2dr    (r6)+
  1902.         l3dr    (r6)+
  1903.  
  1904.         matc
  1905.         matci   0123456,0123462
  1906.  
  1907.         movc
  1908.         movci   0123456,0123462,' '
  1909.  
  1910.         movrc
  1911.         movrci  0123456,0123462,' '
  1912.  
  1913.         movtc
  1914.         movtci  0123456,0123462,' ',0123466
  1915.  
  1916.         mulp
  1917.         mulpi   0123456,0123462,0123466
  1918.  
  1919.         scanc
  1920.         scanci  0123456,0123462
  1921.  
  1922.         skpc
  1923.         skpci   0123456,' '
  1924.  
  1925.         spanc
  1926.         spanci  0123456,0123462
  1927.  
  1928.         subn
  1929.         subni   0123456,0123462,0123466
  1930.  
  1931.         subp
  1932.         subpi   0123456,0123462,0123466
  1933.  
  1934.         ; Padding is *not* on by default for PDP-11.  It
  1935.         ; used to be on if the target was set by a 'CPU'
  1936.         ; statement, because then 68K was selected as
  1937.         ; default target, and 68K introduces this flag with
  1938.         ; ON as default.  However, if one selects PDP-11
  1939.         ; as target via a command line argument, there is
  1940.         ; no intermediate selection of 68K as target and
  1941.         ; padding is introduced with the PDP-11 default
  1942.         ; (OFF):
  1943.  
  1944.         padding on
  1945.  
  1946.         ; .<inst> works on PDP-11 only if CPU is selected
  1947.         ; in source file and not on CLI.  Have to clean
  1948.         ; this up in the long run.
  1949.  
  1950.         .byte   1,2,3
  1951.         nop                     ; padding byte is inserted before machine instruction
  1952.  
  1953.         word    1,2,3
  1954.  
  1955.         padding off             ; no padding is inserted...
  1956.         byte    1,2,3
  1957.         expect  180
  1958.         nop                     ; ...resulting in a misalignment warning
  1959.         endexpect
  1960.  
  1961.         ; PDP-11 is the only target that implements multi
  1962.         ; character constants in little endian mode, so this
  1963.         ; results in text in memory that is not byte swapped:
  1964.  
  1965.         word    'Th','e ','qu','ic','k ','br','ow','n ','fo'
  1966.         word    'x ','ju','mp','s ','ov','er',' t','he',' l'
  1967.         word    'az','y ','do','g.'
  1968.  
  1969.         ascii   "The quick brown fox jumps over the lazy dog."
  1970.         asciz   "The quick brown fox jumps over the lazy dog."
  1971.  
  1972.         packed  -12,pack        ; 2D01
  1973.         byte    pack            ; 02
  1974.         packed  500             ; 0C50
  1975.         packed  0               ; 0C
  1976.         packed  -0,sum          ; 0C
  1977.         byte    sum             ; 01
  1978.         packed  "1234",e6       ; 2301 4C
  1979.         packed  "1234567890123456789012345678901",maxpack ; 3412 7856 1290 5634 9078 3412 7856 1C90
  1980.         byte    maxpack         ; 1F
  1981.         expect  1324
  1982.         packed  "12345678901234567890123456789012" ; too long
  1983.         endexpect
  1984.         expect  1323
  1985.         packed  "1234BCD"
  1986.         endexpect
  1987.