I have some questions about BASIC that maybe somebody of you, I think Sjaak for sure, is in the position to answer.
I was able to build my own version of the firmware for the Bus Pirate v3 where all the features are unlocked, BASIC too (dangerousprototypes.com/forum/download/file.php?id=12196).
In order to reach the goal among the other things I had to switch #define PGMSIZE 1024 to #define PGMSIZE 512.
I do not understand some things.
I wanted to verify the exact amount of the space of RAM available in BASIC.
Seems to me that factory firmware v5.10 allows up 65535 lines for BASIC.
I have downloaded the factory firmware v5.10 into my Bus Pirate revision 3, then I switched to BASIC where I put in a simple sequence of REM in order to evaluate how much room should be avalaible to storage scripts in BASIC.
I was able to enter more than 700 program lines occupying 3kB into the RAM, but I could enter other lines apparently without any problem.
So apparently by reserving 1024 bytes for the BASIC should be possible to enter more than that quantity of bytes, that it sounds weird.
Indeed this does not match with the value 1024 that is used into #define PGMSIZE.
I have not gone over and I have updated my Bus Pirate with the firmware v7.0 that I built.
With it I was able to insert up 128 lines of program which are exactly 511 bytes, I could not go further.
This match with the value 512 that I put into #define PGMSIZE.
Now I know that although into both the firmwares v5.10 and the v7.0 that I built from myself BASIC was unlocked and command line up to 256 characters, the v7.0 that I built myself it has many unlocked features than v5.10, but I do not understand such a big gap based on using the value 1024 or its half.
So my question is, is there some way to predict the exact amount of available space for BASIC by evaluating the features unlocked into the firmware before build it?
Honestly I did not expect a real value of 32767 lines (half of 65535 lines), but not even a such big gap:
#define PGMSIZE 1024 (factory firmware v5.10) = over 3kB, I do not even know exactly what it actually is, I have not verified precisely.
#define PGMSIZE 512 (firmware v7.0 built by myself) = up 511 bytes, not one more.
Be seeing you.