Skip to content

ADDR

Add Memory-Resident Public Program

This directive loads a public program into executable memory and assigns it status as a resident public program. Keeping a public program resident eliminates the time that is required to read it from the hard disk each time it is CALLed.

ADDR program-name [,string-value] [,ERR=line-ref|,ERC=error-code]
[,BNK=bank-num]
program-name
is any string of 8 characters or fewer used to name the public program and its program file.
string-value
is any string in the format created by the CPP function.
line-ref
is the program line number or label to branch to if this directive produces an error.
error-code
is a programmer-defined error code. Valid values are positive or negative whole numbers.
bank-num
is the integer number of the memory bank. The only valid value is 1.

In release levels before 8.1B2, the ADDR directive uses an entry in the file control table. The number of entries allowed in this table is system dependent. Refer to the IPLINPUT parameter for the maximum file control table entries. The number of public programs added to memory with this directive is limited also by the maximum amount of available memory.

ADDR is for public programs only. Use ADD on files that are not public program files.

A public program added this way remains in the assigned memory bank until it is removed with the DROP directive.

Public programs added to the memory bank with this directive do not displace any non-public programs in the User Task Area.

The PUB function lists public programs added this way.

If an attempt is made to DISABLE a logical disk directory which contains a public program that has been added to a memory bank with the ADDR directive, an ERR=0 results.

If an attempt is made to ADDR a public program, which is already, a resident public program no error results.

If an attempt is made to ADDR a public program and the public program cannot be found, an ERR=12 results.

If an attempt is made to ADDR a file that is not a program file type, an ERR=17 results.

ADDR "INDEX"

loads the public program “INDEX” into the user’s current memory bank as a resident public program and updates the File Control Table.

ADDR A$,ERR=7999

If A$=“INDEX”, has the same effect as the previous example, but branches to statement 7999 if an error occurs while processing this directive.

SEE ALSO

ADD, DROP, and DROP ALL directives

From the Thoroughbred Basic Language Reference, Volume I: A–E, version 8.9.1. Open this page in the PDF