data segment
num db -3,1,-5,6,-7,9,'#'
p_cnt db 0h
n_cnt db 0h
data ends
code segment
assume ds:data,cs:code
start:
mov ax,data
mov ds,ax
lea si,num
main:
cmp num[si],0h
jg pos
inc si
add n_cnt,01h
cmp num[si],'#'
je exit
jmp main
pos:
add p_cnt,01h
inc si
cmp num[si],'#'
je exit
jmp main
exit:
mov bl,p_cnt
mov cl,n_cnt
mov ax,4c00h
int 21h
code ends
end start