Double Precision Binary to BCD Conversion Bin2BCD

Warning message

The Propeller Object Exchange system is decommissioned and replaced with a GitHub repository to house the same existing and future Propeller objects. As of 12/5/2019, this site is read-only. You can continue to browse and download objects from here for a limited time; however, please begin using the Parallax Propeller repository for future reference.
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Request group membership
By: created: 2016-09-09 | updated: 2016-09-14

This PASM object converts a double precision binary positive integer to BCD.  The spin module passes the address of a 2-entry long binary integer, and the address of a 20-byte vector.  The pasm program converts the input integer to binary-coded-decimal and writes the 20-digit result into the vector.  The worst-case number (99...999) require just less than 50 usec, including transferring the result to hub memory.  Updated Sept 14, 2016 to reduce inner loop to three instructions, as well as other clean-ups.

Original File Upload
Package icon DpBin2BCD - Archive [Date 2016.09.14 Time 09.08].zip11.12 KB