From 0ea3d6e1486f9b24f9c0766b0ad5dd2ab6bd4d82 Mon Sep 17 00:00:00 2001 From: psf Date: Tue, 17 May 2022 23:50:38 -0700 Subject: [PATCH] Clean up io #2 a bit --- frustration.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frustration.rs b/frustration.rs index 5c63679..e5d32ea 100644 --- a/frustration.rs +++ b/frustration.rs @@ -30,7 +30,7 @@ impl Stack { struct Core { ram: [u8; ADDRESS_SPACE], ip: u16, - dstack: Stack<32>, + dstack: Stack<16>, rstack: Stack<32> } @@ -38,8 +38,8 @@ fn new_core() -> Core { let c = Core { ram: [0; ADDRESS_SPACE], ip: 0, - dstack: Stack {tos: 0, mem: [0; 32]}, - rstack: Stack {tos: 0, mem: [0; 32]}}; + dstack: Stack {tos: 15, mem: [0; 16]}, + rstack: Stack {tos: 31, mem: [0; 32]}}; return c; } @@ -163,7 +163,7 @@ const PRIMITIVES: [Primitive; 16] = [ let _ = io::stdout().flush(); } 2 => { - println!("{} {:?} {:?}", x.ip, x.dstack, x.rstack); + println!("{:?} {:?}", x.dstack, x.rstack); let _ = io::stdout().flush(); } _ => {}