Question
Write an assembly language program for the LC-3 that obtains 7 characters to search, a string of 2 characters to search for in the string
Write an assembly language program for the LC-3 that obtains 7 characters to search, a string of 2 characters to search for in the string of 7, and 2 characters with which to replace the search string if found. The program will then print the string of 7 with the characters replaced if applicable. The program will then print the string of 7 with the entered as the first character at which time the program will immediately stop. Provide an algorithm. In the assembly language program, provide comments that relate the instructions to the algorithm.
Example:
Input characters: abcdeab
Find: ac
Replace: xy
abcdeab
Input characters: abcdean
Find: ab
Replace: wx
wxcdewx
Input characters: #
-----Halt Processor-----
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started