ft(interpreter): impl basic call
This commit is contained in:
@@ -110,6 +110,16 @@ impl From<Word> for ImmediateOperand {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<usize> for ImmediateOperand {
|
||||
fn from(value: usize) -> Self {
|
||||
if value > Word::MAX as usize {
|
||||
panic!("Cannot convert usize to ImmediateOperand::Word")
|
||||
} else {
|
||||
ImmediateOperand::Word(value as Word)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<Word> for ImmediateOperand {
|
||||
fn into(self) -> u16 {
|
||||
match self {
|
||||
|
||||
Reference in New Issue
Block a user