Druzyek wrote:
Quote:
whartung wrote:
Druzyek wrote:
Exactly. This is why I think a program to figure out what goes where would be a great help.
They call programs that do this "compilers".
What I'm thinking about would better be called an optimizer. To be a compiler it would have to produce machine code, not just reworked assembly.
Quote:
This is exactly what prompted me to come up with PLASMA: Proto Language AsSembler for Apple.
Quote:
Cool! I saw one of your demonstration videos about PLASMA. Are you still working with byte code? How do you split up memory usage in functions between zero page and the data stack?
This is where I diverged from the original concept of three output options: byte code, threaded code, and pure native code. The code is still on the backwaters of SourceForge:
http://vm02.sf.net but I've focussed on the byte code implementation for all subsequent versions. It's pretty easy to conceptualize the byte codes as macros to be expanded in-line.
The zero page usage breaks down as a split evaluation stack indexed by X, a NEXTOP/FETCHOP that isn't needed for non-bytecode implementations, a local frame stack pointer for all the local variables, and some temps. All values are copied to the evaluations stack for processing (but caching TOS in A,Y really helps here for native code).
Dave...