I have a subroutine that is passed a pointer to a bit string in the si reg and an index in the ax register. I declared the val variable in the data seg
getbit:
cmp ax, 1783 ; max value of the index being passed
ja goback
push si
mov [val], ax
add si,val
mov ax,[si]
pop si
goback:ret
Is what I have, but it's not giving me the expected value, any help would be appreciated.