summaryrefslogtreecommitdiff
path: root/system/alpha/console/console.c
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2003-12-22 13:04:23 -0500
committerNathan Binkert <binkertn@umich.edu>2003-12-22 13:04:23 -0500
commitfbe8ff04da3c33549ffde08258c5b2b0f586e94a (patch)
tree8c45f4bc5c1202d844cc2983af60c330bc001c47 /system/alpha/console/console.c
parentd7fba9784e99ca4465c9cc04b611cf309e637d33 (diff)
downloadgem5-fbe8ff04da3c33549ffde08258c5b2b0f586e94a.tar.xz
Implement GetChar()
console/Makefile: Quick install target to copy the binary to zizzer
Diffstat (limited to 'system/alpha/console/console.c')
-rw-r--r--system/alpha/console/console.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/alpha/console/console.c b/system/alpha/console/console.c
index e8bc9bd26..d62dfdb70 100644
--- a/system/alpha/console/console.c
+++ b/system/alpha/console/console.c
@@ -8,8 +8,9 @@
* ******************************************/
-/* from simos */
+typedef unsigned long long uint64_t;
typedef unsigned long long uint64;
+typedef unsigned int uint32_t;
typedef unsigned int uint32;
#define CONSOLE
@@ -119,7 +120,7 @@ void InitConsole(void)
char GetChar()
{
struct AlphaAccess *k1Conf = (struct AlphaAccess *)(__MAGIC_ZONE(0, 0, MAGIC_ZONE_EV5_ALIAS));
- return 0;
+ return k1Conf->inputChar;
}
void PutChar(char c)
@@ -1127,12 +1128,11 @@ CallBackDispatcher(long a0, long a1, long a2, long a3, long a4)
long i;
switch (a0) {
case CONSCB_GETC:
- break;
+ return GetChar();
case CONSCB_PUTS:
- for(i = 0; i < a3; i++) {
+ for(i = 0; i < a3; i++)
PutChar(*(char *)a2+i);
- }
return a3;
case CONSCB_GETENV: