CSE2421 Lab 6
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
CSE2421 Lab 6
Where we demonstrate familiarity with x86 assembly
Lab 6 Overview
Students will implement calculator-like functions in assembly using structures and pointers. Students will implement the ReadInput, Calculate and PrintResult functions in assembly. Memory offsets, calculations and the like will all be done in assembly.
For operations, the program should be able to, at a minimum, interpret the common mathematical symbols including:
● Addition (+)
● Subtraction (-)
● Multiplication (*)
● Division (/)
A motivated student could implement extra operations that may include modulo, shifting (logical and arithmetic), absolute value, and so on. Your makefile should document any additional functions that you have implemented.
A custom makefile that builds the c files and assembly files together is part of this project, as we have covered in class.
Lab 6 Implementation Details
Students have been given the main function as well as a skeleton for each of the assembly functions, each in their own file. Students may choose to implement unit tests for their assembly files, which might make it easier to build and verify. This is the recommendation by the instructor, but there is no extra credit for tests at this point.
You can use different make targets if you would like to provide C implementations of some of the functions in order to test other ones. Something like "make print" could cause the compiler to include a file that has C implementations of ReadInput and Calculate. Just make sure that your generic make target still builds everything in assembly and does not accidentally include the working C implementations.
Making Things Harder
1. Reimplement lab6.c and lab6.h in lab6.s using hand-rolled x86 assembly. This is worth up to 10 additional points. It should go without saying, but calling gcc -S and submitting that is not sufficient and could be considered fraudulent.
2. Implementing additional functions is worth 1 point per operation, up to a maximum of 5. That is, 5 additional operations could be worth 5 additional points.
README
Readme file and should conform to the standard below.
CoAM header
Lab 6
Your name
How much time did this lab take you?
What was the hardest part of this lab?
LAB SUBMISSION
It is expected that all lab files that are not inputs/outputs will contain the standard disclaimer about plagiarism and the like. You can see the expected verbiage in Lab 1's writeup.
You must submit all your lab assignments electronically to Carmen in .zip file format. The format of zip command is as follows:
[jones.5684@cse-fl1 lab1] $ zip <zip_filename> <files> <to> <submit>
2021-12-06
Where we demonstrate familiarity with x86 assembly