ok i have this problem in mind i wanted to try but i cant figure out whats wrong with my code..the program lets you input a string of integers then press another input as target..The target is then cmp to the string..the output should place lesser values on the string based on the specifed target ex.
string: 12456
target: 2
output: 1
.model small
.stack
.data
.code
start:
push 0ah ; push linefeed indication of stack
start1:
mov ah,1
int 21h
push ax ; data place at stack
cmp al,0dh
je out1 ; will jump if equal to cmp al,0dh
jne start1 ; will jump if not equal to cmp al,0dh
out1:
mov ah,2
mov dl,0ah ;linefeed
int 21h
target:
pop bx
mov ah,1
int 21h
tests:
cmp al,bl
jl out2
out2:
pop bx
mov ah,2
mov dl,al
int 21h
cmp al,0ah
jne tests
je fin
fin:
mov ah,4ch
int 21h
end start
need help...im just wondering how come it wont workout the way i wanted it to workout..