Checkpoint
This commit is contained in:
parent
d81272f085
commit
43e4668825
|
@ -12,6 +12,9 @@ enum InstructionFrom {
|
||||||
|
|
||||||
RegisterSP,
|
RegisterSP,
|
||||||
RegisterSB,
|
RegisterSB,
|
||||||
|
|
||||||
|
IncSP,
|
||||||
|
DecSP,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
|
@ -35,9 +38,6 @@ enum InstructionTo {
|
||||||
|
|
||||||
RegisterSP,
|
RegisterSP,
|
||||||
RegisterSB,
|
RegisterSB,
|
||||||
|
|
||||||
IncSP,
|
|
||||||
DecSP,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
|
@ -77,12 +77,12 @@ impl From<Command> for Code {
|
||||||
Command::PushInt(val) => vec![
|
Command::PushInt(val) => vec![
|
||||||
I::new(IF::RegisterSP, IT::RamAddressLower, 0x00),
|
I::new(IF::RegisterSP, IT::RamAddressLower, 0x00),
|
||||||
I::new(IF::ROM, IT::RAM, val as i8),
|
I::new(IF::ROM, IT::RAM, val as i8),
|
||||||
I::new(IF::ROM, IT::IncSP, 0x00),
|
I::new(IF::IncSP, IT::RegisterSP, 0x00),
|
||||||
],
|
],
|
||||||
Command::PushSum => vec![
|
Command::PushSum => vec![
|
||||||
I::new(IF::RegisterSP, IT::RamAddressLower, 0x00),
|
I::new(IF::RegisterSP, IT::RamAddressLower, 0x00),
|
||||||
I::new(IF::ALU, IT::RAM, 0x00),
|
I::new(IF::ALU, IT::RAM, 0x00),
|
||||||
I::new(IF::ROM, IT::IncSP, 0x00),
|
I::new(IF::IncSP, IT::RegisterSP, 0x00),
|
||||||
],
|
],
|
||||||
_ => todo!(),
|
_ => todo!(),
|
||||||
}.into()
|
}.into()
|
||||||
|
|
Loading…
Reference in a new issue