	.TITLE NTCON
	.ENABLE LC
	.IDENT /010688/

;
;	File:[22,310]NTCON.MAC
;	Author: Jim Bostwick   1-JUN-1988
;	Last Edit: jmb -  1-JUN-1988 18:11:32
;	Desc: Request DECnet logical Link Connection
;	History: JMB  1-JUN-1988
;
;

.REM |

Procedure NTCON (
	lun: integer;
	EFN: Event_flag;
	Out_MSG: CH16;			{ user message sent to remote task }
	VAR Conb: Net_request_block;
	VAR In_MSG: CH16;
	VAR IOSB: Io_Status_block;
	);External;

{*USER*
 Request a logical link with remote task. Build Conb with call to NTCONB
prior to invoking NTCON. OUT_MSG contains user data sent to remote task
(it get's it in the NTGND call). In_MSG will receive data sent by the 
remote task in it's NTACC call. 
} 

{*WIZZARD*
AST, NOFLOW, short connect blocks not implemented. 
}

|

;
; Assemble with PASMAC.MAC as prefix file.
;

	.library /lb:[1,1]netlib.mlb/
	.MCALL CONW$S

	PROC NTCON
	PARAM LUN, Integer
	PARAM EFN, Char
	PARAM OutMsg, 16.*Char
	PARAM Conb, Address
	PARAM InMsg, Address
	PARAM IOSB, Address

	SAVE <R0,R1,R2,R3,R4,R5>
	BEGIN
	mov	sp, r0
	mov	efn(sp), r1	; get EFN 
	bic	#^C377, r1
	mov	r0, r2		; get outmsg pointer
	add	#outmsg, r2	; ...
	conw$s lun(r0),r1,iosb(r0),,<conb(r0),#152.,r2,#16.,inmsg(r0),#16.>

	ENDPR

	.END

