From cf3496a61275af18ebb23558eba984a5ec257c57 Mon Sep 17 00:00:00 2001 From: iximeow Date: Mon, 3 Feb 2020 01:21:54 -0800 Subject: no more discarded operands --- src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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) + } } } } -- cgit v1.1