RTC6 boards
Doc. Rev. 1.0.21 en-US
6 Developing RTC6-User Programs
114
Rules for Programming
Observe the following guidelines when programming
indexed subroutines:
• In an indexed subroutine, set_end_of_list is
replaced by a list_nop.
• Absolute jumps within or out from the protected
RTC6 List Memory area “List 3” are ignored
during processing, see Chapter 6.5.3 ”Jumps”,
page 120. Therefore, absolute jumps cannot be
used in indexed subroutines.
• When the subroutine is processed, also ignored
are:
– Relative jumps that exceed the boundaries of
an indexed subroutine
– Jump Commands which initiate a jump to
themselves
General Information on Calling Subroutines
Nested calls up to a maximum depth of 63 are
possible.
When calling with sub_call or list_call, only relative
Jump Commands and Mark Commands may be used,
if the subroutine execution is to be repeated at
different Image Field places.
To be able to use the absolute Jump Commands and
Mark Commands, which are often easier to handle,
the so-called “AbsCalls” are provided.
“AbsCalls”
If the subroutines contain only relative
Vector Commands and “Arc” Commands, see
Chapter 7.1.1 ”Marking with Vector Commands and
“Arc” Commands”, page 136, the corresponding
processes can be repeated at different places in the
Image Field.
With “AbsCalls” the current position is taken over as
offset. This offset is then taken into account for all
subsequent Vector Commands and “Arc” Commands
in the subroutine.
Nested calls are taken into account when the offset is
determined. This can be used, for instance, to define
character sets by absolute vectors.
“AbsCalls” from subroutines are made with
list_call_abs and sub_call_abs.
Conditional Calls
To enable calling of subroutines dependent on
external control signals, additional commands are
available for conditional branching during program
execution, see Chapter 9.3.2 ”Conditional Command
Execution”, page 295.
Repeatedly Executed Calls
sub_call_repeat, sub_call_abs_repeat,
list_call_repeat and list_call_abs_repeat can be
used to automatically execute the body of a
subroutine several times.