Hi, I wanna ask.. suppose I have an array and a constant called threshold in my data segments
array db 1,2,3,4,5,6
threshold equ 5
I want to compare my array elements with the constant, and only display/print the number which is less that the threshold, if there are none, display the none message
this is what I have done so far...I got error messages regarding the bold one
start2:
mov ax, threshold
mov al, array[bx]
[B]mov bx,al
cmp al,ax[/B]
jl print
dec al
jnz start2
print:
add bx,30h
mov al,array[bx] ;store the number at the array
mov ah,2 ;display the number at the screen
mov dl,al
add dl,30h
int 21h
inc bl ;increment index register
jnz print
can someone enlighten me?