The MASM Forum

General => The Campus => Topic started by: Magnum on December 19, 2013, 10:06:24 AM

Title: Densely packed decimal
Post by: Magnum on December 19, 2013, 10:06:24 AM
Has someone wrote code that uses densely packed decimals?

From what I understand, it is more efficient than BCD.

Thanks.
Title: Re: Densely packed decimal
Post by: dedndave on December 19, 2013, 10:10:05 AM
"densely" ?

Ray did some work with packed decimals on his FPU site

http://www.ray.masmcode.com/BCDtut.html (http://www.ray.masmcode.com/BCDtut.html)

also - the FPU can access packed BCD

http://www.ray.masmcode.com/tutorial/fpuchap6.htm (http://www.ray.masmcode.com/tutorial/fpuchap6.htm)
Title: Re: Densely packed decimal
Post by: Magnum on December 19, 2013, 11:21:56 AM
http://en.wikipedia.org/wiki/Densely_packed_decimal

Title: Re: Densely packed decimal
Post by: dedndave on December 19, 2013, 12:17:03 PM
i don't see much advantage there
if you need to do that - convert to binary integer - calculate - convert back to decimal

you can fit 9 full decimal digits in a dword   :t
Title: Re: Densely packed decimal
Post by: Stan on December 19, 2013, 02:42:17 PM
When densely packing digits was implemented, 'core' memory was expensive.  Thus, it was economically beneficial to unpack/calculate/pack.
Today, with memory being rather cheap,
QuoteI don't see much advantage there