[SOLVED] CS2110-Timed Lab 3 LC-3 Assembly

24.99 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (1 vote)

You are given a string of essentially random characters, and your task is to replace all non-numeric characters with space characters.

1         Instructions

The following files have been provided for you:

  1. timedlab3.asm

You will be editing timedlab3.asm to replace instances of non-numeric characters in a string with space characters. The space character (i.e. ‘ ‘) corresponds to decimal value 32 in ASCII. All other ASCII characters in the provided string, outside of the range ‘0’…’9′ should be replaced with ‘ ‘.

Remember: Strings are zero-terminated arrays of characters!

An ASCII table has been provided for your reference at the end of this document: The space character is highlighted with red and the numeric digits are highlighted with yellow .

We have defined the following assembly language labels for you:

  • STR ADDR: The address of the beginning of the string Consider the following examples:
Before After
“a3hf5k32ss” ” 3 5 32 “
“A3HF5K32SS” ” 3 5 32 “
“aBcD3fGhIj” ”         3            “

Note: Replace characters in the existing string. Do not copy it!

Hint: You may create your own labels with .fills!

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.