;	Copyright (c) 1983 SAGE Computer Technology
;	All Rights Reserved
;
;	Assembly routine hook to load an assembly code file and
;	  start it processing (called from ASSEMLOAD).
;
;	File: ASSEMHOOK.TEXT
;
	.PROC	LOADIT,7
	LEA	ARGS,A0
	MOVEA.L (SP)+,A1	;Save return address in case of failure
	MOVE.L	(SP)+,16.(A0)	;Starting address
	MOVE.W	(SP)+,12.(A0)	;Block number
	MOVE.L	(SP)+,8(A0)	;Memory address
	MOVE.W	(SP)+,D0	;Size in blocks
	MULU	#512.,D0	;Size in bytes
	MOVE.L	D0,4(A0)
	MOVE.W	(SP)+,(A0)	;Channel
	
	MOVEQ	#20.,D0		;Disable BIOS hooks to interp
	TRAP	#14.
	
	MOVEQ	#9,D0		;Load and start the code
	TRAP	#14.
	
	JMP	(A1)		;In case of failure
	
;	Command parameters
ARGS	.WORD	0		; 0 - Channel
	.WORD	0		; 2 - Error reply
	.WORD	0,0		; 4 - Size in bytes
	.WORD	0,0		; 8 - Memory address
	.WORD	0		;12 - Logical block number
	.WORD	0		;14 - Control word
	.WORD	0,0		;16 - Starting address
	.WORD	0		;20 - High word of Logical Block Number
	
	.END

                         