Delta AH500 Programming Manual page 393

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

Before the rotation
is executed
SM616=0
After the rotation
to the left is executed
S M614
Example 2:
When X0.0 is ON, SM616 is ON. The values of the bits in the 16-bit registers D0~D2 are rotated to
the right, and the operation result is stored in the 16-bit registers D20~D22. The value of the bit
marked ※ is transmitted to the carry flag SM614.
Before the rotation
is executed
SM616=0
After the rotation
to the left is exec uted
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.
SM616: It is the direction flag for the matrix rotation/shift.
S
b15
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
Carry flag
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
S M614
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
D
b15
0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1
Carry flag
0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1
1
0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1
S
b15
D0
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
D1
D2
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
D
b15
D20
0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1
D21
0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1
D22
0 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
After MB R is executed
MBR
b0
D0
D1
D2
b0
D20
D21
D22
Carry flag
b0
SM614
Carry flag
b0
0
SM614
6 - 2 2 5

Advertisement

Table of Contents
loading

Table of Contents