4. Pre-Work: - Read the program description below. Make sure that you clearly understand the requirements. If not, consu
Posted: Sun May 15, 2022 10:07 am
4. Pre-Work: - Read the program description below. Make sure that you clearly understand the requirements. If not, consult with your team members and ask the instructor, if needed - Each lab partner must work on and attempt to complete the program. You need to assemble and run the program until it is working per specifications before demonstrating it to your instructor. Points will be deducted after two failing demonstrations - You may work outside the lab and/or use your computer or the lab computer during class. 5. Program Description: You are to write a program that does the following: The program accepts a letter or decimal digit input from the keyboard one at a time. The input must be lower-case a through z or digit 0 to 9. Any other character except for P result in an error message and prompt the user to try again. The program will take in up to three acceptable characters in any one run. In the program data declaration, you must declare a string of characters (labeled "char:") which is a sequence of numbers 0 to 9 and all 26 lower-case letters in alphabetical order (see data declaration below). The program must take input of a character from the keyboard and inserts it (if it is a lower-case letter or number 0 to 9) in the proper place in the sequence of characters declared in "char.". • Declare a sequence of 40 null bytes using the space" directive. This will be expansion space for the string as you insert characters into the alphabetized list (up to 3 additional acceptable characters). This new string with original string and added characters appended at the end may be run through the routine used in lab 7 to order it. At any point, you can print the current string (1.e., with as many inserts as வெaasillaathaliathalanalinaaalaniramahathan
expansion space for the string as you insert characters into the alphabetized list (up to 3 additional acceptable characters). This new string with original string and added characters appended at the end may be run through the routine used in lab 7 to order it. At any point, you can print the current string (i.e., with as many inserts as have been input that far) by inputting capital P from the keyboard. The program will continue to prompt for a character. When 3 acceptable characters are input, the program prints the new ordered string and prompts you to rerun the program or not. If response is y, it restarts the program. If not, it will print program terminated and stops. Bonus quiz 8 password is: 2120 6. Experimental Procedure: Review the program specification and write the program in NotePad. ONLY working programs will get full credit. Each partner need to show functionality of their program on a separate computer. The program listing must use separate columns/tabs for labels, instructions and comments The data declaration is given to you as: I . data prompt1: error: retry: char: prompt3: prompt4 display: asciiz "n Input a character (lowercase letter or digit 0-9): asciiz "n Need a lower case letter or digit. Try again asciiz"ın Do you want to re-run the program (Y for yes)?" asciiz "0123456789abcdefghijklmnoporstuvwxyz asciiz "\n The ordered string is: asciiz "\n Program terminated" space 40
7. Laboratory Report: There is no report required for this Lab. Each team member must upload his/her program with .s extension to the assignment on eCampus. A sample validation input/output checklist follows: Input Output Input a character (lowercase letter or digit 0-9): Р The ordered string is: 0123456789abcdefghijklmnopqrstuvwxyz Input a character (lowercase letter or digit 0-9): Input a character (lowercase letter or digit 0-9): P The ordered string is: 0123456789abcdefghijklmmnopgrstuvwxyz Input a character (lowercase letter or digit 0-9): m I с F Input a character (lowercase letter or digit 0-9): Need a lower case letter or digit. Try again Input a character (lowercase letter or digit 0-9): 5 The ordered string is: 01234556789abccdefghijklmmnopqrstuvwxyz Do you want to re-run the program (Y for yes) Y Input a character (lowercase letter or digit 0-9): 9 Input a character (lowercase letter or digit 0-9): 8 Input a character (lowercase letter or digit 0-9): 7 The ordered string is: 0123456778899abcdefghijklmnopqrstuvwxyz Do you want to re-run the program (Y for yes) Program terminated
expansion space for the string as you insert characters into the alphabetized list (up to 3 additional acceptable characters). This new string with original string and added characters appended at the end may be run through the routine used in lab 7 to order it. At any point, you can print the current string (i.e., with as many inserts as have been input that far) by inputting capital P from the keyboard. The program will continue to prompt for a character. When 3 acceptable characters are input, the program prints the new ordered string and prompts you to rerun the program or not. If response is y, it restarts the program. If not, it will print program terminated and stops. Bonus quiz 8 password is: 2120 6. Experimental Procedure: Review the program specification and write the program in NotePad. ONLY working programs will get full credit. Each partner need to show functionality of their program on a separate computer. The program listing must use separate columns/tabs for labels, instructions and comments The data declaration is given to you as: I . data prompt1: error: retry: char: prompt3: prompt4 display: asciiz "n Input a character (lowercase letter or digit 0-9): asciiz "n Need a lower case letter or digit. Try again asciiz"ın Do you want to re-run the program (Y for yes)?" asciiz "0123456789abcdefghijklmnoporstuvwxyz asciiz "\n The ordered string is: asciiz "\n Program terminated" space 40
7. Laboratory Report: There is no report required for this Lab. Each team member must upload his/her program with .s extension to the assignment on eCampus. A sample validation input/output checklist follows: Input Output Input a character (lowercase letter or digit 0-9): Р The ordered string is: 0123456789abcdefghijklmnopqrstuvwxyz Input a character (lowercase letter or digit 0-9): Input a character (lowercase letter or digit 0-9): P The ordered string is: 0123456789abcdefghijklmmnopgrstuvwxyz Input a character (lowercase letter or digit 0-9): m I с F Input a character (lowercase letter or digit 0-9): Need a lower case letter or digit. Try again Input a character (lowercase letter or digit 0-9): 5 The ordered string is: 01234556789abccdefghijklmmnopqrstuvwxyz Do you want to re-run the program (Y for yes) Y Input a character (lowercase letter or digit 0-9): 9 Input a character (lowercase letter or digit 0-9): 8 Input a character (lowercase letter or digit 0-9): 7 The ordered string is: 0123456778899abcdefghijklmnopqrstuvwxyz Do you want to re-run the program (Y for yes) Program terminated