Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #37360

Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack

From "Rod Pemberton" <buzz@notnotnontnooatno.cmm>
Newsgroups comp.lang.forth
Subject Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack
Date 2015-03-17 18:03 -0400
Organization Aioe.org NNTP Server
Message-ID <op.xvnwwjcrv6dtjm@localhost> (permalink)
References <21045760-f834-4d9c-9bb0-d13f2c1ff3b4@googlegroups.com> <op.xvl4qlb5v6dtjm@localhost> <b1762000-5cc5-4c57-b26e-9ab12385cdbc@googlegroups.com>

Show all headers | View raw


On Tue, 17 Mar 2015 05:52:03 -0400, <mfanyikazi@gmail.com> wrote:
> Rod Pemberton wrote:

>> Do RP@ RP! SP@ SP! work correctly for this eForth?
>
> Nope they can't work since both stacks are circular in nature and the
> only offset into the stacks is through the digits 0x00 - 0x1f there is
> no memory addressing scheme used since they are separate from main
> memory and act more like LIFO stacks, even making he words PICK and ROLL
> requires a tremendous hack that the original author of the Forth system
> that runs on that CPU has to do. This is really complicated , but since
> it's James Bowman's J1 FPGA I think the only thing to do is ask him how
> to memory map the stack such that I can extend the stacks using main
> memory , if this is possible then I can find a way to extend the user
> area per task so that I can save and restore the states .. but one more
> problem ... both the stacks are circular which makes it add to the
> problem that accessing the pointer to the stack does not really mean
> returning the accurate value since the stack may be overwritten by other
> stacks ...

I know that  *none*  of the other people posting here, are about to do
any actual work which could help you, unlike me.  They pretend to be
nice, but tell other people to killfile those they dislike.  I believe
that actions speak louder than words, so if anyone here happens to say
something bad about me, I think you should just ignore them.

I went to James Bowman's website and attempting to find out if he
uses SP and RP in his code.  It seems J.B. uses SP named as 'dsp'
in nucleus for DEPTH's definition:

http://www.excamera.com/files/j1demo/docforth/nuc.fs.html

So, you should be able to construct SP@ and SP! like so:

: SP@ dsp @ ;
: SP@ dsp ! ;

I don't see an RP equivalent in his nucleus, basewords, or cross
assembler .fs files.

R@ might be about the only place where RP might normally be used. However,
he uses rT in R@ which I'm assuming moves the top of the return stack
into the top of the data stack T . So, an RP named as 'rsp' or somesuch
might simply be unimplemented since it was unneeded.

> a problem that seems to be amplified when using a circular
> stack design. hmmm .. I don't know if he will agree :)

It doesn't matter if he agrees with you.  You're using his processor
to do what you want.  You're not there to satiate whatever ego he has,
if any, unless he's employed you.

Personally, I don't see the circular buffers being something critical.
If you do, you can always set up your own stacks as long as some method
exists in his variation of eForth to allocate memory, e.g., ALLOT or
ALLOCATE etc.


Rod Pemberton

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack mfanyikazi@gmail.com - 2015-03-16 09:30 -0700
  Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack jenfhaomndgfwutc@murmic.plus.com - 2015-03-16 17:13 +0000
    Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack mfanyikazi@gmail.com - 2015-03-17 02:40 -0700
      Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack Jan Coombs <Jan-54 <jenfhaomndgfwutc@murmic.plus.com>> - 2015-03-18 01:53 +0000
        Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack rickman <gnuarm@gmail.com> - 2015-03-17 23:21 -0400
  Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-03-16 22:24 +0000
    Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack rickman <gnuarm@gmail.com> - 2015-03-17 14:01 -0400
      Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack JUERGEN <epldfpga@aol.com> - 2015-03-17 11:59 -0700
        Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack rickman <gnuarm@gmail.com> - 2015-03-17 16:28 -0400
        Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-03-18 15:30 +0000
          Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack Bernd Paysan <bernd.paysan@gmx.de> - 2015-03-18 22:12 +0100
  Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack "Rod Pemberton" <buzz@notnotnontnooatno.cmm> - 2015-03-16 18:57 -0400
    Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack mfanyikazi@gmail.com - 2015-03-17 02:52 -0700
      Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack "Rod Pemberton" <buzz@notnotnontnooatno.cmm> - 2015-03-17 18:03 -0400
      Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-03-18 14:39 +0000
  Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack mfanyikazi@gmail.com - 2015-03-17 02:58 -0700
  Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-03-17 16:48 +0000
  Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack Lars Brinkhoff <lars.spam@nocrew.org> - 2015-03-18 12:16 +0100
    Re: Is it possible to have the following words (RP@ RP! SP@ SP!) on hardware data and return stack Lars Brinkhoff <lars.spam@nocrew.org> - 2015-03-18 12:43 +0100

csiph-web