summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2020-02-03 01:21:54 -0800
committeriximeow <me@iximeow.net>2020-02-03 01:21:54 -0800
commitcf3496a61275af18ebb23558eba984a5ec257c57 (patch)
tree48f5fdbb7c65c5565c03300a55aa3eaeadf70f35 /src
parent6bd76cc79d8377596c56a425fa59e23b0457eac4 (diff)
no more discarded operands0.0.1
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 7225fe7..00a54f5 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -411,13 +411,19 @@ impl fmt::Display for Operand {
write!(f, "[$+{}]", *offset)
}
}
+ Operand::AbsoluteBit(addr) => {
+ write!(f, "[#{:x}h]", addr)
+ }
+ // `Absolute` can be a 20-bit address, so `addr` here is u32 rathere than u16 above.
Operand::Absolute(addr) => {
write!(f, "[#{:x}h]", addr)
}
Operand::JmpAbsolute(addr) => {
write!(f, "#{:x}h", addr)
}
- _ => Ok(())
+ Operand::RegisterBit(reg, bit) => {
+ write!(f, "{},{}", bit, reg)
+ }
}
}
}