[][src]Struct lc3_vm::hardware::memory::Memory

pub struct Memory {
    pub cells: [u16; 65535],
}

Memory : LC-3 has 65,536 memory locations (the maximum that is addressable by a 16-bit unsigned integer 2^16), each of which stores a 16-bit value. This means it can store a total of only 128kb.

Fields

cells: [u16; 65535]

Memory is an array of u16 cells, with length = 65,536.

Methods

impl Memory[src]

pub fn new() -> Memory[src]

pub fn write(&mut self, address: usize, value: u16)[src]

pub fn read(&mut self, address: u16) -> u16[src]

Trait Implementations

impl Copy for Memory[src]

impl Clone for Memory[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Memory

impl Sync for Memory

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]