5 /* $Id: core.c,v 2.4 1994/06/24 10:45:44 ceriel Exp $ */
18 core_file = fopen("int.core", "w");
20 /* no point in giving a fatal error again! */
24 /******** EM Machine capacity parameters ********/
26 fprintf(core_file, "wsize=%ld\n", wsize);
27 fprintf(core_file, "psize=%ld\n", psize);
29 /******** EM program parameters ********/
31 fprintf(core_file, "ML=%lu\n", ML);
32 fprintf(core_file, "HB=%lu\n", HB);
33 fprintf(core_file, "DB=%lu\n", DB);
34 fprintf(core_file, "NProc=%ld\n", NProc);
36 /******** EM machine registers ********/
38 fprintf(core_file, "PI=%ld\n", PI);
39 fprintf(core_file, "PC=%lu\n", PC);
41 fprintf(core_file, "HP=%lu\n", HP);
42 fprintf(core_file, "SP=%lu\n", SP);
43 fprintf(core_file, "LB=%lu\n", LB);
44 fprintf(core_file, "AB=%lu\n", AB);
46 fprintf(core_file, "ES=%ld\n", ES);
47 fprintf(core_file, "ES_def=%d\n", ES_def);
49 fprintf(core_file, "OnTrap=%d\n", OnTrap);
50 fprintf(core_file, "IgnMask=%ld\n", IgnMask);
51 fprintf(core_file, "TrapPI=%ld\n", TrapPI);
53 fprintf(core_file, "FRASize=%ld\n", FRASize);
54 fprintf(core_file, "FRA_def=%d\n", FRA_def);
56 fprintf(core_file, "HL=%lu\n", HL);
57 fprintf(core_file, "SL=%lu\n", SL);
59 /******** The EM machine memory ********/
61 fwrite(text, 1, (int)(DB), core_file);
62 fwrite(data, 1, (int)(HL), core_file);
63 fwrite(stack, 1, (int)(ML+1-SL), core_file);
64 fwrite(FRA, 1, (int)(FRALimit), core_file);
67 fwrite(FRA_sh, 1, (int)(FRALimit), core_file);
68 fwrite(data_sh, 1, (int)(HL), core_file);
69 fwrite(stack_sh, 1, (int)(ML+1-SL), core_file);