1 2 /* This is the cobol run time interface procedure. 3 It is called by the cobol_operators_ with the parameters are set in the stack frame 4 starting from the 68th word. 5 From the 68th word up through the 107th word are reserved for this interfacinguse. 6 From the 108th word up through the 137th word are reserved for the condition 7 handling use. 8 The 68th word up through the 73th word are used to set the parameter rts_stack_ptr. 9 The rts_code is the 88th words of the stack frame, it is used to decide the run time 10 procedure that cobol_rts_ is going to call. 11 Register Usage 12 13 $pr0 cobol_operators_ 14 $pr1 fsb pointer 15 $pr2 temporary 16 $pr3 cobol_data_area 17 $pr4 cobol_linkage_area 18 $pr5 cobol_data_area(extension) 19 $pr6 stack_prame pointer 20 $pr7 temporary 21 22 Run Time Stack Frame 23 24 0 0 25 1 1 26 2 2 27 3 3 28 4 4 29 5 5 30 6 6 31 7 7 32 8 10 33 9 11 34 10 12 35 11 13 36 12 14 37 13 15 38 14 16 39 15 17 40 16 20 S.prev_sp, S.condition_word, S.flag_word 41 17 21 42 18 22 S.next_sp, S.signaller_word 43 19 23 44 20 24 S.return_ptr 45 21 25 46 22 26 S.entry_ptr 47 23 27 48 24 30 S.operator_ptr, S.lp_ptr 49 25 31 50 26 32 S.arg_ptr 51 27 33 52 28 34 S.static_ptr 53 29 35 S.support_ptr 54 30 36 S.on_unit_relptrs, on_unit_ptr 55 31 37 S.operator_ret_ptr, S.translator_id, op_return_offset 56 32 40 S.regs, display_ptr 57 33 41 58 34 42 descriptor_ptr 59 35 43 60 36 44 linkage_ptr 61 37 45 62 38 46 text_base_ptr 63 39 47 text_base_off 64 40 50 mcode 65 41 51 icode 66 42 52 status12 67 43 53 status3 68 44 54 retrycode, cobol_open_mode 69 45 55 70 46 56 multics_open_mode 71 47 57 72 48 60 S.min_length 73 49 61 74 50 62 75 51 63 76 52 64 77 53 65 78 54 66 79 55 67 80 56 70 81 57 71 82 58 72 83 59 73 84 60 74 85 61 75 86 62 76 87 63 77 88 64 100 return_to_main_ptr 89 65 101 return_to_main_off 90 66 102 rts_code_ptr 91 67 103 92 68 104 93 69 105 94 70 106 95 71 107 96 72 110 rts_code args to cobol_rts 97 73 111 use_code 98 74 112 iocb_ptr 99 75 113 100 76 114 mcode_ptr 101 77 115 102 78 116 buff_ptr 103 79 117 104 80 120 buff_len 105 81 121 actual_ptr 106 82 122 stack_buff_ptr, cobol_open_mode 107 83 123 cobol_options 108 84 124 vfile_open_mode 109 85 125 key of ref 110 86 126 fsb_ptr iox_, arg-1 args for iox_calls 111 87 127 112 88 130 file_desc_ptr iox_, arg-2 113 89 131 cobol_error_code 114 90 132 iox_, arg-3 115 91 133 116 92 134 iox_, arg-4 117 93 135 118 94 136 119 95 137 120 96 140 121 97 141 122 98 142 123 99 143 124 100 144 x6_save 125 101 145 126 102 145 127 103 147 128 104 150 129 105 151 130 106 152 subr_return_save 131 107 153 subr_return_save_off 132 108 154 pr4_save 133 109 155 134 110 156 pr3_save 135 111 157 136 112 160 pr5_save 137 113 161 138 114 162 rts_save 139 115 163 140 116 164 ind_mask 141 117 165 142 ENTRY OPTIONS 143 144 FUNCTION NAME COBOL OPERATORS 145 146 (1) cobol_error_ 147 (2) cobol_control_ 148 (3) sort_initiate 149 (4) sort_release 150 (5) sort_return 151 (6) sort_terminate 152 (7) sort_commence 153 (8) stop_literal 154 (9) stop_run 155 (10) cancel 156 (11) iox_$control 23 157 (129 check_close_error 27,29,36,38 158 (13) check_open_error 159 (14) iox_$find_iocb 160 (15) iox_$attach_iocb 29,35,36 161 (16) check_seek_errors 41,54,67 162 (17) iox_$read_key 55 163 (18) accept 164 (19) 165 (20) accept_id 166 (21) accept_id 167 (22) accept_id 168 (23) inspect 169 (24) inspect 170 (25) seek_for_delete 57,58 171 (26) read_key_status_code 69 172 (27) check_read_record 65,66 173 (28) check_get_line 64 174 (29) 175 (30) merge_init 176 (31) merge_comp 177 (32) merge_return 178 (33) 179 (34) 180 (35) 181 (36) 182 (37) 183 (38) 184 (39) 185 (40) receive_comm 186 (41) accept_comm 187 (42) purge_comm 188 (43) send_comm 189 (44) enable_comm 190 (45) disable_comm 191 (46) alt_file_open 192 (47) alt_read_record 193 194 Status_Key_1 (Status_Key_2) 195 196 org = seq 197 0(0)1(0)3(0,4)9 198 org = rel 199 0(0)1(0)2(2,3,4)3(0)9 200 org=ind 201 0(0,2)1(0)2(1,2,3,4)3(0)9 202 203 Status_Key_1 = 0 success 204 1 at end 205 2 invalid 206 3 permanent error 207 9 implementor defined 208 209 Status_Key_2 = 0 no more information 210 1 sequence error 211 2 duplicate key 212 3 no record found 213 4 boundary violation 214 215 Status_Key_3 pic 9999 wxyz 216 217 w: cobol i/o statement 218 x: vfile_command 219 y: same as key_1 220 z: specific cause of error 221 222 vfile_commands and error codes 223 224 attach_ptr (not_detached) 225 close (not_open) 226 delete_record (no_record) 227 detach_iocb (not_attached, not_closed) 228 find_iocb () 229 get_chars (short_record,end_of_info) 230 get_line (short_record,end_of_info) 231 open (not_attached,not_closed) 232 position (no_record,end_of_info) 233 read_key (end_of_info,no_record) 234 read_length (end_of_info,no_record) 235 read_record (end_of_info,no_record,long_record) 236 record_status) (no_room_for_lock,no_record,no_key) 237 rewrite_record (no_record) 238 seek_head (no_record) 239 seek_key (no_record,key_order) 240 write_record (no_key) 241 242 */ 243