3 ms·
I can imagine implementing a direct threaded Forth, but instead of code addresses being memory locations, code addresses are a virtual address; DOCOL and NEXT s
by nanofortnight 11y ago
I can imagine implementing a direct threaded Forth, but instead of code addresses being memory locations, code addresses are a virtual address; DOCOL and NEXT swap in the appropriate segment of code into memory where necessary.
This could possibly be optimised in a subroutine threaded Forth so code within each "page" wouldn't have to verify loaded segments.
Implementing a dictionary insertion/optimization routine that packs related routines together to minimise swapping would be an interesting problem, and would probably most easily not be done live but ahead-of-time instead.
In short: Yes, Forth can support the paging you desire if implemented that way.