include	clib.inc

	public	SHR32	; DX:AX >> CX

_TEXT	SEGMENT

SHR32	proc
	.while dx && cx
	    shr ax,1
	    shr dx,1
	    jnc @F
	    or ah,80h
	  @@:
	    dec cx
	.endw
	.if cx
	    shr ax,cl
	.endif
	ret
SHR32	endp

_TEXT	ENDS

	END
