On Sun, Jul 17, 2016 at 03:20:57PM +0100, Mark Cave-Ayland wrote:
+\ +\ Pseudo r-stack implementation for interpret mode +\
+variable prstack 20 cells allot +variable #prstack 0 #prstack !
20 hex or 20 decimal? If it isn't clear, put hex or decimal before this?
This allocates 21 cells and isn't portable, btw ("variable" allocate one cell already, not necessarily contiguous with the "allot" allocated cells).
+: >r state @ if ['] >r , exit then r> swap prstack-push >r ; immediate +: r> state @ if ['] r> , exit then r> prstack-pop swap >r ; immediate +: r@ state @ if ['] r@ , exit then r> prstack-pop dup prstack-push swap >r ; immediate
['] >r , is very non-portable as well, "postpone >r" is much more modern.
Segher