/sys$common/syshlp/helplib.hlb
MACRO, VAX MACRO Assembler, Instructions, ASHx

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    Purpose:        Shift of integer
    Format:         opcode cnt.rb,src.rx,dst.wx
    Operation:      dst = src shifted cnt bits
    C. Codes:       N = {dst LSS 0}, Z = {dst EQL 0},
                    V = {integer overflow}, C = 0
    Exceptions:     Integer overflow
    Opcodes:        78    ASHL     Arithmetic shift long
                    79    ASHQ     Arithmetic shift quad
    Description:    src is arithmetically shifted by the number of bits
                    specified by cnt and the result is placed in dst.
                    Positive cnt shifts left bringing 0's into the LSB.
                    Negative cnt shifts right bringing copies of the MSB
                    into the MSB. Zero cnt copies dst to src unaffected.

 ASHP

    Purpose:        Arithmetic shift and round packed - scale numeric
                    content of a packed decimal string by a power of ten
    Format:         opcode cnt.rb,srclen.rw,srcaddr.ab,round.rb,
                      dstlen.rw,dstaddr.ab
    Operation:      {dst string} = {{src string} + {round <3:0>*
                    (10**(-cnt-1))}} * (10**cnt);
    C. Codes:       N = {{dst string} LSS 0}, Z = {{dst string} EQL 0},
                    V = {decimal overflow}, C = 0
    Exceptions:     Reserved operand, decimal overflow
    Opcodes:        F8    ASHP     Arithmetic shift packed
    Description:    src as specified by srclen and srcaddr is scaled by
                    a power of 10 specified by cnt. dst is replaced by
                    the result. A positive cnt effectively multiplies,
                    a negative cnt effectively divides and a zero cnt
                    just moves src to dst while affecting the condition
                    codes. If cnt is negative the result is rounded
                    using round.
    Notes:          After execution:

                    R0 = 0
                    R1 = address of the byte containing the
                         most-significant digit of the source string
                    R2 = 0
                    R3 = address of the byte containing the
                         most-significant digit of the destination string
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.