00:01
Hello student, here this program works by first initializing the stack pointer and the uart and then declare the buffer to store the received string.
00:09
The two functions are palindrome and string length.
00:12
So here palindrome function takes a string as the input and returns 1 if the string is palindrome and 0 if the string is not palindrome.
00:18
Then the function by comparing the character at the beginning and the end, moving the pointer inward until they meet.
00:24
If all the characters match, then the string is palindrome.
00:27
Otherwise, string is not palindrome.
00:28
For example, i have taken here x, a, ax.
00:33
If this match with this, if this match with this, then i will say it's palindrome.
00:37
String length, string length function will calculate the string length.
00:41
So here total four characters are there.
00:42
So here string length will be four.
00:44
Main function is first receive a string of the character via uart.
00:48
Then it calls a is palindrome function to check if the string is palindrome.
00:52
And finally it calls a print function to print the result.
00:55
So here plp program to implement the uart palindrome checker.
01:00
So here uart palindrome checker initializes the step pointer.
01:04
This position is given.
01:05
This address is given to us.
01:07
Initialize the uart, uart underscore init.
01:11
This will initialize the uart, uart declare the buffer to store the received string.
01:17
So here i have to take a buffer and here i have stored 100 characters in this.
01:22
Declare a buffer to check if the string is palindrome.
01:25
So here i have to check the string is palindrome or not.
01:28
So here is underscore palindrome, get the length of the string.
01:32
Now call the function string length and after this $a0 move to vnote.
01:38
So in this way i will check the palindrome or not.
01:42
Initialize the two pointer.
01:43
So now i have to take the two pointer $s0 and $s1.
01:48
So with the help of this pointer, this is at the starting and this is at the end.
01:57
$s0 and $s1.
02:01
So here add immediately.
02:03
So here i have declared these two and starting value is here zero.
02:07
So it carries zero value and it carries also the zero value.
02:11
Loop through the string comparing the character at the two pointer.
02:14
So here i have to loop the, i have to take the help of the loop and comparing the characters with the help of a two pointer.
02:24
So now get the character at the two pointer...