In kernel/toolsext.fs, is there a reason why the definition of [ELSE] in
[struct]-voc (at line 40) is not immediate? All the others are...
--Josh
Anton Ertl wrote:
On Mon, Mar 08, 2010 at 05:11:10PM -0500, Josh Grams wrote:
In kernel/toolsext.fs, is there a reason why the definition of [ELSE] in
[struct]-voc (at line 40) is not immediate? All the others are...
There appears to be, because if I make it immediate, too, Gforth
breaks
ans-report.fs replaces the top element of the search order. I *think*
it just needs an `also` before the first use of `ans-report-words`. It
doesn't look like there's any place to put a `previous` at the end...
--Josh
It doesn't look like there's any place to put a `previous` at the end...
Ack. I take that back, there is a place to put a `previous`. And it
also trashes the current wordlist. So...I suggest the following patch.
--Josh
--- a/ans-report.fs 2010-08-17 19:11:14.0 -0400
+++
Ah, ok, with some more digging around, I'm guessing it's a false
positive in `head?`. Though it happens with VOCABULARY also (that's how
I ran into the problem). Is it a bit dodgy in that case also?
--Josh
OK, I get it now. There's junk in unALLOTted memory up to a certain
point; after that it's all zeroes. So after that point, then if you
have a wordlist at the end of the dictionary, `head?` thinks it's is
followed by a header even though it isn't, and then that causes trouble.
So compiling
I did a cvs up to see if Bernd had patched `head?`, and noticed I had a
couple typo fixes in my source tree...
--Josh
Index: doc/gforth.ds
===
RCS file: /nfs/unsafe/cvs-repository/src-master/gforth/doc/gforth.ds,v
retrieving revision
If you pass code or a file on the command-line which produces a search
order which does not contain FORTH-WORDLIST, recent CVS versions seem to
crash before running bootmessage and accepting keyboard input.
gforth -e 'wordlist 1 set-order'
0.7.0 was fine...so this is new at some point...
--Josh
On 2013-05-02 12:57AM, Marcos Cruz wrote:
On 2013-05-01 23:15, John Allsup wrote :
: jif 0 = if 0 else 1 then ;
A simpler alternative:
: jyf 0 abs ;
Yikes! How about:
: jif 0 1 and ;
Usually in Forth a calculation can be used instead of a condition.
Well, that's true in
On 2013-06-21 12:14AM, Marcos Cruz wrote:
: (everychar) ( key -- key ) dup bl and ;
' (everychar) is everychar
You're *removing* the existing functionality of everychar -- I'd guess
that's what's screwing it up. Try this:
: (everychar) defers everychar dup bl and ;
Works for me,
On 2013-06-21 02:04PM, Marcos Cruz wrote:
I supposed 'everychar' was a mere hook for the programmer, but not
used by Gforth itself -- and I didn't check it. Now I see it's vectored
to 'kill-prefix'.
Yeah... Most of the hooks in gforth that I have come across seem to be
there because they're used
On 2013-07-09 05:28PM, Marcos Cruz wrote:
Well, I have searched and grepped the Gforth's sources and manual, but
I've found no reference to configurable separators in path files, except
the word 'pathsep?' in cross.fs. I've tried backslashes and they
fail.
Forward slashes should work everywhere.
On 2015-01-20 02:50PM, Philip Smith wrote:
m: this ['] foo1 catch ;m method foo2
fooy foo2 .s cr
2 -1230974988 -2700
Yeah, you have to watch out for the stack depth when CATCH returns
through THROW. It restores it to the original depth (minus the XT
that you executed). So you still have space on
On 2018-04-27 09:04PM, Carsten Strotmann wrote:
>The idea is to have this code that creates a minimal forth wordlist
>inside gforth shipped with the gforth code, so that it is immediately
>usable for Forth beginners.
Ulli Hoffman's code goes out of its way to try and work on any ANS-94
system.
On 2019-02-15 04:21PM, J. David Boyd wrote:
>
>Any idea how to implement the word NOT in gforth to create a 1s complement?
>I can find an assembler definition in SwiftForth, but no other luck anywhere.
The standard Forth word is called INVERT.
--Josh
On 2021-03-01 07:32PM, Ethan Gardener wrote:
>jonesforth.f is shorter than jonesforth.S, but so much of both files are
>comments, it's hard to compare the code sizes.
But they're not the same thing, are they? They're two parts of the same system.
jonesforth.S is the core engine that is written
IIRC 0 isn't a valid block number: for instance,
http://forth.sourceforge.net/standard/dpans/dpans7.htm#7.6.1.1790 LOAD
says "An ambiguous condition exists if u is zero or is not a valid block
number."
I believe in some systems blocks were actually the raw disk, so the
bootloader would be
17 matches
Mail list logo