Edit this page

herkforth data

herkforth data objects can be anywhere in memory. Each is a word in the herkforth dictionary (with flags set to flags-data of course). The CFA points to the data field of the following structure:

Data is in this format:

IMPORTANT: the pointer points directly to the data field, not the beginning of the structure. The idea is that you get a pointer directly to the data, with meta-data before that address. Meta-data is easily accessed, and easily ignored.

The format for the meta-data may change. For example to give the type and length only 16 bits.

Here are currently used values for type:

Currently, the editor ignores the value of the type field. But in the future, different types will be displayed and edited differently.

Saving

All data objects are persistant.

When you bootstrap (herkforth bootstrapping) the data objects are collected from wherever they are (by following the CFAs of data words) and end up in one big lump. But since they will be collected from wherever, if you need to make one bigger, you can copy it some place (such as onto the heap) where it has room to expand. the word data-resize is being written to do this for you.

See Also

herkforth source

how herkforth works

herkforth docs

herkforth

Edit this page · home ·