Solution_Problem_4-2

# Solution_Problem_4-2 - Palindrome Check Written by Lee...

This preview shows pages 1–3. Sign up to view the full content.

******************************************************************************** * * Palindrome Check * Written by: Lee Coraor * Date: March 4, 2008 * Homework: No. 4, Problem 2 * This program inputs a character string from the CRT. * The string terminates if a "." or "CR" is entered, or * if the string reaches 100 alphabetic characters in length. * If the string is a palindrome the user will be notified. * In checking for a palindrome case is ingnored as are all * non alphabetic characters. * Note: Back space is recognized as a character eraser. * * Inputs-Outputs: SC0 - connected to the CRT * PS0=RxD (simulated keyboard) * PS1=TxD (simulated CRT) * 38400 = Baud Rate * Data Structures: RAM buffer to store the characters * \$0800-\$0864 * Stack - starts at \$0A00 * * ********************************************************************************* SC0DBH equ \$00C0 SC0CR1 equ \$00C2 SC0CR2 equ \$00C3 SC0SR1 equ \$00C4 SC0DRL equ \$00C7 RDRF equ %00100000 TDRE equ %10000000 TOS equ \$0A00 CR equ \$0D LF equ \$0A period equ \$2E BS equ \$08 BufferBOT equ \$0800 ;bottom (start) of RAM buffer

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
org \$FFFE reset dc.w Init org \$FFD6 SCI0INT dc.w RECISR org \$0800 RAMbuffer ds.b 100 ;RAM buffer for character string ISRaddr ds.w 1 ;pointer to RAM buffer ISRsema ds.b 1 ;a semaphore for the ISR routine ;00 = string not complete ;\$FF = string complete ;any other value - string error org \$F100 Init movw # 13 ,
This is the end of the preview. Sign up to access the rest of the document.
• Spring '08
• GROTZINGERTIMOTH
• ASCII, null character, character string, transmitter ready SC0DRL, message brclr SC0SR1, ram buffer

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern