Starting from:
$30

$24

Assignment 2 Solution




Make a program




Create an X86 program that does the following:




= The driver is written in C language (C++ not accepted in this case)

= The driver calls a X86 function

= The X86 function inputs two long integers

= The X86 function computes the quotient and remainder of the two integers

= The X86 function outputs the results in a format shown below.

= The remainder is returned to the caller program.

= The caller says good-bye.







Sample output 1




This is Assignment 2 programmed by Jennifer Gutierrez

I really like this open source programming.




The X86 program has begun

Please enter the first integer and press enter: 19

Please enter the second integer and press enter: 6

Thank you.

The quotient of 19 divided by 6 is 3 with remainder 1

The remainder is clearly positive.

The remainder will be returned to the caller program. Have a nice day.




The main driver received this number: 1

Next the main will return 0 to the operating system. Bye







Sample output 2




This is Assignment 2 programmed by Tommy Wang

I haven’t got the hang of this open source programming yet, but I am still trying.




The X86 program has begun

Please enter the first integer and press enter: 143

Please enter the second integer and press enter: 0

Sorry: we do not handle zero here at Ubuntu dot com.

Please run this program again.

Negative 1 will be returned to the caller program. Have a nice day.




The main driver received this number: -1

Next the main will return 0 to the operating system. Bye

Sample output 3




This is Assignment 2 programmed by Juan Diego

I will work to pass this course but after that I’m using source proprietary programs only.




The X86 program has begun

Please enter the first integer and press enter: -182

Please enter the second integer and press enter: 12

Thank you.

The quotient of -182 divided by 12 is -15 with remainder equal to -2

The remainder is negative.

The remainder will be returned to the caller program. Have a nice day.




The main driver received this number: -2

Next the main will return 0 to the operating system. Bye










Notes




You are free to modify the second line of output according to your own feelings.




Obviously, you should replace the student name in the sample output with your own name.




Make a bash script file that will compile and execute this program.




There was a section in Assignment 1 called “Other Important Things”. Those important things still apply. Download a new copy of Assignment 1 if you forgot.







When the program is fully function test it with a variety of inputs. Test it with inputs of 0, positive integers, negative integers, mixed sets of positive and negative integers. Test it with integers greater than 4.5 billion and other integers less than -4.5 billion.

When you are done




You options are the following.




1. You may keep your program in your computer for future use, and tell nobody about it.




2. You may start your program in the classroom during the lab hour, get my attention, I will go to where you are, and I’ll watch you demonstrate your program. I will tell you my opinion of the quality of your program.




3. You may email to me the source files of your program. I will test your program on an Xubuntu 19.4 machine. I will email back to you an evaluation of your program along with a numeric score.




Don’t email me broken code. It is better to discuss fixing code during the lab portion of the class meeting.




Email: holliday@fullerton.edu







Due: September 16, 2019







If you finish by the date given above then be assured that you are fully caught up with the progress of this class.

More products