//////////////////////////////////////////////////////////////////////// // term-erc.cpp : Implementation of class CTerm // // $Log: term-erc.cpp,v $ // Revision 1.1 1998/05/10 23:03:31 nettleto // Initial revision // // // This is a terminal input class for the ERC32 target computer #include "term.h" void CTerm::Body () { volatile int *rxstat = (int *) 0x01F800E8; volatile int *rxadata = (int *) 0x01F800E0; int rxmask = 0x00000001; while (1) { int ch; // Wait until rx buffer not empty. while ((*rxstat & rxmask) == 0) { sched_yield (); } // Get next waiting character in ls 8 bits. ch = (*rxadata) & 0xff; // Pass character to buffer. b->Put (ch & 0xff); } }