|
Last change
on this file since 107 was
101,
checked in by rosiere, 17 years ago
|
|
1) Add soc test
2) fix bug (Pc management, Decod and execute, Update prediction ...)
|
-
Property svn:keywords set to
Id
|
|
File size:
633 bytes
|
| Line | |
|---|
| 1 | #include "func_io.h" |
|---|
| 2 | #include "thread_info.h" |
|---|
| 3 | |
|---|
| 4 | void tty (unsigned char data) |
|---|
| 5 | { |
|---|
| 6 | unsigned int * addr =(unsigned int*)(TTY_BASE + (get_thread_id() << 4) + 0); |
|---|
| 7 | |
|---|
| 8 | *(addr) = data; |
|---|
| 9 | } |
|---|
| 10 | |
|---|
| 11 | void print (char * data) |
|---|
| 12 | { |
|---|
| 13 | unsigned int * addr =(unsigned int*)(TTY_BASE + (get_thread_id() << 4) + 0); |
|---|
| 14 | |
|---|
| 15 | while ((*data) != '\0') |
|---|
| 16 | { |
|---|
| 17 | *(addr) = (*data); |
|---|
| 18 | data++; |
|---|
| 19 | } |
|---|
| 20 | } |
|---|
| 21 | |
|---|
| 22 | void show (unsigned int data) |
|---|
| 23 | { |
|---|
| 24 | unsigned int * addr =(unsigned int*)(TTY_BASE + (get_thread_id() << 4) + 8); |
|---|
| 25 | |
|---|
| 26 | *(addr) = data; |
|---|
| 27 | } |
|---|
| 28 | |
|---|
| 29 | void 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
TracBrowser
for help on using the repository browser.