Loading...
 
Skip to main content
EMFORTH stacks.

stacks

As well as the usual data and return stacks SAM7 EMforth has a bunch of others.

It has...
An object stack.
A message stack.
A vocabulary stack.
A register stack - for the assembler.
An auxiliary stack - for the assembler to remember immediates which need to be done in a lookup table.

Data, return, object and message use registers as stack pointers for speed.

In future stacks may be defined as objects. This is hard to do for the kernel but easy for higher level code.

There would be one or more class of "Stack" and the individual stack would be instances of that class.

It would avoid have lots of similar words defined for every stack.

Now I have RP! DP! OP! MP! AUX! VP! to reset the various stack.

If they were instances of a class you'd have something like this.

reset AUXstack, reset Vstack etc. where "reset" is a message and AUXstack etc are instance of the class Stack.
The same chuck of code does the work for all stacks so space is saved.
You could still define the old style words by doing something like..

: VP!
   reset Vstack 
;





Created by System Administrator. Last Modification: Saturday 26 of January, 2008 21:53:15 AEDT by eddie.

Main Index

Switch Theme

Switch Theme

Shoutbox

eddie, 18:52 AEST, Wed 11 of Sep, 2024: Most pages should be working again.
System Administrator, 08:03 AEST, Sat 10 of Aug, 2024: Lots of images are still broken. I'm working on it. Maybe 1/2 way through.
admin2, 14:05 AEST, Mon 05 of Aug, 2024: running tiki 27
admin2, 16:01 AEST, Sun 09 of Jun, 2024: Wiki running tikiwiki version 27alpha on a raspberry pi-3. About 1/2 the images are missing and most thumbnails not working. Slow manual rebuild. About %20 done.
eddie, 20:23 AEST, Sun 19 of May, 2024: Images moved from wiki_up to file galleries and wiki pages fixed.

Last-Visited Pages

Online Users

164 online users