October 15th, 2009, 11:37 PM
Hi. I've created a small program where the user inputs 8 bits and those bits are stored in order of input into an array. Here is a code fragment of my program that deals with this array...
Now I'd like to see how many times the first two bits are repeated in the byte. For example if the first two characters are 11 then in the byte 11001101, the answer is 2...
mov bx, offset array
mov ah, 01h ; keyboard input subprogram
int 21h ; read character into al
mov [bx], al
cmp CX, 7
Can anybody provide some tips or sample code on how this could be done? Thanks.