28X Memory

BeanieBots

Moderator
28X firmware version 7.6
Editor version 4.1.5

Would it be possible for the editor to return the number of bytes over 2048 rather than just the error message "Error: Memory full - programme too long!"?
Also, why does this error occur at 2040/2048 instead of at 2045 (assuming 3 bytes for End)?
 

Technical

Technical Support
Staff member
Currently the compiler gives up when the maximum memeory address is reached, and so doesn't actually know how much longer than the maximum the program is.

Length of program is very complicated due to the compression algorthymn, and so adding/removing single commands (e.g. a gosub command) can make big differences to program length.
 

hippy

Technical Support
Staff member
<i>why does this error occur at 2040/2048 instead of at 2045 (assuming 3 bytes for End)? </i>

That's probably [ or something like ] because when the line the compiler complains about is being compiled, 2040 bytes have already been compiled, and the compiled line needs to add over 5 bytes, which it knows it can't do.
 

BeanieBots

Moderator
Hippy, I think you may well be right. The figure does seem to change quite considerably irrespective of which line/command is changed which would indicate that the tokenisation algorithm comes into play. Even swapping the order of lines can have an effect. (can give up to 5 extra bytes!).
 
Top