Question: Your task is to write a program that reads in values until a sentinel (which is the character 0) is read. As each character is

Your task is to write a program 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 010000012 and ASCII code for Z is 010110102 and so on. You should also print End of Processing. before your program terminates. Ensure that your program is sufficiently commented and you must include a register dictionary. (using instructions from LC-3 only )

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!