/
/ PDP-11 C.
/ Standard Library.
/
/ Integer to Octal Character (internal).
/
 
	.globl	_itoc8
 
/
/ _itoc8
/ On entry:
/	r0=number
/	r1=buffer address
/
/ On return:
/	r1=updated
/
 
_itoc8:
	mov	r2,-(sp)
	mov	r3,-(sp)
	mov	r0,r2
	call	itoc8
	mov	(sp)+,r3
	mov	(sp)+,r2
	return
 
itoc8:
	mov	r2,r3
	clr	r2
	div	$8.,r2
	beq	0f
	mov	r3,-(sp)
	call	itoc8
	mov	(sp)+,r3
0:
	add	$'0,r3
	movb	r3,(r1)+
	return
