$30
CSCI 360 Assignment 7 – Introduction to Packed Decimal
(75 points)
This program is a rather simple introduction to packed decimal and packed decimal arithmetic.
First, copy the following Assembler program into a new member of your PDSE named .
Be sure the program is surrounded by the correct :
CSCI 360 Assignment 7 – Introduction to Packed Decimal Page 2 of 3
You will write your source code in between the lines of standard entry and exit linkage code. Of course,
you can add variables and other storage declarations immediately following the provided but place
them above the 18-fullword caller's register storage area.
Secondly, change the input data member to:
To assist you, here is the data in the member:
Each of the above input records has the following layout:
Data Field Data Type Columns Max. Value
As before, read the employee records one at a time using a standard read loop and printing a detail line for
each employee so that your output looks like that provided to you in the Assignment 7 folder on Blackboard.
CSCI 360 Assignment 7 – Introduction to Packed Decimal Page 3 of 3
For each employee, move their name to the print line and move their ID to the print line. Make sure your
read loop works at this point before moving on.
Next, using only packed decimal instructions, and the Hourly Pay Rate into the print line showing
the decimal point. Do the same for the Hours Worked.
Finally, calculate the gross pay amount using , round it to two decimal places and it into the print line
showing the decimal point.
The only packed decimal instructions you will need are: , , , and .
You will no longer need to use or . DO NOT use them!
Name your detail line you print for each employee and place the following two lines at the top of
your read loop:
These two lines set all but the very first byte – the carriage control character – of your 133-byte detail line
to spaces to prepare for the next employee information.
Submit your file on Blackboard as before.