QNICE-FPGA icon indicating copy to clipboard operation
QNICE-FPGA copied to clipboard

Optimize ROM/RAM usage: Let programs start at 0x2000

Open sy2002 opened this issue 3 years ago • 0 comments

Shrink the ROM, currently we could go from 0x0000 to 0x1FFF and still have plenty of room left and let programs start at 0x2000, instead of as this is the case today, from 0x8000 on.

TODO: Before starting with this issue, we need to make a list with obvious and not-so obvious ramifications. Examples:

  1. The ubiquitous usage of RBRA "everywhere" needs to be rethought: RBRA can only jump 32k words forward and backward. This does not matter, as long as programs start at 0x8000 but it does matter, when we switch to 0x2000. So in this example, the minimum we would need to do: Add a warning to the assembler, when one wants to RBRA farther ahead than possible and think again of other ramifiations.

  2. VBCC currently hardcodes 0x8000 at various places in the toolchain

  3. For sure there are a ton more of these nitty-grity details that follow from this issue, so handle with care (and preferably do it in a separate branch)

sy2002 avatar Jul 28 '20 21:07 sy2002