Programming Assignment #5 Please write the following program. Each program should have 1. A comment at the top that contains information in this form:...

Programming Assignment 5. More info in file


Programming Assignment #5 Please write the following program. Each program should have 1. A comment at the top that contains information in this form: ;---------------------------------------------------- ; Programmer : Fred J. Masm ; Date due : February 23, 2020 ; Description : This program will calculate a simple math ; expression using only registers ; --------------------------------------------------- 2. A new MASM project using the template we created. 3. Comments for each line of code in the .code section 4. Variables and constants with meaningful names a. Create an array of 10 WORDs with these values: 20, 30, 40, 50, 60, 70, 80, 90, 100, 200 b. Using the loop, push, and pop instructions, efficiently reverse the array c. You can declare only one array for this program. d. Please use either indirect or indexed addressing e. Without using constants, write your program so that it would still work if the array contained a different number of elements. a. Create a string containing at least 20 bytes and a terminating zero. All of the characters should be lowercase alphabet letters. b. Create a second string containing at least 20 bytes and a terminating zero. All of the characters should be uppercase alphabet letters. c. Using the loop instruction, subtract 32 from each element of the first string. Observe what happens to the string in memory. d. Using the loop instruction, add 32 to each element of the second string. Observe what happens to the string in memory. e. Use indirect addressing for this program, please. f. Without using constants, write your program so that it would still work if the strings contained a different number of elements. a. Create an array of 10 WORDs so that each element is at least as big as the one that came before it (like 5, 13, 15, 20, 20, 38, 50, 97, 100, 150). b. Using the loop instruction, add up the differences between the elements. For example, the difference between 5 and 13 is 8, between 13 and 15 is 2, and so on. The differences in the example in “a” are: 8, 2, 5, 0, 18, 12, 47, 3, and 50; the total would be 145 c. Store the total into a variable. d. Use indexed addressing for this program, please e. Without using constants, write your program so that it would still work if the array contained a different number of elements. Prog1 Prog2 Prog3 I’ll randomly pick one of these to grade. If you have questions, please ask early. Please submit these programs in a single Word document that is named in this way: Lastname, firstname – PA5.docx
Feb 23, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here