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 Write a program in assembly language (LC-3) that reads in values until and ASCII code for Z is a sentinel (which is the character 0) is read. As each character and so on. Please comment the code.

01000001 010110102 01000001 010110102

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!