Advertisement
leonard007

S6 3

Nov 2nd, 2022
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. org 100h
  2.  
  3.  
  4. .data
  5.  
  6. .code
  7.  
  8. ; JZ - jump if zero
  9. ; JNZ - jump if not zero
  10.  
  11. ; JZ nume_label
  12.  
  13. mov al, 5
  14. mov bl, 2
  15. and ah,ah
  16.  
  17. mov ah,1
  18. int 21h  
  19. sub al, 30h
  20.  
  21. jnz impar ; daca este 0 intra pe if adica pe par
  22.    
  23.      
  24. par:    
  25.  
  26.     mov dl, 'P'
  27.     jmp endif
  28. impar:  
  29.     mov dl, 'I'
  30.     jmp endif
  31. endif:    
  32.     mov ah, 2
  33.     int 21h
  34.    
  35. ret
  36.  
  37.  
  38.  
  39.  
  40.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement