VMS Help
MACRO, VAX MACRO Assembler, Instructions, CVTTP

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

    Purpose:        Convert a trailing numeric string to packed decimal
    Format:         opcode srclen.rw,srcaddr.ab,tbladdr.ab,
                           dstlen.rw,dstaddr.ab
    Operation:      {dst string} = conversion of {src string}
    C. Codes:       N = {{dst string} LSS 0}, V = {decimal overflow},
                    Z = {{dst string} EQL 0}, C = 0
    Exceptions:     Reserved operand, decimal overflow
    Opcode:         26    CVTTP    Convert trailing numeric to packed
    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.
    Notes:          After execution:

                    R0 = 0
                    R1 = address of 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.