Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
29 Applied Instructions (Data Table Operation)
29.6 BINDA / BIN to Decimal ASCII Conversion
700
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
2. 32-bit operation (DBINDA/DBINDAP)
1) Each digit of 32-bit binary data stored in the device specified by is converted into an ASCII code
(30H to 39H), and stored in the device specified by and later.
For example, when the device specified by stores "-12,345,678", the conversion result is stored in
the device specified by and later as follows:
2) The numeric range of 32-bit binary data stored in the device specified bay is from "-2,147,483,648"
to "2,147,483,647".
3) The conversion result stored in the device specified by is as follows:
a) As "sign data", "20H (space)" is set when the 32-bit binary data stored in the device specified by
is positive, and "2DH (-)" is set when 32-bit binary data stored in the device specified by is
negative.
b) "20H (space)" is stored for "0" on the left side of the effective digits (zero suppression).
c) The high-order byte of + 5 is set as follows depending on the ON/OFF status of M8091.
Related devices
ON/OFF status Contents of processing
M8091=OFF
The high-order byte of + 5 is set to "00H (NULL)".
M8091=ON
The high-order byte of + 5 is set to "20H (space)".
Device Name Description
M8091
Output character quantity
selector signal
For 16-bit operation
- When M8091 is OFF, + 3 is set to "0000H (NULL)".
- When M8091 is ON, + 3 does not change.
For 32-bit operation
- When M8091 is OFF, the high-order byte of + 5 is set to "00H (NULL)".
- When M8091 is ON, the high-order byte of + 5 is set to "20H (space)".
DBINDAP
EN ENO
d
s
Command
input
Head device storing conversion result
+0
b15
+2
b8 b7 b0
+1
High-order 16 bits
32-bit data (BIN)
+3
+5
+4
Low-order 16 bits
+1
M8091=OFF:00H
M8091=ON:20H
ASCII code for 100,000's digit
ASCII code for 1,000,000's digit
ASCII code for 1,000,000,000's digit
ASCII code for 10,000,000's digit
Sign data
ASCII code for 100,000,000's digit
00H or 20H ASCII code for 1's digit
ASCII code for 1000's digit
ASCII code for 10's digit
ASCII code for 10000's digit
ASCII code for 100's digit
ss
d
Device storing binary data to be
converted into ASCII codes
+0
+2
b0
+1
+3
+5
+4
33H(3) 32H(2)
20H (space)
31H(1)
2DH(-)
20H (space)
00H or 20H 38H(8)
35H(5)
37H(7)
34H(4)
36H(6)
M8091=OFF:00H
M8091=ON:20H
+1
-12345678
b15 b8 b7
d
ss
0 0 1 2 0 3 4 5 6 0
20H
Effective digits