#[allow(unused_imports)]
use super::*;
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
pub struct FdFlags {
brs: bool,
esi: bool,
}
impl FdFlags {
#[inline]
pub const fn new(brs: bool, esi: bool) -> Self {
Self { brs, esi }
}
#[inline]
pub const fn from_byte(byte: u8) -> Self {
Self {
brs: byte & 0x01 != 0,
esi: byte & 0x02 != 0,
}
}
#[inline]
pub const fn to_byte(self) -> u8 {
(self.brs as u8) | ((self.esi as u8) << 1)
}
#[inline]
pub const fn brs(&self) -> bool {
self.brs
}
#[inline]
pub const fn esi(&self) -> bool {
self.esi
}
}