[comp.os.vms] Instruction set help file part 2 of 4

NED@YMIR.BITNET (Ned Freed) (08/06/87)

==Instruction set help file part 2==cut here==cut here==cut here==cut here==
                longword 0 is pushed on the stack (for the condition
                handler). FP is replaced by SP, AP is replaced by
                arglist. The trap enables in PSW are set to a known
                state. Integer and decimal overflow are set
                according to bits 14 and 15 of the entry mask
                respectively. The floating underflow bit is cleared
                and the T-bit is unaffected. PC is replaced by dst +
                2, skipping the entry mask and transferring control
                to the byte beyond the mask.
.if manual
.s 1
.endif manual
Notes:          If bits 13:12 of the entry mask are not zero, a
                reserved operand fault occurs and the condition
                codes will be unpredictable. The procedure calling
                standard specifies that any procedure must preserve
                the values of R2 through R11 (via the entry mask),
                and R0 and R1 are never preserved. The time shown
                for CALLG assumes no registers are saved. If R0
                through R9 are saved the time is [780-23.40]. If
                no registers are saved a CALLG followed immediately
                by a RET requires:
                [780-13.88, 750-19.41, 730-36.78]
                [780F-13.87, 750F-19.41, 730F-37.65]
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*CALLS instruction\*
.restore
.send toc .endif global
.index ^Instructions, machine><CALLS
.else manual
2 CALLS
.endif manual
.nf
Purpose:        call with stack argument list - invoke a procedure
                with actual arguments on the stack
.if manual
.s 1
.endif manual
Format:         opcode numarg.rl,dst.ab
.if manual
.s 1
.endif manual
Operation:      {push arg count}; {align stack}; {create stack
                frame}; {set arithmetic trap enables}; {set new
                values of AP, FP, PC}
.if manual
.s 1
.endif manual
C. Codes:       N = 0, Z = 0, V = 0, C = 0
.if manual
.s 1
.endif manual
Exceptions:     Reserved operand
.if manual
.s 1
.endif manual
Opcode:         FB    CALLS    Call proc. with stack arglist
                               [780-9.80]
