Question: a ) Write a complete masm program that will add the first N numbers. ( i ) Write a procedure that adds up the first
aWrite a complete masm program that will add the first N numbers.
i Write a procedure that adds up the first N numbers. Pass the value of N in a register.
ii Write a procedure that adds up the first N numbers. Prompt the user for the value of N
iii A procedure that adds up the first N numbers. Pass the value of N on the stack.
b Create a procedure to print the alphabet from A to Z Use a loop. Output should be: ABCDEFGHIJKLMNOPQRSTUVWXYZ
c Create another procedure to print the alphabet from A to Z Use a loop. Output should be a space between letter:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
These require knowledge of creating nested loops.
c Create a new procedure and add code to have this as output. Allow the user to enter a value and display that many lines as shown.:
d Create a new procedure and add code to have this as output. Allow the user to enter a value and display that many lines as shown.:
e Add code to read in two numbers from the user. Use readint procedure. Save these values in rows and cols variables. Use a nested loop to print a rectangle of rows X cols.
Output:
Upload the asm file that contains code for a to e
f Use the code on to reverse string, and convert it into three sub procedures. Use the library functions to print line and char.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
