Re: using MISC (post 1987 Forth hardware) opcodes
- From: jmdrake_98@xxxxxxxxx
- Date: 16 Jul 2006 14:52:59 -0700
Adam Warner wrote:
We agree I did not provide a good enough example to support my claim. This
one should be bulletproof: You have a reason to trace though a deep
tree-like data structure. Mechanically this involves pushing paths you
still need to travel onto a stack every time you branch within the tree.
Recursion makes this mechanical process invisible.
That's not a problem. All you have to do is to use a threaded tree.
See: http://datastructures.itgo.com/trees/tbt.htm
An environment with six cell stacks cannot traverse this data structure
(without implementing userspace stacks out of heap memory). The stack is
blown around point 7 (earlier if there is already data on the return stack).
Or without altering the data structure and using a threaded tree.
A six cell environmental dependency is simply too low for general purpose
programming tasks. Whoever is willing to concede this (by highlighting a
specialised embedded environment) should beware of claiming that such a
restricted environment is also easier to program.
Regards,
Adam
I fail to see how such an enviornment is "restricted". As Jeff pointed
out
one can always implement "stacks in memory" if that's what someone
REALLY wants/needs to do. He did that on the F21 in order to support
an ANS Forth. But is that how you want your stacks to GENERALLY
be made? If I can have a MUCH faster hardware stack and then on
occassion use an in-memory stack (or be more thoughtfull on my
data structure choice) how am I at a disadvantage from using an
in-memory stack all of the time?
Regards,
John M. Drake
.
- References:
- using MISC (post 1987 Forth hardware) opcodes
- From: Jeff Fox
- Re: using MISC (post 1987 Forth hardware) opcodes
- From: Bernd Paysan
- Re: using MISC (post 1987 Forth hardware) opcodes
- From: Jeff Fox
- Re: using MISC (post 1987 Forth hardware) opcodes
- From: Adam Warner
- Re: using MISC (post 1987 Forth hardware) opcodes
- From: Jeff Fox
- Re: using MISC (post 1987 Forth hardware) opcodes
- From: Adam Warner
- Re: using MISC (post 1987 Forth hardware) opcodes
- From: Marc Olschok
- Re: using MISC (post 1987 Forth hardware) opcodes
- From: Adam Warner
- using MISC (post 1987 Forth hardware) opcodes
- Prev by Date: OT Advice on good forth coding
- Next by Date: Re: using MISC (post 1987 Forth hardware) opcodes
- Previous by thread: Re: using MISC (post 1987 Forth hardware) opcodes
- Next by thread: Re: using MISC (post 1987 Forth hardware) opcodes
- Index(es):
Relevant Pages
|