Ignore:
Timestamp:
Jan 15, 2009, 6:19:08 PM (16 years ago)
Author:
rosiere
Message:

1) Add soc test
2) fix bug (Pc management, Decod and execute, Update prediction ...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Softwares/Common/src/c/func_io.c

    r81 r101  
    22#include "thread_info.h"
    33
    4 void print(int data)
     4void tty (unsigned char data)
    55{
    6   int *show   =(int*)(TTY_BASE + (get_thread_id() << 4) + 8);
     6  unsigned int * addr =(unsigned int*)(TTY_BASE + (get_thread_id() << 4) + 0);
    77
    8   *(show) = data;
     8  *(addr) = data;
    99}
    1010
    11 void quit (int data)
     11void print (char * data)
    1212{
    13   int *stop   =(int*)(TTY_BASE + (get_thread_id() << 4) + 4);
     13  unsigned int * addr =(unsigned int*)(TTY_BASE + (get_thread_id() << 4) + 0);
    1414
    15   *(stop) = data;
     15  while ((*data) != '\0')
     16    {
     17      *(addr) = (*data);
     18      data++;
     19    }
    1620}
     21
     22void show (unsigned int data)
     23{
     24  unsigned int * addr =(unsigned int*)(TTY_BASE + (get_thread_id() << 4) + 8);
     25
     26  *(addr) = data;
     27}
     28
     29void quit (unsigned int data)
     30{
     31  unsigned int * addr = (unsigned int*)(TTY_BASE + (get_thread_id() << 4) + 4);
     32
     33  *(addr) = data;
     34}
Note: See TracChangeset for help on using the changeset viewer.