Operand Specifications
BCDS
Word addresses
Area
CIO
WR
HR
C
S
OK
OK
OK
D
BDSL
Word addresses
Area
CIO
WR
HR
C
S
OK
OK
OK
D
Flags
Name
Label
Error Flag
ER
Equal Flag
=
Negative Flag
N
Function
BCDS
BCDS(471) converts the signed binary data in
S to signed BCD data and writes the result in
D according to the format setting in the control
word (C).
The following table shows the possible signed binary values for each signed BCD format. An error will
occur if the source data is not within the allowed range for the specified signed BCD format.
Setting
C=0
C=1
C=2
C=3
CS/CJ/NSJ Series Instructions Reference Manual (W474)
AR
T
C
DM
EM
OK
OK
OK
OK
OK
AR
T
C
DM
EM
OK
OK
OK
OK
OK
• ON if C is not within the specified range of 0000 to 0003.
• ON if C=0 and the source data is not within the allowed
ranges (FC19 to FFFF or 0000 to 03E7).
• ON if C=1 and the source data is not within the allowed
ranges (E0C1 to FFFF or 0000 to 1F3F).
• ON if C=2 and the source data is not within the allowed
ranges (FC19 to FFFF or 0000 to 270F).
• ON if C=3 and the source data is not within the allowed
ranges (F831 to FFFF or 0000 to 270F).
• OFF in all other cases.
• ON if D is 0000 after execution.
• OFF in all other cases.
• ON if C=0 or 1 and the result's sign bit is ON after execution.
• ON if C=2 and the leftmost digit of the result is F.
• ON if C=3 and the leftmost digit of the result is A or F.
• OFF in all other cases.
Signed binary values
FC19 to FFFF and 0000 to 03E7
E0C1 to FFFF and 0000 to 1F3F
FC19 to FFFF and 0000 to 270F
F831 to FFFF and 0000 to 270F
Indirect DM/EM
addresses
Con-
stants
@DM
*DM
DR
@EM
*EM
OK
OK
OK
OK
---
Indirect DM/EM
addresses
Con-
stants
@DM
*DM
DR
@EM
*EM
OK
OK
OK
OK
---
---
Operation
• ON if C is not within the specified range of 0000 to 0003.
• ON if C=0 and the source data is not within the range:
• FF67 6981 to FFFF FFFF or 0000 0000 to 0098 967F.
• ON if C=1 and the source data is not within the range:
• FB3B 4C01 to FFFF FFFF or 0000 0000 to 04C4 B3FF.
• ON if C=2 and the source data is not within the range:
• FF67 6981 to FFFF FFFF or 0000 0000 to 05F5 E0FF.
• ON if C=0003 and the source data is not within the range:
• FECE D301 to FFFF FFFF or 0000 0000 to 05F5 E0FF.
• OFF in all other cases.
Signed binary
3. Instructions
Registers
Flags
Pulse
bits
Indirect
IR
TK
CF
using IR
---
OK
---
---
Registers
Flags
Pulse
bits
Indirect
IR
TK
CF
using IR
---
OK
---
---
Signed BCD format
specified in C
Signed BCD
Signed BCD values
–999 to –1 and 0 to 999
–7999 to –1 and 0 to 7999
–999 to –1 and 0 to 9999
–1999 to –1 and 0 to 9999
TR
bits
---
---
TR
bits
---
---
3
413
Need help?
Do you have a question about the CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 and is the answer not in the manual?
Questions and answers