/
/ PDP-11 C.
/ Standard Library.
/
/ Integer to Hexadecimal Character (internal).
/
 
	.globl	_itox
 
tab:	.ascii	"0123456789ABCDEF"

/
/ _itox
/ On entry:
/	r0=number
/	r1=buffer address
/
/ On return:
/	r1=updated
/
 
_itox:
	mov	r2,-(sp)
	mov	r3,-(sp)
	mov	r0,r2
	call	itox
	mov	(sp)+,r3
	mov	(sp)+,r2
	return
 
itox:
	mov	r2,r3
	clr	r2
	div	$16.,r2
	beq	0f
	mov	r3,-(sp)
	call	itox
	mov	(sp)+,r3
0:
	movb	tab(r3),(r1)+
	return
