Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; multi-segment executable file template.
- include 'emu8086.inc'
- data segment
- ; add your data here!
- MSG1 db 0
- MSG db 0
- pkey db "inserisci la stringa nel vettore$"
- ends
- stack segment
- dw 128 dup(0)
- ends
- code segment
- start:
- ; set segment registers:
- mov ax, data
- mov ds, ax
- mov es, ax
- lea dx, pkey
- mov ah, 9
- int 21h
- call accapo
- accapo proc
- call pthis
- db 13,10,0
- accapo endp
- mov si,0
- inserisci:mov ah,1
- int 21h
- inc si
- cmp al,0dh
- je avanti
- jmp inserisci
- avanti:
- mov MSG1,al
- xor dx,dx
- xor si,si
- ribalta:
- mov si,'$'
- dec si
- cmp si,0
- je stampa
- loop ribalta
- stampa:
- mov ax, 4c00h ; exit to operating system.
- int 21h
- ends
- DEFINE_PTHIS
- end start ; set entry point and stop the assembler.
Add Comment
Please, Sign In to add comment