Guest User

Untitled

a guest
May 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. ; multi-segment executable file template.
  2. include 'emu8086.inc'
  3. data segment
  4. ; add your data here!
  5. MSG1 db 0
  6. MSG db 0
  7. pkey db "inserisci la stringa nel vettore$"
  8. ends
  9.  
  10. stack segment
  11. dw 128 dup(0)
  12. ends
  13.  
  14. code segment
  15. start:
  16. ; set segment registers:
  17. mov ax, data
  18. mov ds, ax
  19. mov es, ax
  20.  
  21. lea dx, pkey
  22. mov ah, 9
  23. int 21h
  24.  
  25.  
  26. call accapo
  27. accapo proc
  28.  
  29. call pthis
  30. db 13,10,0
  31.  
  32.  
  33.  
  34. accapo endp
  35.  
  36. mov si,0
  37. inserisci:mov ah,1
  38. int 21h
  39. inc si
  40. cmp al,0dh
  41. je avanti
  42. jmp inserisci
  43.  
  44. avanti:
  45. mov MSG1,al
  46. xor dx,dx
  47. xor si,si
  48.  
  49. ribalta:
  50. mov si,'$'
  51.  
  52. dec si
  53. cmp si,0
  54. je stampa
  55. loop ribalta
  56.  
  57. stampa:
  58.  
  59.  
  60. mov ax, 4c00h ; exit to operating system.
  61. int 21h
  62. ends
  63. DEFINE_PTHIS
  64. end start ; set entry point and stop the assembler.
Add Comment
Please, Sign In to add comment