memory bank

Blitz3D Forums/Blitz3D Programming/memory bank

Yue(Posted 2010) [#1]
Hello, someone would be so kind to explain that it is a memory bank and its possible uses.


Matty(Posted 2010) [#2]
A "bank" is basically a handle to an area of memory that you can define/redefine its size dynamically.

To write to the bank you use the pokebyte/pokeshort/pokeint commands, and to read you use the peekbyte/peekshort/peekint commands.

There are many uses for a bank, but put simply they are just another alternative way to store information.

They are very flexible.


Yue(Posted 2010) [#3]
so it is like variables and constants?


Matty(Posted 2010) [#4]
Kind of.

Think of it as a chunk of memory, of any size and you can store values at any byte offset within that chunk of memory.

You could store a single variable if you wanted, or the contents of an entire file.