|
|
1.1 root 1: #include "../machine/alignment.h"
2: call(infop)
3: process_info *infop;
4: /*
5: /* Call a procedure with argument list on stack.
6: /*
7: /******************************************************/
8: {
9:
10: register long removed, mask, new_address, i, next, temp_fp;
11:
12: printf("entering call\n");
13: removed = operand(infop, 0)->data & 0xffff ;
14: printf("after first call to operand\n");
15: new_address = operand(infop, 1)->address;
16: printf("in call, removed = 0x%x , new_address=0x%x \n",removed, new_address);
17: push (infop, fp);
18: temp_fp = sp;
19: mask = get_word (infop, new_address) & 0x1fff; /* Only bits 12-0 */
20: printf("in call, mask = 0x%x , pc=0x%x \n",mask,pc);
21: push (infop, mask << 16 | removed);
22: push (infop, pc); /* Next opcode address */
23: next = 12; /* Register # to save */
24: for (i = 0x1000; i != 0; i = i >> 1)
25: {
26: if ( i & mask ) push (infop, Register (infop, next));
27: next--;
28: }
29: fp = temp_fp;
30: pc = new_address + 2; /* Transfer control */
31: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.