Subsequent Protection And Conversion Of Non-Indexed Subroutines - Scanlab RTC 5 PC Interface Board Installation And Operation Manual

Table of Contents

Advertisement

Subsequent Protection and Conversion of
Non-Indexed Subroutines
Non-indexed subroutines can be (directly) written
only to a list buffer area ("List 1" or "List 2"), but not
to the protected buffer area ("List 3"). There are
essentially two methods to subsequently assign
protection:
(1) Change the configuration:
The region of the list buffer in which the non-
indexed subroutine was written (in case this
region lies in the upper range of the memory) is
assigned to the protected buffer area via the
config_list
command. Subroutines subsequently
protected in this manner remain non-indexed
(with unaltered memory addresses) and can, as
before, be called via the
To enable non-indexed subroutines to be placed
in this manner in the uppermost range of the
memory, the corresponding memory area might
need to be temporarily assigned to the list buffer
via
config_list
prior to loading the non-indexed
subroutine.
(2) Converting to indexed subroutines:
A non-indexed subroutine can be referenced via
the
set_sub_pointer
command (the non-indexed
subroutine is thereby assigned an index and is
included in the management of indexed subrou-
tines). It can subsequently be copied as an
indexed subroutine to the protected buffer area
("List 3") via
save_disk/load_disk (save_disk
automatically stores all indexed subroutines and
non-indexed subroutines subsequently-refer-
enced via
set_sub_pointer
medium binarily, ordered by index -
copies all those subroutines from there to the
protected buffer area). A subsequent call via
sub_call
along with the index results in invoca-
tion of the copy residing in the protected buffer
area rather than the original.
If you want to subsequently protect a non-indexed
subroutine – either via method 1 or method 2 – then
be aware that absolute jumps within and out from
the protected buffer area are not allowed (see
"Jumps", page
81).
Indexed subroutines subject to conversion
(method 2) must observe all programming rules
regarding indexed subroutines (see
®
RTC
5 PC Interface Board
Rev. 1.9 e
6 Developing User Applications
list_call
command.
onto on a PC storage
load_disk
page
77).
Always try to use only one of the two methods in
order to avoid unintended data loss in the protected
buffer area via overwriting. If you begin working with
method 1 but later want to also use indexed subrou-
tines, then you should convert into indexed subrou-
tines all of the protected buffer area's non-indexed
subroutines created with method 2 before you define
the first indexed subroutine via the
command.
When doing so, observe the following guidelines:
• If method 1 is used and you remove overwrite-
protection for a part of the protected buffer area,
then you risk overwriting indexed subroutines or
previously protected subroutines that might still
be needed.
• Non-indexed subroutines subsequently protected
with method 1 can under some circumstances be
unintentionally overwritten via a later
or
load_disk
command.
• The
set_sub_pointer
command links the
supplied index with the supplied start address
even if an indexed subroutine had already been
previously defined for this index. The original
indexed subroutine with this index is then no
longer referenced and no longer callable via the
index.
• If using method 2, you should use it fully. If the
set_sub_pointer
command alone is executed,
then the subroutine will already be callable via
sub_call
and its index, but the subroutine
remains unprotected against overwriting.
Protection is obtained only after the subroutine is
subsequently copied as an indexed subroutine via
save_disk/load_disk
into the protected buffer
area. Likewise, the number of list commands in
the subroutine is included in the internal
management table only via save_disk/load_disk.
• The
save_disk
command ignores unreferenced
non-indexed subroutines, even those subse-
quently protected in the protected buffer area via
method 1. Be aware that they can be overwritten
in the protected buffer area via load_disk.
• The
save_disk/load_disk
cally replaces unallowed commands (e.g.
set_end_of_list) with
list_nop
• Indexed subroutines repeatedly referenced with
copy_dst_src
will be duplicated in the list buffer
via a subsequent save_disk/load_disk. This could
lead to buffer overflow in the protected buffer
area.
load_sub
load_sub
command automati-
commands.
78

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RTC 5 PC Interface Board and is the answer not in the manual?

Related Products for Scanlab RTC 5 PC Interface Board

Table of Contents

Save PDF