SIO$INT: DO;

$NOLIST

$INCLUDE (:F1:COMMON.LIT)

$LIST

$INCLUDE (:F1:DEFIO.800)
DECL BAUD$RATE LIT '064';
DECL MODE3 LIT '036H';
DECL TMODE$PORT LIT '0E3H';
DECL TCOUNT$PORT LIT '0E0H';
DECL SET$CONTRL$BLOCK LIT '0ECH';
DECL SET$DATA$BLOCK LIT '0EDH';

SIO$INIT: PROCEDURE PUBLIC;

	OUTPUT(SET$CONTRL$BLOCK) = 0;
	OUTPUT(TMODE$PORT) = MODE3;
	OUTPUT(TCOUNT$PORT) = LOW(BAUD$RATE);
	OUTPUT(TCOUNT$PORT) = HIGH(BAUD$RATE);
	OUTPUT(SET$DATA$BLOCK) = 0;
	OUTPUT(SIO$STAT) = NULL;/* GET USART READY FOR RESET */
	OUTPUT(SIO$STAT) = NULL;
	OUTPUT(SIO$STAT) = NULL;
	OUTPUT(SIO$STAT) = SIO$RSET;/* RESET USART */
	OUTPUT(SIO$STAT) = SIO$MODE;/* WRITE MODE TO USART */
	OUTPUT(SIO$STAT) = SIO$CMND;/* WRITE COMMAND TO USART */
	RETURN;
END SIO$INIT;
END;
EOF
