scotws / TaliForth2

A Subroutine Threaded Code (STC) ANS-like Forth for the 65c02
Other
86 stars 23 forks source link

Dictionary starts at $2FF, move to $300? #222

Closed SamCoVT closed 5 years ago

SamCoVT commented 5 years ago

Because of the offsets used in platform-py65mon.asm, the beginning of the dictionary (and thus the user variables table) starts at $2FF. I noticed this a while ago, but actually left it as it was because it helped to catch a few page-crossing bugs. Now that we're getting close to a 1.0 release, I recommend moving it down one more byte to start at $300. This will make all operations that access the variables in the user table use one less cycle, as most of them use (up),y type addressing and it needs an extra cycle if it crosses a page boundary.

I recommend changing:

.alias cp0       buffer0+bsize  ; Dictionary starts after last buffer
to
.alias cp0       buffer0+bsize+1 ; Dictionary starts after last buffer
scotws commented 5 years ago

Now that's a really nice detail. I'm on it. Will have to wait tomorrow for the other stuff, thank you!