<commit_before>use std::fmt;

pub struct Command {
    String: name,
    String: debug_msg
}


const OPCODE_DEC_B: u16 = 0x05;
const OPCODE_LD_B: u16 = 0x06;
const OPCODE_INC_C: u16 = 0x0C;


pub enum Opcode {
    DecB,
    Ldb,
    IncC
}

impl Opcode {
    pub fn parse(bits: u16) -> Opcode {
        match bits {
            
        }
    }
}

impl fmt::Display for Opcoe {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        let code = match self {
            &Opcode::DecB => "DEC B",
            &Opcode::Ldb => "LD B, d8",
            &Opcode::IncC => "INC C",
        };

        write!(f, "{}", code);
    }
}<commit_msg>Added the first few opcodes to the new Opcode struct<commit_after>use std::fmt;

pub struct Command {
    String: name,
    String: debug_msg
}


const OPCODE_DEC_B: u16 = 0x05;
const OPCODE_LD_B: u16 = 0x06;
const OPCODE_INC_C: u16 = 0x0C;
const OPCODE_LD_DE: u16 = 0x17;




pub enum Opcode {
    DecB,
    Ldb,
    IncC,
    Ldde,
}

impl Opcode {
    pub fn parse(bits: u16) -> Opcode {
        match bits {
            OPCODE_DEC_B => Opcode::DecB,
            OPCODE_LD_B => Opcode::Ldb,
            OPCODE_INC_C => Opcode::IncC,
            OPCODE_Ldde => Opcode::Ldde,
        }

    }
}

impl fmt::Display for Opcode {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        let code = match self {
            &Opcode::DecB => "DEC B",
            &Opcode::Ldb => "LD B, d8",
            &Opcode::IncC => "INC C",
        };

        write!(f, "{}", code);
    }
}
{'fraction_non_alphanumeric': 0.13642297650130547, 'fraction_numerical': 0.025456919060052218, 'mean_word_length': 1.982490272373541, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2793638', 'n_tokens_mistral': 611, 'n_tokens_neox': 590, 'n_words': 146}