Given a decimal number
with 2 decimal places representing the total cost of an item and another
decimal number representing the quantify, calculate the unit price with 2
decimal places rounded half up? Problem was derived from question posted
on IBM Mainframe
Assembler-List by Ludmila Koganer.
I think the most
straight forward solution using the least instructions may be done using the
new Decimal Floating Point (DFP) instructions. However the most efficient
may be done using basic packed decimal instructions and no floating point
instructions. For more information on ZMFACC problems and solutions visit
the web site here:
http://z390.sourceforge.net/z390_Mainframe_Assemble_Coding_Contest.htm
Don Higgins
mailto:don@...
http://don.higgins.net