ft(interpreter): expose data to memory

This commit is contained in:
2025-07-01 11:00:22 +09:00
parent 13cb907977
commit f3fd655908
4 changed files with 28 additions and 25 deletions

View File

@@ -539,6 +539,16 @@ pub struct MemoryIndex {
pub displacement: Option<ImmediateOperand>,
}
impl Into<MemoryIndex> for u16 {
fn into(self) -> MemoryIndex {
MemoryIndex {
base: None,
index: None,
displacement: Some(self.into()),
}
}
}
impl fmt::Display for MemoryIndex {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match &self.base {