/*
 * 5799-WZQ (C) COPYRIGHT IBM CORPORATION 1986
 * LICENSED MATERIALS - PROPERTY OF IBM
 * REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
 */
/* $Header:vttyio.c 12.0$ */
/* $ACIS:vttyio.c 12.0$ */
/* $Source: /ibm/acis/usr/src/ibm/aedtest/RCS/vttyio.c,v $ */

#ifndef lint
static char *rcsid = "$Header:vttyio.c 12.0$";
#endif

/* #include <stdio.h> */
#include "vikst.h"
#include "term.h"

static INT16 vset = FALSE;
static INT16 *vikptr;

vstrt()
{
	INT16 ready;
	vikptr = (INT16 *) 0xf40a4000;
	ready = *vikptr;
	DELAY(1);
	vset = TRUE;
}

vterm(cmd,c)
	char cmd, c;
{
	if (!vset) vstrt(); 

 	while (*vikptr) DELAY(1);	/* wait for cell to be empty */
	DELAY(1);
	*vikptr = (cmd << 8) | c;
	DELAY(1);
}
