chore: use lower letters for disasm output
This commit is contained in:
@@ -173,13 +173,13 @@ pub enum Mnemonic {
|
||||
impl fmt::Display for Mnemonic {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
Self::INT(byte) => write!(f, "INT, {:x}", byte),
|
||||
Self::ADD_FromReg(mem, reg) => write!(f, "ADD {}, {}", mem, reg),
|
||||
Self::ADD_ToReg(mem, reg) => write!(f, "ADD {}, {}", reg, mem),
|
||||
Self::CMP_Iv(mem, imm) => write!(f, "CMP {}, {:04x}", mem, imm),
|
||||
Self::LEA(mem, reg) => write!(f, "LEA {}, {}", reg, mem),
|
||||
Self::MOV_BXIv(word) => write!(f, "MOV BX, {:04x}", word),
|
||||
Self::XOR_FromReg(mem, reg) => write!(f, "XOR {}, {}", mem, reg),
|
||||
Self::INT(byte) => write!(f, "int, {:x}", byte),
|
||||
Self::ADD_FromReg(mem, reg) => write!(f, "add {}, {}", mem, reg),
|
||||
Self::ADD_ToReg(mem, reg) => write!(f, "add {}, {}", reg, mem),
|
||||
Self::CMP_Iv(mem, imm) => write!(f, "cmp {}, {:04x}", mem, imm),
|
||||
Self::LEA(mem, reg) => write!(f, "lea {}, {}", reg, mem),
|
||||
Self::MOV_BXIv(word) => write!(f, "mov bx, {:04x}", word),
|
||||
Self::XOR_FromReg(mem, reg) => write!(f, "xor {}, {}", mem, reg),
|
||||
_ => write!(f, "??? ??, ??"),
|
||||
}
|
||||
}
|
||||
@@ -249,22 +249,22 @@ impl Register {
|
||||
impl fmt::Display for Register {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
Self::AX => write!(f, "AX"),
|
||||
Self::BX => write!(f, "BX"),
|
||||
Self::CX => write!(f, "CX"),
|
||||
Self::DX => write!(f, "DX"),
|
||||
Self::AH => write!(f, "AH"),
|
||||
Self::AL => write!(f, "AL"),
|
||||
Self::BL => write!(f, "BL"),
|
||||
Self::BH => write!(f, "BH"),
|
||||
Self::CH => write!(f, "CH"),
|
||||
Self::CL => write!(f, "CL"),
|
||||
Self::DH => write!(f, "DH"),
|
||||
Self::DL => write!(f, "DL"),
|
||||
Self::DI => write!(f, "DI"),
|
||||
Self::SI => write!(f, "SI"),
|
||||
Self::BP => write!(f, "BP"),
|
||||
Self::SP => write!(f, "SP"),
|
||||
Self::AX => write!(f, "ax"),
|
||||
Self::BX => write!(f, "bx"),
|
||||
Self::CX => write!(f, "cx"),
|
||||
Self::DX => write!(f, "dx"),
|
||||
Self::AH => write!(f, "ah"),
|
||||
Self::AL => write!(f, "al"),
|
||||
Self::BL => write!(f, "bl"),
|
||||
Self::BH => write!(f, "bh"),
|
||||
Self::CH => write!(f, "ch"),
|
||||
Self::CL => write!(f, "cl"),
|
||||
Self::DH => write!(f, "dh"),
|
||||
Self::DL => write!(f, "dl"),
|
||||
Self::DI => write!(f, "di"),
|
||||
Self::SI => write!(f, "si"),
|
||||
Self::BP => write!(f, "bp"),
|
||||
Self::SP => write!(f, "sp"),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -296,10 +296,10 @@ impl SegmentRegister {
|
||||
impl fmt::Display for SegmentRegister {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
Self::DS => write!(f, "DS"),
|
||||
Self::ES => write!(f, "ES"),
|
||||
Self::SS => write!(f, "SS"),
|
||||
Self::CS => write!(f, "CS"),
|
||||
Self::DS => write!(f, "ds"),
|
||||
Self::ES => write!(f, "es"),
|
||||
Self::SS => write!(f, "ss"),
|
||||
Self::CS => write!(f, "cs"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user