====== H2D Box Function ====== **BCD Decode (Hex to Decimal)** Category: [[en-us_products:mpino_studio2:box_functions:conversion|Conversion Box Functions]] ===== Behavior ===== Interprets a source WORD containing four BCD digits as a decimal integer and stores the result. ===== Syntax and Arguments ===== **Syntax:** ''H2D D0 D1'' * 1st = S: source word address to interpret as BCD (D/C/T) * 2nd = D: destination word address to store the decoded decimal value ===== Behavior Example ===== ^ Run condition ^ Before ^ Command entered ^ Expected result ^ | Left condition ON | D0=0x1234 | ''H2D D0 D1'' | D1=1234 | {{ :en-us_products:mpino_studio2:conversion-examples.svg?1000 |Inputs and results for Conversion Box Functions }} ===== Cautions ===== * Use the WORD data formats required by the command for the source and destination. * Each hexadecimal digit in the input WORD must be from 0 to 9. ===== Box Functions in the Same Category ===== * [[en-us_products:mpino_studio2:box_functions:conversion:inv|INV View details]] — Invert * [[en-us_products:mpino_studio2:box_functions:conversion:neg|NEG View details]] — Negate * [[en-us_products:mpino_studio2:box_functions:conversion:d2h|D2H View details]] — BCD Encode (Decimal to Hex)