Delta AH500 Programming Manual page 421

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

D0
Carry flag
D1
D2
D20
Carry flag
D21
D22
1
Example 2:
When X0.0 is ON, SM616 is ON. The values of the bits are shifted to the right. Suppose SM615 is
ON. After the values of the bits in the 16-bit registers D0~D2 are rotated to the right, the operation
result is stored in the 16-bit registers D20~D22, and SM614 is OFF.
D0
Borr ow flag
D1
D2
D20
Borr ow flag
D21
D22
1
Additional remark:
1.
If S+n-1 or D+n-1 exceeds the device range, the instruction is not executed, SM0 is ON, and
the error code in SR0 is 16#2003.
2.
If n is less than 1, or if n is larger than 256, the instruction is not executed, SM0 is ON, and the
error code in SR0 is 16#200B.
3.
The flags:
SM614: It is the carry flag for the matrix rotation/shift/output.
SM615: It is the borrow flag for the matrix shift/output.
SM616: It is the direction flag for the matrix rotation/shift.
b 15
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
After the s hift
b 15
0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 0
0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1
0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1
b 15
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
After the s hift
b 15
0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1
0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1
1 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1
Ch a pt er 6 Ap p l i ed I ns t r uc t i ons
Borr ow flag
b 0
0
Borr ow flag
b 0
0
Carry flag
b 0
Carry flag
b 0
0
6 - 2 5 3

Advertisement

Table of Contents
loading

Table of Contents