console.c (7979:681283db9634) | console.c (7981:4fb228b84c1e) |
---|---|
1 2 3/* ****************************************** 4 * SimOS SRM Console 5 * 6 * Derived from Lance Berc's SRM console 7 * for the SRC XXM�Machine 8 * ******************************************/ 9 10 | 1 2 3/* ****************************************** 4 * SimOS SRM Console 5 * 6 * Derived from Lance Berc's SRM console 7 * for the SRC XXM�Machine 8 * ******************************************/ 9 10 |
11/* from simos */ | 11typedef unsigned long long uint64_t; |
12typedef unsigned long long uint64; | 12typedef unsigned long long uint64; |
13typedef unsigned int uint32_t; |
|
13typedef unsigned int uint32; 14 15#define CONSOLE 16#include "alpha_access.h" 17#include "machine_defs.h" 18 19#if 0 20#include "new_aouthdr.h" --- 93 unchanged lines hidden (view full) --- 114#if 0 115 CDR->intr_status =(DevRegister)(DEV_CNSLE_RX_INTR |DEV_CNSLE_TX_INTR); 116#endif 117} 118 119char GetChar() 120{ 121 struct AlphaAccess *k1Conf = (struct AlphaAccess *)(__MAGIC_ZONE(0, 0, MAGIC_ZONE_EV5_ALIAS)); | 14typedef unsigned int uint32; 15 16#define CONSOLE 17#include "alpha_access.h" 18#include "machine_defs.h" 19 20#if 0 21#include "new_aouthdr.h" --- 93 unchanged lines hidden (view full) --- 115#if 0 116 CDR->intr_status =(DevRegister)(DEV_CNSLE_RX_INTR |DEV_CNSLE_TX_INTR); 117#endif 118} 119 120char GetChar() 121{ 122 struct AlphaAccess *k1Conf = (struct AlphaAccess *)(__MAGIC_ZONE(0, 0, MAGIC_ZONE_EV5_ALIAS)); |
122 return 0; | 123 return k1Conf->inputChar; |
123} 124 125void PutChar(char c) 126{ 127#if 0 128 CDR->data = c; 129#endif 130#if 0 --- 991 unchanged lines hidden (view full) --- 1122}; 1123 1124long 1125CallBackDispatcher(long a0, long a1, long a2, long a3, long a4) 1126{ 1127 long i; 1128 switch (a0) { 1129 case CONSCB_GETC: | 124} 125 126void PutChar(char c) 127{ 128#if 0 129 CDR->data = c; 130#endif 131#if 0 --- 991 unchanged lines hidden (view full) --- 1123}; 1124 1125long 1126CallBackDispatcher(long a0, long a1, long a2, long a3, long a4) 1127{ 1128 long i; 1129 switch (a0) { 1130 case CONSCB_GETC: |
1130 break; | 1131 return GetChar(); |
1131 1132 case CONSCB_PUTS: | 1132 1133 case CONSCB_PUTS: |
1133 for(i = 0; i < a3; i++) { | 1134 for(i = 0; i < a3; i++) |
1134 PutChar(*(char *)a2+i); | 1135 PutChar(*(char *)a2+i); |
1135 } | |
1136 return a3; 1137 1138 case CONSCB_GETENV: 1139 if (a1 >= 0 && a1 < MAX_ENV_INDEX && env_ptr[a1] != 0 && *env_ptr[a1]) { 1140 i = strcpy((char*)a2, env_ptr[a1]); 1141 } else { 1142 strcpy((char*)a2, ""); 1143 i = (long)0xc000000000000000; --- 108 unchanged lines hidden --- | 1136 return a3; 1137 1138 case CONSCB_GETENV: 1139 if (a1 >= 0 && a1 < MAX_ENV_INDEX && env_ptr[a1] != 0 && *env_ptr[a1]) { 1140 i = strcpy((char*)a2, env_ptr[a1]); 1141 } else { 1142 strcpy((char*)a2, ""); 1143 i = (long)0xc000000000000000; --- 108 unchanged lines hidden --- |