Create a palindrome checker

Assignment Help Assembly Language
Reference no: EM132324208

Instruction Set and Library Lab

• For this lab you will be using a library cs12Lib.o
• And using basic math statements to write assembly code using integer arithmetic

Project 1:

Using the next two slides create a logic project
• You will want to create a project named kayak

Create a fresh project
use your own name for projectName

Go to the CS12-Libs Directory
git pull
cd template
./createProject projectName cd ../projectName
make
./projectName

Blank project file

You can use this for future projects as well

The createProject will do the following

Create a directory Create a basic .asm file

Create a Makefile for this project make will build the project make clean will clean up the files Use pico to edit the .asm file

Palindrome

• A palindrome is word that reads the same forward or backwards.
• For example,
• "anna"
• "civic"
• "hanah"
• "kayak"
• "madam"
• Are palindromes.

Create a Palindrome Checker

Create a program to determine if a carriage return (0x0a) terminated byte array representing a word is a palindrome.
This can be accomplished by pushing the characters on the stack one at a time (until a 0x0a is detected) and then popping from the stack and comparing to the byte array starting from the beginning.

• The program will perform the following:
• Print CS12 to the screen
• Prompt the user to enter a byte array of max 25 characters
• Determine if the byte array is the same forwards and backwards using the stack
• Print either:
• Is a palindrome!
• Is not a palindrome!

Project 2:

• You will want to create a project named sort

Create a fresh project
use your own name for projectName
Go to the CS12-Libs Directory
git pull
cd template
./createProject projectName cd ../projectName
make
./projectName

You should see CS12 print out

Blank project file
You can use this for future projects as well
The createProject will do the following
Create a directory Create a basic .asm file
Create a Makefile for this project
make will build the project
make clean will clean up the files Use pico to edit the .asm file

Create a program that will reverse then sort a set of 5 characters input by the user
• The program will perform the following:
• Print CS12 to the screen
• Query the user "Input 5 Characters"
Read in the characters
faced
• Print ‘Reverse' then the characters in reverse order
Reverse decaf
• Print ‘Sorted' then the characters in sorted order
Sorted acdef
• Note: see the next slides for reverse and sort requirements

Reverse

• The output of your reverse should be exactly the reverse of the input characters
• a-z, A-Z, 0-9
• abcde yields edcba
• ApPle yields elPpA
• AbCdE yields EdCbA
• 1a2B3 yields 3B2a1
• 13579 yields 97531

Sort

• The sort algorithm is bases on the numeric value of the ASCII Character
• This means the characters are sorted as follows

Characters

Order

ASCII Values

0-9

First

0x30 - 0x39

A-Z

Second

0x41 - 0x5A

a-z

Third

0x60 - 0x7A


What to turn in

• Turn in a screen shot of your program run
• Turn in the sort.asm file that generates your output

• Your output should match examples, and work for various values using alpha numeric characters as listed below
• a-z
• A-Z
• 0-9

Note: other characters will not be used in grading

Project 3:

There will be 3 files in the directory

• Three files:
• cards.asm
• driver.asm
• Makefile
• We can use the following make commands:
make this will make: cards make cards this will make: cards make driver this will make: driver make all this will make both make clean clean the directory

Cards and Driver

• Often when were trying to develop a function we create a test program called a driver
• For our Cards project I have included a driver program that will test the macros, and later our functions (future lab)
The driver program will fail as shown

• There are 4 macros that need to be filled in.
pushAll popAll newDeck displayValue

• Note the failure messages to the left when these pass the macros are working

• Fill in each macro to make it run in the driver program
• To test you will save the driver program driver.asm
• Make the driver make driver
• Run the driver program
./driver
• And check for a successful run

Attachment:- Lab.rar

Verified Expert

