For this project you will be using the NASM assembler to write x86-64 assembly.

You can then use your favorite editor to write the program.

To assemble your program:

• Assemble it using: nasm –f elf64 filename.asm

• Link to create executable: gcc –m64 –o filename filename.o

• Execute program: ./filename or filename

Project Description:

Write and submit a NASM assembly language program “string.asm” that:

• Asks the user for an 8 character string.

• A number representing the number of characters that should be cut off the string.

• Displays the unedited string to the user .

• And finally displays the edited string to the user with the number of characters

removed.

Below is a sample run of the program:

Enter Text:

qwertyui

Enter the number of characters to cut off

3

This is what you entered

qwertyui

Here is your text edited

rtyui

Notes:

• The characters will be removed starting with the left most character.

• The characters can be a letter, number, space or others for example #,$ and so

on.

• Remember characters are read in in ASCII.

• You do not need to use Jumps or Loops in this project.

General Project (Hard) Requirements:

• Code that does not compile will receive 50% off

• We are programming for 64 bit Intel Architecture

• This is an individual project and any work submitted should be your own

• You must have a comment at the top of the code detailing what the code does.

• This comment should also include your full name and user ID.

• You must use good coding style with respect to variable names, spacing, labels

and comments.

• Submit only the .asm file named firstname_lastname_string.asm to

blackboard.

• You must submit the code before the deadline – no exceptions!

• You cannot use C/C++ function calls. You have to use system calls

Grading Breakdown: (remember that code that doesn’t compile will not get full credit.