bobbimanners / EightBall

The Eight Bit Algorithmic Language for Apple II, Commodore 64 and VIC20
GNU General Public License v3.0
19 stars 3 forks source link

Implement compile direct from source file #29

Closed bobbimanners closed 6 years ago

bobbimanners commented 6 years ago

Right now the source is always loaded into memory. It would be nice to be able to compile with source direct from disk (loading a line at a time, or using say a 256 byte buffer). This would allow larger programs to be compiled (at the expense of not being able to use the interpreter on such files.)

bobbimanners commented 6 years ago

Started looking at this. 1) Right now if we invoke parseline() from readfile() it blows up because readbuf gets trashed. The easy fix here is to have another 256 word buffer. Probably we can clean things up and get rid of this later. 2) Bigger issue ... right now when we make a subroutine call the compiler searches through the source for the called function. To compile from source we have to make a define-before-use rule. This needs further thought before I just hack something together.

bobbimanners commented 6 years ago

Now that I have extended memory support working, this seems to be superfluous. It is easier to just load a big file into extended memory - ~48K on Apple II.