辅导asm、讲解C++程序设计、辅导template-1、讲解C/C++

- 首页 >> C/C++编程

2018/11/24 Assignment 7

https://deanza.instructure.com/courses/6451/assignments/149412?module_item_id=418857 1/2

Assignment 7

Due Thursday by 11:55pm Points 30 Submitting a file upload File Types asm

Submit Assignment

This Assignment is under Midterm2 material, Make sure that you are almost done with i

t before the midterm.

This is a peer review assignment. After you submit your assignment you need to review 2 other assignments and

give them the feedback they need. You can review your assigned anonymous submissions after the due date.

Failing to do the review will result in losing 15 points on this assignment. Create a file and name it

main.asm. Don't name it with a name that indicates your identity. Peer review is due 2 days after the due

date.

Write a complete program that sorts dword unsigned integer array in descending order.Assume that

the user doesn’t enter more than 40 integers.You MUST use the template-1.asm and follow all the

directions there.

You can’t add any more procedures to the template.

The procedures can’t use any global variables (variables that are inside .data segment).

The caller of any procedures sends its argument through the stack.

Inside any procedures, if you need to use a register, you have to preserve its original value. You can't

use uses, pushad operators.

The callee is in charge of cleaning the stack

Sample run:

Enter up to 40 unsigned dword integers. To end the array, enter 0.

After each element press enter:

Initial array:

2018/11/24 Assignment 7

https://deanza.instructure.com/courses/6451/assignments/149412?module_item_id=418857 2/2

Total Points: 30.0

assignment 7 Rubric (1) (1)

Criteria Ratings Pts

1.0 pts

1.0 pts

2.0 pts

2.0 pts

2.0 pts

2.0 pts

5.0 pts

2.0 pts

1.0 pts

3.0 pts

2.0 pts

2.0 pts

5.0 pts

1 4 3 8 99 76 34 5 2 17

Array sorted in descending order:

99 76 34 17 8 5 4 3 2 1

All lines are indented correctly

All lines are shorter than 80 columns

Comments at the top of the program: date / what your program does. Name of the student is not

there. If name is there deduct 2 points.

The run is included as a comment at the end of your code

comments at the top of each proc, what it receives, what it returns and what it does.

comments before any if/while/for statements. The comment suppose to be what it is equivalent to

in C++

The program is running with correct output.

global variables are used ONLY in main.

mov register, 0 is not used throughout the program. xor register, register is used instead.

arguments and returns values are passed through the stack.

Orginal values of the registers are preserved before using them in the proc. uses, pushad

operators are not used through out the program

The callee is cleaning the stack correctly.

no more procedures are added to the template


站长地图