I don't remember why. I've got so many pages of notes it's hard to keep track of everything... I think it was cause it was a little more expensive, not as many were being kept in stock at Digikey and Mouser, and the Sanguino I knew had good support.
Looking at it again though, on Digikey it's more like 35 cents more. Which for 250 units only comes to $84. The parts on these boards is already pretty high though. And it will get even higher just going to the 644. And I may add more pins headers, and a buck regulator to manage heat better. I also still have to produce prototypes and I'm gonna be working on it the next three months. So if the extra ram will never be used... it seems like a waste to include it, and if I ever do find a use for it, I can always just swap the chips.
But I dunno. Maybe I'll go for it. 4K of ram still isn't much to work with. Especially if I end up needing a stack for recursion and gosubs and stuff.
As for paging in the script, I could do that, but I don't know how much that would speed things up.
Thinking about it some more this evening, I really don't want to write a compiler that generates assembly code. Interfacing that with my Arduino program would be a nightmare. I could do it, but... it wouldn't be fun and would take way too long to implement. I've got a schedule I need to adhere to.
It seems like the best option is to tokenize the code and store it in flash the first time the user boots with a new script. I could either try to figure out where the code for my interpreter ends and write it after that, or I could have the interpreter as a file on the SD card along with the script, and the bootloader would automatically load both that and then the compiled basic script in.
I need to do some more reading up on how the bootloader stuff works. I need to know if I can put my interpreter outside the bootloader space, have it interpret my script, and then have it tell the bootloader to load the tokenized verson of the the code from the sd card or ram into the space after the interpreter.