1 /****^  ***********************************************************
 2         *                                                         *
 3         * Copyright, (C) Honeywell Bull Inc., 1987                *
 4         *                                                         *
 5         * Copyright, (C) Honeywell Information Systems Inc., 1982 *
 6         *                                                         *
 7         * Copyright (c) 1972 by Massachusetts Institute of        *
 8         * Technology and Honeywell Information Systems, Inc.      *
 9         *                                                         *
10         *********************************************************** */
11 
12 
13 ring0_init: proc ;
14 
15 /* last modified by Kobziar 1/25/75 to call priv_init entries */
16 /* last modified by Greenberg 05/27/76 who changed it back again, and added terminate entries. */
17 /* last modified by Loepere 11/05/84 to rename terminate to terminate_. */
18 
19 dcl (level$get, level$set) ext entry (fixed bin) ;
20 
21 dcl  initiate ext entry (char (*), char (*), char (*), fixed bin (1), fixed bin (2), ptr, fixed bin (35)) ;
22 dcl  initiate$initiate_count ext entry (char (*), char (*), char (*), fixed bin (24), fixed bin (2), ptr, fixed bin (35)) ;
23 dcl  terminate_$noname entry (ptr, fixed bin (35));
24 dcl  terminate_$teseg entry (ptr, fixed bin (1), fixed bin (35));
25 
26 dcl (dirname, ename, rname) char (*) ;
27 dcl  tcode fixed bin (35);
28 dcl  tsptr ptr;
29 dcl  tsw fixed bin (1);
30 dcl  segsw fixed bin (1) ;
31 dcl  copysw fixed bin (2) ;
32 dcl  count fixed bin (24) ;
33 dcl  segptr ptr ;
34 dcl  code fixed bin (35) ;
35 
36 dcl  save_level fixed bin ;
37 dcl  esw fixed bin ;
38 
39 initiate: entry (dirname, ename, rname, segsw, copysw, segptr, code) ;
40 
41           esw = 1 ;
42           goto start ;
43 
44 initiate_count: entry (dirname, ename, rname, count, copysw, segptr, code) ;
45 
46           esw = 2 ;
47           go to start;
48 
49 terminate_noname: entry (tsptr, tcode);
50 
51           esw = 3;
52           go to start;
53 
54 terminate_seg: entry (tsptr, tsw, tcode);
55 
56           esw = 4;
57 
58 start:
59           call level$get (save_level) ;
60 
61           call level$set (0) ;
62 
63           if esw = 1 then call initiate (dirname, ename, rname, segsw, copysw, segptr, code) ;
64           else if esw = 2 then call initiate$initiate_count (dirname, ename, rname, count, copysw, segptr, code);
65           else if esw = 3 then call terminate_$noname (tsptr, tcode);
66           else if esw = 4 then call terminate_$teseg (tsptr, tsw, tcode);
67 
68           call level$set (save_level) ;
69 
70           return ;
71 
72      end ;