SHARE
TWEET

Untitled

a guest Dec 12th, 2018 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .model small
  2. .stack 100h
  3. .data
  4. msg1 db "Number is Prime$"
  5. msg2 db "Number is not Prime$"
  6. input db "Enter Number : $"
  7. new db 0ah,0dh,"$"
  8. .code
  9. main proc
  10.     mov ax,@data
  11.     mov ds,ax
  12.     mov ah,9
  13.     lea dx,input
  14.     int 21h
  15.    
  16.     mov ah,1   ;number input nibe
  17.     int 21h
  18.     mov bl,al
  19.    
  20.     mov ah,9
  21.     lea dx,new
  22.     int 21h
  23.     cmp bl,31h    ;number 1 kina check korbe
  24.     je prime
  25.     cmp bl,32h    ;number 2 kina check korbe
  26.     je prime
  27.     cmp bl,33h    ;number 3 kina check korbe
  28.     je prime
  29.     cmp bl,35h    ;number 5 kina check korbe
  30.     je prime
  31.     cmp bl,37h    ;number 7 kina check korbe
  32.     je prime  
  33.    
  34.    
  35.     lea dx,msg2
  36.     int 21h      ;kono number er sathe match na korle
  37.     jmp exit     ;prime hobe na..tai not prime print korbe
  38.    
  39.     prime:
  40.     lea dx,msg1
  41.     int 21h
  42.    
  43.     exit:
  44.     mov ah,4ch
  45.     int 21h
  46.    
  47.     main endp
  48. end main
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top