.if manual
.s 1
.endif manual
Description:    numarg is pushed on the stack as a longword (byte 0
                contains the number of arguments, the high-order 24
                bits are used by Digital software), SP is saved in a
                temporary (tmp) and then bits 1:0 of SP are cleared
                so the stack is longword aligned. The procedure
                entry mask (pointed to by dst) is scanned from bit
                11 to bit 0 and the contents of the registers whose
                numbers correspond to set bits in the mask are
                pushed on the stack as longwords. AP, FP and the
                current PC are pushed onto the stack as longwords.
                The condition codes are cleared. A longword
                containing the saved two low bits of SP in bits
                31:30 (tmp), 1 in bit 29, a 0 in bit 28, the low 12
                bits of the entry mask in bits 27:16 and the PSW in
                bits 15:0 with T cleared is pushed on the stack. A
                longword 0 is pushed on the stack (for the condition
                handler address within the procedure). FP is
                replaced by SP, AP is set to the saved SP (value of
                SP after numarg was pushed. The trap enables in PSW
                are set to a known state. Integer and decimal
                overflow are set according to bits 14 and 15 of the
                entry mask respectively. The floating underflow bit
                is cleared and the T-bit is unaffected. PC is
                replaced by dst + 2, skipping the entry mask and
                transferring control to the byte beyond the mask.
.if manual
.s 1
.endif manual
Notes:          If bits 13:12 of the entry mask are not zero, a
                reserved operand fault occurs and the condition
                codes will be unpredictable. The procedure calling
                standard specifies that any procedure must preserve
                the values of R2 through R11 (via the entry mask),
                and R0 and R1 are never preserved. The normal
                practice with CALLS is to push arguments onto the
                stack in reverse order. On return the argument list
                is removed from the stack automatically. The time
                shown for CALLS assumes no registers are saved.
                If R0 through R9 are saved the time is [780-24.40].
                If no registers are saved a CALLS with no arguments
                immediately followed by a RET requires:
                [780-14.76, 750-20.87, 730-37.15]
                [780F-14.75, 750F-20.87, 730F-36.61]
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*CASEx instructions\*
.restore
.send toc .endif global
.else manual
2 CASEx
.endif manual
.nf
Purpose:        perform multi-way branching depending on arithmetic
                input
.if manual
.s 1
.endif manual
Format:         opcode selector.rx,base.rx,limit.rx,disp[0].bw,...,
                disp[limit].bw
.if manual
.s 1
.endif manual
Operation:      tmp = selector - base; PC = PC + if tmp LEQU limit
                then SEXT (displ[tmp]) else {2 + 2*ZEXT (limit)}
.if manual
.s 1
.endif manual
C. Codes:       N = {tmp LSS limit}, Z = {tmp EQL limit}, V = 0,
                C = {tmp LSSU limit}
.if manual
.s 1
.endif manual
Exceptions:     None
.if manual
.s 1
.endif manual
Opcodes:        8F    CASEB    Case byte [780-2.40]
.index ^Instructions, machine><CASEB
                AF    CASEW    Case word [780-2.40]
.index ^Instructions, machine><CASEW
                CF    CASEL    Case long [780-2.20]
.index ^Instructions, machine><CASEL
.if manual
.s 1
.endif manual
Description:    base is subtracted from selector and tmp is replaced
                by the result. The temporary tmp is compared with
                limit and if it is less than or equal (unsigned) a
                branch displacement is selected by tmp added to PC
                and PC is replaced by the result. Otherwise 2 *
                (limit+1) is added to PC and the result is placed
                in PC. This causes PC to be moved past the table of
                branch displacements. The condition codes are always
                affected by the comparison of tmp with limit.
.if manual
.s 1
.endif manual
Notes:          The times shown assume the branch is taken. If the
                branch is not taken the time for all CASE
                instructions is [780-2.20].
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*CHMx instructions\*
.restore
.send toc .endif global
.else manual
2 CHMx
.endif manual
.nf
Purpose:        request the services of more privileged software
                by changing the process mode
.if manual
.s 1
.endif manual
Format:         opcode code.rw
.if manual
.s 1
.endif manual
Operation:      tmp1 = {mode selected by opcode (K = 0, E = 1,
                S = 2, U = 3)}; tmp2 = MINU(tmp1,PSL_<CUR__MOD_>);
                {maximize privilege}; tmp3 = SEXT(code); if
                {PSL_<IS_> EQLU 1} then HALT; PSL_<CUR__MOD_>__SP = SP
                tmp4 = tmp2__sp; PROBEW (from tmp4 - 1 to tmp4 - 12
                with mode = tmp2); if {access violation} then
                {initiate access violation fault}; if {translation
                not valid} then {initiate translation not valid};
                {initiate CHMx exception with new__mode = tmp2
                and parameter = tmp3 using 40 + tmp1*4 as SCB offset
                using tmp4 as the new SP and not storing SP again}
.if manual
.s 1
.endif manual
C. Codes:       N = 0, Z = 0, V = 0, C = 0
.if manual
.s 1
.endif manual
Exceptions:     Halt
.if manual
.s 1
.endif manual
Opcodes:        BC    CHMK     Change mode to kernel
.index ^Instructions, machine><CHMK
                BD    CHME     Change mode to executive
.index ^Instructions, machine><CHME
                BE    CHMS     Change mode to supervisor
.index ^Instructions, machine><CHMS
                BF    CHMU     Change mode to user
.index ^Instructions, machine><CHMU
.if manual
.s 1
.endif manual
Description:    Change mode instructions allow processes to change
                their access mode in a controlled manner. The
                instructions only increase privilege. A change in
                mode also results in a change of stack pointers;
                the old pointer is saved, the new pointer is loaded.
                The PSL, PC and any code passed by the instruction
                are pushed on the new stack. The code is sign
                extended. The destination mode selected by the
                opcode is used to select a vector from the System
                Control Block. Software convention reserves the
                negative code values to customers, positive
                code values to Digital.
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*CLRx instructions\*
.restore
.send toc .endif global
.else manual
2 CLRx
.endif manual
.nf
Purpose:        clear or zero a scalar quantity
.if manual
.s 1
.endif manual
Format:         opcode dst.wx
.if manual
.s 1
.endif manual
Operation:      dst = 0
.if manual
.s 1
.endif manual
C. Codes:       N = 0, Z = 1, V = 0, C = 0
.if manual
.s 1
.endif manual
Exceptions:     None
.if manual
.s 1
.endif manual
Opcodes:        94    CLRB     Clear byte [780-0.60]
.index ^Instructions, machine><CLRB
                B4    CLRW     Clear word [780-0.60]
.index ^Instructions, machine><CLRW
                D4    CLRL     Clear long
.index ^Instructions, machine><CLRL
                               [780-0.60, 750-1.00, 730-1.40]
                               [780F-0.60, 750F-1.00, 730F-1.27]
                7C    CLRQ     Clear quad
.index ^Instructions, machine><CLRQ
                               [780-1.20, 750-1.32, 730-4.02]
                               [780F-1.20, 750F-1.32, 730F-4.02]
                7CFD  CLRO     Clear octa
.index ^Instructions, machine><CLRO
                D4    CLRF     Clear F__floating [780-0.60]
.index ^Instructions, machine><CLRF
                7C    CLRD     Clear D__floating [780-1.20]
.index ^Instructions, machine><CLRD
                7C    CLRG     Clear G__floating [780-1.20]
.index ^Instructions, machine><CLRG
                7CFD  CLRH     Clear H__floating
.index ^Instructions, machine><CLRH
.if manual
.s 1
.endif manual
Description:    The destination operand is replaced by 0.
.if manual
.s 1
.endif manual
Notes:          CLRx is equivalent to MOVx S_^_#0,dst, but it
                is shorter.
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*CMPx instructions\*
.restore
.send toc .endif global
.else manual
2 CMPx
.endif manual
.nf
Purpose:        arithmetic comparison between two scalar quantities
.if manual
.s 1
.endif manual
Format:         opcode scr1.rx,src2.rx
.if manual
.s 1
.endif manual
Operation:      src1 - src2
.if manual
.s 1
.endif manual
C. Codes:       N = {src1 LSS src2}, Z = {src1 EQL src2},
                V = 0, C = {src1 LSSU src2} (integer),
                C = 0 (floating)
.if manual
.s 1
.endif manual
Exceptions:     None (integer), reserved operand (floating)
.if manual
.s 1
.endif manual
Opcodes:        91    CMPB     Compare byte [780-0.40]
.index ^Instructions, machine><CMPB
                B1    CMPW     Compare word [780-0.40]
.index ^Instructions, machine><CMPW
                D1    CMPL     Compare long [780-0.40]
.index ^Instructions, machine><CMPL
                51    CMPF     Compare F__floating [780-1.60]
.index ^Instructions, machine><CMPF
                71    CMPD     Compare D__floating [780-3.00]
.index ^Instructions, machine><CMPD
                51FD  CMPG     Compare G__floating
.index ^Instructions, machine><CMPG
                71FD  CMPH     Compare H__floating
.index ^Instructions, machine><CMPH
.if manual
.s 1
.endif manual
Description:    src1 is compared with src2. The only action is to
                affect the condition codes.
.if manual
.s 1
.endif manual
Notes:          On a floating reserved operand fault, the
                condition codes are unpredictable.
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*CMPCx instructions\*
.restore
.send toc .endif global
.else manual
2 CMPCx
.endif manual
.nf
Purpose:        compare two character strings
.if manual
.s 1
.endif manual
Format:         opcode len.rw,src1addr.ab,src2addr.ab       ;3 operand
                opcode src1len.rw,src1addr.ab,fill.rb       ;5 operand
                  src2len.rw,src2addr.ab
.if manual
.s 1
.endif manual
Operation:      {compare two strings with optional filling}
.if manual
.s 1
.endif manual
C. Codes:       [final codes reflect last affecting of codes
                 in the operation.]
                N = {{first byte} LSS {second byte}}, Z =
                {{first byte} EQL {second byte}}, V = 0,
                C = {{first byte} LSSU {second byte}}
.if manual
.s 1
.endif manual
Exceptions:     None
.if manual
.s 1
.endif manual
Opcodes:        29    CMPC3    Compare character 3 operand
                               [780-14.27, 750-26.48, 730-61.80]
                               [780F-14.27, 750F-26.48, 730F-62.43]
.index ^Instructions, machine><CMPC3
                2D    CMPC5    Compare character 5 operand
.index ^Instructions, machine><CMPC5
.if manual
.s 1
.endif manual
Description:    In 3-operand format the bytes of string 1 specified
                by len and src1addr are compared with string 2
                specified by len and src2addr. In 5-operand format
                the bytes of string 1 specified by src1len and
                src1addr are compared with string 2 specified by
                src2len and src2addr. If one string is longer than
                the other the shorter string is conceptually
                extended by appending bytes with the value of fill
                to the end. Comparison proceeds until all the bytes
                have been examined or inequality is detected.
                Condition codes are affected by the last character
                comparison.
.if manual
.s 1
.endif manual
Notes:          After execution R0 = number of bytes left in string
                1, R1 = address of last compared byte in string 1
                (if the strings are equal R1 will point to one
                beyond string 1), R2 = number of bytes remaining in
                string 2, R3 = address of last byte used in string
                2 (if strings are equal R3 will be one beyond the
                end of string 2). The times shown assume equal
                strings of length 10. If equal strings of length 64
                are used the times are CMPC3 - [780-24.20], CMPC5 -
                [780-26.80]. If equal strings of length 4 are used
                the times are CMPC3 - [780-5.80], CMPC5 - [780-8.00].
                If equal strings of length 512 are used the times
                are CMPC3 - [780-159.40], CMPC5 - [780-161.80]. If
                strings of length 4 with the first character unequal
                are used the times are CMPC3 - [780-7.00],
                CMPC5 - [780-9.20].
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*CMPPx instructions\*
.restore
.send toc .endif global
.else manual
2 CMPPx
.endif manual
.nf
Purpose:        compare two packed decimal strings and set the
                condition codes
.if manual
.s 1
.endif manual
Format:         opcode len.rw,scr1addr.ab,src2addr.ab       ;3 operand
                opcode src1len.rw,src1addr.ab,
                       src2len.rw,src2addr.ab               ;4 operand
.if manual
.s 1
.endif manual
Operation:      ({src1addr + ZEXT(len/2)}:src1addr) =
                ({src2addr + ZEXT(len/2)}:src2addr)         ;3 operand
                ({src1addr + ZEXT(src1len/2)}:src1addr =
                ({arc2addr + ZEXT(src2len/2)}:src2addr      ;4 operand

.if manual
.s 1
.endif manual
C. Codes:       N = {{src1 string} LSS {src2 string}}, V = 0,
                Z = {{src1 string} EQL {src2 string}}, C = 0
.if manual
.s 1
.endif manual
Exceptions:     Reserved operand
.if manual
.s 1
.endif manual
Opcodes:        35    CMPP3    Compare packed 3 operand
.index ^Instructions, machine><CMPP3
                37    CMPP4    Compare packed 4 operand
.index ^Instructions, machine><CMPP4
.if manual
.s 1
.endif manual
Description:    In 3-operand format, the source 1 string specified
                by src1addr and len is compared with the source 2
                string specified by the src2addr and len. In
                4-operand format, the source 1 string is specified
                by src1addr and src1len, the source 2 string by
                src2addr and src2len. The only action in either
                case is to affect the condition codes.
.if manual
.s 1
.endif manual
Notes:          The registers are set as follows by CMPP3 or CMPP4:
                R0 = 0, R1 = address of most significant digits of
                string 1, R2 = 0, R3 = address of most significant
                digit of string 2. R0 through R3 and the condition
                codes are unpredictable if the strings overlap or
                if a reserved operand fault occurs.
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*CMPxV instructions\*
.restore
.send toc .endif global
.else manual
2 CMPxV
.endif manual
.nf
Purpose:        compare field - compare bit field to integer
.if manual
.s 1
.endif manual
Format:         opcode pos.rl,size.rb,base.rb,src.rl
.if manual
.s 1
.endif manual
Operation:      FIELD (pos, size, base) - src
.if manual
.s 1
.endif manual
C. Codes:       N = {field LSS src}, Z = {field EQL src},
                V = 0, C = {field LSSU src}
.if manual
.s 1
.endif manual
Exceptions:     Reserved operand
.if manual
.s 1
.endif manual
Opcodes:        EC    CMPV     Compare field [780-3.00]
.index ^Instructions, machine><CMPV
                ED    CMPZV    Compare zero-extended field
.index ^Instructions, machine><CMPZV
                               [780-2.80]
.if manual
.s 1
.endif manual
Description:    The field specified by pos, base and size is
                compared with the source operand. For CMPV, src is
                compared with the sign extended field. For CMPZV,
                src is compared with the zero extended field. The
                only action is to affect the condition codes.
.if manual
.s 1
.endif manual
Notes:          The times shown assume 20 bits extracted positioned
                at bit 4.
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*CRC instruction\*
.restore
.send toc .endif global
.index ^Instructions, machine><CRC
.else manual
2 CRC
.endif manual
.nf
Purpose:        calculate cyclic redundancy check for software
                or communications checking
.if manual
.s 1
.endif manual
Format:         opcode tbl.ab,inicrc.rl,strlen.rw,stream.ab
.if manual
.s 1
.endif manual
Operation:      R0 = CRC__accumulation (initial value - inicrc,
                polynomial table - tbl, data stream - (stream,
                strlen))
.if manual
.s 1
.endif manual
C. Codes:       N = {R0 LSS 0}, Z = {R0 EQL 0}, V = 0, C = C
.if manual
.s 1
.endif manual
Exceptions:     None
.if manual
.s 1
.endif manual
Opcodes:        0B    CRC      Cyclic redundancy check
                               [780-47.91, 750-86.84, 730-188.88]
                               [780F-47.89, 750-86.84, 730-186.26]
.if manual
.s 1
.endif manual
Description:    The CRC of the data stream pointed to by stream
                and of length strlen is calculated. The initial
                CRC is given by inicrc and is normally 0 or -1
                unless the CRC is calculated in several steps.
                R0 is replaced by the result. If the polynomial
                is less than order -32, the result must be
                extracted from R0. The CRC polynomial is expressed
                by the contents of the 16-longword table.
.if manual
.s 1
.endif manual
Notes:          If the data stream is not a multiple of 8 bits in
                length, it must be right adjusted with leading 0
                fill. If the CRC polynomial is less than order -32,
                the result must be extracted from the low order
                bits of R0. Given a polynomial, the CRC table for
                that polynomial may be found by the relation:
                poly_<n_> = {coefficient of x**(order-1-n)}. This
                operation is done automatically by the system
                library routine LIB_$CRC__TABLE (poly.rl, table.ab).
                The table is the location of a 64-byte table into
                which the result will be written. This instruction
                will produce an unpredictable result if the table
                is not well formed. All well formed tables have
                entry[0] = 0 and entry[8] = a polynomial created
                by the relationship given above. If the data
                is of zero length, R0 = inicrc. The times shown
                assume a 16 byte CRC operation.
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*CVTxx instructions\*
.restore
.send toc .endif global
.else manual
2 CVTxx
.endif manual
.index ^Instructions, machine><CVT\x\x
.nf
Purpose:        convert a signed quantity to a different signed
                data type
.if manual
.s 1
.endif manual
Format:         opcode src.rx,dst.wy
.if manual
.s 1
.endif manual
Operation:      dst = conversion or src
.if manual
.s 1
.endif manual
C. Codes:       N = dst LSS 0, Z = dst EQL 0, C = 0
                V = {src cannot be represented in dst}
.if manual
.s 1
.endif manual
Exceptions:     Integer/floating overflow, reserved operand
.if manual
.s 1
.endif manual
Opcodes:        See table below:
.s 1
.test page 14
  from/to |Byte   |Word   |Long   |F__float|D__float|G__float|H__float|
  --------|-------|-------|-------|-------|-------|-------|-------|
  Byte    |       |99   xg|98   xg|4C   ei|6C   el|4CFD  e|6CFD  e|
  Word    |33   th|       |32   xg|4D   ei|6D   el|4DFD  e|6DFD  e|
  Long    |F6   th|F7   th|       |4E   rj|6E   el|4EFD  e|6EFD  e|
  F__float |48   tm|49   tm|4A   tm|       |56   ek|99FD  e|98FD  e|
  D__float |68   tn|69   tn|6A   tn|76   rl|       |       |32FD  e|
  G__float |48FD  t|49FD  t|4AFD  t|33FD  r|       |       |56FD  e|
  H__float |68FD  t|69FD  t|6AFD  t|F6FD  r|F7FD  r|76FD  r|       |
  --------|-------|-------|-------|-------|-------|-------|-------|
 legend: t - truncate, x - sign extend, e - exact, r - rounded,
         g - [780-0.80], h - [780-1.00], i - [780-1.20],
         j - [780-1.40], k - [780-1.60], l - [780-1.80],
         m - [780-2.80], n - [780-4.60].
.if manual
.s 1
.endif manual
                4B    CVTRFL   Convert and round F__floating to long
                               [780-2.80]
                6B    CVTRDL   Convert and round D__floating to long
                               [780-5.40]
                4BFD  CVTRGL   Convert and round G__floating to long
                6BFD  CVTRHL   Convert and round H__floating to long
.if manual
.s 1
.endif manual
Notes:          Integer overflow occurs if any truncated bits of src
                are not equal to the MSB of the dst. On integer
                overflow, the low order bits of the true result are
                retained. On floating overflow, dst is replaced with
                a reserved operand, with the flags: N=1, Z=0, V=1,
                and C=0. Only converts with a floating point source
                can result in a reserved operand fault. The library
                procedures MTH$CVT__D__G (rounded) and MTH$CVT__G__D
                (exact) can be used to convert between D__floating
                and G__floating, since no instructions exist
                for this operation.
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*CVTLP instruction\*
.restore
.send toc .endif global
.index ^Instructions, machine><CVTLP
.else manual
2 CVTLP
.endif manual
.nf
Purpose:        convert longword to a packed decimal string
.if manual
.s 1
.endif manual
Format:         opcode src.rl,dstlen.rw,dstaddr.ab
.if manual
.s 1
.endif manual
Operation:      {dst string} = conversion of src
.if manual
.s 1
.endif manual
C. Codes:       N = {{dst string} LSS 0}, V = {decimal overflow},
                Z = {{dst string} EQL 0}, C = 0
.if manual
.s 1
.endif manual
Exceptions:     Reserved operand, decimal overflow
.if manual
.s 1
.endif manual
Opcode:         F9    CVTLP    Convert long to packed
.if manual
.s 1
.endif manual
Description:    src is converted to a packed decimal string and the
                destination string operand specified by dstlen and
                dstaddr is replaced by the result. After execution
                R0 = R1 = R2 = 0 and R3 = address of the most
                significant digit of the destination string. dst
                and R0-R3 are unpredictable on a reserved operand
                abort. Overlapping operands will produce correct
                results.
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*CVTPL instruction\*
.restore
.send toc .endif global
.index ^Instructions, machine><CVTPL
.else manual
2 CVTPL
.endif manual
.nf
Purpose:        convert a packed decimal string to a longword
.if manual
.s 1
.endif manual
Format:         opcode srclen.rw,srcaddr.ab,dst.wl
.if manual
.s 1
.endif manual
Operation:      dst = conversion of {src string}
.if manual
.s 1
.endif manual
C. Codes:       N = {dst LSS 0}, V = {integer overflow},
                Z = {dst EQL 0}, C = 0
.if manual
.s 1
.endif manual
Exceptions:     Reserved operand, integer overflow
.if manual
.s 1
.endif manual
Opcode:         36    CVTPL    Convert packed to long
                               [780-10.85, 750-16.96, 730-47.61]
                               [780F-10.85, 750F-16.96, 730F-46.93]
.if manual
.s 1
.endif manual
Description:    The packed decimal source string src specified by
                srclen and srcaddr is converted to a longword and
                the result is placed in dst. After execution R0 =
                R2 = R3 = 0 and R1 = address of the most significant
                digit of the source string. dst is stored after all
                the registers are updated. This means that dst can
                be a register. Integer overflow can occur if the
                decimal string converts to a value outside a
                longword integer range. If this happens dst is
                replaced by the low order bits of the correct
                result. Overlapping operands will produce correct
                results.
.if manual
.s 1
.endif manual
Notes:          The times shown above assume 7 digits are converted;
                if 18 are converted the times are:
                [780-13.27, 750-21.01, 730-66.56]
                [780F-13.27, 750F-21.01, 730F-65.59]
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*CVTPS instruction\*
.restore
.send toc .endif global
.index ^Instructions, machine><CVTPS
.else manual
2 CVTPS
.endif manual
.nf
Purpose:        convert a packed decimal string to leading separate
                numeric
.if manual
.s 1
.endif manual
Format:         opcode srclen.rw,srcaddr.ab,dstlen.rw,dstaddr.ab
.if manual
.s 1
.endif manual
Operation:      {dst string} = conversion of {src string}
.if manual
.s 1
.endif manual
C. Codes:       N = {{src string} LSS 0}, V = {decimal overflow},
                Z = {{src string} EQL 0}, C = 0
.if manual
.s 1
.endif manual
Exceptions:     Reserved operand, decimal overflow
.if manual
.s 1
.endif manual
Opcode:         08    CVTPS    Convert packed to leading separate
.if manual
.s 1
.endif manual
Description:    The packed decimal source string src specified by
                srclen and srcaddr is changed to a leading separate
                numeric string and the result is placed in dst as
                specified by dstlen and dstaddr. Conversion is
                effected by replacing the lowest addressed byte of
                dst by the ASCII character "+" or "-", determined by
                the sign of the source string. The remaining bytes of
                dst are replaced by the ASCII characters that
                correspond to the digits in src.
.if manual
.s 1
.endif manual
Notes:          After execution R0 = R2 = 0, R1 = address of the most
                significant digit of src and R3 = address of the
                sign byte of dst. dst and R0-R3 are unpredictable if
                src overlaps dst, src contains an invalid nibble, or
                a reserved operand abort occurs. In the event of
                decimal overflow, the value stored in dst may differ
                from what the N and Z flags indicate. If CVTPS
                produces a -0 without overflow, dst will be changed
                to a +0 representation.
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*CVTPT instruction\*
.restore
.send toc .endif global
.index ^Instructions, machine><CVTPT
.else manual
2 CVTPT
.endif manual
.nf
Purpose:        convert a packed decimal string to trailing numeric
.if manual
.s 1
.endif manual
Format:         opcode srclen.rw,srcaddr.ab,tbladdr.ab,
                       dstlen.rw,dstaddr.ab
.if manual
.s 1
.endif manual
Operation:      {dst string} = conversion of {src string}
.if manual
.s 1
.endif manual
C. Codes:       N = {{src string} LSS 0}, V = {decimal overflow},
                Z = {{src string} EQL 0}, C = 0
.if manual
.s 1
.endif manual
Exceptions:     Reserved operand, decimal overflow
.if manual
.s 1
.endif manual
Opcode:         24    CVTPT    Convert packed to trailing numeric
                               [780-14.48, 750-18.82, 730-73.27]
                               [780F-14.49, 750F-18.82, 730F-73.23]
.if manual
.s 1
.endif manual
Description:    The packed decimal source string src specified by
                srclen and srcaddr is converted to a trailing
                numeric string and the result is placed in dst as
                specified by dstlen and dstaddr. Conversion is
                effected by using the highest addressed byte of src
                (i.e. the byte containing the sign and least
                significant digit) as an unsigned index into a 256
                byte table whose 0th entry is specified by tbladdr.
                The byte read out of the table replaces the least
                significant byte of dst. The remaining bytes of dst
                are replaced by the ASCII representations of the
                digits in src.
.if manual
.s 1
.endif manual
Notes:          After execution R0 = R2 = 0, R1 = address of the
                most significant digit of src and R3 = address of
                the sign of dst. dst and R0-R3 are unpredictable if
                src overlaps dst, src contains an invalid nibble, or
                a reserved operand abort occurs. The condition codes
                are set by the value of src even if overflow occurs.
                N is set if and only if src is nonzero and contains
                a "-". In the event of decimal overflow, the value
                stored in dst may differ from what the N and Z flags
                indicate. The times shown assume that 7 digits are
                converted; if 18 digits are converted the times are:
                [780-22.75, 750-37.18, 730-143.55]
                [780F-22.75, 750F-37.18, 730F-141.44]
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*CVTSP instruction\*
.restore
.send toc .endif global
.index ^Instructions, machine><CVTSP
.else manual
2 CVTSP
.endif manual
.nf
Purpose:        convert a leading separate numeric string to packed
                decimal
.if manual
.s 1
.endif manual
Format:         opcode srclen.rw,srcaddr.ab,dstlen.rw,dstaddr.ab
.if manual
.s 1
.endif manual
Operation:      {dst string} = conversion of {src string}
.if manual
.s 1
.endif manual
C. Codes:       N = {{dst string} LSS 0}, V = {decimal overflow},
                Z = {{dst string} EQL 0}, C = 0
.if manual
.s 1
.endif manual
Exceptions:     Reserved operand, decimal overflow
.if manual
.s 1
.endif manual
Opcode:         09    CVTSP    Convert leading separate to packed
.if manual
.s 1
.endif manual
Description:    The source leading separate numeric string src
                specified by srclen and srcaddr is converted to
                a packed decimal string and the result is placed
                in dst as specified by dstlen and dstaddr.
.if manual
.s 1
.endif manual
Notes:          A reserved operand fault will occur if the length
                of src is outside the range 0 to 31, the length of
                dst is outside the range 0 to 31, or src contains
                an invalid. Valid bytes for src are ASCII digits,
                "+", "-", or _<space_>. After execution R0 = R2 = 0,
                R1 = address of the sign  byte of src and R3 =
                address of the most significant digit of dst. dst
                and R0-R3 are unpredictable if src overlaps dst or
                a reserved operand abort occurs.
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*CVTTP instruction\*
.restore
.send toc .endif global
.index ^Instructions, machine><CVTTP
.else manual
2 CVTTP
.endif manual
.nf
Purpose:        convert a trailing numeric string to packed decimal
.if manual
.s 1
.endif manual
Format:         opcode srclen.rw,srcaddr.ab,tbladdr.ab,
                       dstlen.rw,dstaddr.ab
.if manual
.s 1
.endif manual
Operation:      {dst string} = conversion of {src string}
.if manual
.s 1
.endif manual
C. Codes:       N = {{dst string} LSS 0}, V = {decimal overflow},
                Z = {{dst string} EQL 0}, C = 0
.if manual
.s 1
.endif manual
Exceptions:     Reserved operand, decimal overflow
.if manual
.s 1
.endif manual
Opcode:         26    CVTTP    Convert trailing numeric to packed
                               [780-13.47, 750-24.14, 730-53.09]
                               [780F-13.47, 750F-24.14, 730F-52.28]
.if manual
.s 1
.endif manual
Description:    The trailing numeric source string src specified by
                srclen and srcaddr is converted to a packed
                decimal string and the result is placed in dst as
                specified by dstlen and dstaddr. Conversion is
                effected by using the highest addressed byte of src
                (i.e. the byte containing the sign and least
                significant digit) as an unsigned index into a 256
                byte table whose 0th entry is specified by tbladdr.
                The byte read out of the table replaces the highest
                addressed byte of dst. The packed digits of dst
                are replaced by the low order four bits of each
                ASCII character in src.
.if manual
.s 1
.endif manual
Notes:          After execution R0 = R2 = 0, R1 = address of the
                most significant digit of src and R3 = address of
                the byte holding the most significant digit of dst.
                dst and R0-R3 are unpredictable if dst overlaps src
                or tbl or if a reserved operand abort occurs. A
                reserved operand fault will occur if srclen or
                dstlen are not in the range 0 to 31, src contains
                an illegal ASCII character (i.e. not "0 to "9",
                "+", "-", or _<space_>), or if the translation of the
                least significant digit produces an invalid decimal
                digit or sign nibble. If src is -0, dst will be set
                to +0 with N = 0 and Z = 1. If srclen is 0 dst will
                be set to +0 and tbl will not be referenced. The times
                shown above assume 7 digits are packed; if 18 are
                packed the times are:
                [780-25.57, 750-36.27, 730-87.51]
                [780F-25.57, 750F-36.27, 730F-86.55]

.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*DECx instructions\*
.restore
.send toc .endif global
.else manual
2 DECx
.endif manual
.nf
Purpose:        decrement - subtract 1 from an integer
.if manual
.s 1
.endif manual
Format:         opcode dif.mx
.if manual
.s 1
.endif manual
Operation:      dif = dif - 1
.if manual
.s 1
.endif manual
C. Codes:       N = dif LSS 0, Z = dif EQL 0
                V = {integer overflow}, C = {borrow from MSB}
.if manual
.s 1
.endif manual
Exceptions:     Integer overflow
.if manual
.s 1
.endif manual
Opcodes:        97    DECB     Decrement byte [780-0.40]
.index ^Instructions, machine><DECB
                B7    DECW     Decrement word [780-0.40]
.index ^Instructions, machine><DECW
                D7    DECL     Decrement long [780-0.40]
.index ^Instructions, machine><DECL
.if manual
.s 1
.endif manual
Description:    One is subtracted from the dif operand and the
                dif operand is replaced by the result.
.if manual
.s 1
.endif manual
Notes:          Arithmetic overflow occurs if the largest negative
                integer is decremented. On overflow, dif is replaced
                by the largest positive integer. DECx sum is
                equivalent to SUBx2 _#1,sum, but is shorter.
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*DIVxx instructions\*
.restore
.send toc .endif global
.else manual
2 DIVxx
.endif manual
.nf
Purpose:        perform arithmetic division
.if manual
.s 1
.endif manual
Format:         opcode divr.rx,quo.mx                       ;2 operand
                opcode divr.rx,divd.rx,quo.wx               ;3 operand
.if manual
.s 1
.endif manual
Operation:      quo = quo / divr                            ;2 operand
                quo = divd / divr                           ;3 operand
.if manual
.s 1
.endif manual
C. Codes:       N = {quo LSS 0}, Z = {quo EQL 0}, C = 0,
                V = {overflow or {divr EQL 0}}
.if manual
.s 1
.endif manual
Exceptions:     Integer or floating overflow, divide by zero
                Floating underflow, reserved operand
.if manual
.s 1
.endif manual
Opcodes:        86    DIVB2    Divide byte 2 operand [780-4.60]
.index ^Instructions, machine><DIVB2
                87    DIVB3    Divide byte 3 operand [780-4.80]
.index ^Instructions, machine><DIVB3
                A6    DIVW2    Divide word 2 operand [780-6.20]
.index ^Instructions, machine><DIVW2
                A7    DIVW3    Divide word 3 operand [780-6.40]
.index ^Instructions, machine><DIVW3
                C6    DIVL2    Divide long 2 operand
.index ^Instructions, machine><DIVL2
                               [780-9.44, 750-8.14, 730-66.99]
                               [780F-9.44, 750F-8.14, 730F-15.23]
                C7    DIVL3    Divide long 3 operand
.index ^Instructions, machine><DIVL3
                               [780-9.64, 750-8.88, 730-70.28]
                               [780F-9.64, 750F-8.88, 730F-16.15]
                46    DIVF2    Divide F__floating 2 operand
.index ^Instructions, machine><DIVF2
                47    DIVF3    Divide F__floating 3 operand
.index ^Instructions, machine><DIVF3
                               [780-8.49, 750-12.83, 730-228.06]
                               [780F-4.62, 750F-6.61, 730F-10.60]
                66    DIVD2    Divide D__floating 2 operand [780-42.80]
.index ^Instructions, machine><DIVD2
                67    DIVD3    Divide D__floating 3 operand
.index ^Instructions, machine><DIVD3
                               [780-43.60, 750-71.14, 730-557.52]
                               [780F-8.84, 750F-12.82, 730F-19.58]
                46FD  DIVG2    Divide G__floating 2 operand
.index ^Instructions, machine><DIVG2
                47FD  DIVG3    Divide G__floating 3 operand
.index ^Instructions, machine><DIVG3
                               [780-52.85, 750-81.03, 730-528.25]
                               [780F-52.85, 750F-81.03, 730F-23.52]
                66FD  DIVH2    Divide H__floating 2 operand
.index ^Instructions, machine><DIVH2
                67FD  DIVH3    Divide H__floating 3 operand
.index ^Instructions, machine><DIVH3
                               [780-223.00, 750-350.96, 730-1435.65]
                               [780F-223.00, 750F-350.96, 730F-91.33]
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*DIVP instruction\*
.restore
.send toc .endif global
.index ^Instructions, machine><DIVP
.else manual
2 DIVP
.endif manual
.nf
Purpose:        divide one packed decimal string by a second
                decimal string
.if manual
.s 1
.endif manual
Format:         opcode divrlen.rw,divraddr.ab,divdlen.rw,
                       divdaddr.ab,quolen.rw,quoaddr.ab
.if manual
.s 1
.endif manual
Operation:      {quo string} = {divd string} / {divr string}
.if manual
.s 1
.endif manual
C. Codes:       N = {{quo string} LSS 0}, V = {decimal overflow},
                Z = {{quo string} EQL 0}, C = 0
.if manual
.s 1
.endif manual
Exceptions:     Reserved operand, decimal overflow, divide by zero
.if manual
.s 1
.endif manual
Opcode:         27    DIVP     Divide packed
                               [780-40.44, 750-86.12, 730-584.35]
                               [780F-40.45, 750F-86.12, 730F-575.59]
.if manual
.s 1
.endif manual
Description:    The dividend string specified by divdlen and divdaddr
                is divided by the divisor string specified by divrlen
                and divraddr. The result of the division is placed in
                the quotient string specified by quolen and quoaddr.
.if manual
.s 1
.endif manual
Notes:          This instruction may allocate a 16 byte workspace on
                the stack. After execution the SP is restored to its
                original value and the contents of {(SP) - 16} to
                {(SP) - 1} are unpredictable. The division is done
                such that: (1) The absolute value of the remainder
                (which is lost) is less than the absolute value of
                the divisor. (2) The product of the absolute value
                of the quotient and the absolute value of the divisor
                is less than or equal to the absolute value of the
                dividend. If the value of the quotient is zero the
                sign of the quotient is always positive. After DIVP
                R0 = R2 = R4 = 0, R1 = address of the most significant
                digit of divr, R3 = address of the most significant
                digit of divd and R5 = address of the most
                significant digit of quo. quo and R0-R5 will have
                unpredictable values if quo overlaps divr or divd,
                divr is 0, or a reserved operand abort occurs. The
                times for DIVP shown above assume 7 digit operands,
                if 18 digit operands are used the times are:
                [780-150.87, 750-245.95, 730-8473.45]
                [780F-150.83, 750F-245.95, 730F-8402.25]
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*EDIV instruction\*
.restore
.send toc .endif global
.index ^Instructions, machine><EDIV
.else manual
2 EDIV
.endif manual
.nf
Purpose:        perform extended-precision division
.if manual
.s 1
.endif manual
Format:         opcode divr.rl,divd.rq,quo.wl,rem.wl
.if manual
.s 1
.endif manual
Operation:      quo = divd/divr; rem = REM (divd, divr)
.if manual
.s 1
.endif manual
C. Codes:       N = {quo LSS 0}, Z = {quo EQL 0}, C = 0,
                V = {{integer overflow} OR {divr EQL 0}}
.if manual
.s 1
.endif manual
Exceptions:     Integer overflow, divide by zero
.if manual
.s 1
.endif manual
Opcode:         7B    EDIV     Extended divide
                               [780-11.93, 750-11.86, 730-100.31]
                               [780F-11.86, 750F-11.86, 730F-100.29]
.if manual
.s 1
.endif manual
Notes:          The division is performed such that the remainder
                operand (unless it is 0) has the same sign as divd.
                On overflow, or if divr is 0, then quo is replaced
                by bits 31:0 of divd and rem is replaced by 0.
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*EMODx instructions\*
.restore
.send toc .endif global
.else manual
2 EMODx
.endif manual
.nf
Purpose:        extended multiply and integerize - perform accurate
                range reduction of math function arguments
.if manual
.s 1
.endif manual
Format:         opcode mulr.rx,mulrx.rb,muld.rx,int.wl,fract.wx
.if manual
.s 1
.endif manual
Operation:      int = {integer part of muld * {mulr'mulrx}};
                frac = {fractional part of muld * {mulr'mulrx}}
.if manual
.s 1
.endif manual
C. Codes:       N = {fract LSS 0}, Z = {fract EQL 0},
                V = {integer overflow}, C = 0
.if manual
.s 1
.endif manual
Exceptions:     Integer or floating overflow, divide by zero
.if manual
.s 1
.endif manual
Opcodes:        54    EMODF    Ext. mul., integerize F__floating
.index ^Instructions, machine><EMODF
                               [780-11.80]
                74    EMODD    Ext. mul., integerize D__floating
.index ^Instructions, machine><EMODD
                               [780-33.00]
                54FD  EMODG    Ext. mul., integerize G__floating
.index ^Instructions, machine><EMODG
                74FD  EMODH    Ext. mul., integerize H__floating
.index ^Instructions, machine><EMODH
.if manual
.s 1
.endif manual
Description:    The floating multiplier extension mulrx is concatenated
                with the floating point multiplier (mulr) to gain eight
                additional low order fraction bits. This is then
                multiplied by muld. After multiplication, the integer
                portion is extracted and a floating point number is
                formed from the fractional part by truncating extra
                bits. The integer part is placed in int and the
                fractional part in frac.
.if manual
.s 1
.endif manual
Notes:          On floating underflow, both results are replaced by
                zero. Floating overflow is indicated by integer
                overflow, however integer overflow is possble without
                floating overflow.
.if manual
.test page 10
.send toc .ifnot global
.save
.flags bold
.hl 1 ^*EMUL instruction\*
.restore
.send toc .endif global
.index ^Instructions, machine><EMUL
.else manual
2 EMUL
.endif manual
.nf
Purpose:        perform extended-precision multiplication
.if manual
.s 1
.endif manual
Format:         opcode mulr.rl,muld.rl,add.rl,prod.wq
.if manual
.s 1
.endif manual
Operation:      prod = {{muld * mulr} + SEXT (add)}
.if manual
.s 1
.endif manual
C. Codes:       N = {prod LSS 0}, Z = {prod EQL 0}, V = 0, C = 0
.if manual
.s 1
.endif manual
Exceptions:     None
.if manual
.s 1
.endif manual
Opcode:         7A    EMUL     Extended multiply
                               [780-6.83, 750-10.33, 730-20.52]
                               [780F-6.83, 750F-6.48, 730F-20.23]
.if manual
.s 1
.endif manual
Description:    mulr is multiplied by muld to give a double length
                result. The addend operand is sign extended to
==End of part 2=============================================================