Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ prom_exec(2spp) — UMIPS/BSD System Programmer's Package 2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

PROM_EXEC(2spp)

NAME

prom_exec − load program image and optionally transfer control

SYNOPSIS

#include <prom/entrypt.h>

prom_exec(pap)
struct promexec_args *pap;

DESCRIPTION

prom_exec may be used to load a program image from any device accessable to the prom monitor.  The argument, pap, should point to a promexec_args structure.  The field, pa_bootfile, of this structure indicates the file to load, the file should be specified as indicated in intro(1spp). The field, pa_argv, should contain a pointer to a null-terminated array of character pointers pointing to null terminated strings. The strings will be copied and passed as arguments to the loaded program. The field, pa_argc, should contain the number of strings in pa_argv. The field, pa_environ, should contain a pointer to a null-terminated array of character pointers pointing to null terminated strings. The strings will be copied an passed as the environment to the loaded program. If the field, pa_flags, is set to EXEC_NOGO the program image will be loaded but control will be returned to the caller.

RETURNS

prom_exec will return -1 if the image could not be loaded.  The global integer variable, errno, will be set.  If the EXEC_NOGO flag is specified, prom_exec will return the entry point of the loaded program if successful, prom_exec will return -1 otherwise and set errno. 

SEE ALSO

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026