In the thread entitled "toggle question", the replies by YLP and beaniebots got me thinking...
Which would use less program space? Setting gosubs to 16, then not using them, or using gosubs. Like this:
start:
Goto othersub
othersub:
goto start
OR........
Start:
Gosub othersub
othersub:
return
They basically both have the same amount of appearant code, and both require pointers to know where to go back to, and labels, and such. And I dont necessarily mean jsut those lines up there, but what if you jsut used goto's throughout an entire, decent sized program as compared to gosubs? Is there any appreciable difference in code size, and if so, why? I call on the guru's to set my mind straight!
--Andy P
Which would use less program space? Setting gosubs to 16, then not using them, or using gosubs. Like this:
start:
Goto othersub
othersub:
goto start
OR........
Start:
Gosub othersub
othersub:
return
They basically both have the same amount of appearant code, and both require pointers to know where to go back to, and labels, and such. And I dont necessarily mean jsut those lines up there, but what if you jsut used goto's throughout an entire, decent sized program as compared to gosubs? Is there any appreciable difference in code size, and if so, why? I call on the guru's to set my mind straight!
--Andy P