Question

FINAL Project 1-) Please submit the solution of your final as Ms-word or PDF document 2-)...

FINAL Project

1-) Please submit the solution of your final as Ms-word or PDF document

2-) Complete THREE QUESTIONS out of the four exam questions below.

3-) FOR EACH QUESTION, IT IS REQUIRED to include Ms-Word or Pdf file contains the following

A. Source file and sample of your output screen shots.

B. Up to one page of your program discussion. In the discussion, state the issues that you may have problem with if there is any. Why your program is not running (if it is not)? What was your approach (Your process to the solution)? How did you overcome the issues while writing the program?

C. Write your conclusion as what you have learned from this program.

Not including this report will result of losing 30% because I would not know if you really the one who did it or not.

YOUR REPORT WILL VERIFY THE UNDERSTANDING OF YOUR WORK, AND THAT YOU REALLY DID IT.

Question One: Write an assembly language program that allows a user to enter any 5 numbers then display the sum of the entered 5 numbers.

For example:

Enter: 1, 2, 3, 4, 5

Output First Line: Display: Sum of the Entered is: 15

Output Second Line: Display: Division of entered digit number 4 by entered digit number two 2 so (4/( 2 = 2)  

Question Two: Write an assembly language program that allows a user to enter any 6 numbers in any order then display the largest and smallest entered number and the order from small to large and then large to small

For example

Enter: 4, , 2, 7, 9, 6, 1

Display:

Largest entered number is: 9

Smallest entered number is: 1

Large to Small: 9, 7, 6, 4, 2, 1

Small to Large: 1, 2, 4, 6, 7, 9

Question Three: Write an assembly language program to count number of vowels in any given string.

Question Four: Write a procedure named Get_frequencies that constructs a character frequency table. Input to the procedure should be a pointer to a string, and a pointer to an array of 256 doublewords. Each array position is indexed by its corresponding ASCII code. When the procedure returns, each entry in the array contains a count of how many times that character occurred in the string. Include the source code only.


0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer One:

  1. INCLUDE io.h
  2. Cr EQU 0ah
  3. Lf EQU 0dh
  4. data SEGMENT
  5. p_a DB cr, lf, 'Enter a: ',0
  6. p_b DB lf, 'Enter b: ',0
  7. p_c DB lf, 'Enter c: ',0
  8. p_sum DB cr, lf, 'The sum is: ',0
  9. p_avg DB cr, lf, 'The avg is: ',0
  10. tmpstr DW 40 DUP (?)
  11. data ENDS
  12. code SEGMENT
  13. ASSUME cs:code, ds:data
  14. start: mov ax, data
  15. mov ds, ax
  16. ;input a
  17. output p_a
  18. inputs tmpstr, 10
  19. atoi tmpstr
  20. mov dx, ax
  21. ;input b
  22. output p_b
  23. inputs tmpstr, 10
  24. atoi tmpstr
  25. add dx, ax
  26. ;input c
  27. output p_c
  28. inputs tmpstr, 10
  29. atoi tmpstr
  30. add dx, ax
  31. ;find and print sum
  32. output p_sum
  33. mov ax, dx
  34. itoa tmpstr, ax
  35. output tmpstr
  36. ;find and print average
  37. output p_avg
  38. cwd
  39. mov cx, 3
  40. idiv cx
  41. itoa tmpstr, ax
  42. output tmpstr
  43. quit: mov al, 00h
  44. mov ah, 4ch
  45. int 21h
  46. code ENDS
  47. END start

Answer Two:

MEMORY ADDRESS MNEMONICS COMMENT
2000 LXI H 2050 H←20, L←50
2003 MOV C, M C←M
2004 DCR C C←C-01
2005 INX H HL←HL+0001
2006 MOV A, M A←M
2007 INX H HL←HL+0001
2008 CMP M A-M
2009 JNC 200D If Carry Flag=0, goto 200D
200C MOV A, M A←M
200D DCR C C←C-1
200E JNZ 2007 If Zero Flag=0, goto 2007
2011 STA 3050 A→3050
2014 HLT

Answer 3:

  1. .MODEL SMALL
  2. .STACK 100H
  3. .DATA
  4. STRING DB "The quick brown fox jumped over lazy sleeping dog$"
  5. VOWEL DB ?
  6. .CODE
  7. MAIN PROC
  8. MOV AX, @DATA
  9. MOV DS, AX
  10. MOV SI, OFFSET STRING  
  11. MOV BL, 00     
  12. BACK: MOV AL, [SI]
  13. CMP AL,'$'
  14. JZ FINAL
  15. CMP AL,'A'
  16. JZ COUNT   
  17. CMP AL,'E'
  18. JZ COUNT   
  19. CMP AL,'I'
  20. JZ COUNT   
  21. CMP AL,'O'
  22. JZ COUNT   
  23. CMP AL,'U'
  24. JZ COUNT
  25. CMP AL,'a'
  26. JZ COUNT   
  27. CMP AL,'e'
  28. JZ COUNT   
  29. CMP AL,'i'
  30. JZ COUNT   
  31. CMP AL,'o'
  32. JZ COUNT   
  33. CMP AL,'u'
  34. JZ COUNT   
  35. INC SI
  36. JMP BACK
  37. COUNT: INC BL
  38. MOV VOWEL, BL
  39. INC SI
  40. JMP BACK
  41. FINAL: MOV AH, 4CH
  42. INT 21H
  43. MAIN ENDP.
  44. END.
Add a comment
Know the answer?
Add Answer to:
FINAL Project 1-) Please submit the solution of your final as Ms-word or PDF document 2-)...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a program in Python to solve the following task: In this project, you will build...

    Write a program in Python to solve the following task: In this project, you will build a phone number from digits entered by your user. Your program will loop until 10 valid digits have been entered. It will then use those digits to display the phone number entered using the format: XXXXXXXXXX (or (XXX) XXX – XXXX for extra credit). The program will ask for a digit, it will check to see if the digit is actually between 0 and...

  • In Small Basic Write a program that asks the user how many numbers s/he wishes to...

    In Small Basic Write a program that asks the user how many numbers s/he wishes to enter into an array and then enters a loop and proceeds to get those numbers from the user and enter them into the array. Once the array has been filled with the numbers, your program then asks the user to make a choice indicating what s/he wishes to do with the numbers in the array. The choices are: TextWindow.WriteLine("Enter 1 to compute and display...

  • Assembly Language////Write a program that read in 10 integers from the user. Save the numbers into...

    Assembly Language////Write a program that read in 10 integers from the user. Save the numbers into an array; reverse the array and display the reversed array. .data arrayInt DWORD 10 DUP(?) Your program consists of 4 procedures: 1. main procedure: call procedures getInput, reverseArray, displayArray 2. getInput procedure: prompt user to enter 10 integer numbers, save the numbers into the memory for the arrayInt 3. reverseArray: reverse arrayInt 4. displayArray: display the reversed array

  • please solve it before 11:15 today Subject :C++ programming - Lab_9_Sec 51.pdf 1411113: Programming for Engineers...

    please solve it before 11:15 today Subject :C++ programming - Lab_9_Sec 51.pdf 1411113: Programming for Engineers Fall 2017/2018 LAB #9 Name: ID: Date Section Objectives: After completing this lab, you will be able to .Analyze a problem. .Implement the solution in C++ . Practice arrays and strings. Lab Exc. Mark Score Correct input/output Computational correctness Correct input/output Computational correctness Exercise#1: Number of occurrences in an array Write a program that fills an array with 10 random numbers between 0 and...

  • Exercises (No programming is required. Your submission should be a word or pdf document.) Question 1:...

    Exercises (No programming is required. Your submission should be a word or pdf document.) Question 1: (3 Marks) Convert from binary the number (11081181), to decimal and show all steps. Question 2: (3 Marks) Convert from decimal (350)e to binary and show all steps Question 3: (3 Marks) Convert from decimal (3567)s to hexadecimal and show all steps. Question 4: (3 Marks) Convert from hexadecimal (45AC)s to octal and show all steps Question 5: (2 Marks) Given the following snippet...

  • Programming language C Please go through this carefully. Needs function void add(int *a1, int n, int...

    Programming language C Please go through this carefully. Needs function void add(int *a1, int n, int *a2) Write a program addition.c that reads in an array (a1) of numbers, and creates a new array (a2) of numbers such that the first and last numbers of a1 are added and stored as the first number, the second and second-to-last numbers are added and stored as the second number, and so on. You need to check for even and odd length of...

  • build a phone number from digits entered by your user. Your program will loop until 10...

    build a phone number from digits entered by your user. Your program will loop until 10 valid digits have been entered. It will then use those digits to display the phone number entered using the format: XXXXXXXXXX (or (XXX) XXX – XXXX for extra credit). The program will ask for a digit, it will check to see if the digit is actually between 0 and 9 inclusively. If so, the digit will be stored as the next number in the...

  • PLEASE HELP!!!I need help with the following JAVA PROGRAMS. Please ready carefully. So this comes from...

    PLEASE HELP!!!I need help with the following JAVA PROGRAMS. Please ready carefully. So this comes from tony gaddis starting out with java book. I have included the screenshot of the problems for reference. I need HELP implementing these two problems TOGETHER. There should be TWO class files. One which has TWO methods (one to implement problem 8, and one to implement problem 9). The second class should consist of the MAIN program with the MAIN method which calls those methods....

  • Here's an assignment that'll give you some practice with pointers. All you have to do is...

    Here's an assignment that'll give you some practice with pointers. All you have to do is write a program that allows the user to populate an array of doubles (5 values) by calling the function InitArray. After the user has entered all the values, then call the function DispRevArray to display the array in reverse. Main will create and allocate space for an array of type double for 5 elements. Then you will create and allocate a pointer that will...

  • Write a complete program in assembly line that:    1. Prompt the user to enter 10...

    Write a complete program in assembly line that:    1. Prompt the user to enter 10 numbers.    2. save those numbers in a 32-bit integer array.    3. Print the array with the same order it was entered.    3. Calculate the sum of the numbers and display it.    4. Calculate the mean of the array and display it.    5. Rotate the members in the array forward one position for        9 times. so the last...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT