$Save Nolist
$IF WORD16
DECLARE
	WORD_16N		LITERALLY	'WORD',
	WORD_16I		LITERALLY	'WORD',
	WORD_16E		LITERALLY	'WORD',
	WORD_16L		LITERALLY	'WORD',
	WORD_16H		LITERALLY	'WORD',
	WORD_16U		LITERALLY	'WORD',
	WORD_32N		LITERALLY	'DWORD',
	WORD_32I		LITERALLY	'DWORD',
	WORD_32E		LITERALLY	'DWORD',
	WORD_32L		LITERALLY	'DWORD',
	WORD_32H		LITERALLY	'DWORD',
	WORD_32U		LITERALLY	'DWORD';
$ELSE
DECLARE
	WORD_16N		LITERALLY	'HWORD',
	WORD_16I		LITERALLY	'HWORD',
	WORD_16E		LITERALLY	'HWORD',
	WORD_16L		LITERALLY	'HWORD',
	WORD_16H		LITERALLY	'HWORD',
	WORD_16U		LITERALLY	'HWORD',
	WORD_32N		LITERALLY	'WORD',
	WORD_32I		LITERALLY	'WORD',
	WORD_32E		LITERALLY	'WORD',
	WORD_32L		LITERALLY	'WORD',
	WORD_32H		LITERALLY	'WORD',
	WORD_32U		LITERALLY	'WORD';
$ENDIF

/************************************************************
*                                                           *
*  External Declarations for all iRMX III System calls       *
*  System calls are grouped by layers                       *
*                                                           *
************************************************************/

DECLARE token LITERALLY 'SELECTOR';

/************************************************************
*                                                           *
*  External Declarations for iRMX III NUCLEUS System calls  *
*                                                           *
************************************************************/

RQ$AcceptControl:
	PROCEDURE(
		region$tok,
		except$ptr) EXTERNAL;
	DECLARE
		region$tok TOKEN,
		except$ptr POINTER;
END RQ$AcceptControl;

RQ$AlterComposite:
	PROCEDURE(
		extension$tok,
		composite,
		component$index,
		replacing$object,
		except$ptr) EXTERNAL;
	DECLARE
		extension$tok TOKEN,
		composite TOKEN,
		component$index WORD_16N,
		replacing$object TOKEN,
		except$ptr POINTER;
END RQ$AlterComposite;

RQ$CatalogObject:
	PROCEDURE(
		job$tok,
		object,
		name,
		except$ptr) EXTERNAL;
	DECLARE
		job$tok TOKEN,
		object TOKEN,
		name POINTER,
		except$ptr POINTER;
END RQ$CatalogObject;

