File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / sys / tahoe / Acall.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:30:01 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v121, HEAD
Power 6/32 Unix version 1.21

#include "../machine/alignment.h" 
call(infop)
process_info *infop;
/*
/*	Call a procedure with argument list on stack.
/*
/******************************************************/
{

	register long removed, mask, new_address, i, next, temp_fp;

	printf("entering call\n");
	removed = operand(infop, 0)->data & 0xffff ;
	printf("after first call to operand\n");
	new_address = operand(infop, 1)->address;
	printf("in call, removed = 0x%x , new_address=0x%x \n",removed, new_address);
	push (infop, fp);
	temp_fp = sp;
	mask = get_word (infop, new_address) & 0x1fff;  /* Only bits 12-0 */
	printf("in call, mask = 0x%x , pc=0x%x \n",mask,pc);
	push (infop, mask << 16 | removed);
	push (infop, pc);				/* Next opcode address */
	next = 12;				/* Register # to save */
	for (i = 0x1000; i != 0; i = i >> 1)
	{ 
		if ( i & mask ) push (infop,  Register (infop, next));
		next--; 
	}
	fp = temp_fp;
	pc = new_address + 2;			/* Transfer control */
}  

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.