Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20638

BASCOM-AVR : Gosub vs. Call a procedure : REPLY

$
0
0
Mark is sensibly covering all the bases. While most people would realise that in makes no sense to nest sub code inside a label: return procedure, in fact its a common assembler trick to create several labels as entry points into a chunk of code, with only one return ( ret ) at the end. That gives the opportunity to call earlier or later bits of the code, and saves multiple call and ret statememts. I dont think I have ever seen a Basic construction like that, but its certainly possible to create one using labels and a single return at the end.

Viewing all articles
Browse latest Browse all 20638

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>