Intermediate

Character Counter

Count occurrences of a character in a string.

Write a program that counts how many times the letter 'l' appears in the string "Hello, World!" and prints the count.

Requirements:
• Count occurrences of the character at label CHAR in the string at label STR

• Print the count as an ASCII digit

• The answer should be 3 (three lowercase 'l's in "Hello, World!")

Data:

CHECK_STRING  .STRINGZ "Hello, World!"
CHAR .FILL #108  ; ASCII 'l'
1
2
3
4
5
6
7
8
9
10
11
12