Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
29 Applied Instructions (Data Table Operation)
29.6 BINDA / BIN to Decimal ASCII Conversion
699
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
21
Applied Instructions
(Real Time
Clock Control)
22
Applied Instructions
(External Device)
23
Applied Instructions
(Extension
Function)
24
Applied Instructions
(Others)
25
Applied Instructions
(Block Data
Operation)
26
Applied Instructions
(Character
String Control)
27
Applied Instructions
(Data Operation 3)
28
Applied Instructions
(Data Comparison)
29
Applied Instructions
(Data Table
Operation)
30
Applied Instructions
(External Device
Communication)
Function and operation explanation
1. 16-bit operation (BINDA/BINDAP)
1) Each digit of 16-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 "-12345", the conversion result is stored in the
device specified by and later as follows:
2) The numeric range of 16-bit binary data stored in the device specified by is from "-32768" to
"32767".
3) The conversion result stored in the device specified by is as follows:
a) As "sign data", "20H (space)" is set when the 16-bit binary data stored in the device specified by
is positive, and "2DH (-)" is set when 16-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) + 3 is set as follows depending on the ON/OFF status of M8091.
ON/OFF status Contents of processing
M8091=OFF
+3 is set to "0000H (NULL)".
M8091=ON
+3 does not change
BINDAP
EN ENO
d
s
Device storing binary data to be
converted into ASCII codes
Command
input
Head device storing conversion result
+0
b15
+2
b8 b7 b0
+1
b0b15
16-bit binary data
+3
ASCII code for 1's digit
ASCII code for 10's digit
ASCII code for 10000's digit
ASCII code for 100's digit
Sign data
ASCII code for 1000's digit
0000H or source data
M8091=OFF:0000H
M8091=ON:Does not
change.
d
s
+0
b15
+2
b8 b7 b0
+1
-12345
b0b15
35H(5) 34H(4)
31H(1)
33H(3)
2DH(-)
32H(2)
0000H or source data
+3
M8091=OFF:0000H
M8091=ON:Does not change.
d
s
0 0 3 2 5
20H
Effective digits