write an asm code fragment that performs the indicated task or function: write a
ID: 3579926 • Letter: W
Question
write an asm code fragment that performs the indicated task or function:write a procedure to count the number of occurences of a given character provided, in a given string(of text). a pointer is passed to the string. write an asm code fragment that performs the indicated task or function:
write a procedure to count the number of occurences of a given character provided, in a given string(of text). a pointer is passed to the string.
write a procedure to count the number of occurences of a given character provided, in a given string(of text). a pointer is passed to the string.
Explanation / Answer
mov dl, "A"
call CountChar ... print the result ...
mov dl, "B"
call CountChar ... print the result ...
CountChar:
mov dh, 0
mov cx, ... length of input string ...
jcxz Ready
mov bx, ... address of input string ...
Again:
cmp [bx], dl
jne Skip
inc dh
Skip:
inc bx
loop Again
Ready:
ret
///*** Thank You ***///
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.