____ ____ ____ ____ 
||n |||i |||m |||f ||
||__|||__|||__|||__||
|/__\|/__\|/__\|/__\|

	

the nimf guide : api : memory map

This document contains the nimf memory map. Please note that the available upper bound for user memory can be set by runtime flags and as a result can vary accross systems, implementations, etc.

The Stacks

Both the return stack and data stack default to a depth of 256 cells. The cells are int cells as defined by golang. This means they could be either 32 or 64 bits depending on the architecture you have compiled nimf on/for. The stacks are not directly addressable beyond the ability to add to them and remove from them via nimf words and builtins (ie. you cannot say, "place this at stack location 47"... you can only add and remove from the top of the stack).

Both stacks can be set to a different depth at runtime via the -stack-depth flag. This value must be a positive integer.

Word List

The word list is defined in golang as map[string][]string, which is to say: a map of keywords to arrays of values. A nimf word is just that, a name/keyword and an array of other words and numbers that make up its definition. The word list is not directly available for usage beyond the :, ;, var, and svar words, which allow the adding of new words to the dictionary.

General Memory

The general memory map is divided up into a few different sections. They can all generally be written to with words like set or !. It is inadvisable to write to memory below memory address 50, as that area of memory is used by the system. It is detailed here for those that want to wade in deep or need to debug,; be careful.

Anything defined as a flag should only contain a 0 or -1 as its value. Counters can have any whole number as their value.