	.TITLE	LOA
;
; Bob,
;
;	Here is an example task which calls PROLOD to load the driver XXDRV
; in DW1:[ZZSYS]. It will print the eight words of status regardless of success.
;
;+
; Assembly and build from DCL
;
; $ MAC LOA
; $ PAB
; PAB>LOA=LOA
; PAB>/
; Enter options:
; TKB>LIBR=POSSUM:RO
; PAB>//
;-

	.mcall	qiow$s,exit$s		;request system macros
;
; local data
;

loaarg:	.word	4			;four arguments (simple load call)
	.word	stat			;pointer to eight word status block
	.word	rqst			;pointer to PROLOD request
	.word	fnm			;pointer to filename size
	.word	fnmsiz			;pointer to size (in bytes) of fnm
stat:	.blkw	8.			;eight word status block
fnmsiz:	.word	fnmsz			;word containing size of fnm
rqst:	.word	1			;load (and online all) request
fnm:	.ascii	/DW1:[ZZSYS]XXDRV/	;filename (intentionally without file
fnmsz=.-fnm				;name extension as this can't be spec'd)
outbf:	.blkb	132.			;output buffer for status display
fmt:	.asciz	/%Nload request status: %N%8P/ ;output bufer format string
	.even
;
; This task request PROLOD to load the driver XXDRV from DW1:[ZZSYS]
;
start:	mov	#loaarg,r5		;get args for sample call to PROLOD
	call	prolod			;load the driver
					;print status block always
	mov	#stat,r2		;point to status args
	mov	#fmt,r1			;output format
	mov	#outbf,r0		;output buffer
	call	$edmsg			;format it
	qiow$s	#io.wlb,#5,#5,,,,<#outbf,r1>	;print it
	exit$s				;exit
	.end	start
