chore: show raw pointer value in disasm
This commit is contained in:
@@ -8,6 +8,7 @@ pub type Byte = u8; // b
|
||||
pub type IByte = i8; // used for displacements of memory access
|
||||
pub type Word = u16; // w or v
|
||||
pub type IWord = i16; // used for displacement of memory access
|
||||
pub type DWord = u32;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[allow(dead_code)]
|
||||
@@ -130,12 +131,13 @@ impl fmt::Display for MemoryIndex {
|
||||
#[derive(Debug, Clone)]
|
||||
/// 32-bit segment:offset pointer (e.g. for CALL instruction)
|
||||
pub struct Pointer {
|
||||
pub raw: DWord,
|
||||
pub segment: Word,
|
||||
pub offset: Word,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for Pointer {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
write!(f, "{}:{}", self.segment, self.offset)
|
||||
write!(f, "[{:#04x}] ({}:{})", self.raw, self.segment, self.offset)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user