mitra42 / webForth

Forth for the web - implemented in JS and other web technologies
https://www.mitra.biz/forth/console.html
GNU Affero General Public License v3.0
27 stars 1 forks source link

Seperate code from data #15

Closed mitra42 closed 3 years ago

mitra42 commented 3 years ago

There are a number of places where code and data are mixed, preventing them being separated - e.g. in Rom.

This is a feature of many other Forth's.

Specific known issues ...

mitra42 commented 3 years ago

I'm working on this in the eprom branch

mitra42 commented 3 years ago

My current assumptions are:

It follows from those assumptions:

Maybe No changes to

Next steps rework (callers are all labelled)

Rework these that update vocab

Check for usages of:

mitra42 commented 3 years ago

This is mostly done - in the "eprom" branch.

The open questions are how to handle defining after any Eprom interaction - and that might need to be an exercise for the future. Specifically, if we can define then we need to move "FORTH" into the data space (which is slightly non trivial) and define tokenVocabulary to use data space, and make sure to initialize CP and NP to point to wherever you can define when half the dictionary is in ROM.

mitra42 commented 3 years ago

This is done - both for Arduino and in Javascript either in a single memory space (MemNN_MM) or separate (Rommable16_16)