455
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Special Math Instructions
3
APR
z Operand Specifications
Area
Word addresses
Indirect DM/EM
addresses
Con-
stants
Registers Flags
Pulse
bits
TR
bits
CIO WR HR AR T C DM EM
@DM
@EM
*DM
*EM
DR IR
Indirect
using IR
TK CF
C
OK OK OK OK OK OK OK OK OK OK
OK
---
--- OK --- --- --- ---S
OK
R ---
C
0
314 13 12 11 910 87654 2115
0
0
00100
Floating-point specification for S and D
0: Integer data
Data length specification for S and D (note 1)
0: 16-bit signed binary data
1: 32-bit signed binary data
Signed data specification for S and D
1: Signed binary data
· Signed Integer Data (Binary)
Number of coordinates minus one (m-1),
00 to FF hex (1
<
m
<
256)
__
C
0
314 13 12 11 910 8 7 6 5 4 2 115
0
0
1000 00
Floating-point specification for S and D
1: Single-precision floating-point data
· Single-precision Floating-point Data
Number of coordinates minus one (m-1),
00 to FF hex (1
<
m
<
256)
__
C+1
C+2
C+3
C+4
C+5
C+6
C+ (2m+1)
C+ (2m+2)
X0 (*1)
Y0
X1
Y1
X2
Y2
Xn
Yn
Xm
Ym
C+1
C+2
C+3
C+4
C+5
C+6
C+7
C+8
C+ (4n+1)
C+ (4n+2)
C+ (4n+3)
C+ (4n+4)
C+ (4m+1)
C+ (4m+2)
C+ (4m+3)
C+ (4m+4)
C+1
C+2
C+3
C+4
C+5
C+6
C+7
C+8
C+ (4n+1)
C+ (4n+2)
C+ (4n+3)
C+ (4n+4)
C+ (4m+1)
C+ (4m+2)
C+ (4m+3)
C+ (4m+4)
X0 (rightmost 16 bits)
X0 (leftmost 16 bits)
Y0 (rightmost 16 bits)
Y0 (leftmost 16 bits)
X1 (rightmost 16 bits)
X1 (leftmost 16 bits)
Y1 (rightmost 16 bits)
Y1 (leftmost 16 bits)
to
Xn (rightmost 16 bits)
Xn (leftmost 16 bits)
Yn (rightmost 16 bits)
Yn (leftmost 16 bits)
to
Xm (rightmost 16 bits)
Xm (leftmost 16 bits)
Ym (rightmost 16 bits)
Ym (leftmost 16 bits)
X0 (rightmost 16 bits)
X0 (leftmost 16 bits)
Y0 (rightmost 16 bits)
Y0 (leftmost 16 bits)
X1 (rightmost 16 bits)
X1 (leftmost 16 bits)
Y1 (rightmost 16 bits)
Y1 (leftmost 16 bits)
to
Xn (rightmost 16 bits)
Xn (leftmost 16 bits)
Yn (rightmost 16 bits)
Yn (leftmost 16 bits)
to
Xm (rightmost 16 bits)
Xm (leftmost 16 bits)
Ym (rightmost 16 bits)
Ym (leftmost 16 bits)
Note: Write Xm (max. X
value in the table) in word
C+1 when the I/O data in S
and D contain unsigned
data (bit 11 of C = 0).
Note: The X coordinates must be in ascending order: X
1
< X
2
< ... < X
m
. Input
all values of (X
n
, Y
n
) as binary data, regardless of the data format
specified in control word C.
16-bit BCD16-bit binary (signed or
unsigned) or 16-bit BCD data
32-bit signed binary data Floating-point data
to
to
to
to