Skip to content
Search

Memory bank

lastmod 2015-10-15created 2015-10-151 edits

A memory bank is a concept that arose to overcome an insufficient number of address lines (you can think of this as equal to the CPU's bit count). For example, on a 16bit CPU, the address range the CPU can access is 0 ~ 65535, that is, only 64KB. To use more than 64KB of memory in such an environment, the concept of banks is needed. The CPU always fetches data by specifying an address between 0x0000 ~ 0xFFFF. Depending on the bank setting, this lets it access different memory.

What does that mean? Let's take an egg tray as an example. Say an egg tray can hold 8x8 eggs, 64 in total. Suppose we number each egg and refer to them as egg 1, egg 2, ... egg 64. Now, to point to a particular egg, we can simply say "egg 32!" This establishes the concept of an "address." But let's further suppose there is more than one tray of eggs. We have 8 egg trays lined up side by side. Then how would you point to a specific egg? Right, you can easily say "the 32nd egg in the 4th tray!" The "4th" here is the concept of a bank selector. You can think of it as mapping multiple memories in parallel onto the same address space and then specifying which bank to access, handling memory as a 3-dimensional (?) structure.

Going back to the 16bit CPU, we said a 16bit CPU can address 64KB of memory at a time. To access more than 64KB of memory, the concept of a bank is needed. That is, you have to specify the bank, as in bank 1, bank 2, bank 3. In fact, in the MSDOS days you could select a bank by specifying addresses in a Segment:Offset structure. The VESA graphics card interface also required specifying a bank to access more than 64KB of Video RAM. The concept of banks came about because register size was limited, so there was a limit to the address lines that could be accessed at once.

Favorite site