EasyManua.ls Logo

Scanlab RTC 5 PC Interface Board - save_disk

Scanlab RTC 5 PC Interface Board
622 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
RTC
®
5 PC Interface Board
Rev. 1.9 e
10 Commands And Functions
398
innovators for industry
Ctrl Command save_disk
Function stores all indexed characters, text strings and/or subroutines to a binary file on a PC storage
medium, ordered by index, and returns the number of thereby stored list commands.
Call
NoOfSavedCommands = save_disk( Name, Mode )
Parameters
Name
File name as a pointer to a null-terminated ANSI string
Mode
This parameter (unsigned 32-bit value) specifies what should be stored:
Bit #0 = 1: All indexed characters and text strings will be stored.
Bit #1 = 1: All indexed subroutines will be stored.
Bits #2-31: are not evaluated
Result The number of list commands saved via save_disk, as an unsigned 32-bit value
Comments The save_disk command can be used together with load_disk, for example, to perform
defragmentation or to apply subsequent protection to subroutines (see page 78 and
page 79).
•The save_disk command stores complete sets (no individual characters, text strings or
subroutines!) in the specified file. Indexed characters, text strings or subroutines that
are referenced multiple times with copy_dst_src will be correspondingly duplicated via
save_disk, i.e. also stored multiple times. The save_disk command ignores unrefer-
enced non-indexed (not subsequently referenced via set_char_pointer, … ) characters,
text strings and subroutines.
save_disk stores to the binary file not only the list commands for characters, text strings
and/or subroutines, but also their indexes and the number of commands.
The number of list commands stored with save_disk can differ considerably from the
number of the list commands stored in the protected-area “List 3“ (= 2
20
Mem1
Mem2
get_list_space), due to possible multiple referencing of an indexed character, text
string or subroutine or referencing of an indexed character, text string or subroutine in
the unprotected memory area (“List 1” or “List 2”). Prior to a subsequent load_disk, the
returned number must be compared to the size of the protected memory area (= 2
20
Mem1
Mem2
).
No-longer-needed characters (or text strings or subroutines) should be dereferenced via
load_char (or load_text_table or load_sub) directly followed by list_return previously
to save_disk (see page 79).
save_disk always stores all characters, text strings and/or subroutines from the refer-
enced address to the next possible list_return. Jump commands (also branches to
various list_return commands) are thereby neither evaluated nor executed.
•The save_disk command automatically replaces unallowed commands (e.g.
set_end_of_list) with list_nop commands; missing commands (e.g. list_return upon
reaching the last memory position of “List 3”) will be added.
•If
Mode
= 0 or
Name
= 0, then save_disk will be ignored (get_last_error return code:
RTC5_PARAM_ERROR
). The command will also be ignored (get_last_error return code:
RTC5_BUSY
) if the board’s BUSY status is currently set (list is being processed or has been
halted via pause_list) or the board’s INTERNAL-BUSY status is currently set. In contrast,
if a list has only been paused via set_wait (PAUSED status set), then save_disk can be
executed.
While the save_disk command is running, no further commands can be executed.
During execution of this command, external starts will be suppressed.
RTC
®
4
RTC
®
5new command
References load_disk

Table of Contents

Related product manuals