.data
	exitMsg	db 13,10,"Premi un tasto per uscire.",13,10,"$" 

.code
;
; Init
init	proc
	mov		ax,@data		; Get the address of the data segment
	mov		ds,ax			; Set the DS segment
	Ret
init endp

;
;
; Get a key and exit
;	(no params)
pressKeyAndExit proc
	mov		dx,offset exitMsg	; Get the address of our message in the DX
	mov		ah,9			; Function 09h in AH means "WRITE STRING TO STANDARD OUTPUT"
	int		21h				; Call the DOS interrupt (DOS function call)

	mov		ax,0C07h		; Function 0Ch = "FLUSH BUFFER AND READ STANDARD INPUT"
	int		21h				; Waits for a key to be pressed.
	
	mov		ax, 4C00h		; the exit fuction  [4C+no error (00)]
	int		21h				; call DOS interrupt 21h
pressKeyAndExit endp

;
; Exit
; 	(no params)
exit proc
	mov		ax, 4C00h		; the exit fuction  [4C+no error (00)]
	int		21h				; call DOS interrupt 21h
	Ret
exit endp
