	.TITLE tstlog - test program for LOG
	.IDENT /15/

.REM |
*+	tstlog - test program for LOG

	File:tstlog.mac
	Version: 15
	Author:
	Last Edit: 23-MAY-1985 13:59:23 
	Last Update: 23-May-1985 14:00:17 
		     get a user id which exists!


*-
|

	.LIBRARY /LB:[1,1]GLMAC.MLB/
	.MCALL call,exit$s

	.SBTTL LOCAL DATA

	.psect ldat,d,lcl,con
;
; use this psect for scratch storage - it is not guaranteed to be saved
; across calls to the module
;

	.psect data,d,gbl,con
;
; use this psect for module-specific data which must be retained across
; calls to the module
;
uidptr:	.word 0		; for logging - points to user id string
tt1num:	.word	13	; supply a tt number for testing
tt2num:	.word	44	; supply second tt number for testing
num:	.word	0	; 
p0:	.word	1000	; some more params
p1:	.word	2000
p2:	.word	3000
nump:	.word	0	; number of p's to use
;
; get the global defs (for dolog macro )
;
	.include /sclidat.mac/

	.PSECT
; code goes in the blank psect

	.SBTTL TSTLOG -- Exercise LOG module

.REM |
	This test program simply calls LOG for each
	message, setting up dummy params as required.


|
START::	
	mov	#cmd1, r0
	mov	cm.id(r0), uidptr	; save user-id
	.globl  log
	dolog	1,<uidptr,tt1num>
	dolog	2,<uidptr,tt1num>
	dolog	3,<tt1num,p0>
	dolog	4
	dolog	5,<tt1num,tt2num>
	dolog	6,<tt1num,tt2num>
	dolog	7,<tt2num>
	dolog	8.,<tt2num>
	mov	#333., num		; set an error number
	mov	#3, nump		; number of params
	dolog	9.,<num,nump,p0,p1,p2>
	mov	#22., num
	mov	#2, nump
	dolog	9.,<num,nump,p0,p1>
	dolog	10.,<tt1num,uidptr>
	dolog	11.,<tt2num>
	dolog	12.
;
; now do an illegal one
;
	dolog	77,<tt1num,tt2num,p0>
	exit$s

	.end start
