Starting from:

$35

CSCI 360 Assignment 5 – Multiplication and Division 

CSCI 360 Assignment 5 – Multiplication and Division 
125 points
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.
The first thing the executable code does provided is load register 2 with the federal tax rate percentage and
load register 3 with the state tax rate percentage. These two registers will be used in your arithmetic so
don't overwrite them accidentally.

Input
Each of the input records 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).
(continued)
CSCI 360 Assignment 5 – Multiplication and Division Page 2 of 3
Output
For each record, print out (using ) the employee's id number, employee name, hourly pay rate,
number of hours worked, gross pay amount, federal withholding amount, state withholding amount and,
finally, net pay amount, that you calculated across one output line, double spaced.
At the end of the report, and on separate lines and on the left, just under the employee's ID, print out the
number of employees processed, total gross pay, total federal withholding amount, total state withholding
amount and total net pay amount. Be sure that you double space all of the output lines.
For guidance, see the exact output document named:
Important Notes
Here is the data in the PDSE member
named :


(Note that you can use a label followed by a plus sign and an integer value in any instruction that requires
a or type address to represent a displacement from the address of the label. For example:
refers to the 26th byte of the and refers to the 32nd byte of the .)
You may use registers 2 through 11, inclusive.
(continued)
Note that employee ID begins in
column 26 and the first numeric
value for calculating pay begins in
column 32 of each input record.
CSCI 360 Assignment 5 – Multiplication and Division Page 3 of 3
Other
Fully document your program as instructed in the CSCI 360 Coding and Documentation Guidelines soon
to be found in Blackboard's Course Documents.
Be sure you are using the structured read loop as taught to you in class.
Be sure that your ENTIRE output is included in the .txt file BEFORE you submit it for grading. If any or
all of it is missing, you will earn a 0 on the assignment.
Submit the .txt output from Marist on Blackboard as before.

More products