RTC
®
5 PC Interface Board
Rev. 1.9 e
10 Commands And Functions
315
Undelayed
Short
List Command
list_call
Function causes an unconditional jump to a subroutine that starts at the specified absolute list
buffer address (in any desired location within list memory).
Call
list_call( Pos )
Parameter
Pos
Absolute jump address [0 … (2
20
–1)] as an unsigned 32-bit value
Comments • The first command of a subroutine called via list_call will be executed (possibly after a
list_nop command) immediately and without delay. Nested or recursive calls are also
possible, up to a depth of 63 (also see "Subroutines", page 76).
• Each subroutine must be terminated with the command list_return so that after the
subroutine (including the terminating list_return command) has been processed,
execution continues with the command that follows the subroutine-call command.
This, too, will execute (after a possible list_nop command) immediately and without
delay.
If set_end_of_list is encountered instead of the expected list_return command, then
list execution will terminate or – if previously activated – an automatic list change will
take place (for the latter, the current list status is a decisive factor as described below).
Under no circumstances will program flow then return again to the calling location,
even in the case of nested subroutine calls. Any not-yet-completed mark_text
command will not execute to completion.
If the end of a list area (“List 1” or “List 2”) is reached without having encountered a
list_return or set_end_of_list, then execution will continue at the start of the current
list. If such a situation occurs in the protected memory area, then a compulsory
list_return command will be inserted and executed.
•The list_call command will be replaced by a list_nop if
Pos
> (2
20
–1) or if
Pos
is also
the current address (get_last_error return code:
RTC5_PARAM_ERROR
).
• If a called subroutine executes a further list_call command to the address of the calling
list_call command (recursive call), then the resulting endless loop will be terminated as
soon as the 63-nested-call upper limit is reached. Further list_call commands are then
ignored and the next command will instead be executed.
• The BUSY list status readable via read_status will, if necessary, be altered by list_call if
the called address is in the list area (“List 1” or “List 2”). If this address is instead in
protected memory (“List 3”), then the calling location’s list status will be retained
because the protected area does not have its own list status. During execution of a
subroutine in protected memory, get_status too returns the calling location’s list
execution status, and get_out_pointer returns the position of the calling list_call
command as the output pointer’s position.
• Absolute vector and arc commands will execute absolutely after list_call is called. If the
subroutine needs to execute at various locations within the image field, then either the
subroutine can only contain relative mark, arc or jump commands or list_call_abs must
be used instead.
•If list_call is at the last possible memory position in a list (“List 1” or “List 2”), then –
even if automatic list changing was previously enabled – execution will continue at the
start of the same list after processing of the called subroutine.
RTC
®
4
RTC
®
5 essentially unchanged functionality
References list_return, list_call_abs, list_call_cond, sub_call