466
|
1 <refentry id="chain">
|
|
2 <refnamediv>
|
468
|
3 <refname>Chain</refname>
|
|
4 <refpurpose>load and execute a new program</refpurpose>
|
466
|
5 </refnamediv>
|
|
6
|
|
7 <refsynopsisdiv>
|
|
8 <funcsynopsis>
|
|
9 <funcprototype>
|
|
10 <funcdef><function>chain</function></funcdef>
|
552
|
11 <paramdef>char *<parameter>modname</parameter></paramdef>
|
|
12 <paramdef>int <parameter>paramsize</parameter></paramdef>
|
|
13 <paramdef>char *<parameter>paramptr</parameter></paramdef>
|
|
14 <paramdef>int <parameter>type</parameter></paramdef>
|
|
15 <paramdef>int <parameter>lang</parameter></paramdef>
|
|
16 <paramdef>int <parameter>datasize</parameter></paramdef>
|
466
|
17 </funcprototype>
|
|
18 </funcsynopsis>
|
|
19
|
|
20 </refsynopsisdiv>
|
|
21
|
540
|
22 <refsect1><title>Assembler Equivalent</title>
|
|
23 <para>
|
|
24 os9 F$CHAIN
|
|
25 </para>
|
|
26 </refsect1>
|
|
27
|
466
|
28 <refsect1><title>Description</title>
|
|
29 <para>
|
594
|
30 The action of F$CHAIN is described fully in the OS-9
|
|
31 documentation. Chain implements the service request as
|
|
32 described with one important exception: chain will NEVER return
|
|
33 to the caller. If there is an error, the process will abort
|
|
34 and return to its parent process. It might be wise, therefore,
|
|
35 for the programs to check the existence and access permissions
|
|
36 of the module before calling chain. Permissions may be checked
|
|
37 by using "modlink()" or "modload()" followed by an "munlink()".
|
|
38 </para>
|
|
39 <para>
|
|
40 "Modname" should point to the name of the desired module.
|
|
41 "Paramsize is the length of the parameter string (which should
|
|
42 normally be terminated with a "\n"), and "paramptr" points to
|
|
43 the parameter string. "Type" is the module type as found in
|
|
44 the module header (normally 1: program), and "lang" should
|
|
45 match the language nibble in the module header (C programs
|
|
46 have 1 for 6809 machine code here). "Datasize" may be zero, or
|
|
47 it may contain the number of 256 byte pages to give to the new
|
|
48 process as initial allocation of data memory.
|
466
|
49 </para>
|
|
50 </refsect1>
|
|
51 </refentry>
|