timeout of Hserin, goto, gosub or both?


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    If it's really a GOTO, there must not be any trace of where it was initiated in the stack, so NoData will not know where to return...
    And even more buggy, the BufferChar Gosub will not be completed.
    hence creating a bug.
    When your program jumps to NoData label, in the stacker is still pending the last GOSUB instruction (the one that directed the program flow to the routine under BUfferChar label), so no matter how many GOTO you will use, the first RETURN will clear the last pending gosub and pointer will return the program flow to the main program routine (if the gosub had been executed there). And this is what will happen with the RETURN under NoData label.

    Al.
    All progress began with an idea

  2. #2
    Join Date
    Jul 2007
    Posts
    65


    Did you find this post helpful? Yes | No

    Default

    very interres-thing!

    thanks much for this Al

    So it means goto's are safe inside a gosub, as long as there is a return in the end. I like that!

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. Making a menu
    By chrisshortys in forum mel PIC BASIC Pro
    Replies: 36
    Last Post: - 12th November 2008, 19:54
  3. Problems with RC2 and RC3
    By Christopher4187 in forum General
    Replies: 11
    Last Post: - 29th May 2006, 17:19
  4. Output PIC module
    By freelancebee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th September 2005, 20:10
  5. ds1307 from f877 to f452 not work
    By microkam in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th July 2005, 00:02

Members who have read this thread : 1

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