chore: output parity for hex
Output all immediate bytes and words as hex.
This commit is contained in:
@@ -371,10 +371,10 @@ impl fmt::Display for Mnemonic {
|
|||||||
|
|
||||||
Self::OVERRIDE(reg) => write!(f, "{reg}:"),
|
Self::OVERRIDE(reg) => write!(f, "{reg}:"),
|
||||||
|
|
||||||
Self::DAA => write!(f, "DAA"),
|
Self::DAA => write!(f, "daa"),
|
||||||
Self::DAS => write!(f, "DAS"),
|
Self::DAS => write!(f, "das"),
|
||||||
Self::AAA => write!(f, "AAA"),
|
Self::AAA => write!(f, "aaa"),
|
||||||
Self::AAS => write!(f, "AAS"),
|
Self::AAS => write!(f, "aas"),
|
||||||
|
|
||||||
Self::SUB_FromReg(target, reg) => write!(f, "sub {target}, {reg}"),
|
Self::SUB_FromReg(target, reg) => write!(f, "sub {target}, {reg}"),
|
||||||
Self::SUB_ToReg(target, reg) => write!(f, "sub {reg}, {target}"),
|
Self::SUB_ToReg(target, reg) => write!(f, "sub {reg}, {target}"),
|
||||||
@@ -403,26 +403,26 @@ impl fmt::Display for Mnemonic {
|
|||||||
Self::DEC_Reg(reg) => write!(f, "dec {reg}"),
|
Self::DEC_Reg(reg) => write!(f, "dec {reg}"),
|
||||||
Self::DEC_Mod(target) => write!(f, "dec {target}"),
|
Self::DEC_Mod(target) => write!(f, "dec {target}"),
|
||||||
|
|
||||||
Self::JO(ibyte) => write!(f, "jo {ibyte}"),
|
Self::JO(ibyte) => write!(f, "jo {ibyte:#04x}"),
|
||||||
Self::JNO(ibyte) => write!(f, "jno {ibyte}"),
|
Self::JNO(ibyte) => write!(f, "jno {ibyte:#04x}"),
|
||||||
Self::JB(ibyte) => write!(f, "jb {ibyte}"),
|
Self::JB(ibyte) => write!(f, "jb {ibyte:#04x}"),
|
||||||
Self::JNB(ibyte) => write!(f, "jnb {ibyte}"),
|
Self::JNB(ibyte) => write!(f, "jnb {ibyte:#04x}"),
|
||||||
Self::JZ(ibyte) => write!(f, "jz {ibyte}"),
|
Self::JZ(ibyte) => write!(f, "jz {ibyte:#04x}"),
|
||||||
Self::JNZ(ibyte) => write!(f, "jnz {ibyte}"),
|
Self::JNZ(ibyte) => write!(f, "jnz {ibyte:#04x}"),
|
||||||
Self::JBE(ibyte) => write!(f, "jbe {ibyte}"),
|
Self::JBE(ibyte) => write!(f, "jbe {ibyte:#04x}"),
|
||||||
Self::JA(ibyte) => write!(f, "ja {ibyte}"),
|
Self::JA(ibyte) => write!(f, "ja {ibyte:#04x}"),
|
||||||
Self::JS(ibyte) => write!(f, "js {ibyte}"),
|
Self::JS(ibyte) => write!(f, "js {ibyte:#04x}"),
|
||||||
Self::JNS(ibyte) => write!(f, "jns {ibyte}"),
|
Self::JNS(ibyte) => write!(f, "jns {ibyte:#04x}"),
|
||||||
Self::JPE(ibyte) => write!(f, "jpe {ibyte}"),
|
Self::JPE(ibyte) => write!(f, "jpe {ibyte:#04x}"),
|
||||||
Self::JPO(ibyte) => write!(f, "jpo {ibyte}"),
|
Self::JPO(ibyte) => write!(f, "jpo {ibyte:#04x}"),
|
||||||
Self::JL(ibyte) => write!(f, "jl {ibyte}"),
|
Self::JL(ibyte) => write!(f, "jl {ibyte:#04x}"),
|
||||||
Self::JGE(ibyte) => write!(f, "jge {ibyte}"),
|
Self::JGE(ibyte) => write!(f, "jge {ibyte:#04x}"),
|
||||||
Self::JLE(ibyte) => write!(f, "jle {ibyte}"),
|
Self::JLE(ibyte) => write!(f, "jle {ibyte:#04x}"),
|
||||||
Self::JG(ibyte) => write!(f, "jg {ibyte}"),
|
Self::JG(ibyte) => write!(f, "jg {ibyte:#04x}"),
|
||||||
Self::LOOPNZ(ibyte) => write!(f, "loopnz {ibyte}"),
|
Self::LOOPNZ(ibyte) => write!(f, "loopnz {ibyte:#04x}"),
|
||||||
Self::LOOPZ(ibyte) => write!(f, "loopz {ibyte}"),
|
Self::LOOPZ(ibyte) => write!(f, "loopz {ibyte:#04x}"),
|
||||||
Self::LOOP(ibyte) => write!(f, "loop {ibyte}"),
|
Self::LOOP(ibyte) => write!(f, "loop {ibyte:#04x}"),
|
||||||
Self::JCXZ(ibyte) => write!(f, "jcxz {ibyte}"),
|
Self::JCXZ(ibyte) => write!(f, "jcxz {ibyte:#04x}"),
|
||||||
|
|
||||||
Self::TEST(target, reg) => write!(f, "test {target}, {reg}"),
|
Self::TEST(target, reg) => write!(f, "test {target}, {reg}"),
|
||||||
Self::TEST_Ib(target, byte) => write!(f, "test byte {target}, {byte:#04x}"),
|
Self::TEST_Ib(target, byte) => write!(f, "test byte {target}, {byte:#04x}"),
|
||||||
@@ -464,35 +464,35 @@ impl fmt::Display for Mnemonic {
|
|||||||
|
|
||||||
Self::LEA(mem, reg) => write!(f, "lea {}, {}", reg, mem),
|
Self::LEA(mem, reg) => write!(f, "lea {}, {}", reg, mem),
|
||||||
|
|
||||||
Self::CBW => write!(f, "CBW"),
|
Self::CBW => write!(f, "cbw"),
|
||||||
Self::CWD => write!(f, "CWD"),
|
Self::CWD => write!(f, "cwd"),
|
||||||
|
|
||||||
Self::CALL_p(ptr) => write!(f, "call {ptr}"),
|
Self::CALL_p(ptr) => write!(f, "call {ptr}"),
|
||||||
Self::CALL_v(word) => write!(f, "call {word:#04x}"),
|
Self::CALL_v(word) => write!(f, "call {word:#04x}"),
|
||||||
Self::CALL_Mod(target) => write!(f, "call {target}"),
|
Self::CALL_Mod(target) => write!(f, "call {target}"),
|
||||||
|
|
||||||
Self::JMP_p(ptr) => write!(f, "jmp {ptr}"),
|
Self::JMP_p(ptr) => write!(f, "jmp {ptr}"),
|
||||||
Self::JMP_b(byte) => write!(f, "jmp {byte:#04}"),
|
Self::JMP_b(byte) => write!(f, "jmp {byte:#04x}"),
|
||||||
Self::JMP_v(word) => write!(f, "jmp {word:#04}"),
|
Self::JMP_v(word) => write!(f, "jmp {word:#04x}"),
|
||||||
Self::JMP_Mod(target) => write!(f, "jmp {target}"),
|
Self::JMP_Mod(target) => write!(f, "jmp {target}"),
|
||||||
|
|
||||||
Self::WAIT => write!(f, "WAIT"),
|
Self::WAIT => write!(f, "wait"),
|
||||||
|
|
||||||
Self::PUSHF => write!(f, "PUSHF"),
|
Self::PUSHF => write!(f, "pushf"),
|
||||||
Self::POPF => write!(f, "POPF"),
|
Self::POPF => write!(f, "popf"),
|
||||||
Self::SAHF => write!(f, "SAHF"),
|
Self::SAHF => write!(f, "sahf"),
|
||||||
Self::LAHF => write!(f, "LAHF"),
|
Self::LAHF => write!(f, "lahf"),
|
||||||
|
|
||||||
Self::MOVSB => write!(f, "MOVSB"),
|
Self::MOVSB => write!(f, "movsb"),
|
||||||
Self::MOVSW => write!(f, "MOVSW"),
|
Self::MOVSW => write!(f, "movsw"),
|
||||||
Self::CMPSB => write!(f, "CMPSB"),
|
Self::CMPSB => write!(f, "cmpsb"),
|
||||||
Self::CMPSW => write!(f, "CMPSW"),
|
Self::CMPSW => write!(f, "cmpsw"),
|
||||||
Self::STOSB => write!(f, "STOSB"),
|
Self::STOSB => write!(f, "stosb"),
|
||||||
Self::STOSW => write!(f, "STOSW"),
|
Self::STOSW => write!(f, "stosw"),
|
||||||
Self::LODSB => write!(f, "LODSB"),
|
Self::LODSB => write!(f, "lodsb"),
|
||||||
Self::LODSW => write!(f, "LODSW"),
|
Self::LODSW => write!(f, "lodsw"),
|
||||||
Self::SCASB => write!(f, "SCASB"),
|
Self::SCASB => write!(f, "scasb"),
|
||||||
Self::SCASW => write!(f, "SCASW"),
|
Self::SCASW => write!(f, "scasw"),
|
||||||
|
|
||||||
Self::RET_Iw(word) => write!(f, "ret {word:#04x}"),
|
Self::RET_Iw(word) => write!(f, "ret {word:#04x}"),
|
||||||
Self::RET => write!(f, "ret"),
|
Self::RET => write!(f, "ret"),
|
||||||
@@ -529,14 +529,14 @@ impl fmt::Display for Mnemonic {
|
|||||||
Self::SAR_fromReg(target, reg) => write!(f, "sar {target}, {reg}"),
|
Self::SAR_fromReg(target, reg) => write!(f, "sar {target}, {reg}"),
|
||||||
|
|
||||||
Self::IN_AL(byte) => write!(f, "in {}, {byte:#04x}", Register::AL),
|
Self::IN_AL(byte) => write!(f, "in {}, {byte:#04x}", Register::AL),
|
||||||
Self::IN_AX(byte) => write!(f, "in {}, {byte:#04x}", Register::AX),
|
Self::IN_AX(byte) => write!(f, "in :#04x{}, {byte:#04x}", Register::AX),
|
||||||
Self::IN_ALDX => write!(f, "in {}, {}", Register::AL, Register::DX),
|
Self::IN_ALDX => write!(f, "in {}, :#04x{}", Register::AL, Register::DX),
|
||||||
Self::IN_AXDX => write!(f, "in {}, {}", Register::AX, Register::DX),
|
Self::IN_AXDX => write!(f, "in {}, :#04x{}", Register::AX, Register::DX),
|
||||||
|
|
||||||
Self::OUT_AL(byte) => write!(f, "out {}, {byte:#04x}", Register::AL),
|
Self::OUT_AL(byte) => write!(f, "out :#04x{}, {byte:#04x}", Register::AL),
|
||||||
Self::OUT_AX(byte) => write!(f, "out {}, {byte:#04x}", Register::AX),
|
Self::OUT_AX(byte) => write!(f, "out :#04x{}, {byte:#04x}", Register::AX),
|
||||||
Self::OUT_ALDX => write!(f, "out {}, {}", Register::AL, Register::DX),
|
Self::OUT_ALDX => write!(f, "out {}, :#04x{}", Register::AL, Register::DX),
|
||||||
Self::OUT_AXDX => write!(f, "out {}, {}", Register::AX, Register::DX),
|
Self::OUT_AXDX => write!(f, "out {}, :#04x{}", Register::AX, Register::DX),
|
||||||
|
|
||||||
Self::INT(byte) => write!(f, "int {byte:#04x}"),
|
Self::INT(byte) => write!(f, "int {byte:#04x}"),
|
||||||
Self::INTO => write!(f, "into"),
|
Self::INTO => write!(f, "into"),
|
||||||
|
|||||||
Reference in New Issue
Block a user