A string toolkit

The problem

Build a program that reads a line and reports facts about it, using the stack and the string instructions: the line backwards, the number of vowels and whether it is a palindrome.

Requirements

Technologies

Step by step

  1. Read the line and put a dollar sign after its characters.
  2. Push each character, then pop them all to print the line backwards.
  3. Count the vowels with a loop over the line and a loop over the vowel table.
  4. Make a reversed copy of the line in a second buffer and compare it with the line using REPE CMPSB.
  5. Print the three results, and test with words such as racecar, stack and a single letter.

Expected result

A program that prints the line reversed, the number of vowels and a palindrome verdict for each test line.

How it is evaluated

Ways to improve it