Ed Falat <[EMAIL PROTECTED]> writes Re: [gforth] Stack anomoly?

> I was trying to show someone the ease of debugging with a stack when I 
> encountered this anomaly.
> I have been able to reproduce it on 4 different computers and two notebooks, 
> ranging from Pentium to Pentium IV. 

> All the systems were using a Linux 2.6.15  or 2.6.16 kernel. I have not tried 
> it on a 2.4 kernel.
> I tried to isolate the problem to ".s" but that seems to behave. The gforth 
> was the Debian package
> but a recompile of the 0,6,2  get the same results.

> Any ideas?

What exactly is the problem you observe?

Gforth limits the output of .S to the (correct) count of stack items,
followed by the first 9 numbers from the top. This is probably done to
prevent a display problem when the programmer succeeds in nearly filling
the stack by accident (millions of numbers :-)

-marcel

-- -----------------------------------------------------------------
Gforth 0.6.2, Copyright (C) 1995-2003 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `bye' to exit
0 1 2 3 4 5 6 7 8 .s <9> 0 1 2 3 4 5 6 7 8  ok
9 .s <10> 1 2 3 4 5 6 7 8 9  ok
10 .s <11> 2 3 4 5 6 7 8 9 10  ok
. . . .  10 9 8 7  ok
.s <7> 0 1 2 3 4 5 6  ok

-- iForth 2.0 ------------------------------------------------------
FORTH> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 .s
  Data: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ---
System: ---
 Float: --- ok
[17]FORTH> 17 18 19 20 21 22 23 24 25 26 .s
  Data: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 
---
System: ---
 Float: --- ok
[27]FORTH> 27 28 29 30 31 32 33 34 35 36 37 38 39 40  ok
[41]FORTH> .s
  Data: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 
27 28 29 30 31 32 33 34 35 36 37 38 39 40
 ---
System: ---
 Float: --- ok
[41]FORTH> 27 28 29 30 31 32 33 34 35 36 37 38 39 40 .s
  Data: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 
27 28 29 30 31 32 33 34 35 36 37 38 39 40
 27 28 29 30 31 32 33 34 35 36 37 38 39 40 ---
System: ---
 Float: --- ok
[55]FORTH> 27 28 29 30 31 32 33 34 35 36 37 38 39 40 .s
  Data: .. ---
System: ---
 Float: --- ok
[69]FORTH>  ok

( iForth shows 64 items max, after that only shows the count and suppresses the 
dump completely )


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to