Re: Compiling TaliForth2 on Windows
Posted: Tue Jan 21, 2020 9:06 pm
Druzyek wrote:
One thing that threw me was that the Undefined word error only shows part of the word. If you enter "bar" for example and it's not defined it shows ">r< Undefined word" instead of >bar<. I thought maybe the pointer to the input buffer was getting scrambled somehow switching between the banks.
Quote:
ram_end had to be moved from $4000-1 to $C000-1 since otherwise moving the cp to $4000 would give an out of memory error. cp_end is now also $C000-1. hist_buff changed from ram_end-$03ff to $4000-$03ff so it won't point to the banked memory (I recognized the problem when I got lots of colored dots on the screen
) Hmm, how exactly does hist_buff work? Do I need all 8 buffers?
As a side note, this is all really good practical experience for me, as one of the things Scot (the author of Tali2) and I had discussed was making the build configurable so that certain components could be omitted or shuffled around. This is a good exercise in seeing what needs to be done to make that happen (and mostly it hasn't been that difficult). Our original expected audience was folks building 32K RAM/32K ROM type single board computers, which will hopefully explain some of the design decisions that were made (like just stuffing the input buffer at the top of RAM)
Your initial code looks good. If you are comfortable with this method, it is probably a good least-effort solution.
I will throw one more thought out, and that is that it might be possible (but would be a bit more work) to have the header be in bank 0 where the word would always be found, but when called the word would automatically switch to the bank with it's code before jumping to the code to complete execution. All of your words would be available (if you have space in the first 16K for all of their headers) and they would switch to their bank before running. You technically could even make them "put it back the way it was" as they return. The down side would be that these words would always do that and it would run a little more slowly, even when you didn't need to be switching the banks around.