DGroup		GROUP	Copyright, Stack, Data, Const, Statics, ZeroData, Memory

Copyright	SEGMENT	PARA PUBLIC 'Copyright'
			DW		256 DUP (0)
			ORG		0
			DB		' Copyright 1990 Sirius Systems, Inc.'
			DB		0ah
			DB		'All rights reserved.'
			DB		0ah
			DB		'This Program is furnished under a license restricting'
			DB		' its use solely for the operation of a designated'
			DB		' computer or a particular purpose.'
			DB		0ah
			DB		'This Program may not be copied, modified or otherwised'
			DB		' used without the prior WRITTEN CONSENT of Sirius'
			DB		' Systems, Inc.'
			DB		0ah
			DB		'Title to and ownership of the program, including its'
			DB		' source code, shall at all times remain in Sirius'
			DB		' Systems, Inc.'
			DB		0ah
Copyright	ENDS

Stack		SEGMENT	STACK 'Stack'
			DW		100h DUP (?)
Stack_Limit	EQU		THIS WORD
Stack		ENDS

Data		SEGMENT	WORD PUBLIC 'Data'
Data		ENDS

Const		SEGMENT	WORD PUBLIC 'Const'
Const		ENDS

Statics		SEGMENT	WORD PUBLIC 'Const'
Statics		ENDS

ZeroData	SEGMENT	WORD PUBLIC 'C_ds'
ZeroData	ENDS

Memory		SEGMENT	PARA PUBLIC 'Memory'
Memory		ENDS

			EXTRN	agent_process:FAR
			EXTRN	lpd_initialize:FAR
			EXTRN	exit:FAR

			PUBLIC	_prolog
			PUBLIC	server_stack

			PUBLIC	ds_reg
			PUBLIC	Init_Before
			PUBLIC	Init_Erc
			PUBLIC	Init_Ok
			PUBLIC	Init_Part
			PUBLIC	Init_Req

Data		SEGMENT	WORD PUBLIC 'Data'

ds_reg		DW		0

server_stack DW		0

Init_Before	DB		' InternetCT must be already installed'
			DB		00h

Init_Erc	DB		' InternetCT returned an error'
			DB		00h

Init_Ok		DB		' installed ok'
			DB		00h

Init_Part	DB		'Lpd'
			DB		00h

Init_Req	DB		' InternetCT requests not defined'
			DB		00h

Data		ENDS

Const		SEGMENT	WORD PUBLIC 'Const'
Const		ENDS

Data		SEGMENT	WORD PUBLIC 'Data'
Data		ENDS

cMin_Asm	SEGMENT	WORD 'Code'
			ASSUME	CS: cMin_Asm

_Prolog:
			PUSH	SS
			POP		DS

			ASSUME	SS: DGroup
			ASSUME	DS: DGroup

			MOV		AX, DGroup
			MOV		ds_reg, AX

			MOV		AX, OFFSET stack_limit
			SHR		AX, 1
			MOV		server_stack, AX

			CALL	lpd_initialize

			CALL	agent_process				; does not return

			CALL	exit

cMin_Asm	ENDS
END			_Prolog

ECTION;
	abort = ABORT_TCP_CONNECTION;

	while( TRUE) {
		lpd_checkerc( wait( exchanges[AGENT], rq));
		if( ( ( rqcode = rq>rqcode) >= open) 
				( rqcode <= abort)) {
			switch( rq>rqcode  base) {
			case ORC_OPEN_TCP_CONNECTION_NO_WAIT:
				tcp_open_connection_response( rq);
				break;
			case ORC_GET_TCB:
				tcp_get_tcb_response( rq);
				break;
			case ORC_SEND_TCP_MESSAGE:
				tcp_send_message_response( rq);
				break;
			case ORC_RECEIVE_TCP_