programb60 - Microprocessors & Applications (UPTU)...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Appendix B ØØ Explanation : Using Macro display the Menu for entering string, calculate length, reverse, palindrome and exit. Accept the choice from user using INT 21H function 01H. If choice = 1, call procedure for accepting string. Using interrupt INT 21H, function 0AH accept the string and end procedure. Return back to display Menu. If choice = 2, call procedure for finding length of the string. Display length and return back to display Menu. If choice = 3, call procedure to reverse the string. Display the reverse string and return back to display Menu. If choice = 4, call procedure to check if entered string is palindrome. If palindrome displays, the string is a palindrome, otherwise display String is not a palindrome. If choice = 5, terminate the program. If any other key is pressed display invalid choice. ØØ Algorithm : Step I : Initialize the data and stack memory. Step II : Using Macro display Menu. 1. Accept 2. Length 3. Reverse 4. Palindrome 5. Exit. Step III : Accept choice from user using INT 21H, function 01H. Step IV : IS choice = 1 jump to step XI else goto step V. Step V : IS choice = 2 jump to step XIV else goto step VI. Step VI : IS choice = 3 jump to step XVII else goto step VII. Step VII : IS choice = 4 jump to step XX else goto step VIII. Step VIII : IS choice = 5 jump to step XXIII else goto step IX. Step IX
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

programb60 - Microprocessors & Applications (UPTU)...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online