- FS/Forth for DOS - Here are the following basic attributes which describes FS/Forth for DOS: * Global Runtime Environment * 64KB shared data and code dictionary space * Code and data grow upwards in memory; stacks and block buffers grow downwards * 16-bit native code generation with subroutine threading and inline assembly sequences. * Linked list dictionary structure (will optimize this later as necessary) * '''FORTH''' wordlist contains words accessible to both interpreter and compiler * '''COMPILER''' wordlist contains words that implement the compiler. Defining new words in this wordlist extends compiler. Think LISP macros. Replacement for '''IMMEDIATE''' words in other Forth environments. Cleaner, more readable, better organized code. * Applications can have application-specific words; these words are not accessible to the interactive Forth interpreter or to the compiler. An application must search these wordlists as it sees fit. '''FINDWORD''' will accomplish this. * UserInterface * Text mode; 80x25 or 80x50, whichever state DOS left the screen in last. * An application has full control over the screen when it has display focus. * Applications usually call a word to render the screen's title bar. Doing this is considered good form. * Usually, the application with display focus will also have input (keyboard and mouse) focus as well. * Multiple applications can be loaded and running concurrently; only one has display focus at any given time * Storage/Persistence * A flat block space ranging from 0 to 65535 offers up to 64MB of persistent storage. * Ranges of blocks maps to individual files in the filesystem for maximum flexibility * Each file can be up to 1000 blocks long. * Files longer than 1000 blocks will appear to only be 1000 blocks long in FS/Forth. * Up to 64 files can be opened at a time. * Multitasking * Number of concurrently running tasks limited only by available dictionary space. * Cooperative multitasking: '''PAUSE''' forces a reschedule. * Explicit task control: '''SLEEP''' puts a task to sleep, while '''WAKE''' unconditionally wakes it up again. * When tasks are created, they start out in the '''SLEEP''' state. * Wake-up predicates are used to conditionally wake a task without depending on another calling '''WAKE''' for you. * '''HLT''' instruction called if no tasks are eligible for running. Saves power; reduces heat generation. * '''EVENT''' is used to flag a need to call wake-up predicates; it notifies other tasks that a potentially interesting event has occurred.