RQ$CreateComposite:
	PROCEDURE(
		type$token,
		compo$list,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		type$token TOKEN,
		compo$list POINTER,
		except$ptr POINTER;
END RQ$CreateComposite;

RQ$CreateExtension:
	PROCEDURE(
		type$code,
		deletion$mbx,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		type$code WORD_16N,
		deletion$mbx TOKEN,
		except$ptr POINTER;
END RQ$CreateExtension;

RQ$CreateJob:
	PROCEDURE(
		dir$size,
		param$obj,
		pool$min,
		pool$max,
		max$objects,
		max$tasks,
		max$prior,
		exception$info$ptr,
		job$flags,
		task$priority,
		start$addr,
		data$seg,
		stack_p,
		stack$size,
		task$flags,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		dir$size WORD_16N,
		param$obj TOKEN,
		pool$min WORD_32N,
		pool$max WORD_32N,
		max$objects WORD_16N,
		max$tasks WORD_16N,
		max$prior BYTE,
		exception$info$ptr POINTER,
		job$flags WORD_16N,
		task$priority BYTE,
		start$addr POINTER,
		data$seg SELECTOR,
		stack_p POINTER,
		stack$size WORD_32N,
		task$flags WORD_16N,
		except$ptr POINTER;
END RQ$CreateJob;

RQ$CreateMailbox:
	PROCEDURE(
		mbx$flags,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		mbx$flags WORD_16N,
		except$ptr POINTER;
END RQ$CreateMailbox;

RQ$CreateRegion:
	PROCEDURE(
		region$flags,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		region$flags WORD_16N,
		except$ptr POINTER;
END RQ$CreateRegion;

RQ$CreateSegment:
	PROCEDURE(
		size,
		except$ptr) SELECTOR EXTERNAL;
	DECLARE
		size WORD_32N,
		except$ptr POINTER;
END RQ$CreateSegment;

RQ$CreateSemaphore:
	PROCEDURE(
		init$value,
		max$value,
		sema$flags,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		init$value WORD_16N,
		max$value WORD_16N,
		sema$flags WORD_16N,
		except$ptr POINTER;
END RQ$CreateSemaphore;

RQ$CreateTask:
	PROCEDURE(
		priority,
		start$addr,
		data$seg,
		stack_p,
		stack$size,
		task$flags,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		priority BYTE,
		start$addr POINTER,
		data$seg SELECTOR,
		stack_p POINTER,
		stack$size WORD_32N,
		task$flags WORD_16N,
		except$ptr POINTER;
END RQ$CreateTask;

RQ$DeleteComposite:
	PROCEDURE(
		extension$tok,
		composite,
		except$ptr) EXTERNAL;
	DECLARE
		extension$tok TOKEN,
		composite TOKEN,
		except$ptr POINTER;
END RQ$DeleteComposite;

RQ$DeleteExtension:
	PROCEDURE(
		extension$tok,
		except$ptr) EXTERNAL;
	DECLARE
		extension$tok TOKEN,
		except$ptr POINTER;
END RQ$DeleteExtension;

RQ$DeleteJob:
	PROCEDURE(
		job$tok,
		except$ptr) EXTERNAL;
	DECLARE
		job$tok TOKEN,
		except$ptr POINTER;
END RQ$DeleteJob;

RQ$DeleteMailbox:
	PROCEDURE(
		mbx,
		except$ptr) EXTERNAL;
	DECLARE
		mbx TOKEN,
		except$ptr POINTER;
END RQ$DeleteMailbox;

RQ$DeleteRegion:
	PROCEDURE(
		region$tok,
		except$ptr) EXTERNAL;
	DECLARE
		region$tok TOKEN,
		except$ptr POINTER;
END RQ$DeleteRegion;

RQ$DeleteSegment:
	PROCEDURE(
		segment$tok,
		except$ptr) EXTERNAL;
	DECLARE
		segment$tok SELECTOR,
		except$ptr POINTER;
END RQ$DeleteSegment;

RQ$DeleteSemaphore:
	PROCEDURE(
		semaphore$tok,
		except$ptr) EXTERNAL;
	DECLARE
		semaphore$tok TOKEN,
		except$ptr POINTER;
END RQ$DeleteSemaphore;

RQ$DeleteTask:
	PROCEDURE(
		task$tok,
		except$ptr) EXTERNAL;
	DECLARE
		task$tok TOKEN,
		except$ptr POINTER;
END RQ$DeleteTask;

RQ$Disable:
	PROCEDURE(
		level,
		except$ptr) EXTERNAL;
	DECLARE
		level WORD_16N,
		except$ptr POINTER;
END RQ$Disable;

RQ$DisableDeletion:
	PROCEDURE(
		object,
		except$ptr) EXTERNAL;
	DECLARE
		object TOKEN,
		except$ptr POINTER;
END RQ$DisableDeletion;

RQ$Enable:
	PROCEDURE(
		level,
		except$ptr) EXTERNAL;
	DECLARE
		level WORD_16N,
		except$ptr POINTER;
END RQ$Enable;

RQ$EnableDeletion:
	PROCEDURE(
		object,
		except$ptr) EXTERNAL;
	DECLARE
		object TOKEN,
		except$ptr POINTER;
END RQ$EnableDeletion;

RQ$EndInitTask:
	PROCEDURE EXTERNAL;
END RQ$EndInitTask;

RQ$EnterInterrupt:
	PROCEDURE(
		level,
		except$ptr) EXTERNAL;
	DECLARE
		level WORD_16N,
		except$ptr POINTER;
END RQ$EnterInterrupt;

RQ$ExitInterrupt:
	PROCEDURE(
		level,
		except$ptr) EXTERNAL;
	DECLARE
		level WORD_16N,
		except$ptr POINTER;
END RQ$ExitInterrupt;

RQ$ForceDelete:
	PROCEDURE(
		extension$tok,
		object,
		except$ptr) EXTERNAL;
	DECLARE
		extension$tok TOKEN,
		object TOKEN,
		except$ptr POINTER;
END RQ$ForceDelete;

RQ$GetExceptionHandler:
	PROCEDURE(
		exception$info$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		exception$info$ptr POINTER,
		except$ptr POINTER;
END RQ$GetExceptionHandler;

RQ$GetLevel:
	PROCEDURE(
		except$ptr) WORD_16N EXTERNAL;
	DECLARE
		except$ptr POINTER;
END RQ$GetLevel;

RQ$GetPoolAttrib:
	PROCEDURE(
		attrib$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		attrib$ptr POINTER,
		except$ptr POINTER;
END RQ$GetPoolAttrib;

RQ$GetPriority:
	PROCEDURE(
		task$tok,
		except$ptr) BYTE EXTERNAL;
	DECLARE
		task$tok TOKEN,
		except$ptr POINTER;
END RQ$GetPriority;

RQ$GetSize:
	PROCEDURE(
		segment$tok,
		except$ptr) WORD_32N EXTERNAL;
	DECLARE
		segment$tok SELECTOR,
		except$ptr POINTER;
END RQ$GetSize;

RQ$GetTaskTokens:
	PROCEDURE(
		selection,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		selection BYTE,
		except$ptr POINTER;
END RQ$GetTaskTokens;

RQ$GetType:
	PROCEDURE(
		object,
		except$ptr) WORD_16N EXTERNAL;
	DECLARE
		object TOKEN,
		except$ptr POINTER;
END RQ$GetType;

RQ$InspectComposite:
	PROCEDURE(
		extension$tok,
		composite,
		token$list,
		except$ptr) EXTERNAL;
	DECLARE
		extension$tok TOKEN,
		composite TOKEN,
		token$list POINTER,
		except$ptr POINTER;
END RQ$InspectComposite;

RQ$LookupObject:
	PROCEDURE(
		job$tok,
		name,
		time$limit,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		job$tok TOKEN,
		name POINTER,
		time$limit WORD_16N,
		except$ptr POINTER;
END RQ$LookupObject;

RQ$Offspring:
	PROCEDURE(
		job$tok,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		job$tok TOKEN,
		except$ptr POINTER;
END RQ$Offspring;

RQ$ReceiveControl:
	PROCEDURE(
		region$tok,
		except$ptr) EXTERNAL;
	DECLARE
		region$tok TOKEN,
		except$ptr POINTER;
END RQ$ReceiveControl;

RQ$ReceiveData:
	PROCEDURE(
		mbx,
		msg$ptr,
		time$limit,
		except$ptr) WORD_16N EXTERNAL;
	DECLARE
		mbx TOKEN,
		msg$ptr POINTER,
		time$limit WORD_16N,
		except$ptr POINTER;
END RQ$ReceiveData;

RQ$ReceiveMessage:
	PROCEDURE(
		mbx,
		time$limit,
		response$xch,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		mbx TOKEN,
		time$limit WORD_16N,
		response$xch POINTER,
		except$ptr POINTER;
END RQ$ReceiveMessage;

RQ$ReceiveUnits:
	PROCEDURE(
		semaphore$tok,
		units,
		time$limit,
		except$ptr) WORD_16N EXTERNAL;
	DECLARE
		semaphore$tok TOKEN,
		units WORD_16N,
		time$limit WORD_16N,
		except$ptr POINTER;
END RQ$ReceiveUnits;

RQ$ResetInterrupt:
	PROCEDURE(
		level,
		except$ptr) EXTERNAL;
	DECLARE
		level WORD_16N,
		except$ptr POINTER;
END RQ$ResetInterrupt;

RQ$ResumeTask:
	PROCEDURE(
		task$tok,
		except$ptr) EXTERNAL;
	DECLARE
		task$tok TOKEN,
		except$ptr POINTER;
END RQ$ResumeTask;

RQ$SendControl:
	PROCEDURE(
		except$ptr) EXTERNAL;
	DECLARE
		except$ptr POINTER;
END RQ$SendControl;

RQ$SendData:
	PROCEDURE(
		mbx,
		msg$ptr,
		msg$len,
		except$ptr) EXTERNAL;
	DECLARE
		mbx TOKEN,
		msg$ptr POINTER,
		msg$len WORD_16N,
		except$ptr POINTER;
END RQ$SendData;

RQ$SendMessage:
	PROCEDURE(
		mbx,
		object,
		response,
		except$ptr) EXTERNAL;
	DECLARE
		mbx TOKEN,
		object TOKEN,
		response TOKEN,
		except$ptr POINTER;
END RQ$SendMessage;

RQ$SendUnits:
	PROCEDURE(
		semaphore$tok,
		units,
		except$ptr) EXTERNAL;
	DECLARE
		semaphore$tok TOKEN,
		units WORD_16N,
		except$ptr POINTER;
END RQ$SendUnits;

RQ$SetExceptionHandler:
	PROCEDURE(
		exception$info$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		exception$info$ptr POINTER,
		except$ptr POINTER;
END RQ$SetExceptionHandler;

RQ$SetInterrupt:
	PROCEDURE(
		level,
		int$task$flag,
		int$handler$addr,
		int$handler$DS,
		except$ptr) EXTERNAL;
	DECLARE
		level WORD_16N,
		int$task$flag WORD_16N,
		int$handler$addr POINTER,
		int$handler$DS SELECTOR,
		except$ptr POINTER;
END RQ$SetInterrupt;

RQ$SetPoolMin:
	PROCEDURE(
		new$min,
		except$ptr) EXTERNAL;
	DECLARE
		new$min WORD_32N,
		except$ptr POINTER;
END RQ$SetPoolMin;

RQ$SetPriority:
	PROCEDURE(
		task$tok,
		priority,
		except$ptr) EXTERNAL;
	DECLARE
		task$tok TOKEN,
		priority BYTE,
		except$ptr POINTER;
END RQ$SetPriority;

RQE$SetMaxPriority:
	PROCEDURE(
		job$tok,
		max$priority,
		except$ptr) EXTERNAL;
	DECLARE
		job$tok TOKEN,
		max$priority BYTE,
		except$ptr POINTER;
END RQE$SetMaxPriority;

RQ$SignalException:
	PROCEDURE(
		exception$code,
		param$num,
		stack_p,
		primitive,
		npx$status,
		except$ptr) EXTERNAL;
	DECLARE
		exception$code WORD_16N,
		param$num BYTE,
		stack_p WORD_32N,
		primitive WORD_16N,
		npx$status WORD_16N,
		except$ptr POINTER;
END RQ$SignalException;

RQ$SignalInterrupt:
	PROCEDURE(
		level,
		except$ptr) EXTERNAL;
	DECLARE
		level WORD_16N,
		except$ptr POINTER;
END RQ$SignalInterrupt;

RQ$Sleep:
	PROCEDURE(
		time$limit,
		except$ptr) EXTERNAL;
	DECLARE
		time$limit WORD_16N,
		except$ptr POINTER;
END RQ$Sleep;

RQ$SuspendTask:
	PROCEDURE(
		task$tok,
		except$ptr) EXTERNAL;
	DECLARE
		task$tok TOKEN,
		except$ptr POINTER;
END RQ$SuspendTask;

RQE$TimedInterrupt:
	PROCEDURE(
		level,
		time$limit,
		except$ptr) EXTERNAL;
	DECLARE
		level WORD_16N,
		time$limit WORD_16N,
		except$ptr POINTER;
END RQE$TimedInterrupt;

RQ$UnCatalogObject:
	PROCEDURE(
		job$tok,
		name,
		except$ptr) EXTERNAL;
	DECLARE
		job$tok TOKEN,
		name POINTER,
		except$ptr POINTER;
END RQ$UnCatalogObject;

RQ$WaitInterrupt:
	PROCEDURE(
		level,
		except$ptr) EXTERNAL;
	DECLARE
		level WORD_16N,
		except$ptr POINTER;
END RQ$WaitInterrupt;

RQE$ChangeDescriptor:
	PROCEDURE(
		desc,
		phys$addr,
		size,
		except$ptr) EXTERNAL;
	DECLARE
		desc TOKEN,
		phys$addr WORD_32N,
		size WORD_32N,
		except$ptr POINTER;
END RQE$ChangeDescriptor;

RQE$ChangeObjectAccess:
	PROCEDURE(
		obj_tok,
		access,
		limit$mode,
		except$ptr) EXTERNAL;
	DECLARE
		obj_tok TOKEN,
		access BYTE,
		limit$mode BYTE,
		except$ptr POINTER;
END RQE$ChangeObjectAccess;

RQE$CreateDescriptor:
	PROCEDURE(
		phys$addr,
		size,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		phys$addr WORD_32N,
		size WORD_32N,
		except$ptr POINTER;
END RQE$CreateDescriptor;

RQE$CreateJob:
	PROCEDURE(
		dir$size,
		param$obj,
		pool$min,
		pool$max,
		max$objects,
		max$tasks,
		max$prior,
		exception$info$ptr,
		job$flags,
		task$priority,
		start$addr,
		data$seg,
		stack_p,
		stack$size,
		task$flags,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		dir$size WORD_16N,
		param$obj TOKEN,
		pool$min WORD_32N,
		pool$max WORD_32N,
		max$objects WORD_16N,
		max$tasks WORD_16N,
		max$prior BYTE,
		exception$info$ptr POINTER,
		job$flags WORD_16N,
		task$priority BYTE,
		start$addr POINTER,
		data$seg SELECTOR,
		stack_p POINTER,
		stack$size WORD_32N,
		task$flags WORD_16N,
		except$ptr POINTER;
END RQE$CreateJob;

RQE$DeleteDescriptor:
	PROCEDURE(
		desc,
		except$ptr) EXTERNAL;
	DECLARE
		desc TOKEN,
		except$ptr POINTER;
END RQE$DeleteDescriptor;

RQE$GetAddress:
	PROCEDURE(
		logic$addr,
		except$ptr) WORD_32N EXTERNAL;
	DECLARE
		logic$addr POINTER,
		except$ptr POINTER;
END RQE$GetAddress;

RQE$GetObjectAccess:
	PROCEDURE(
		obj_tok,
		access_p,
		except$ptr) EXTERNAL;
	DECLARE
		obj_tok TOKEN,
		access_p POINTER,
		except$ptr POINTER;
END RQE$GetObjectAccess;

RQE$GetPoolAttrib:
	PROCEDURE(
		attrib$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		attrib$ptr POINTER,
		except$ptr POINTER;
END RQE$GetPoolAttrib;

RQE$Offspring:
	PROCEDURE(
		job$tok,
		list$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		job$tok TOKEN,
		list$ptr POINTER,
		except$ptr POINTER;
END RQE$Offspring;

RQE$SetOSextension:
	PROCEDURE(
		gate$num,
		start$addr,
		except$ptr) EXTERNAL;
	DECLARE
		gate$num WORD_16N,
		start$addr POINTER,
		except$ptr POINTER;
END RQE$SetOSextension;

rq$create$buffer$pool: PROCEDURE(max$bufs, flags, excep$p) TOKEN EXTERNAL;
DECLARE	max$bufs	WORD_16N;
DECLARE	flags		WORD_16N;
DECLARE	excep$p		POINTER;
END rq$create$buffer$pool;

rq$delete$buffer$pool: PROCEDURE(buffer$pool, excep$p) EXTERNAL;
DECLARE	buffer$pool	TOKEN;
DECLARE	excep$p		POINTER;
END rq$delete$buffer$pool;

rq$request$buffer: PROCEDURE(pool$t, size, excep$p) TOKEN EXTERNAL;
DECLARE	pool$t		TOKEN;
DECLARE	size		WORD_32N;
DECLARE	excep$p		POINTER;
END rq$request$buffer;

rq$release$buffer: PROCEDURE(pool$t, buf$p, flags, excep$p) EXTERNAL;
DECLARE	pool$t		TOKEN;
DECLARE	buf$p		TOKEN;
DECLARE	flags		WORD_16N;
DECLARE	excep$p		POINTER;
END rq$release$buffer;

rq$get$interconnect: PROCEDURE(board$id, reg$id, excep$p) BYTE EXTERNAL;
DECLARE	board$id	BYTE;
DECLARE	reg$id		WORD_16N;
DECLARE	excep$p		POINTER;
END rq$get$interconnect;

rq$set$interconnect: PROCEDURE(value, slot, register, excep$p) EXTERNAL;
DECLARE	value		BYTE;
DECLARE	slot		BYTE;
DECLARE	register	WORD_16N;
DECLARE	excep$p		POINTER;
END rq$set$interconnect;

rq$attach$buffer$pool: PROCEDURE( buffer$pool, port$t, excep$p ) EXTERNAL;

	DECLARE buffer$pool		TOKEN,
			port$t			TOKEN,
			excep$p			POINTER;

END rq$attach$buffer$pool;

rq$attach$port: PROCEDURE( source$port, sink$port, excep$p ) EXTERNAL;

	DECLARE source$port		TOKEN,
			sink$port		TOKEN,
			excep$p			POINTER;

END rq$attach$port;

rq$broadcast: PROCEDURE( source, socket, control$p, excep$p ) EXTERNAL;
			
	DECLARE	source			TOKEN,
			socket			WORD_32N,
			control$p		POINTER,
			excep$p			POINTER;

END rq$broadcast;

rq$cancel: PROCEDURE( source, trans$id, excep$p ) EXTERNAL;
			
	DECLARE	source			TOKEN,
			trans$id		WORD_16N,
			excep$p			POINTER;

END rq$cancel;

rq$connect: PROCEDURE( local$end, remote$end, excep$p ) EXTERNAL;

	DECLARE local$end		TOKEN,
			remote$end		WORD_32N,
			excep$p			POINTER;

END rq$connect;

rq$create$port: PROCEDURE( queue$size, info$p, excep$p ) TOKEN EXTERNAL;

	DECLARE queue$size		WORD_16N,
			info$p			POINTER,
			excep$p			POINTER;

END rq$create$port;

rq$delete$port: PROCEDURE( port, excep$p ) EXTERNAL;

	DECLARE port			TOKEN,
			excep$p			POINTER;

END rq$delete$port;

rq$detach$buffer$pool: PROCEDURE( port, excep$p ) TOKEN EXTERNAL;

	DECLARE port			TOKEN,
			excep$p			POINTER;

END rq$detach$buffer$pool;

rq$detach$port: PROCEDURE( port, excep$p ) EXTERNAL;

	DECLARE port			TOKEN,
			excep$p			POINTER;

END rq$detach$port;

rq$get$host$id: PROCEDURE( excep$p ) WORD_16N EXTERNAL;

	DECLARE excep$p			POINTER;

END rq$get$host$id;

rq$get$port$attributes: PROCEDURE( port, info$p, excep$p ) EXTERNAL;

	DECLARE port			TOKEN,
			info$p			POINTER,
			excep$p			POINTER;

END rq$get$port$attributes;

rq$receive$fragment: PROCEDURE( destination, socket, rsvp$trans$id, 
								fragment$p, fragment$length, 
								flags, excep$p ) EXTERNAL;
			
	DECLARE	destination		TOKEN,
			socket			WORD_32N,
			rsvp$trans$id	WORD_16N,
			fragment$p		POINTER,
			fragment$length	WORD_32N,
			flags			WORD_16N,
			excep$p			POINTER;

END rq$receive$fragment;

rq$receive$reply: PROCEDURE( destination, rsvp$trans$id, 
							 time$limit, info$p, excep$p ) POINTER EXTERNAL;
			
	DECLARE	destination		TOKEN,
			rsvp$trans$id	WORD_16N,
			time$limit		WORD_16N,
			info$p			POINTER,
			excep$p			POINTER;

END rq$receive$reply;

rq$receive: PROCEDURE( destination, 
					   time$limit, info$p, excep$p ) POINTER EXTERNAL;
			
	DECLARE	destination		TOKEN,
			time$limit		WORD_16N,
			info$p			POINTER,
			excep$p			POINTER;

END rq$receive;

rq$send: PROCEDURE( source, socket, control$p, data$p, data$length,
						flags, excep$p) WORD_16N EXTERNAL;

	DECLARE	source			TOKEN,
			socket			WORD_32N,
			control$p		POINTER,
			data$p			POINTER,
			data$length		WORD_32N,
			flags			WORD_16N,
			excep$p			POINTER;

END rq$send;

rq$send$reply: PROCEDURE( source, socket, rsvp$trans$id, control$p, data$p,
							data$length, flags, excep$p ) WORD_16N EXTERNAL;

	DECLARE	source			TOKEN,
			socket			WORD_32N,
			rsvp$trans$id	WORD_16N,
			control$p		POINTER,
			data$p			POINTER,
			data$length		WORD_32N,
			flags			WORD_16N,
			excep$p			POINTER;

END rq$send$reply;

rq$send$rsvp: PROCEDURE( source, socket, control$p, data$p, data$length, 
							rsvp$data$p, rsvp$data$length, 
							flags, excep$p ) WORD_16N EXTERNAL;

	DECLARE	source				TOKEN,
			socket				WORD_32N,
			control$p			POINTER,
			data$p				POINTER,
			data$length			WORD_32N,
			rsvp$data$p			POINTER,
			rsvp$data$length	WORD_32N,
			flags				WORD_16N,
			excep$p				POINTER;

END rq$send$rsvp;

rq$send$signal: PROCEDURE ( port$t, 
                            except$ptr) EXTERNAL;

DECLARE port$t          TOKEN,
        except$ptr      POINTER;

END rq$send$signal;

rq$receive$signal: PROCEDURE ( port$t,
                               time$limit,
                               except$ptr) EXTERNAL;

DECLARE port$t          TOKEN,
        time$limit      WORD_16N,
        except$ptr      POINTER;

END rq$receive$signal;

/************************************************************
*                                                           *
*  External Declarations for iRMX III BIOS System calls     *
*                                                           *
************************************************************/

RQ$A$AttachFile:
	PROCEDURE(
		user$t,
		prefix,
		subpath,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		user$t TOKEN,
		prefix TOKEN,
		subpath POINTER,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$AttachFile;

RQ$A$ChangeAccess:
	PROCEDURE(
		user,
		prefix,
		subpath$ptr,
		id,
		access,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		user TOKEN,
		prefix TOKEN,
		subpath$ptr POINTER,
		id WORD_16I,
		access BYTE,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$ChangeAccess;

RQ$A$Close:
	PROCEDURE(
		connection$t,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		connection$t TOKEN,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$Close;

RQ$A$CreateDirectory:
	PROCEDURE(
		user$t,
		prefix,
		subpath,
		access,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		user$t TOKEN,
		prefix TOKEN,
		subpath POINTER,
		access BYTE,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$CreateDirectory;

RQ$A$CreateFile:
	PROCEDURE(
		user$t,
		prefix,
		subpath,
		access,
		granularity,
		size,
		must$create,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		user$t TOKEN,
		prefix TOKEN,
		subpath POINTER,
		access BYTE,
		granularity WORD_16I,
		size WORD_32I,
		must$create BYTE,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$CreateFile;

RQ$A$DeleteConnection:
	PROCEDURE(
		connection$t,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		connection$t TOKEN,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$DeleteConnection;

RQ$A$DeleteFile:
	PROCEDURE(
		user$t,
		prefix,
		subpath,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		user$t TOKEN,
		prefix TOKEN,
		subpath POINTER,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$Delete$file;

RQ$A$GetConnectionStatus:
	PROCEDURE(
		conn,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		conn TOKEN,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$GetConnectionStatus;

RQ$A$GetDirectoryEntry:
	PROCEDURE(
		conn,
		entry$num,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		conn TOKEN,
		resp$mbox TOKEN,
		entry$num WORD_16I,
		except$ptr POINTER;
END RQ$A$GetDirectoryEntry;

RQ$A$GetExtensionData:
	PROCEDURE(
		conn,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		conn TOKEN,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$GetExtensionData;

RQ$A$GetFileStatus:
	PROCEDURE(
		connection$t,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		connection$t TOKEN,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$GetFileStatus;

RQ$A$GetPathComponent:
	PROCEDURE(
		conn,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		conn TOKEN,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$GetPathComponent;

RQ$Install$DUIBs:
	PROCEDURE(
		count,
		duib$table$p,
		aux$p,
		except$ptr) EXTERNAL;
	DECLARE
		count WORD_16I,
		duib$table$p POINTER,
		aux$p POINTER,
		except$ptr POINTER;
END RQ$Install$DUIBs;

RQ$A$Open:
	PROCEDURE(
		connection$t,
		mode,
		share,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		connection$t TOKEN,
		mode BYTE,
		share BYTE,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$Open;

RQ$A$PhysicalAttachDevice:
	PROCEDURE(
		dev$name,
		file$driver,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		dev$name POINTER,
		file$driver BYTE,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$PhysicalAttachDevice;

RQ$A$PhysicalDetachDevice:
	PROCEDURE(
		connection$t,
		hard,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		connection$t TOKEN,
		hard BYTE,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$PhysicalDetachDevice;

RQ$A$Read:
	PROCEDURE(
		conn,
		buff$Ptr,
		count,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		conn TOKEN,
		resp$mbox TOKEN,
		buff$ptr POINTER,
		count WORD_32I,
		except$ptr POINTER;
END RQ$A$Read;

RQ$A$RenameFile:
	PROCEDURE(
		connection$t,
		user$t,
		prefix,
		subpath,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		connection$t TOKEN,
		user$t TOKEN,
		prefix TOKEN,
		subpath POINTER,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$RenameFile;

RQ$A$Seek:
	PROCEDURE(
		connection$t,
		mode,
		ptr$move,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		connection$t TOKEN,
		mode BYTE,
		ptr$move WORD_32I,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$Seek;

RQ$A$SetExtensionData:
	PROCEDURE(
		conn,
		data$ptr,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		conn TOKEN,
		resp$mbox TOKEN,
		data$ptr POINTER,
		except$ptr POINTER;
END RQ$A$SetExtensionData;

RQ$A$Special:
	PROCEDURE(
		connection$t,
		spec$func,
		ioparm$ptr,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		connection$t TOKEN,
		spec$func WORD_16I,
		ioparm$ptr POINTER,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$Special;

RQ$A$Truncate:
	PROCEDURE(
		connection$t,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		connection$t TOKEN,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$Truncate;

RQ$A$Update:
	PROCEDURE(
		conn,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		conn TOKEN,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$Update;

RQ$A$Write:
	PROCEDURE(
		conn,
		buff$ptr,
		count,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		conn TOKEN,
		resp$mbox TOKEN,
		buff$ptr POINTER,
		count WORD_32I,
		except$ptr POINTER;
END RQ$A$Write;

RQ$CreateUser:
	PROCEDURE(
		ids$ptr,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		ids$ptr POINTER,
		except$ptr POINTER;
END RQ$CreateUser;

RQ$DeleteUser:
	PROCEDURE(
		user,
		except$ptr) EXTERNAL;
	DECLARE
		user TOKEN,
		except$ptr POINTER;
END RQ$DeleteUser;

RQ$Encrypt:
	PROCEDURE(
		password$ptr,
		key$ptr,
		encryption$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		password$ptr POINTER,
		key$ptr POINTER,
		encryption$ptr POINTER,
		except$ptr POINTER;
END RQ$Encrypt;

RQ$GetDefaultPrefix:
	PROCEDURE(
		job$t,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		job$t TOKEN,
		except$ptr POINTER;
END RQ$GetDefaultPrefix;

RQ$GetDefaultUser:
	PROCEDURE(
		job$t,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		job$t TOKEN,
		except$ptr POINTER;
END RQ$GetDefaultUser;

RQ$GetGlobalTime:
	PROCEDURE(
		date$time$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		date$time$ptr POINTER,
		except$ptr POINTER;
END RQ$GetGlobalTime;

RQ$GetTime:
	PROCEDURE(
		except$ptr) WORD_32I EXTERNAL;
	DECLARE
		except$ptr POINTER;
END RQ$GetTime;

RQ$InspectUser:
	PROCEDURE(
		user$t,
		ids$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		user$t TOKEN,
		ids$ptr POINTER,
		except$ptr POINTER;
END RQ$InspectUser;

RQ$SetDefaultPrefix:
	PROCEDURE(
		job$t,
		prefix,
		except$ptr) EXTERNAL;
	DECLARE
		job$t TOKEN,
		prefix TOKEN,
		except$ptr POINTER;
END RQ$SetDefaultPrefix;

RQ$SetDefaultUser:
	PROCEDURE(
		job$t,
		user$t,
		except$ptr) EXTERNAL;
	DECLARE
		job$t TOKEN,
		user$t TOKEN,
		except$ptr POINTER;
END RQ$SetDefaultUser;

RQ$SetGlobalTime:
	PROCEDURE(
		date$time$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		date$time$ptr POINTER,
		except$ptr POINTER;
END RQ$SetGlobalTime;

RQ$SetTime:
	PROCEDURE(
		date$time,
		except$ptr) EXTERNAL;
	DECLARE
		date$time WORD_32I,
		except$ptr POINTER;
END RQ$SetTime;

RQ$WaitIo:
	PROCEDURE(
		connection$t,
		resp$mbox,
		time$limit,
		except$ptr) WORD_32I EXTERNAL;
	DECLARE
		connection$t TOKEN,
		resp$mbox TOKEN,
		time$limit WORD_16I,
		except$ptr POINTER;
END RQ$WaitIo;

/************************************************************
*                                                           *
*  External Declarations for iRMX III EIOS System calls     *
*                                                           *
************************************************************/

RQ$CreateIoJob:
	PROCEDURE(
		pool$min,
		pool$max,
		except$handler,
		job$flags,
		task$priority,
		start$address,
		data$seg,
		stack$ptr,
		stack$size,
		task$flags,
		msg$mbox,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		pool$min WORD_32E,
		pool$max WORD_32E,
		except$handler POINTER,
		job$flags WORD_16E,
		task$priority BYTE,
		start$address POINTER,
		data$seg SELECTOR,
		stack$ptr POINTER,
		stack$size WORD_32E,
		task$flags WORD_16E,
		msg$mbox TOKEN,
		except$ptr POINTER;
END RQ$CreateIoJob;

RQ$ExitIoJob:
	PROCEDURE(
		user$fault$code,
		return$data$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		user$fault$code WORD_16E,
		return$data$ptr POINTER,
		except$ptr POINTER;
END RQ$ExitIoJob;

RQ$GetLogicalDeviceStatus:
	PROCEDURE(
		log$name$ptr,
		dev$info$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		log$name$ptr POINTER,
		dev$info$ptr POINTER,
		except$ptr POINTER;
END RQ$GetLogicalDeviceStatus;

RQ$GetUserIds:
	PROCEDURE(
		name$ptr,
		ids$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		name$ptr POINTER,
		ids$ptr POINTER,
		except$ptr POINTER;
END RQ$GetUserIds;

RQ$HybridDetachDevice:
	PROCEDURE(
		log$name$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		log$name$ptr POINTER,
		except$ptr POINTER;
END RQ$HybridDetachDevice;

RQ$LogicalAttachDevice:
	PROCEDURE(
		log$name$ptr,
		dev$name,
		file$driver,
		except$ptr) EXTERNAL;
	DECLARE
		log$name$ptr POINTER,
		dev$name POINTER,
		file$driver BYTE,
		except$ptr POINTER;
END RQ$LogicalAttachDevice;

RQ$LogicalDetachDevice:
	PROCEDURE(
		log$name$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		log$name$ptr POINTER,
		except$ptr POINTER;
END RQ$LogicalDetachDevice;

RQ$S$AttachFile:
	PROCEDURE(
		path$ptr,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		path$ptr POINTER,
		except$ptr POINTER;
END RQ$S$AttachFile;

RQ$S$CatalogConnection:
	PROCEDURE(
		job$t,
		connection$t,
		log$name$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		job$t TOKEN,
		connection$t TOKEN,
		log$name$ptr POINTER,
		except$ptr POINTER;
END RQ$S$CatalogConnection;

RQ$S$ChangeAccess:
	PROCEDURE(
		path$ptr,
		id,
		access,
		except$ptr) EXTERNAL;
	DECLARE
		path$ptr POINTER,
		id WORD_16E,
		access BYTE,
		except$ptr POINTER;
END RQ$S$ChangeAccess;

RQ$S$Close:
	PROCEDURE(
		connection$t,
		except$ptr) EXTERNAL;
	DECLARE
		connection$t TOKEN,
		except$ptr POINTER;
END RQ$S$Close;

RQ$S$CreateDirectory:
	PROCEDURE(
		path$ptr,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		path$ptr POINTER,
		except$ptr POINTER;
END RQ$S$CreateDirectory;

RQ$S$CreateFile:
	PROCEDURE(
		path$ptr,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		path$ptr POINTER,
		except$ptr POINTER;
END RQ$S$CreateFile;

RQ$S$DeleteConnection:
	PROCEDURE(
		connection$t,
		except$ptr) EXTERNAL;
	DECLARE
		connection$t TOKEN,
		except$ptr POINTER;
END RQ$S$DeleteConnection;

RQ$S$DeleteFile:
	PROCEDURE(
		path$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		path$ptr POINTER,
		except$ptr POINTER;
END RQ$S$DeleteFile;

RQ$S$GetConnectionStatus:
	PROCEDURE(
		connection$t,
		info$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		connection$t TOKEN,
		info$ptr POINTER,
		except$ptr POINTER;
END RQ$S$GetConnectionStatus;

RQ$S$GetDirectoryEntry:
	PROCEDURE(
		dir$name$ptr,
		entry$num,
		name$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		dir$name$ptr POINTER,
		entry$num WORD_16E,
		name$ptr POINTER,
		except$ptr POINTER;
END RQ$S$GetDirectoryEntry;

RQ$S$GetFileStatus:
	PROCEDURE(
		path$ptr,
		info$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		path$ptr POINTER,
		info$ptr POINTER,
		except$ptr POINTER;
END RQ$S$GetFileStatus;

RQ$S$GetPathComponent:
	PROCEDURE(
		connection$t,
		name$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		connection$t TOKEN,
		name$ptr POINTER,
		except$ptr POINTER;
END RQ$S$GetPathComponent;

RQ$S$LookupConnection:
	PROCEDURE(
		log$name$ptr,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		log$name$ptr POINTER,
		except$ptr POINTER;
END RQ$S$LookupConnection;

RQ$S$Open:
	PROCEDURE(
		connection$t,
		mode,
		num$buf,
		except$ptr) EXTERNAL;
	DECLARE
		connection$t TOKEN,
		mode BYTE,
		num$buf BYTE,
		except$ptr POINTER;
END RQ$S$Open;

RQ$S$ReadMove:
	PROCEDURE(
		connection$t,
		buf$ptr,
		bytes$desired,
		except$ptr) WORD_32E EXTERNAL;
	DECLARE
		connection$t TOKEN,
		buf$ptr POINTER,
		bytes$desired WORD_32E,
		except$ptr POINTER;
END RQ$S$ReadMove;

RQ$S$RenameFile:
	PROCEDURE(
		path$ptr,
		new$path$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		path$ptr POINTER,
		new$path$ptr POINTER,
		except$ptr POINTER;
END RQ$S$RenameFile;

RQ$S$Seek:
	PROCEDURE(
		connection$t,
		mode,
		move$count,
		except$ptr) EXTERNAL;
	DECLARE
		connection$t TOKEN,
		mode BYTE,
		move$count WORD_32E,
		except$ptr POINTER;
END RQ$S$Seek;

RQ$S$Special:
	PROCEDURE(
		connection$t,
		spec$func,
		data$ptr,
		iors$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		connection$t TOKEN,
		spec$func WORD_16E,
		data$ptr POINTER,
		iors$ptr POINTER,
		except$ptr POINTER;
END RQ$S$Special;

RQ$S$TruncateFile:
	PROCEDURE(
		connection$t,
		except$ptr) EXTERNAL;
	DECLARE
		connection$t TOKEN,
		except$ptr POINTER;
END RQ$S$TruncateFile;

RQ$S$UncatalogConnection:
	PROCEDURE(
		job_t,
		log$name$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		job_t TOKEN,
		log$name$ptr POINTER,
		except$ptr POINTER;
END RQ$S$UncatalogConnection;

RQ$S$WriteMove:
	PROCEDURE(
		connection$t,
		buff$ptr,
		count,
		except$ptr) WORD_32E EXTERNAL;
	DECLARE
		connection$t TOKEN,
		buff$ptr POINTER,
		count WORD_32E,
		except$ptr POINTER;
END RQ$S$WriteMove;

RQ$StartIoJob:
	PROCEDURE(
		job$t,
		except$ptr) EXTERNAL;
	DECLARE
		job$t TOKEN,
		except$ptr POINTER;
END RQ$StartIoJob;

RQ$VerifyUser:
	PROCEDURE(
		user$t,
		name$ptr,
		password$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		user$t TOKEN,
		name$ptr POINTER,
		password$ptr POINTER,
		except$ptr POINTER;
END RQ$VerifyUser;

RQE$CreateIoJob:
	PROCEDURE(
		pool$min,
		pool$max,
		except$handler,
		job$flags,
		task$priority,
		start$address,
		data$seg,
		stack$ptr,
		stack$size,
		task$flags,
		msg$mbox,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		pool$min WORD_32E,
		pool$max WORD_32E,
		except$handler POINTER,
		job$flags WORD_16E,
		task$priority BYTE,
		start$address POINTER,
		data$seg SELECTOR,
		stack$ptr POINTER,
		stack$size WORD_32E,
		task$flags WORD_16E,
		msg$mbox TOKEN,
		except$ptr POINTER;
END RQE$CreateIoJob;

/************************************************************
*                                                           *
*  External Declarations for iRMX III LOADER System calls   *
*                                                           *
************************************************************/

RQ$A$Load:
	PROCEDURE(
		conn,
		resp$mbox,
		except$ptr) EXTERNAL;
	DECLARE
		conn TOKEN,
		resp$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$Load;

RQ$A$LoadIoJob:
	PROCEDURE(
		conn,
		pool$min,
		pool$max,
		except$handler,
		job$flags,
		task$pri,
		task$flags,
		msg$mbox,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		conn TOKEN,
		pool$min WORD_32L,
		pool$max WORD_32L,
		except$handler POINTER,
		job$flags WORD_16L,
		task$pri BYTE,
		task$flags WORD_16L,
		msg$mbox TOKEN,
		except$ptr POINTER;
END RQ$A$LoadIoJob;

RQ$S$LoadIoJob:
	PROCEDURE(
		path$ptr,
		pool$min,
		pool$max,
		except$handler,
		job$flags,
		task$pri,
		task$flags,
		msg$mbox,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		path$ptr POINTER,
		pool$min WORD_32L,
		pool$max WORD_32L,
		except$handler POINTER,
		job$flags WORD_16L,
		task$pri BYTE,
		task$flags WORD_16L,
		msg$mbox TOKEN,
		except$ptr POINTER;
END RQ$S$LoadIoJob;

RQ$S$Overlay:
	PROCEDURE(
		name$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		name$ptr POINTER,
		except$ptr POINTER;
END RQ$S$Overlay;

RQE$A$LoadIoJob:
	PROCEDURE(
		conn,
		pool$min,
		pool$max,
		except$handler,
		job$flags,
		task$pri,
		task$flags,
		msg$mbox,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		conn TOKEN,
		pool$min WORD_32L,
		pool$max WORD_32L,
		except$handler POINTER,
		job$flags WORD_16L,
		task$pri BYTE,
		task$flags WORD_16L,
		msg$mbox TOKEN,
		except$ptr POINTER;
END RQE$A$LoadIoJob;

RQE$S$LoadIoJob:
	PROCEDURE(
		path$ptr,
		pool$min,
		pool$max,
		except$handler,
		job$flags,
		task$pri,
		task$flags,
		msg$mbox,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		path$ptr POINTER,
		pool$min WORD_32L,
		pool$max WORD_32L,
		except$handler POINTER,
		job$flags WORD_16L,
		task$pri BYTE,
		task$flags WORD_16L,
		msg$mbox TOKEN,
		except$ptr POINTER;
END RQE$S$LoadIoJob;

/************************************************************
*                                                           *
*  External Declarations for iRMX III HI System calls       *
*                                                           *
************************************************************/

RQ$C$BackupChar:
	PROCEDURE(
		except$ptr) EXTERNAL;
	DECLARE
		except$ptr POINTER;
END RQ$C$BackupChar;

RQ$C$CreateCommandConnection:
	PROCEDURE(
		ci,
		co,
		reserved$word,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		ci TOKEN,
		co TOKEN,
		reserved$word WORD_16H,
		except$ptr POINTER;
END RQ$C$CreateCommandConnection;

RQ$C$DeleteCommandConnection:
	PROCEDURE(
		command$conn,
		except$ptr) EXTERNAL;
	DECLARE
		command$conn TOKEN,
		except$ptr POINTER;
END RQ$C$DeleteCommandConnection;

RQ$C$FormatException:
	PROCEDURE(
		buff$ptr,
		buff$max,
		exception$code,
		brevity,
		except$ptr) EXTERNAL;
	DECLARE
		buff$ptr POINTER,
		buff$max WORD_16H,
		exception$code WORD_16H,
		brevity BYTE,
		except$ptr POINTER;
END RQ$C$FormatException;

RQ$C$GetChar:
	PROCEDURE(
		except$ptr) BYTE EXTERNAL;
	DECLARE
		except$ptr POINTER;
END RQ$C$GetChar;

RQ$C$GetCommandName:
	PROCEDURE(
		path$name$ptr,
		path$name$max,
		except$ptr) EXTERNAL;
	DECLARE
		path$name$ptr POINTER,
		path$name$max WORD_16H,
		except$ptr POINTER;
END RQ$C$GetCommandName;

RQ$C$GetInputConnection:
	PROCEDURE(
		name$ptr,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		name$ptr POINTER,
		except$ptr POINTER;
END RQ$C$GetInputConnection;

RQ$C$GetInputPathname:
	PROCEDURE(
		path$name$ptr,
		path$name$max,
		except$ptr) EXTERNAL;
	DECLARE
		path$name$ptr POINTER,
		path$name$max WORD_16H,
		except$ptr POINTER;
END RQ$C$GetInputPathname;

RQ$C$GetInputPathnameNoWc:
	PROCEDURE(
		path$name$ptr,
		path$name$max,
		except$ptr) EXTERNAL;
	DECLARE
		path$name$ptr POINTER,
		path$name$max WORD_16H,
		except$ptr POINTER;
END RQ$C$GetInputPathnameNoWc;

RQ$C$GetOutputConnection:
	PROCEDURE(
		name$ptr,
		preposition,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		name$ptr POINTER,
		preposition BYTE,
		except$ptr POINTER;
END RQ$C$GetOutputConnection;

RQ$C$GetOutputPathname:
	PROCEDURE(
		path$name$ptr,
		path$name$max,
		dafault$output$ptr,
		except$ptr) BYTE EXTERNAL;
	DECLARE
		path$name$ptr POINTER,
		path$name$max WORD_16H,
		dafault$output$ptr POINTER,
		except$ptr POINTER;
END RQ$C$GetOutputPathname;

RQ$C$GetParameter:
	PROCEDURE(
		name$ptr,
		name$max,
		value$ptr,
		value$max,
		index$ptr,
		predict$list$ptr,
		except$ptr) BYTE EXTERNAL;
	DECLARE
		name$ptr POINTER,
		name$max WORD_16H,
		value$ptr POINTER,
		value$max WORD_16H,
		index$ptr POINTER,
		predict$list$ptr POINTER,
		except$ptr POINTER;
END RQ$C$GetParameter;

RQE$C$Load$io$Job:	
	PROCEDURE(
		path$name$p, 
		pool$min, 
		pool$max, 
		except$handler,
		job$flags, 
		task$priority, 
		task$flags, 
		msg$mbox, 
		cl$p, 
		cl$length, 
		excep$p) EXTERNAL;
	DECLARE
		path$name$p POINTER,
		pool$min WORD_32H,
		pool$max WORD_32H,
		except$handler POINTER,
		job$flags WORD_16H,
		task$priority BYTE,
		task$flags WORD_16H,
		msg$mbox TOKEN,
		cl$p POINTER,
		cl$length WORD_16H,
		excep$p POINTER;
END RQE$C$Load$io$Job;

RQ$C$SendCoResponse:
	PROCEDURE(
		response$ptr,
		response$max,
		message$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		response$ptr POINTER,
		response$max WORD_16H,
		message$ptr POINTER,
		except$ptr POINTER;
END RQ$C$SendCoResponse;

RQ$C$SendCommand:
	PROCEDURE(
		command$conn,
		line$ptr,
		command$except$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		command$conn TOKEN,
		line$ptr POINTER,
		command$except$ptr POINTER,
		except$ptr POINTER;
END RQ$C$SendCommand;

RQ$C$SendEoResponse:
	PROCEDURE(
		response$ptr,
		response$max,
		message$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		response$ptr POINTER,
		response$max WORD_16H,
		message$ptr POINTER,
		except$ptr POINTER;
END RQ$C$SendEoResponse;

RQ$C$SetControlC:
	PROCEDURE(
		sema,
		except$ptr) EXTERNAL;
	DECLARE
		sema TOKEN,
		except$ptr POINTER;
END RQ$C$SetControlC;

RQ$C$SetParseBuffer:
	PROCEDURE(
		buff$ptr,
		buff$max,
		except$ptr) WORD_32H EXTERNAL;
	DECLARE
		buff$ptr POINTER,
		buff$max WORD_16H,
		except$ptr POINTER;
END RQ$C$SetParseBuffer;

/************************************************************
*                                                           *
*  External Declarations for iRMX III UDI System calls      *
*                                                           *
************************************************************/

DQ$Allocate:
	PROCEDURE(
		siz,
		except$ptr) SELECTOR EXTERNAL;
	DECLARE
		siz WORD_16U,
		except$ptr POINTER;
END DQ$Allocate;

DQ$Attach:
	PROCEDURE(
		path$ptr,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		path$ptr POINTER,
		except$ptr POINTER;
END DQ$Attach;

DQ$ChangeAccess:
	PROCEDURE(
		path$ptr,
		class,
		access,
		except$ptr) EXTERNAL;
	DECLARE
		path$ptr POINTER,
		class BYTE,
		access BYTE,
		except$ptr POINTER;
END DQ$ChangeAccess;

DQ$ChangeExtension:
	PROCEDURE(
		path$ptr,
		exten,
		except$ptr) EXTERNAL;
	DECLARE
		path$ptr POINTER,
		exten POINTER,
		except$ptr POINTER;
END DQ$ChangeExtension;

DQ$Close:
	PROCEDURE(
		conn,
		except$ptr) EXTERNAL;
	DECLARE
		conn TOKEN,
		except$ptr POINTER;
END DQ$Close;

DQ$Create:
	PROCEDURE(
		path$ptr,
		except$ptr) TOKEN EXTERNAL;
	DECLARE
		path$ptr POINTER,
		except$ptr POINTER;
END DQ$Create;

DQ$DecodeException:
	PROCEDURE(
		e$code,
		ec$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		e$code WORD_16U,
		ec$ptr POINTER,
		except$ptr POINTER;
END DQ$DecodeException;

DQ$DecodeTime:
	PROCEDURE(
		dt$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		dt$ptr POINTER,
		except$ptr POINTER;
END DQ$DecodeTime;

DQ$Delete:
	PROCEDURE(
		path$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		path$ptr POINTER,
		except$ptr POINTER;
END DQ$Delete;

DQ$Detach:
	PROCEDURE(
		conn,
		except$ptr) EXTERNAL;
	DECLARE
		conn TOKEN,
		except$ptr POINTER;
END DQ$Detach;

DQ$Exit:
	PROCEDURE(
		c$code) EXTERNAL;
	DECLARE
		c$code WORD_16U;
END DQ$Exit;

DQ$FileInfo:
	PROCEDURE(
		conn,
		mode,
		info$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		conn TOKEN,
		mode BYTE,
		info$ptr POINTER,
		except$ptr POINTER;
END DQ$FileInfo;

DQ$Free:
	PROCEDURE(
		seg,
		except$ptr) EXTERNAL;
	DECLARE
		seg SELECTOR,
		except$ptr POINTER;
END DQ$Free;

DQ$GetArgument:
	PROCEDURE(
		arg$ptr,
		except$ptr) BYTE EXTERNAL;
	DECLARE
		arg$ptr POINTER,
		except$ptr POINTER;
END DQ$GetArgument;

DQ$GetConnectionStatus:
	PROCEDURE(
		conn,
		info$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		conn TOKEN,
		info$ptr POINTER,
		except$ptr POINTER;
END DQ$GetConnectionStatus;

DQ$GetExceptionHandler:
	PROCEDURE(
		c$han$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		c$han$ptr POINTER,
		except$ptr POINTER;
END DQ$GetExceptionHandler;

DQ$GetSize:
	PROCEDURE(
		seg,
		except$ptr) WORD_32U EXTERNAL;
	DECLARE
		seg SELECTOR,
		except$ptr POINTER;
END DQ$GetSize;

DQ$GetSystemId:
	PROCEDURE(
		id$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		id$ptr POINTER,
		except$ptr POINTER;
END DQ$GetSystemId;

DQ$GetTime:
	PROCEDURE(
		dt$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		dt$ptr POINTER,
		except$ptr POINTER;
END DQ$GetTime;

DQ$MAllocate:
	PROCEDURE(
		siz,
		except$ptr) POINTER EXTERNAL;
	DECLARE
		siz WORD_32U,
		except$ptr POINTER;
END DQ$MAllocate;

DQ$MFree:
	PROCEDURE(
		mem$location,
		except$ptr) EXTERNAL;
	DECLARE
		mem$location POINTER,
		except$ptr POINTER;
END DQ$MFree;

DQ$GetMSize:
	PROCEDURE(
		mem$location,
		except$ptr) WORD_32U EXTERNAL;
	DECLARE
		mem$location POINTER,
		except$ptr POINTER;
END DQ$GetMSize;

DQ$Open:
	PROCEDURE(
		conn,
		mode,
		num$buf,
		except$ptr) EXTERNAL;
	DECLARE
		conn TOKEN,
		mode BYTE,
		num$buf BYTE,
		except$ptr POINTER;
END DQ$Open;

DQ$Overlay:
	PROCEDURE(
		name$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		name$ptr POINTER,
		except$ptr POINTER;
END DQ$Overlay;

DQ$Read:
	PROCEDURE(
		conn,
		buf$ptr,
		count,
		except$ptr) WORD_32U EXTERNAL;
	DECLARE
		conn TOKEN,
		buf$ptr POINTER,
		count WORD_32U,
		except$ptr POINTER;
END DQ$Read;

DQ$Rename:
	PROCEDURE(
		old$ptr,
		new$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		old$ptr POINTER,
		new$ptr POINTER,
		except$ptr POINTER;
END DQ$Rename;

DQ$ReserveIoMemory:
	PROCEDURE(
		number$files,
		number$buffers,
		except$ptr) EXTERNAL;
	DECLARE
		number$files WORD_16U,
		number$buffers WORD_16U,
		except$ptr POINTER;
END DQ$ReserveIoMemory;

DQ$Seek:
	PROCEDURE(
		conn,
		mode,
		offst,
		except$ptr) EXTERNAL;
	DECLARE
		conn TOKEN,
		mode BYTE,
		offst WORD_32U,
		except$ptr POINTER;
END DQ$Seek;

DQ$Special:
	PROCEDURE(
		type$code,
		param$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		type$code BYTE,
		param$ptr POINTER,
		except$ptr POINTER;
END DQ$Special;

DQ$SwitchBuffer:
	PROCEDURE(
		buff$ptr,
		except$ptr) WORD_32U EXTERNAL;
	DECLARE
		buff$ptr POINTER,
		except$ptr POINTER;
END DQ$SwitchBuffer;

DQ$TrapCC:
	PROCEDURE(
		cc$routine$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		cc$routine$ptr POINTER,
		except$ptr POINTER;
END DQ$TrapCC;

DQ$TrapException:
	PROCEDURE(
		han$ptr,
		except$ptr) EXTERNAL;
	DECLARE
		han$ptr POINTER,
		except$ptr POINTER;
END DQ$TrapException;

DQ$Truncate:
	PROCEDURE(
		conn,
		except$ptr) EXTERNAL;
	DECLARE
		conn TOKEN,
		except$ptr POINTER;
END DQ$Truncate;

DQ$Write:
	PROCEDURE(
		conn,
		buf$ptr,
		count,
		except$ptr) EXTERNAL;
	DECLARE
		conn TOKEN,
		buf$ptr POINTER,
		count WORD_32U,
		except$ptr POINTER;
END DQ$Write;

/************************************************************
*                                                           *
*  External Declarations for iRMX III VM86 Dispatcher       *
*                         System calls                      *
*                                                           *
************************************************************/

rqe$DOS$request: PROCEDURE (data$p, wait$time, status$p) EXTERNAL;
	DECLARE	
		data$p				POINTER,
		wait$time			WORD_16N,
		status$p			POINTER;
END rqe$DOS$request;

rqe$set$vm86$extension: PROCEDURE( int$level,
		entry$p, deletion$handler$p, status$p ) EXTERNAL;

	DECLARE
		int$level			BYTE,
		entry$p				POINTER,
		deletion$handler$p	POINTER,
		status$p			POINTER;

END rqe$set$vm86$extension;

/***EOF***/

$Restore
