1	SUB SMG_DISP_CLR(STRING Text,LONG Row,LONG Col,WORD Rendition,	&
		BYTE Vir_disp_num)

	!---------------------------------------------------------------&
	!								&
	!		   	   SMG_DISP_CLR				&
	!								&
	!		Creation Date:  3-July-1985			&
	!		Author:		Ken Messer			&
	! 		Purpose:        Display text at a given point	&
	!				on a virtual display and clear	&
	!				the balance of the line		&
	!								&
	!		Modification history				&
	!								&
	!	Date	Description of change(s)			&
	!								&
	!---------------------------------------------------------------&
	!								&
	! Copyright (c) 1985 -	Ken Messer, Allied Electronics, Inc.,	&
	!			401 E. 8th St., Ft. Worth, TX  76102	&
	!								&
	! This software may be copied and distributed freely to anyone	&
	! for non-commerical use provided that this copyright notice is &
	! included.							&
	!---------------------------------------------------------------&

	OPTION TYPE = INTEGER, SIZE = INTEGER LONG

	%include "SMG$LIBRARY:SMG.DFN"


	DECLARE LONG 				RS,			&
						Rendition_set,		&
						Rendition_comp

	EXTERNAL LONG FUNCTION			SMG$Put_chars,		&
						SMG$Erase_line

	EXTERNAL LONG CONSTANT			SS$_Normal,		&
						SMG$M_Blink,		&
						SMG$M_Bold,		&
						SMG$M_Reverse,		&
						SMG$M_Underline

	EXTERNAL STRING FUNCTION	Get_Error_Message(LONG)

	!---------------------------------------------------------------&
	!								&
	!		M a i n   P r o g r a m   L o g i c		&
	!								&
	!---------------------------------------------------------------&

	Rendition_set, Rendition_comp = 0

	! Test rendition mask and set specified video attributes

	Rendition_set = Rendition_set OR SMG$M_Blink	 IF Rendition AND 1
	Rendition_set = Rendition_set OR SMG$M_Bold	 IF Rendition AND 2
	Rendition_set = Rendition_set OR SMG$M_Reverse	 IF Rendition AND 4
	Rendition_set = Rendition_set OR SMG$M_Underline IF Rendition AND 8

	Rendition_comp = Rendition_comp OR SMG$M_Blink	   IF Rendition AND 16
	Rendition_comp = Rendition_comp OR SMG$M_Bold	   IF Rendition AND 32
	Rendition_comp = Rendition_comp OR SMG$M_Reverse   IF Rendition AND 64
	Rendition_comp = Rendition_comp OR SMG$M_Underline IF Rendition AND 128

100	RS = SMG$Put_chars(Display_id(Vir_disp_num),Text,Row,Col,, 	&
		Rendition_set,Rendition_comp,)

	IF RS AND SS$_Normal = 0   THEN
		PRINT Get_Error_Message(RS)
		STOP
	END IF

200	RS = SMG$Erase_line(Display_id(Vir_disp_num),,)

	IF RS AND SS$_Normal = 0   THEN
		PRINT Get_Error_Message(RS)
		STOP
	END IF

32767	SUBEXIT

	END SUB
