.386

_TEXT segment public byte use32 'CODE'
_TEXT ends
_DATA segment public dword 'DATA'
_DATA ends

	assume	cs:_TEXT,ds:_DATA
_TEXT segment
;
; void WriteStr(char *pStr)
;
; Calls INT 21h function 09h to write a string to standard output
;
	public	_WriteStr,WriteStr_,WriteStr
WriteStr label near
WriteStr_ label near
_WriteStr proc	near
;
; Stack frame
;
#pStr	equ	(dword ptr 8[ebp])	

	push	ebp			; set up stack frame
	mov	ebp,esp				;
	push	edx			; save regs
	mov	edx,#pStr		; write string to stdout
	mov	ah,9				;
	int	21h				;
	pop	edx			; restore regs
	mov	esp,ebp			; restore stack frame and exit
	pop	ebp				;
	ret					;
_WriteStr endp

_TEXT ends

end
