The memory layout was changed as of version v2.0.0-alpha. If you have an earlier version less than v2.0.0-alpha, click here to view the old memory layout.

Memory Layout v2.0.0-alpha +

This new memory layout came with the introduction of multiple banks, see docs, and moved all graphics related memory (character and video) to the second bank. It also had a resolution increase, meaning the previous addresses for characters and pixels no longer apply. This change only affected Character Memory and Video Memory addressing.


          |                                                                              |
Bank 0    | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | word 65535
          | Program mem.                                                                 |
          
          
          |                                                       || |    |              |
Bank 1    | ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓||░| ▒▒ | ░░░░░░░░░░░░ | word 65535
          | General mem.                                          Char mem. Video memory |
                                                                  ^
                                                                 Expansion ports
          |                                                                              |
Bank 2    | ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ | word 65535
          | General mem.                                                                 |
          


Program Memory

Bank: 0
Percent: 0 - 100%
Range: 0 - 65534 (inclusive)
Words: 65535

Area reserved for program instructions (can be used like general purpose, though).


Variable and General Purpose Memory

Bank: 1
Percent: 0-81%
Range: 0 - 53499 (inclusive)
Words: 53500

Memory that the compiler automatically allocates as needed for variables, or you can use for other general purposes.


Expansion Ports

Bank: 1
Percent: 81-81%
Range: 53500 - 53544 (inclusive)
Words: 44

Dedicated memory locations mapped to the expansion ports


Character Memory

Bank: 1
Percent: 81-82%
Range: 53545 - 53869 (inclusive)
Words: 324

Contains the character codes to be displayed at the corresponding location.


Video Memory

Bank: 1
Percent: 82-100%
Range: 53870 - 65534 (inclusive)
Words: 11664

Contains the pixel’s color data to be displayed at the corresponding location.



Memory Layout v1.0.0-alpha to v1.0.1-alpha

This memory layout moved the Character Memory section next to the Video Memory, and shifted the General Memory to be next to Program Memory. This change only affected General Memory and Character Memory addressing.


        |                   |                                          |   |           |
word 0  | ░░░░░░░░░░░░░░░░░ | ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓| ▒ | ░░░░░░░░░ | word 65535
        | Program mem.             General mem.               Char mem.   Video memory |


Program Memory

Percent: 0 - 25%
Range: 0 - 16381
Words: 16382

Contains the program instructions.


Variable and General Purpose Memory

Percent: 25-93%
Range: 16382 - 61293
Words: 44911

Memory that the compiler automatically
allocates as needed for variables, or you
can use for other general purposes.


Character Memory

Percent: 25-25%
Range: 61294 - 61438
Words: 144

Contains the indexes of the characters to
be displayed at the corresponding location.


Video Memory

Percent: 93-100%
Range: 61439 - 65535
Words: 4096

Contains the pixel’s color data to be
displayed at the corresponding location.



Memory Layout v0.0.0-alpha to v0.3.2-alpha


        |                   |   |                                           |           |
word 0  | ░░░░░░░░░░░░░░░░░ | ▒ | ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ | ░░░░░░░░░ | word 65535
        | Program mem.     Char mem.        General mem.                   Video memory |


Program Memory

Percent: 0 - 25%
Range: 0 - 16381
Words: 16381

Contains the program instructions.


Character Memory

Percent: 25-25%
Range: 16382 - 16527
Words: 145

Contains the indexes of the characters to
be displayed at the corresponding location.


Variable and General Purpose Memory

Percent: 25-93%
Range: 16528 - 61438
Words: 44910

Memory that the compiler automatically
allocates as needed for variables, or you
can use for other general purposes.


Video Memory

Percent: 93-100%
Range: 61439 - 65535
Words: 4096

Contains the pixel’s color data to be
displayed at the corresponding location.