The assignment is based on programs which are to be made in x86_64 assembly language programming using linux ubuntu environment. Basically there are three tasks which are to performed in the assignment. First task is to write a program to ask the user to enter a word and the program will find out whether it is a palindrome or not. Second task is to write a program to ask the user to enter 5 characters and the program will then first reverse the character and then sort them. Third task is to write a program to run macros ie pushall, popall,newdeck, displayvalue for cards.asm file.

Reference no: EM132324208

Questions Cloud

What temperature must the Cu source be heated : If the Y source is heated to 1740 K to produce a vapor pressure of 10-3 torr, to what temperature must the Cu source be heated to maintain film stoichiometry
Reflective Paper - Personal Challenges Needing Improvement : The paper will include assessment of goal completion, self-assessment of skill level as a facilitator, personal accomplishments
Describe an illustrative example of theory concept : What are your thoughts on Governor Lamm's statements regarding what the "elderly's responsibility is"? Provide at least one quote from the article to address
Article Review - Worry intolerance of uncertainty : MGMT 650 Statistics for Managerial Decision Making Assignment - Article Review, University of Maryland University College, USA
Create a palindrome checker : CS12 Assembly Language Programming - write assembly code using integer arithmetic and Create a Makefile for this project make will build the project make clean
Prevent developing infectious disease : What is the single most important action that you can take to prevent developing an infectious disease? Why? how a virus like HIV could have infected him.
Write critical review of retailer marketing strategies : After your visits to your chosen retailer you are asked to write a critical review either of that retailer's marketing strategies
Characteristics of partnership between these two species : "Hawaiian Bobtail Squid, Virus Reassortment, What are the main characteristics of the partnership between these two species? How does each species benefit?
Discuss how the cancer is caused : Discuss how the cancer is caused. What are the symptoms that lead to a diagnosis of the cancer. Any known treatments, and the survival rate.

Reviews

len2324208

6/17/2019 11:01:58 PM

x86_64 assembly language programming with linux ubuntu The questions are in the attached files. 3 different assignments. Should be basic programming and follow prompt. Please use Eric.asm to name the asm.file if specified in prompt to use my own name.

Write a Review

Assembly Language Questions & Answers

  Write two (2) arm assembly language subroutines

Write two (2) ARM assembly language subroutines, called output_char and read_char

  Create a procedure named validatepin that receives a pointer

Create a procedure named ValidatePIN that receives a pointer to an array of bytes containing a 5-digit PIN from your main proc. You are required to use the four byte arrays samplePin_1, samplePin_2,samplePin_3 and samplePin_4 declared below.

  Write a subroutine for the given equation

You have to write a subroutine (assembly language code using NASM) for the following equation - perform multiplication and division (if required) using shift operations. AX and DX are the general purpose registers.

  Write a assembly language program that inputs characters

You are to design, write, test, and debug a MARIE assembly language program that inputs a sequence of characters from the set A-Z (capital letters only).

  The arm assembly language routine

For the ARM assembly language routine below, what function does it perform for the calling program?

  Program for huffman compression/decompression

Write a program for Huffman compression/decompression in assembly language that takes the data from input.txt and writes the output in output.txt.

  How is ld instruction converted in machine language

LC3 -Convert the above in machine language. How is LD instruction converted in machine language?

  Write a program that clears the screen

Write a program that clears the screen, locates the cursor near the middle of the screen, prompts the user for two integers, adds the integers, and displays their sum. You will need to use the ClrScr, Gotoxy, WriteString, Grit, and ReadInt procedu..

  Modifying the assembly program file

The assignment contains an assembly program file that needs to be modified - Reads 3 input texts from the user and prints them out to screen diagonally

  Multiply by using shift and add instructions

How does real time PCR work to quantify the initial amount of the DNA template? How should the method be modified to quantify the initial amount of RNA template extracted from tissue or cells?

  1 write a function in linux assembly that evaluates the

1. write a function in linux assembly that evaluates the length of a string called mystrlen. the function needs to take

  How the expression is written in postfix notation

Describe the Floating Point Unit data stack and describe how the expression is written in postfix notation

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd