Advertisement
sujonshekh

ODD and EVEN in Assmble_program_jeba

Feb 24th, 2017
417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. ; You may customize this and other start-up templates;
  3. ; The location of this template is c:\emu8086\inc\0_com_template.txt
  4.  
  5. org 100h
  6.  
  7. .data
  8. x_ db "ODD$"
  9. y_ db "EveEn$"
  10. z_ db "This is a out of range compare !      azad ki koro     $"
  11.  
  12.  
  13. .code
  14. mov ax,@data
  15. mov ds,ax
  16. mov al,6
  17.  
  18. 1,3:cmp al,1
  19.     je odd_
  20.     cmp al,3
  21.     je odd_
  22.      ;jne z5
  23.    
  24. 2,4:cmp al,2
  25.     je even_
  26.     cmp al,4
  27.     je even_  
  28.        jne z5
  29.    
  30.  
  31.     odd_:
  32.     lea dx,x_
  33.     mov ah,9
  34.     int 21h  
  35.      jmp finish
  36.    
  37.     even_:lea dx,y_
  38.     mov ah,9
  39.     int 21h  
  40.      jmp finish  
  41.      
  42.       z5:
  43.    lea dx,z_
  44.    mov ah,9
  45.    int 21h
  46.    jmp finish
  47.                  
  48.                  
  49.      
  50.    
  51.          
  52.          finish:
  53.  
  54. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement