Advertisement
tosip

Untitled

Aug 10th, 2021
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. ; You may customize this and other start-up templates;
  2. ; The location of this template is c:\emu8086\inc\0_com_template.txt
  3.  
  4. org 100h
  5.  
  6. .data
  7. msg1: db "Hello World",0DH,0AH,'$'
  8. msg2: db "Bye World",0DH,0AH,'$'
  9.  
  10. .code
  11.  
  12. main proc
  13.  
  14. mov ax,0
  15.  
  16. increment:
  17. inc ax
  18. mov bx,ax
  19. cmp bx,5
  20. jne print1
  21. je print2
  22.  
  23.  
  24. print1:
  25. mov dx,offset msg1
  26. mov ah,09h
  27. int 21h
  28. jmp increment
  29.  
  30. print2:
  31. mov dx,offset msg2
  32. mov ah,09h
  33. jmp exit
  34.  
  35. exit:
  36. mov ah,4ch
  37. int 21h
  38.  
  39.  
  40.  
  41. main endp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement