Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write an assembly program which asks user to enter a character from A to Z. If the user enters any other character, the program asks

Write an assembly program which asks user to enter a character from A to Z. If the user enters any other character, the program asks user to enter the character again. In this way the program inputs 5 characters and stores it in memory location from address$1000 to$1004.

Then modify the program so the program terminates if the user presses 'Q'.

please write the code in code warrior format. an example of how is provided below. image text in transcribed

LOOP YCASE LDS #ROMStart load stack pointer JSR Terminit ; needed for Simulator only LDD #PROMPT ; pass the adr of the string JSR printf print the string JSR getchar ; call getchar function -result is: character JSR putchar CMPB #Y' ; is it a Y ? BNE NCASE ; jump ahead if not JSR YFCN ; else do corresponding function for Y CMPB #'N' ; is it a N ? BNE MCASE ; jump ahead if not JSR NFCN else do corresponding function for N CMPB #'M' ; is it a M? BNE NEXT : jump ahead if not JSR MFCN ; else do corresponding function for M JMP LOOP ; loop for more input NCASE MCASE NEXT

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

Define Management or What is Management?

Answered: 1 week ago

Question

What do you understand by MBO?

Answered: 1 week ago

Question

What is meant by planning or define planning?

Answered: 1 week ago