Write an Assembler program to calculate payroll for a business. Each employee has an hourly pay rate, a number of hours worked in the pay period, a deduction amount for any lunches eaten in the company cafeteria during the pay period, and, if earned, a bonus amount. Of course, each employee has a name and employee identification number. A .txt document named is provided for you to begin this assignment. Copy it into IDz and save as a new member of your PDSE named to begin this assignment. Be sure to enter your KC-ID in the upper left hand corner and put your first initial, a period, and your last name in between the tick marks in the first line, the card. Input The first input record has two integers, the first representing the current federal tax withholding percentage and the second the current state tax withholding percentage. Read that record and get the percentages into registers to use in arithmetic in the body of the read loop. Each of the rest of the input record contains, from left to right across the 8
Write an Assembler program to calculate payroll for a business. Each employee has an hourly pay rate, a
number of hours worked in the pay period, a deduction amount for any lunches eaten in the company
cafeteria during the pay period, and, if earned, a bonus amount. Of course, each employee has a name and
employee identification number.
A .txt document named is provided for you to begin this
assignment. Copy it into IDz and save as a new member of your PDSE named to begin
this assignment. Be sure to enter your KC-ID in the upper left hand corner and put your first initial, a
period, and your last name in between the tick marks in the first line, the card.
Input
The first input record has two integers, the first representing the current federal tax withholding percentage
and the second the current state tax withholding percentage. Read that record and get the percentages into
registers to use in arithmetic in the body of the read loop.
Each of the rest of the input record contains, from left to right across the 80-byte record, the following data
about a single employee: employee name, employee id number, hourly pay rate, number of hours worked
in the pay period, deduction amount, and bonus amount, with the three dollar amounts rounded to the whole
dollar. Remember to use MVC to move character data (even thought it is numeric, you may consider the
employee id number character data – people do not do arithmetic with ID numbers…usually).
Calculations
Your program must calculate each employee's gross pay amount using the following formula:
And then calculate each employee's net pay amount using the following formula:
Your program also must count the number of employees processed and keep a running total of each of the
gross pay amount, federal withholding amount, state withholding amount and net pay amount.
Note: When doing division, disregard the remainder and use only the quotient of the division. Working
with decimal points will be included in a future assignment.
Be VERY smart about your register usage. For example, after you get the gross pay calculated and added
to the total gross pay amount register, you can reuse the registers that were used to hold hourly pay rate,
number of hours worked, deduction amount and bonus amount (of course, you also need to have 'd
those values into the print line and have added the deduction and bonus amount registers to their total
registers too).
Trending now
This is a popular solution!
Step by step
Solved in 2 steps