include	clib.inc
include	conio.inc

_TEXT	SEGMENT

wcvisible	db	0

wcstline:
	push	0150h
	mov	ch,_scrrow
	mov	cl,0
	push	cx
	push	dx
	push	ax
	call	rcxchg
	ret

_TEXT	ENDS

PPROC	wcpushst, wc:dword, cp:dword
	cmp	cs:[wcvisible],1
	jne	wcpushst_00
	mov	dx,word ptr wc+2
	mov	ax,word ptr wc
	call	wcstline
    wcpushst_00:
	les	bx,wc
	mov	cx,80
	mov	al,' '
	mov	ah,at_background[B_Menus]
	or	ah,at_foreground[F_Menus]
	call	@wcputw
	les	bx,wc
	mov	byte ptr es:[bx+36],179
	inc	bx
	inc	bx
	mov	ax,word ptr cp
	mov	dx,word ptr cp+2
	call	@wcputs
	mov	dx,word ptr wc+2
	mov	ax,word ptr wc
	call	wcstline
	mov	cs:[wcvisible],1
	ret
PEND	wcpushst

PPROC	wcpopst, wp:dword
	mov	dx,word ptr wp+2
	mov	ax,word ptr wp
	call	wcstline
	xor	cs:[wcvisible],1
	ret
PEND	wcpopst

	END
