pub fn write_word(&mut self, address: u16, data: u16) {
        // if rom space is declared, and write operation is requested in rom area : we exit
        if self.rom_space.is_some() && address >= self.rom_space.as_ref().unwrap().start && address <= self.rom_space.as_ref().unwrap().end { return };
        self.address_space[usize::from(address)] = (data & 0xFF) as u8;
        self.address_space[usize::from(address + 1)] = (data >> 8) as u8;
    }
/// Writes a word to memory in little endian byte order
Writes a word to memory in little endian byte order
Writes a word to memory in little endian byte order
pub fn write_word(&mut self, address: u16, data: u16) {
        // if rom space is declared, and write operation is requested in rom area : we exit
        if self.rom_space.is_some() && address >= self.rom_space.as_ref().unwrap().start && address <= self.rom_space.as_ref().unwrap().end { return };
        self.address_space[usize::from(address)] = (data & 0xFF) as u8;
        self.address_space[usize::from(address + 1)] = (data >> 8) as u8;
    }
pub fn write_word ( & mut self , address : u16 , data : u16 ) { // if rom space is declared, and write operation is requested in rom area : we exit if self . rom_space . is_some ( ) && address >= self . rom_space . as_ref ( ) . unwrap ( ) . start && address <= self . rom_space . as_ref ( ) . unwrap ( ) . end { return } ; self . address_space [ usize :: from ( address ) ] = ( data & 0xFF ) as u8 ; self . address_space [ usize :: from ( address + 1 ) ] = ( data >> 8 ) as u8 ; }
Writes a word to memory in little endian byte order
Writes a word to memory in little endian byte order
&mut self
address
u16
data
u16
&mut self
address
u16
data
u16