Advertisement
MichaelPetch

masm anon label1

Apr 2nd, 2021
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. abMacro MACRO
  2. mov cx, 5
  3. @@:
  4. add ax,10
  5. cmp ax, 30
  6. je @F ; Jump forward to next anonymous label (@@)
  7.  
  8. loop @B ; Jump back to previous anonymous label (@@)
  9. @@:
  10. nop
  11. ENDM
  12.  
  13. stack SEGMENT PARA STACK
  14. db ?
  15. stack ENDS
  16.  
  17. data SEGMENT PARA PUBLIC
  18. db ?
  19. data ENDS
  20.  
  21. code SEGMENT PARA PUBLIC
  22. ASSUME ss: stack, ds: data, cs: code
  23.  
  24. _start:
  25.  
  26. mov ax, data
  27. mov ds, ax
  28.  
  29. abMacro
  30.  
  31. abMacro
  32.  
  33. mov ah, 04ch
  34. mov al, 1
  35. int 21h
  36.  
  37. code ENDS
  38. END _start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement