Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this problem, you will write a LC-3 assembly code that removes blank spaces from a string. Assume that the string starts at memory location

In this problem, you will write a LC-3 assembly code that removes blank spaces from a string. Assume that the string starts at memory location 0x4000, and is terminated by a \0 character (ASCII value = 0). Your program should store the modified string in the memory location starting at 0x4100. You do not need to modify the original string stored at 0x4000. You can assume that the original string at 0x4000 will always be less than 100 characters in length, and it will always start with a letter (A-Z, lowercase or uppercase possible).

Note: If the modified string has 7 characters, and the original string has 15 characters, the last 8 characters of your modified string should be all \0 (ASCII value = 0).

For example: If the original string at 0x4000 was aa 12 d e f \0, the modified string at 0x4100 after your program completes execution should be aa12def\0 \0\0\0\0\0\0\0\0 . Note that the original string has 8 blank space characters, and the modified string has 8 extra \0 in the end. Your code should start at memory location 0x3000.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data With Hadoop MapReduce A Classroom Approach

Authors: Rathinaraja Jeyaraj ,Ganeshkumar Pugalendhi ,Anand Paul

1st Edition

1774634848, 978-1774634844

More Books

Students also viewed these Databases questions

Question

1. Define mass and mediated communication

Answered: 1 week ago