mirror of
https://gitlab.cs.washington.edu/fidelp/frustration.git
synced 2024-12-26 21:58:20 +01:00
Clean up io #2 a bit
This commit is contained in:
parent
e227bfadb1
commit
0ea3d6e148
1 changed files with 4 additions and 4 deletions
|
@ -30,7 +30,7 @@ impl<const N: usize> Stack<N> {
|
||||||
struct Core {
|
struct Core {
|
||||||
ram: [u8; ADDRESS_SPACE],
|
ram: [u8; ADDRESS_SPACE],
|
||||||
ip: u16,
|
ip: u16,
|
||||||
dstack: Stack<32>,
|
dstack: Stack<16>,
|
||||||
rstack: Stack<32>
|
rstack: Stack<32>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,8 +38,8 @@ fn new_core() -> Core {
|
||||||
let c = Core {
|
let c = Core {
|
||||||
ram: [0; ADDRESS_SPACE],
|
ram: [0; ADDRESS_SPACE],
|
||||||
ip: 0,
|
ip: 0,
|
||||||
dstack: Stack {tos: 0, mem: [0; 32]},
|
dstack: Stack {tos: 15, mem: [0; 16]},
|
||||||
rstack: Stack {tos: 0, mem: [0; 32]}};
|
rstack: Stack {tos: 31, mem: [0; 32]}};
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ const PRIMITIVES: [Primitive; 16] = [
|
||||||
let _ = io::stdout().flush();
|
let _ = io::stdout().flush();
|
||||||
}
|
}
|
||||||
2 => {
|
2 => {
|
||||||
println!("{} {:?} {:?}", x.ip, x.dstack, x.rstack);
|
println!("{:?} {:?}", x.dstack, x.rstack);
|
||||||
let _ = io::stdout().flush();
|
let _ = io::stdout().flush();
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
|
|
Loading…
Reference in a new issue