/*
 * 5799-WZQ (C) COPYRIGHT IBM CORPORATION 1986,1987
 * LICENSED MATERIALS - PROPERTY OF IBM
 * REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
 */
#include "asm.h"
 # /* $Header:callabs.s 12.0$ */
 # /* $ACIS:callabs.s 12.0$ */
 # /* $Source: /ibm/acis/usr/sys/standca/RCS/callabs.s,v $ */

	.data
rcsid:	.asciz	"$Header:callabs.s 12.0$"
	.text

 #
 #  callabs - transfer control to absolute address
 #  necessary because NCS dereferences a data pointer 
 #  when it does a call.
 #  the programs we are calling (in general) are assembler C startup
 #  routines which don't have data pointers (or if they do they aren't
 #  available)
 #
eye_profil(callabs):
	 cas	r0,r2,r0	# get address in r0
	 cas	r2,r3,r0	# put r3 into r2
	 cas	r3,r4,r0	# put r4 into r3
	 cas	r4,r5,r0	# put r5 into r4
	 cas	r11,r2,r0	# fake first register variable
	 cas	r10,r3,r0	# fake second register variable
         br   r0		# call the function


 #
 # get the absolute address of a function from a C function-pointer
 # this can be passed to 'callabs' to call it (if it does not need
 # a data pointer)
 #
eye_profil(fnaddr):
	get	r2,0(r2)	# pick up from data pointer
	br	r15
