[NO TESTS] WIP
This commit is contained in:
parent
b8eeecb2c3
commit
6bf7c7425e
4 changed files with 14 additions and 3 deletions
|
@ -1,3 +1,6 @@
|
|||
use crate::device::Device;
|
||||
use crate::vm::Uxn;
|
||||
|
||||
/**
|
||||
* The system console device
|
||||
*
|
||||
|
@ -11,7 +14,7 @@
|
|||
*
|
||||
*/
|
||||
#[derive(Debug)]
|
||||
struct ConsoleDevice {
|
||||
pub struct ConsoleDevice {
|
||||
vector: u16,
|
||||
inbuffer: [u8; 256],
|
||||
inidx: usize,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
use crate::device::Device;
|
||||
use crate::vm::Uxn;
|
||||
|
||||
/**
|
||||
* The null device does nothing when reading or writing.
|
||||
*/
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
use crate::device::Device;
|
||||
use crate::vm::Uxn;
|
||||
|
||||
/**
|
||||
* The system device
|
||||
*/
|
||||
#[derive(Debug)]
|
||||
struct SystemDevice {
|
||||
pub struct SystemDevice {
|
||||
buffer: [u8; 0xF],
|
||||
}
|
||||
|
||||
impl SystemDevice {
|
||||
fn new() -> SystemDevice {
|
||||
pub fn new() -> SystemDevice {
|
||||
SystemDevice { buffer: [0; 0xF] }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@ use std::cell::RefCell;
|
|||
use std::rc::Rc;
|
||||
use std::*;
|
||||
|
||||
use crate::device::null::NullDevice;
|
||||
use crate::device::system::SystemDevice;
|
||||
use crate::device::*;
|
||||
use crate::memory::*;
|
||||
use crate::stack::*;
|
||||
|
|
Loading…
Reference in a new issue