Solution_Problem_4-2

Solution_Problem_4-2 - * * * Palindrome Check * Written by:...

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

View Full Document Right Arrow Icon
******************************************************************************** * * 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
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/17/2008 for the course CMPEN 472 taught by Professor Grotzingertimoth during the Spring '08 term at Penn State.

Page1 / 6

Solution_Problem_4-2 - * * * Palindrome Check * Written by:...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online