[NO TESTS] WIP

This commit is contained in:
Reid 'arrdem' McKenzie 2022-12-19 00:34:35 -07:00
parent b8eeecb2c3
commit 6bf7c7425e
4 changed files with 14 additions and 3 deletions

View file

@ -1,3 +1,6 @@
use crate::device::Device;
use crate::vm::Uxn;
/** /**
* The system console device * The system console device
* *
@ -11,7 +14,7 @@
* *
*/ */
#[derive(Debug)] #[derive(Debug)]
struct ConsoleDevice { pub struct ConsoleDevice {
vector: u16, vector: u16,
inbuffer: [u8; 256], inbuffer: [u8; 256],
inidx: usize, inidx: usize,

View file

@ -1,3 +1,6 @@
use crate::device::Device;
use crate::vm::Uxn;
/** /**
* The null device does nothing when reading or writing. * The null device does nothing when reading or writing.
*/ */

View file

@ -1,13 +1,16 @@
use crate::device::Device;
use crate::vm::Uxn;
/** /**
* The system device * The system device
*/ */
#[derive(Debug)] #[derive(Debug)]
struct SystemDevice { pub struct SystemDevice {
buffer: [u8; 0xF], buffer: [u8; 0xF],
} }
impl SystemDevice { impl SystemDevice {
fn new() -> SystemDevice { pub fn new() -> SystemDevice {
SystemDevice { buffer: [0; 0xF] } SystemDevice { buffer: [0; 0xF] }
} }
} }

View file

@ -2,6 +2,8 @@ use std::cell::RefCell;
use std::rc::Rc; use std::rc::Rc;
use std::*; use std::*;
use crate::device::null::NullDevice;
use crate::device::system::SystemDevice;
use crate::device::*; use crate::device::*;
use crate::memory::*; use crate::memory::*;
use crate::stack::*; use crate::stack::*;