Question: Can this be answered in asm code please? Create a program that will calculate an employee's pay based on their hourly wage. In this program

Can this be answered in asm code please? Create a program that will calculate an employee's pay based on their hourly wage.
In this program create a struct called Employee that will hold an employee's first name, last name, id number, and hourly wage.
The first and last name members should be BYTE arrays
id number and hourly wage members should be DWORD types.
Procedures:
Create a procedure called getEmployeeData the will get the employee's information from the keyboard and fill out an employee structure. Pass the struct by reference to this procedure using the stack. To make the parameter passing easier you should use INVOKE to call the procedure.You will have to create messages in the data segment to prompt for input. The procedure should ask for first name, last name, id,and hourly wage. It should fill out these members in the structwith information taken from the keyboard and return.
Create a procedure that will calcEmpPaythat will calculate an employee's pay based on hours and hourly wage (hours *hourly wage ).The procedure should prompt the user to input the number of hours worked and store this value in a local variable.Feel free to use an EQU to label the local variable if you find it easier to handle this way. You should pass the Employee struct to this procedure by reference using the stack. Again, you will want to use INVOKE to make the parameter passing easier.This would be the same as the getEmploeeData procedure. You need to do this because you need the hourly wage to do the calculation. This procedure will return the total pay in the eax register.
Main
In the data segment create an instance of the Employee struct and simply set it to empty <>.From main call getEmployeeData then call calcEmpPay. Once these procedures have executed you should have the employees information in the struct and the total pay in the eax register. Simply output the information to the screen as shown by the example below. The output of the employee on one line is tab separated.
Macro
Create a macro called money that will simply output to the screen ".00"This should be used after the total pay is output so that it is currency formatted.
Example Output
You are not to use any .IF .ELSE, .WHILE, or .ENDW instructions. You are to use pure old fashion assembly language to solve this.
You are also required to comment every line of code you write. Failure to do so will drop you grade 20%
When you have finished the assignmentformat your source with tohtmland submit the html in the appropriate place.
NOT Allowed
The use of legacy directives like DB and DW is not allowed in this class. A deduction of 40%will be given if you use them.
The use of indirect addressing around variables is NOT allowed in the class unless you are using indirect addressing. An example of this would be [val1].Doing this will result in a 25%reduction in your grade.
The code must start with INCLUDE asmlib.inc

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!