struct Memory

Defined in:

Constructors

Instance Method Summary

Constructor Detail

def self.new #

Instance Method Detail

def [](index : UInt16) #

Read at a 16-bit address


def [](index : UInt8) #

Read at an 8-bit address


def [](range : Range) #

def []=(index : Int32, value : UInt8) #

Use a 32-bit address to store an 8-bit value


def []=(index : UInt16, value : UInt8) #

Use a 16-bit address to store an 8-bit value


def []=(index : UInt8, value : UInt8) #

Use an 8-bit address to store an 8-bit value


def data : Slice(UInt8) #

The actual stored data The first page ($0000 - $00FF) is called the zero page The second page ($0100 - $01FF) is reserved for the system stack and cannot be relocated The last 6 bytes are reserved for the following

  $FFFA-$FFFB : non-maskable interrupt handler
  $FFFC-$FFFD : power reset handler
  $FFFE-$FFFF : BRK/interrupt request handler

Any other locations are free to use by the user getter data = StaticArray(UInt8, 65536).new(0)