Ultrix-3.1/src/ucb/m11/debug.m11


 ;//////////////////////////////////////////////////////////////////////
 ;/   Copyright (c) Digital Equipment Corporation 1984, 1985, 1986.    /
 ;/   All Rights Reserved. 					      /
 ;/   Reference "/usr/src/COPYRIGHT" for applicable restrictions.      /
 ;//////////////////////////////////////////////////////////////////////

.mcall	(at)	always
.globl	$write,$indir

.globl	ndebug,sdebug, ..z,..zbuf
.globl	savreg,dnc
.globl	xx.flg
always

xitsec
sdebug:
	call	savreg
	mov	r0,-(sp)

	mov	#..s,r2
	mov	..z,r3
	mov	#2,r0
1$:	movb	(r3)+,(r2)+
	beq	2$
	inc	r0
	br	1$
2$:
	movb	#12,(r2)
	mov	r0,..n
ddd:	mov	#2,r0
	tst	xx.flg
	beq	100$
	$indir
	sys
100$:
	mov	(sp)+,r0
	return
ndebug:
	call	savreg
	mov	r0,-(sp)
	mov	#..s,r2
	mov	..z,r1
	call	dnc
	movb	#12,(r2)+
	mov	r2,..n
	sub	#..s,..n
	br	ddd

	entsec	mixed
sys:	$write
	..s
..n:	.blkw
..z:	.word
..s:	.blkw	100
..zbuf:	.blkw	100

	.end