259
D E S T R P
S1
S2
D
1
2
M
3
○
FNC
116
X Y M S
D.b R.b
KnX KnY
KnM KnS
T C
D,R
V,Z
UnG
K,H
E
" $"
S1
D
S2
S1 : the source of BIN floating point number
S2 : the devices to appoint the conversion format
D : the head ID of the converted storage devices
DESTR D20 D10 D0
X0
S1
S2
D
This instruction uses a BIN floating point number at the to perform the conversion. By the format parameters
at the to convert each digit of that number become an ASCII code and combine those codes to a string, then
stores into the devices which are headed by .
S1
S2
D
Format of floating point number
to display
Length of the converted string
Number of digits after the decimal
point at the string
S2
+1
S2
+2
S2
0 : By the decimal notation; 1 : By the exponential notation
2~24, the conversion could not exceed 24 characters.
0~7, input 0 if the conversion is used to get an integer.
This instruction will use the following ASCII conversion table:
0
1
2
3
4
5
6
7 8
9
30H 31H 32H 33H 34H 35H 36H 37H 38H 39H
By the decimal notation:
D0
Lower
8 bits
D0
Upper
8 bits
D1
Lower
8 bits
D1
Upper
8 bits
D2
Lower
8 bits
D2
Upper
8 bits
D3
Lower
8 bits
D3
Upper
8 bits
D4
2DH( –)
20H( )
31H( 1) 2EH(•) 32H(2) 33H(3) 34H( 4) 36H(6)
0000H
D
–1.23456
–
1
2
3
4
6
S1
=(D21, D20)
The expanded number during the conversion
The positive or negative sign is using the 20H to represent positive; the 2DH represents negative.
The byte next to the positive or negative sign is a blank space, that will ll in the code 20H.
S2
If ( +2)=0, that indicates an integer will be shown, so there is no decimal point in the string; if ( +2)>0,
that indicates the number has a fractional part, so the decimal point will be added to the string.
S2
The expanded number 1.2346 is caused by to round off the content of next digit 6, hence that increases the
last used digit from 5 to 6.
When the expanded number converts to the ASCII codes, the instruction adds the end of string at the tail
automatically. If the set length of the string is an odd number, the end of string is 00H; in addition, the string
with even number set length will add the end of string 0000H. Thus, the D4 at the converted string with the
value 0000H that is the end of string.
SPACE
20H
2DH 2EH
–
D10
D11
D12
0
8
4
To assign the process is by the decimal notation
Positive or
negative
sign
Space
Decimal
point
End of
string
2BH
+
45H
E
One's
place
4 digits after the
decimal point
S2
Operand
Devices
Sign & Number
ASCII Cord
Convert BIN Floating Point to
Character String