		.section .text
		.globl _start
_start:		call	_entry
		mov	%o0,%l0
		mov	%o1,%l1
		mov	%o2,%l2
		mov	%g1,%l3

		mov	4,%g1		! write
		mov	1,%o0		! fd=1
		set	0x10001,%o1	! buf=0x10001
		mov	3,%o2		! count=3
		ta	0x10

		mov	%l1,%o1
		mov	%l2,%o2
		mov	%l3,%g1

		jmp	%l7
		mov	%l0,%o0

_patch:		nop			! replace with original entry point
_entry:		retl
		ld	[%o7 + (_patch - _start)],%l7

		set	_patch - _start,%g1	! dummy to specify ofs
