> Hi
>
> Does the S/390 and zSeries have BCD or BCD assist instructions
> implemented that are faster than BCD with integers? And if so, where can
> i find the exact format for these? I am perfectly willing, expecting
> actually, to access this from inline assembly in gcc.
>
> Erik
>

 The mainframe supports two BCD formats - typically the "PACKED DECIMAL"
 format is used.

 The Systems/C C compiler for Linux/390 has support for a native data
 type (_Decimal) which uses these instructions, so you can do things
 like:

        {
           /* Declare 3 variables, each 10 digits wide, with 5 digits */
           /*  to the right of the decimal point. */
           _Decimal(10,5) a, b, c;

           a = b + c;
                ...


 See http://www.dignus.com for more information.

        - Dave Rivers -

--
[EMAIL PROTECTED]                        Work: (919) 676-0847
Get your mainframe programming tools at http://www.dignus.com

Reply via email to