CS 410 Southern New Hampshire University Code C Conversion Capstone you will continue to focus on assembly language as a basis for reverse engineering, and you will complete two stepping stones. In Stepping Stone Two, you will convert C code with loops to assembly. In Stepping Stone 3, you will convert assembly to C. CS 410 Stepping Stone Two Guidelines and Rubric
Overview: In this exercise, you will show your emerging awareness of assembly language by translating a simple application from C to assembly. The coding for
this assignment will be performed in Codio and downloaded into Microsoft Word for submission. For an example of how to complete the tasks called for in this
assignment, see the assembly to C conversion demonstration in Appendix F of the CS 410 Course Manual.
Prompt:
1. To begin, study the C code below. This file is included in Codio as file assignment2_1.c.
#include
#include
int main()
{
int num, i;
int product=1;
printf(“Enter a number:n”);
scanf(“%d”, &num);
for(i=num;i>0; i–)
product = product * i;
printf(“The factorial for %d is: %dn”, num, product);
return 1;
}
2. What is the function of this file? How would you convert it to assembly? Take notes on the functions and conversion as needed.
3. Next, submit a report that contains the following:
i. A one-paragraph explanation of the function of this program in C
ii. The conversion of the C code into assembly
iii. A table that aligns each line of C code with the corresponding line in assembly
iv. A one-paragraph explanation of the behavior of the assembly code that shows how the assembly code performs the same tasks (print, scan, etc.)
performed by C (Identify the skeleton and the actual code that does the work.)
Rubric
Guidelines for Submission: Submit your work in a Microsoft Word document. To download from Codio to Word, follow the instructions in Appendix I in the CS
410 Course Manual.
Critical Elements
Attempted with Minimal
or No Issues (100%)
Attempted with Key Issues (75%)
Description of C Describes the function of
Code Function the C code in the exercise
Attempts to describe the function
of the C code, but the description
is unclear or has fundamental
errors
Conversion of C Converts the C code into
Code Into
assembly
Assembly
Converts the C code into assembly Does not convert C code
but with fundamental errors
into assembly
25
Aligns C code with assembly but
with fundamental errors
Does not align C code
with assembly
25
Does not explain how
the assembly code
performs the same tasks
as the C code
25
Translation
Alignment
Aligns each line of C with
the corresponding line in
assembly
Assembly
Explanation
Explains how the assembly Explains how the assembly code
code performs the same
performs the same tasks as the C
tasks as the C code
Code, but the explanation is
unclear or has fundamental errors
Not Evident (0%)
Does not attempt to
identify the function of
the C code
Total
Value
25
100%
CS 410 Stepping Stone Three Guidelines and Rubric
Overview: In this exercise, you will demonstrate your emerging ability to practice reverse engineering by converting assembly code to C.
Prompt: The Stepping Stone Three Worksheet contains three examples of assembly code. Complete the three tables in the worksheet by
providing the following:
●
●
The equivalent code in C
A line-by-line explanation of the function of the code
Rubric
Guidelines for Submission: Submit the completed worksheet.
Critical Element
Attempted with Minimal
or No Issues (100%)
Attempted with Key Issues (75%)
Not Evident (0%)
Value
Does not convert assembly
code to C code in any of
the cases
50
Explains the function of the code,
Does not explain the
but explanations may not be
function of the code in any
suitably clear or complete or may
of the cases
have significant errors or omissions
50
Conversion
Converts the assembly
Converts the assembly code to C
code to C code for all three code but with significant errors or
cases, with no significant
omissions
errors or omissions
Explanation
Explains the function of
the code clearly and
completely for all cases,
with no significant errors
or omissions
Total
100%
Purchase answer to see full
attachment
LDR 3302-21.01.01-1A24-S1, Organizational Theory and Behavior Unit III Essay Top of Form Bottom of Form…
Chapter 9 What are teratogens? Give 5 examples. Define each of these stages: Germinal, embryonic,…
You are a Financial Analyst that has been appointed to lead a team in the…
You are familiar with the ANA Code of Ethics and have a growing understanding of…
This week’s discussion will focus on management decision-making and control in two companies, American corporation…
Mary Rowlandson felt that the man who eventually came to own her, Quinnapin, was “the…