Shop Learn
Is there a description of the structure of the dictionary of P1 Tachyon Forth V5.7? — Parallax Forums

Is there a description of the structure of the dictionary of P1 Tachyon Forth V5.7?

Christof Eb.Christof Eb. Posts: 520
edited 2021-08-06 18:44 in ForthSpace

Hi,
it would be nice to know more about how Tachyon V5.7 works internally. So I would like to ask, if there is already a description of the structure of the dictionary (and separated word list) somewhere?
Background was, that I had a look at the "work in progress assembler" and did not (yet?) understand too much, how this is intended to work.
Thanks for some hints! Christof

Comments

  • @"Christof Eb." Look into this post by @bob_g4bby. Is that a kind of a document you are after ?

  • Christof Eb.Christof Eb. Posts: 520
    edited 2021-08-18 08:47

    OK, I did some investigations. The structure has changed somewhat from V4. There was a description for V4.

    I marked some text with colours - see pdf.

    The dictionary of wordcodes consists of nothing else than word codes. The first word code of a word is located at the code field address of this word. The last wordcode of a word has its lsb bit set to mark a jump instead of a call for this word.
    HERE points to the next free code field address. At this location the first wordcode of the new word will be.

    The dictionary of wordnames starts with a combined byte, which holds the length<16 of the name in lower bits and some attributes in higher bits. I do not yet know the possible attributes.
    The name text follows then. It may have a filler 00 byte to align to even bytes.
    Last word of the entry is the code field address.
    @NAMES points to the last name field address.

    Word codes can be
    1. Code filed adresses of words to be executed
    2. Cog ram code addresses with PASM routines
    3. Literals 15bit positive
    4. Jumps +/- 127 words
    5. PASM instructions in a condensed format, that always uses 2 fixed registers and no conditional execution.
    6. Startcode 007C for following inline LMM PASM code, that has to end with "jmp #EXIT"
    7. Startcode 0035 for the next 2 words as a 32bit number, that is pushed onto the stack. The first word are the high order 16 bits.

    Comments corrections welcome, this is work in progress.
    Word attributes?
    Where do we store this info?

  • bob_g4bbybob_g4bby Posts: 243
    edited 2021-08-06 16:59

    One technique I've used is to start a new thread with a descriptive name and store the document in the first message. You can update that document as many times as you like as and when you learn something new. See my glossary for Taqoz Reloaded as an example - here - Fit a version number so people know when it has changed.

  • Yes Bob, this is a possibility. Unfortunately the forum search is rather weak.

  • Update of the first post for a 32bit number, that will be pushed onto the stack.

Sign In or Register to comment.