RTC6 boards
Doc. Rev. 1.0.21 en-US
10 RTC6 Commands
499
Comments
(cont’d)
• Together with save_disk, load_disk can be used, for example, to defragment the
protected RTC6 List Memory area “List 3” and to subsequently protect subroutines, see
Section ”Subsequent Protection and Conversion of Non-Indexed Subroutines”,
page 116 and Section ”Index Management and Defragmentation”, page 115. If the
characters, text strings and subroutines come from various files, then defragmentation
can be achieved if the first file is loaded in
Mode =
0 and subsequent files are loaded
with
Mode
> 0, provided that no indices are used simultaneously in different files.
Memory gaps in the protected area caused by dereferencing of indexed characters, text
strings or subroutines are thereby closed.
• If, during loading, the end of the protected RTC6 List Memory area “List 3” is reached
before the end of the file (EOF), then all further list commands in the file is ignored.
Likewise, incomplete characters, text strings and subroutines (as with individual
load_char, load_text_table or load_sub calls) are not stored. Prior to a load_disk call,
be sure that the memory configuration provides a sufficiently large protected RTC6 List
Memory area “List 3” above the RTC6 List Memory areas (“List 1” and “List 2”).
save_disk returns the number of list commands stored in the file. If a board changes
ownership, it is the user’s responsibility to ensure that the memory configuration data
is consistent (
Mem1
and
Mem2
are queried from the RTC6 DLL, not from the board – see
also get_config_list and Chapter 6.7.1 ”Notes on Board Acquisition by a User
Program”, page 128).
• If the specified file is corrupt and cannot be read to the end, then only the characters,
text strings and subroutines fully readable to that point are stored.
• load_disk is not executed, if:
– “List 3” has no RTC6 List Memory area assigned, that is,
Mem1
+
Mem2
= 2
23
(get_last_error return code
RTC6_PARAM_ERROR
)
– the BUSY list execution status is set
(get_last_error return code
RTC6_BUSY
)
– the INTERNAL-BUSY list execution status is set
(get_last_error-Returncode
RTC6_BUSY
)
• load_disk is even executed, if:
– a list has only been paused by set_wait (PAUSED list execution status set).
But users are responsible for ensuring that no still-needed commands are
overwritten, for example, if set_wait has been called from an indexed subroutine.
• During the runtime of load_disk:
– No other commands can be executed
– External Starts are suppressed
• load_disk checks the version info saved by save_disk and compares it with the current
runtime version. Both must match. Otherwise, load_disk is not executed
(get_last_error return code
RTC6_VERSION_MISMATCH
).
Ctr
l Command load_disk