Question: 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

 Finish the skeleton program given below so that it is a

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!