Avaya Logo

Previous Topic

Next Topic

Book Contents

Book Index

rts

The rts instruction returns from a script subroutine.

Synopsis

rts()

Description

The rts instruction is the mechanism for returning from a subroutine call. The saved values for all registers except r.0 are restored. r.0 is left at whatever value it was before the rts instruction.

Example

In the following example, after speaking the character string in STKSYM with a falling inflection and then the phrase "has not opened," the script goes to dont_count. The rts in dont_count causes the next instruction to be executed after the subroutine call in not_opened.

MAIN:

........ .............. ...................
SR_CALL( )
................ ............... ..................

SR_CALL:

............... ............... ....................

not_opened:
tchars(ch.STKSYM,'f')
talk("has not opened")
goto dont_count
.......... ........... .................

dont_count
........... ................. ..................
rts()

© 2006 Avaya Inc. All Rights Reserved.