found a cause of a memory bug in emulator - fix is TODO (#6) - continued working on brainf interpreter. we really need better debugging tools tbh.

This commit is contained in:
2025-06-23 00:31:09 +01:00
parent b8091222a4
commit ddd0c27893
6 changed files with 125 additions and 62 deletions
+1 -1
View File
@@ -183,7 +183,7 @@ fn expand_stx(current: Node, nodes: &mut Vec<Node>) -> Result<(), AssembleError>
let base = expect_type!(current.arg(0).unwrap(), Register)?;
let dest = expect_type!(current.arg(1).unwrap(), Symbol)?;
let offset = expect_type!(current.arg(2).unwrap(), Immediate)?;
let temp = Token::Register(Register::Rgf);
let temp = Token::Register(Register::Acc);
nodes.extend(vec![
node!(current.label(), Opcode::Lli, dest, temp),
+2 -2
View File
@@ -326,8 +326,8 @@ impl FromStr for Opcode {
"include" => Ok(Self::Include),
"call" => Ok(Self::Call),
"return" => Ok(Self::Return),
"pusha" => Ok(Self::Push),
"popa" => Ok(Self::Pop),
"pusha" => Ok(Self::Pusha),
"popa" => Ok(Self::Popa),
_ => Err(OpcodeFromStrError::InvalidRegister("unknown opcode")),
}
}