Question
Write a program in assembly language (LC-3) that reads in values until a sentinel (which is the character 0) is read. As each character is
Write a program in assembly language (LC-3) that reads in values until a sentinel (which is the character 0) is read. As each character is read in, your program will compute and print the number of times the pattern 01 occurs in the ASCII code of that character. You will use GETC to read in a character. Once the sentinel is read, your program should terminate. Example: If the characters you enter are A,Z,3,U,0, then your program should print 2, 3, 2,4 (you dont need to print the commas or spaces). This is because the ASCII code for A is and ASCII code for Z is and so on. Please comment the code.
01000001 010110102 01000001 010110102Step 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