Latkoski

robz #2 стек

Nov 16th, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. ; multi-segment executable file template.
  2.  
  3. data segment
  4. ;pkey db "press any key...$"
  5. zbor db "zbor$"
  6.  
  7. ends
  8.  
  9. stack segment
  10. dw 128 dup(0)
  11. ends
  12.  
  13.  
  14. start:
  15. mov ax, data
  16. mov ds, ax
  17. mov es, ax
  18.  
  19.  
  20.  
  21. lea bx,zbor
  22. mov cx,4d
  23. ciklus:
  24. mov ax,[bx]
  25. push ax
  26. inc bx
  27. dec cx
  28. cmp cx, 0d
  29. jne ciklus
  30.  
  31. mov cx,4d
  32.  
  33. pecatenje:
  34. pop ax
  35. mov dx,ax
  36. mov ah, 02h
  37. int 21h
  38. dec cx
  39. cmp cx,0d
  40. jne pecatenje
  41.  
  42.  
  43. mov ax, 4c00h
  44. int 21h
  45. ends
  46. end start
Advertisement
Add Comment
Please, Sign In to add comment