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 010110102
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
