Tokenizer and Program Slots?
SamM
Posts: 24
Using the tokenizer library, is it possible to download code into a program slot (on multi-slot compatible stamps) other than the first slot (0) without having to overwrite the first slot? In other words, if I have two different programs, one destined for slot 0 and one for slot 1, can I tokenize them and send them to the stamp separately, or must the first code contain the stamp directive mentioning the code files for the program destined for slot 1?
Comments
1) I don't know how to acheive that using the tokenizer library. It would be a very useful thing to do, also from the object loader generator.
2) The download process does always proceed one slot at a time, and the slots are independent entities as far as download is concerned. The mechanics of this are well described. You do that from the IDE by choosing "current" rather than "all" or "modified" from the editor preferences panel. The Stache programmer can store multiple versions of programs and direct them to selected slots. It does that by capturing the output from a "current" setting in the IDE.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Can anyone from parallax shed any more light on this?
The tokenizer always treats things as just individual, unrelated, 2K-sized program slots.·
The BASIC Stamp Editor, through it's $STAMP directive, limits you to creating a project that fills the slots from slot 0 towards slot 7, in order.· This is done partly to maintain simplicity.
The download process, however, acts in a way similar to the tokenizer; it treats everything as individual, unrelated, 2k-sized program slots; with the only exception being that you have to tell it, near the start of the downloading of a slot, which slot (0 - 7) that you wish to target.· This allows single slots to be downloaded, or mutiple, non-contiguious slots if desired.
The BASIC Stamp Editor's Generate Object Code feature·(as of v2.2.8, I believe) allows you to select which program slots you wish the object file to contain; so that the Stamp Loader can download just individual, or multiple, non-contiguous slots, if necessary.
So, in summary; for the tokenizer, simply pass it whatever source code you want (doesn't matter which slot it is destined for) and save the resulting tokenized data for your IDE's download process.· Then, download each up-to-2K chuck of tokenized data into whichever slot you want to, in whatever order you want to, by following the process for downloading multiple slots as documented by the BASIC Stamp Download Protocol document, that you should have received along with the tokenizer.
Thank you.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Jeff Martin
· Sr. Software Engineer
· Parallax, Inc.