[retroforth] Re: Reva: question about 'key'

  • From: "Helmar Wodtke" <helmwo@xxxxxx>
  • To: retroforth@xxxxxxxxxxxxx
  • Date: Sun, 30 Jan 2005 22:58:04 +0100

retroforth@xxxxxxxxxxxxx schrieb am 30.01.05 22:55:28:
> 
> retroforth@xxxxxxxxxxxxx schrieb am 30.01.05 22:38:52:
> > 
> > 
> > On Sun, January 30, 2005 13:18, Helmar Wodtke said:
> > > Hi Ron,
> > > Reva returns in the higher 24 bits sometimes trash if I call "key". Is 
> > > this
> > > intended behaviour? I currently help myself with something like:
> > >
> > > ' key : key [ compile ] 255 and ;
> > 
> > I don't understand why.  Reva uses the exact same code as Retro - it should
> > not behave any differently.
> It uses a position to store the buffer that is not on stack?
> Probably this is the problem.
> 
> > > Also I figured out that Reva seems to crash sometimes when I press ^D 
> > > (which
> > > terminates input on Linux).
> > > I know that Retro does not stop reading from input, when I press ^D, but 
> > > Reva
> > > seems abolutely not to like it. Can you verify this?
> > 
> > It doesn't crash for me
> 
> Mhm. Retro does not crash, but Reva does. I try another asm definition for 
> "key"...
> Wait a minute.
FORTH 'key', key
        dup
        push ebx,ecx,edx
        sub ebx,ebx     ;0 = stdin
        mov edx, 1      ;count
        push ebx
        mov ecx,esp
        mov eax, 3      ;sys_read
        int 80h
        pop eax
        pop ebx,ecx,edx
        ret

Does not crash :)

Bis dann,
Helmar
helmwo@xxxxxx


-- Binary/unsupported file stripped by Ecartis --
-- Type: application/x-pkcs7-signature
-- File: smime.p7s
-- Desc: S/MIME Cryptographic Signature



Other related posts: