While executing using TASM i am not getting the desired output.
To be more specific, I used the statement "div cx" to divide the no. and see if there is any remainder and its giving the expected result only sometimes.can anyone pls tell me where the problem is???
data segment org 0600h prime1 db ? count1 db 0 data ends code segment assume cs:code,ds:data start: mov si,0500h mov bl,[si] mov cx,2 call prime pop cx pop bx hlt prime proc near push cx push bx l: mov ax,bx div cx cmp dx,0 je count inc cx cmp cx,bx jle l count: inc count1 cmp cx,bx je pr inc cx cmp count1,1 jg exit jmp l pr: mov prime1,1 jmp exit exit: ret endp code ends end start