pub(super) fn from_regcode(code: u8) -> Self {
        match code {
            0 => Self::B,
            1 => Self::C,
            2 => Self::D,
            3 => Self::E,
            4 => Self::H,
            5 => Self::L,
            6 => Self::AddrHL,
            7 => Self::A,
            _ => panic!("Unrecognized Operand type {}", code),
        }
    }
/// Get the 8 bit operand for the given register code. Panics if the code is greater than 7.
/// Note that register codes are mostly 8 bit registers but also include `(HL)`.
Get the 8 bit operand for the given register code. Panics if the code is greater than 7.
Note that register codes are mostly 8 bit registers but also include `(HL)`.
Get the 8 bit operand for the given register code . Panics if the code is greater than 7 . Note that register codes are mostly 8 bit registers but also include ` ( HL ) ` .
pub(super) fn from_regcode(code: u8) -> Self {
        match code {
            0 => Self::B,
            1 => Self::C,
            2 => Self::D,
            3 => Self::E,
            4 => Self::H,
            5 => Self::L,
            6 => Self::AddrHL,
            7 => Self::A,
            _ => panic!("Unrecognized Operand type {}", code),
        }
    }
pub ( super ) fn from_regcode ( code : u8 ) -> Self { match code { 0 => Self :: B , 1 => Self :: C , 2 => Self :: D , 3 => Self :: E , 4 => Self :: H , 5 => Self :: L , 6 => Self :: AddrHL , 7 => Self :: A , _ => panic ! ( " " code ) , } }
Get the 8 bit operand for the given register code.
Get the 8 bit operand for the given register code .
code
u8
code
u8