#include "vid.h"

#define  FALSE  0

vputc(row, col, chr, attr, retrace)
int   row, col, chr, attr, retrace;
{
   register int    c;
   VIDMEM scr_ofs;

   if (vidmode() == 7)
   {
      scr_ofs = MGAMEM + (row * 80) + col;
      retrace = FALSE;
   }
   else
      scr_ofs = CGAMEM+(row * 80) + col;

   c = attr <<8 | chr;

   if (retrace)
   {
      while ( (inp(CGASTAT) & 1) != 0);
      while ( (inp(CGASTAT) & 1) == 0);
   }

   *scr_ofs = c;
}
