Pristine Ack-5.5
[Ack-5.5.git] / lang / cem / libcc / gen / head_cc.e
1 #
2 #include "em_abs.h"
3 /*
4  * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
5  *
6  *          This product is part of the Amsterdam Compiler Kit.
7  *
8  * Permission to use, sell, duplicate or disclose this software must be
9  * obtained in writing. Requests for such permissions may be sent to
10  *
11  *      Dr. Andrew S. Tanenbaum
12  *      Wiskundig Seminarium
13  *      Vrije Universiteit
14  *      Postbox 7161
15  *      1007 MC Amsterdam
16  *      The Netherlands
17  *
18  */
19
20 /* Author: E.G. Keizer */
21
22  mes 2,EM_WSIZE,EM_PSIZE
23
24  exa environ
25  exa _penvp
26 environ
27  bss EM_PSIZE,0,0
28 _penvp
29  bss EM_PSIZE,0,0
30
31  exp $_m_a_i_n
32  pro $_m_a_i_n,0
33 #if EM_WSIZE==1
34  ldc 1336       ; EIOVFL | EIUND | ECONV | EFOVFL | EFUNFL
35 #else
36  loc 1336
37 #endif
38  sim            ; ignored
39  lal EM_WSIZE+EM_PSIZE
40  loi EM_PSIZE
41  lae environ
42  sti EM_PSIZE
43  lae environ
44  loi EM_PSIZE
45  lae _penvp
46  sti EM_PSIZE
47 #if __unix && ! (__em22 || __em24 || __em44)
48  lpi $_ctch_
49  sig
50  asp EM_PSIZE
51 #endif
52  lal EM_WSIZE+EM_PSIZE
53  loi EM_PSIZE
54  lal EM_WSIZE
55  loi EM_PSIZE
56  lal 0
57  loi EM_WSIZE
58  cal $main
59  asp EM_WSIZE+EM_PSIZE+EM_PSIZE
60  lfr EM_WSIZE
61  cal $exit
62  end
63
64 #if __unix && ! (__em22 || __em24 || __em44)
65  exp $_ctch_
66  pro $_ctch_,0
67  lol 0
68  loc EIDIVZ
69  beq *1
70  lol 0
71  loc EFDIVZ
72  beq *1
73  lol 0
74  trp
75  bra *3
76 1
77  loc 8
78  cal $getpid
79  lfr EM_WSIZE
80  cal $kill
81  asp 2*EM_WSIZE
82 3
83  lpi $_ctch_
84  sig
85  asp EM_PSIZE
86  rtt
87  end 0
88 #endif