هذا الكود كتبته لمعرفت غذا كان العدد أولي أم لا و لكنه لا يظهر أي نتيجة
.model tiny .code org 100h start: jmp primarystart str1 db "Enter Number $" str2 db "Is primary $" str3 db "Not primary $" number db ? primarystart: mov ah,09h mov dx,offset str1 int 21h mov ah,3fh mov dx,offset number int 21h mov al,number mov ah,0 push ax call isprimary pop ax cmp ax,0 jz no mov ah,09h mov dx,offset str2 int 21h no: mov ah,09h mov dx,offset str3 int 21h jmp end isprimary: pop dx mov cx,dx sub cx,2 mov bl,2 bb: mov ax,dx div bl cmp ah,0 jz nono inc bl loop bb jmp endloop nono: push 0 retn endloop: push 1 retn end: mov ah,4ch int 21h end start
أرجو المساعدة :s