cancelling a GOSUB without RETURN


Results 1 to 5 of 5

Threaded View

  1. #5
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Could you please explain a little bit more why you need so ?

    Hi,

    Resetting the PIC via another pin seems technically possible. But I would like to know some example conditions which demands that a GOSUB be cancelled. I sometimes use sbroutines which may be called from other subroutines or just be executed themselve. I just use a software flag (accordingly set before a GOSUB or a GOTO) which decides how to end that routine by a return or a GOTO.

    The stack pointer is not readable or writable. And three is no reference for a user initiated PUSH or POP on the mid range manual (I hope I have not skipped anything )

    On a 18F you can push/pop it you. For reset it can be automatic when you mess up your stack, or by a RESET instruction.

    Jersons technic is good as you will not be using the already pushed stack anyway and keep on pushing as if it were empty.
    Last edited by sougata; - 7th March 2007 at 14:34.
    Regards

    Sougata

Similar Threads

  1. Graphic LCD with PICbasic pro
    By amindzo in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 25th November 2012, 11:45
  2. Output PIC module
    By freelancebee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th September 2005, 20:10
  3. ds1307 from f877 to f452 not work
    By microkam in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th July 2005, 00:02
  4. Line following robot... problems with some code
    By nepstar in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 24th March 2005, 01:10
  5. Mssp
    By capitano in forum Code Examples
    Replies: 2
    Last Post: - 15th December 2004, 19:33

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts