Ok, I was thinking just on PBP compiler. But return with goto would be possible if you call function/subroutine from one place only. And for that you actually don't need function or subroutine.
Ok, I was thinking just on PBP compiler. But return with goto would be possible if you call function/subroutine from one place only. And for that you actually don't need function or subroutine.
You could extend gosub nesting that way.
Save program counter to variable, set it to the address
of a routine, and rewrite the incremented value at the
end of the routine.
In the early days, with single code pages, it sounds like
a reasonable way to extend the nesting a level.
If I remember correctly Darrel did that, it was 48 level software stack.
EDIT:
http://www.picbasic.co.uk/forum/showthread.php?t=151
Good idea lolThe thought of actually writing another stack still hadn’t cross my mind.
Bookmarks