 Nick de Smith, 09-Mar-88  
 AST notes:  F AST type		Call	IPL		ACB deallocated		ACB$B_MODE		AST address/parameterL --------------		----	---		---------------		----------		---------------------J Special KERNEL		JSB	IPL$_ASTDEL(3)	No (1)			ACB$V_KAST (5)		ACB$L_KAST	n/a  K Piggy-Back-KAST (6)	JSB	IPL$_ASTDEL(4)	No (1)			ACB$V_PKAST		ACB$L_KAST	n/a   W KERNEL,SUPER,EXEC,USER	CALLG	0		Yes (1) (2)		PSL$C_USER etc.		ACB$L_AST  / ACB$L_ASTPRM + 	(call mechanism/parameters as per $DCLAST)    Notes:  u (1) Where the ACB is not deallocated by the system, it is the responsibility of the AST routine to free it, otherwise v     non-paged pool will be consumed. Note that you can read most system data areas from EXEC mode, but you can't writeE     to them. Therefore you can only deallocate an ACB at KERNEL mode.   w (2) The ACB is deallocated before the AST routine is called unless ACB$V_PKAST or ACB$V_NODELETE was set in ACB$B_MODE, V     in which case it is the ASTs responsibility to deallocate the ACB (see (1) above).  j (3) Special KERNEL mode ASTs can drop and raise IPL as the calling routine (SCH$ASTDEL) resets it for you.  B (4) PKASTs can drop and raise IPL, but must exit with IPL$_ASTDEL.  q (5) If ACB$V_KAST is set, only a special KERNEL mode AST will be delivered. No other bits in ACB$B_MODE are used.   r (6) PKASTs are called before the associated "normal" AST. There must be both an ACB$L_KAST and a ACB$L_AST address$     specified if ACB$V_PKAST is set.  # To queue an AST to another process:   * 		movl	#ACB$K_LENGTH, r1	; Set size of ACBE 		jsb	g^EXE$ALONONPAGED	; Allocate nonpaged pool space for normal ACB  		movl	r2, r5			; R5 => New ACB 7 		movb	#DYN$C_ACB, ACB$B_TYPE(r5) ; Say block is an ACB 4 		movw	r1, ACB$W_SIZE(r5)	; Store size of structure	P 		movl	#<ipid>, ACB$L_PID(r5)	; Store IPID of target process (could be our IPID): 		movb	#<flags>, ACB$B_RMOD(r5) ; Store type of AST in ACB8 		movab	<ast_code>, ACB$L_xAST(r5) ; Set the AST address; 		movl	#PRI$_xxx, r2		; SCH$QAST needs priority boost in R2 ! 		jsb	g^SCH$QAST		; Queue the AST   l This piece of code is simplistic. It would probably work in some/most situations. There again, it will crashW your system in some situations too! See K_AST.MAR for a better (definitive?) treatment.    [end] 