@reg and @value reading and writing is now possible

This commit is contained in:
2020-10-07 22:24:30 +02:00
parent 562fc48151
commit 4115e07ee6
9 changed files with 151 additions and 56 deletions
+9 -3
View File
@@ -11,7 +11,7 @@ use serde::{Deserialize, Serialize};
use crsn::asm::data::literal::Addr;
use crsn::module::OpTrait;
use crsn::runtime::run_thread::{RunThread, ThreadToken};
use crsn::runtime::run_thread::{RunThread, ThreadToken, ThreadParams};
use crsn_arith::ArithOps;
use crsn_screen::ScreenOps;
use crsn_stacks::StackOps;
@@ -145,8 +145,14 @@ fn main() -> anyhow::Result<()> {
info!("Start runtime");
let args = &[];
let mut thread = RunThread::new(ThreadToken(0), None, parsed.clone(), Addr(0), args);
thread.set_speed(config.cycle_time);
let thread = RunThread::new(ThreadParams {
id: ThreadToken(0),
uniq: None,
program: parsed,
pc: Addr(0),
cycle_time: config.cycle_time,
args
});
// run without spawning, so it is on the main thread - required by some extensions
thread.run();