#include "func_io.h"
#include "thread_info.h"
#include "cpu_info.h"

void tty (unsigned char data)
{
  unsigned int * addr =(unsigned int*)(TTY_BASE + (get_cpu_id() << 4) + 0);

  *(addr) = data;
}

void print (char * data)
{
  unsigned int * addr =(unsigned int*)(TTY_BASE + (get_cpu_id() << 4) + 0);

  while ((*data) != '\0')
    {
      *(addr) = (*data);
      data++;
    }
}

void show (unsigned int data)
{
  unsigned int * addr =(unsigned int*)(TTY_BASE + (get_cpu_id() << 4) + 8);

  *(addr) = data;
}

void quit (unsigned int data)
{
  unsigned int * addr = (unsigned int*)(TTY_BASE + (get_cpu_id() << 4) + 4);

  *(addr) = data;
}
