0% found this document useful (0 votes)
212 views

COAL Assignment: 02: k19 - XXXX

The document provides instructions for a COAL assignment that requires students to submit a zip file containing 3 assembly language programs, with one program evaluating test scores and letter grades, another performing college registration checks, and a third implementing a C++ program to search an array and calculate a sum using assembly code. Students must complete the programs by April 20th and submit them through the google classroom platform for grading.

Uploaded by

Mr hacks
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
212 views

COAL Assignment: 02: k19 - XXXX

The document provides instructions for a COAL assignment that requires students to submit a zip file containing 3 assembly language programs, with one program evaluating test scores and letter grades, another performing college registration checks, and a third implementing a C++ program to search an array and calculate a sum using assembly code. Students must complete the programs by April 20th and submit them through the google classroom platform for grading.

Uploaded by

Mr hacks
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

COAL Assignment: 02

Instruction: Marks: 30 Points (Weightage: 05)


• You just need to submit only a ZipFile, with the name k19_XXXX.
• ZipFile contains 3 solution file(.asm) K19_XXXX_q1, K19_XXXX_q2, K19_XXXX_q3.
• Deadline: Saturday April 20, 2020 (before midnight 11:45) on google classroom.

1. Test Score Evaluation


Using the following table as a guide, write a program that asks the user to enter an integer test score
between 0 and 100. The program should display the appropriate letter grade:

Add the following features:


• Run in a loop so that multiple test scores can be entered.
• Accumulate a counter of the number of test scores(minimum 3-course).
• Perform range checking on the user’s input: Display an error message if the test score is less
than 0 or greater than 100.
Letter
Score Range
Grade
90 to 100 A
80 to 89 B
70 to 79 C
60 to 69 D
0 to 59 F

2. College Registration
Using the College Registration example from Section 6.7.3(Chapter 06) as a starting point, do the following:
• Recode the logic using CMP and conditional jump instructions (instead of the .IF and .ELSEIF directives).
• Perform range checking on the credits value; it cannot be less than 1 or greater than 30. If an invalid entry is
discovered, display an appropriate error message.
• Prompt the user for the grade average and credits values.
• Display a message that shows the outcome of the evaluation, such as
“The student can register” or “The student cannot register”.

3. Implement the following C++ code in assembly language, using the block-structured. Assume that all
variables are 32-bit signed integers:
int array[] = {10,60,20,33,72,89,45,65,72,18};
int sample = 50;
int ArraySize = sizeof array / sizeof sample;
int index = 0;
int sum = 0;
while( index < ArraySize )
{
if( array[index] <= sample )
{
sum += array[index];
}
index++;
}
Optional: Draw a flowchart of your code.

Enjoy Coding...

You might also like