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?

VARIABLE AA
VARIABLE BB
VARIABLE NUM
: VINIT
   1 AA !    0 BB !  0 NUM !
   ;
: VVV 11 0 DO
   BB @ NUM !
   AA @ BB @ + BB !
   NUM @ AA !
   AA @
   LOOP
   ;
.( vinit vvv .s <11> 0 1 1 2 3 5 8 13 21 34 55 )
CR VINIT VVV .S CR

gforth fib1.fs
vinit vvv .s <11> 0 1 1 2 3 5 8 13 21 34 55
<11> 1 2 3 5 8 13 21 34 55    <=================#

kforth fib1.fs
vinit vvv .s <11> 0 1 1 2 3 5 8 13 21 34 55

               55
               34
               21
               13
               8
               5
               3
               2
               1
               1
               0

Goodbye.


VARIABLE AA
VARIABLE BB
VARIABLE NUM
: VINIT
   1 AA ! 0 BB ! 0 NUM !
   ;
: VVV 11 0 DO
   BB @ NUM !
   AA @ BB @ + BB !
   NUM @ AA !
   AA @
   LOOP
   ;
." VNPFORTH Compiled output " CR
CR VINIT VVV .S CR

VNPFORTH Compiled output

       55[      37]
       34[      22]
       21[      15]
       13[       D]
        8[       8]
        5[       5]
        3[       3]
        2[       2]
        1[       1]
        1[       1]
        0[       0]



Ed Falat

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

Reply via email to