home .. products .. mforth ..
Source Code

The MFORTH source code is divided into three major components: the MFORTH kernel (and main entry point), the files that define the ANS words supported by MFORTH, and the files that define the custom words provided with MFORTH.

main.asm defines the MFORTH memory map, global constants, interrupt handlers, Option ROM-related support routines, and provides the cold-start routine that is called by the Main ROM when MFORTH is run from the system menu or BASIC. main.asm also loads in all of the other assembler files.

The direct-threaded code interpreter (a.k.a. NEXT), the return stack macros, and all of the assembler entry points for the various high-level words are defined in kernel.asm. This file also provides the macros used to link words into the MFORTH dictionary.

The remainder of the source files define the high-level words defined in the ANS standard as well as a number of words that are (mostly) unique to MFORTH.