changeset 4fb228b84c1e in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=4fb228b84c1e
description:
Implement GetChar()
console/Makefile:
Quick install target to copy the binary to zizzer
diffstat:
system/alpha/console/Makefile | 5 ++++-
system/alpha/console/console.c | 10 +++++-----
2 files changed, 9 insertions(+), 6 deletions(-)
diffs (59 lines):
diff -r 4a735b172989 -r 4fb228b84c1e system/alpha/console/Makefile
--- a/system/alpha/console/Makefile Fri Dec 19 14:24:01 2003 -0500
+++ b/system/alpha/console/Makefile Mon Dec 22 13:04:23 2003 -0500
@@ -11,7 +11,7 @@
dbmentry.o: dbmentry.s
$(AS) $(INCLUDES) -nointrinsics -o $*.o $*.s
-console.o: console.c
+console.o: console.c
$(CC) -g3 $(INCLUDES) -nointrinsics -o $*.o -c $*.c
printf.o: printf.c
@@ -45,5 +45,8 @@
$(LD) -o console -N -T $(DBMENTRY) -non_shared \
dbmentry.o console.o printf.o paljtokern.c.o paljtoslave.c.o -lc
+install: console
+ scp console zizzer.eecs.umich.edu:/z/m5/system/testing/binaries/console
+
clean:
rm -f *.o console *.strip paljtokern.c paljtoslave.c
diff -r 4a735b172989 -r 4fb228b84c1e system/alpha/console/console.c
--- a/system/alpha/console/console.c Fri Dec 19 14:24:01 2003 -0500
+++ b/system/alpha/console/console.c Mon Dec 22 13:04:23 2003 -0500
@@ -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 @@
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 @@
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:
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev