
Instruction Set
Conversion
3-24
Conversion Instructions
Instruction
Description
Convert from BCD
FRD
When the input conditions are true, convert the value in the Source (D9:3) to an integer value
and store the result in the Destination (N7:12). The source must be in the range of 0-9999
(BCD).
Convert to BCD
TOD
When the input conditions are true, convert the value in Source (N7:3) to a BCD format and store
the result in the Destination (D9:5).
FROM BCD
Source
D9:3
0037
Destination
N7:12
37
FRD
Status Bit
Description
C
always resets
V
always resets
Z
sets if the destination value is zero; otherwise resets
S
always resets
TO BCD
Source
N7:3
44
Destination
D9:5
0044
TOD
Status Bit
Description
C
always resets
V
sets if the source value is negative or greater than
9999 (i.e., outside of the range of 9999)
Z
sets if the destination value is zero; otherwise resets
S
always resets