Document revision date: 19 July 1999 | |
Previous | Contents | Index |
The following instructions are described in this section:
Description and Opcode | Number of Instructions | |
---|---|---|
1. |
Add Packed 4 Operand
ADDP4 addlen.rw, addaddr.ab, sumlen.rw, sumaddr.ab, {R0-3.wl} |
1 |
2. |
Add Packed 6 Operand
ADDP6 add1len.rw, add1addr.ab, add2len.rw, add2addr.ab, sumlen.rw, sumaddr.ab, {R0-5.wl} |
1 |
3. |
Arithmetic Shift and Round Packed
ASHP cnt.rb, srclen.rw, srcaddr.ab, round.rb, dstlen.rw, dstaddr.ab, {R0-3.wl} |
1 |
4. |
Compare Packed 3 Operand
CMPP3 len.rw, src1addr.ab, src2addr.ab, {R0-3.wl} |
1 |
5. |
Compare Packed 4 Operand
CMPP4 src1len.rw, src1addr.ab, src2len.rw, src2addr.ab, {R0-3.wl} |
1 |
6. |
Convert Long to Packed
CVTLP src.rl, dstlen.rw, dstaddr.ab, {R0-3.wl} |
1 |
7. |
Convert Packed to Long
CVTPL srclen.rw, srcaddr.ab, {R0-3.wl}, dst.wl |
1 |
8. |
Convert Packed to Leading Separate
CVTPS srclen.rw, srcaddr.ab, dstlen.rw, dstaddr.ab, {R0-3.wl} |
1 |
9. |
Convert Packed to Trailing
CVTPT srclen.rw, srcaddr.ab, tbladdr.ab, dstlen.rw, dstaddr.ab, {R0-3.wl} |
1 |
10. |
Convert Leading Separate to Packed
CVTSP srclen.rw, srcaddr.ab, dstlen.rw, dstaddr.ab, {R0-3.wl} |
1 |
11. |
Convert Trailing to Packed
CVTTP srclen.rw, srcaddr.ab, tbladdr.ab, dstlen.rw, dstaddr.ab, {R0-3.wl} |
1 |
12. |
Divide Packed
DIVP divrlen.rw, divraddr.ab, divdlen.rw, divdaddr.ab, quolen.rw, quoaddr.ab, {R0-5.wl, --16(SP):--1(SP).wb} |
1 |
13. |
Move Packed
MOVP len.rw, srcaddr.ab, dstaddr.ab, {R0-3.wl} |
1 |
14. |
Multiply Packed
MULP mulrlen.rw, mulraddr.ab, muldlen.rw, muldaddr.ab, prodlen.rw, prodaddr.ab, {R0-5.wl} |
1 |
15. |
Subtract Packed 4 Operand
SUBP4 sublen.rw, subaddr.ab, diflen.rw, difaddr.ab, {R0-3.wl} |
1 |
16. |
Subtract Packed 6 Operand
SUBP6 sublen.rw, subaddr.ab, minlen.rw, minaddr.ab, diflen.rw, difaddr.ab, {R0-5.wl} |
1 |
Add Packed
opcode addlen.rw, addaddr.ab, sumlen.rw,
sumaddr.abopcode add1len.rw, add1addr.ab, add2len.rw,
add2addr.ab, sumlen.rw, sumaddr.ab
N|| <--- {sum string} LSS 0; | |
Z|| <--- {sum string} EQL 0; | |
V|| <--- {decimal overflow}; | |
C|| <--- 0; |
20 | ADDP4 | Add Packed 4 Operand |
21 | ADDP6 | Add Packed 6 Operand |
In 4 operand format, the addend string specified by the addend length and addend address operands is added to the sum string specified by the sum length and sum address operands, and the sum string is replaced by the result.In 6 operand format, the addend1 string specified by the addend1 length and addend1 address operands is added to the addend2 string specified by the addend2 length and addend2 address operands. The sum string specified by the sum length and sum address operands is replaced by the result.
R0 = | 0 |
R1 = | Address of the byte containing the most significant digit of the addend string |
R2 = | 0 |
R3 = | Address of the byte containing the most significant digit of the sum string |
R0 = | 0 |
R1 = | Address of the byte containing the most significant digit of the addend1 string |
R2 = | 0 |
R3 = | Address of the byte containing the most significant digit of the addend2 string |
R4 = | 0 |
R5 = | Address of the byte containing the most significant digit of the sum string |
Arithmetic Shift and Round Packed
opcode cnt.rb, srclen.rw, srcaddr.ab, round.rb,
dstlen.rw, dstaddr.ab
N|| <--- {dst string} LSS 0; | |
Z|| <--- {dst string} EQL 0; | |
V|| <--- {decimal overflow}; | |
C|| <--- 0; |
F8 | ASHP | Arithmetic Shift and Round Packed |
The source string specified by the source length and source address operands is scaled by a power of 10 specified by the count operand. The destination string specified by the destination length and destination address operands is replaced by the result.A positive count operand effectively multiplies, a negative count effectively divides, and a zero count just moves and affects condition codes. When a negative count is specified, the result is rounded using the round operand.
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 |
Compare Packed
3operand: opcode len.rw, src1addr.ab,
src2addr.ab4operand: opcode src1len.rw, src1addr.ab,
src2len.rw, src2addr.ab
N|| <--- {src1 string} LSS {src2 string}; | |
Z|| <--- {src1 string} EQL {src2 string}; | |
V|| <--- 0; | |
C|| <--- 0; |
35 | CMPP3 | Compare Packed 3 Operand |
37 | CMPP4 | Compare Packed 4 Operand |
In 3 operand format, the source 1 string specified by the length and source 1 address operands is compared to the source 2 string specified by the length and source 2 address operands. The only action is to affect the condition codes.In 4 operand format, the source 1 string specified by the source 1 length and source 1 address operands is compared to the source 2 string specified by the source 2 length and source 2 address operands. The only action is to affect the condition codes.
R0 = | 0 |
R1 = | Address of the byte containing the most significant digit of string1 |
R2 = | 0 |
R3 = | Address of the byte containing the most significant digit of string2 |
Convert Long to Packed
opcode src.rl, dstlen.rw, dstaddr.ab
N|| <--- {dst string} LSS 0; | |
Z|| <--- {dst string} EQL 0; | |
V|| <--- {decimal overflow}; | |
C|| <--- 0; |
F9 | CVTLP | Convert Long to Packed |
The source operand is converted to a packed decimal string. The destination string operand specified by the destination length and destination address operands is replaced by the result.
R0 = | 0 |
R1 = | 0 |
R2 = | 0 |
R3 = | Address of the byte containing the most significant digit of the destination string |
Convert Packed to Long
opcode srclen.rw, srcaddr.ab, dst.wl
N|| <--- dst LSS 0; | |
Z|| <--- dst EQL 0; | |
V|| <--- {integer overflow}; | |
C|| <--- 0; |
36 | CVTPL | Convert Packed to Long |
The source string specified by the source length and source address operands is converted to a longword, and the destination operand is replaced by the result.
R0 = | 0 |
R1 = | Address of the byte containing the most significant digit of the source string |
R2 = | 0 |
R3 = | 0 |
Convert Packed to Leading Separate Numeric
opcode srclen.rw, srcaddr.ab, dstlen.rw, dstaddr.ab
N|| <--- {src string} LSS 0; | |
Z|| <--- {src string} EQL 0; | |
V|| <--- {decimal overflow}; | |
C|| <--- 0; |
08 | CVTPS | Convert Packed to Leading Separate Numeric |
The source packed decimal string specified by the source length and source address operands is converted to a leading separate numeric string. The destination string specified by the destination length and destination address operands is replaced by the result.Conversion is effected by replacing the lowest-addressed byte of the destination string with the ASCII character "+" or "--", determined by the sign of the source string. The remaining bytes of the destination string are replaced by the ASCII representations of the values of the corresponding packed decimal digits of the source string.
R0 = | 0 |
R1 = | Address of the byte containing the most significant digit of the source string |
R2 = | 0 |
R3 = | Address of the sign byte of the destination string |
Convert Packed to Trailing Numeric
opcode srclen.rw, srcaddr.ab, tbladdr.ab, dstlen.rw,
dstaddr.ab
N|| <--- {src string} LSS 0; | |
Z|| <--- {src string} EQL 0; | |
V|| <--- {decimal overflow}; | |
C|| <--- 0; |
24 | CVTPT | Convert Packed to Trailing Numeric |
The source packed decimal string specified by the source length and source address operands is converted to a trailing numeric string. The destination string specified by the destination length and destination address operands is replaced by the result. The condition code N and Z bits are affected by the value of the source packed decimal string.Conversion is effected by using the highest-addressed byte of the source string (the byte containing the sign and the least significant digit), even if the source string value is --0. The assembler uses this byte as an unsigned index into a 256-byte table whose first entry (entry number 0) address is specified by the table address operand. The byte read from the table replaces the least significant byte of the destination string. The remaining bytes of the destination string are replaced by the ASCII representations of the values of the corresponding packed decimal digits of the source string.
R0 = | 0 |
R1 = | Address of the byte containing the most significant digit of the source string |
R2 = | 0 |
R3 = | Address of the most significant digit of the destination string |
Previous | Next | Contents | Index |
privacy and legal statement | ||
4515PRO_027.HTML |