User Tools

Site Tools


en-us_products:mpino_studio2:box_functions:conversion:d2h

D2H Box Function

BCD Encode (Decimal to Hex)

Category: Conversion Box Functions

Behavior

Converts a decimal integer from 0 to 9999 into four-digit BCD and stores it in a WORD.

Syntax and Arguments

Syntax: D2H D0 D1

  • 1st = source: WORD address holding a decimal integer from 0 to 9999
  • 2nd = destination: WORD address that stores the BCD result

Behavior Example

Run condition Before Command entered Expected result
Left condition ON D0=1234 D2H D0 D1 D1=0x1234

Inputs and results for Conversion Box Functions

Cautions

  • Use the WORD data formats required by the command for the source and destination.
  • Use an input value from 0 to 9999.

Box Functions in the Same Category

en-us_products/mpino_studio2/box_functions/conversion/d2h.txt · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki