Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Finish the skeleton program given below so that it is a complete program. The completed program must prompt the user for a character. If the

image text in transcribed

Finish the skeleton program given below so that it is a complete program. The completed program must prompt the user for a character. If the character is 'Y' the program must display the character, '1', referenced by the pointer at the memory location labeled yesCharPtr. If the character is 'N' the program must display the character, 'o', referenced by the pointer at the memory location labeled noCharPtr. If the character is neither 'Y' nor 'N' the program must display the character,', referenced by the pointer at the memory location labeled neitherPtr. You must use the LDI instruction to access values of yesChar, noChar and neither in memory from the pointers stored in memory. Do not use LD, LEA or LDR to access yesChar, nochar or neither The memory locations Y and N contain the 2's compliment of the characters 'Y' and 'N' to make it easy to determine if the character entered by the user is a 'Y' or 'N' or neither of those characters. You may access these values using the LD instruction. ; COMP2280 ; Lab 3, question 2 ; Author: Stew Dent ; Get a character from the keyboard, if it 'Y' display '1', ; if it is 'N' display 'o', otherwise display '*'. : Do not display the quote characters. .origx3000 ro,prompt ask for a character puts lea ; INSERT YOUR CODE HERE ro,eopMsg lea puts halt Y .fill XFFA7; 2's compliment of 'Y' N .fill xFFB2; 2's compliment of 'N' yesCharPtr.fill yesChar noCharPtr .fill nochar neither Ptr .fill neither yesChar .fill x0031 nochar X0030 neither prompt eopMsg .fill x002A stringz "Enter a character: " stringz " Programmed by Stew Dent End of processing. " .end

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

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago