Question: The program develops a Palindrome checker application. // The input to the program is a 5 digit integer A and is stored in RAM[0] (R0).

The program develops a Palindrome checker application.

// The input to the program is a 5 digit integer A and is stored in RAM[0] (R0).

// A helper value of 10 is stored in RAM[8] (R8) by virtue of the tst file command.

// Number A is a positive integer.

// A has exactly 5 digits and no more no less.


// Program functions as follows:

// Extract the individual digits from number A and store them in R2-R6 registers in that order.

// Result of 1 is stored in R1 if the number A is a Palindrome else result of 0 is stored in R1


Image is the .tst file for the correct answers to be tested against the .asm file.
RAM[4] | RAM[5] | RAM[6] | RAM[0] | 12121 12345 RAM [1] 

RAM[4] | RAM[5] | RAM[6] | RAM[0] | 12121 12345 RAM [1] | RAM[2] | RAM [3] | | 30603 1 | 10211 0 1 1 0 | 153 2 4 | 0 | 1 I 2200 1362 1 1 | 3 | 1 |

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!