@@sonnet-5.5 corrections , input , collaberation , assistence , re -writing?
To understand the operating system side of a pure forth environment begin by recognizing that a conventional operating system is a large collection of programs that manage hardware hide complexity from applications and provide services such as process isolation memory protection file storage networking and graphical interfaces a pure forth system takes the opposite approach the language itself becomes the operating system the dictionary of defined words is the system and the interactive interpreter is the primary interface
The main components start with the boot process when the machine powers on a small loader copies the core forth image into memory this core contains the inner interpreter the stacks the dictionary structure and a handful of primitive words written at the lowest level these primitives talk directly to the processor registers and memory without any intermediate layer once the core is running it can compile additional words from source that is already present or loaded from storage the compiler is not a separate program but part of the living system so new definitions become available immediately
Memory management is deliberately simple there is no complex virtual memory manager with page tables and protection rings in the usual sense the programmer works with the physical address space or with small fixed regions allocated to each task the stacks themselves serve as temporary working areas and the dictionary grows as new words are added multitasking is typically cooperative rather than preemptive each task yields control when it is ready so the system stays predictable and free of the heavy scheduling machinery found elsewhere
Device handling appears as ordinary forth words a word that reads a keyboard port a word that writes to a video buffer a word that transfers blocks to and from storage these words are written once and then used by higher level definitions there is no separate driver model with complex interfaces instead the hardware registers are manipulated directly from the language this keeps the entire system small and transparent the editor the compiler and the interactive command line are all present at the same time so a person can examine change and test any part of the system while it is running
When the hardware is a green arrays chip the combination is even tighter each of the one hundred forty four nodes is itself a complete forth computer with its own dual stacks its own small memory and its own ports for communicating with neighbors the operating system components are distributed across the array some nodes handle external memory access some manage video timing some interpret high level words and others execute application code messages pass from node to node so the whole chip acts as a single coordinated machine external memory such as static or dynamic ram extends the limited on chip storage and flash memory holds the persistent source image that is loaded at power up evaluation boards supply the power regulation the connectors and the interface chips that let a person attach a display a keyboard and a host computer for development
Putting such a system onto a computer follows two main paths for a standard personal computer processor one obtains a colorforth or similar bare metal image writes it to bootable media and starts the machine from that media the system then takes complete control of the processor the memory and the basic input output devices without loading any other operating system for the green arrays path one uses a development board that already contains the chips a host computer running the array forth tools loads programs into the nodes over a serial or other link once the image is written into flash the board can run standalone without the host
The differences from windows and from linux are fundamental windows and linux each contain a large kernel that runs in a privileged mode that kernel manages processes with strong isolation virtual memory with protection networking stacks file systems device drivers and security policies applications request services through well defined interfaces and are prevented from interfering with one another or with the kernel a pure forth system has no such separation the programmer and the running code have direct access to the entire machine the dictionary is both the library and the operating system there is no package manager no vast collection of pre written applications no multi user accounts in the conventional sense and no extensive hardware abstraction layer that supports thousands of different devices
Because of these differences a pure forth environment cannot do everything that windows or linux can do it can control hardware with extreme efficiency it can run interactive development sessions it can implement specialized parallel algorithms on the green arrays architecture and it can serve as a complete self contained system for tasks that fit its minimal model it cannot however run the large body of existing windows or linux software it lacks the broad driver support needed for modern peripherals it does not provide the same graphical desktop environments or the same networking and security features that users of the larger systems take for granted and it is not designed for the general purpose consumer computing that those systems target the strength of the pure forth path lies in transparency size and closeness to the machine rather than in breadth of compatibility or in the ability to host every kind of application that exists for windows and linux
Taken as a whole the components of a pure forth operating system the boot loader the living dictionary the interactive compiler the simple multitasker and the direct device words combine with either ordinary processors or the green arrays multi computer chips to form an environment where language and hardware stay aligned at every level a person who wants a home custom desktop can therefore choose the pure forth route for direct control and experimental efficiency or combine it with conventional midrange processors and graphics hardware for everyday tasks while always remembering that the pure forth system remains a specialized and minimal foundation rather than a full replacement for the larger operating systems