#include <asm/unistd.h>
#include <alpha/regdef.h>

.section	.text
.globl		_start

_start:         # 2002-01-8 is gp really necessary?
		# ldgp	gp,0(pv)
		ldah	a1, 0x2400(zero) # 2400 * 10000 = 24000000
		ldi	a0, 1
		sll	a1, 3		# 24000000 * 8 = 120000000
		ldi	a2, 3
		ldi	v0, __NR_write
		or	a1, 1           # 120000000 + 1 = 120000001
		callsys
		bsr	ra, _entry
_patch:		nop			# replace with original entry point
		nop			# address takes 8 bytes
_entry:		ldq	v0,0(ra)
		jmp	(v0)
.long           (_patch - _start) << 24
