home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_10 / DEVELOP.LZH / DSP / DSPDEBUG / ASMDTA.HLP next >
Text File  |  1992-10-15  |  205KB  |  6,039 lines

  1. {ABS}                        Absolute Value
  2.  
  3. Operation:
  4.     |D|->D                (parallel move)
  5.  
  6. Assembler Syntax:
  7.     ABS    D                (parallel move)
  8.  
  9. Description:
  10.     Take the absolute value of the destination operand D and store the
  11. result in the destination accumulator.
  12.  
  13. Example:
  14.     ABS    A    #$123456,X0    A,Y0    ; Take abs. value, setup X0, save value
  15.  
  16.     Before execution:
  17.         A = $FF:FFFFFF:FFFFF2
  18.     After execution:
  19.         A = $00:000000:00000E
  20.  
  21. Explanation of Example:
  22.     Prior to execution, the 56-bit A accumulator contains the value
  23. $FF:FFFFFF:FFFFF2, Since this is a negative number, the execution of
  24. the ABS instruction takes the twos complement of that value and returns
  25. $00:000000:00000E.
  26.  
  27. NOTE: For the case in which the D operand equals $80:000000:000000
  28. ( -256.0), the ABS instruction will cause an overflow to occur since
  29. the result cannot be correctly expressed using the standard 56-bit,
  30. fixed-point, twos-complement data representation. Data limiting does
  31. not occur (i.e., A is not set to the limiting value of
  32. $7F:FFFFFF:FFFFFF).
  33.  
  34. Condition Codes:
  35.  
  36.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  37.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  38.     |L |**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  39.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  40.     |<-           {MR}         ->|<-       {CCR}      ->|
  41.  
  42.     {L}- Set if limiting (parallel move) or overflow has occured in result
  43.     {E}- Set if the signed integer portion of A or B result is in use
  44.     {U}- Set if A or B result is unnormalized
  45.     {N}- Set if bit 55 of A or B is set
  46.     {Z}- Set if A or B result equals zero
  47.     {V}- Set if overflow has occured in A or B result
  48.  
  49. NOTE: The definition of the {E} and {U} bits varies according to the
  50. scaling mode being used.
  51.  
  52. Instruction Format:
  53.     ABS    D
  54.  
  55.     D = ({A},{B})
  56.     
  57. Timing:        2+mv oscillator clock cycles
  58.  
  59. Memory:        1+mv programs words
  60.  
  61.  
  62. {ADC}                        Add Long with Carry
  63.  
  64. Operation:
  65.     S+C+D -> D            (parallel move)
  66.  
  67. Assembler Syntax:
  68.     ADC    S,D                (parallel move)
  69.  
  70. Description:
  71.     Add the source operand S and the carry bit {C} of the condition code
  72. register to the destination operand D and store the result in the
  73. destination accumulator. Long words (48 bits) may be added to the
  74. (56-bit) destination accumulator.
  75.  
  76. NOTE: The carry bit is set correctly for multiple precision arithmetic
  77. using long word operands if the extension register of the destination
  78. accumulator ({A2} or {B2}) is the sign extension of bit 47 of the
  79. destination accumulator ({A} or {B}).
  80.  
  81. Example:
  82.     MOVE    L:<$0,X            ;get a 48-bit LS long-word operand in X
  83.     MOVE    L:<$1,A            ;get other LS long word in A (Sing ext.)
  84.     MOVE    L:<$2,Y            ;get a 48-bit MS long-word operand in Y
  85.     ADD        X,A    L:<$3,B        ;add LS words; get other MS word in B
  86.     ADC        Y,B    A10,L:<$4    ;add MS words with carry, save LS sum
  87.     MOVE    B10,L:<$5        ;save MS sum
  88.  
  89.     Before Execution:
  90.         A = $FF:800000:000000
  91.         X = $800000:000000
  92.         B = $00:000000:000001
  93.         Y = $000000:000001
  94.         
  95.     After Execution:
  96.         A = $FF:000000:000000
  97.         X = $800000:000000
  98.         B = $00:000000:000000
  99.         Y = $000000:000001
  100.  
  101. Explanation of Example:
  102.     This example illustrates long-word double-precision (96-bit) addition
  103. using the ADC instruction. Prior to execution of the ADD and ADC
  104. instructions, the double-precision 96-bit value
  105. $000000:000001:800000:000000 is loaded into the {Y} and {X} registers (Y:X),
  106. respectively. The other double-precision 96-bit value
  107. $000000:000001:800000:000000 is loaded into the {B} and {A} accumulators
  108. (B:A), respectively. Since the 48-bit value loaded into the {A}
  109. accumulator is automatically sign extended to 56 bits and the other
  110. 48-bit long-word operand is internally sign extended to 56 bits during
  111. instruction execution, the carry bit wil be set correctly after the
  112. execution of the ADD X,A instruction. The ADC Y,B instruction then
  113. produces the correct MS 56-bit result. The actual 96-bit result is
  114. stored in memory using the {A10} and {B10} operands (instead of {A} and {B})
  115. because shifting and limiting is not desired.
  116.  
  117. Condition Codes:
  118.  
  119.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  120.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  121.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  122.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  123.     |<-           {MR}         ->|<-       {CCR}      ->|
  124.  
  125.     {L}- Set if limiting (parallel move) or overflow has occured in result
  126.     {E}- Set if the signed integer portion of A or B result is in use
  127.     {U}- Set if A or B result is unnormalized
  128.     {N}- Set if bit 55 of A or B result is set
  129.     {Z}- Set if A or B result equals zero
  130.     {V}- Set if overflow has occured in A or B result
  131.     {C}- Set if a carry (or borrow) occurs from bit 55 of A or B result
  132.  
  133. NOTE: The definition of the {E} and {U} bits varies according to the
  134. scaling mode being used.
  135.  
  136. Instruction Format:
  137.     ADC    S,D
  138.  
  139.     S = (X,Y)
  140.     D = (A,B)
  141.  
  142. Timing:        2 + mv oscillator clock cycles
  143.  
  144. Memory:        1 + mv program words
  145.  
  146.  
  147. {ADD}                        Add
  148.  
  149. Operation:
  150.     S+D -> D            (parallel move)
  151.  
  152. Assembler Syntax:
  153.     ADD    S,D                (parallel move)
  154.  
  155. Description:
  156.     Add the source operand S to the destination operand D and store the
  157. result in the destination accumulator. Words (24 bits), long words (48
  158. bits), and accumulators (56 bits) may be added to the destination
  159. accumulator.
  160.  
  161. NOTE: The carry bit is set correctly using word and long-word source
  162. operands if the extension register of the destination accumulator (A2
  163. or B2) is the sign extension of bit 47 of the destination accumulator
  164. (A or B). Thus, the carry bit is always set correctly using accumulator
  165. source operands, but can be set incorrectly if {A1}, {B1}, {A10}, or {B10} are
  166. used as source operands and {A2} and {B2} are not replicas of bit 47.
  167.  
  168. Example:
  169.     ADD    X0,A A,X1    A,Y:(R1)+    ;24-bit add,set up X1, save prev, result
  170.     
  171.     Before Execution:
  172.         X0 = $FFFFFF
  173.         A  = $00:000100:000000
  174.  
  175.     After Execution:
  176.         X0 = $FFFFFF
  177.         A  = $00:0000FF:000000
  178.  
  179. Explanation of Example:
  180.     Prior to execution, the 24-bit {X0} register contains the value
  181. $FFFFFF and the 56-bit {A} accumulator contains the value
  182. $00:000100:000000. The ADD instruction automatically appends the 24-bit
  183. value in the {X0} register with 24 LS zeros, sign extends the resulting
  184. 48-bit long word to 56 bits, and adds the result to the 56-bit {A}
  185. accumulator. Thus, 24-bit operands are are added to the MSP portion of
  186. {A} or {B} ({A}1 or {B}1) because all arithmetic instructions assume a
  187. fractional, twos complement data representation. Note that 24-bit
  188. operands can be added to the LSP portion of {A} or {B} ({A0} or {B0}) by loading
  189. the 24-bit operand into {X0} or {Y0}, forming a 48-bit word by loading {X1} or
  190. {Y1} with the sign extension of {X0} or {Y0} and executing an ADD X,A or
  191. ADD Y,A instruction.
  192.  
  193. Condition Codes:
  194.  
  195.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  196.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  197.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  198.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  199.     |<-           {MR}         ->|<-       {CCR}      ->|
  200.  
  201.     {L}- Set if limiting (parallel move) or overflow has occured in result
  202.     {E}- Set if the signed integer portion of A or B result is in use
  203.     {U}- Set if A or B result is unnormalized
  204.     {N}- Set if bit 55 of A or B result is set
  205.     {Z}- Set if A or B result equals zero
  206.     {V}- Set if overflow has occured in A or B result
  207.     {C}- Set if a carry (or borrow) occurs from bit 55 of A or B result
  208.  
  209. NOTE: The definition of the {E} and {U} bits varies according to the
  210. scaling mode being used.
  211.  
  212. Instruction Format:
  213.     ADD    S,D
  214.  
  215.     S = (A,B,X,Y,X0,Y0,X1,Y1)
  216.     D = (A,B)
  217.  
  218. Timing:        2 + mv oscillator clock cycles
  219.  
  220. Memory:        1 + mv program words
  221.  
  222.  
  223. {ADDL}                        Shift Left and Add Accumulators
  224.  
  225. Operation:
  226.     S+2*D -> D            (parallel move)
  227.  
  228. Assembler Syntax:
  229.     ADDL    S,D            (parallel move)
  230.  
  231. Description:
  232.     Add the source operand S to two times the destination operand D and
  233. store the result in the destination accumulator. The destination
  234. operand D is arithmecally shifted one bit to the left, and a zero is
  235. shifted into the LS bit of D prior to the addition operation. The carry
  236. bit is set correctly if the source operand does not overflow as a
  237. result of the left shifte operation. The overflow bit may be set as a
  238. result of either the shifting or addition operation (or both). This
  239. instruction is useful for efficient divide and decimation int time
  240. (DIT) FFT algorithms.
  241.  
  242. Example:
  243.     ADDL    A,B    #$0,R0        ;A + 2 * B -> B, set up addr. reg. {R0}
  244.  
  245.     Before Execution:
  246.         A = $00:000000:000123
  247.         B = $00:005000:000000
  248.  
  249.     After Execution:
  250.         A = $00:000000:000123
  251.         B = $00:00A000:000123
  252.  
  253. Explanation of example:
  254.     Prior to execution, the 56-bit accumulator contains the value
  255. $00:000000:000123, and the 56-bit B accumulator contains the value
  256. $00:005000:000000. The ADDL A,B instruction adds two times the value
  257. in the {B} accumulator to the value in the {A} accumulator and stores the
  258. 56-bit result in the {B} accumulator.
  259.  
  260. Condition Codes:
  261.  
  262.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  263.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  264.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  265.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  266.     |<-           {MR}         ->|<-       {CCR}      ->|
  267.  
  268.     {L}- Set if limiting (parallel move) or overflow has occured in result
  269.     {E}- Set if the signed integer portion of A or B result is in use
  270.     {U}- Set if A or B result is unnormalized
  271.     {N}- Set if bit 55 of A or B result is set
  272.     {Z}- Set if A or B result equals zero
  273.     {V}- Set if overflow has occured in A or B result or if the MS bit of
  274.        the destination operand is changed as a result of the instruction's
  275.        left shift
  276.     {C}- Set if a carry (or borrow) occurs from bit 55 of A or B result
  277.  
  278. NOTE: The definition of the {E} and {U} bits varies according to the
  279. scaling mode being used.
  280.  
  281. Instruction Format:
  282.     ADDL    S,D
  283.  
  284.     S = ({A},{B})
  285.     D = ({A},{B})
  286.  
  287. Timing:        2 + mv oscillator clock cycles
  288.  
  289. Memory:        1 + mv program words
  290.  
  291.  
  292. {ADDR}                        Shift Right and Add Accumulators
  293.  
  294. Operation:
  295.     S + D / 2 -> D        (parallel move)
  296.  
  297. Assembler Syntax:
  298.     ADDR    S,D            (parallel move)
  299.  
  300. Description:
  301.     Add the source operand S to one-half the destination operand D and
  302. store the result in the destination accumulator. The destination operand
  303. D is arithmetically shifted one bit to the right while the MS bit of D
  304. is held constant prior to the addition operation. In contrast to the
  305. ADDL instruction, the carry bit is always set correctly, and the
  306. overflow bit can only be set by the addition operation and not by an
  307. overflow due to the initial shifting operation. This instuction is
  308. useful for efficient divide and decimation in time (DIT) FFT
  309. algorithms.
  310.  
  311. Example:
  312.     ADDR    B,A    X0,X:(R1)+N1 Y0,Y:(R4)-        ;B+A/2 -> A, save X0 and Y0
  313.  
  314.     Before execution:
  315.         A = $80:000000:2468AC
  316.         B = $00:013570:000000
  317.     After execution:
  318.         A = $C0:013570:123456
  319.         B = $00:013570:000000
  320.  
  321. Explanation of Example:
  322.     Prior to execution, the 56-bit {A} accumulator contains the value
  323. $80:000000:2468AC, and the 56-bit {B} accumulator contains the value
  324. $00:013570:000000. The ADDR B,A instruction adds one-half the value
  325. in the {A} accumulator to the value in the {B} accumulator and stores
  326. the 56-bit result in the {A} accumulator.
  327.  
  328. Condition Codes:
  329.  
  330.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  331.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  332.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  333.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  334.     |<-           {MR}         ->|<-       {CCR}      ->|
  335.  
  336.     {L}- Set if limiting (parallel move) or overflow has occured in result
  337.     {E}- Set if the signed integer portion of A or B result is in use
  338.     {U}- Set if A or B result is unnormalized
  339.     {N}- Set if bit 55 of A or B result is set
  340.     {Z}- Set if A or B result equals zero
  341.     {V}- Set if overflow has occured in A or B result
  342.     {C}- Set if a carry (or borrow) occurs from bit 55 of A or B result
  343.  
  344. NOTE: The definition of the {E} and {U} bits varies according to the
  345. scaling mode being used.
  346.  
  347. Instruction Format:
  348.     ADDR    S,D
  349.  
  350.     S = ({A},{B})
  351.     D = ({A},{B})
  352.  
  353. Timing:        2 + mv oscillator clock cycles
  354.  
  355. Memory:        1 + mv program words
  356.  
  357.  
  358. {AND}                        Logical AND
  359.  
  360. Operation:
  361.     S & D[47:24] -> D[47:24] (parallel move)
  362.     where & denotes the logical AND operator
  363.  
  364. Assembler Syntax:
  365.     AND    S,D                (parallel move)
  366.  
  367. Description:
  368.     Logically AND the source operand S with bits 47-24 of the
  369. destination operand D and store the result in bits 47-24 of the
  370. destination accumulator. This instruction is a 24-bit operation. The
  371. remaining bits of the destination operand D are not affected.
  372.  
  373. Example:
  374.     AND    X0,A    (R5)-N5        ;AND X0 with A1, update R5 using N5
  375.  
  376.     Before Execution:
  377.         X0 = $FF0000
  378.         A  = $00:123456:789ABC
  379.  
  380.     After Execution:
  381.         X0 = $FF0000
  382.         A  = $00:120000:789ABC
  383.  
  384. Explanation of Example:
  385.     Prior to execution, the 24-bit {X0} register contains the value
  386. $FF0000, and the 56-bit {A} accumulator contains the value
  387. $00:123456:789ABC. The AND X0,A instruction logically ANDs the 24-bit
  388. value in the {X0} register with bits 47-24 of the {A} accumulator ({A1})
  389. and stores the result in the the {A} accumulator with bits 55-48 and
  390. 23-0 unchanged.
  391.  
  392. Condition Codes:
  393.  
  394.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  395.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  396.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  397.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  398.     |<-           {MR}         ->|<-       {CCR}      ->|
  399.  
  400.     {L}- Set if data limiting has occured during parallel move
  401.     {N}- Set if bit 47 of A or B result is set
  402.     {Z}- Set if bits 47-24 A or B result are zero
  403.     {V}- Always cleared
  404.  
  405. Instruction Format:
  406.     AND    S,D
  407.  
  408.     S = ({X0},{X1},{Y0},{Y1})
  409.     D = ({A},{B})
  410.  
  411. Timing:        2 + mv oscillator clock cycles
  412.  
  413. Memory:        1 + mv program words
  414.  
  415.  
  416. {ANDI}                        AND Immediate with Control Register
  417.  
  418. Operation:
  419.     #xx & D -> D
  420.     where & denotes the logical AND operator
  421.  
  422. Assembler Syntax:
  423.     AND(I)    #xx,D
  424.  
  425. Description:
  426.     Logically AND the 8-bit immediate operand (#xx) with the contents
  427. of the destination control register D and store the result in the
  428. destination control register. The condition code are affected only when
  429. the condition code register (CCR) is specified as the destination
  430. operand.
  431.  
  432. Restrictions:
  433.     The ANDI #xx,MR instruction cannot be used immediately before an
  434. {ENDDO} or {RTI} instruction and cannot be one of the last three
  435. instructions in a {DO} loop (at {LA}-2, {LA}-1, or {LA}).
  436. The ANDI #xx,CCR instruction cannot be used immediately before an {RTI}
  437. instruction.
  438.  
  439. Example:
  440.     ANDI    #$FE,CCR        ;clear carry bit C in cond. code register
  441.  
  442.     Before Execution:
  443.         CCR = $31
  444.     After Execution:
  445.         CCR = $30
  446.  
  447. Explanation of Example:
  448.     Prior to execution, the 8-bit condition code register ({CCR})
  449. contains the value $31. The ANDI #$FE,CCR instruction logically ANDs
  450. the immediate 8-bit value $FE with the contents of the condition code
  451. register and stores the result in the condition code register.
  452.  
  453. Condition Codes:
  454.  
  455.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  456.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  457.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  458.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  459.     |<-           {MR}         ->|<-       {CCR}      ->|
  460.  
  461. For CCR Operand:
  462.     {L}- Cleared if bit 6 of the immediate operand is cleared
  463.     {E}- Cleared if bit 5 of the immediate operand is cleared
  464.     {U}- Cleared if bit 4 of the immediate operand is cleared
  465.     {N}- Cleared if bit 3 of the immediate operand is cleared
  466.     {Z}- Cleared if bit 2 of the immediate operand is cleared
  467.     {V}- Cleared if bit 1 of the immediate operand is cleared
  468.     {C}- Cleared if bit 0 of the immediate operand is cleared
  469.  
  470. For MR and OMR Operands:
  471.     The condition codes are not affected using these operands.
  472.  
  473. Instruction Format:
  474.     ANDI    #xx,D
  475.     
  476.     #xx = 8-bit Immediate Short Data
  477.     D = ({MR},{CCR},{OMR})
  478.  
  479. Timing:        2 oscillator clock cycles
  480.  
  481. Memory:        1 program word
  482.  
  483.  
  484. {ASL}                        Aritmetic Shift Accumulator Left
  485.  
  486. Operation:
  487.  
  488.         55 47     23   0
  489.        +--+------+------+
  490.     C<-|<-|<-----|<-----|<--0 (parallel move)
  491.        +--+------+------+
  492.  
  493. Assembler Syntax:
  494.     ASL    D                (parallel move)
  495.  
  496. Description:
  497.     Arithmetically shift the destination operand D one bit to the left
  498. and store the result in the destination accumulator. The MS bit of D
  499. prior to instruction execution is shifted into the carry bit {C} and a
  500. zero is shifted into the LS bit of the destination accumulator D. If a
  501. zero shift count is specified, the carry bit is cleared. The difference
  502. between ASL and {LSL} is that ASL operates on the entires 56 bits of
  503. the accumulator and therefore sets the {V} bit if the number overflowed.
  504.  
  505. Example:
  506.     ASL A    (R3)-        ;multiply A by 2,update R3
  507.  
  508.     Before Execution:
  509.         A  = $A5:012345:012345
  510.         SR = $0300
  511.  
  512.     After Execution:
  513.         A  = $4A:02468A:02468A
  514.         SR = $0373
  515.  
  516. Explanation of Example:
  517.     Prior to execution, the 56-bit {A} accumulator contains the value
  518. $A5:012345:012345. The execution of the ASL A instruction shifts the
  519. 56-bit value in the A accumulator one bit to the left and stores the
  520. result back in the A accumulator.
  521.  
  522. Condition Codes:
  523.  
  524.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  525.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  526.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  527.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  528.     |<-           {MR}         ->|<-       {CCR}      ->|
  529.  
  530.     {L}- Set if limiting (parallel move) or overflow has occured in result
  531.     {E}- Set if the signed integer portion of A or B result is in use
  532.     {U}- Set if A or B result is unnormalized
  533.     {N}- Set if bit 55 of A or B result is set
  534.     {Z}- Set if A or B result equals zero
  535.     {V}- Set if bit 55 of A or B result is changed due to left shift
  536.     {C}- Set if bit 55 of A or B was set prior to instruction execution
  537.  
  538. NOTE: The definition of the E and U bits varies according to the
  539. scaling mode being used.
  540.  
  541. Instruction Format:
  542.     ASL    D
  543.  
  544.     D = ({A},{B})
  545.  
  546. Timing:        2 + mv oscillator clock cycles
  547.  
  548. Memory:        1 + mv program words
  549.  
  550.  
  551. {ASR}                        Arithmetic Shift Accumulator Right
  552.  
  553. Operation:
  554.  
  555.         55 47     23   0
  556.        +--+------+------+
  557.     +->|->|----->|----->|--> C (parallel move)
  558.     |  +--+------+------+
  559.     +---+
  560.  
  561. Assembler Syntax:
  562.     ASR    D                (parallel move)
  563.  
  564. Description:
  565.     Arithmetically shift the destination operand D one bit to the right
  566. and store the result in the destination accumulator. The LS bit of D
  567. prior to instruction execution is shifted into the carry bit {C}, and
  568. the MS bit of D is held constant.
  569.  
  570. Example:
  571.     ASR B    X:-(R3),R3        ;divide B by 2, update R3,load R3
  572.  
  573.     Before Execution:
  574.         B  = $AB:A86420:A86421
  575.         SR = $0300
  576.  
  577.     After Execution:
  578.         B  = $D4:543210:543210
  579.         SR = $0329
  580.  
  581. Explanation of Example:
  582.     Prior to execution, the 56-bit {B} accumulator contains the value
  583. $A8:A86420:A86420. The execution of the ASR B instruction shifts the
  584. 56-bit value in the B accumulator one bit to the right and restore
  585. the result back in the B accumulator.
  586.  
  587. Condition Codes:
  588.  
  589.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  590.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  591.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  592.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  593.     |<-           {MR}         ->|<-       {CCR}      ->|
  594.  
  595.     {L}- Set if data limiting has occured during parallel move
  596.     {E}- Set if the signed integer portion of A or B result is in use
  597.     {U}- Set if A or B result is unnormalized
  598.     {N}- Set if bit 55 of A or B result is set
  599.     {Z}- Set if A or B result equals zero
  600.     {V}- Always cleared
  601.     {C}- Set if bit 0 of A or B was set prior to instruction execution
  602.  
  603. NOTE: The definition of the E and U bits varies according to the
  604. scaling mode being used.
  605.  
  606. Instruction Format:
  607.     ASR D
  608.  
  609.     D = ({A},{B})
  610.  
  611. Timing:        2 + mv oscillator clock cycles
  612.  
  613. Memory:        1 + mv program words
  614.  
  615.  
  616. {BCHG}                        Bit Test and Change
  617.  
  618. Operation:
  619.     D[n] -> C;
  620.     D[n] -> D[n]
  621.  
  622. Assembler Syntax:
  623.     BCHG    #n,X:ea
  624.     BCHG    #n,X:aa
  625.     BCHG    #n,X:pp
  626.     BCHG    #n,Y:ea
  627.     BCHG    #n,Y:aa
  628.     BCHG    #n,Y:pp
  629.     BCHG    #n,D
  630.  
  631. Description:
  632.     Test the nth bit of the destination operand D, complement it, and
  633. store the result in the destination location. The state of the nth bit
  634. is stored in the carry bit {C} of the condition code register. After the
  635. test, the nth bit of the destination location is complemented. The bit
  636. to be tested is selected by an immediate bit number from 0-23. This
  637. instruction performs a read-modify-write operation on the destination
  638. locatiob using two destination accesses before releasing the bus. This
  639. instruction providesa test-and-change capability which is useful for
  640. synchronizing multiple processors using a shared memory. This
  641. instruction can use all memory alterable addressing modes.
  642.  
  643. Example:
  644.     BCHG    #$7,X:<<$FFE2        ;test and change bit 7 in I/O Port B DDR
  645.  
  646.     Before Execution:
  647.         X:$FFE2 = $000000
  648.         SR      = $0300
  649.  
  650.     After Execution:
  651.         X:$FFE2 = $000080
  652.         SR      = $0300
  653.  
  654. Explanation of Example:
  655.     Prior to execution, the 24-bit X memory location X:$FFE2 (I/O port
  656. B data direction register) contains the value $000000. The execution of
  657. the BCHG #$7,X:<<$FFE2 instructiontests the state of the 7th bit in
  658. X:$FFE2, sets the carry bit {C} accordingly, and then complements the 7th
  659. bit in X:$FFE2.
  660.  
  661. Condition Codes:
  662.  
  663.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  664.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  665.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  666.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  667.     |<-           {MR}         ->|<-       {CCR}      ->|
  668.  
  669. CCR Condition Codes:
  670.     For destination operand SR:
  671.         {C}- Changed if bit 0 is specified. Not affected otherwise.
  672.         {V}- Changed if bit 1 is specified. Not affected otherwise.
  673.         {Z}- Changed if bit 2 is specified. Not affected otherwise.
  674.         {N}- Changed if bit 3 is specified. Not affected otherwise.
  675.         {U}- Changed if bit 4 is specified. Not affected otherwise.
  676.         {E}- Changed if bit 5 is specified. Not affected otherwise.
  677.         {L}- Changed if bit 6 is specified. Not affected otherwise.
  678.  
  679.     For other destination operands:
  680.         {C}- Set if bit tested is set. Cleared otherwise.
  681.         {V}- Not Affected.
  682.         {Z}- Not Affected.
  683.         {N}- Not Affected.
  684.         {U}- Not Affected.
  685.         {E}- Not Affected.
  686.         {L}- Not Affected.
  687.  
  688. MR Status Bits:
  689.     For destination operand SR:
  690.         {I0}- Changed if bit 8 specified. Not affected otherwise.
  691.         {I1}- Changed if bit 9 specified. Not affected otherwise.
  692.         {S0}- Changed if bit 10 specified. Not affected otherwise.
  693.         {S1}- Changed if bit 11 specified. Not affected otherwise.
  694.         {T} - Changed if bit 13 specified. Not affected otherwise.
  695.         {LF}- Changed if bit 15 specified. Not affected otherwise.
  696.  
  697.     For other destination operands:
  698.         {I0}- Not affected
  699.         {I1}- Not affected
  700.         {S0}- Not affected
  701.         {S1}- Not affected
  702.         {T} - Not affected
  703.         {LF}- Not affected
  704.  
  705. Instruction Format:
  706.     BCHG    #n,X:ea
  707.     BCHG    #n,Y:ea
  708.     BCHG    #n,X:aa
  709.     BCHG    #n,Y:aa
  710.     BCHG    #n,X:pp
  711.     BCHG    #n,Y:pp
  712.     BCHG    #n,D
  713.  
  714.     #n = bit number
  715.  
  716.     ea = (Rn)-Nn
  717.          (Rn)+Nn
  718.          (Rn)-
  719.          (Rn)+
  720.          (Rn)
  721.          (Rn+Nn)
  722.          -(Rn)
  723.          Absolute address
  724.  
  725.     aa = 6-bit Absolute Short Address
  726.  
  727.     pp = 6-bit I/O Short Address
  728.  
  729.     D  = (    {X0},{X1},{Y0},{Y1},{A0},{B0},{A2},{B2},{A1},{B1},{A},{B},
  730.             {Rn},{Nn},{Mn},{SR},{OMR},{SP},{SSH},{SSL},{LA},{LC})
  731.  
  732. Timing:        4 + mvb oscillator clock cycles
  733.  
  734. Memory:        1 + ea program words
  735.  
  736.  
  737. {BCLR}                        Bit Test and Clear
  738.  
  739. Operation:
  740.     D[n] -> C;
  741.     0 -> D[n]
  742.  
  743. Assembler Syntax:
  744.     BCLR    #n,X:ea
  745.     BCLR    #n,X:aa
  746.     BCLR    #n,X:pp
  747.     BCLR    #n,Y:ea
  748.     BCLR    #n,Y:aa
  749.     BCLR    #n,Y:pp
  750.     BCLR    #n,D
  751.  
  752. Description:
  753.     Test the nth bit of the destination operand D, clear it and store
  754. the result in the destination location. The state of the nth bit is
  755. stored in the carry bit C of the condition code register. After the
  756. test, the nth bit of the destination location is clered. The bit to be
  757. tested is selected by an immediate bit number from 0-23. This
  758. instruction performs a read-modify-write operation on the destination
  759. location using two destination accesses before releasing the bus. This
  760. instruction provides a test-and-clear capability which is useful for
  761. synchronizing multiple processors using a shared memory. This
  762. instruction can use all memory alterable addressing modes.
  763.  
  764. Example:
  765.     BCLR    #$E,X<<$FFE4    ;test and clear bit 14 in I/O Port B Data Reg.
  766.  
  767.     Before Execution:
  768.         X:$FFE4 = $FFFFFF
  769.         SR      = $0300
  770.  
  771.     After Execution:
  772.         X:$FFE4 = $FFBFFF
  773.         SR      = $0301
  774.  
  775. Explanation of Example:
  776.     Prior to execution, the 24-bit X memory location X:$FFE4 (I/O port
  777. B data register) contains the value $FFFFFF. The execution of the
  778. BCLR #$E,X:<<$FFE4 instruction tests the state of the 14th bit in
  779. X:$FFE4, sets the carry bit {C} accordingly, and then clears the 14th
  780. bit in X:$FFE4.
  781.  
  782. Condition Codes:
  783.  
  784.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  785.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  786.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  787.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  788.     |<-           {MR}         ->|<-       {CCR}      ->|
  789.  
  790. {CCR} Condition Codes:
  791.     For destination operand {SR}:
  792.         {C}- Changed if bit 0 is specified. Not affected otherwise.
  793.         {V}- Changed if bit 1 is specified. Not affected otherwise.
  794.         {Z}- Changed if bit 2 is specified. Not affected otherwise.
  795.         {N}- Changed if bit 3 is specified. Not affected otherwise.
  796.         {U}- Changed if bit 4 is specified. Not affected otherwise.
  797.         {E}- Changed if bit 5 is specified. Not affected otherwise.
  798.         {L}- Changed if bit 6 is specified. Not affected otherwise.
  799.  
  800.     For other destination operands:
  801.         {C}- Set if bit tested is set. Cleared otherwise.
  802.         {V}- Not Affected.
  803.         {Z}- Not Affected.
  804.         {N}- Not Affected.
  805.         {U}- Not Affected.
  806.         {E}- Not Affected.
  807.         {L}- Not Affected.
  808.  
  809. {MR} Status Bits:
  810.     For destination operand {SR}:
  811.         {I0}- Changed if bit 8 specified. Not affected otherwise.
  812.         {I1}- Changed if bit 9 specified. Not affected otherwise.
  813.         {S0}- Changed if bit 10 specified. Not affected otherwise.
  814.         {S1}- Changed if bit 11 specified. Not affected otherwise.
  815.  
  816.         {T} - Changed if bit 13 specified. Not affected otherwise.
  817.         {LF}- Changed if bit 15 specified. Not affected otherwise.
  818.  
  819.     For other destination operands:
  820.         {I0}- Not affected
  821.         {I1}- Not affected
  822.         {S0}- Not affected
  823.         {S1}- Not affected
  824.         {T} - Not affected
  825.         {LF}- Not affected
  826.  
  827. Instruction Format:
  828.     BCLR    #n,X:ea
  829.     BCLR    #n,Y:ea
  830.     BCLR    #n,X:aa
  831.     BCLR    #n,Y:aa
  832.     BCLR    #n,X:pp
  833.     BCLR    #n,Y:pp
  834.     BCLR    #n,D
  835.  
  836.     #n = bit number
  837.  
  838.     ea = (Rn)-Nn
  839.          (Rn)+Nn
  840.          (Rn)-
  841.          (Rn)+
  842.          (Rn)
  843.          (Rn+Nn)
  844.          -(Rn)
  845.          Absolute address
  846.  
  847.     aa = 6-bit Absolute Short Address
  848.  
  849.     pp = 6-bit I/O Short Address
  850.  
  851.     D  = (    {X0},{X1},{Y0},{Y1},{A0},{B0},{A2},{B2},{A1},{B1},{A},{B},
  852.             {Rn},{Nn},{Mn},{SR},{OMR},{SP},{SSH},{SSL},{LA},{LC})
  853.  
  854. Timing:        4 + mvb oscillator clock cycles
  855.  
  856. Memory:        1 + ea program words
  857.  
  858.  
  859. {BSET}                        Bit Test and Set
  860.  
  861. Operation:
  862.     D[n] -> C;
  863.     1 -> D[n]
  864.  
  865. Assembler Syntax:
  866.     BSET    #n,X:ea
  867.     BSET    #n,X:aa
  868.     BSET    #n,X:pp
  869.     BSET    #n,Y:ea
  870.     BSET    #n,Y:aa
  871.     BSET    #n,Y:pp
  872.     BSET    #n,D
  873.  
  874. Description:
  875.     Test the nth bit of the destination operand D, set it, and store
  876. the result in the destination location. The state of the nth bit is
  877. stored in the carry bit {C} of the condition code register. After the
  878. test, the nth bit of the destination location is set. The bit to be
  879. tested is selected by an immediate bit number from 0-23. This
  880. instruction performs a read-modify-write operation on the destination
  881. location using two destination accesses before releasing the bus. This
  882. instruction provides a test-and-set capability which is useful for
  883. synchronizing multiple processorsusing a shared memory. This
  884. instruction can use all memory alterable addressing modes.
  885.  
  886. Example:
  887.     BSET    #$0,X:<<$FFE5    ;test and set bit 10 in I/O Port C Data Reg.
  888.  
  889.     Before Execution:
  890.         X:$FFE5 = $000000
  891.         SR      = $0300
  892.  
  893.     After Execution:
  894.         X:$FFE5 = $000001
  895.         SR      = $0300
  896.  
  897. Explanation of Example:
  898.     Prior to execution, the 24-bit X memory location X:$FFE5 (I/O port
  899. C data register) contains the value $000000. The execution of the BSET
  900. #$0,X:<<$FFE5 instruction test the state of the 0th bit in X:$FFE5,
  901. sets the carry bit {C} accordingly, and then sets the 0th bit in X:$FFE5.
  902.  
  903. Condition Codes:
  904.  
  905.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  906.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  907.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  908.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  909.     |<-           {MR}         ->|<-       {CCR}      ->|
  910.  
  911. {CCR} Condition Codes:
  912.     For destination operand {SR}:
  913.         {C}- Changed if bit 0 is specified. Not affected otherwise.
  914.         {V}- Changed if bit 1 is specified. Not affected otherwise.
  915.         {Z}- Changed if bit 2 is specified. Not affected otherwise.
  916.         {N}- Changed if bit 3 is specified. Not affected otherwise.
  917.         {U}- Changed if bit 4 is specified. Not affected otherwise.
  918.         {E}- Changed if bit 5 is specified. Not affected otherwise.
  919.         {L}- Changed if bit 6 is specified. Not affected otherwise.
  920.  
  921.     For other destination operands:
  922.         {C}- Set if bit tested is set. Cleared otherwise.
  923.         {V}- Not Affected.
  924.         {Z}- Not Affected.
  925.         {N}- Not Affected.
  926.         {U}- Not Affected.
  927.         {E}- Not Affected.
  928.         {L}- Not Affected.
  929.  
  930. {MR} Status Bits:
  931.     For destination operand {SR}:
  932.         {I0}- Changed if bit 8 specified. Not affected otherwise.
  933.         {I1}- Changed if bit 9 specified. Not affected otherwise.
  934.         {S0}- Changed if bit 10 specified. Not affected otherwise.
  935.         {S1}- Changed if bit 11 specified. Not affected otherwise.
  936.         {T} - Changed if bit 13 specified. Not affected otherwise.
  937.         {LF}- Changed if bit 15 specified. Not affected otherwise.
  938.  
  939.     For other destination operands:
  940.         {I0}- Not affected
  941.         {I1}- Not affected
  942.         {S0}- Not affected
  943.         {S1}- Not affected
  944.         {T} - Not affected
  945.         {LF}- Not affected
  946.  
  947. Instruction Format:
  948.     BSET    #n,X:ea
  949.     BSET    #n,Y:ea
  950.     BSET    #n,X:aa
  951.     BSET    #n,Y:aa
  952.     BSET    #n,X:pp
  953.     BSET    #n,Y:pp
  954.     BSET    #n,D
  955.  
  956.     #n = bit number
  957.  
  958.     ea = (Rn)-Nn
  959.          (Rn)+Nn
  960.          (Rn)-
  961.          (Rn)+
  962.          (Rn)
  963.          (Rn+Nn)
  964.          -(Rn)
  965.          Absolute address
  966.  
  967.     aa = 6-bit Absolute Short Address
  968.  
  969.     pp = 6-bit I/O Short Address
  970.  
  971.     D  = (    {X0},{X1},{Y0},{Y1},{A0},{B0},{A2},{B2},{A1},{B1},{A},{B},
  972.             {Rn},{Nn},{Mn},{SR},{OMR},{SP},{SSH},{SSL},{LA},{LC})
  973.  
  974. Timing:        4 + mvb oscillator clock cycles
  975.  
  976. Memory:        1 + ea program words
  977.  
  978.  
  979. {BTST}                        Bit Test
  980.  
  981. Operation:
  982.     D[n] -> C
  983.  
  984. Assembler Syntax:
  985.     BTST    #n,X:ea
  986.     BTST    #n,X:aa
  987.     BTST    #n,X:pp
  988.     BTST    #n,Y:ea
  989.     BTST    #n,Y:aa
  990.     BTST    #n,Y:pp
  991.     BTST    #n,D
  992.  
  993. Description:
  994.     Test the nth bit of the destination operand D. The state of the nth
  995. bit is stored in the carry bit {C} of the condition code register. The bit
  996. to be tested is selected by an immediate bit number from 0-23. This
  997. instruction is useful for performing serial to parallel conversion when
  998. used with the apropriate rotate instructions. This instruction can use
  999. all memory alterable addressing modes.
  1000.  
  1001. Example:
  1002.     BTST    #$1,X:<<$FFEE    ;read SSI serial input flag IF1 into C bit
  1003.     ROL        A                ;rotate carry bit C into LSB of A1
  1004.  
  1005.     Before Execution:
  1006.         X:$FFEE = $000002
  1007.         SR      = $0300
  1008.  
  1009.     After Execution:
  1010.         X:$FFEE = $000002
  1011.         SR      = $0301
  1012.  
  1013. Explanation of Example:
  1014.     Prior to execution, the 24-bit X memory location X:$FFEE (I/O SSI
  1015. status register) contains the value $000002. The execution of the BTST
  1016. #$1,X:<<$FFEE instruction tests the state of the 1st bit (serial input
  1017. flag {IF1}) in X:$FFEE and sets the carry bit {C} accordingly. This
  1018. instruction sequence illustrates serial to parallel conversion using
  1019. the carry bit {C} and the 24-bit {A1} register.
  1020.  
  1021. Condition Codes:
  1022.  
  1023.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  1024.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  1025.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  1026.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  1027.     |<-           {MR}         ->|<-       {CCR}      ->|
  1028.  
  1029. CCR Condition Codes:
  1030.     {C}- Set if bit tested is set. Cleared otherwise
  1031.     {V}- Not Affected
  1032.     {Z}- Not Affected
  1033.     {N}- Not Affected
  1034.     {U}- Not Affected
  1035.     {E}- Not Affected
  1036.     {L}- Not Affected
  1037.  
  1038. {MR} Status bits are not affeted.
  1039.  
  1040. {SP}- Stack Pointer:
  1041.     For destination operand {SSH}: {SP} - Decrement by 1.
  1042.     For other destination operands: {SP} - Not affected.
  1043.  
  1044. Instruction format:
  1045.     BTST    #n,X:ea
  1046.     BTST    #n,Y:ea
  1047.     BTST    #n,X:aa
  1048.     BTST    #n,Y:aa
  1049.     BTST    #n,X:pp
  1050.     BTST    #n,Y:pp
  1051.     BTST    #n,D
  1052.  
  1053.     #n = bit number
  1054.  
  1055.     ea = (Rn)-Nn
  1056.          (Rn)+Nn
  1057.          (Rn)-
  1058.          (Rn)+
  1059.          (Rn)
  1060.          (Rn+Nn)
  1061.          -(Rn)
  1062.          Absolute address
  1063.  
  1064.     aa = 6-bit Absolute Short Address
  1065.  
  1066.     pp = 6-bit I/O Short Address
  1067.  
  1068.     D  = (    {X0},{X1},{Y0},{Y1},{A0},{B0},{A2},{B2},{A1},{B1},{A},{B},
  1069.             {Rn},{Nn},{Mn},{SR},{OMR},{SP},{SSH},{SSL},{LA},{LC})
  1070.  
  1071. Timing:        4 + mvb oscillator clock cycles
  1072.  
  1073. Memory:        1 + ea program words
  1074.  
  1075.  
  1076. {CLR}                        Clear Accumulator
  1077.  
  1078. Operation:
  1079.     0 -> D                (parallel move)
  1080.  
  1081. Assembler Syntax:
  1082.     CLR    D                (parallel move)
  1083.  
  1084. Description:
  1085.     Clear the destination accumulator. This is a 56-bit clear instruction.
  1086.  
  1087. Example:
  1088.     CLR    A    #$7F,N0        ;clear A, set up N0 addr. reg.
  1089.  
  1090.     Before Execution:
  1091.         A = $12:345678:9ABCDE
  1092.  
  1093.     After Execution:
  1094.         A = $00:000000:000000
  1095.  
  1096. Explanation of Example:
  1097.     Prior to execution, the 56-bit {A} accumulator contains the value
  1098. $12:345678:9ABCDE. The execution of the CLR A instruction clears the
  1099. 56-bit A accumulator to zero.
  1100.  
  1101. Condition Codes:
  1102.  
  1103.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  1104.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  1105.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  1106.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  1107.     |<-           {MR}         ->|<-       {CCR}      ->|
  1108.  
  1109.     {L}- Set if data Limiting has occured during parallel move
  1110.     {E}- Always cleared
  1111.     {U}- Always set
  1112.     {N}- Always cleared
  1113.     {Z}- Always set
  1114.     {V}- Always cleared
  1115.  
  1116. Instruction Format:
  1117.     CLR    D
  1118.  
  1119.     D = ({A},{B})
  1120.  
  1121. Timing:        2 + mv oscillator clock cycles
  1122.  
  1123. Memory:        1 + mv program words
  1124.  
  1125.  
  1126. {CMP}                        Compare
  1127.  
  1128. Operation:
  1129.     S2 - S1                (parallel move)
  1130.  
  1131. Assembler Syntax:
  1132.     CMP    S1,S2            (parallel move)
  1133.  
  1134. Description:
  1135.     Subtract the source one operand, S1, from the source two
  1136. accumulator, S2, and update the condition code register. The result of
  1137. the substraction operation isnot stored.
  1138.  
  1139. NOTE: This instruction substracts 56-bit operands. When a word is
  1140. specified as S1, it is sign extended and zero filled to form a valid
  1141. 56-bit operand. For the carry to be set correctly as a result of the
  1142. substraction, S2 must be properly sign extended. S2 can be improperly
  1143. sign extended by writing A1 or B1 explicity prior to executing the
  1144. compare so that {A2} or {B2}, respectively, may not represent the correct
  1145. sign extension. This note particularly applies to the case where it is
  1146. extended to compare 24-bit operands such as X0 with A1.
  1147.  
  1148. Example:
  1149.     CMP    Y0,B    X0,X:(R6)+N6    Y1,Y:(R0)-    ;comp. Y0 and B, save X0,Y1
  1150.  
  1151.     Before Execution:
  1152.         B  = $00:000020:000000
  1153.         Y0 = $000024
  1154.         SR = $0300
  1155.  
  1156.     After Execution:
  1157.         B  = $00:000020:000000
  1158.         Y0 = $000024
  1159.         SR = $0319
  1160.  
  1161. Explanation of Example:
  1162.     Prior to execution, the 56-bit {B} accumulator contains the value
  1163. $00:000020:000000 and the 24-bit {Y0} register contains the value
  1164. $000024. The execution of the CMP Y0,B instruction automatically
  1165. appends the 24-bit value in the Y0 register with 24 LS zeros, sign
  1166. extends the resulting 48-bit long word to 56 bits, substracts the
  1167. result from the 56-bit {B} accumulator and updates the condition code
  1168. register.
  1169.  
  1170. Condition Codes:
  1171.  
  1172.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  1173.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  1174.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  1175.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  1176.     |<-           {MR}         ->|<-       {CCR}      ->|
  1177.  
  1178.     {L}- Set if limiting (parallel move) or overflow has occured in result
  1179.     {E}- Set if the signed integer portion of result is in use
  1180.     {U}- Set if result is unnormlized
  1181.     {N}- Set if bit 55 of result is set
  1182.     {Z}- Set if result equals zero
  1183.     {V}- Set if overflow has occured in result
  1184.     {C}- Set if a carry (or borrow) occurs from bit 55 of result
  1185.  
  1186. NOTE: The definition of the {E} and {U} bits varies according
  1187. to the scaling mode being used.
  1188.  
  1189. Instruction Format:
  1190.     CMP    S1,S2
  1191.  
  1192.     S1 = (A,B,X0,Y0,X1,Y1)
  1193.     S2 = (A,B)
  1194.  
  1195. Timing:        2 + mv oscillator clock cycles
  1196.  
  1197. Memory:        1 + mv program words
  1198.  
  1199.  
  1200. {CMPM}                        Compare Magnitude
  1201.  
  1202. Operation:
  1203.     |S2| - |S1|            (parallel move)
  1204.  
  1205. Assembler Syntax:
  1206.     CMPM    S1,S2        (parallel move)
  1207.  
  1208. Description:
  1209.     Subtract the absolute value (magnitude) of the source  oneoperand,
  1210. S1, from the absolute value of the source two accumulator, S2, and
  1211. update the condition code register. The result of the substraction
  1212. operation is not stored.
  1213.  
  1214. NOTE: This instruction substracts 56-bit operands. When a word is
  1215. specified as S1, it is sign extended and zero filled to form a valid
  1216. 56-bit operand. For the carry to be set correctly as a result of the
  1217. substraction, S2 must be properly sign extended. S2 can be improperly
  1218. sign extended by writing {A1} or {B1} explicitly prior to executing the
  1219. compare so that {A2} or {B2}, respectively, may not represent the correct
  1220. sign extension. This note particulary applies to the case where it is
  1221. extended to compare 24-bit operands such as {X0} witch {A1}.
  1222.  
  1223. Example:
  1224.     CMPM    X1,A    BA,L:-(R4)    ;comp. X1 and A mag.,save B1 and A1
  1225.  
  1226.     Before Execution:
  1227.         A  = $00:000006:000000
  1228.         X1 = $FFFFF7
  1229.         SR = $0300
  1230.  
  1231.     After Execution:
  1232.         A  = $00:000006:000000
  1233.         X1 = $FFFFF7
  1234.         SR = $0319
  1235.  
  1236. Explanation of Example:
  1237.     Prior to execution, the 56-bit {A} accumulator contains the value
  1238. $00:000006:000000, and the 24-bit {X1} register contains the $FFFFF7.
  1239. The execution of the CMPM X1,A instruction automatically appends the
  1240. 24-bit value in the {X1} register with 24 LS zeros, sign extends the
  1241. resulting 48-bit long word to 56 bits, takes the absolute value of
  1242. the resulting 56-bit number, substracts the result from the absolute
  1243. value of the contents of the 56-bit {A} accumulator, and updates the
  1244. condition code register.
  1245.  
  1246. Condition Codes:
  1247.  
  1248.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  1249.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  1250.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  1251.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  1252.     |<-           {MR}         ->|<-       {CCR}      ->|
  1253.  
  1254.     {L}- Set if limiting (parallel move) or overflow has occured in result
  1255.     {E}- Set if the signed integer portion of result is in use
  1256.     {U}- Set if result is unnormlized
  1257.     {N}- Set if bit 55 of result is set
  1258.     {Z}- Set if result equals zero
  1259.     {V}- Set if overflow has occured in result
  1260.     {C}- Set if a carry (or borrow) occurs from bit 55 of result
  1261.     
  1262. NOTE: The definition of the {E} and {U} bits varies according
  1263. to the scaling mode being used.
  1264.  
  1265. Instruction Format:
  1266.     CMPM    S1,S2
  1267.  
  1268.     S1 = (A,B,X0,Y0,X1,Y1)
  1269.     S2 = (A,B)
  1270.  
  1271. Timing:        2 + mv oscillator clock cycles
  1272.  
  1273. Memory:        1 + mv program words
  1274.  
  1275.  
  1276. {DIV}                        Divide Iteration
  1277.  
  1278. Operation:
  1279.  
  1280.     If    D[55] ^ S[23] = 1
  1281.  
  1282.              55   47           23         0
  1283.             +----+------------+------------+
  1284.     then    |<---|<-----------|<-----------| <- C + S -> D
  1285.             +----+------------+------------+
  1286.                 Destination Accumulator D
  1287.  
  1288.              55   47           23         0
  1289.             +----+------------+------------+
  1290.     else    |<---|<-----------|<-----------| <- C - S -> D
  1291.             +----+------------+------------+
  1292.                 Destination Accumulator D
  1293.  
  1294.     where ^ denotes the logical exclusive OR operator
  1295.  
  1296. Assembler Syntax:
  1297.     DIV    S,D
  1298.  
  1299. Description:
  1300.     Divide the destination operand D by the source operand S and store
  1301. the result in the destination accumulator D. The 48-bit dividend must
  1302. be a positive fraction which has been sign extended to 56-bits and is
  1303. stored in the full 56-bit destination accumulator D. The 24-bit divisor
  1304. is a signed fraction and is stored in the source operand S. Each DIV
  1305. iteration calculates one quotient bit using a nonrestoring fractional
  1306. division algorithm (see description). After the execution of the first
  1307. DIV instruction, the destination operand holds both the partial
  1308. remainder and the formed quotient. The partial remainder occupies the
  1309. high-order portion of the destination accumulator D and is a signed
  1310. fraction. The formed quotient occupies the low-oreder portion of the
  1311. destinatioin accumulator D ({A0} or {B0}) and is a positive fraction. One
  1312. bit of the formed quotient is shifted into the LS bit of the
  1313. destination accumulator at the start of each  DIV iteration. The
  1314. formed quotientis the true quotient if the true quotient is positive.
  1315. If the true quotient is negative, the formed quotient must be negated.
  1316. Valid result are obtained only when |D| < |S| and the operands are
  1317. interpreted as fractions. Note that this condition ensures that the
  1318. magnitude of the quotient is less than one (i.e., is fractional) and
  1319. precludes division by zero.
  1320.  
  1321.     The DIV instruction calculates one quotient bit based on the divisor
  1322. and the previous partial remainder. To produce an N-bit quotient, the
  1323. DIV instruction is executed N times where N is the number of bits of
  1324. precision desired in the quotient, 1 <= N <= 24. Thus, for a
  1325. full-precision (24-bit) quotient, 24 DIV iterations are required. In
  1326. general, executing the DIV instruction N times produces an N-bit
  1327. quotient and a 48-bit remainder which has (48-N) bits of precision
  1328. and whose N MS bits are zeros. The partial remainder is not a true
  1329. remainder and must be corrected due to the nonrestoring nature of the
  1330. division algorithm before it may be used. Therefore, once the divide
  1331. is complete, it is necessary to reverse the last DIV operation and
  1332. restore the remainder to obtain the true remainder.
  1333.  
  1334.     The DIV instruction uses a nonrestoring fractional division algorithm
  1335. which consists of the following operations (see the previous Operation
  1336. diagram):
  1337.  
  1338. 1.    Compare the source and destination operand sign bits: An exclusive
  1339.     OR operation is performed on bit 55 of the destination operand D and
  1340.     bit 23 of the source operand S;
  1341.  
  1342. 2.    Shift the partial remainder and the quotient: The 55-bit
  1343.     destination accumulator D is shifted one bit to the left. The carry
  1344.     bit C is moved into the LS bit (bit 0) of the accumulator;
  1345.  
  1346. 3.    Calculate the next quotient bit and the new partial remainder:
  1347.     The 24-bit source operand S (signed divisor) is either added to or
  1348.     subtracted from the MSP portion of the destination accumulator
  1349.     (A1 or B1), and the result is stored back into the MSP portion of
  1350.     that destination accumulator. If the result of the exclusive OR
  1351.     operation was a '1' (i.e., the sign bits were different), the
  1352.     source operand S is added to the accumulator. If the result of the
  1353.     exclusive OR operation was a '0' (i.e., the sign bits were the
  1354.     same), the source operand S is subtracted from the accumulator. Due
  1355.     to the automatic sign extension of the 24-bit sign extension of
  1356.     the 24-bit signed divisor, the addition or subtraction operation
  1357.     correctly sets the carry bit C of the condition code register with
  1358.     the next quotient bit.
  1359.  
  1360. Example:
  1361.     (4-Quadrant division, 24-bit signed quotient, 48-bit signed remainder)
  1362.     ABS A    A,B                ;make dividend positive, copy A1 to B1
  1363.     EOR    X0,B    B,X:$0        ;save rem. sign in X:$0, quo. sign in N
  1364.     AND    #$FE,CCR            ;clear carry bit C (quotient sign bit)
  1365.     REP    #$18                ;form a 24-bit quotient
  1366.     DIV    X0,A                ;form quotient in A0, remainder in A1
  1367.     TFR    A,B                    ;save quotient and remainder in B1,B0
  1368.     JPL    SAVEQUO                ;go to SAVEQUO if quotient is positive
  1369.     NEG    B                    ;complement quotient if N bit set
  1370. SAVEQUO:
  1371.     TFR    X0,B    B0,X1        ;save quo. in X1, get signed divisor
  1372.     ABS    B                    ;get absolute value of signed divisor
  1373.     ADD    A,B                    ;restore remainder in B1
  1374.     JCLR    #23,X:$0,DONE    ;go to DONE if remainder is positive
  1375.     MOVE    #$0,B0            ;clear LS 24 bits of B
  1376.     NEG    B                    ;complement remainder if negative
  1377. DONE:
  1378.  
  1379.     Before Execution:
  1380.         A  = $00:0E66D7:F2832C
  1381.         X0 = $123456
  1382.         X1 = $000000
  1383.         B  = $00:000000:000000
  1384.  
  1385.     After Execution:
  1386.         A  = $FF:EDCCAA:654321
  1387.         X0 = $123456
  1388.         X1 = $654321
  1389.         B  = $00:000100:654321
  1390.  
  1391. Explanation of Example:
  1392.     Prior to execution, 56-bit {A} accumulator contains the 56-bit,
  1393. signed-extended fractional dividend D (D=$00:0E66D7:F2832C =
  1394. 0.112513535894635 approx.) and the 24-bit X0 register contains the
  1395. 24-bit, signed fractional divisor S (S = $123456 = 0.142222166061401).
  1396. Since |D|<|S|, the execution of the previous divide routine stores the
  1397. correct 24-bit signed quotient in the 24-bit {X1} register (A/X0 =
  1398. 0.79111111164093 = $654321 = X1). The partial remainder is restored by
  1399. reversing the last DIV operation and adding back the absolute value of
  1400. the signed divisor i {X0} remained in the 24-bit {B1} register. Note that
  1401. the remainder is really a 48-bit value which has 24 bits of precision.
  1402. Thus, the correct 48-bit remainder is $000000:000100 which equals
  1403. 0.0000000000018190 approximately.
  1404.  
  1405.     Note that the divide routine used in the previous example assumes that
  1406. the sign-extended 56-bit signed fractional dividend is stored in the A
  1407. accumulator and that the 24-bit signed fractional dividend is stored in
  1408. the X0 register. This routine produces a ful 24-bit signed quotinet
  1409. and a 48-bit signed remainder.
  1410.  
  1411.     This routine may be greatly simplified for the case in which only
  1412. positive, fractional operands are used to produce a 24-bit positive
  1413. quotient and a 48-bit positive remainder, as shown in the following
  1414. example:
  1415.  
  1416.     1-Quadrant division, 24-bit unsigned quotient, 48-bit unsigned
  1417.     remainder
  1418.  
  1419.     AND    #$FE,CCR    ;clear carry bit C (quotient sign bit)
  1420.     REP    #$18        ;form a 24-bit quotint and remainder
  1421.     DIV    X0,A        ;form quotient in A0, remainder in A1
  1422.     ADD    X0,A        ;restore remainder in A1
  1423.  
  1424.     Note that this routine assumes that the 56-bit positive, fractional,
  1425. sign-extended dividend is stored in the A accumulator and that the
  1426. 24-bit positive, fractional divisor is stored in the X0 register. After
  1427. execution, the 24-bit positive fractional quotient is stored in the A0
  1428. register; the LS 24 bits of the 48-bit positive fractional remainder
  1429. are stored in the A1 register.
  1430.  
  1431.     There are many variations possible when choosing a suitable division
  1432. routine for a given application. The selection of a suitable division
  1433. routine normally involves specification of the following items:
  1434.     1)    the number of bits precision in the dividend;
  1435.     2)    the number of bits of precision N in quotient;
  1436.     3)    whether the value of N is fixed or is variable;
  1437.     4)    whether the operands are unsigned or signed;
  1438.     5)    whether or not the remainder is to be calculated.
  1439.  
  1440.     For extended precision division (i.e., for N-bit quotients where N>24),
  1441. the DIV instruction is no longer applicable, and a user-defined N-bit
  1442. division routine is required.
  1443.  
  1444. Condition codes:
  1445.  
  1446.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  1447.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  1448.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  1449.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  1450.     |<-           {MR}         ->|<-       {CCR}      ->|
  1451.  
  1452.     {L}- Set if overflow bit V is set
  1453.     {V}- Set if the MS bit of the destination operand is changed as a result
  1454.        of the instruction's left shift operation
  1455.     {C}- Set if bit 55 of the result is cleared
  1456.  
  1457. Instruction Format:
  1458.     DIV    S,D
  1459.  
  1460.     S = ({X0},{Y0},{X1},{Y1})
  1461.     D = ({A},{B})
  1462.  
  1463. Timing:        2 oscillator clock cycles
  1464.  
  1465. Memory:        1 program word
  1466.  
  1467.  
  1468. {DO}                        Start Hardware Loop
  1469.  
  1470. Operation:                                Assembler Syntax:
  1471.     SP+1->SP;LA->SSH;LC->SSL;X:ea->LC        DO    X:ea,expr
  1472.     SP+1->SP;PC->SSH;SR->SSL;expr-1->LA
  1473.     1->LF
  1474.  
  1475.     SP+1->SP;LA->SSH;LC->SSL;X:aa->LC        DO    X:aa,expr
  1476.     SP+1->SP;PC->SSH;SR->SSL;expr-1->LA
  1477.     1->LF
  1478.  
  1479.     SP+1->SP;LA->SSH;LC->SSL;Y:ea->LC        DO    Y:ea,expr
  1480.     SP+1->SP;PC->SSH;SR->SSL;expr-1->LA
  1481.     1->LF
  1482.  
  1483.     SP+1->SP;LA->SSH;LC->SSL;Y:aa->LC        DO    Y:aa,expr
  1484.     SP+1->SP;PC->SSH;SR->SSL;expr-1->LA
  1485.     1->LF
  1486.  
  1487.     SP+1->SP;LA->SSH;LC->SSL;#xxx->LC        DO    #xxx,expr
  1488.     SP+1->SP;PC->SSH;SR->SSL;expr-1->LA
  1489.     1->LF
  1490.  
  1491.     SP+1->SP;LA->SSH;LC->SSL;S->LC            DO    S,expr
  1492.     SP+1->SP;PC->SSH;SR->SSL;expr-1->LA
  1493.     1->LF
  1494.  
  1495.     End of Loop:
  1496.     SSL(LF)->SR;SP-1->SP
  1497.     SSH->LA;SSL->LC;SP-1->SP
  1498.  
  1499. Description:
  1500.     Begin a hardware Do loop that is to be repeated the number of times
  1501. specified in the instruction's source operand and whose range of
  1502. execution is terminated by the destination operand (previously shown as
  1503. "expr"). No overhead other than the execution of this DO instruction
  1504. is required to set up this loop. DO loops can be nested and the loop
  1505. count can be passed as a parameter.
  1506.  
  1507.     During the first instruction cycle, the current contents of the loop
  1508. address ({LA}) and the loop counter ({LC}) registers are pushed onto the
  1509. system stack. The DO instruction's source operand is then loaded into
  1510. the loop counter ({LC}) register. The {LC} register countains the remaining
  1511. number of times the DO loop will be executed and can be accessed from
  1512. inside the DO loop subject to certain restrictions. If {LC} equals zero,
  1513. the DO loop is executed 65536 times. All address register indirect
  1514. addressing modes may be used to generate the effective address of the
  1515. source operand. If immediate short data is specified, the 12 LS bits of
  1516. {LC} are loaded with the 12-bit immediate value, and the four MS bits of
  1517. {LC} are cleared.
  1518.  
  1519.     During the second instruction cycle, the current contents of the
  1520. program counter ({PC}) register and the status register ({SR}) are pushed
  1521. onto the system stack. The stacking of the {LA}, {LC}, {PC}, and {SR} registers
  1522. is the mechanisme which permits the nesting of DO loops. The DO
  1523. instruction's destination operand (shown as "expr") is then loaded into
  1524. the loop address ({LA}) register. The value in the program counter ({PC})
  1525. register pushed onto the system stack is the address of the first
  1526. instruction following the DO instruction (i.e., the first actual
  1527. instruction in the DO loop). This value is read (i.e., copied but not
  1528. pulled) fromthe top of the system stackto return to the top of the loop
  1529. for another pass through the loop.
  1530.  
  1531.     During the third instruction cycle, the loop flag ({LF}) is set. This
  1532. results in the {PC} being reapeatedly compared with {LA} to determine if
  1533. the last instruction in the loop has been fetched and the loop counter
  1534. ({LC}) is tested. If {LC} not equal to one, it is decremented by one and
  1535. {SSH} is loaded into the {PC} to fetch the first instruction in the loop
  1536. again. If {LC} equals one, the "end-of-loop" processing begins.
  1537.  
  1538.     When executing a DO loop, the instructions are actually fetched each
  1539. time through the loop. Therefore, a DO loop can be interrupted. DO
  1540. loops can also be nested. When DO loops ar nested, the end-of-loop
  1541. addresses must also be nested and are not allowed to be equal. The
  1542. assembler generates an error message when DO loops are improperly
  1543. nested. Nested DO loops are illustratedin the example.
  1544.  
  1545. NOTE: The assembler calculates the end-of-loop address to be loaded
  1546. into LA (the absolute address extension word) by evaluating the
  1547. end-of-loop expression "expr" and subtracting one. This is done to
  1548. accommodate the case where the last word in the DO loop is a two word
  1549. instruction. Thus, the end-of-loop expression "expr" in the source code
  1550. must represent the address of the instruction AFTER the last
  1551. instruction in the loop as shown in example.
  1552.  
  1553.     During the "end-of-loop" processing, the loop flag ({LF}) from the lower
  1554. position ({SSL}) of {SP} is written into the status the status register
  1555. ({SR}), the contents of the loop address ({LA}) are restored from the upper
  1556. portion ({SSH}) of ({SP}-1), the contents of the loop counter ({LC}) register
  1557. are restored from the lower portion ({SSL}) of ({SP}-1) and the stack
  1558. pointer ({SP}) is decremented by two. Instruction fetches now continue at
  1559. the address of the instruction following the last instruction in the DO
  1560. loop. Note that {LF} is the only bit in the {SR} that is restored after a
  1561. hardware DO loop has been exited.
  1562.  
  1563. NOTE: The {LF} is cleared by a hardware reset.
  1564.  
  1565. Restrictions:
  1566.     The "end-of-loop" comparison previously described actually occurs
  1567. at instruction fetch time. That is, {LA} is being compared with PC when
  1568. the instruction at {LA}-2 is being executed. Therefore, instructions
  1569. which acceses the program controller register and/or change program
  1570. flow canot be used in locations {LA}-2, {LA}-1, or {LA}.
  1571.  
  1572.     Proper DO loop operation is not guaranteed if an instruction starting
  1573. at address {LA}-2, {LA}-1, or {LA} specifies one of the program controller
  1574. registers {SR}, {SP}, {SSL}, {LA}, {LC}, or (implicitly) {PC} as a destination
  1575. register. Similary, the {SSH} program controller register may not be
  1576. specified as a source or destination register in an instruction
  1577. starting at address {LA}-2,{LA}-1, or {LA}. Additionally, the {SSH} register
  1578. cannot be specified as a source register in the DO instruction itself
  1579. and {LA} cannot be used as a target for jumps to subroutine (i.e., {JSR}
  1580. {JScc}, {JSSET}, or {JSCLR} to {LA}). A DO instruction cannot be repeated using
  1581. the {REP} instruction.
  1582.  
  1583.     The following instructions cannot begin at the indicated position(s)
  1584. near the end of a DO loop:
  1585.  
  1586. At LA-2, LA-1, and LA
  1587.     DO
  1588.     MOVEC from SSH
  1589.     MOVEM from SSH
  1590.     MOVEP from SSH
  1591.     MOVEC to LA, LC, SR, SP, SSH, or SSL
  1592.     MOVEM to LA, LC, SR, SP, SSH, or SSL
  1593.     MOVEP to LA, LC, SR, SP, SSH, or SSL
  1594.     ANDI MR
  1595.     ORI MR
  1596.     Two word instructions which read LC, SP, or SSL
  1597.  
  1598. At LA-1
  1599.     Single-word instructions (except {REP}) which read {LC}, {SP}, or {SSL},
  1600.     {JCLR}, {JSET}, two-word {JMP}, two word {Jcc}.
  1601.  
  1602. At LA
  1603.     any two-word instruction
  1604.     Jcc                REP
  1605.     JCLR            RESET
  1606.     JSET            RTI
  1607.     JMP                RTS
  1608.     JScc            STOP
  1609.     JSR                WAIT
  1610.  
  1611. Other Restrictions:
  1612.     DO    SSH,xxxx
  1613.     JSR to (LA) whenever the loop flag (LF) is set
  1614.     JScc to (LA) whenever the loop flag (LF) is set
  1615.     JSCLR to (LA) whenever the loop flag (LF) is set
  1616.     JSSET to (LA) whenever the loop flag (LF) is set
  1617.  
  1618.     A DO instruction cannot be repeated using the REP instruction.
  1619.  
  1620. NOTE: Due to pipelining, if an address register (Rn,Nn, or Mn) is
  1621. changed using a move-type instruction (LUA, Tcc, MOVE, MOVEC, MOVEM,
  1622. MOVEP, or parallel move), the new contents of the destination address
  1623. register will not be available for use during the folowing instruction
  1624. (i.e., there is a single instruction cycle pipeline delay). This
  1625. restriction also applies tothe situation in which the lat instruction
  1626. in a DO loop changes an address register and the first instruction at
  1627. the top of the DO loop uses that same address register. The top
  1628. instruction becomes the following instruction because of the loop
  1629. construct.
  1630.  
  1631.     Similary, since the DO instruction accesses the program controller
  1632. registers, the DO instrcuction must not be immediately preceded byany
  1633. of the following instructions:
  1634.  
  1635. Immediately before DO:
  1636.     MOVEC to LA, LC, SSH, SSL, or SP
  1637.     MOVEM to LA, LC, SSH, SSL, or SP
  1638.     MOVEP to LA, LC, SSH, SSL, or SP
  1639.     MOVEC from SSH
  1640.     MOVEM from SSH
  1641.     MOVEP from SSH
  1642.  
  1643. Example:
  1644.         DO    #cnt1,END1        ;begin outer DO loop
  1645.          :
  1646.         DO    #cnt2,END2        ;begin inner DO loop
  1647.          :
  1648.          :
  1649.         MOVE    A,X:(R0)+    ;last instruction in inner loop
  1650.          :                    ;(in outer loop)
  1651.     END2:                    ;last instruction in outer loop
  1652.         ADD    A,B    X:(R1)+,X0    ;first instruction after outer loop
  1653.     END1:
  1654.  
  1655. Explanation of Example:
  1656.     This example illustrates a nested DO loop. The outer DO loop will
  1657. be executed "cnt1" times while the inner DO loop wile be executed
  1658. ("cnt1" * "cnt2") times. Note that the labels END1 and END2 are located
  1659. at the first instruction past the end of the DO loop, as mentioned
  1660. above, and are nested properly.
  1661.  
  1662. Condition Codes:
  1663.  
  1664.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  1665.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  1666.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  1667.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  1668.     |<-           {MR}         ->|<-       {CCR}      ->|
  1669.  
  1670.     {LF}- Set when a DO loop is in progress
  1671.     {L} - Set if data limiting occurred
  1672.  
  1673. Instruction Format:
  1674.     DO    X:ea,expr
  1675.     DO    Y:ea,expr
  1676.     DO    X:aa,expr
  1677.     DO    Y:aa,expr
  1678.     DO    #xxx,expr
  1679.     DO    S,expr
  1680.  
  1681.     expr = 16-bit Absolute Adress
  1682.  
  1683.     ea = (Rn)-Nn
  1684.          (Rn)+Nn
  1685.          (Rn)-
  1686.          (Rn)+
  1687.          (Rn)
  1688.          (Rn+Nn)
  1689.          -(Rn)
  1690.  
  1691.     aa = 6-bit Absolute Short Address
  1692.  
  1693.     #xxx = 12-bit Immediate Short Data
  1694.  
  1695.     S = (X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B
  1696.          SR,OMR,SP,SSL,LA,LC,Rn,Nn,Mn)
  1697.  
  1698. NOTE 1:
  1699. Implementation Notes:
  1700.  
  1701.     For DO SP,expr    The actual value that will be load into the loop
  1702. counter (LC) is the value of the stack pointer (SP) before the
  1703. execution of the DO instruction, incremented by 1.
  1704.  
  1705.     Thus, if SP=3, the execution of the DO SP,expr instruction will
  1706. load the loop counter (LC) with the value LC = 4.
  1707.  
  1708.     For DO SSL,expr    The LC will be loaded with the previous value wich
  1709. was saved on the stack by the DO instruction itself.
  1710.  
  1711. NOTE 2: If A or B is specified as a source operand, the accumulator
  1712. value is optionally shifted according to the scaling mode bits in the
  1713. status register. If the data out of the shifter indicates that the
  1714. accumulator extension is in use, the 24-bit data is limited to a
  1715. maximum positive or negative saturation constant. The shifted and
  1716. limited value is loaded into LC, although A or B remain unchanged.
  1717.  
  1718. Timing:        6 + mv oscillator clock cycles
  1719.  
  1720. Memory:        2 program words
  1721.  
  1722.  
  1723. {ENDDO}                    End Current DO Loop
  1724.  
  1725. Operation:
  1726.     SSL(LF)->SR;SP-1->SP
  1727.     SSH->LA;SSL->LC;SP-1->SP
  1728.  
  1729. Assembler Syntax:
  1730.     ENDDO
  1731.  
  1732. Description:
  1733.     Terminate the current hardware loop before the current loop
  1734. counter (LC) equals one. If the value of the current DO loop counter
  1735. (LC) is needed, it must be read before the execution of the ENDDO
  1736. instruction. Initially, the loop flag (LF) is restored from the system
  1737. stack and the remaining portion of the status register (SR) and the
  1738. Program counter are purged from the system stack. The LA and the LC
  1739. registers are then restored from the system stack.
  1740.  
  1741. Restrictions:
  1742.     Due to pipelining and the fact that the ENDDO instruction accesses
  1743. the program controller registers, the ENDDO instruction must not be
  1744. immediately preceded by any of the following instructions:
  1745.  
  1746. Immediately before ENDDO
  1747.     MOVEC to LA, LC, SR, SSH, SSL, or SP
  1748.     MOVEM to LA, LC, SR, SSH, SSL, or SP
  1749.     MOVEP to LA, LC, SR, SSH, SSL, or SP
  1750.     MOVEC from SSH
  1751.     MOVEM from SSH
  1752.     MOVEP from SSH
  1753.     ORI MR
  1754.     ANDI MR
  1755.  
  1756.     Also, the ENDDO instruction cannot be the next to last(LA-1) or last
  1757. (LA) instruction in a DO loop.
  1758.  
  1759. Example:
  1760.         DO    Y0,NEXT                ;exec. loop ending at NEXT (Y0) times
  1761.          :
  1762.         MOVEC    LC,A            ;get current value of loop counter
  1763.         CMP        Y1,A            ;compare LC with value in Y1
  1764.         JNE        ONWARD            ;go to ONWARD ifLC not equal to Y1
  1765.         ENDDO                    ;LC equals to Y1, restore all DO registers
  1766.         JMP        NEXT            ;go to NEXT
  1767.     ONWARD:                        ;LC not equal to Y1, continue DO loop
  1768.          :                        ;(last instruction in DO loop)
  1769.     NEXT:
  1770.         MOVE    #$123456,X1        ;(first instruction AFTER DO loop)
  1771.  
  1772. Explanation of Example:
  1773.     This example illustrate the use of the ENDDO instruction to
  1774. terminate the current DO loop. The value of the loop counter is
  1775. compared with the value in the Y1 register to determine if execution
  1776. of the DO loop should continue. Note that the ENDDO instruction
  1777. updates certain program controller registers but does not automatically
  1778. jump past the end of the DO loop. Thus, if this action is desired, a
  1779. JMP instruction (i.e., JMP NEXT as previously shown) must be included
  1780. after the ENDDO instruction to transfer program control to the first
  1781. instruction past the end of the DO loop.
  1782.  
  1783. Condition Codes:
  1784.     The condition codes are not affected by this instruction.
  1785.  
  1786. Instruction Format:
  1787.     ENDDO
  1788.  
  1789. Timing:        2 oscillator clock cycles
  1790.  
  1791. Memory:        1 program word
  1792.  
  1793.  
  1794. {EOR}                        Logical Exclusif OR
  1795.  
  1796. Operation:
  1797.     S ^ D[47:24]->D[47:24]    (parallel move)
  1798.     where ^ denotes the logical exclusive OR operator
  1799.  
  1800. Assembler Syntax:
  1801.     EOR    S,D                (parallel move)
  1802.  
  1803. Description:
  1804.     Logically exclusive OR the source operand S with bits 47-24 of the
  1805. destination operand D and store the result in bits 47-24 of the
  1806. destination accumulator. This instruction is 24-bit operation. The
  1807. remaining bits of the destination operand D are not affected.
  1808.  
  1809. Example:
  1810.     EOR    Y1,B    (R2)+        ;Exclusive OR Y1 with B1, update R2
  1811.  
  1812.     Before Execution:
  1813.         Y1 = $000003
  1814.         B  = $00:000005:000000
  1815.  
  1816.     After Execution:
  1817.         Y1 = $000003
  1818.         B  = $00:000006:000000
  1819.  
  1820. Explanation of Example:
  1821.     Prior to execution, the 24-bit Y1 register contains the value
  1822. $000003, and the 56-bit B accumulator contains the value
  1823. $00:000005:000000. The EOR Y1,B instruction logically exclusive ORs
  1824. the 24-bit value in the Y1 register with bits 47-24 of the B
  1825. accumulator (B1) and stores the result in the B accumulator with bits
  1826. 55-48 and 23-0 unchanged.
  1827.  
  1828. Condition Codes:
  1829.  
  1830.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  1831.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  1832.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  1833.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  1834.     |<-           {MR}         ->|<-       {CCR}      ->|
  1835.  
  1836.     {L}- Set if data limiting has occured during parallel move
  1837.     {N}- Set if bit 47 of A or B result is set
  1838.     {Z}- Set if bits 47-24 of A or B result are zero
  1839.     {V}- Always cleared
  1840.  
  1841. Instruction Format:
  1842.     EOR    S,D
  1843.  
  1844.     S = (X0,X1,Y0,Y1)
  1845.     D = (A,B)
  1846.  
  1847. Timing:        2 + mv oscillator
  1848.  
  1849. Memory:        1 + mv program words
  1850.  
  1851.  
  1852. {ILLEGAL}                    Illegal Instruction Interrupt
  1853.  
  1854. Operation:
  1855.     Begin Illegal Instruction exception processing
  1856.  
  1857. Assembler Syntax:
  1858.     ILLEGAL
  1859.  
  1860. Description:
  1861.     The {ILLEGAL} instruction is executed as if it were a NOP
  1862. instruction. Normal instruction execution is suspend and illegal
  1863. instruction exception processing is initiated. The interrupt vector
  1864. address is located at address P:$3E. The interrupt priority level
  1865. (I1,I0) is set to 3 in the status register if a long interrupt
  1866. service routine is used. The pupose of the ILLEGAL instruction is
  1867. to force the DSP into an illegal instruction exception for test
  1868. purposes. If a fast interrupt is used with the ILLEGAL instruction,
  1869. an infinite loop will be formed (an illegal instruction interupt
  1870. normally returns to the illegal instruction) which can only be broke
  1871. by a hardware reset. Therefore, only long interrupts should be used.
  1872. Exiting an illegal instruction is a fatal error. The long exception
  1873. routine should indicate this condition and cause the system to be
  1874. restarted.
  1875.  
  1876.     If the ILLEGAL instruction is in a DO loop at LA and the instruction
  1877. at LA-1 is being interrupted, then LC will be decremented twice due to
  1878. the same mechanism that causes LC to be decremented twice if {JSR}, {REP},
  1879. etc. at {LA} are restricted. Clearly restriction cannot be imposed on
  1880. illegal instructions.
  1881.  
  1882.     Since {REP} is uninterruptable, repeating an ILLEGAL instruction results
  1883. in interrupt not being initiated until after completion of the REP.
  1884. After servicing the interrupt, program control will return to the
  1885. address of the second word following the ILLEGAL instruction. Of
  1886. course, the ILLEGAL interrupt service routine should obort further
  1887. processing, and the processor should be reinitialized.
  1888.  
  1889. Example:
  1890.     ILLEGAL            ;begin ILLEGAL exception processing
  1891.  
  1892. Explanation of Example:
  1893.     The ILLEGAL instruction suspends normal instruction execution and
  1894. initiates ILLEGAL exception processing.
  1895.  
  1896. Condition Codes:
  1897.     The condition codes are not affected by this instruction.
  1898.  
  1899. Timing:        8 oscillator clock cycles
  1900.  
  1901. Memory:        1 program word
  1902.  
  1903.  
  1904. {Jcc}                        Jump Conditionally{êJCC}{êJCS}{êJEC}{êJEQ}{êJES}{êJGE}{êJGT}{êJLC}{êJLE}{êJLS}{êJLT}{êJMI}{êJNE}{êJNR}{êJPL}{êJNN}
  1905.  
  1906. Operation:                        Assembler Syntax:
  1907.     If cc, then 0xxx -> PC            Jcc    xxx
  1908.     else PC+1 -> PC
  1909.  
  1910.     If cc, then ea -> PC            Jcc ea
  1911.     else PC+1 -> PC
  1912.  
  1913. Description:
  1914.     Jump to the location in program memory given by the instruction's
  1915. effective address if the specified if the specified condition is true.
  1916. If the specified condition is false, the program counter (PC) is
  1917. incremented and the effective address is ignored. However, the address
  1918. register specified in the effective address field is always updated
  1919. independently of the specified condition. All memory alterable
  1920. addressing modes may be used for effective address. A fast Short Jump
  1921. addressing mode may also be used. The 12-bit data is zero extended
  1922. toform the effectiveaddress. The term "cc" may specify the following
  1923. conditions:
  1924.  
  1925.     "cc" Mnemonic                                Condition
  1926.     CC (HS) - carry clear (higher or same)        C = 0
  1927.     CS (LO) - carry set (lower)                    C = 1
  1928.     EC        - extension clear                    E = 0
  1929.     EQ        - equal                                Z = 1
  1930.     ES        - extension set                        E = 1
  1931.     GE        - greater than or equal                N^V = 0
  1932.     GT        - greater than                        Z+(N^V) = 0
  1933.     LC        - limit clear                        L = 0
  1934.     LE        - less than or equal                Z+(N^V) = 1
  1935.     LS        - limit set                            L = 1
  1936.     LT        - less than                            N^V = 1
  1937.     MI        - minus                                N = 1
  1938.     NE        - not equal                            Z = 0
  1939.     NR        - normalized                        Z+(~U & ~E) = 1
  1940.     PL        - plus                                N = 0
  1941.     NN        - not normalized                    Z+(~U & ~E) = 0
  1942.  
  1943.     where
  1944.     ~ denote the logical complement,
  1945.     + denotes the logical OR operator,
  1946.     & denotes the logical AND operator, and
  1947.     ^ denotes the logical Exclusive OR operator.
  1948.  
  1949. Restrictions:
  1950.     A Jcc instruction used within a {DO} loop cannot begin at the address
  1951. {LA} within that {DO} loop.
  1952.  
  1953.     A Jcc instruction cannot be repeated using the {REP} instruction.
  1954.  
  1955. Example:
  1956.     JNN    -(R4)        ;jump to P:(R4)-1 if not normalized
  1957.  
  1958. Explanation of Example:
  1959.     In this example, program execution is transferred to the address
  1960. P:(R4)-1 if the result is not normalized. Note that the contents of
  1961. address register R4 are predecremented by 1, and the resulting address
  1962. is then loaded into the program counter if the specified condition is
  1963. true. If the specified condition is not true, no jump is taken, and the
  1964. program counter is incremented by one.
  1965.  
  1966. Condition Codes:
  1967.     The condition codes are not affected by this instruction.
  1968.  
  1969. Instruction Format:
  1970.     Jcc    xxx
  1971.     Jcc    ea
  1972.  
  1973.     xxx = 12-bit Short Jump Adress
  1974.  
  1975.     ea = (Rn)-Nn
  1976.          (Rn)+Nn
  1977.          (Rn)-
  1978.          (Rn)+
  1979.          (Rn)
  1980.          (Rn+Nn)
  1981.          -(Rn)
  1982.          Absolute address
  1983.  
  1984. Timing:        4 + jx oscillator clock cycles
  1985.  
  1986. Memory:        1 + ea program words
  1987.  
  1988.  
  1989. {JCLR}                        Jump if Bit Clear
  1990.  
  1991. Operation:
  1992.     If S[n] = 0, then xxxx -> PC
  1993.     else PC+1 -> PC
  1994.  
  1995. Assembler Syntax:
  1996.     JCLR    #n,X:ea,xxxx
  1997.     JCLR    #n,X:aa,xxxx
  1998.     JCLR    #n,X:pp,xxxx
  1999.     JCLR    #n,Y:ea,xxxx
  2000.     JCLR    #n,Y:aa,xxxx
  2001.     JCLR    #n,Y:pp,xxxx
  2002.     JCLR    #n,S,xxxx
  2003.  
  2004. Description:
  2005.     Jump to the 16-bit absolute address in program memory specified in
  2006. the instruction's 24-bit extension word if the nth bit of the source
  2007. operand S is clear. The bit tested is selected by an immediate bit
  2008. number from 0-23. If the specified memory bit is not clear, the program
  2009. counter is incremented and the absolute address in the extension word
  2010. is ignored. However, the address register specified in the effective
  2011. address field is always updated independently ofthe state of the nth
  2012. bit. All address register indirect addressing modes may be used to
  2013. reference the source operand S. Absolute Short and I/O Short addressing
  2014. modes may also be used.
  2015.  
  2016. Restrictions:
  2017.     A JCLR instruction cannot be repeated using the {REP} instruction.
  2018.  
  2019.     A JCLR located at {LA}, LA-1, or LA-2 of the {DO} loop cannot specify the
  2020. program controller registers SR, SP, SSH, SSL, LA, or LC as its target.
  2021.  
  2022.     JCLR SSH or JCLR SSL cannot follow an instruction that changes the {SP}.
  2023.  
  2024. Example:
  2025.     JCLR    #$5,X:<<$FFF1,$1234    ;go to P:$1234 if bit 5 in SCI SSR is clear
  2026.  
  2027. Explanation of Example:
  2028.     In this example, program execution is transferred to the address
  2029. P:$1234 if bit 5 (PE) of the 8-bit read-only X memory location X:$FFF1
  2030. (I/O SCI interface status register) is a zero. If the specified bit
  2031. is not clear, no jump is taken, and the PC is incremented by one.
  2032.  
  2033. Condition Codes:
  2034.     The condition codes are not affected by this instruction.
  2035.  
  2036. Instruction Format:
  2037.     JCLR    #n,X:ea,xxxx
  2038.     JCLR    #n,Y:ea,xxxx
  2039.     JCLR    #n,X:aa,xxxx
  2040.     JCLR    #n,Y:aa,xxxx
  2041.     JCLR    #n,X:pp,xxxx
  2042.     JCLR    #n,Y:pp,xxxx
  2043.     JCLR    #n,S,xxxx
  2044.  
  2045.     #n = bit number
  2046.  
  2047.     ea = (Rn)-Nn
  2048.          (Rn)+Nn
  2049.          (Rn)-
  2050.          (Rn)+
  2051.          (Rn)
  2052.          (Rn+Nn)
  2053.          -(Rn)
  2054.  
  2055.     aa = 6-bit Absolute Short Address
  2056.  
  2057.     pp = 6-bit I/O Short Address
  2058.  
  2059.     S  = (    X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,
  2060.             Rn,Nn,Mn,SR,OMR,SP,SSH,SSL,LA,LC)
  2061.  
  2062. Timing:        6 + jx oscillator
  2063.  
  2064. Memory:        2 program words
  2065.  
  2066.  
  2067. {JMP}                        Jump
  2068.  
  2069. Operation:                Assembler Syntax:
  2070.     0xxx -> PC                JMP    xxx
  2071.     ea -> PC                JMP ea
  2072.  
  2073. Description:
  2074.     Jump to the location in program memory given by the instruction's
  2075. effective address. All memory alterable addressing modes may be used
  2076. for effective address. A Fast Short Jump addressing modes may also be
  2077. used. The 12-bit data is zero extended to form the efective address.
  2078.  
  2079. Restriction:
  2080.     A JMP instruction used within a DO loop cannot begin at the Address
  2081. LA within that DO loop.
  2082.  
  2083.     A JMP instruction cannot be repeated using the REP instruction.
  2084.  
  2085. Example:
  2086.     JMP    (R1 + N1)    ;jump to program address P:(R1 + N1)
  2087.  
  2088. Explanation of Example:
  2089.     In this example, program execution is transferred to theprogram
  2090. address P:(R1 + N1).
  2091.  
  2092. Condition Codes:
  2093.     The condition codes are not affected by this instruction.
  2094.  
  2095. Instruction Format:
  2096.     JMP    xxx
  2097.     JMP    ea
  2098.  
  2099.     xxx = 12-bit Short Jump Address
  2100.  
  2101.     ea = (Rn)-Nn
  2102.          (Rn)+Nn
  2103.          (Rn)-
  2104.          (Rn)+
  2105.          (Rn)
  2106.          (Rn+Nn)
  2107.          -(Rn)
  2108.          Absolute address
  2109.  
  2110. Timing:        4 + jx oscillator clock cycles
  2111.  
  2112. Memory:        1 + ea program words
  2113.  
  2114.  
  2115. {JScc}                        Jump to Subroutine Conditionally{êJSCC}{êJSCS}{êJSEC}{êJSEQ}{êJSES}{êJSGE}{êJSGT}{êJSLC}{êJSLE}{êJSLS}{êJSLT}{êJSMI}{êJSNE}{êJSNR}{êJSPL}{êJSNN}
  2116.  
  2117. Operation:                                            Assembler Syntax:
  2118.     If cc, then SP+1->SP;PC->SSH;SR->SSL;0xxx->PC        JScc    xxx
  2119.         else PC+1->PC
  2120.  
  2121.     If cc, then SP+1->SP;PC->SSH;SR->SSL;ea->PC            JScc    ea
  2122.         else PC+1->PC
  2123.  
  2124. Description:
  2125.     Jump to subroutine whose location in program memory is given by
  2126. the instruction's effective address if the specified condition is true.
  2127. If the specified condition is true, the address of the instruction
  2128. immediately following the JScc instruction (PC) and SR are pushed onto
  2129. the system stack. Program execution then continues at the specified
  2130. effective address in program memory. If the specified condition is
  2131. false, the PC is incremented, and any extension word is ignored.
  2132. However, the address register specified in the effective address field
  2133. is always updated independently of the specified condition. All memory
  2134. alterable addressing mods may be used for the effective address. A
  2135. fast short jump addressing mode may also be used? The 12-bit data
  2136. is zero extended to form the effective address. The term "cc" may
  2137. specify the following condition:
  2138.  
  2139.     "cc" Mnemonic                                Condition
  2140.     CC (HS) - carry clear (higher or same)        C = 0
  2141.     CS (LO) - carry set (lower)                    C = 1
  2142.     EC        - extension clear                    E = 0
  2143.     EQ        - equal                                Z = 1
  2144.     ES        - extension set                        E = 1
  2145.     GE        - greater than or equal                N^V = 0
  2146.     GT        - greater than                        Z+(N^V) = 0
  2147.     LC        - limit clear                        L = 0
  2148.     LE        - less than or equal                Z+(N^V) = 1
  2149.     LS        - limit set                            L = 1
  2150.     LT        - less than                            N^V = 1
  2151.     MI        - minus                                N = 1
  2152.     NE        - not equal                            Z = 0
  2153.     NR        - normalized                        Z+(~U & ~E) = 1
  2154.     PL        - plus                                N = 0
  2155.     NN        - not normalized                    Z+(~U & ~E) = 0
  2156.  
  2157.     where
  2158.     ~ denote the logical complement,
  2159.     + denotes the logical OR operator,
  2160.     & denotes the logical AND operator, and
  2161.     ^ denotes the logical Exclusive OR operator.
  2162.  
  2163. Restrictions:
  2164.     A JScc instruction used within a DO loop cannot specify the loop
  2165. address (LA) as its target.
  2166.  
  2167.     A JScc instruction used within in a DO loop cannot begin at the address
  2168. LA within that DO loop.
  2169.  
  2170.     A JScc instruction cannot be repeated using the REP instruction.
  2171.  
  2172. Example:
  2173.     JSLS    (R3+N3)    ;jump to subroutine at P:(R3+N3) if limit set (L=1)
  2174.  
  2175. Explanation of Example:
  2176.     In this example, program execution is transfered tothe subroutine
  2177. at address P:(R3+N3) in program memory if the limit bit is set (L=1).
  2178. Both the return address (PC) and SR are pushed onto the system stack
  2179. prior to transferring program control to the subroutine if the
  2180. specified condition is not true, no jump is taken and the PC is
  2181. incremented by 1.
  2182.  
  2183. Condition Codes:
  2184.     The condition codes are not affected by this instruction.
  2185.  
  2186. Instruction Format:
  2187.     JScc    xxx
  2188.     JScc    ea
  2189.  
  2190.     xxx = 12-bit Short Jump Address
  2191.  
  2192.     ea = (Rn)-Nn
  2193.          (Rn)+Nn
  2194.          (Rn)-
  2195.          (Rn)+
  2196.          (Rn)
  2197.          (Rn+Nn)
  2198.          -(Rn)
  2199.          Absolute address
  2200.  
  2201. Timing:        4 + jx oscillator clock cycles
  2202.  
  2203. Memory:        1 + ea program words
  2204.  
  2205.  
  2206. {JSCLR}                    Jump to Subroutine if Bit Clear
  2207.  
  2208. Operation:
  2209.     If S[n]=0,
  2210.     then SP+1->SP;PC->SSH;SR->SSL;xxxx->PC
  2211.     else PC+1->PC
  2212.  
  2213. Assembler Syntax:
  2214.     JSCLR    #n,X:ea,xxxx
  2215.     JSCLR    #n,X:aa,xxxx
  2216.     JSCLR    #n,X:pp,xxxx
  2217.     JSCLR    #n,Y:ea,xxxx
  2218.     JSCLR    #n,Y:aa,xxxx
  2219.     JSCLR    #n,Y:pp,xxxx
  2220.     JSCLR    #n,S,xxxx
  2221.  
  2222. Description:
  2223.     Jump to subroutine at the 16-bit absolute address in program memory
  2224. specified in the instruction's 24-bit extension word if the nth bit of
  2225. the source operand S is clear. The bit to be tested is selected by an
  2226. immediate bit number from 0-23. if the nth bit of the source operand S
  2227. is clear, the address of the instruction immediately following the
  2228. JSCLR instruction (PC) and the SR are pushed onto the system stack.
  2229. Program  execution then contintinues at the specified absolute address
  2230. in the instruction's 24-bit extension word. If the specified memory bit
  2231. is not clear, the PC is incremented and the extension word is ignored.
  2232. However, the adress register specified in the effective address field
  2233. is always updated independently of the state of the nth bit. All
  2234. address register indirect addressing modes may be used to reference the
  2235. source operand S. Absolute short and I/O short adressing modes may also
  2236. be used.
  2237.  
  2238. Restrictions:
  2239.     A JSCLR instruction used within a DO lopp cannot specify the loop
  2240. address (LA) as its target.
  2241.  
  2242.     A JSCLR located at LA, LA-1, or LA-2 of a DO loop, cannot specify the
  2243. program controller registers SR, SP, SSH, SSL, LA, or LC as its target.
  2244.  
  2245.     JSCLR SSH or JSCLR SSL  cannot follow an instruction that changes the
  2246. SP.
  2247.  
  2248.     A JSCLR instrcuction cannot be repeated using the REP instruction.
  2249.  
  2250. Example:
  2251.     JSCLR    #$1,Y:<<$FFE3,$1357        ; go sub. at P:$1357 if bit 1 in
  2252.                                     ; Y:$FFE3 is clear
  2253.  
  2254. Explanation of Example:
  2255.     In this example, program execution is transferred to the subroutine
  2256. at absolute address P:$1357 in program memory if bit 1 of the external
  2257. I/O location Y:<<$FFE3 is a zero. If the specified bit is not clear, no
  2258. jump is taken and the PC is incremented by 1.
  2259.  
  2260. Condition Codes:
  2261.     The condition codes are not affected by this instruction.
  2262.  
  2263. Instruction Format:
  2264.     JSCLR    #n,X:ea,xxxx
  2265.     JSCLR    #n,X:aa,xxxx
  2266.     JSCLR    #n,X:pp,xxxx
  2267.     JSCLR    #n,Y:ea,xxxx
  2268.     JSCLR    #n,Y:aa,xxxx
  2269.     JSCLR    #n,Y:pp,xxxx
  2270.     JSCLR    #n,S,xxxx
  2271.  
  2272.     xxxx = 16-bit Absolute Address
  2273.  
  2274.     #n = bit number
  2275.  
  2276.     ea = (Rn)-Nn
  2277.          (Rn)+Nn
  2278.          (Rn)-
  2279.          (Rn)+
  2280.          (Rn)
  2281.          (Rn+Nn)
  2282.          -(Rn)
  2283.  
  2284.     aa = 6-bit Absolute Short Address
  2285.  
  2286.     pp = 6-bit I/O Short Address
  2287.  
  2288.     S  = (X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,
  2289.             Rn,Nn,Mn,SR,OMR,SP,SSH,SSL,LA,LC)
  2290.  
  2291. Timing:        6 + jx oscillator clock cycles
  2292.  
  2293. Memory:        2 program words
  2294.  
  2295.  
  2296. {JSET}                        Jump if Bit Set
  2297.  
  2298. Operation:
  2299.     If S[n] = 1, then xxxx->PC
  2300.     else PC+1->PC
  2301.  
  2302. Assembler Syntax:
  2303.     JSET    #n,X:ea,xxxx
  2304.     JSET    #n,X:aa,xxxx
  2305.     JSET    #n,X:pp,xxxx
  2306.     JSET    #n,Y:ea,xxxx
  2307.     JSET    #n,Y:aa,xxxx
  2308.     JSET    #n,Y:pp,xxxx
  2309.     JSET    #n,S,xxxx
  2310.  
  2311. Description:
  2312.     Jump to the 16-bit absolute address in program memory specified in
  2313. the instruction's 24-bit extension word if the nth bit of the source
  2314. operand S is set. The bitto be tested is selected by an immediate bit
  2315. number from 0-23. If the specified memory bitis not set, the PC is
  2316. incremented, and the absolute address in the extension word is ignored.
  2317. However, the address register specified in the effective address field
  2318. is always updated independently of the state of the nth bit. All
  2319. address register indirect addressing modes may be used to reference the
  2320. source operand S. Absolute short I/O addressing modes may also be used.
  2321.  
  2322. Restrictions:
  2323.     A JSET instruction used within a DO loop cannot specify the loop address
  2324. (LA) as its target.
  2325.  
  2326.     A JSET located at LA, LA-1, or LA-2 of a DO loop cannot specify the
  2327. program controller registers SR, SP, SSH, SSL, LA, or LC as its target.
  2328.  
  2329.     JSET SSH or JSET SSL cannot follow an instruction that changes the SP.
  2330.  
  2331.     A JSET instruction cannot be repeated using the REP instruction.
  2332.  
  2333. Example:
  2334.     JSET    #12,X:<<$FFF2,$4321    ;$4321 -> (PC) if bit 12 (SCI COD) is set
  2335.  
  2336. Explanation of Example:
  2337.     In this example, pogram execution is transfered to the address
  2338. P:$4321 if bit 12 (SCI COD) of the 16-bit read/write I/O register
  2339. X:$FFF2 is a one. If the specified bit is not set, no jump is taken and
  2340. the program counter (PC) is incremented by 1.
  2341.  
  2342. Condition Codes:
  2343.     The condition codes are not affected by this instruction.
  2344.  
  2345. Instruction Format:
  2346.     JSET    #n,X:ea,xxxx
  2347.     JSET    #n,X:aa,xxxx
  2348.     JSET    #n,X:pp,xxxx
  2349.     JSET    #n,Y:ea,xxxx
  2350.     JSET    #n,Y:aa,xxxx
  2351.     JSET    #n,Y:pp,xxxx
  2352.     JSET    #n,S,xxxx
  2353.  
  2354.     xxxx = 16-bit Absolute Address
  2355.  
  2356.     #n = bit number
  2357.  
  2358.     ea = (Rn)-Nn
  2359.          (Rn)+Nn
  2360.          (Rn)-
  2361.          (Rn)+
  2362.          (Rn)
  2363.          (Rn+Nn)
  2364.          -(Rn)
  2365.  
  2366.     aa = 6-bit Absolute Short Address
  2367.  
  2368.     pp = 6-bit I/O Short Address
  2369.  
  2370.     S  = (X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,
  2371.             Rn,Nn,Mn,SR,OMR,SP,SSH,SSL,LA,LC)
  2372.  
  2373. Timing:        6 + jx oscillator clock cycles
  2374.  
  2375. Memory:        2 program words
  2376.  
  2377.  
  2378. {JSR}                        Jump to Subroutine
  2379.  
  2380. Operation:                                Assembler Syntax:
  2381.     SP+1->SP;PC->SSH;SR->SSL;0xxx->PC        JSR    xxx
  2382.  
  2383.     SP+1->SP;PC->SSH;SR->SSL;ea->PC            JSR    ea
  2384.  
  2385. Description:
  2386.     Jump to the subroutine whose location in program memory is given by
  2387. the instruction's effective address. The address of the instruction
  2388. immediately following the JSR instruction (PC) and the SR is pushed
  2389. onto the system stack. Program execution then continues at the
  2390. specified effective address in program memory. All memory alterable
  2391. addressing modes may be used for the effective address. A fast short
  2392. jump addressing mode may also be used. the 12-bit data iszero extended
  2393. to form the effective address.
  2394.  
  2395. Restrictions:
  2396.     A JSR instruction used within a DO loop cannot specify the loop address
  2397. (LA) as its target.
  2398.  
  2399.     A JSR instruction used within a DO loop cannot begin at the address LA
  2400. within that DO loop.
  2401.  
  2402.     A JSR instruction cannot be repeated using the REP instruction.
  2403.  
  2404. Example:
  2405.     JSR    (R5)+    ;jump to subroutine at (R5), update R5
  2406.  
  2407. Explanation of Example:
  2408.     In this example, program execution is transferred to the subroutine
  2409. at address P:(R5) in program memory, and the contents of the R5 address
  2410. register are then updated.
  2411.  
  2412. Condition Codes:
  2413.     The condition codes are not affected by this instruction.
  2414.  
  2415. Instruction Format:
  2416.     JSR    xxx
  2417.     JSR ea
  2418.  
  2419.     xxx = 12-bit Short Jump Address
  2420.  
  2421.     ea = (Rn)-Nn
  2422.          (Rn)+Nn
  2423.          (Rn)-
  2424.          (Rn)+
  2425.          (Rn)
  2426.          (Rn+Nn)
  2427.          -(Rn)
  2428.          Absolute address
  2429.  
  2430. Timing:        4 + jx oscillator clock cycles
  2431.  
  2432. Memory:        1 + ea program words
  2433.  
  2434.  
  2435. {JSSET}                    Jump to Subroutine if Bit Set
  2436.  
  2437. Operation:
  2438.     If S[n] = 1,
  2439.     then SP+1->SP;PC->SSH;SR->SSL;xxxx->PC
  2440.     else PC+1->PC
  2441.  
  2442. Assembler Syntax:
  2443.     JSSET    #n,X:ea,xxxx
  2444.     JSSET    #n,X:aa,xxxx
  2445.     JSSET    #n,X:pp,xxxx
  2446.     JSSET    #n,Y:ea,xxxx
  2447.     JSSET    #n,Y:aa,xxxx
  2448.     JSSET    #n,Y:pp,xxxx
  2449.     JSSET    #n,S,xxxx
  2450.  
  2451. Description:
  2452.     Jump to the subroutine at the 16-bit absolute address in program
  2453. memory specified in the instruction's 24-bit extension word if the
  2454. nth bit of the source operand S is set. The bit to be tested is
  2455. selected by an immediate bit number from 0-23. If the nth bit of the
  2456. source operand S is set, the address of the instruction immediately
  2457. following the JSSET instruction (PC) and the SR are pushed onto the
  2458. system stack. Program execution then continues at the specified
  2459. absolute absolute address in the instruction's 24-bit extension word.
  2460. If the specified memory bit is not set, the PC is incremented, and
  2461. the extension word is ignored. However, the address register specified
  2462. in the effective address field is always updated independently of the
  2463. state of the nth bit. All address register indirect addressing modes
  2464. may be used to reference the source operand S. Absolute short and I/O
  2465. short addressing modes may also be used.
  2466.  
  2467. Restrictions:
  2468.     A JSSET instruction used within a DO loop cannot specify the loop
  2469. address (LA) as its target.
  2470.  
  2471.     A JSSET located at LA, LA-1, or LA-2 ofa DO loop, cannot specify the
  2472. program controller registers SR, SP, SSH, SSL, LA, or LC as its target.
  2473.  
  2474.     JSSET SSH or JSSET SSL cannot follow an instruction that changes the
  2475. SP.
  2476.  
  2477.     A JSSET instruction cannot be repeated using the REP instruction.
  2478.  
  2479. Example:
  2480.     JSSET #$17,Y:<$3F,$100    ;go to sub. at P:$0100 if bit 23 in Y:$3F
  2481.                             is set
  2482.  
  2483. Explanation of Example:
  2484.     In this example, program execution is transferred to the subroutine
  2485. at absolute address P:$0100 in program memory if bit 23 of Y memory
  2486. location Y:$003F is a one. If the specified bit is not set, no jump is
  2487. taken and the PC is incremented by 1.
  2488.  
  2489. Condition Codes:
  2490.     The condition codes are notaffected by this instruction.
  2491.  
  2492. Instruction Format:
  2493.     JSSET    #n,X:ea,xxxx
  2494.     JSSET    #n,X:aa,xxxx
  2495.     JSSET    #n,X:pp,xxxx
  2496.     JSSET    #n,Y:ea,xxxx
  2497.     JSSET    #n,Y:aa,xxxx
  2498.     JSSET    #n,Y:pp,xxxx
  2499.     JSSET    #n,S,xxxx
  2500.  
  2501.  
  2502.     xxxx = 16-bit Absolute Address
  2503.  
  2504.     #n = bit number
  2505.  
  2506.     ea = (Rn)-Nn
  2507.          (Rn)+Nn
  2508.          (Rn)-
  2509.          (Rn)+
  2510.          (Rn)
  2511.          (Rn+Nn)
  2512.          -(Rn)
  2513.  
  2514.     aa = 6-bit Absolute Short Address
  2515.  
  2516.     pp = 6-bit I/O Short Address
  2517.  
  2518.     S  = ( X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,
  2519.             Rn,Nn,Mn,SR,OMR,SP,SSH,SSL,LA,LC)
  2520.  
  2521. Timing:        6 + jx oscillator clock cycles
  2522.  
  2523. Memory:        2 program words
  2524.  
  2525.  
  2526. {LSL}                        Logical Shift Left
  2527.  
  2528. Operation:
  2529.  
  2530.              47        24
  2531.             +------------+
  2532.         C <-|<-----------|<- 0 (parallel move)
  2533.             +------------+
  2534.  
  2535. Assembler Syntax:
  2536.     LSL    D                (parallel move)
  2537.  
  2538. Description:
  2539.     Logical shifts bits 47-24 of the destination operand D one bit to
  2540. the left and store the result in the destination accumulator. Prior to
  2541. instruction execution, bit 47 of D is shifted into the carry bit C,
  2542. and zero is shifted into bit 24 of the destination accumulator D. This
  2543. instruction is a 24-bit operation. The remainig bits of the
  2544. destination operand E are not affected. If zero shift count is
  2545. specified, the carry bit is cleared. The difference between LSL and ASL
  2546. is that LSL operates on only A1 or B1 and always clears the V bit.
  2547.  
  2548. Example:
  2549.     LSL    B    #$7F,R0        ;shift B1 one bit to the left, set up R0
  2550.  
  2551.     Before execution:
  2552.         B  = $00:F01234:13579B
  2553.         SR = $0300
  2554.  
  2555.     After execution:
  2556.         B  = $00:E02468:13579B
  2557.         SR = $0309
  2558.     
  2559. Explanation of Example:
  2560.     Prior to execution, the 56-bit B accumulator contains the value
  2561. $00:F01234:13579B. The execution of the LSL B instruction shifts the
  2562. 24-bit value in the B1 register one bit to the left and stores the
  2563. result back in the B1 register.
  2564.  
  2565. Condition Codes:
  2566.  
  2567.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  2568.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  2569.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  2570.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  2571.     |<-           {MR}         ->|<-       {CCR}      ->|
  2572.  
  2573.     {L}- Set if data limiting has occured during parallel move
  2574.     {N}- Set if bit 47 of A or B result is set
  2575.     {Z}- Set if bits 47-24 of A or B result are zero
  2576.     {V}- Always cleared
  2577.     {C}- Set if bit 47 of A or B was set prior to instruction execution
  2578.  
  2579. Instruction Format:
  2580.     LSL    D
  2581.  
  2582.     D = (A,B)
  2583.  
  2584. Timing:        2 + mv oscillator clock cycles
  2585.  
  2586. Memory:        1 + mv program words
  2587.  
  2588.  
  2589. {LSR}                        Logical Shift Right
  2590.  
  2591. Operation:
  2592.  
  2593.              47        24
  2594.             +------------+
  2595.         0 ->|----------->|-> C (parallel move)
  2596.             +------------+
  2597.  
  2598. Assembler Syntax:
  2599.     LSR    D                (parallel move)
  2600.  
  2601. Description:
  2602.     Logically shifts bits 47-24 of the destination operand D one bit to
  2603. the right and store the result in the destination accumulator. Prior to
  2604. instruction execution, bit 24 of D is shifted into the carry bit C, and
  2605. zero is shifted into bit 47 of the destination accumulator D. This
  2606. instruction is a 24-bit operation. The remaining bits of the
  2607. destination operand D are not affected.
  2608.  
  2609. Example:
  2610.     LSR    A    A1,N4        ;shift A1 one bit to the right, set up N4
  2611.  
  2612.     Before execution:
  2613.         A  = $37:444445:828180
  2614.         SR = $0300
  2615.  
  2616.     After execution:
  2617.         A  = $37:222222:828180
  2618.         SR = $0301
  2619.  
  2620. Explanation of Example:
  2621.     Prior to execution, the 56-bit A accumulator countains the value
  2622. $37:444445:828180. The execution of the LSR A instruction shifts the
  2623. 24-bit value in the A1 register one bit tothe right and stores the
  2624. result back in the A1 register.
  2625.  
  2626. Condition Codes:
  2627.  
  2628.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  2629.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  2630.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  2631.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  2632.     |<-           {MR}         ->|<-       {CCR}      ->|
  2633.  
  2634.     {L}- Set if data limiting has occured during parallel move
  2635.     {N}- Always cleared
  2636.     {Z}- Set if bits 47-24 of A or B result are zero
  2637.     {V}- Always cleared
  2638.     {C}- Set if bit 24 of A or B was set prior to instruction execution
  2639.  
  2640. Instruction Format:
  2641.     LSR D
  2642.  
  2643.     D = (A,B)
  2644.  
  2645. Timing:        2 + mv oscillator clock cycles
  2646.  
  2647. Memory:        1 + mv program words
  2648.  
  2649.  
  2650. {LUA}                        Load Update Address
  2651.  
  2652. Operation:
  2653.     ea -> D
  2654.  
  2655. Assembler Syntax:
  2656.     LUA    ea,D
  2657.  
  2658. Description:
  2659.     Load the updated address into the destination address register D.
  2660. The source address register and the update mode used to compute the
  2661. updated address are specified by the effective address (ea). Note that
  2662. the source address register specified in the effective address is not
  2663. updated. All update addressing modes may be used.
  2664.  
  2665. NOTE: This instruction is considered to be a move-type instruction.
  2666. Due to pipelining, the new contents of the destination address register
  2667. (Rn or Nn) will not be available for use during the following
  2668. instruction (i.e., there is a single instruction cycle pipeline delay).
  2669.  
  2670. Example
  2671.     LUA    (R0)+N0,R1        ;update R1 using (R0)+N0
  2672.  
  2673.     Before Execution:
  2674.         R0 = $0003
  2675.         N0 = $0005
  2676.         R1 = $0004
  2677.  
  2678.     After Execution:
  2679.         R0 = $0003
  2680.         N0 = $0005
  2681.         R1 = $0008
  2682.  
  2683. Explanation of Example:
  2684.     Prior to execution, the 16-bit address register R0 contains the
  2685. value $0003, the 16-bit address register N0 contains the value $0005,
  2686. and the 16-bit address register R1 contains the value $0004. The
  2687. execution of the LUA (R0)+N0,R1 instruction adds the contents of the R0
  2688. register to the contents of the N0 register and stores the resulting
  2689. updated address in R1. The contents of both the R0 and N0 address
  2690. registers are not affected.
  2691.  
  2692. Condition Codes:
  2693.     The condition codes are not affected by this instruction.
  2694.  
  2695. Instruction Format:
  2696.     LUA    ea,D
  2697.  
  2698.     ea = (Rn)-Nn
  2699.          (Rn)+Nn
  2700.          (Rn)-
  2701.          (Rn)+
  2702.  
  2703.     D  = (Rn,Nn)
  2704.  
  2705. Timing:        4 oscillator clock cycles
  2706.  
  2707. Memory:        1 program word
  2708.  
  2709.  
  2710. {MAC}                        Signed Multiply-Accumulate
  2711.  
  2712. Operation:
  2713.     D+-S1*S2 -> D        (parallel move)
  2714.  
  2715. Assembler Syntax:
  2716.     MAC    (+-)S1,S2,D        (parallel move)
  2717.  
  2718. Description:
  2719.     Multiply the two signed 24-bit source operands S1 and S2 and
  2720. add/subtract the product to/from the specified 56-bit destination
  2721. accumulator D. The "-" sign option is used to negate the specified
  2722. product prior to accumulation. The default sign option is "+".
  2723.  
  2724. Example:
  2725.     MAC    X0,X0,A    X:(R2)+N2,Y1    ;square X0 and store in A, update Y1 and R2
  2726.  
  2727.     Before Execution:
  2728.         X0 = $123456
  2729.         A  = $00:100000:000000
  2730.  
  2731.     After Execution:
  2732.         X0 = $123456
  2733.         A  = $00:1296CD:9619C8
  2734.  
  2735. Explanation of Example:
  2736.     Prior to execution, the 24-bit X0 register contains the value of
  2737. $123456 (0.142222166), and the 56-bit A accumulator contains the value
  2738. $00:100000:000000 (0.125). The execution of the MAC X0,X0,A instruction
  2739. square the 24-bit signed value in the X0 regsiter and adds the
  2740. resulting 48-bit product to the 56-bit A accumulator (X0*X0+A =
  2741. 0.145227144519197 approximatively = $00:1296CD:9619C8 = A).
  2742.  
  2743. Condition Codes:
  2744.  
  2745.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  2746.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  2747.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  2748.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  2749.     |<-           {MR}         ->|<-       {CCR}      ->|
  2750.  
  2751.     {L}- Set if limiting (parallel move) or overflow has occured in result
  2752.     {E}- Set if the signed integer portion of A or B result is in use
  2753.     {U}- Set if A or B result is unnormlized
  2754.     {N}- Set if bit 55 of A or B result is set
  2755.     {Z}- Set if A or B result equals zero
  2756.     {V}- Set if overflow has occured in A or B result
  2757.  
  2758. NOTE: The definition of the E and U bits varies according
  2759. to the scaling mode being used.
  2760.  
  2761. Instruction Format:
  2762.     MAC    (+-)S1,S2,D
  2763.  
  2764.     S1 = (X0,Y0,X1,Y1)
  2765.     S2 = (X0,Y0,X1,Y1)
  2766.     D  = (A,B)
  2767.  
  2768. Timing:        2 + mv oscillator clock cycles
  2769.  
  2770. Memory:        1 + mv program words
  2771.  
  2772.  
  2773. {MACR}                        Signed Multiply-Accumulate and Round
  2774.  
  2775. Operation:
  2776.     D+-S1*S2+r -> D        (parallel move)
  2777.  
  2778. Assembler Syntax:
  2779.     MACR    (+-)S1,S2,D    (parallel move)
  2780.  
  2781. Description:
  2782.     Multiply the two signed 24-bit source operands S1 and S2,
  2783. add/subtract the product to/from the specified 56-bit destination
  2784. accumulator D, and then round the result using convergent rounding.
  2785. The rounded result is stored in the destination accumulator D. The "-"
  2786. sign option is used to negate the specified product prior to
  2787. accumulation. The default sign option is "+". The contribution of the
  2788. LS bits of the result is rounded into the upper portion of the
  2789. destination accumulator (A1 or B1) by adding a constant to the LS bits
  2790. of the lower portion of the accumulator (A0 or B0). The value of the
  2791. constant added is determined by the scaling mode bits S0 and S1 in the
  2792. RS. Once rounding has been completed, the LS bits of the destination
  2793. accumulator D (A0 orB0) are loaded with zeros to maintain an unbiased
  2794. accumulator value which may be refused by next instruction. The upper
  2795. portion of the accumulator (A1 or B1) contains the rounded result
  2796. which may be read out to the data buses. Refer to the RND instruction
  2797. for more complete information on the convergent rounding process.
  2798.  
  2799. Example:
  2800.     MACR X0,Y0,B    B,X0 Y:(R4)+N4,Y0    ;X0*Y0+B->B, rnd B, update X0,Y0,R4
  2801.  
  2802.     Before Execution:
  2803.         X0 = $123456
  2804.         Y0 = $123456
  2805.         B  = $00:100000:000000
  2806.  
  2807.     After Execution:
  2808.         X0 = $100000
  2809.         Y0 = $987654
  2810.         B  = $00:1296CE:000000
  2811.  
  2812. Explanation of Example:
  2813.     Prior to execution, the 24-bit X0 register contains the value
  2814. $123456 (0.142222166), the 24-bit Y0 regsiter contains the value
  2815. $123456 (0.142222166), and the 56-bit accumulator contains the value
  2816. $00:100000:000000 (0.125). The execution of the MACR X0,Y0,B
  2817. instruction multiples the 24-bit signed value in the X0 register
  2818. by the 24-bit signed value in the Y0 register, adds the resulting
  2819. product to the 56-bit B accumulator, rounds the result into the B1
  2820. portion of the accumulator, and then zeros the B0 portion of the
  2821. accumulator (X0*Y0+B = 0.145227144519197 approximately =
  2822. $00:1296CD:9619C8, which is rounded to the value $00:1296CE:000000 =
  2823. 0.145227193832397 = B).
  2824.  
  2825. Condition Codes:
  2826.  
  2827.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  2828.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  2829.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  2830.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  2831.     |<-           {MR}         ->|<-       {CCR}      ->|
  2832.  
  2833.     {L}- Set if limiting (parallel move) or overflow has occured in result
  2834.     {E}- Set if the signed integer portion of A or B result is in use
  2835.     {U}- Set if A or B result is unnormlized
  2836.     {N}- Set if bit 55 of A or B result is set
  2837.     {Z}- Set if A or B result equals zero
  2838.     {V}- Set if overflow has occured in A or B result
  2839.  
  2840. NOTE: The definition of the E and U bits varies according
  2841. to the scaling mode being used.
  2842.  
  2843. Instruction Format:
  2844.     MACR    (+-)S1,S2,D
  2845.  
  2846.     S1 = (X0,Y0,X1,Y1)
  2847.     S2 = (X0,Y0,X1,Y1)
  2848.     D  = (A,B)
  2849.  
  2850. Timing:        2 + mv oscillator clock cycles
  2851.  
  2852. Memory:        1 + mv program words
  2853.  
  2854.  
  2855. {MOVE}                        Move Data
  2856.  
  2857. Operation:
  2858.     S->D
  2859.  
  2860. Assembler Syntax:
  2861.     MOVE    S,D
  2862.  
  2863. Description:
  2864.     Move the contents of the specified data source S to the specified
  2865. destination D. This instruction is equivalent to a data ALU NOP with a
  2866. parallel data move.
  2867.  
  2868.     When a 56-bit accumulator (A or B) is specified as a source operand S,
  2869. the accumulator value is optionally shifted according to the scaling
  2870. mode bits S0 and S1 in the SR. If the data out of the shifter indicates
  2871. that the accumulator extension register is in use and the data is to be
  2872. moved into a 24 or 48-bit destination, the value stored in the
  2873. destination D is limited to a maximum positive or negative saturation
  2874. constant to minimize truncation error. Limiting does not occurif an
  2875. individual 24-bit accumulator register (A1,A0,B1, or B0) is specified
  2876. as a source operand instead of the full 56-bit accumulator (A or B).
  2877. This limiting features allows block floating-point operations to be
  2878. performed with error detection since the L bit in the condition code
  2879. register is latched.
  2880.  
  2881.     When a 56-bit accumulator (A orB) is specified as a destination operand
  2882. D, any 24-bit source data to be moved into that accumulator is
  2883. automatically extended to 56-bits by sign extending the MS bit o the
  2884. source operand (bit23) and appending the source operand with 24 LS
  2885. zeros. Similary, any 48-bit source data to be load into a 56-bit
  2886. accumulator isautomatically sign extended to 56 bits. Note that for
  2887. 24-bit source operands both the automatic sign-extension and zeroing
  2888. features may be disabled by specifying the destination register to be
  2889. one of the individual 24-bit accumulator registers (A1 orB1). Similary,
  2890. for 48-bit source operands, the automatic sign-extension feature may be
  2891. disabled by using the long memory move addressing mode specifying A10
  2892. or B10 as the destination operand.
  2893.  
  2894. Example:
  2895.     MOVE    X0,A1    ;move X0 to A1 without sign ext. or zeroing
  2896.  
  2897.     Before Execution:
  2898.         X0 = $234567
  2899.         A  = $FF:FFFFFF:FFFFFF
  2900.  
  2901.     After Execution:
  2902.         X0 = $234567
  2903.         A  = $FF:234567:FFFFFF
  2904.  
  2905. Explanation of Example:
  2906.     Prior to execution, the 56-bit A accumulator contains the value
  2907. $FF:FFFFFF:FFFFFF, and the 24-bit X0 register contains the value
  2908. $234567. The execution of the MOVE X0,A1 instruction moves the 24-bit
  2909. value in the X0 register into the  24-bit A1 register without automatic
  2910. sign extension and without automatic zeroing.
  2911.  
  2912. Condition Codes:
  2913.  
  2914.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  2915.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  2916.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  2917.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  2918.     |<-           {MR}         ->|<-       {CCR}      ->|
  2919.  
  2920.     {L}- Set if data limiting has occured during parallel move
  2921.  
  2922. Parallel Move Descriptions:
  2923.     Thirty of the sixty-two instructions provide the capability    to
  2924. specify an optional parallel data bus movement over the X and/or Y data
  2925. bus. This allows a data ALU operation to be executed in parallel with
  2926. up to two data bus moves during the instruction cycle. Ten types of
  2927. parallel moves are permitted, including register to register moves,
  2928. register to memory moves, and memory to register moves. However, not
  2929. all addressing modes are allowed for each type of memory reference.
  2930. Addressing mode restrictions which apply to specific types of moves are
  2931. noted in the individual move operation descriptions. The following
  2932. section contains detailed descriptions about each type of parallel
  2933. move operation.
  2934.  
  2935.     When a 56-bit accumulator (A or B) is specified as a source operand S,
  2936. the accumulator value is optionally shifted according to the scaling
  2937. mode bits S0 and S1 in the system status register (SR). If the data
  2938. out of the shifter indicates that the accumulator extension register is
  2939. in use and the data is to be moved into a 24- or 48-bit destination,
  2940. the value stored in the destination D is limited to a maximum positive
  2941. or negative saturation constant to minimize truncation error. Limiting
  2942. does not occur if an individual 24-bit accumulator register (A1,A0,B1,
  2943. or B0) isspecified as a source operand instead of a full 56-bit
  2944. accumulator (A or B). This limiting feature allows block floting-point
  2945. operations to be performed with error detection since the L bit in the
  2946. condition code register is latched.
  2947.  
  2948.     When a 56-bit accumulator (A or B) is specified as a destination
  2949. operand D, any 24-bit source data to be moved into that accumulator is
  2950. automatically extended to 56 bits by sign extending the MS bit of the
  2951. source operand (bit 23) and appending the source operand with 24 LS 
  2952. zeros. Similary, any 48-bit source data to be loaded into a 56-bit 
  2953. accumulator is automatically sign extended to 56 bits. Note that for 
  2954. 24-bit source operands both the automatic sign-extension and zeroing
  2955. features may be disabled by specifying the destination register to be
  2956. one of the individual 24-bit accumulator registers (A1 or B1).
  2957. Similary, for 48-bit source operands, the automatic sign-extension
  2958. feature may be disabled by using the long memory move addressing mode
  2959. and specifying A10 or B10 as the destination operand.
  2960.  
  2961.     Note that the symbols used in decoding the various opcode fields of an
  2962. instruction or parallel move are completely arbitrary. Furthermore,
  2963. the opcode symbols used in one instruction or parallel move are
  2964. completely independent of the opcode symbols used in a different
  2965. instruction or parallel move.
  2966.  
  2967. Timing:        2 + mv oscillator cycles
  2968.  
  2969. Memory:        1 + mv program words
  2970.  
  2971.  
  2972. {I}                        Immediate Short Data Move
  2973.  
  2974. Operation:
  2975.     (.....),#xx->D
  2976.  
  2977. Assembler Syntax:
  2978.     (.....)    #xx,D
  2979.  
  2980. Description:
  2981.     Move the 8-bit immediate data value (#xx) into the destination
  2982. operand D.
  2983.  
  2984.     If the destination register D is A0, A1, A2, B0, B1, B2, Rn, or Nn, the
  2985. 8-bit immediate short operand is interpreted as an unsigned integer
  2986. and is stored in the specified destination regsiter. That is, the
  2987. 8-bit data is stored in the eight LS bit of the destination operand,
  2988. and the remaining bits of the destination operand D are zeroed.
  2989.  
  2990.     If the destination register D is X0, X1, Y0, Y1, A, or B, the 8-bit
  2991. immediate short operand is interpreted as a signed fraction and is
  2992. stored in the specified destination register. That is, the 8-bit data
  2993. is stored in the eight MS bits of the destination operand, and the
  2994. remaining bits of the destination operand D are zeroed.
  2995.  
  2996.     If the arithmetic or logical opcode-operand portion of the instruction
  2997. specifies a given destination accumulator, that same accumulator or
  2998. portion of that accumulator may not be specified as a destination D in
  2999. the parallel data bus move operation. Thus, if the opcode-operand
  3000. portion of the instruction specifies the 56-bit A accumulator as its
  3001. destination, the parallel data move portion of the instruction may not
  3002. specify A0, A1, A2, or A as its destination D. Similary, if the
  3003. opcode-operand portion of the instruction specifies the 56-bit B
  3004. accumulator as tis destination, the parallel data bus move portion of
  3005. the instruction may not specify B0, B1, B2, or B as its destination D.
  3006. That is, duplicate destinations are NOT allowed within the same
  3007. instruction.
  3008.  
  3009. NOTE: This parallel data move is considered to be a move-type
  3010. instruction. Due to pipelining, if an address register (R or N) is
  3011. changed using a move-type instruction, the new contents of the
  3012. destination address register will not be available for use during the
  3013. following instruction (i.e., there is a single instruction cycle
  3014. pipeline delay.
  3015.  
  3016. Example:
  3017.     ABS    B    #$18,R1    ;take the absolute value of B, #$18->R1
  3018.  
  3019.     Before Execution:
  3020.         R1 = $0000
  3021.  
  3022.     After Execution:
  3023.         R1 = $0018
  3024.  
  3025. Explanation of Example:
  3026.     Prior to execution, the 16-bit address register R1 contains the
  3027. value $0000. The execution of the parallel move portion of the
  3028. instruction, #$18,R1, moves the 8-bit immediate short operand into
  3029. eight LS bits of the R1 register and zeros the remaining eight MS bits
  3030. of that register. The 8-bit value is intrepeted as an unsigned integer
  3031. since its destination is R1 address register.
  3032.  
  3033. Condition Codes:
  3034.     The condition codes are not affected by this type of parallel move.
  3035.  
  3036. Instruction Format:
  3037.     (.....)    #xx,D
  3038.  
  3039.     #xx = 8-bit Immediate Short Data
  3040.  
  3041.     D = (X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,Rn,Nn)
  3042.  
  3043. Timing:        mv oscillator clock cycles
  3044.  
  3045. Memory:        mv program words
  3046.  
  3047.  
  3048. {R}                        Register to Register Data Move
  3049.  
  3050. Operation:
  3051.     (.....);S->D
  3052.  
  3053. Assembler Syntax:
  3054.     (.....)    S,D
  3055.  
  3056. Description:
  3057.     Move the source register S to the destination register D.
  3058.  
  3059.     If the arithmetic or logical opcode_operand portion of the instruction
  3060. specifies a given destination accumulator, that same accumulator or
  3061. portion of that accumulator may not be specified as a destination D in
  3062. the parallel data bus move operation. Thus, if the opcode-operand
  3063. portion of the instruction specifies the 56-bit A accumulator as its
  3064. destination, the parallel data bus move portion of the instruction
  3065. may not specify A0, A1, A2, or A as its destination D. Similary, if the
  3066. opcode-operand portion of the instruction specifies the 56-bit B
  3067. accumulator as its destination, the parallel data bus move portion of
  3068. the instruction may not specify B0,B1,B2, or B as its destination D.
  3069. That is, duplicate destination are NOT allowed within the same
  3070. instruction.
  3071.  
  3072.     If the opcode-operand portion of the instruction specifies a given
  3073. source or destination register, that same register or portion of that
  3074. register may be used as a source S in the parallel data bus move
  3075. operation. This allows data to be moved in the same instruction in
  3076. which it is being used as a source operand by a data ALU operation.
  3077. That is, duplicate sources are allowed within the same instruction.
  3078.  
  3079.     When a 24-bit source operand is moved into a 16-bit destination
  3080. register, the 16 LS bits of the 24-bit source operand are stored in
  3081. 16-bit destination register. When a 16-bit source operand is moved into
  3082. a 24-bit destination register, the 16 LS bits of the destination
  3083. register are loaded with the contents of the 16-bit source operand,
  3084. and the eight MS bits of the 24-bit destination register are zeroed.
  3085.  
  3086. NOTE: The MOVE A,B operation will result in a 24-bit positive or
  3087. negative saturation constant being stored in the B1 portion of the B
  3088. accumulator if the signed integer portion of the A accumulator is in
  3089. use.
  3090.  
  3091. NOTE: This parallel data move is considered to be a move-type
  3092. instruction. Due to pipelining, if an address register (R or N) is
  3093. changed using a move-type instruction, the new contents of the
  3094. destination address register will not be available for use during the
  3095. following instruction (i.e., there is a single instruction cycle
  3096. pipeline delay).
  3097.  
  3098. Example:
  3099.     MACR    -X0,Y0,A    Y1,N5    ;-X0*Y0+A->A, move Y1->N5
  3100.  
  3101.     Before execution:
  3102.         Y1 = $001234
  3103.         N5 = $0000
  3104.  
  3105.     After execution:
  3106.         Y1 = $001234
  3107.         N5 = $1234
  3108.  
  3109. Explanation of Example:
  3110.     Prior to execution, the 24-bit Y1 register contains the value
  3111. $001234 and the 16-bit address offset register N5 contains the value
  3112. $0000. The execution of the parallel move portion of the instruction,
  3113. Y1,N5, moves the 16 LS bits of the 24-bit value in the Y1 register into
  3114. the 16-bit N5 register.
  3115.  
  3116. Condition Codes:
  3117.  
  3118.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  3119.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  3120.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  3121.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  3122.     |<-           {MR}         ->|<-       {CCR}      ->|
  3123.  
  3124.     {L}- Set if data limiting has occured during parallel move
  3125.  
  3126. Instruction Format:
  3127.     (.....) S,D
  3128.  
  3129.     S = (X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,Rn,Nn)
  3130.     D = (X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,Rn,Nn)
  3131.  
  3132. Timing:        mv oscillator clock cycles
  3133.  
  3134. Memory:        mv program words
  3135.  
  3136.  
  3137. {U}                        Address Register Update
  3138.  
  3139. Operation:
  3140.     (.....); ea->Rn
  3141.  
  3142. Assembler Syntax:
  3143.     (.....) ea
  3144.  
  3145. Description:
  3146.     Update the specified address register according to the specified
  3147. effective addressing mode. All update addressing modes may be used.
  3148.  
  3149. Example:
  3150.     RND    B    (R3)+N3        ;round value in N into B1,R3+N3->R3
  3151.  
  3152.     Before Execution:
  3153.         R3 = $0007
  3154.         N3 = $0004
  3155.  
  3156.     After Execution:
  3157.         R3 = $000B
  3158.         N3 = $0004
  3159.  
  3160. Explanation of Example:
  3161.     Prior to execution, the 16-bit address register R3 contains the
  3162. value $0007, and the 16-bit address offset register N3 contains the
  3163. value $0004. The execution of the paralle move portion of the
  3164. instruction, (R3)+N3, updates the R3 address register according to the
  3165. specified effective addressing mode by adding the value in the R3
  3166. register to the value in the N3 register and storing the 16-bit result
  3167. back in the R3 address register.
  3168.  
  3169. Condition Codes:
  3170.     The condition codes are not affected by this type of parallel move.
  3171.  
  3172. Instruction Format:
  3173.     (.....) ea
  3174.  
  3175.     ea = (Rn)-Nn
  3176.          (Rn)+Nn
  3177.          (Rn)-
  3178.          (Rn)+
  3179.  
  3180. Timing:        mv oscillator clock cycles
  3181.  
  3182. Memory:        mv program words
  3183.  
  3184.  
  3185. {X:}                        X Memory Data Move
  3186.  
  3187. Operation:                        Assembler Syntax:
  3188.     (.....); X:ea->D                (.....)    X:ea,D
  3189.     (.....); X:aa->D                (.....)    X:aa,D
  3190.     (.....); S->X:ea                (.....)    S,X:ea
  3191.     (.....); S->X:aa                (.....)    S,X:aa
  3192.     (.....); #xxxxxx->D                (.....)    #xxxxxx,D
  3193.  
  3194. Description:
  3195.     Move the specified word operand from/to X memory. All memory
  3196. addressing modes, including absolute addressing and 24-bit immediate
  3197. data, may be used. Absolute short addressing may also be used.
  3198.  
  3199.     If the arithmetic or logical opcode-operand portion of the instruction
  3200. specifies a given destination accumulator, that same accumulator or
  3201. portion of that accumulator may notbe specified as destination D in
  3202. the parallel data bus move operation. Thus, if the opcode-operand
  3203. portion of the instruction specifies the 56-bit A accumulator as its
  3204. destination, the parallel data bus move portion of the instruction may
  3205. not specify A0,A1,A2, or A as its destination D. Similary, if the
  3206. opcode-operand portion of the instruction specifies the 56-bit B
  3207. accumulator as its destination, the parallel data bus move portion of
  3208. the instruction may not specify B0,B1,B2, or B as its destination D.
  3209. That is, duplicate destinations are NOT allowed within the same
  3210. instruction.
  3211.  
  3212.     If the opcode-operand portion of the instruction specifies a given
  3213. source or destination register, that same register or portion of that
  3214. register may be used as a source S in the parallel data bus move
  3215. operation. This allows data to be moved in the same instruction in
  3216. which it is being used as a source operand by data ALU operation.
  3217. That is, duplicate sources are allowed within the same instruction.
  3218.  
  3219.     When a 24-bit source operand is moved ino a 16-bit destination
  3220. register, the 16 LS bits of the 24-bit source operand are stored in
  3221. the 16-bit destination register. When a 16-bit source operand is moved
  3222. into a 24-bit destination register, the 16LS bits of the destination
  3223. register are loaded with the contents of the 16-bit source operand,
  3224. and the eight MS bits of the 24-bit destination register are zeroed.
  3225.  
  3226. NOTE: This parallel data move is considered to be a move-type
  3227. instruction. Due to pipelining, if an address register (R or N) is
  3228. changed using a move-type instruction, the new contents of the
  3229. destination address register will not be available for use during the
  3230. following instruction (i.e., there is a single instruction cycle
  3231. pipeline delay).
  3232.  
  3233. Example:
  3234.     ASL    A    R2,X:-(R2)    ;A*2->A, save updated R2 in X:(R2)
  3235.  
  3236.     Before Execution:
  3237.         R2      = $1001
  3238.         X:$1000 = $000000
  3239.  
  3240.     After Execution:
  3241.         R2      = $1000
  3242.         X:$1000 = $001000
  3243.  
  3244. Explanation of Example:
  3245.     Prior to execution, the 16-bit R2 address register contains the
  3246. value $1001, and the 24-bit X memory location X:$1000 contains the
  3247. value $000000. The execution of the parallel move portion of the
  3248. instruction, R2,X:-(R2), predecrements the R2 address register and
  3249. then uses the R2 address register to move the updated contents of the
  3250. R2 address register into the 24-bit X memory location X:$1000.
  3251.  
  3252. Condition Codes:
  3253.  
  3254.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  3255.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  3256.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  3257.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  3258.     |<-           {MR}         ->|<-       {CCR}      ->|
  3259.  
  3260.     {L}- Set if data limiting has occured during parallel move
  3261.  
  3262. NOTE: The MOVE A,X:ea operation will result in a 24-bit positive or
  3263. negative saturation constant being stored in the specified 24-bit X
  3264. memory if the signed integer portion of the A accumulator is in use.
  3265.  
  3266. Instruction Format:
  3267.     (.....)    X:ea,D
  3268.     (.....)    S,X:ea
  3269.     (.....)    #xxxxxx,D
  3270.     (.....)    X:aa,D
  3271.     (.....)    S,X:aa
  3272.  
  3273.     #xxxxxx = 24-bit Immediate Data
  3274.  
  3275.     aa = 6-bit Absolute Short Address
  3276.  
  3277.     ea = (Rn)-Nn
  3278.          (Rn)+Nn
  3279.          (Rn)-
  3280.          (Rn)+
  3281.          (Rn+Nn)
  3282.          -(Rn)
  3283.          Absolute address
  3284.  
  3285.     S = (X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,Rn,Nn)
  3286.     D = (X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,Rn,Nn)
  3287.  
  3288. Timing:        mv oscillator clock cycles
  3289.  
  3290. Memory:        mv program words
  3291.  
  3292.  
  3293. {X:R}                        X Memory and Register Data Move
  3294.  
  3295. Operation:                            Assembler Syntax:
  3296.     Class I                                Class I
  3297.         (...);    X:ea->D1;S2->D2                (...) X:ea,D1    S2,D2
  3298.         (...);    S1->X:ea;S2->D2                (...) S1,X:ea    S2,D2
  3299.         (...);    #xxxxxx->D1;S2->D2            (...) #xxxxxx,D1    S2,D2
  3300.     Class II                            Class II
  3301.         (...);    A->X:ea;X0->A                (...) A,X:ea    X0,A
  3302.         (...);    B->X:ea;X0->B                (...) B,X:ea    X0,B
  3303.  
  3304. Description:
  3305.     Class I: Move a one-word operand from/to X memory and move
  3306. another word operand from an accumulator (S2) to an input register
  3307. (D2). All memory addressing modes, including absolute addressing and
  3308. 24-bit immediate data, may be used. The register to register move
  3309. (S2,D2) allows data to be moved to data ALU input register for use as
  3310. a data ALU operand in the following instruction.
  3311.  
  3312.     Class II: Move one-word operand from a data ALU accumulator to X
  3313. memory and one-word operand from data ALU register X0 to a data ALU
  3314. accumulator. One effective address is specified. All memory addressing
  3315. modes, excluding long absolute addressing and long immediate data, may
  3316. be used.
  3317.  
  3318.     For both Class I and Class II X:R parallel data moves, if the
  3319. arithmetic or logical opcode-operand portion of the instruction
  3320. specifies a given destination accumulator, that same accumulator or
  3321. portion of that accumulator may not be specified as a destination D1 in
  3322. the parallel data bus move operation. Thus, if the opcode-operand
  3323. portion of the instruction specifies the 56-bit A accumulator as its
  3324. destination, the parallel data bus move portion of the instruction may
  3325. not specify A0,A1,A2, or A as its destination D1. Similary, if the
  3326. opcode-operand portion of the instruction specifies the 56-bit B
  3327. accumulator as its destination, the parallel data bus move portion of
  3328. the instruction may not specify B0,B1,B2, or B as its destination D1.
  3329. That is, duplicate destination are NOT allowed within the same
  3330. instruction.
  3331.  
  3332.     If the opcode-operand portion of the instruction specifies a given
  3333. source or detsination register, that same register or portion of that
  3334. register may be used as a source S1 and/or S2 in the parallel data bus
  3335. move operation. This allows data to be moved in the parallel data bus
  3336. move operation. This allows data to be moved in the same instruction
  3337. in which it is being used as a source operand by data ALU operation.
  3338. That is, duplication sources are allowed within the same instruction.
  3339. Note that S1 and S2 may specify the same register.
  3340.  
  3341. Class I Example:
  3342.     CMPM    Y0,A    A,X:$1234    A,Y0 ;compare A,Y0 mag., save A, update Y0
  3343.  
  3344.     Before Execution:
  3345.         A       = $00:800000:000000
  3346.         X:$1234 = $000000
  3347.         Y0      = $000000
  3348.  
  3349.     After Execution:
  3350.         A       = $00:800000:000000
  3351.         X:$1234 = $7FFFFF
  3352.         Y0      = $7FFFFF
  3353.  
  3354. Explanation of the Class I Example:
  3355.     Prior to executio, the 56-bit A accumulator contains the value
  3356. $00:800000:00000, the 24-bit X memory location X:$1234 contains the
  3357. value $000000, and the 24-bit Y0 regsiter contains the value $00000.
  3358. The execution of the parallel move portion of the instruction,
  3359. A,X:$1234    A,Y0, moves the 24-bit limited positive saturation constant
  3360. $7FFFFF into both the X:$1234 memory location and the Y0 register
  3361. since the signed portion of the A accumulator was in use.
  3362.  
  3363. Class II Example:
  3364.     MAC    X0,Y0,A    B,X:(R1)+    X0,B    ;multiply X0 and Y0 accumulate in A
  3365.                                     ;move B to X memory location pointed to
  3366.                                     ;by R1 and postincrement R1
  3367.                                     ;move X0 to B
  3368.  
  3369.     Before Execution:
  3370.         X0      = $400000
  3371.         Y0      = $600000
  3372.         A       = $00:000000:000000
  3373.         B       = $FF:7FFFFF:000000
  3374.         X:$1234 = $000000
  3375.         R1      = $1234
  3376.  
  3377.     After Execution:
  3378.         X0      = $400000
  3379.         Y0      = $600000
  3380.         A       = $00:300000:000000
  3381.         B       = $00:400000:000000
  3382.         X:$1234 = $800000
  3383.         R1      = $1235
  3384.  
  3385. Explanation of the Class II Example:
  3386.     Prior to execution, the 24-bit registers X0 and Y0 contain $400000
  3387. and $600000, respectively. The 56-bit accumulators A and B contain the
  3388. values $00:000000:000000 and $FF:7FFFFF:000000, respectively. The
  3389. 24-bit X memory location X:$1234 contains the value $000000, and the
  3390. 16-bit R1 regsiter contains the value $1234. Execution of the parallel
  3391. move portion of the instruction (B,X:(R1)+ X0,B) moves the 24-bit
  3392. limited value of B ($800000) into the X:$1234 memory location and the
  3393. X0 register ($400000) into accumulator B1 ($400000), sign extends B1
  3394. into B2 ($00), and zero fills B0 ($000000). It also increments R1 to
  3395. $1235.
  3396.  
  3397. Condition Codes:
  3398.  
  3399.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  3400.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  3401.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  3402.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  3403.     |<-           {MR}         ->|<-       {CCR}      ->|
  3404.  
  3405.     {L}- Set if data limiting has occured during parallel move
  3406.  
  3407. Class I Instruction Format:
  3408.     (.....)    X:ea,D1    S2,D2
  3409.     (.....)    S1,X:ea    S2,D2
  3410.     (.....)    #xxxxxx,D1    S2,D2
  3411.  
  3412.     ea = (Rn)-Nn
  3413.          (Rn)+Nn
  3414.          (Rn)-
  3415.          (Rn)+
  3416.          (Rn)
  3417.          (Rn+Nn)
  3418.          -(Rn)
  3419.          Absolute address
  3420.          Immediate data
  3421.  
  3422.     S1 = (X0,X1,A,B)
  3423.     D1 = (X0,X1,A,B)
  3424.  
  3425.     S2 = (A,B)
  3426.     D2 = (Y0,Y1)
  3427.  
  3428. Class II Instruction Format:
  3429.     (.....)    A,X:ea    X0,A
  3430.     (.....)    B,X:ea    X0,B
  3431.  
  3432.     ea = (Rn)-Nn
  3433.          (Rn)+Nn
  3434.          (Rn)-
  3435.          (Rn)+
  3436.          (Rn)
  3437.          (Rn+Nn)
  3438.          -(Rn)
  3439.          Absolute address
  3440.  
  3441. Timing:        mv oscillator clock cycles
  3442.  
  3443. Memory:        mv program words
  3444.  
  3445.  
  3446. {Y:}                        Y Memory Data Move
  3447.  
  3448. Operation:                        Assembler Syntax:
  3449.     (.....); Y:ea->D                (.....)    Y:ea,D
  3450.     (.....); Y:aa->D                (.....)    Y:aa,D
  3451.     (.....); S->Y:ea                (.....)    S,Y:ea
  3452.     (.....); S->Y:aa                (.....)    S,Y:aa
  3453.     (.....); #xxxxxx->D                (.....)    #xxxxxx,D
  3454.  
  3455. Description:
  3456.     Move the specified word operand from/to Y memory. All memory
  3457. addressing modes, including absolute addressing and 24-bit immediate
  3458. data, may be used. Absolute short addressing may also be used.
  3459.  
  3460.     If the arithmetic or logical opcode-operand portion of the instruction
  3461. specifies a given destination accumulator, that same accumulator or
  3462. portion of that accumulator may notbe specified as destination D in
  3463. the parallel data bus move operation. Thus, if the opcode-operand
  3464. portion of the instruction specifies the 56-bit A accumulator as its
  3465. destination, the parallel data bus move portion of the instruction may
  3466. not specify A0,A1,A2, or A as its destination D. Similary, if the
  3467. opcode-operand portion of the instruction specifies the 56-bit B
  3468. accumulator as its destination, the parallel data bus move portion of
  3469. the instruction may not specify B0,B1,B2, or B as its destination D.
  3470. That is, duplicate destinations are NOT allowed within the same
  3471. instruction.
  3472.  
  3473.     If the opcode-operand portion of the instruction specifies a given
  3474. source or destination register, that same register or portion of that
  3475. register may be used as a source S in the parallel data bus move
  3476. operation. This allows data to be moved in the same instruction in
  3477. which it is being used as a source operand by data ALU operation.
  3478. That is, duplicate sources are allowed within the same instruction.
  3479.  
  3480.     When a 24-bit source operand is moved ino a 16-bit destination
  3481. register, the 16 LS bits of the 24-bit source operand are stored in
  3482. the 16-bit destination register. When a 16-bit source operand is moved
  3483. into a 24-bit destination register, the 16LS bits of the destination
  3484. register are loaded with the contents of the 16-bit source operand,
  3485. and the eight MS bits of the 24-bit destination register are zeroed.
  3486.  
  3487. NOTE: This parallel data move is considered to be a move-type
  3488. instruction. Due to pipelining, if an address register (R or N) is
  3489. changed using a move-type instruction, the new contents of the
  3490. destination address register will not be available for use during the
  3491. following instruction (i.e., there is a single instruction cycle
  3492. pipeline delay).
  3493.  
  3494. Example:
  3495.     EOR    X0,B    #$123456,A    ;exclusive OR X0 and B, update A accumulator
  3496.  
  3497.     Before Execution:
  3498.         A = $FF:FFFFFF:FFFFFF
  3499.  
  3500.     After Execution:
  3501.         A = $00:123456:000000
  3502.  
  3503. Explanation of Example:
  3504.     Prior to execution, the 56-bit A accumulator contains the value
  3505. $FF:FFFFFF:FFFFFF. The execution of the parallel move portion of the
  3506. instruction, #$123456,A, moves the 24-bit immediate value $123456 into
  3507. the 24-bit A1 register, then sign extends that value into the A2
  3508. portion of the accumulator, and zeros the lower 24-bit A0 portion of
  3509. the accumulator.
  3510.  
  3511. Condition Codes:
  3512.  
  3513.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  3514.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  3515.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  3516.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  3517.     |<-         MR        ->|<-       CCR         ->|
  3518.  
  3519.     {L}- Set if data limiting has occured during parallel move
  3520.  
  3521. NOTE: The MOVE A,Y:ea operation will result in a 24-bit positive or
  3522. negative saturation constant being stored in the specified 24-bit X
  3523. memory if the signed integer portion of the A accumulator is in use.
  3524.  
  3525. Instruction Format:
  3526.     (.....)    Y:ea,D
  3527.     (.....)    S,Y:ea
  3528.     (.....)    #xxxxxx,D
  3529.     (.....)    Y:aa,D
  3530.     (.....)    S,Y:aa
  3531.  
  3532.     #xxxxxx = 24-bit Immediate Data
  3533.  
  3534.     aa = 6-bit Absolute Short Address
  3535.  
  3536.     ea = (Rn)-Nn
  3537.          (Rn)+Nn
  3538.          (Rn)-
  3539.          (Rn)+
  3540.          (Rn+Nn)
  3541.          -(Rn)
  3542.          Absolute address
  3543.  
  3544.     S = (X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,Rn,Nn)
  3545.     D = (X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,Rn,Nn)
  3546.  
  3547. Timing:        mv oscillator clock cycles
  3548.  
  3549. Memory:        mv program words
  3550.  
  3551.  
  3552. {R:Y}                        Register and Y Memory Data Move
  3553.  
  3554. Operation:                            Assembler Syntax:
  3555.     Class I                                Class I
  3556.         (...); S1->D1;Y:ea->D2                (...) S1,D1 Y:ea,D2
  3557.         (...); S1->D1;S2->Y:ea                (...) S1,D1 S2,Y:ea
  3558.         (...); S1->D1;#xxxxxx->D2            (...) S1,D1    #xxxxxx,D2
  3559.     Class II                            Class II
  3560.         (...); Y0->A;A->Y:ea                (...) Y0,A    A,Y:ea
  3561.         (...); Y0->B;B->Y:ea                (...) Y0,B    B,Y:ea
  3562.  
  3563. Description:
  3564.     Class I: Move a one-word operand from an accumulator (S1) to an
  3565. input register (D1) and move another word operand from/to Y memory.
  3566. All memory addressing modes, including absolute addressing and 24-bit
  3567. immediate data, may be used. The register to register move (S1,D1)
  3568. allows a data ALU accumulator to be moved to a data ALU input register
  3569. for use as a data ALU accumulator to be moved to a data ALU input
  3570. register for use as a data ALU operand in the following instruction.
  3571.  
  3572.     Class II: Move one-word operand from a data ALU accumulator to Y
  3573. memory and one-word operand from data ALU register Y0 to a data ALU
  3574. accumulator. One effective address is specified. All memory addressing
  3575. modes, excluding long absolute addressing and long immediate data,
  3576. may be used. Class II move operations have been added to the R:Y
  3577. parallel move (and a similar feature has been added to the X:R
  3578. parallel move) as an added feature available in the first quarter of
  3579. 1989.
  3580.  
  3581.     For both Class I and Class II R:Y parallel data moves, if the
  3582. arithmetic or logical opcode-operand portion of teh instruction
  3583. specifies a given destination accumulator, that same accumulator or
  3584. portion of that accumulator may not be specified as a destiation D2 in
  3585. the parallel data bus move operation. Thus, if the opcode-operand
  3586. portion of the instruction specifies the 56-bit A accumulator as its
  3587. destination, the parallel data bus move portion of the instruction may
  3588. not specify A0,A1,A2, or A as its destination D2. Similary, if the
  3589. opcode-operand portion of the parallel data bus move portion of the
  3590. instruction may not specify B0,B1,B2, or B as its destination D2. That
  3591. is, duplicate destinations are NOT allowed within the same instruction.
  3592.  
  3593.     If the opcode-operand portion of the instruction specifies a given
  3594. source or detsination register, that same register or portion of that
  3595. register may be used as a source S1 and/or S2 in the parallel data bus
  3596. move operation. This allows data to be moved in the parallel data bus
  3597. move operation. This allows data to be moved in the same instruction
  3598. in which it is being used as a source operand by data ALU operation.
  3599. That is, duplication sources are allowed within the same instruction.
  3600. Note that S1 and S2 may specify the same register.
  3601.  
  3602. Class I Example:
  3603.     ADDL    B,A    B,X1    Y:(R6)-N6,B    ;2*A+B->A, update X1,B and R6
  3604.  
  3605.     Before Execution:
  3606.         B       = $80:123456:789ABC
  3607.         X1      = $000000
  3608.         R6      = $2020
  3609.         N6      = $0020
  3610.         Y:$2020 = 654321
  3611.  
  3612.     After Execution:
  3613.         B       = $00:654321:000000
  3614.         X1      = $800000
  3615.         R6      = $2000
  3616.         N6      = $0020
  3617.         Y:$2020 = 654321
  3618.  
  3619. Explanation of the Class I Example:
  3620.     Prior to execution, the 56-bit B accumulator contains the value
  3621. $80:123456:789ABC, the 24-bit X1 register contains the value $000000,
  3622. the 16-bit R6 address register contains the value $2020, the 16-bit N6
  3623. address offset register contains the value $654321. The execution of
  3624. the parallel move portion of the instruction, B,X1 Y:(R6)-N6,B moves
  3625. the 24-bit limited negative saturation constant $800000 into the X1
  3626. register since the signed integer portion of the B accumulator was in
  3627. use, uses the value in the 16-bit R6 address register to move the
  3628. 24-bit value in the Y memory location Y:$2020 into the 56-bit B
  3629. accumulator (B2) and automatic zeroing of the lower portion of the
  3630. accumulator (B0), and finally uses the contents of the 16-bit R6
  3631. address register. The contents of the N6 address offset register are
  3632. not affected.
  3633.  
  3634. Class II Example:
  3635.     MAC    X0,Y0,A    Y0,B    B,Y:(R1)+    ;multiply X0 and Y0 and accumulate in
  3636.                                     ;A move B to Y memory location pointed
  3637.                                     ;to by R1 and postincrement R1 move Y0
  3638.                                     ;to B
  3639.  
  3640.     Before Execution:
  3641.         X0      = $400000
  3642.         Y0      = $600000
  3643.         A       = $00:000000:000000
  3644.         B       = $00:800000:000000
  3645.         Y:$1234 = $000000
  3646.         R1      = $1234
  3647.  
  3648.     After Execution:
  3649.         X0      = $400000
  3650.         Y0      = $600000
  3651.         A       = $00:300000:000000
  3652.         B       = $00:600000:000000
  3653.         Y:$1234 = $7FFFFF
  3654.         R1      = $1235
  3655.  
  3656. Explanation of the Class II Example:
  3657.     Prior to execution, the 24-bit registers, X0 and Y0, contain
  3658. $400000 and $600000, respectively. The 56-bit accumulators A and B
  3659. contain the values $00:000000:000000 and $00:800000:000000 (+1.0),
  3660. respectively. The 24-bit Y memory location Y:$1234 contains the value
  3661. $000000, and the 16-bit R1 register contains the value $1234. Execution
  3662. of the parallel move portion of the instruction (Y0,B B,Y:(R1)+) moves
  3663. the Y0 register ($600000) into accumulator B1 ($600000), sign extends
  3664. B1 into B2 ($00), and zero fills B0 ($000000). It also moves the 24-bit
  3665. limited value of B ($7FFFFF) into the Y:$1234 memory location and
  3666. increments R1 to $1235.
  3667.  
  3668. Condition Codes:
  3669.  
  3670.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  3671.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  3672.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  3673.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  3674.     |<-           {MR}         ->|<-       {CCR}      ->|
  3675.  
  3676.     {L}- Set if data limiting has occured during parallel move
  3677.  
  3678. Class I Instruction Format:
  3679.     (...)    S1,D1    Y:ea,D2
  3680.     (...)    S1,D1    S2,Y:ea
  3681.     (...)    S1,D1    #xxxxxx,D2
  3682.  
  3683.     ea = (Rn)-Nn
  3684.          (Rn)+Nn
  3685.          (Rn)-
  3686.          (Rn)+
  3687.          (Rn)
  3688.          (Rn+Nn)
  3689.          -(Rn)
  3690.          Absolute address
  3691.          Immediate data
  3692.  
  3693.     S1 = (A,B)
  3694.     D1 = (X0,X1)
  3695.  
  3696.     S2 = (Y0,Y1,A,B)
  3697.     D2 = (Y0,Y1,A,B)
  3698.  
  3699. Class II Instruction Format:
  3700.     (...)    Y0,A    A,Y:ea
  3701.     (...)    Y0,B    B,Y:ea
  3702.  
  3703.     ea = (Rn)-Nn
  3704.          (Rn)+Nn
  3705.          (Rn)-
  3706.          (Rn)+
  3707.          (Rn)
  3708.          (Rn+Nn)
  3709.          -(Rn)
  3710.          Absolute address
  3711.  
  3712. Timing:        mv oscillator clock cycles
  3713.  
  3714. Memory:        mv program words
  3715.  
  3716.  
  3717. {L:}                        Long Memory Data Move
  3718.  
  3719. Operation:                            Assembler Syntax:
  3720.     (...); X:ea->D1;Y:ea->D2            (...)    L:ea,D
  3721.     (...); X:aa->D1;Y:aa->D2            (...)    L:aa,D
  3722.     (...); S1->X:ea;S2->Y:ea            (...)    S,L:ea
  3723.     (...); S1->X:aa;S2->Y:aa            (...)    S,L:aa
  3724.  
  3725. Description:
  3726.     Move one 48-bit long-word operand from/to X and Y memory. Two data
  3727. ALU registers are concatenated to form the 48-bit long-word operand.
  3728. This allows efficient moving of both double-precision (high:low) and
  3729. complex (real:imaginary) data from/to one effective address in L (X:Y)
  3730. memory. The same effective address is used for both the X and Y memory
  3731. spaces; thus, only one effective address is required. Note that the A,
  3732. B, A10, and B10 operands reference a single 48-bit signed
  3733. (double-precision) quantity while the X,Y,AB, and BA operands reference
  3734. two seperate (i.e., real and imaginary) 24-bit signed quantities. All
  3735. memory alterable addressing modes may be used. Absolute short
  3736. addressing may also be used.
  3737.  
  3738.     If the arithmetic or logical opcode-operand portion of the instruction
  3739. specifies a given destination accumulator, that same accumulator or
  3740. portion of that accumulator may not be specified as a destination D in
  3741. the parallel data bus move operation. Thus, if the opcode-operand
  3742. portion of the instruction specifies the 56-bit A accumulator as its
  3743. destination, the parallel data bus move portion of the instruction may
  3744. not specify A, A10, AB, or BA as destination D. Similary, if the
  3745. opcode-operand portion of the instruction specifies the 56-bit B
  3746. accumulator as its destination, the parallel data bus move portion of
  3747. the instruction may not specify  B, B10, AB, or BA as its destination
  3748. D. That is, duplicate destinations are not allowed within the same
  3749. instruction.
  3750.  
  3751.     If the opcode-operand portion of the instruction specifies a given
  3752. source or destination register, that same register or portion of that
  3753. register may be used as a source S in the parallel data bus move
  3754. operation. This allows data to be moved in the same instruction in
  3755. which it is being used as a source operand by a data ALU operation.
  3756. That is, duplicate sources are allowed within the same instruction.
  3757.  
  3758. NOTE: The operands A10, B10, X, Y, AB, and BA may be used only for a
  3759. 48-bit long memory move as previously described. These operands may not
  3760. be used in any other type of instruction or parallel move.
  3761.  
  3762. Example:
  3763.     CMP    Y0,B    A,L:$1234    ;compare Y0 and B, save 48-bit A1:A0 value
  3764.  
  3765.     Before Execution:
  3766.         A       = $01:234567:89ABCD
  3767.         X:$1234 = $000000
  3768.         Y:$1234 = $000000
  3769.  
  3770.     After Execution:
  3771.         A       = $01:234567:89ABCD
  3772.         X:$1234 = $7FFFFF
  3773.         Y:$1234 = $FFFFFF
  3774.  
  3775. Explanation of Example:
  3776.     Prior to execution, the 56-bit A accumulator contains the value
  3777. $01:234567:89ABCD, the 24-bit X memory location X:$1234 contains the
  3778. value $000000, and the 24-bit Y memory location Y:$1234 contains the
  3779. value $000000. The execution of the parallel move portion of the
  3780. instruction, A,L:$1234, moves the 48-bit limited positive saturation
  3781. constant $7FFFFF:FFFFFF into the specified long memory location by
  3782. moving the MS 24 bits of the 48-bit limited positive saturation
  3783. constant ($7FFFFF) into the 24-bit X memory location X:$1234 and by
  3784. moving the LS 24 bits of the 48-bit limited positive saturation
  3785. constant ($FFFFFF) into the 24-bit Y memory location Y:$1234 since the
  3786. signed integer portion of the A accumulator was in use.
  3787.  
  3788. Condition Codes:
  3789.  
  3790.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  3791.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  3792.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  3793.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  3794.     |<-           {MR}         ->|<-       {CCR}      ->|
  3795.  
  3796.     {L}- Set if data limiting has occured during parallel move
  3797.  
  3798. NOTE: The MOVE A,L:ea operation will result in a 48-bit positive or
  3799. negative saturation constant being stored in the specified 24-bit X
  3800. and Y memory locations if the signed integer portion ofthe A
  3801. accumulator is in use. The MOVE AB,L:ea operation will result in
  3802. either one of the two 24-bit positive and/or negative saturation
  3803. constant(s) being stored in the specified 24-bit X and/or Y memory
  3804. location(s) if the signed integer portion of the A and/or B
  3805. accumulator(s) is in use. 
  3806.  
  3807. Instruction Format:
  3808.     (...)    L:ea,D
  3809.     (...)    S,L:ea
  3810.     (...)    L:aa,D
  3811.     (...)    S,L:aa
  3812.  
  3813.     aa = 6-bit Absolute Short Address
  3814.  
  3815.     ea = (Rn)-Nn
  3816.          (Rn)+Nn
  3817.          (Rn)-
  3818.          (Rn)+
  3819.          (Rn)
  3820.          (Rn+Nn)
  3821.          -(Rn)
  3822.          Absolute address
  3823.  
  3824.     S = (A10,B10,X,Y,A,B,AB,BA)
  3825.     D = (A10,B10,X,Y,A,B,AB,BA)
  3826.  
  3827. Timing:        mv oscillator clock cycles
  3828.  
  3829. Memory:        mv program words
  3830.  
  3831.  
  3832. {X:Y}                        X Y Memory Data Move
  3833.  
  3834. Operation:                            Assembler Syntax:
  3835.     (...);X:<eax>->D1;Y:<eay>->D2        (...) X:<eax>,D1 Y:<eay>,D2
  3836.     (...);X:<eax>->D1;S2->Y:<eay>        (...) X:<eax>,D1 S2,Y:<eay>
  3837.     (...);S1->X:<eax>;Y:<eay>->D2        (...) S1,X:<eax> Y:<eay>,D2
  3838.     (...);S1->X:<eax>;S2->Y:<eay>        (...) S1,X:<eax> S2,Y:<eay>
  3839.  
  3840. Description:
  3841.     Move one-word operand from/to X memory and move another word
  3842. operand from/to Y memory. Note that two independent effective addresses
  3843. are specified (<eax> and <eay>) where one of the effective addresses
  3844. uses the lower bank of address registers (R0-R3) while the other
  3845. effective address uses the upper bank of address registers (R4-R7).
  3846. All parallel addressing modes may be used.
  3847.  
  3848.     If the arithmetic or logical opcode-operand portion of the instruction
  3849. specifies a given destination accumulator, that same accumulator or
  3850. portion of that accumulator may not be specified as a destination D1
  3851. or D2 in the parallel data bus move operation. Thus, if the
  3852. opcode-operand portion of the instruction specifies the 56-bit A
  3853. accumulator as its destination, the parallel data bus move portion of
  3854. the instruction may not specify A as its destination D1 or D2.
  3855. Similary, if the opcode-operand portion of the instruction specifies
  3856. the  56-bit B accumulator as its destination, the parallel data bus
  3857. move portion of the instruction may not specify B as its destination
  3858. D1 or D2. That is, duplicate destinations are NOT allowed within the
  3859. same instruction. D1 and D2 may not specify the same register.
  3860.  
  3861.     If the opcode-operand portion of the instruction specifies a given
  3862. source or destination register, that same register or portion of that
  3863. register may be used as a source S1 and/or S2 in the parallel data bus
  3864. move operation. This allows data to be moved in the same instruction in
  3865. which it is being used as a source operand by data ALU operation. That
  3866. is, duplicate sources are allowed within the same instruction. Note
  3867. that S1 and S2 may specify the same register.
  3868.  
  3869. Example:
  3870.     MPYR X1,Y0,A X1,X:(R0)+ Y0,Y:(R4)+N4    ;X1*Y0->A, save X1 and Y0
  3871.  
  3872.     Before Execution:
  3873.         X1      = $123123
  3874.         Y0      = $456456
  3875.         R0      = $1000
  3876.         R4      = $0100
  3877.         N4      = $0023
  3878.         X:$1000 = $000000
  3879.         Y:$0100 = $000000
  3880.  
  3881.     After Execution:
  3882.         X1      = $123123
  3883.         Y0      = $456456
  3884.         R0      = $1001
  3885.         R4      = $0123
  3886.         N4      = $0023
  3887.         X:$1000 = $123123
  3888.         Y:$0100 = $456456
  3889.  
  3890. Explanation of example:
  3891.     Prior to execution, the 24-bit X1 register contains the value
  3892. $123123, the 24-bit Y0 register contains the value $456456, the 16-bit
  3893. R0 address register contains the value $1000, the 16-bit R4 address
  3894. register contains the value $0100, the 16-bit N4 address offset
  3895. register contains the value $000000, the 24-bit X memory location
  3896. X:$1000 contains the value $000000, and the 24-bit Y memory location
  3897. Y:$0100 contains the value $000000. The execution of the parallel move
  3898. portion of the instruction, X1,X:(R0)+ Y0,Y:(R4)+N4, moves the 24-bit
  3899. value in the X1 register into the 24-bit X memory location X:$1000
  3900. using the 16-bit R0 address register, moves the 24-bit value in the Y0
  3901. register into the 24-bit Y memory location Y:$0100 using the 16-bit R4
  3902. address register, updates the 16-bit value in the R0 address register,
  3903. and updates the 16-bit R4 address register using the 16-bit value in
  3904. the R0 address register, and updates the 16-bit R4 address register
  3905. using the 16-bit N4 address offset register. The contents of the N4
  3906. address offset register are not affected.
  3907.  
  3908. Condition Codes:
  3909.  
  3910.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  3911.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  3912.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  3913.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  3914.     |<-           {MR}         ->|<-       {CCR}      ->|
  3915.  
  3916.     {L}- Set if data limiting has occured during parallel move
  3917.  
  3918. NOTE: The MOVE A,X:<eax> B,Y:<eay> operation will result in one or
  3919. two 24-bit positive and/or negative saturation constant(s) being
  3920. stored in the specified 24-bit X and/or Y memory locations if the
  3921. signed integer portion of the A and/or B accumulator(s) is in use.
  3922.  
  3923. Instruction Format:
  3924.     (...) X:<eax>,D1 Y:<eay>,D2
  3925.     (...) X:<eax>,D1 S2,Y:<eay>
  3926.     (...) S1,X:<eax> Y:<eay>,D2
  3927.     (...) S1,X:<eax> S2,Y:<eay>
  3928.  
  3929.     eax = (Rn)+Nn
  3930.           (Rn)-
  3931.           (Rn)+
  3932.           (Rn)
  3933.  
  3934.     eay = (Rn)+Nn
  3935.           (Rn)-
  3936.           (Rn)+
  3937.           (Rn)
  3938.  
  3939.     S1 = (X0,X1,A,B)
  3940.     D1 = (X0,X1,A,B)
  3941.  
  3942.     S2 = (Y0,Y1,A,B)
  3943.     D2 = (Y0,Y1,A,B)
  3944.  
  3945. Timing:        mv oscillator clock cycles
  3946.  
  3947. Memory:        mv program words
  3948.  
  3949.  
  3950. {MOVEC}                    Move Control Register
  3951.  
  3952. Operation:                        Assembler Syntax:
  3953.     X:ea->D1                        MOVEC    X:ea,D1
  3954.     X:aa->D1                        MOVEC    X:aa,D1
  3955.     S1->X:ea                        MOVEC    S1,X:ea
  3956.     S1->X:aa                        MOVEC    S1,X:aa
  3957.     Y:ea->D1                        MOVEC    Y:ea,D1
  3958.     Y:aa->D1                        MOVEC    Y:aa,D1
  3959.     S1->Y:ea                        MOVEC    S1,Y:ea
  3960.     S1->Y:aa                        MOVEC    S1,Y:aa
  3961.     S1->D2                            MOVEC    S1,D2
  3962.     S2->D1                            MOVEC    S2,D1
  3963.     #xxxx->D1                        MOVEC    #xxxx,D1
  3964.     #xx->D1                            MOVEC    #xx,D1
  3965.  
  3966. Description:
  3967.     Move the contents of the specified source control register S1 or S2
  3968. to the specified destination or move the specified source to the
  3969. specified destination control register D1 or D2. The control registers
  3970. S1 and D1 are subset of the S2 and D2 register set and consist of the
  3971. address ALU modifier registers and the program controller registers.
  3972. These registers. These registers may be moved to or from any other
  3973. register or memory space. All memory addressing modes, as well as an
  3974. immediate short addressing mode, may be used.
  3975.  
  3976.     If the system stack register SSH is specified as a source operand, the
  3977. system stack pointer (SP) is postdecremented by 1 after SSH has been
  3978. read. If the system stack register SSH is specified as a destination
  3979. operand, the system stack pointer (SP) is preincremented by 1 before
  3980. SSH is written. This allows the system stack to be efficiently extended
  3981. using software stack pointer operations.
  3982.  
  3983.     When a 56-bit accumulator (A or B) is specified as a source operand,
  3984. the accumulator value is optionnaly shifted according to the scaling
  3985. mode bits S0 and S1 in the system status register (SR). If the data
  3986. out of the shifter indicates that the accumulator extension register is
  3987. in use and the data is to be moved into a 24-bit destination, the value
  3988. stored in the destination is limited to a maximum positive or negative
  3989. saturation constant to minimize truncation error. If the data is to be
  3990. moved into 16-bit destination and the accumulator extension register is
  3991. in use, the value is limited to a maximum positive or negative
  3992. saturation constant whose LS 16 bits are then stored in the 16-bit
  3993. destination register. Limiting does not occur if an individual 24-bit
  3994. accumulator register (A1,A0,B1, or B0) is specified as a source operand
  3995. instead of the full 56-bit accumulator (A or B). This limiting features
  3996. allows block floating-point operations to be performed with error
  3997. detection since the L bit in the condition code register is latched.
  3998.  
  3999.     When a 56-bit accumulator (A or B) is specified as a destination
  4000. operand, any 24-bit source data to be moved into that accumulator is
  4001. automatically extended to 56 bits by sign extending the MS bits ofthe
  4002. source operand (bit 23) and appending the source operand with 24 LS
  4003. zeros. Whenever a 16-bit source operands is to be moved into a 24-bit
  4004. destination, the 16-bit value is stored in the 16 LS 16 bits of the
  4005. 24-bit destination, and the MS 8 bits of that destination are zeroed.
  4006. Similary, whenever a 16-bit source operand is to be moved into a 56-bit
  4007. accumulator, the 16-bit value is moved into the LS 16 bits of the MSP
  4008. portion of the accumulator (A1 or B1), the MS 8 bits of the MSP portion
  4009. of that accumulator are zeroed, and the resulting 24-bit value is
  4010. extended to 56 bits by sign extending the MS bit and appending the
  4011. result with 24 LS zeros. Note that for 24-bit source operands both the
  4012. automatic sign-extension and zeroing features may be disabled by
  4013. specifying the destination register to be one of the individual 24-bit
  4014. accumulator registers (A1 or B1).
  4015.  
  4016. NOTE: Due to pipelining, if an address register (R,N, or M) is
  4017. changed using a move-type instruction, the new contents of the
  4018. destination address register will not beavailable for use during the
  4019. following instruction (i.e., there is a single instruction cycle
  4020. pipeline delay).
  4021.  
  4022. Restrictions:
  4023.  
  4024. NOTE: The following restrictions represent very unusual operations,
  4025. which probably would never be used but are listed only for
  4026. completeness.
  4027.  
  4028.     A MOVEC instruction used within a DO loop which specifies SSH as the
  4029. source operand or LA, LC, SR, SP, SSH, or SSL as the destination
  4030. operand cannot begin at the address LA-2, LA-1, or LA within that DO
  4031. loop.
  4032.  
  4033.     A MOVEC instruction which specifies SSH as the source operand or LA,
  4034. LC, SSH, SSL, or SP as the destination operand cannot be used
  4035. immediately before a DO instruction.
  4036.  
  4037.     A MOVEC instruction which specifies SSH as the source operand or LA,
  4038. LC, SR, SSH, SSL, or SP as the destination operand cannot be used
  4039. immediately before an ENDDO instruction.
  4040.  
  4041.     A MOVEC instruction which specifies SSH as the source operand or SR,
  4042. SSH, SSL, or SP as the destination operand cannot be used immediately
  4043. before an RTI instruction.
  4044.  
  4045.     A MOVEC instruction which specifies SSH as the source operand or SSH,
  4046. SSL, or SP as the destination operand cannot be used immediately before
  4047. an RTS instruction.
  4048.  
  4049.     A MOVEC instruction which specifies SP as the destination operand
  4050. cannot be used immediately before a MOVEC, MOVEM, or MOVEP instruction
  4051. which specifies SSH or SSL as the source operand.
  4052.  
  4053.     A MOVEC SSH,SSH instruction is illegal and cannot be used.
  4054.  
  4055. Example:
  4056.     MOVEC    LC,X0    ;move LC into X0
  4057.  
  4058.     Before Execution:
  4059.         LC = $0100
  4060.         X0 = $123456
  4061.  
  4062.     After Execution:
  4063.         LC = $0100
  4064.         X0 = $000100
  4065.  
  4066. Explanation of Example:
  4067.     Prior to execution, the 16-bit loop couter (LC) register contains
  4068. the value $0100, and the 24-bit X0 register contains the value $123456.
  4069. The execution of the MOVEC LC,X0 instruction moves the contents of the
  4070. 16-bit LC register into the 16 LS bits of the 24-bit X0 register and
  4071. zeros the 8 MS bits of the X0 register.
  4072.  
  4073. Condition Codes:
  4074.  
  4075.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  4076.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4077.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  4078.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4079.     |<-           {MR}         ->|<-       {CCR}      ->|
  4080.  
  4081.     For D1 or D2 = SR operand:
  4082.         {L}- Set according to bit 6 of the source operand
  4083.         {E}- Set according to bit 5 of the source operand
  4084.         {U}- Set according to bit 4 of the source operand
  4085.         {N}- Set according to bit 3 of the source operand
  4086.         {Z}- Set according to bit 2 of the source operand
  4087.         {V}- Set according to bit 1 of the source operand
  4088.         {C}- Set according to bit 0 of the source operand
  4089.  
  4090.     For D1 and D2 != SR operand:
  4091.         {L}- Set if data limiting has occured during move
  4092.  
  4093. Instruction Format:
  4094.     MOVEC    X:ea,D1
  4095.     MOVEC    X:aa,D1
  4096.     MOVEC    S1,X:ea
  4097.     MOVEC    S1,X:aa
  4098.     MOVEC    Y:ea,D1
  4099.     MOVEC    Y:aa,D1
  4100.     MOVEC    S1,Y:ea
  4101.     MOVEC    S1,Y:aa
  4102.     MOVEC    S1,D2
  4103.     MOVEC    S2,D1
  4104.     MOVEC    #xxxx,D1
  4105.     MOVEC    #xx,D1
  4106.  
  4107.     #xxxx = Immediate Data
  4108.  
  4109.     #xx = 8-bit Immediate Short Data
  4110.  
  4111.     aa = 6-bit Absolute Short Address
  4112.  
  4113.     ea = (Rn)-Nn
  4114.          (Rn)+Nn
  4115.          (Rn)-
  4116.          (Rn)+
  4117.          (Rn)
  4118.          (Rn+Nn)
  4119.          -(Rn)
  4120.          Absolute address
  4121.  
  4122.     S1 = (Mn,SR,OMR,SP,SSH,SSL,LA,LC)
  4123.     D1 = (Mn,SR,OMR,SP,SSH,SSL,LA,LC)
  4124.  
  4125.     S2 = (X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,Rn,Nn,Mn,SR,
  4126.           OMR,SP,SSH,SSL,LA,LC)
  4127.     D2 = (X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,Rn,Nn,Mn,SR,
  4128.           OMR,SP,SSH,SSL,LA,LC)
  4129.  
  4130. Timing:        2 + mvc oscillator clock cycles
  4131.  
  4132. Memory:        1 + ea program words
  4133.  
  4134.  
  4135. {MOVEM}                    Move Program Memory
  4136.  
  4137. Operation:                    Assembler Syntax:
  4138.     S->P:ea                        MOVEM    S,P:ea
  4139.     S->P:aa                        MOVEM    S,P:aa
  4140.     P:ea->D                        MOVEM    P:ea,D
  4141.     P:aa->D                        MOVEM    P:aa,D
  4142.  
  4143. Description:
  4144.     Move the specified operand from/to the specified operand from/to
  4145. the specified program (P) memory location. This is a powerful move
  4146. instruction in that the source and destination registers S and D may be
  4147. any register. All memory alterable addressing modes may be used as well
  4148. as the absolute short addressing mode.
  4149.  
  4150.     If the system stack register SSH is specified as a source operand, the
  4151. system stack pointer (SP) is postdecremented by 1 after SSH has been
  4152. read. If the system stack register SSH is specified as a destination
  4153. operand, the system stack pointer (SP) is preincremented by 1 before
  4154. SSH is written. This allows the system stack to be efficiently extended
  4155. using software stack pointer operations.
  4156.  
  4157.     When a 56-bit accumulator (A or B) is specified as a source operand S,
  4158. the accumulator value is optionnaly shifted according to the scaling
  4159. mode bits S0 and S1 in the system status register (SR). If data out of
  4160. the shifter indicates that the accumulator extension register is in use
  4161. and the data is to be moved into a 24-bit destination, the value stored
  4162. in the destination is limited to a maximum positive or negative
  4163. saturation constant to minimize truncation error. If a 24-bit source
  4164. operand is to be moved into a 16-bit destination register D, the 8 MS
  4165. bits of the 24-bit source operand are discarded, and the 16 LS bits are
  4166. stored in the 16-bit destination register. Limiting does not occur if
  4167. an individual 24-bit accumulator register (A1,A0,B1, or B0) is
  4168. specified as a source operand instead of the full 56-bit accumulator
  4169. (A or B). This limiting feature allows block floating-point operations
  4170. to be performed with error detection since the L bit in the condition
  4171. code register is latched.
  4172.  
  4173.     When a 56-bit accumulator (A or B) is specified as a destination
  4174. operand D, any 24-bit source data to be moved into that accumulator is
  4175. automatically extended to 56 bits by sign extending the MS bits of the
  4176. source operand (bit 23) and appending the source operand with 24 LS
  4177. zeros. Whenever a 16-bit source operand S is to be moved into 24-bit
  4178. destination, the 16-bit source is loaded into the LS 16 bits of the
  4179. destination operand, and the remaining 8 MS bits of the destination
  4180. are zeroed. Note that for 24-bit source operands, both the automatic
  4181. sign-extension and zeroing features may be disabled by specifying the
  4182. destination register to be one of the individual 24-bit accumulator
  4183. register (A1 or B1).
  4184.  
  4185. NOTE: Due to pipelining, if an address register (R,N, or M) is
  4186. changed using a move-type instruction, the new contents of the
  4187. destination address register will not beavailable for use during the
  4188. following instruction (i.e., there is a single instruction cycle
  4189. pipeline delay).
  4190.  
  4191. Restrictions:
  4192.     A MOVEM instruction used within a DO loop which specifies SSH as the
  4193. source operand or LA, LC, SR, SP, SSH, or SSL as the destination
  4194. operand cannot begin at the address LA-2, LA-1, or LA within that DO
  4195. loop.
  4196.  
  4197.     A MOVEM instruction which specifies SSH as the source operand or LA,
  4198. LC, SSH, SSL, or SP as the destination operand cannot be used
  4199. immediately before a DO instruction.
  4200.  
  4201.     A MOVEM instruction which specifies SSH as the source operand or LA,
  4202. LC, SR, SSH, SSL, or SP as the destination operand cannot be used
  4203. immediately before an ENDDO instruction.
  4204.  
  4205.     A MOVEM instruction which specifies SSH as the source operand or SR,
  4206. SSH, SSL, or SP as the destination operand cannot be used immediately
  4207. before an RTI instruction.
  4208.  
  4209.     A MOVEM instruction which specifies SSH as the source operand or SSH,
  4210. SSL, or SP as the destination operand cannot be used immediately before
  4211. an RTS instruction.
  4212.  
  4213.     A MOVEM instruction which specifies SP as the destination operand
  4214. cannot be used immediately before a MOVEC, MOVEM, or MOVEP instruction
  4215. which specifies SSH or SSL as the source operand.
  4216.  
  4217. Example:
  4218.     MOVEM    P:(R5+N5),LC    ;move P:(R5+N5) into the loop counter (LC)
  4219.  
  4220.     Before Execution:
  4221.         P:(R5+N5) = $000116
  4222.         LC        = $0000
  4223.  
  4224.     After Execution:
  4225.         P:(R5+N5) = $000116
  4226.         LC        = $0116
  4227.  
  4228. Explanation of Example:
  4229.     Prior to execution, the 16-bit loop couter (LC) register contains
  4230. the value $0000, and the 24-bit program (P) memory locations P:(R5+N5)
  4231. contains the value $0000, and the 24-bit program (P) memory location
  4232. P:(R5+N5) into the 16-bit LC register.
  4233.  
  4234. Conditions Codes:
  4235.  
  4236.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  4237.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4238.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  4239.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4240.     |<-           {MR}         ->|<-       {CCR}      ->|
  4241.  
  4242.     For D = SR operand:
  4243.         {L}- Set according to bit 6 of the source operand
  4244.         {E}- Set according to bit 5 of the source operand
  4245.         {U}- Set according to bit 4 of the source operand
  4246.         {N}- Set according to bit 3 of the source operand
  4247.         {Z}- Set according to bit 2 of the source operand
  4248.         {V}- Set according to bit 1 of the source operand
  4249.         {C}- Set according to bit 0 of the source operand
  4250.  
  4251.     For D != SR operand:
  4252.         {L}- Set if data limiting has occured during move
  4253.  
  4254. Instruction Format:
  4255.     MOVEM    S,P:ea
  4256.     MOVEM    S,P:aa
  4257.     MOVEM    P:ea,D
  4258.     MOVEM    P:aa,D
  4259.  
  4260.     aa = 6-bit Absolute Short Data
  4261.  
  4262.     ea = (Rn)-Nn
  4263.          (Rn)+Nn
  4264.          (Rn)-
  4265.          (Rn)+
  4266.          (Rn)
  4267.          (Rn+Nn)
  4268.          -(Rn)
  4269.          Absolute address
  4270.  
  4271.     S = (X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,Rn,Nn,Mn,SR,OMR,SP,SSH,
  4272.          SSL,LA,LC)
  4273.     D = (X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,Rn,Nn,Mn,SR,OMR,SP,SSH,
  4274.          SSL,LA,LC)
  4275.  
  4276. Timing:        2 + mvm oscillator clock cycles
  4277.  
  4278. Memory:        1 + ea program words
  4279.  
  4280.  
  4281. {MOVEP}                    Move Peripheral Data
  4282.  
  4283. Operation:                    Assembler Syntax:
  4284.     X:pp->D                        MOVEP    X:pp,D
  4285.     X:pp->X:ea                    MOVEP    X:pp,X:ea
  4286.     X:pp->Y:ea                    MOVEP    X:pp,Y:ea
  4287.     X:pp->P:ea                    MOVEP    X:pp,P:ea
  4288.     S->X:pp                        MOVEP    S,X:pp
  4289.     #xxxxxx->X:pp                MOVEP    #xxxxxx,X:pp
  4290.     X:ea->X:pp                    MOVEP    X:ea,X:pp
  4291.     Y:ea->X:pp                    MOVEP    Y:ea,X:pp
  4292.     P:ea->X:pp                    MOVEP    P:ea,X:pp
  4293.     Y:pp->D                        MOVEP    Y:pp,D
  4294.     Y:pp->X:ea                    MOVEP    Y:pp,X:ea
  4295.     Y:pp->Y:ea                    MOVEP    Y:pp,Y:ea
  4296.     Y:pp->P:ea                    MOVEP    Y:pp,P:ea
  4297.     S->Y:pp                        MOVEP    S,Y:pp
  4298.     #xxxxxx->Y:pp                MOVEP    #xxxxxx,Y:pp
  4299.     X:ea->Y:pp                    MOVEP    X:ea,Y:pp
  4300.     Y:ea->Y:pp                    MOVEP    Y:ea,Y:pp
  4301.     P:ea->Y:pp                    MOVEP    P:ea,Y:pp
  4302.  
  4303. Description:
  4304.     Move the specified operand from/to the specified X or Y I/O
  4305. peripheral. The I/O short addressing mode is used for the I/O
  4306. peripheral address. All memory addressing modes may be used for the X or
  4307. Y memory effective address.
  4308.  
  4309.     If the system stack register SSH is specified as a source operand, the
  4310. system stack pointer (SP) is postdecremented by 1 after SSH has been
  4311. read. If the system stack register SSH is specified as a destination
  4312. operand, the system stack pointer (SP) is preincremented by 1 before
  4313. SSH is written. This allows the system stack to be efficiently extended
  4314. using software stack pointer operations.
  4315.  
  4316.     When a 56-bit accumulator (A or B) is specified as a source operand S,
  4317. the accumulator value is optionally shifted according to the scaling
  4318. mode bits S0 and S1 in the system status register (SR). If the data out
  4319. of the shifter indicates that the accumulator extension register is in
  4320. use and the data is to be moved into a 24-bit destination, the value
  4321. stored in the destination is limited to a maximum positive or negative
  4322. saturation constant to minimize truncation error. If a 24-bit source
  4323. operand is to be moved into a 16-bit destination register D, the 8 MS
  4324. bits of the 24-bit source operand are discarded, and the 16 LS bits
  4325. are stored in the 16-bit destination register. Limiting does not occur
  4326. if an individual 24-bit accumulator register (A1,A0,B1, or B0) is
  4327. specified as a source operand instead of the full 56-bit accumulator
  4328. (A or B). This limiting feature allows block floating-point operations
  4329. to be performed with error detection since the L bit in the condition
  4330. code register is latched.
  4331.  
  4332.     When a 56-bit accumulator (A or B) is specified as a destination
  4333. operand D, any 24-bit source data to be moved into that accumulator is
  4334. automatically extended to 56 bits by sign extending the MS bit of the
  4335. source operand (bit 23) and appending the source operand with 24 LS
  4336. zeros. Whenever a 16-bit source operand S is to be moved into a 24-bit
  4337. destination, the 16-bit source is loaded into the LS 16 bits of the
  4338. destination operand, and the remaining 8 MS bits of the destination are
  4339. zeroed. Note that for 24-bit source operands both the automatic
  4340. sign-extension and zeroing features may be disabled by specifying the
  4341. destination register to be one of the individual 24-bit accumulator
  4342. register (A1 or B1).
  4343.  
  4344. NOTE: Due to pipelining, if an address register (R,N, or M) is
  4345. changed using a move-type instruction, the new contents of the
  4346. destination address register will not be available for use during the
  4347. following instruction (i.e., there is a single instruction cycle
  4348. pipeline delay).
  4349.  
  4350. Restrictions:
  4351.  
  4352. NOTE: The following restrictions represent very unusual operations,
  4353. which probably would never be used but are listed only for
  4354. completeness.
  4355.  
  4356.     A MOVEP instruction used within a DO loop which specifies SSH as the
  4357. source operand or LA, LC, SR, SP, SSH, or SSL as the destination
  4358. operand cannot begin at the address LA-2, LA-1, or LA within that DO
  4359. loop.
  4360.  
  4361.     A MOVEP instruction which specifies SSH as the source operand or LA,
  4362. LC, SSH, SSL, or SP as the destination operand cannot be used
  4363. immediately before a DO instruction.
  4364.  
  4365.     A MOVEP instruction which specifies SSH as the source operand or LA,
  4366. LC, SR, SSH, SSL, or SP as the destination operand cannot be used
  4367. immediately before an ENDDO instruction.
  4368.  
  4369.     A MOVEP instruction which specifies SSH as the source operand or SR,
  4370. SSH, SSL, or SP as the destination operand cannot be used immediately
  4371. before an RTI instruction.
  4372.  
  4373.     A MOVEP instruction which specifies SSH as the source operand or SSH,
  4374. SSL, or SP as the destination operand cannot be used immediately before
  4375. an RTS instruction.
  4376.  
  4377.     A MOVEP instruction which specifies SP as the destination operand
  4378. cannot be used immediately before a MOVEC, MOVEM, or MOVEP instruction
  4379. which specifies SSH or SSL as the source operand.
  4380.  
  4381. Example:
  4382.     MOVEP    #$1113,X:<<$FFFE ;initialize Bus Control Register wait states
  4383.  
  4384.     Before Execution:
  4385.         X:$FFFE (BCR) = $FFFF
  4386.  
  4387.     After Execution:
  4388.         X:$FFFE (BCR) = $1113
  4389.  
  4390. Explanation of Example:
  4391.     Prior to execution, the 16-bit, X memory-mapped, I/O bus control
  4392. register (BCR) contains the value $FFFF. The execution of the MOVEP
  4393. #$1113,X:<<$FFFE instruction moves the value $1113 into the 16-bit bus
  4394. control register X:$FFFE, resulting in one wait state for all external
  4395. X, external Y, and external program memory accesses and three wait
  4396. states for al external I/O accesses.
  4397.  
  4398. Condition Codes:
  4399.  
  4400.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  4401.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4402.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  4403.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4404.     |<-           {MR}         ->|<-       {CCR}      ->|
  4405.  
  4406.     For D = SR operand:
  4407.         {L}- Set according to bit 6 of the source operand
  4408.         {E}- Set according to bit 5 of the source operand
  4409.         {U}- Set according to bit 4 of the source operand
  4410.         {N}- Set according to bit 3 of the source operand
  4411.         {Z}- Set according to bit 2 of the source operand
  4412.         {V}- Set according to bit 1 of the source operand
  4413.         {C}- Set according to bit 0 of the source operand
  4414.  
  4415.     For D != SR operand:
  4416.         {L}- Set if data limiting has occured during move
  4417.  
  4418. Instruction Format:
  4419.     MOVEP    X:pp,D
  4420.     MOVEP    X:pp,X:ea
  4421.     MOVEP    X:pp,Y:ea
  4422.     MOVEP    X:pp,P:ea
  4423.     MOVEP    S,X:pp
  4424.     MOVEP    #xxxxxx,X:pp
  4425.     MOVEP    X:ea,X:pp
  4426.     MOVEP    Y:ea,X:pp
  4427.     MOVEP    P:ea,X:pp
  4428.     MOVEP    Y:pp,D
  4429.     MOVEP    Y:pp,X:ea
  4430.     MOVEP    Y:pp,Y:ea
  4431.     MOVEP    Y:pp,P:ea
  4432.     MOVEP    S,Y:pp
  4433.     MOVEP    #xxxxxx,Y:pp
  4434.     MOVEP    X:ea,Y:pp
  4435.     MOVEP    Y:ea,Y:pp
  4436.     MOVEP    P:ea,Y:pp
  4437.  
  4438.     #xxxxxx = Immediate Data
  4439.  
  4440.     pp = 6-bit I/O Short Address
  4441.  
  4442.     ea = (Rn)-Nn
  4443.          (Rn)+Nn
  4444.          (Rn)-
  4445.          (Rn)+
  4446.          (Rn)
  4447.          (Rn+Nn)
  4448.          -(Rn)
  4449.          Absolute address
  4450.  
  4451.     S = (X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,Rn,Nn,Mn,SR,OMR,SP,SSH,
  4452.          SSL,LA,LC)
  4453.     D = (X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,Rn,Nn,Mn,SR,OMR,SP,SSH,
  4454.          SSL,LA,LC)
  4455.  
  4456. Timing:        4 + mvp oscillator clock cycles
  4457.  
  4458. Memory:        1 + ea program words
  4459.  
  4460.  
  4461. {MPY}                        Signed Multiply
  4462.  
  4463. Operation:
  4464.     +-S1*S2->D            (parallel move)
  4465.  
  4466. Assembler Syntax:
  4467.     MPY    (+-)S1,S2,D        (parallel move)
  4468.  
  4469. Description:
  4470.     Multiply the two signed 24-bit source operands S1 and S2 and store
  4471. the resulting product in the specified 56-bit destination accumulator
  4472. D. The "-" sign option is used to negate the specified product. The
  4473. default sign option is "+".
  4474.  
  4475. Example:
  4476.     MPY    -X1,Y1,A #$543210,Y0    ;-(X1*Y1)->A, update Y0
  4477.  
  4478.     Before Execution:
  4479.         X1 = $800000
  4480.         Y1 = $C00000
  4481.         A  = $00:000000:000000
  4482.  
  4483.     After Execution:
  4484.         X1 = $800000
  4485.         Y1 = $C00000
  4486.         A  = $FF:C00000:000000
  4487.  
  4488. Explanation of Example:
  4489.     Prior to execution, the 24-bit X1 register contains the value
  4490. $800000 (-1,0), the 24-bit Y1 register contains the value $C00000,
  4491. (-0.5), and the 56-bit A accumulator contains the value
  4492. $00:000000:000000 (0.0). The execution ofthe MPY -X1,Y1,A instruction
  4493. multiples the 24-bit signed value in the X1 register by the 24-bit
  4494. signed value in the Y1 register, negates the 48-bit product , and
  4495. stores the result in the 56-bit A accumulator (-X1*Y1= -0.5=
  4496. $FF:C00000:000000 = A).
  4497.  
  4498. Condition Codes:
  4499.  
  4500.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  4501.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4502.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  4503.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4504.     |<-           {MR}         ->|<-       {CCR}      ->|
  4505.  
  4506.     {L}- Set if data limiting has occured during parallel move
  4507.     {E}- Set if the signed integer portion of A or B result is in use
  4508.     {U}- Set if A or B result is unormalized
  4509.     {N}- Set if bit 55 of A or B result is set
  4510.     {Z}- Set if A or B result equals zero
  4511.     {V}- Always cleared
  4512.  
  4513. NOTE: The definition of the E and U bits varies according to the
  4514. scaling mode being used.
  4515.  
  4516. Instruction Format:
  4517.     MPY    (+-)S1,S2,D
  4518.  
  4519.     S1 = (X0,Y0,X1,Y1)
  4520.     S2 = (X0,Y0,X1,Y1)
  4521.  
  4522.     D = (A,B)
  4523.  
  4524. Timing:        2 + mv oscillator clock cycles
  4525.  
  4526. Memory:        1 + mv program words
  4527.  
  4528.  
  4529. {MPYR}                        Signed Multiply and Round
  4530.  
  4531. Operation:
  4532.     +-S1*S2+r->D        (parallel move)
  4533.  
  4534. Assembler Syntax:
  4535.     MPYR    (+-)S1,S2,D    (parallel move)
  4536.  
  4537. Description:
  4538.     Multiply the two signed 24-bit source operands S1 and S2, round the
  4539. result convergent rounding, and store it in the specified 56-bit
  4540. destination accumulator D. The "-" sign option is used to negate the
  4541. product prior to rounding. The default sign option is "+". The
  4542. contribution of the LS bits of the result is rounded into the upper
  4543. portion of the destination accumulator (A1 or B1) by adding a constant
  4544. to the LS bits of the lower portion of the accumulator (A0 or B0). The
  4545. value of the constant added is determined by the scaling mode bits S0
  4546. and S1 in the status register. Once the rouding has been completed, the
  4547. LS bits of the destination accumulator D (A0 or B0) are loaded with
  4548. zeros to maintain an unbiased accumulator value which may be reused by
  4549. the next instruction. The upper portion of the accumulator (A1 or B1)
  4550. contains the rounded result which may be read out to the data buses.
  4551. Refer to the RND instruction for more complete information on the
  4552. convergent rounding process.
  4553.  
  4554. Example:
  4555.     MPYR    -Y0,Y0,B (R3)-N3    ;square and negate Y0, update R3
  4556.  
  4557.     Before Execution:
  4558.         Y0 = $654321
  4559.         B  = $00:000000:000000
  4560.  
  4561.     After Execution:
  4562.         Y0 = $654321
  4563.         B  = $FF:AFE3ED:000000
  4564.  
  4565. Explanation of Example:
  4566.     Prior to execution, the 24-bit Y0 register contains the value
  4567. $654321 (0.791111112), and the 56-bit B accumulator contains the value
  4568. $00:000000:000000 (0.0). The execution of the MPYR -Y0,Y0,B instruction
  4569. squares the 24-bit signed value in the Y0 register, negates the
  4570. resulting 48-bit product, rounds the result into B1, and zeros B0
  4571. (-Y0*Y0 = -0.625856790961748 approximately = $FF:AFE3EC:B76B7E, which
  4572. is rounded to the value $FF:AFE3ED:000000 = -0.625856757164002 = B).
  4573.  
  4574. Condition Codes:
  4575.  
  4576.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  4577.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4578.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  4579.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4580.     |<-           {MR}         ->|<-       {CCR}      ->|
  4581.  
  4582.     {L}- Set if data limiting has occured during parallel move
  4583.     {E}- Set if the signed integer portion of A or B result is in use
  4584.     {U}- Set if A or B result is unormalized
  4585.     {N}- Set if bit 55 of A or B result is set
  4586.     {Z}- Set if A or B result equals zero
  4587.     {V}- Always cleared
  4588.  
  4589. NOTE: The definition of the E and U bits varies according to the
  4590. scaling mode being used.
  4591.  
  4592. Instruction Format:
  4593.     MPYR    (+-)S1,S2,D
  4594.  
  4595.     S1 = (X0,Y0,X1,Y1)
  4596.     S2 = (X0,Y0,X1,Y1)
  4597.  
  4598.     D = (A,B)
  4599.  
  4600. Timing:        2 + mv oscillator clock cycles
  4601.  
  4602. Memory:        1 + mv program words
  4603.  
  4604.  
  4605. {NEG}                        Negate Accumulator
  4606.  
  4607. Operation
  4608.     0-D->D                (parallel move)
  4609.  
  4610. Assembler Syntax:
  4611.     NEG D                (parallel move)
  4612.  
  4613. Description:
  4614.     Negate the destination operand D and store the result in the
  4615. destination accumulator. This is a 56-bit, twos-complement operation.
  4616.  
  4617. Example:
  4618.     NEG    X1,X:(R3)+    Y:(R6)-,A    ;0-B->B,update A,X1,R3,R6
  4619.  
  4620.     Before Execution:
  4621.         B = $00:123456:789ABC
  4622.  
  4623.     After Execution:
  4624.         B = $FF:EDCBA9:876544
  4625.  
  4626. Explanation of Example:
  4627.     Prior to execution, the 56-bit B accumulator contains the value
  4628. $00:123456:789ABC. The NEG B instruction takes the twos complement of
  4629. the value in the B accumulator.
  4630.  
  4631. Condition Codes:
  4632.  
  4633.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  4634.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4635.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  4636.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4637.     |<-           {MR}         ->|<-       {CCR}      ->|
  4638.  
  4639.     {L}- Set if data limiting has occured during parallel move
  4640.     {E}- Set if the signed integer portion of A or B result is in use
  4641.     {U}- Set if A or B result is unormalized
  4642.     {N}- Set if bit 55 of A or B result is set
  4643.     {Z}- Set if A or B result equals zero
  4644.     {V}- Set if overflow has occurred in A or B result
  4645.  
  4646. NOTE: The definition of the E and U bits varies according to the
  4647. scaling mode being used.
  4648.  
  4649. Instruction Format:
  4650.     NEG D
  4651.  
  4652.     D = (A,B)
  4653.  
  4654. Timing:        2 + mv oscillator clock cycles
  4655.  
  4656. Memory:        1 + mv program words
  4657.  
  4658.  
  4659. {NOP}                        No operation
  4660.  
  4661. Operation
  4662.     PC = PC +1
  4663.  
  4664. Assembler Syntax:
  4665.     NOP
  4666.  
  4667. Description:
  4668.     Increment the programm counter (PC),. Pending pipeline actions,
  4669. if any, are completed. Execution continues with the instruction following
  4670. the NOP.
  4671.  
  4672. Condition Codes:
  4673.     The condition codes are not affected by this instruction
  4674.  
  4675. Instruction Format:
  4676.     NOP
  4677.  
  4678. Timing:        2 oscillator clock cycles
  4679.  
  4680. Memory:        1 program words
  4681.  
  4682.  
  4683. {NORM}                        Normalize Accumulator Iteration
  4684.  
  4685. Operation:
  4686.     If    ~E & U & ~Z = 1, then ASL D and Rn-1 -> Rn
  4687.     else if            E = 1, then ASR D and Rn+1 -> Rn
  4688.     else NOP
  4689.  
  4690.     where
  4691.     ~ denotes the logical complement
  4692.     & denotes the logical AND operator
  4693.  
  4694. Assembler Syntax:
  4695.     NORM    Rn,D
  4696.  
  4697. Description:
  4698.     Perform one normalization iteration on the specified destination operand
  4699. D, update the specified address register Rn based upon the result of that
  4700. iteration, and store the result back in the destination accumulator. This
  4701. is a 56-bit operation. If the accumulator extension is not in use, the
  4702. accumulator is unnormalized, and the accumulator is not zero, the
  4703. destination operand is arithmetically shifted one bit to the left, and the
  4704. specified address register is decremented by 1. If the accumulator extension
  4705. is in use, the destination operand is arithmetically shifted one bit to the
  4706. right, and the specified address register is incremented by 1. If the
  4707. accumulator is normalized, or zero, a NOP is executed and the specified
  4708. address register is not affectred. Since the operation of the NORM
  4709. instruction depends on the E, U and Z condition code register bits, these
  4710. bits must correctly reflect the current state of the destination accumulator
  4711. prior to executing the NORM instruction. Note that the L and V bits in the
  4712. condition code register will be cleared unless they have been improperly
  4713. set up prior to executing the NORM instruction.
  4714.  
  4715. Example:
  4716.     REP    #$2E        ;maximum number of iterations needed
  4717.     NORM    R3,A        ;perform 1 normalization iteration
  4718.  
  4719. Before Execution:
  4720.     A  = $00:000000:000001
  4721.     R3 = $0000
  4722.  
  4723. After Execution:
  4724.     A  = $00:400000:000000
  4725.     R3    $FFD2
  4726.  
  4727. Explanation of Example:
  4728.     Prior to execution, the 56-bit A accumulator contains the value
  4729. $00:000000:000001, and the 16-bit R3 address register contains the value
  4730. $0000. The repetition of the NORM R3,A instruction normalizes the value
  4731. in the 56-bit accumulator and stores the resulting number of shifts
  4732. performed during that normalization process in the R3 address register.
  4733. A negative value reflects the number of left shifts performed; a positive
  4734. number reflects the number of right shifts performed during the
  4735. normalization process.
  4736.  
  4737. Condition Codes:
  4738.  
  4739.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  4740.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4741.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  4742.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4743.     |<-           {MR}         ->|<-       {CCR}      ->|
  4744.  
  4745.     {L}- Set if overflow has occured in A or B result
  4746.     {E}- Set if the signed integer portion of A or B result is in use
  4747.     {U}- Set if A or B result is unnormalized
  4748.     {N}- Set if bit 55 of A or B result is set
  4749.     {Z}- Set if A or B result equals zero
  4750.     {V}- Set if bit 55 is changed as a result of a left shift
  4751.  
  4752. Instruction Format:
  4753.     NORM    Rn,D
  4754.  
  4755. Timing:        2 oscillator clock cycles
  4756.  
  4757. Memory:        1 program words
  4758.  
  4759.  
  4760. {NOT}                        Logical Complement
  4761.  
  4762. Operation:
  4763.     ~D[47:24] -> D[47:24]    (parallel move)
  4764.     where ~ denotes the logical NOT operator
  4765.  
  4766. Assembler Syntax:
  4767.     NOT    D                (parallel move)
  4768.  
  4769. Description:
  4770.     Take ones complement of bits 47-24 off the destination operand D and
  4771. store the result in bits 47-24 of the destination accumulator.
  4772. This instruction is a 24-bit operation. The remaining bits of the
  4773. destination operand D are not affected.
  4774.  
  4775. Example:
  4776. NOT    A AB,L:(R2)+        ;save A1,B1, take the ones complement of A1
  4777.     
  4778. Before Execution:
  4779.     A  = $00:123456:789ABC
  4780.  
  4781. After Execution:
  4782.     A  = $00:EDCBA9:789ABC
  4783.  
  4784. Explanation of Example:
  4785.     Prior to execution, the 56-bit A accumulator contains the value
  4786. $00:123456:789ABC. The NOT A instruction takes the ones complement
  4787. of bits 47-24 of the A accumulator (A1) and stores the result back in
  4788. the A1 register. The remainings bits of the A accumulator are not
  4789. affected.
  4790.  
  4791. Condition Codes:
  4792.  
  4793.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  4794.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4795.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  4796.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4797.     |<-           {MR}         ->|<-       {CCR}      ->|
  4798.  
  4799.     {L}- Set if data limiting has occured during parallel move
  4800.     {N}- Set if bit 47 of A or B result is set
  4801.     {Z}- Set if bits 47-24 A or B result are zero
  4802.     {V}- Always cleared
  4803.  
  4804. Instruction Format:
  4805.     NOT    D
  4806.  
  4807.     D = (A,B)
  4808.  
  4809. Timing:        2 + mv oscillator clock cycles
  4810.  
  4811. Memory:        1 + mv program words
  4812.  
  4813.  
  4814. {OR}                        Logical Inclusive OR
  4815.  
  4816. Operation:
  4817.     S + D[47:24] -> D[47:24] (parallel move)
  4818.     where + denotes the logical inclusive OR operator
  4819.  
  4820. Assembler Syntax:
  4821.     OR    S,D                (parallel move)
  4822.  
  4823. Description:
  4824.     Logically inclusive OR the source operand S with bits 47-24 of the
  4825. destination operand D and store the result in bits 47-24 of the
  4826. destination accumulator. This instruction is a 24-bit operation. The
  4827. remaining bits of the destination operand D are not affected.
  4828.  
  4829. Example:
  4830. OR    Y1,B    BA,L:$1234    ;save A1,B1, OR Y1 with B
  4831.  
  4832. Before Execution:
  4833.     Y1 = $FF0000
  4834.     B  = $00:123456:789ABC
  4835.  
  4836. After Execution:
  4837.     Y1 = $FF0000
  4838.     B  = $00:FF3256:789ABC
  4839.  
  4840. Explanation of Example:
  4841.     Prior to execution, the 24-bit Y1 register contains the value
  4842. $FF0000, and the 56-bit B accumulator contains the value
  4843. $00:123456:789ABC. The OR Y1,B instruction logically ORs the 24-bit
  4844. value in the Y1 register with bits 47-24 of the B accumulator (B1)
  4845. and stores the result in the B accumulator.
  4846.  
  4847. Condition Codes:
  4848.  
  4849.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  4850.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4851.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  4852.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4853.     |<-           {MR}         ->|<-       {CCR}      ->|
  4854.  
  4855.     {L}- Set if data limiting has occured during parallel move
  4856.     {N}- Set if bit 47 of A or B result is set
  4857.     {Z}- Set if bits 47-24 A or B result are zero
  4858.     {V}- Always cleared
  4859.  
  4860. Instruction Format:
  4861.     OR    S,D
  4862.  
  4863.     S = (X0,X0,X1,Y1)
  4864.     D = (A,B)
  4865.  
  4866. Timing:        2 + mv oscillator clock cycles
  4867.  
  4868. Memory:        1 + mv program words
  4869.  
  4870.  
  4871. {ORI}                        OR Immediate with Control Register
  4872.  
  4873. Operation:
  4874.     #xx + D -> D
  4875.     where + denotes the logical inclusive OR operator
  4876.  
  4877. Assembler Syntax:
  4878.     OR(I)    #xx,D
  4879.  
  4880. Description:
  4881.     Logically OR the 8-bit immediate operand (#xx) with the contents
  4882. of the destination control register D and store the result in the
  4883. destination control register. The condition code are affected only when
  4884. the condition code register (CCR) is specified as the destination
  4885. operand.
  4886.  
  4887. Restrictions:
  4888.     The ORI #xx,MR instruction cannot be used immediately before an
  4889. ENDDO or RTI instruction and cannot be one of the last three
  4890. instructions in a DO loop (at LA-2, LA-1, or LA).
  4891.  
  4892.     Example:
  4893.     ORI    #$8,MR        ;set scaling mode bit S1 to scale up
  4894.  
  4895. Before Execution:
  4896.     MR = $03
  4897. After Execution:
  4898.     MR = $0B
  4899.  
  4900. Explanation of Example:
  4901.     Prior to execution, the 8-bit mode register (MR)
  4902. contains the value $03. The ORI #$8,MR instruction logically ORs
  4903. the immediate 8-bit value $8 with the contents of the
  4904. mode register and stores the result in the mode register.
  4905.  
  4906. Condition Codes:
  4907.  
  4908.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  4909.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4910.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  4911.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  4912.     |<-           {MR}         ->|<-       {CCR}      ->|
  4913.  
  4914.     For CCR Operand:
  4915.     {L}- Set if bit 6 of the immediate operand is cleared
  4916.     {E}- Set if bit 5 of the immediate operand is cleared
  4917.     {U}- Set if bit 4 of the immediate operand is cleared
  4918.     {N}- Set if bit 3 of the immediate operand is cleared
  4919.     {Z}- Set if bit 2 of the immediate operand is cleared
  4920.     {V}- Set if bit 1 of the immediate operand is cleared
  4921.     {C}- Set if bit 0 of the immediate operand is cleared
  4922.  
  4923.     For MR and OMR Operands:
  4924.     The condition codes are not affected using these operands.
  4925.  
  4926. Instruction Format:
  4927.     ORI    #xx,D
  4928.  
  4929.     D = (MR,CCR,OMR)
  4930.  
  4931. Timing:        2 oscillator clock cycles
  4932.  
  4933. Memory:        1 program word
  4934.  
  4935.  
  4936. {REP}                        Repeat Next Instruction
  4937.  
  4938. Operation:
  4939.     LC -> TEMP; X:<ea> -> LC or
  4940.     LC -> TEMP; X:<aa> -> LC or
  4941.     LC -> TEMP; Y:<ea> -> LC or
  4942.     LC -> TEMP; Y:<aa> -> LC or
  4943.     LC -> TEMP; S -> LC      or
  4944.     LC -> TEMP; #xxx -> LC
  4945.  
  4946.     Repeat next instruction until LC=1
  4947.     TEMP -> LC
  4948.  
  4949. Assembler syntax:
  4950.     REP    X:<ea>
  4951.     REP    X:<aa>
  4952.     REP    Y:<ea>
  4953.     REP    Y:<aa>
  4954.     REP    S
  4955.     REP    #xxx
  4956.  
  4957. Description:
  4958.     Repeat the SINGLE-WORD INSTRUCTION immediately following the REP
  4959. instruction the specified number of times. The value specifying the
  4960. number of times the given instruction is to be repeated is loaded into
  4961. the 16-bit loop counter {LC} register. The single-word instruction is
  4962. then executed the specified number of times, decrementing the loop counter
  4963. (LC) after each execution until LC=1. When the REP instruction is in effect,
  4964. the repeated instruction is fetched only one time, and it remains in the
  4965. instruction register for the duration of the loop count. Thus, THE REP
  4966. INSTRUCTION IS NOT INTERRUPTIBLE (sequential repeats are also not
  4967. interruptible). The current loop counter (LC) value is stored in an internal
  4968. temporary register. If LC is set equal to zero, the instruction is repeated
  4969. 65,536 times. The instruction's effective address specifies the address of
  4970. the value wich is to be loaded into the loop counter (LC). All address
  4971. register indirect adressing modes may be used. The absolute short and the
  4972. immediate short addressing modes may also be used. The four MS bits of the
  4973. 12-bit immediate value are zeroed to form the 16-bit value that is to be
  4974. loaded into the loop counter (LC).
  4975.  
  4976.     If the {A} or {B} accumulator is specified as a SOURCE operand, the
  4977. accumulator value is optionally shifted according to the scaling mode bits
  4978. S0 and S1 in the system status register (SR). If the data out the shifter
  4979. indicates that the accumulator extension is in use, the value to be loaded
  4980. into the loop counter (LC) register will be limited to a 24-bit maximum
  4981. positive or negative saturation constant to minimize the error due to
  4982. truncation. The LS 16 bits of the resulting 24-bit value are then stored
  4983. in the 16-bit loop counter (LC) register.
  4984.  
  4985.     If the system stack register {SSH} is specified as a source operand, the
  4986. system stack pointer {SP} is postdecremented by 1 after {SSH} has been read.
  4987.  
  4988. Restrictions:
  4989.     The REP instruction can repeat any single-word instruction except the REP
  4990. instruction itself and any instruction that changes program flow. The
  4991. following instructions are not allowed to follow an REP instruction:
  4992.  
  4993. IMMEDIATELY AFTER REP
  4994.  
  4995.     DO            JSSET
  4996.     Jcc            REP
  4997.     JCLR        RTI
  4998.     JMP            RTS
  4999.     JSET        STOP
  5000.     JScc        SWI
  5001.     JSCLR        WAIT
  5002.     JSR
  5003.  
  5004.     Also a REP instruction cannot be the LAST instruction in a DO loop
  5005. (at LA). The assembler will generate an error if any of the previous
  5006. instructions are found immediately following an REP instruction.
  5007.  
  5008. Example:
  5009. REP    X0                    ;repeat (X0) times
  5010. MAC    X1,Y1,A X:(R1)+,X1 Y:(R4)+,Y1    ;X1*Y1+A -> A, update X1,Y1
  5011.  
  5012. Before execution:
  5013.     X0 = $000100
  5014.     LC = $0000
  5015.  
  5016. After execution:
  5017.     X0 = $000100
  5018.     LC = $0100
  5019.  
  5020. Explanation of example:
  5021.     Prior to execution, the 24-bit X0 register contains the value $000100,
  5022. and the 16-bit loop counter (LC) register contains the value $0000. The
  5023. execution of the REP X0 instruction takes the 24-bit value in the X0
  5024. register, truncates the MS 8 bits, and stores the 16 LS bits in the 16-bit
  5025. loop counter (LC) register. Thus, the single-word MAC instruction
  5026. immediately following the REP instruction is repeated $100 times.
  5027.  
  5028. Condition Codes:
  5029.  
  5030.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  5031.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5032.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  5033.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5034.     |<-           {MR}         ->|<-       {CCR}      ->|
  5035.  
  5036.     {L}- Set if data limiting occured using A or B as source operands
  5037.  
  5038. Instruction format:
  5039.     REP    X:<ea>
  5040.     REP    X:<aa>
  5041.     REP    Y:<ea>
  5042.     REP    Y:<aa>
  5043.     REP    S
  5044.     REP    #xxx
  5045.  
  5046.     ea = (Rn)-Nn
  5047.          (Rn)+Nn
  5048.          (Rn)-
  5049.          (Rn)+
  5050.          (Rn)
  5051.          (Rn+Nn)
  5052.          -(Rn)
  5053.  
  5054.     aa = 6-bit Absolute Short Address
  5055.  
  5056.     #xxx = 12-bit Immediate Short Data
  5057.  
  5058.     S = (X0,Y0,X1,Y1,A2,A1,A0,B2,B1,B0,A,B,R0-R7
  5059.          N0-N7,M0-M7,SR,OMR,SP,SSH,SSL,LA,LC)
  5060.  
  5061. Timing:        4 oscillator clock cycles
  5062.  
  5063. Memory:        1 program word
  5064.  
  5065.  
  5066. {RESET}                    Reset On-Chip Peripheral Devices
  5067.  
  5068. Operation:
  5069.     Reset the interrupt priority register and all on-chip peripherals
  5070.  
  5071. Assembler Syntax:
  5072.     RESET
  5073.  
  5074. Description:
  5075.     Reset the interrupt priority register and all on-chip peripherals.
  5076. This is a SOFTWARE RESET wich is NOT equivalent to a hardware reset since
  5077. only on-chip peripherals and the interrupt structure are affected. the
  5078. processor state is not affected, and execution continues with the next
  5079. instruction. All interrupt sources are disabled except for the trace,
  5080. stack error, NMI, illegal instruction, and hardware reset interrupts.
  5081.  
  5082. Restrictions:
  5083.     A RESET instruction cannot be the last instruction in a DO loop (at LA).
  5084.  
  5085. Condition Codes:
  5086.     The condition codes are not affected by this instruction.
  5087.  
  5088. Instruction Format:
  5089.     RESET
  5090.  
  5091. Timing:        4 oscillator clock cycles
  5092.  
  5093. Memory:        1 program word
  5094.  
  5095.  
  5096. {RND}                        Round Accumulator
  5097.  
  5098. Operation:
  5099.     D+r -> D (parallel move)
  5100.  
  5101. Assembler Syntax:
  5102.     RND    D (parallel move)
  5103.  
  5104. Description:
  5105.     Round the 56-bit value in the specified destination operand D and store
  5106. the result in the MSP portion of the destination accumulator (A1 or B1).
  5107. This instruction uses a convergent rounding technique. The contribution
  5108. of the LS bits of the result (A0 and B0) is rounded into the upper portion
  5109. of the result (A1 or B1) by adding a rounding constant to the LS bits of
  5110. the result. The MSP portion of the destination accumulator contains the
  5111. rounded result wich may be read out to the data buses.
  5112.  
  5113.     The value of the rounding constant added is determined by the scaling
  5114. mode bits S0 and S1 in the system register (SR). A "1" is added in the
  5115. rounding position as shown below:
  5116.  
  5117.                   Rounding        Rounding Constant
  5118. S1    S0    Scaling Mode    Pos.    55-25    24    23    22    21-0
  5119. -----------------------------------------------------------------------------
  5120. 0    0    No Scaling    23    0...0    0    1    0    0...0
  5121. 0    1    Scale Down    24    0...0    1    0    0    0...0
  5122. 1    0    Scale Up    22    0...0    0    0    1    0...0
  5123.  
  5124.     Normal or "standard" rounding consists of adding a rounding constant
  5125. to a given number of LS bits of a value to produce a rounded result. The
  5126. rounding constant depends on the scaling mode being used as previously
  5127. shown. Unfortunately, when using a twos-complement data representation,
  5128. this process introduces a positive bias in the statistical distribution
  5129. of the roundoff .error.
  5130.  
  5131.     Convergent rounding differs from "standard" rounding in that convergent
  5132. rounding attempts to remove the aforementioned positive bias by equally
  5133. distributing the round-off error. The convergent rounding technique
  5134. initially performs "standard" rounding as previously described. Again, the
  5135. rounding constant depends on the scaling mode being used. Once "standard"
  5136. rounding has been done, the convergent rounding method tests the result to
  5137. determine if ALL bits INCLUDING AND TO THE RIGHT of the rounding position
  5138. are ZERO. IF, AND ONLY IF, this SPECIAL CONDITION is true, the convergent
  5139. rounding method will clear the bit immediately to the LEFT of the rounding
  5140. position. When this special condition is true, numbers wich have a "1" in
  5141. the bit immediately to the left of the rounding position are rounded UP;
  5142. numbers with a "0" in the bit immediately to the left of the rounding
  5143. position are rounded DOWN. Thus, these numbers are rounded UP HALF the
  5144. time and rounded DOWN the rest of the time. Therefore, THE ROUNDOFF ERROR
  5145. AVERAGES OUT TO ZERO. The LS bits of the convergently rounded result are
  5146. cleared so that the rounded result may be immediately used by the next
  5147. instruction.
  5148.  
  5149. Example:
  5150.     RND    A    #$123456,X1    B,Y1    ;round A accumulator into A1, zero A0
  5151.  
  5152. Before execution:
  5153.  
  5154.     Case 1:    A = $00:123456:789ABC
  5155.     Case 2: A = $00:123456:800000
  5156.     Case 3: A = $00:123455:800000
  5157.  
  5158. After execution:
  5159.  
  5160.     Case 1:    A = $00:123456:000000
  5161.     Case 2: A = $00:123456:000000
  5162.     Case 3: A = $00:123456:000000
  5163.  
  5164. Explanation of Example:
  5165.     Prior to execution, the 56-bit A accumulator countains the value
  5166. $00:123456:789ABC for case 1, the value $00:123456:800000 for case 2, and
  5167. the value $00:123455:800000 for case 3. The execution of the RND A
  5168. instruction rounds the value in the A accumulator into the MSP portion
  5169. of the A accumulator (A1), using wonvergent rounding, and then zeros
  5170. the LSP portion of the A accumulator (A0). Note that case 2 is the special
  5171. case that distinguishes convergent rounding from standard or biased rounding.
  5172.  
  5173.  
  5174. Condition Codes:
  5175.  
  5176.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  5177.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5178.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  5179.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5180.     |<-           {MR}         ->|<-       {CCR}      ->|
  5181.  
  5182.     {L}- Set if data limiting or overflow has occured during parallel move
  5183.     {E}- Set if the signed integer portion of A or B result is in use
  5184.     {U}- Set if A or B result is unnormalized
  5185.     {N}- Set if bit 55 of A or B result is set
  5186.     {Z}- Set if A or B result are zero
  5187.     {V}- Set if overflow has occured in A or B result
  5188.  
  5189. NOTE: The definition of the E and U bits varies according to the
  5190. scaling mode being used.
  5191.  
  5192. Instruction Format:
  5193.     RND D
  5194.  
  5195.     D = (A,B)
  5196.  
  5197. Timing:        2 + mv oscillator clock cycles
  5198.  
  5199. Memory:        1 + mv program words
  5200.  
  5201.  
  5202. {ROL}                        Rotate Left
  5203.  
  5204. Operation:
  5205.  
  5206.          47        24
  5207.         +------------+
  5208.     <-C-|<-----------|<-+  (parallel move)
  5209.     |   +------------+  |
  5210.     +-------------------+
  5211.  
  5212. Assembler Syntax:
  5213.     ROL    D (parallel move)
  5214.  
  5215. Description:
  5216.     Rotate bits 47-24 of the destination operand D one bit to
  5217. the left and store the result in the destination accumulator. Prior to
  5218. instruction execution, bit 47 of D is shifted into the carry bit C, and,
  5219. prior to instruction execution, the value in the carry bit C is shifted into
  5220. bit 24 of the destination accumulator D. This instruction is a 24-bit
  5221. operation. The remaining bits of the destination operand D are not affected.
  5222.  
  5223. Example:
  5224.     ROL    A    #$314,N2    ;rotate A1 left one bit, update N2
  5225.  
  5226. Before execution:
  5227.     A  = $00:000000:000000
  5228.     SR = $0301
  5229.  
  5230. After execution:
  5231.     A  = $00:000001:000000
  5232.     SR = $0300
  5233.  
  5234. Explanation of Example:
  5235.     Prior to execution, the 56-bit A accumulator countains the value
  5236. $00:000000:00000. The execution of the ROL A instruction shifts the
  5237. 24-bit value in the A1 register one bit to the left, shifting bit 47 into
  5238. the carry bit C,rotating the carry bit C into bit 24, and storing the
  5239. result back in the A1 register.
  5240.  
  5241. Condition Codes:
  5242.  
  5243.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  5244.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5245.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  5246.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5247.     |<-           {MR}         ->|<-       {CCR}      ->|
  5248.  
  5249.     {L}- Set if data limiting has occured during parallel move
  5250.     {N}- Set if bit 47 of A or B result is set
  5251.     {Z}- Set if bits 47-24 of A or B result are zero
  5252.     {V}- Always cleared
  5253.     {C}- Set if bit 47 of A or B was set prior to instruction execution
  5254.  
  5255. Instruction Format:
  5256.     ROR D
  5257.  
  5258.     D = (A,B)
  5259.  
  5260. Timing:        2 + mv oscillator clock cycles
  5261.  
  5262. Memory:        1 + mv program words
  5263.  
  5264.  
  5265. {ROR}                        Rotate Right
  5266.  
  5267. Operation:
  5268.  
  5269.          47        24
  5270.         +------------+
  5271.     +C->|----------->|->-+    (parallel move)
  5272.     |   +------------+   |
  5273.     +--------------------+
  5274.  
  5275. Assembler Syntax:
  5276.     ROR    D                (parallel move)
  5277.  
  5278. Description:
  5279.     Rotate bits 47-24 of the destination operand D one bit to
  5280. the right and store the result in the destination accumulator. Prior to
  5281. instruction execution, bit 24 of D is shifted into the carry bit C, and,
  5282. prior to instruction execution, the value in the carry bit C is shifted
  5283. into bit 47 of the destination accumulator D. This instruction is a 24-bit
  5284. operation. The remaining bits of the destination operand D are not affected.
  5285.  
  5286. Example:
  5287.     ROR    B    #$1234,R2    ; rotate B1 right
  5288.                 ; one bit, update R2
  5289.  
  5290. Before execution:
  5291.     B  = $00:000001:222222
  5292.     SR = $0300
  5293.  
  5294. After execution:
  5295.     B  = $00:000000:222222
  5296.     SR = $0305
  5297.  
  5298. Explanation of Example:
  5299.     Prior to execution, the 56-bit B accumulator countains the
  5300. value $00:000001:222222. The execution of the ROR B instruction shifts the
  5301. 24-bit value in the B1 register one bit to the right, shifting bit 24 into
  5302. the carry bit C,rotating the carry bit C into bit 47, and storing the
  5303. result back in the B1 register.
  5304.  
  5305. Condition Codes:
  5306.  
  5307.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  5308.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5309.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  5310.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5311.     |<-           {MR}         ->|<-       {CCR}      ->|
  5312.  
  5313.     {L}- Set if data limiting has occured during parallel move
  5314.     {N}- Set if bit 47 of A or B result is set
  5315.     {Z}- Set if bits 47-24 of A or B result are zero
  5316.     {V}- Always cleared
  5317.     {C}- Set if bit 47 of A or B was set prior to
  5318.           instruction execution
  5319.  
  5320. Instruction Format:
  5321.     ROR D
  5322.  
  5323.     D = (A,B)
  5324.  
  5325. Timing:        2 + mv oscillator clock cycles
  5326.  
  5327. Memory:        1 + mv program words
  5328.  
  5329.  
  5330. {RTI}                        Return from Interrupt
  5331.  
  5332. Operation:
  5333.     SSH -> PC
  5334.     SSL -> SR
  5335.     SP - 1 -> SP
  5336.  
  5337. Assembler Syntax:
  5338.     RTI
  5339.  
  5340. Description:
  5341.     Pull the program counter (PC) and the status register (SR)
  5342. from the stack. The previous program counter and status register are lost.
  5343.  
  5344. Restrictions:
  5345.     Due to pipelining in the program controller and the fact
  5346. that the RTI instruction accesses certain controller registers, the RTI
  5347. instruction must be immediately preceded by any of the following
  5348. instructions:
  5349.  
  5350. Immediately before RTI:
  5351.     MOVEC to LA, LC, SSH, SSL, or SP
  5352.     MOVEM to LA, LC, SSH, SSL, or SP
  5353.     MOVEP to LA, LC, SSH, SSL, or SP
  5354.     MOVEC from SSH
  5355.     MOVEM from SSH
  5356.     MOVEP from SSH
  5357.     ANDI MR or ANDI CCR
  5358.     ORI MR or ORI CCR
  5359.  
  5360.  
  5361. An RTI instruction cannot be the LAST instruction in a DO loop (at LA).
  5362. An RTI instruction cannot be repeated using the REP instruction.
  5363.  
  5364. Condition Codes:
  5365.  
  5366.     {L}- Set according to the value pulled from the stack
  5367.     {E}- Set according to the value pulled from the stack
  5368.     {U}- Set according to the value pulled from the stack
  5369.     {N}- Set according to the value pulled from the stack
  5370.     {Z}- Set according to the value pulled from the stack
  5371.     {V}- Set according to the value pulled from the stack
  5372.     {C}- Set according to the value pulled from the stack
  5373.  
  5374.  
  5375. Instruction Format:
  5376.     RTI
  5377.  
  5378. Timing:        4+rx oscillator clock cycles
  5379.  
  5380. Memory:        1 program word
  5381.  
  5382.  
  5383. {RTS}                        Return from Subroutine
  5384.  
  5385. Operation:
  5386.     SSH -> PC; SP - 1 -> SP
  5387.  
  5388. Assembler Syntax:
  5389.     RTS
  5390.  
  5391. Description:
  5392.     Pull the program counter (PC) from the stack. The previous program
  5393. counter is lost. The status register (SR) is not affected.
  5394.  
  5395. Restrictions:
  5396.     Due to pipelining in the program controller and the fact that the
  5397. RTS instruction accesses certain controller registers, the RTS
  5398. instruction must be immediately preceded by any of the following
  5399. instructions:
  5400.  
  5401. Immediately before RTS:
  5402.     MOVEC to LA, LC, SSH, SSL, or SP
  5403.     MOVEM to LA, LC, SSH, SSL, or SP
  5404.     MOVEP to LA, LC, SSH, SSL, or SP
  5405.     MOVEC from SSH
  5406.     MOVEM from SSH
  5407.     MOVEP from SSH
  5408.  
  5409.  
  5410.     An RTS instruction cannot be the LAST instruction in a DO
  5411. loop (at LA).
  5412.  
  5413.     An RTS instruction cannot be repeated using the REP instruction.
  5414.  
  5415. Condition Codes:
  5416.     The condition codes are not affected by this instruction.
  5417.  
  5418. Instruction Format:
  5419.     RTS
  5420.  
  5421. Timing:        4+rx oscillator clock cycles
  5422.  
  5423. Memory:        1 program word
  5424.  
  5425.  
  5426. {SBC}                        Subtract Long with Carry
  5427.  
  5428. Operation:
  5429.     D - S - C -> D        (parallel move)
  5430.  
  5431. Assembler Syntax:
  5432.     SBC    S,D                (parallel move)
  5433.  
  5434. Description:
  5435.     subtract the source operand S and the carry bit C of the condition
  5436. code register from the destination operand D and store the result in the
  5437. destination accumulator. Long words (48 bits) may be subtracted to the
  5438. (56-bit) destination accumulator.
  5439.  
  5440. NOTE: The carry bit is set correctly for multiple precision arithmetic
  5441. using long word operands if the extension register of the destination
  5442. accumulator (A2 or B2) is the sign extension of bit 47 of the
  5443. destination accumulator (A or B).
  5444.  
  5445. Example:
  5446.     MOVE    L:<$0,X            ;get a 48-bit LS long-word operand in X
  5447.     MOVE    L:<$1,A            ;get other LS long word in A (Sing ext.)
  5448.     MOVE    L:<$2,Y            ;get a 48-bit MS long-word operand in Y
  5449.     SUB    X,A    L:<$3,B        ;sub LS words; get other MS word in B
  5450.     SBC    Y,B    A10,L:<$4    ;sub MS words with carry, save LS sum
  5451.     MOVE    B10,L:<$5        ;save MS difference
  5452.  
  5453.     Before Execution:
  5454.         A = $00:000000:000000
  5455.         X = $800000:000000
  5456.         B = $00:000000:000003
  5457.         Y = $000000:000001
  5458.  
  5459.     After Execution:
  5460.         A = $00:800000:000000
  5461.         X = $800000:000000
  5462.         B = $00:000000:000001
  5463.         Y = $000000:000001
  5464.  
  5465. Explanation of Example:
  5466.     This example illustrate long-word double-precision (96-bit) subtraction
  5467. using the SBC instruction. Prior to execution of the SUB and SBC
  5468. instructions, the double-precision 96-bit value
  5469. $000000:000001:800000:000000 is loaded into the Y and X registers (Y:X),
  5470. respectively. The other double-precision 96-bit value
  5471. $000000:000003:000000:000000 is loaded into the B and A accumulators
  5472. (B:A), respectively. Since the 48-bit value loaded into the A
  5473. accumulator is automatically sign extended to 56 bits and the other
  5474. 48-bit long-word operand is internally sign extended to 56 bits during
  5475. instruction execution, the carry bit wil be set correctly after the
  5476. execution of the SUB X,A instruction. The SBC Y,B instruction then
  5477. produces the correct MS 56-bit result. The actual 96-bit result is
  5478. stored in memory using the A10 and B10 operands (instead of A and B)
  5479. because shifting and limiting is not desired.
  5480.  
  5481. Condition Codes:
  5482.  
  5483.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  5484.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5485.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  5486.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5487.     |<-           {MR}         ->|<-       {CCR}      ->|
  5488.  
  5489.     {L}- Set if limiting (parallel move) or overflow has occured in result
  5490.     {E}- Set if the signed integer portion of A or B result is in use
  5491.     {U}- Set if A or B result is unnormalized
  5492.     {N}- Set if bit 55 of A or B result is set
  5493.     {Z}- Set if A or B result equals zero
  5494.     {V}- Set if overflow has occured in A or B result
  5495.     {C}- Set if a carry (or borrow) occurs from bit 55 of A or B result
  5496.  
  5497. NOTE: The definition of the E and U bits varies according to the
  5498. scaling mode being used.
  5499.  
  5500. Instruction Format:
  5501.     SBC    S,D
  5502.  
  5503.     S = (X,Y)
  5504.     D = (A,B)
  5505.  
  5506. Timing:        2 + mv oscillator clock cycles
  5507.  
  5508. Memory:        1 + mv program words
  5509.  
  5510.  
  5511. {STOP}                        Stop Instruction Processing
  5512.  
  5513. Operation:
  5514.     Enter the STOP processing state and stop the clock oscillator
  5515.  
  5516. Assembler Syntax:
  5517.     STOP
  5518.  
  5519. Description:
  5520.     Enter the STOP processing state. All activity in the processor is
  5521. suspended until the RESET or IRQA pin is asserted. The clock escillator
  5522. is gated off internally. The STOP processing state is a low-power standby
  5523. state.
  5524.  
  5525.     During the STOP state, port A is in an idle state with the control
  5526. signals held inactive (I.E., RD=WR=VCC etc.), the data pins (D0-D23) are
  5527. high impedance, and the address pins (A1-A15) are unchanged from the
  5528. previous instruction. If the bus grant was asserted when the STOP
  5529. instruction was executed, port A will remain three-stated until the
  5530. DSP exits the STOP state.
  5531.  
  5532.     If the exit from the STOP state was caused by a low level on the
  5533. RESET pin, then the processor will enter the reset processing state.
  5534. The time to recover from the STOP state using RESET will depend on the
  5535. oscillator used.
  5536.  
  5537.     If the exit from the STOP state was caused by a low level on the IRQA
  5538. pin, then the processor will service the highest priority pending interrupt
  5539. and will not service the IRQA interrupt unless it is highest priority. The
  5540. interrupt will be serviced after an internal delay counter counts 65,536
  5541. clock cycles (or a three clock cycle delay if the stop delay bit in the
  5542. OMR is set to one) plus 17T. During this clock stabilization count delay,
  5543. all peripherals and external interrupts are cleared and
  5544. re-enabled/arbitrated at the start of the 17T period following the count
  5545. interval. The processor will resume program execution at the instruction
  5546. following the STOP instruction that caused the entry into the STOP state
  5547. after the delay count plus 17T. If the IRQA pin is asserted when the STOP
  5548. instruction is executed, the clock will not be gated off, and the internal
  5549. delay counter will be started.
  5550.  
  5551. Restrictions:
  5552.     A STOP instruction cannot be used in a fast interrupt routine.
  5553.     A STOP instruction cannot be the last instruction in a DO loop (at LA).
  5554.     A STOP instruction cannot be repeated using REP instruction.
  5555.  
  5556. Condition Codes:
  5557.     The condition codes are not affected by this instruction.
  5558.  
  5559. Instruction Format:
  5560.     STOP
  5561.  
  5562. Timing:        The STOP instruction disable the internal clock oscillator
  5563. and internal distribution of the external clock.
  5564.  
  5565. Memory:        1 program word
  5566.  
  5567.  
  5568. {SUB}                        Subtract
  5569.  
  5570. Operation:
  5571.     D - S -> D            (parallel move)
  5572.  
  5573. Assembler Syntax:
  5574.     SUB    S,D                (parallel move)
  5575.  
  5576. Description:
  5577.     Subtract the source operand S from the destination operand D and
  5578. store the result in the destination operand D. Words (24 bits), long
  5579. words (48 bits), and accumulators (56 bits) may be added to the
  5580. destination accumulator.
  5581.  
  5582. NOTE: The carry bit is set correctly using word and long-word source
  5583. operands if the extension register of the destination accumulator (A2
  5584. or B2) is the sign extension of bit 47 of the destination accumulator
  5585. (A or B). The carry bit is always set correctly using accumulator
  5586. source operands.
  5587.  
  5588. Example:
  5589.     SUB    X1,A    X:(R2)+    N2,R0    ;24-bit subtract, load R0, update R2
  5590.  
  5591. Before Execution:
  5592.     X1 = $000003
  5593.     A  = $00:000058:242424
  5594.  
  5595. After Execution:
  5596.     X1 = $000003
  5597.     A  = $00:000055:242424
  5598.  
  5599. Explanation of Example:
  5600.     Prior to execution, the 24-bit X1 register contains the value
  5601. $000003 and the 56-bit A accumulator contains the value $00:000058:242424.
  5602. The SUB instruction automatically appends the 24-bit value in the X1
  5603. register with 24 LS zeros, sign extends the resulting 48-bit long word
  5604. to 56 bits, and subtracts the result to the 56-bit A accumulator. Thus,
  5605. 24-bit operands are subtracted from the MSP portion of A or B (A1 or B1)
  5606. because all arithmetic instructions assume a fractional, twos complement
  5607. data representation. Note that 24-bit operands can be subtracted from the
  5608. LSP portion of A or B (A0 or B0) by loading the 24-bit operand into X0 or
  5609. Y0, forming a 48-bit word by loading X1 or Y1 with the sign extension of
  5610. X0 or Y0 and executing an SUB X,A or SUB Y,A instruction.
  5611.  
  5612. Condition Codes:
  5613.  
  5614.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  5615.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5616.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  5617.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5618.     |<-           {MR}         ->|<-       {CCR}      ->|
  5619.  
  5620.     {L}- Set if limiting (parallel move) or overflow has occured in result
  5621.     {E}- Set if the signed integer portion of A or B result is in use
  5622.     {U}- Set if A or B result is unnormalized
  5623.     {N}- Set if bit 55 of A or B result is set
  5624.     {Z}- Set if A or B result equals zero
  5625.     {V}- Set if overflow has occured in A or B result
  5626.     {C}- Set if a carry (or borrow) occurs from bit 55 of A or B result
  5627.     
  5628. NOTE: The definition of the E and U bits varies according to the
  5629. scaling mode being used.
  5630.  
  5631. Instruction Format:
  5632.     SUB    S,D
  5633.  
  5634.     S = (A,B,X,Y,X0,Y0,X1,Y1)
  5635.     D = (A,B)
  5636.  
  5637. Timing:        2 + mv oscillator clock cycles
  5638.  
  5639. Memory:        1 + mv program words
  5640.  
  5641.  
  5642. {SUBL}                        Shift Left and Subtract Accumulators
  5643.  
  5644. Operation:
  5645.     2*D - S -> D        (parallel move)
  5646.  
  5647. Assembler Syntax:
  5648.     SUBL    S,D            (parallel move)
  5649.  
  5650. Description:
  5651.     Subtract the source operand S from two times the destination operand D
  5652. and store the result in the destination accumulator. The destination
  5653. operand D is arithmecally shifted one bit to the left, and a zero is
  5654. shifted into the LS bit of D prior to the subtraction operation. The carry
  5655. bit is set correctly if the source operand does not overflow as a
  5656. result of the left shift operation. The overflow bit may be set as a result
  5657. of either the shifting or addition operation (or both). This instruction is
  5658. useful for efficient divide and decimation in time (DIT) FFT algorithms.
  5659.  
  5660. Example:
  5661.     SUBL    A,B    Y:(R5+N5),R7        ;2*B-A -> B, load R7, no R5 update
  5662.  
  5663. Before Execution:
  5664.     A = $00:004000:000000
  5665.     B = $00:005000:000000
  5666.  
  5667. After Execution:
  5668.     A = $00:004000:000000
  5669.     B = $00:006000:000000
  5670.  
  5671. Explanation of example:
  5672.     Prior to execution, the 56-bit accumulator contains the value
  5673. $00:004000:000000, and the 56-bit B accumulator contains the value
  5674. $00:005000:000000. The SUBL A,B instruction subtracts the value
  5675. in the A accumulator from two times the value in the A accumulator
  5676. and stores the 56-bit result in the B accumulator.
  5677.  
  5678. Condition Codes:
  5679.  
  5680.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  5681.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5682.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  5683.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5684.     |<-           {MR}         ->|<-       {CCR}      ->|
  5685.  
  5686.     {L}- Set if limiting (parallel move) or overflow has occured in result
  5687.     {E}- Set if the signed integer portion of A or B result is in use
  5688.     {U}- Set if A or B result is unnormalized
  5689.     {N}- Set if bit 55 of A or B result is set
  5690.     {Z}- Set if A or B result equals zero
  5691.     {V}- Set if overflow has occured in A or B result or if the MS bit of
  5692.        the destination operand is changed as a result of the instruction's
  5693.        left shift
  5694.     {C}- Set if a carry (or borrow) occurs from bit 55 of A or B result
  5695.  
  5696. NOTE: The definition of the E and U bits varies according to the
  5697. scaling mode being used.
  5698.  
  5699. Instruction Format:
  5700.     SUBL    S,D
  5701.  
  5702.     S = (A,B)
  5703.     D = (A,B)
  5704.  
  5705. Timing:        2 + mv oscillator clock cycles
  5706.  
  5707. Memory:        1 + mv program words
  5708.  
  5709.  
  5710. {SUBR}                        Shift Right and Subtract Accumulators
  5711.  
  5712. Operation:
  5713.     D / 2 - S -> D        (parallel move)
  5714.  
  5715. Assembler Syntax:
  5716.     SUBR    S,D            (parallel move)
  5717.  
  5718. Description:
  5719.     Subtract the source operand S from one-half the destination operand
  5720. D and store the result in the destination accumulator. The destination
  5721. operand D is arithmetically shifted one bit to the right while the MS
  5722. bit of D is held constant prior to the subtract operation. In contrast
  5723. to the SUBL instruction, the carry bit is always set correctly, and the
  5724. overflow bit can only be set by the addition operation and not by an
  5725. overflow due to the initial shifting operation. This instuction is
  5726. useful for efficient divide and decimation in time (DIT) FFT algorithms.
  5727.  
  5728. Example:
  5729.     SUBR    B,A    N5,Y:-(R5)        ;A/2 - B -> A, update R5, save N5
  5730.  
  5731. Before execution:
  5732.     A = $80:000000:2468AC
  5733.     B = $00:000000:123456
  5734. After execution:
  5735.     A = $C0:000000:000000
  5736.     B = $00:000000:123456
  5737.  
  5738. Explanation of Example:
  5739.     Prior to execution, the 56-bit A accumulator contains the value
  5740. $80:000000:2468AC, and the 56-bit accumulator contains the value
  5741. $00:000000:123456. The SUBR B,A instruction subtract the value in
  5742. the B accumulator from one-half the value in the A accumulator and
  5743. stores the 56-bit result in the A accumulator.
  5744.  
  5745. Condition Codes:
  5746.  
  5747.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  5748.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5749.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  5750.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5751.     |<-           {MR}         ->|<-       {CCR}      ->|
  5752.  
  5753.     {L}- Set if limiting (parallel move) or overflow has occured in result
  5754.     {E}- Set if the signed integer portion of A or B result is in use
  5755.     {U}- Set if A or B result is unnormalized
  5756.     {N}- Set if bit 55 of A or B result is set
  5757.     {Z}- Set if A or B result equals zero
  5758.     {V}- Set if overflow has occured in A or B result
  5759.     {C}- Set if a carry (or borrow) occurs from bit 55 of A or B result
  5760.  
  5761. NOTE: The definition of the E and U bits varies according to the
  5762. scaling mode being used.
  5763.  
  5764. Instruction Format:
  5765.     SUBR    S,D
  5766.  
  5767.     S = (A,B)
  5768.     D = (A,B)
  5769.  
  5770. Timing:        2 + mv oscillator clock cycles
  5771.  
  5772. Memory:        1 + mv program words
  5773.  
  5774.  
  5775. {SWI}                        Software Interrupt
  5776.  
  5777. Operation:
  5778.     Begin SWI exception processing
  5779.  
  5780. Assembler Syntax:
  5781.     SWI
  5782.  
  5783. Description:
  5784.     Suspend normal instruction execution and begin SWI exception processing.
  5785. The interrupt priority level (I1,I0) is set to 3 in the status register (SR)
  5786. if a long interrupt service routine is used.
  5787.  
  5788. Restrictions:
  5789.     An SWI instruction cannot be used in a fast interrupt routine.
  5790.     An SWI instruction cannot be repeated using REP instruction.
  5791.  
  5792. Condition Codes:
  5793.     The condition codes are not affected by this instruction.
  5794.  
  5795. Instruction Format:
  5796.     SWI
  5797.  
  5798. Timing:        8 oscillator clock cycles
  5799.  
  5800. Memory:        1 program word
  5801.  
  5802.  
  5803. {Tcc}                        Transfer Conditionally{êTCC}{êTCS}{êTEC}{êTEQ}{êTES}{êTGE}{êTGT}{êTLC}{êTLE}{êTLS}{êTLT}{êTMI}{êTNE}{êTNR}{êTPL}{êTNN}
  5804.  
  5805. Operation:
  5806.     If cc, then S1 -> D1
  5807.     If cc, then S1 -> D1 and S2 -> D2
  5808.  
  5809. Assembler Syntax:
  5810.     Tcc S1,D1
  5811.     Tcc S1,D1 S2,D2
  5812.  
  5813. Description:
  5814.     Transfer data from the specified source register S1 to the specified
  5815. destination accumulator D1 if the specified condition is true. If a second
  5816. source register S2 and a second destination register D2 are also specified,
  5817. transfer data from address register S2 to address register D2 if the
  5818. specified condition is true. If the specified condition is false, a NOP
  5819. is executed. The term "cc" may specify the following conditions:
  5820.  
  5821.     "cc" Mnemonic                                Condition    
  5822.     CC (HS) - carry clear (higher or same)        C = 0
  5823.     CS (LO) - carry set (lower)                    C = 1
  5824.     EC    - extension clear                        E = 0
  5825.     EQ    - equal                                    Z = 1
  5826.     ES    - extension set                            E = 1
  5827.     GE    - greater than or equal                    N^V = 0
  5828.     GT    - greater than                            Z+(N^V) = 0
  5829.     LC    - limit clear                            L = 0
  5830.     LE    - less than or equal                    Z+(N^V) = 1
  5831.     LS    - limit set                                L = 1
  5832.     LT    - less than                                N^V = 1
  5833.     MI    - minus                                    N = 1
  5834.     NE    - not equal                                Z = 0
  5835.     NR    - normalized                            Z+(~U & ~E) = 1
  5836.     PL    - plus                                    N = 0
  5837.     NN    - not normalized                        Z+(~U & ~E) = 0
  5838.  
  5839.     where
  5840.     ~ denote the logical complement,
  5841.     + denotes the logical OR operator,
  5842.     & denotes the logical AND operator, and
  5843.     ^ denotes the logical Exclusive OR operator.
  5844.  
  5845.     When used after the CMP or CMPM instructions, the Tcc instruction
  5846. can perform many useful functions such as a "maximum value", "minimum value"
  5847.  "maximum absolute value" or "minimum absolute value" function. The desired
  5848. value is stored in the destination accumulator D1. If address register S2
  5849. is used as an address pointer into an array of data, the address of the
  5850. desired value is stored in the address register D2. The Tcc instruction
  5851. may be used after any instruction and allows efficient searching and
  5852. sorting algorithms. The Tcc instruction uses the internal data ALU paths
  5853. and internal address ALU paths. The Tcc instruction does not affect the
  5854. condition code bits.
  5855.  
  5856. Note: This instruction is considered to be a move-type instruction.
  5857. Due to pipelining, if an address register (R0-R7) is changed using a
  5858. move-type instruction, the new contents of the destination address
  5859. register will not be available for use during the following instruction
  5860. (i.e., there is a single instruction cycle pipeline delay).
  5861.  
  5862. Example:
  5863.     CMP    X0,A        ;compare X0 and A (sort for minimum)
  5864.     TGT    X0,A    R0,R1    ;transfer X0->A and R0->R1 if X0<A
  5865.  
  5866. Explanation of Example:
  5867.     In this example, the contents of the 24-bit X0 register are
  5868. transferred to the 56-bit A accumulator, and the contents of the 16-bit
  5869. R0 address register are transferred to the 16-bit R1 address register if
  5870. the specified condition is true. If the specified condition is not true,
  5871. a NOP is executed.
  5872.  
  5873.  
  5874. Condition Codes:
  5875.     The condition codes are not affected by this instruction.
  5876.  
  5877. Instruction Formats:
  5878.     Tcc    S1,D1
  5879.     Tcc    S1,D1    S2,D2
  5880.  
  5881.     S1 = (A,B,X0,Y0,X1,Y1)
  5882.     D1 = (A,B)
  5883.  
  5884.     S2 = (Rn)
  5885.     D2 = (Rn)
  5886.  
  5887. Timing:        2 oscillator clock cycles
  5888.  
  5889. Memory:        1 program word
  5890.  
  5891.  
  5892. {TFR}                        Transfer Data ALU Register
  5893.  
  5894. Operation:
  5895.     S -> D                (parallel move)
  5896.  
  5897. Assembler Syntax:
  5898.     TFR S,D                (parallel move)
  5899.  
  5900. Description:
  5901.     Transfer data from the specified source data ALU register S to the
  5902. specified destination data ALU accumulator D. TFR uses the internal data
  5903. ALU data paths; thus, data DO NOT pass through the data shifter/limiters.
  5904. This allows the full 56-bit contents of one of the accumulatorsto be
  5905. transferred into the other accumulator WITHOUT data shifting and/or
  5906. limiting. Moreover, since TFR uses the internal data ALU data paths,
  5907. parallel moves are possible. The TFR instruction only affects the L
  5908. condition code bit, wich can be set by data limiting associated with the
  5909. instruction's parallel move operations.
  5910.  
  5911. Example:
  5912.     TFR    A,B    A,X1    Y:((R4+N4),Y0    ;move A to B and X1, update Y0
  5913.  
  5914.     Before Execution:
  5915.     A  = $01:234567:89ABCD
  5916.     B  = $FF:FFFFFF:FFFFFF
  5917.  
  5918.     After Execution:
  5919.     A  = $01:234567:89ABCD
  5920.     B  = $01:234567:89ABCD
  5921.  
  5922. Explanation of Example:
  5923.     Prior to execution, the 56-bit A accumulator contains the value
  5924. $01:234567:89ABCD, and the 56-bit B accumulator contains the value
  5925. $FF:FFFFFF:FFFFFF. The execution of the TFR A,B instruction moves the
  5926. 56-bit value in the A accumulator into the 56-bit B accumulator using
  5927. the internal data ALU data paths without any data shifting and/or limiting.
  5928. The value in the B accumulator WOULD have been limited if a MOVE A,B
  5929. instruction had been used. Note, however, that the parallel move portion
  5930. of the TFR instruction DOES use the data shifter/limiter. Thus, the value
  5931. stored in the 24-bit X1 register (not shown) WOULD have been limited in
  5932. this example. This instruction illustrate a TRIPLE move instruction.
  5933.  
  5934. Condition Codes:
  5935.  
  5936.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  5937.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5938.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  5939.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5940.     |<-           {MR}         ->|<-       {CCR}      ->|
  5941.  
  5942.     {L}- Set if data limiting has occured during parallel move
  5943.  
  5944. Instruction Format:
  5945.     TFR    S,D
  5946.  
  5947.     S = (A,B,X0,Y0,X1,Y1)
  5948.     D = (A,B)
  5949.  
  5950. Timing:        2 + mv oscillator clock cycles
  5951.  
  5952. Memory:        1 + mv program words
  5953.  
  5954.  
  5955. {TST}                        Test Accumulator
  5956.  
  5957. Operation:
  5958.     S - 0                (parallel move)
  5959.  
  5960. Assembler Syntax:
  5961.     TST S                (parallel move)
  5962.  
  5963. Description:
  5964.     Compare the specified source accumulator S with zero and set the
  5965. condition codes accordingly. No result is stored although the condition
  5966. codes are updated.
  5967.  
  5968. Condition Codes:
  5969.  
  5970.      15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  5971.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5972.     |LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
  5973.     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  5974.     |<-           {MR}         ->|<-       {CCR}      ->|
  5975.  
  5976.     {L}- Set if data limiting has occured during parallel move
  5977.     {E}- Set if the signed integer portion of A or B result is in use
  5978.     {U}- Set if A or B result is unnormalized
  5979.     {N}- Set if bit 55 of A or B result is set
  5980.     {Z}- Set if A or B result equals zero
  5981.     {V}- Always cleared
  5982.  
  5983. NOTE: The definition of the E and U bits varies according to the scaling
  5984. mode being used.
  5985.  
  5986. Instruction Format:
  5987.     TST    S
  5988.  
  5989.     S = (A,B)
  5990.  
  5991. Timing:        2 + mv oscillator clock cycles
  5992.  
  5993. Memory:        1 + mv program words
  5994.  
  5995.  
  5996. {WAIT}                        Wait for Interrupt
  5997.  
  5998. Operation:
  5999.     Disable clocks to the processor core and enter the WAIT processing
  6000. state.
  6001.  
  6002. Assembler Syntax:
  6003.     WAIT
  6004.  
  6005. Description:
  6006.     Enter the WAIT processing state. The internal clocks to the processor
  6007. core and memories are gated off, and all activity in the processor is
  6008. suspended until an unmasked interrupt occurs. The clock oscillator and
  6009. the internal I/O peripheral clocks remain active. If WAIT is executed
  6010. when an interrupt is pending, the interrupt will be processed; the effect
  6011. will be the same as if the processor never entered the WAIT state and
  6012. three NOPs followed the WAIT instruction. When an unmasked interrupt or
  6013. external (hardware) processor RESET occurs, the processor leave the WAIT
  6014. state and begins exception processing of the unmasked interrupt or RESET
  6015. condition. The BR/BG circuits remain active during the WAIT state. The WAIT
  6016. state is a low-power standby state. The processor always leave the WAIT
  6017. state in the T2 clock phase. Therefore, multiple processors may be
  6018. synchronized by having them all enter the WAIT state and then interrupting
  6019. them with a common interrupt.
  6020.  
  6021. Restrictions:
  6022.     A WAIT instruction cannot be used in a fast interrupt routine.
  6023.     A WAIT instruction cannot be the last instruction in a DO loop (at LA).
  6024.     A WAIT instruction cannot be repeated using REP instruction.
  6025.  
  6026. Condition Codes:
  6027.     The condition codes are not affected by this instruction.
  6028.  
  6029. Instruction Format:
  6030.     WAIT
  6031.  
  6032. Timing:        The WAIT instruction takes a minimum of 16 cycles to execute
  6033. when an internal interrupt is pending during the execution of the WAIT
  6034. instruction.
  6035.  
  6036. Memory:        1 program word
  6037.  
  6038.  
  6039.