Michael Watterson wrote: > I guess the PIC isn't appropriate for that as the > original 16F isn't really stack orientated, only has stack for > Interrupt return address. No, the stack is used for all return addresses, whether they be as a result of a interrupt or a explicit call. > BASIC and Forth quite often use virtual > machine or "p-code" type approaches, as does JAL. Really? I have heard of JAL being referred to as a "compiler" many times, and it supposedly uses GCC on Unix systems. > This lets you simulate > a stack without the need for the CPU to have a real one. That's one way, but you don't need p-code to have a stack on a PIC 16. My PIC development environment, for example, comes with software data stack capability on a PIC 16. Bytes can be pushed and popped in the assembler code at any time, and the stack is used by default on subroutine entry and exit to save and restore the general registers trashed by a subroutine. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .