created sicxe emulator project
This commit is contained in:
parent
cb38efe586
commit
3332b2971b
18 changed files with 1051 additions and 0 deletions
20
simulator_SIC_XE/src/input_device.cpp
Normal file
20
simulator_SIC_XE/src/input_device.cpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#include "input_device.h"
|
||||
|
||||
InputDevice::InputDevice(std::istream &in)
|
||||
: inStream(in)
|
||||
{
|
||||
}
|
||||
|
||||
InputDevice::~InputDevice()
|
||||
{
|
||||
}
|
||||
|
||||
unsigned char InputDevice::read()
|
||||
{
|
||||
char c;
|
||||
if (!inStream.get(c)) {
|
||||
// If stream is at EOF or error, return 0
|
||||
return 0;
|
||||
}
|
||||
return static_cast<unsigned char>(c);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue