1 /****^  ***********************************************************
 2         *                                                         *
 3         * Copyright, (C) Honeywell Bull Inc., 1987                *
 4         *                                                         *
 5         * Copyright, (C) Honeywell Information Systems Inc., 1984 *
 6         *                                                         *
 7         *********************************************************** */
 8 /* INIT_BCE.PL1 -- initialize the bootload_command_environment */
 9 /* BIM 8/82 */
10 /* Modified by Keith Loepere in 83 for exec_com, file_out support */
11 /* Modified by Keith Loepere in March 85 to set bce cp_data_. */
12 /* format: style4,indattr,ifthenstmt,ifthen,idind33,^indcomtxt */
13 
14 init_bce:
15      procedure;
16 
17 declare  1 AI                             aligned like area_info;
18 declare  fa1_ptr                          pointer;
19 
20 declare  bce_data$console_alert_put_chars entry variable ext;
21 declare  bce_data$console_get_line        entry variable ext;
22 declare  bce_data$console_put_chars       entry variable ext;
23 declare  bce_data$error_put_chars         entry variable ext;
24 declare  bce_data$exec_com_get_line       entry variable ext;
25 declare  bce_data$free_area_ptr           pointer ext;
26 declare  bce_data$get_line                entry variable ext;
27 declare  bce_data$put_chars               entry variable ext;
28 declare  dseg$                            (0:4095) fixed bin (71) ext;
29 declare  free_area_1$                     ext static bit (36) aligned;
30 
31 declare  bce_console_io$get_line          entry;
32 declare  bce_console_io$put_chars         entry;
33 declare  bce_console_io$put_chars_alert   entry;
34 declare  bce_exec_com_input               entry;
35 declare  define_area_                     entry (ptr, fixed bin (35));
36 declare  sdw_util_$get_size               entry (ptr, fixed bin (18));
37 
38 declare  null                             builtin;
39 declare  stackbaseptr                     builtin;
40 %page;
41 wired: entry;                                               /* init all references to wired data */
42 
43           unspec (AI) = ""b;
44           AI.version = 1;
45           AI.owner = "";
46           fa1_ptr = addr (free_area_1$);
47           call sdw_util_$get_size (addr (dseg$ (bin (baseno (fa1_ptr)))), AI.size);
48           AI.areap = fa1_ptr;
49           AI.zero_on_free = "1"b;
50 
51           call define_area_ (addr (AI), (0));
52           bce_data$free_area_ptr, stackbaseptr () -> stack_header.user_free_ptr, stackbaseptr () -> stack_header.system_free_ptr = fa1_ptr;
53 
54           bce_data$console_get_line, bce_data$get_line = bce_console_io$get_line;
55           bce_data$console_put_chars, bce_data$put_chars = bce_console_io$put_chars;
56           bce_data$console_alert_put_chars = bce_console_io$put_chars_alert;
57           bce_data$error_put_chars = bce_console_io$put_chars;
58           return;
59 
60 paged: entry;                                               /* references to paged data */
61 
62           bce_data$exec_com_get_line = bce_exec_com_input;
63 
64           cp_data_$scratch_release_factor = 1;              /* temporary segments in BCE are a scarce resource */
65           addr (cp_data_$permanent_scratch_segment_list) -> permanent_scratch_segment_list.n_scratch_segments = 1;
66           return;
67 %page; %include area_info;
68 %page; %include cp_data_;
69 %page; %include stack_header;
70      end init_bce;