I'm new to this and I'm trying to understand the amForth inner interpreter. 
There are a couple of clarifications in the "amforth Documentation, Release 
5.1-wip,January 26, 2013" that would help a lot.

To wit:

(p. 9)  EXECUTE

Q: When is EXECUTE, um, executed? I'm not clear on what this is used for.

(p. 9)  NEXT
[ . . . ]
This last step finally jumps to the machine code pointed to by the X scratch 
pad register.

Q: To be clear, the machine code jumps to NEXT when it has completed.  Correct?

(p. 9)  EXIT
The code for EXIT (aka UNNEST) is the forth word EXIT in the dictionary. It 
reads the IP from the return stack and jumps to NEXT. The return stack pointer 
is incremented by 2 (1 flash cell).

Q: I think EXIT pops the top of the return stack into the IP.  That way, the 
second step of NEXT gets the correct value. Correct?

(p. 9)  DO_DOES
This code is the runtime part of the forth word DOES> . It pushes the current 
address of the MCU IP register onto the returnstack and jumps to DO_DOES. 
DO_DOES gets that address back, saves the current IP and sets the forth IP to 
the address it got from the stack. Finally it continues with NEXT.

Q.  Is this effectively a subroutine call?

Thanks for any light you can shed. 

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to