Subroutine v2.0

by Geoff Lywood aka KrYpT
<glywood@yahoo.com>
ICQ: 117312247

Yay! It's finally been accomplished!
Internal subroutines in a BASIC program!

And, as an update from Subroutine v1.0, you now can have larger labels,
much less required syntax, and no more memory leaks!

Legal Stuff:
I am not responsible for any direct or indirect damage that use of this
program may have on you or your calculator. I have tested it, and I was
not aware of any significant problems at the time of release. This
program is in the public domain, and has no warranty.

Here are the 4 things you MUST do for this program to work:
 1. Get version 1.14 of the TI-OS. This is absolutely critical, as the program interacts with
    the parser at a very basic level. It also uses some system calls that only exist in v1.14.
    This version is currently available at:
    http://epsstore.ti.com/webs/CatList.asp?deptid=157&catid=514
    
 2. A subroutine looks like this:
	:Lbl ABC
	:
	:Some code here...
	:
	:Return

    Note: The name of the label is shown here as ABC. You may change it to whatever you like.
     The name of the label can be anywhere from 1 to 255 bytes (characters) long, however, it
     is not suggested using names longer than 2 in places where the OS might find them. Also,
     longer names take up more bytes and take a longer time to find.
    Another Note: The return instruction is not necessary if it is the last line of the
     program. (The TI-OS actually just jumps to the end of the program every time it sees the
     return instruction)

 3. To call a subroutine include these lines:

	:"XXXX
	:Asm(prgmS

    Where XXXX is the label at the beginning of the subroutine. You may wish to create another
    program that simply says "Asm(prgmS" if you think that will reduce bytes.

 4. Subroutines may be nested! And I've fixed the memory leak that happenned in the first version
    when you tried to nest subroutines!


Questions? Comments? Bugs? Anything?
Email me at glywood@yahoo.com