• Trying to use blocks in SwiftForth

    From dave@dave6502@gmail.com to comp.lang.forth on Thu Aug 27 18:11:12 2026
    From Newsgroup: comp.lang.forth

    Been happily using SwiftForth for a few months using files and include but would like to try blocks. Have been digging around the docs and AI but
    getting nowhere.

    From what I understand I need to assign a file as my virtual block area
    (AI says OPEN-BLOCK but that word does not exist).

    Can anyone advise ?



    SwiftForth x64-Linux 4.1.3 20-Feb-2026
    ok
    REQUIRES blocks

    This file, if loaded as it was shipped, will obscure future use of the
    Swoop operator USING. If you need access to this feature of Swoop,
    please rename the USING operation in this file.

    Also note that the contents of this file, once loaded, cannot be
    unloaded via EMPTY. The dictionary space is protected with GILD.

    ok
    ok
    5 block Can't reposition file
    ok

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Fri Aug 28 13:46:18 2026
    From Newsgroup: comp.lang.forth

    In article <116puk0$1msvv$1@dont-email.me>, dave <dave6502@gmail.com> wrote: >Been happily using SwiftForth for a few months using files and include but >would like to try blocks. Have been digging around the docs and AI but >getting nowhere.

    From what I understand I need to assign a file as my virtual block area
    (AI says OPEN-BLOCK but that word does not exist).

    Can anyone advise ?

    ciforth is in fact FIG-forth 5.#.# or 6.#.#.
    It has never removed the blocks system (and uses it to implement
    the library).

    All definitions are high level. So you can start up a ciforth
    (lina wina risc i86 arm) and steal everything by decompiling
    words. There is no merit in the UPDATE word that is optimnal
    for a tape reader, but all words are strictly compliant,
    The block buffers are used for buffered including,
    What you need is set asided 8 or 16 whatever block storage.

    Or you can extract it from the generic source file.

    There is a terribly complicatied set of rules what you can do
    with EMIT SRC etc. I have added a LOCK to blocks. In that way
    you can ignore those rules, because they are automatically
    satisfied.

    Alternatively you can copy the mechanism from figForth,
    that is high level too.

    GRoetjes Albert
    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From dave@dave6502@gmail.com to comp.lang.forth on Fri Sep 4 11:20:55 2026
    From Newsgroup: comp.lang.forth

    On Fri, 28 Aug 2026 13:46:18 +0200, albert wrote:

    In article <116puk0$1msvv$1@dont-email.me>, dave <dave6502@gmail.com>
    wrote:
    Been happily using SwiftForth for a few months using files and include
    but would like to try blocks. Have been digging around the docs and AI
    but getting nowhere.

    From what I understand I need to assign a file as my virtual block area
    (AI says OPEN-BLOCK but that word does not exist).

    Can anyone advise ?

    ciforth is in fact FIG-forth 5.#.# or 6.#.#.
    It has never removed the blocks system (and uses it to implement the library).

    All definitions are high level. So you can start up a ciforth (lina wina
    risc i86 arm) and steal everything by decompiling words. There is no
    merit in the UPDATE word that is optimnal for a tape reader, but all
    words are strictly compliant,
    The block buffers are used for buffered including,
    What you need is set asided 8 or 16 whatever block storage.

    Or you can extract it from the generic source file.

    There is a terribly complicatied set of rules what you can do with EMIT
    SRC etc. I have added a LOCK to blocks. In that way you can ignore those rules, because they are automatically satisfied.

    Alternatively you can copy the mechanism from figForth,
    that is high level too.

    GRoetjes Albert

    FYI for anybody following this you have to define a block file such as

    2000 newfile /home/dave/Desktop/FORTH-BLOCKS.SRC

    before hand ... I learn a new thing every day :)

    --- Synchronet 3.22a-Linux NewsLink 1.2