QuestionQuestion

Write a program that reads a paragraph from the keyboard and processes it in the following fashion:
- Calculate the number of words in the paragraph
- Calculate the number of lines of text in the paragraph
- Calculate the number of characters that are the same as the 3rd letter of your last name.

   
Terminate the paragraph with special character (it should be the character above numerical key of the regular keyboard; your numerical key = [(the last digit of your ID) MODULO 7] +1).
Display results on screen.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

include irvine32.inc    ; from Irvine CDROM

.stack 4096

.data
getname_msg byte "enter your last name ", 0
getid_msg byte "enter your id ", 0
paragraph byte "enter paragraph : ", 0
words byte "the number of words in the paragraph ", 0
lines byte "the number of lines of text in the paragraph ", 0
sames byte "the number of characters that are the same as the 3rd letter of your last name ", 0

word_num dword 0
line_num dword 1
third_letter_count dword 0
CR equ 0Dh ; carrier return
last_name byte 30 dup(0)
id byte 20 dup(0)

last_name_bytes_count dword ?
third_letter byte ?
terminate_letter byte ?
previous byte ' '

.code
main proc

call getid ; get id and special charater
call getname ; get name and the 3rd charatger...
$93.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Assembly Language Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats