Post Reply 
Pushing the 15C to its limits (software labels?)
04-09-2018, 11:10 AM (This post was last modified: 04-09-2018 11:10 AM by Michael Zinn.)
Post: #3
RE: Pushing the 15C to its limits (software labels?)
(04-09-2018 12:22 AM)Joe Horn Wrote:  ONE way is by cleverly using the same label multiple times for forward jumps within each program. There is no requirement to use each label only once... unless there is a backwards jump to it.

But it sounds like you're asking about having more than 25 different programs in memory at the same time in a 15C (0-9, .0-.9, A-E). Got me stumped. I never had that many programs that tiny all at the same time. Anybody?

Yeah, jumping forward to a duplicate label only gets you so far...

My thoughts on this currently look like this:
- If you put the lookup table at the start of program memory all programs will move when you add to the lookup table, breaking all line numbers, so that's out of the question
- If you put the lookup table at the end of program memory the lookup table itself will move. This means you'll have to adjust the lookup offset (only one value, but still annoying)
- I think it's best to put the lookup table in virtual registers of size 2 and the lookup logic at the start of program memory: That way the line numbers don't float around and you can comfortably add new virtual labels at the end. The virtual register size means you can only jump to virtual labels that are on line numbers 1-99, but if you put all virtual labels in the first 99 lines of program memory and the real labels in line 100 and up you might get enough labels (at least for now).

So the plan for the memory layout looks like this:
- virtual label line numbers are stored in virtual registers, starting at real register 18 and growing backwards.
- program memory begins with the virtual label logic, followed by programs under virtual labels, followed by programs under real labels. New virtual label programs have to be added at the end of the last virtual program, right before the first regular real label.

Does this make sense?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Pushing the 15C to its limits (software labels?) - Michael Zinn - 04-09-2018 11:10 AM



User(s) browsing this thread: 1 Guest(s)