Справочник Пользователя для Mitsubishi Electronics QCPU

Скачать
Страница из 1204
7-189
BCDDA(P),DBCDDA(P)
1
2
3
4
6
6
7
8
7
.11 Char
acter
 string processing inst
ructions
7
.11.3 
Con
ver
sion f
rom
 B
CD 4-
di
gi
t a
nd 8
-di
gi
t t
o d
eci
m
al AS
CI
I d
ata
 (
B
CDDA(
P)
,D
BCDDA(
P
))
7.11.3  
Conversion from BCD 4-digit and 8-digit to decimal ASCII data 
(BCDDA(P),DBCDDA(P))
BCDDA(P),DBCDDA(P)
Function
BCDDA
(1) Converts the individual digit numbers of hexadecimal notation of the BCD 4-digit data 
designated by 
 into ASCII codes, and stores the results into the area starting from the 
device designated by 
.
For example, when "9105" is designated for 
, the results of the operation are stored into 
the area starting from 
 in the following manner:
(2) The BCD data designated by 
 can be in the range of from 0 to 9999.
(3) The results of calculation stored in the device 
.  All zeros on the left side of the "Number of 
significant digits" are zero-suppressed.
: BCD data to be converted to ASCII (BCD 4 digits/8 digits)
: Head number of the devices where the conversion result will be stored (character string)
Setting 
Data
Internal Devices 
R, ZR
J
\
U
\G
Zn
Constants
K, H
Other
Bit
Word
Bit
Word
––
––
––
––
Process
High
performance
Redundant Universal
Basic
Command
Command
P
D
S
D
S
BCDDA,DBCDDA
BCDDAP,DBCDDAP
indicates an instruction symbol of BCDDA/DBCDDA.
S
D
S
D
S
D
Only when SM701 is OFF
+1
+2
Thousands 
place
Hundreds 
place
Tens 
place
Units 
place
b15
b12
b8
b11
b7
b4
b0
b3
ASCII code for thousands place
ASCII code for tens place
b15
b8 b7
b0
ASCII code for hundreds place
ASCII code for units place
0
S
D
D
D
S
D
9
1
0
5
+1
+2
b15
b12
b8
b11
b7
b4
b0
b3
b15
b8b7
b0
39
H
 (9)
31
H
 (1)
30
H
 (0)
35
H
 (5)
00
H
S
D
D
D
S
D
0 0 5 0
Number of significant digits
20
H