home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #6
/
amigamamagazinepolishissue1998.iso
/
coders
/
jËzyki_programowania
/
oberon
/
system
/
modules.mod
(
.txt
)
< prev
next >
Wrap
Oberon Text
|
1977-12-31
|
1KB
|
36 lines
Syntax10.Scn.Fnt
ParcElems
Alloc
Syntax24b.Scn.Fnt
(* AMIGA *)
MODULE Modules; (* 7-Aug-1993/cn *)
IMPORT
SYSTEM, Amiga, Kernel;
CONST
ModNameLen*=Kernel.ModNameLength;
Command*=PROCEDURE();
Module*=Kernel.Module;
ModuleName*=Kernel.ModuleName;
importing*,imported*:ModuleName;
res*:INTEGER;
PROCEDURE ThisMod*(name:ARRAY OF CHAR):Module;
mod:Module;
BEGIN
COPY(name,importing);
Amiga.ThisMod(
name,SYSTEM.VAL(LONGINT,mod),res,SYSTEM.VAL(LONGINT,Kernel.modules),imported
IF res#0 THEN mod:=NIL; END; (* << CN *)
RETURN mod;
END ThisMod;
PROCEDURE ThisCommand*(mod:Module; name:ARRAY OF CHAR):Command;
cmd:Command;
BEGIN
Amiga.ThisCommand(SYSTEM.VAL(LONGINT,mod),name,SYSTEM.VAL(LONGINT,cmd),res);
RETURN cmd;
END ThisCommand;
PROCEDURE Free*(name:ARRAY OF CHAR; all:BOOLEAN);
BEGIN
Amiga.Free(name,all,res,SYSTEM.VAL(LONGINT,Kernel.modules));
END Free;
END Modules.