RTC6 boards
Doc. Rev. 1.0.21 en-US
10 RTC6 Commands
498
Ctrl Command load_disk
Function Loads into the protected RTC6 List Memory area “List 3” the indexed characters, text
strings and subroutines previously stored in a binary file by save_disk and returns the
number of actually loaded list commands.
Call
NoOfLoadedCommands = load_disk( Name, Mode )
Parameters
Name
File name or NULL.
As a pointer to a \0-terminated ANSI string.
Mode
Determines how the loading procedure is executed.
As an unsigned 32-bit value.
= 0: The internal management tables for indexed characters, text strings
and subroutines are initialized (all old references are thereby lost) and
the input pointer is set to the beginning of “List 3“ (the resulting
loading process overwrites list commands stored there).
> 0: Internal management tables are not initialized (all old references are
initially retained, but then replaced or supplemented by other
references during the loading process, depending on the file’s
content) and the input pointer is set to the position after the last
stored (by load_char, load_text_table or load_sub) indexed
character, text string or subroutine (the resulting loading process
does not overwrite the list commands of old indexed characters, text
strings and subroutines).
Result The number of commands loaded by load_disk.
As an unsigned 32-bit value.
Comments • For
Name
= NULL, only the internal management tables are initialized as with
Mode =
0
(no loading occurs, no “empty“ binary file must be provided). Otherwise, load_disk
can only be used for reading files that were stored with save_disk.
• For all indexed characters, text strings and subroutines in the specified file, load_disk
executes a corresponding load_char, load_text_table or load_sub command. The
pertaining list commands are thereby written to the protected RTC6 List Memory area
“List 3” and the entries are made in the internal management tables in accordance with
the index assignment stored in the file. If there is no character, text string or subroutine
for a particular index in the specified file, then no list commands are loaded for this
index, and if
Mode
> 0 then any already existing entries in the internal management
table remains unaltered. Thus, supplementary loading of indexed characters, text
strings and subroutines from various files is possible.