DMDLD(1)

NAME
dmdld - 630 MTG application bootstrap loader

SYNOPSIS
dmdld [ options ] file [ application - arguments ]

DESCRIPTION
The dmdld program downloads the named file from the host, for execution in the 630 MTG terminal's window connected to its standard output. It can also be used to invoke cached applications.

The dmdld program works in layers(1) and non-layers environments. In layers(1), the download runs on top of the existing xt error-correcting protocol. In non-layers, dmdld temporarily puts the 630 MTG terminal into xt protocol, and mimics that protocol from its side, thus insuring an error-free download.

Dmdld first asks the terminal if there is a cached application of name file already in the terminal. The inquiry uses the filename clipped from any pathname prefix. If such an application exists and is available, that application will be booted in the window without going through the download sequence.

If a cached application of inquired filename does not exist in the terminal or is not available (see cache(3L) for reasons), dmdld will attempt to download file from the host. Files to be downloaded by dmdld must be 630 object files created with dmdcc(1).

During compilation, dmdcc(1) looks for the programming environment identification (PEID) number of all the library functions link-loaded, and assumes the highest number as the PEID of the application. During the download initialization, dmdld will send this number to the terminal. If the terminal's firmware version does not support this PEID - in other words, the firmware does not have some new library functions used by the application, the download will be aborted. The argument flag -f will override this checking, but the sanity of the application (after being downloaded and running) cannot be guaranteed.

The optional application-arguments are also sent to the terminal in order to initialize the parameters argc and argv of the function main of the application.

During the download, the 630 mouse cursor will turn into a "coffee cup" and the progress of the download is shown by a gradual filling of the window with inverse video. The code to be downloaded is relocated on-the-fly by dmdld to the memory area allocated for it by the terminal. If the download succeeds, the application will take over the window and start execution.

The following options are supported by dmdld:

-d  causes a printout of the download information on the diagnostic output (standard error).

-p  prints non-layers protocol statistics on the diagnostic output (standard error). Note that this option forces the -d option. In layers(1), this option is the same as the -d option.

-z  loads the process but does not run it. The process can then be started using dmdpi(1). This option works only under layers(1).

-f  forces the download even if the programming environment identification number of the application is not supported by the terminal it is downloaded into.

-n  is a null option, and is ignored by dmdld. It is used by processes that want to fork dmdld with a variable argument option.

-Z n
    overrides the inherent stack size of the download application and sets it to n bytes. N must be greater than or equal to 2048, or else stack size is defaulted to 2048. Inherent stack size of the download application is specified through the -Z option of dmdcc(1) (or defaulted to 2048).

-T  loads an absolute file (already link-loaded to a fixed address) such as a new version of the terminal's firmware into the terminal's RAM space. This download is called a takeover (overlay) download because it will close all physical ports except for the one running dmdld. The whole terminal screen will turn blank, and will be gradually filled up with inverse video representing the code being downloaded. When the download is finished, execution will begin at the first address of file. Relocation will be done by dmdld only if the first address of file is lower than the first available RAM address of the terminal. This is necessary because low-addressed RAM is used to store the terminal's system tables and variables, and overwriting them with the downloaded data may put the terminal into undetermined states. The -N option can be used instead, if the relocation possibility is not wanted.

-N  loads an absolute file into the terminal's RAM space. The difference between the -T and -N options is that the -N does not relocate the absolute file. Therefore the absolute file can be generated without relocation information.

The -T and -N options only work in the non-layers environment, and are exclusive of each other.

The environment variable JPATH is the analog of the shell's PATH variable to define a set of directories in which to search for file.

NOTE:
    Standard error should be redirected when using the -d or -p options.

EXAMPLE
Invoking the terminal resident PF Edit application using dmdld:
dmdld "PF Edit"

Invoking a dmdcc(1) compiled application:
dmdld dmda.out

Invoking a dmdcc(1) compiled application with the -d flag, redirecting standard error to temp:
dmdld -d dmda.out 2>temp

Invoking a dmdcc(1) compiled application with application-argument:
dmdld $DMD/lib/demolib/clock "`date`"

SEE ALSO
cache(3L), dmdcc(1), dmdpi(1), jx(1).
layers(1) in the UNIX System V Release 3 User's Reference Manual.
layers(1) in the 5620 Dot-Mapped Display Reference Manual.

DIAGNOSTICS

The error message "dmdld: ... is not compatible with terminal" means that the application the user attempts to download cannot execute safely in the terminal because it calls library routines which do not exist in the terminal's firmware version (i.e. the programming environment ID of the application is "newer" than the one supported by the terminal). A firmware upgrade is necessary, or the user can force the download by using the -f flag.

The error messages "dmdld: cannot access ..." or "dmdld: cannot open ..." appearing when the named file is known to be in the cache, indicate that the application is not available for booting, and dmdld cannot find or open the named file in the host.

The error message "dmdld: no memory in terminal" indicates that the terminal has run out of memory to accept the download. The user may free up memory (by deleting windows, etc..) and re-try.

Other error messages are self-explanatory.

BUGS
The application-arguments are not sent to the terminal to update argc and argv if the named file is found in the terminal's application cache.