Write an assembly program that detects palindrome. A palindrome is a word, phrase, or sequence that...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write an assembly program that detects palindrome. A palindrome is a word, phrase, or sequence that reads the same backward as forward. For example, "madam" or "1234321" are palindromes, "12345" is not. Requirements: 1. You may use the concepts of conditional branch, loop. and push /pop [stack] from our class discussion. 2. You may use the program for reversing string as a hint. 3. Input: You may hard-code your input in data /variable definition. For example, myString BYTE "abrakadabra" 4. Output: if the input string is a palindrome, ECX should contain your student number as its final value at the end. Otherwise, ECX should get 0 (zero), indicating the string was not a palindrome. I'll check ECX to learn the result. For comparison, you can use je (jump if equal) and sub instructions. Write an assembly program that detects palindrome. A palindrome is a word, phrase, or sequence that reads the same backward as forward. For example, "madam" or "1234321" are palindromes, "12345" is not. Requirements: 1. You may use the concepts of conditional branch, loop. and push /pop [stack] from our class discussion. 2. You may use the program for reversing string as a hint. 3. Input: You may hard-code your input in data /variable definition. For example, myString BYTE "abrakadabra" 4. Output: if the input string is a palindrome, ECX should contain your student number as its final value at the end. Otherwise, ECX should get 0 (zero), indicating the string was not a palindrome. I'll check ECX to learn the result. For comparison, you can use je (jump if equal) and sub instructions.
Expert Answer:
Answer rating: 100% (QA)
Writing a complete assembly program involves a bit more code but I can provide you with a simplified ... View the full answer
Related Book For
Starting Out With Java From Control Structures Through Data Structures
ISBN: 9780133957051
6th Edition
Authors: Tony Gaddis
Posted Date:
Students also viewed these programming questions
-
Make up an advertisement about a water bottle that uses at least two of the three methods of persuasion (pathos, logos, ethos) and uses demographics to appeal to a specified target audience. Then...
-
The bank portion of the bank reconciliation for Langer Company at November 30, 2017, was as follows. The bank statement contained two memoranda: 1. A credit of $5,285 for the collection of a $5,140...
-
(a) Calculate the number of possible lottery tickets if the player must choose five distinct numbers from 0 to 44, inclusive, where the order does not matter. The winner must match all five. (b)...
-
Replace the loading acting on the frame by an equivalent resultant force and couple moment acting at point A. B -3 ft 80 lb. +3 -3 ft- 75 lb 60 lb + 3 ft -3 ft- 2 ft 1 40 lb A 4 ft
-
A spherical capacitor consists of two concentric conducting spherical shells of radii \(R\) and \(2 R\). (a) How long would a coaxial cylindrical capacitor made of two concentric cylindrical...
-
Radial Inc. had sales of $2,400,000 for the first quarter of 2014. In making the sales, the company incurred the costs and expenses shown below Prepare a CVP income statement for the quarter ended...
-
10. A plastic ball is rising in water with terminal speed v. If we use a different plastic whose density is double that of the original ball but still less that density of water, keeping the radius...
-
The soil mass in Figure P9-13 is loaded by a force transmitted through a circular footing as shown. Determine the stresses in the soil. Compare the values of r using an axisymmetric model with the ...
-
2)On a hot summer day, you decide to mix some Kool-Aid and freeze it into popsicles. The water used for the Kool-Aid was 75F and the freezer has a temperature of -20F. Use Newton's Law of Cooling....
-
To manage this interest rate risk, the FI's manager considers using futures contracts. The manager looks at Treasury note futures, where the duration of the Treasury notes underlying the futures...
-
RECEPTIONIST DEALERSHIP Briefly describe the task(s) The receptionist at a car dealership Working at a car dealership has shown me several benefits, including: Sales experience, I have gained...
-
The inverting op-amp is shown in the fig below. (1) Design the inverting amplifier (find R.) with power supply voltages of V+-15 V and V--15V, Re-50 kd such that voltage gain Vo/Vi=-20 V/V [10] (2)...
-
2. For the message signal m(t)=100001101010 and unmodulated carrier signal s(t)=A-cos(2rtFt+), Draw the output waveform (modulation diagram) for each (15 Marks) technique given below. a) 4QAM b) 8PSK...
-
Express 9 in terms of i: -9=
-
You are developing an application where a users contact list entries are to be stored. The fields of importance are name, surname, telephone number, and a favourites flag. Assume that the name and...
-
What key concerns must functional tactics address in marketing? Finance? POM? Personnel?
-
Write an if statement that displays the word digit if the char variable ch contains a numeric digit. Otherwise, it should display Not a digit.
-
Why is the computer used by so many different people, in so many different professions?
-
Assume that a program uses the named constant PI to represent the value 3.14. The program uses the named constant in several statements. What is the advantage of using the named constant instead of...
-
Ram Lakhan Company Ltd. produces one unit of product B by using one unit of raw material A. During 200506 A costed the company 4,200. Conversion cost was 850. As on 31st March 2006, being the...
-
Usha Corporation Ltd. sought the advice of an investment advisor for deployment of surplus funds of around Rs. 45 lakh in the stock market. The advisor advised to invest in Bhonsle India Ltd. and...
-
Bharti Investments Ltd. holds 8000 shares of Phonetel Corporation Ltd. It acquires 7000 shares of Subharti Ltd. from Idea Investments Ltd. in exchange for these shares. Determine the cost of shares...
Study smarter with the SolutionInn App