• Re: How does the input stream traditionally work?

    From dxf@dxforth@gmail.com to comp.lang.forth on Tue Apr 21 18:40:16 2026
    From Newsgroup: comp.lang.forth

    On 16/03/2026 10:46 am, dxf wrote:
    On 16/03/2026 7:21 am, Paul Rubin wrote:
    dxf <dxforth@gmail.com> writes:
    DX-Forth uses a 256 byte return stack. The consequence of that is only
    about 6 files can be included before it runs out.

    If you mean 6 levels of nesting, that seems sufficient for a small
    system. It's around 20 return stack cells for each level. Is that for
    a blocks system, or do you have files?

    Has anyone that uses libraries with interdependencies (4tH ?) calculated
    their worst case nesting level? ANS specified a minimum of 8 levels.
    Curious as to how that figure panned out in reality.

    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Tue Apr 21 12:39:55 2026
    From Newsgroup: comp.lang.forth

    In article <69e737f1@news.ausics.net>, dxf <dxforth@gmail.com> wrote:
    On 16/03/2026 10:46 am, dxf wrote:
    On 16/03/2026 7:21 am, Paul Rubin wrote:
    dxf <dxforth@gmail.com> writes:
    DX-Forth uses a 256 byte return stack. The consequence of that is only >>>> about 6 files can be included before it runs out.

    If you mean 6 levels of nesting, that seems sufficient for a small
    system. It's around 20 return stack cells for each level. Is that for
    a blocks system, or do you have files?

    Has anyone that uses libraries with interdependencies (4tH ?) calculated >their worst case nesting level? ANS specified a minimum of 8 levels.
    Curious as to how that figure panned out in reality.

    ciforth uses blocks with locking. In a hosted system that is 16 buffers, so
    16 deep nesting. As soon as a block has been LOADed it is unlocked.
    For libraries residing in files:
    Normally I read a file towards HERE, and during the debug session
    This file is resident. So there is unlimited nesting.

    It one insist on an INCLUDE-FILE were REFILL is abused to jump to
    the next line. The above buffers are used for nesting and buffering. Approximately the same level of nesting.

    You could increase NNBUF in the lina.fas to e.g.32

    NBUF = 32 ; No. of buffers, or screens

    and reassemble with
    fasm ci86.lina.fas -m25600
    --
    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.21f-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Tue Apr 21 19:47:16 2026
    From Newsgroup: comp.lang.forth

    On 21-04-2026 10:40, dxf wrote:
    On 16/03/2026 10:46 am, dxf wrote:
    On 16/03/2026 7:21 am, Paul Rubin wrote:
    dxf <dxforth@gmail.com> writes:
    DX-Forth uses a 256 byte return stack. The consequence of that is only >>>> about 6 files can be included before it runs out.

    If you mean 6 levels of nesting, that seems sufficient for a small
    system. It's around 20 return stack cells for each level. Is that for
    a blocks system, or do you have files?

    Has anyone that uses libraries with interdependencies (4tH ?) calculated their worst case nesting level? ANS specified a minimum of 8 levels.
    Curious as to how that figure panned out in reality.


    Vanilla 4tH - unlimited inclusion files. It figures out the size, makes
    space (the whole source resides in memory), includes the file, compiles
    it - until it meets another INCLUDE directive.

    Using the preprocessor - max. 32 levels deep. That is because it saves
    the TIB and some other information on a stack.

    See: https://www.youtube.com/watch?v=l4a80FS-jcA

    Hans Bezemer
    --- Synchronet 3.21f-Linux NewsLink 1.2