Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

I’m actually writing a new low level API to allow access to the swap. The underlying idea is to provide large memory area for elf binaries. Existing implementation looks for a contiguous memory area available in RAM. New implementation shuffles swap area to a mosaic of 256 bytes pages. It has many advantages to the existing implementation.

  • memory is pushed to the limit in low memory condition

  • no more relocation is required, memory offset is always available from $2000 to $FFFF.

  • elf binary loading (PHT) is unlimited are and thus more compliant to elf rules, a good example is a C compiled binary with CODE, DATA and BSS sections anywhere in the Z80 address range

OS_Swap is the new API with 2 reason call : SW_AL to allocate a contiguous memory area, SW_FR to free allocations and restore previous state. Swap area has been extended to 56K (1 more 16K bank).

...