James, I have often used pop and push operators on processors where they were available in order to affect program direction upon leaving an interrupt routine, which was based upon tasks performed within that interrupt routine. I would suggest that you experiment with whatever task you were thinking about that prompted your email, then report back to the group with your findings. I can see where it might be possible to exploit the stack as you have suggested, but I can also see that the idea needs a lot of refinement before it would be useful. Sounds like pop and push without explicit operators... I have some vague ideas about how it could be done, but they are not well thought out nor elegant. Regards, Ed -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of James Caska Sent: Sunday, October 07, 2001 7:11 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: Its not a direct stack pointer control rather a 'Trick' to gain some control over the stack pointer. There are numerous reasons why you would like control over the stack pointer, the abrupt exception handling concept was used only as an example. Some of the higher end PIC's have push and pop operators which allow direct stack manipulations but I was refering to the ability to take advantage of the circular buffer employed by the stack. Regards, James Caska caska@virtualbreadboard.com ujVM - 'The worlds smallest java virtual machine' -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Bob Barr Sent: Monday, 8 October 2001 9:50 AM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: Olin Lathrop wrote: > > > If you know the depth of your entry point you can use this technique to > > flush the stack :-) Which can be handy if you need to abruptly exit a >call > > path. > >How is messing about with the stack more "handy" than doing a GOTO? > Is it really even possible to 'flush' the stack? The limited number of PIC types that I have worked with don't have any way (other than calls and returns) of affecting the stack. Do some PIC types provide direct stack pointer control? Regards, Bob _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body