
AbsExecBase	=$4
MEMF_PUBLIC	=$1
_LVOPutMsg	=-$16E
_LVOAllocMem	=-$C6
_LVOFindPort	=-$186

SV_ICONIFY       =181			;iconify screen
SV_UNICONIFY     =153			;uniconify screen
SV_SYSOPLOG      =154			;sysop login
SV_LOCALLOG      =155			;local login
SV_INSTANT       =170			;remote login (instant)
SV_ACCOUNTS      =156			;account editing
SV_CHAT          =157			;
SV_NODEOFFHOOK   =158			;offhook node
SV_EXITNODE      =159			;offline node
SV_INITMODEM     =160			;reset modem
SV_WHATSUP       =161			;sysop chat with user
SV_RESERVE       =171			;reserve node for user
SV_CHATTOGGLE    =172
SV_AESHELL       =174
SV_CLIPBOARD     =175
SV_START         =176
SV_NEWMSG        =177
SV_QUIETNODE     =178
SV_SETNRAMS      =179
SV_RESERVENODE   =180			;reserve node

RESERVED_BLOCK10 =162


		section	server,code

Test:		moveq	#0,d0			;node
		move.l	#SV_ICONIFY,d7		;command
		bsr	CallNode		;send command to node...
		rts

CallNode:	lea	ServerPortName(pc),a1
		add.b	#'0',d0				;make ascii
		move.b	d0,9(a1)			;set portname for node

_FindPort:	move.l	(AbsExecBase).w,a6
		lea	ServerPortName(pc),a1
		jsr	_LVOFindPort(a6)		;find comms port
		move.l	d0,d6
		beq.s	_FindPort

		move.l	#256,d0
		moveq	#MEMF_PUBLIC,d1
		jsr	_LVOAllocMem(a6)		;allocate structure
		move.l	d0,a1
		bne.s	DoCmd
		rts

DoCmd:		move.b	#6,8(a1)
		move.w	#256,18(a1)			;init structure
		clr.l	14(a1)
		move.l	d7,224(a1)			;command
		moveq	#1,d1
		move.l	d1,220(a1)			;write()
		move.l	d6,a0				;portbase
		jmp	_LVOPutMsg(a6)

ServerPortName:	dc.b	'AEServer.X',0
		even

		end
