Write an assembly language program that collects a string from the user then counts and displays the number of alphabets

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write an assembly language program that collects a string from the user then counts and displays the number of alphabets

Post by answerhappygod »

Write An Assembly Language Program That Collects A String From The User Then Counts And Displays The Number Of Alphabets 1
Write An Assembly Language Program That Collects A String From The User Then Counts And Displays The Number Of Alphabets 1 (131.38 KiB) Viewed 92 times
Write an assembly language program that collects a string from the user then counts and displays the number of alphabets (characters range: a to z or A to Z), the number of digits (character range: 0 to 9) and number of any other characters which are not alphabets or digits. For example, below are examples of input/output. input string: abc number of alphabets: 3 number of digits: 0 other characters: 0 input string: abc123 number of alphabets: 3 number of digits: 3 other characters: 0 input string: abc, 123 number of alphabets: 3 number of digits: 3 other characters: 1 input string: a*2 number of alphabets: 1 number of digits: 1 other characters: 1 input string: number of alphabets: 0 number of digits: other characters: ооо input string: Abco? number of alphabets: 3 number of digits: 1 other characters: 1 Use the following procedures for input/output. For more details about these procedures see Chapter 5 of Irvine textbook. • ReadString: Reads a string from the keyboard and returns its length in the EAX register. • WriteString: Writes a null-terminated string to the console window. HINT: Use the ASCII numerical code to find if a character is alphabet, digit or other character. For instance, the letter 'a' is 97, digit 'O' is 48, ..etc. For the complete ASCII table, check the following: https://en.wikipedia.org/wiki/ASCII
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply