User`s manual

SBCSCSI/D14-1
4
NCR BUILD TOOLS
Introduction
The NCR build tools are a set of utilities provided to compile NCR SCSI
SCRIPTS source modules. The utilities provided are the SCRIPTS compiler
and the SCRIPTS preprocessor. The compiler, as written by the NCR
Corporation, is used to compile general purpose SCRIPTS source files into
executable NCR 53C710 machine instructions. The preprocessor, written
specifically for use in the Firmware environment, provides a mechanism
whereby SCRIPTS data references can be changed from the values assigned at
link time to new values defined dynamically at run time as required by the
Firmware.
SCSI SCRIPTS Data Reference Relocation
Because the siopdata data area required by the SIOP Firmware is dynamically
allocated, the references to this data area by SCRIPTS must then be changed
from the link time values through a patching process. This patching is done at
run-time by the siop_init() routine prior to SCRIPTS execution.
The SCRIPTS preprocessor utilities n710p68k and n710p80k are provided to
generate a relocation table used by siop_init() to perform this patch. This table
contains entries pointing to each script array contained in the script source file,
followed by offset values that point to locations within each script array
containing data references that must be patched.
During the Firmware initialization, the siop_init() function walks this
relocation table and patches all locations pointed to by this table to adjust for
the base address of the dynamically allocated siopdata.
Execution of the SCRIPTS preprocessor is required only when the SCRIPTS
source code is recompiled. However, the patching of the SCRIPTS is
performed on each call to siop_init(). Multiple calls to siop_init() perform this
relocation independently of any relocations performed on previous calls to
siop_init().