home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
TELECOM
/
UUCPbb_2_1_src.lzh
/
UUCPBB21
/
nmload.c
< prev
next >
Wrap
Text File
|
1994-09-25
|
1KB
|
62 lines
#ifndef _OSK
/* Our own versions of modlink() and modload() which use
F$NMLink and F$NMLoad to load a module --BGP */
#include <os9.h>
#define F_NMLINK 0x21
#define F_NMLOAD 0x22
#define F_UNLOAD 0x1d
extern int errno;
int nmlink (mod, type, lang)
char *mod;
int type, lang;
{
struct registers reg;
int result;
reg.rg_a = type | lang;
reg.rg_x = mod;
result = _os9 (F_NMLINK, ®);
errno = reg.rg_b & 0xff;
return (result);
}
int nmload (mod, type, lang)
char *mod;
int type, lang;
{
struct registers reg;
int result;
reg.rg_a = type | lang;
reg.rg_x = mod;
result = _os9 (F_NMLOAD, ®);
errno = reg.rg_b & 0xff;
return (result);
}
/* our own munload using F$UnLoad to unlink the module --REB */
int munload (mod, typelang)
char *mod;
int typelang;
{
struct registers reg;
int result;
reg.rg_a = typelang;
reg.rg_x = mod;
result = _os9 (F_UNLOAD, ®);
errno = reg.rg_b & 0xff;
return (result);
}
#endif