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

  Create a assembly language subroutine

Create a assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n words and array C containing n long words

  Write a function in linux assembly

Write a function in Linux assembly

  Analog measurements

Prepare an assembly program for the correctly measures the wind direction

  Design a simple digital clock

Design a simple digital clock

  Write an assembly program

Prepare an Assembly program that reads in a number of cents.

  Write an assembly language program

Write an assembly language program for encrypting alphabates of a string

  Greatest common divisor of integers-masm assembly language

Must be done in MASM assembly language: Greatest common divisor of two integers is largest integer which will evenly divide both integers. GCD algorithm involves integer division in a loop.

  Write assembly program-find right admission price to movie

Write the Assembly program to find correct admission price to movie. Price of admission to a movie is $7 for kids (under 12) and $9 for adults.

  Create simple 8-bit alu using add-subtract-shift functions

Create a simple 8-bit ALU. Requirements:The eight functions that you will implement are: add, subtract, and, or, shift left logical, less than, shift right logical.

  Write assembly program print binary representation-integers

Write the assembly program called hw6_ex1, stored in file hw6_ex1.asm. This program must prompt user to enter signed 32-bit integer. Program must print out binary representation of the integer.

  Allot op-codes and add microcode to microprogram

Allot op-codes and add microcode to microprogram of Mic-1 to implement following instructions which are then included with IJVM instruction set.

  Write mips assembly program to read two non-negative numbers

Write MIPS assembly program to repeatedly read two non-negative integers and print integer product and quotient without using multiplication and division instructions.

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