gcos_abort_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 14031 .tr ! xx .m1 2 .oh 1 $$$_____________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_abort_ $ .oh 4 $$$_____________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/29/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $_____________$$$ .eh 2 $$$$ .eh 3 $ gcos_abort_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $_____________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_abort_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to abort the job when a fatal error occurs in the gcos job. Examples of fatal errors are unrecognized control card, end of job deck with no $ ENDJOB card, bad field on control card, etc. .sp This procedure prints a message containing an abort code, and the name and offset of the calling procedure (obtained from the caller's stack frame). Then it calls gcos_error_ with a code of 9999 to abort the job. The abort codes are those defined by gcos. .sp E__n_t_r_y: gcos_abort_ .sp U__s_a_g_e .sp declare gcos_abort_external entry (char(*)); .sp call gcos_abort (code); .sp .in 10 .un 10 1) code is a character string containing the abort code for the error causing the abort. (Input) .sp .in 0 N__o_t_e .sp Additional arguments may be declared and used in the call, if it is desired to provide the user with a more detailed explnation of the error. They must be in the order and format of arguments used in calls to ioa_ they will be printed on the user's console using ioa_. .if copyright_end  gcos_activity_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 14517 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_activity_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/25/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_activity_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_activity_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process all activity-defining control cards. It uses the index of the particular card type, in gcos_con_$cardtable, to pick up the necessary information about the activity from other tables in GCOS_con_. It turns on the "activity being defined" switch, and sets PSW bit 5 appropriately. It sets the non-dollar and dollar filecodes, sets the default time, storage, and sysout limits for the activity, and opens and creates all the files required by the activity as determined by tables in GCOS_con_. Then it performs any activity_dependent initialization, and processes the options on the card, writing the card on D* if any unrecogized option is present. .sp E__n_t_r_y: gcos_activity_ .sp U__s_a_g_e .sp declare gcos_activity_ ext entry (char(80), fixed bin); .sp call gcos_activity_ (card, index); .sp .in 12 .un 12 1) card is the 80 character (ascii) image of the card to be processed. (Input) .sp .un 12 2) index is the position, in gcos_com_$cardtable, of the type of activity card being processed. (Input) .if copyright_end  gcos_ascii_gebcd_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 15651 .tr ! xx .m1 2 .oh 1 $$$___________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_ascii_gebcd_ $ .oh 4 $$$___________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/25/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $___________________$$$ .eh 2 $$$$ .eh 3 $ gcos_ascii_gebcd_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $___________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_ascii_gebcd_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to translate an ASCII character string to BCD. Certain special ASCII characters (new line and new page) are converted to printer control information. If $INCODE processing is in effect, the appropriate translation of the special characters is done in this routine. .sp E__n_t_r_y: gcos_ascii_gebcd_ .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_ascii_gebcd_ enternal entry (ptr, fixed bin, ptr, fixed bin); .sp .in 10 .un 5 call gcos_ascii_gebcd_ (ascii_pointer, ascii_count, bcd_pointer, bcd_count); .sp .fi .in 0 .in 20 .un 20 1) ascii_pointer is a pointer to an aligned character string containing the ASCII characters to be translated to bcd. (Input) .sp .un 20 2) ascii_count is the number of ASCII characters to be translated. (Input) .sp .un 20 3) bcd_pointer is a pointer to an aligned receiving field, where the BCD characters are to be placed. (Input) .sp .un 20 4) bcd_count is the number of BCD characters produced. This may be different from ASCII_count, because the number of characters produced in translation of printer control information is a function of the type of information being translated. .if copyright_end  gcos_caller_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 13482 .tr ! xx .m1 2 .oh 1 $$$______________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_caller_ $ .oh 4 $$$______________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/25/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $______________$$$ .eh 2 $$$$ .eh 3 $ gcos_caller_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $______________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_caller_ .sp .oh 6 $$$Page %$ .oh 7 This program is a transfer vector, written in ALM. It is used by the GCOS environment simulator to transfer to the correct processing routine for a particular control card, using an index corresponding to the control card. .sp The program operates in the stack frame of its caller. Thus, when the card processing routine returns, it will return to the caller of this procedure. Also, any argument list passed to this procedure is passed along to the card processing routine. .sp E__n_t_r_y: gcos_caller_ .sp U__s_a_g_e .sp declare gcos_caller_ external entry (char(80), fixed bin); .sp call gcos_caller_ (card, index); .sp .in 12 .un 12 1) card is an 80 character strings containing the ascii representation of the control card. (Input) .sp .un 12 2) index is the index of the particular control card type, in a table of control card types. It is used to select the proper element of the transfer vector to get to the processing routine for that control card. (Input) .if copyright_end  gcos_cleanup_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 11151 .tr ! xx .m1 2 .oh 1 $$$_______________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_cleanup_ $ .oh 4 $$$_______________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/25/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $_______________$$$ .eh 2 $$$$ .eh 3 $ gcos_cleanup_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $_______________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_cleanup_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to dispose of files at the end of an activity and at the end of a job. .sp It examines all the fib's and disposes of the files according to the settings of the indicators. Files marked save are examined for a " " in the file code. If present, this is removed. Fibs that were not created by gein have their filecodes set to zero. Sysout files are written on P* or C* by a call to gcos_sysout_dispose_. Printer and punch files have their pathnames placed in a sysout queue for processing at the end of the job. .sp E__n_t_r_y: gcos_cleanup_ .sp U__s_a_g_e .sp declare gcos_cleanup_ external entry; .sp call gcos_cleanup; .sp There are no arguments. .if copyright_end  gcos_close_file_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 14328 .tr ! xx .m1 2 .oh 1 $$$__________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_close_file_ $ .oh 4 $$$__________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/25/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $__________________$$$ .eh 2 $$$$ .eh 3 $ gcos_close_file_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $__________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_close_file_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to close a GCOS file, at the end of an activity or at the end of a job. .sp It is called with the filecode of the file to be closed. It has two entry points. The $detach entry point will detach the file, deallocate any buffers associated with it, and set the fib.used flag to "0"b; the $scratch entry point will do all of the above, and in addition it will delete the segment (or multi-segment file) from the Multics file system. .sp E__n_t_r_y: gcos_close_file_$scratch .sp U__s_a_g_e .sp declare gcos_close_file_$scratch external entry (char(*); .sp call gcos_close_file_$scratch (fc); .sp .in 7 .un 7 1) fc is the filecode of the file to be closed and deleted from the Multics storage system. (Input) .sp .in 0 E__n_t_r_y: gcos_close_file_$detach .sp U__s_a_g_e .sp declare gcos_close_file_$detach (char(*)); .sp call gcos_close_file_$detach (fc); .sp .in 7 .un 7 1) fc is the filecode of the file to be closed and saved in the Multics storage system. (Input) .if copyright_end  gcos_con_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 45810 .tr ! xx .m1 2 .oh 1 $$$___________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_con_ $ .oh 4 $$$___________$ .oh 5 $$$$ .oh 6 $$$Data Base$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/16/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $___________$$$ .eh 2 $$$$ .eh 3 $ gcos_con_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $___________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_con_ .sp .oh 6 $$$Page %$ .oh 7 This program is written in ALM. It contains the following tables, used in the processing of GCOS control cards. .sp E__n_t_r_y: gcos_con_$cardtable .sp This entry is a table containing the names of all GCOS control cards. They are separated into three sections, depending on how they effect activity definitions. The last section contains those cards which terminate activity defintions but do not themselves define activities. The middle section contains those cards that define new activities (and thus terminate any activity currently beging defined). The first section contains all other cards. Each entry in this table is a char(8) ascii representation of the control card name. .sp .nf .in 13 .un 8 declare gcos_con_$cardtable(gcos_con_$tablelen) char(8) ext static; .sp .fi .in 0 E__n_t_r_y: gcos_con_tablelen .sp This entry is a fixed bin number containing the length, in double words, of card table (i.e., the number of cards in cardtable). .sp declare gecon$tablen fixed bin (17) ext static; .sp E__n_t_r_y: gcos_con_$exc_offset .sp This entry contains the offset, in double words, from the beginning of cardtable, where the second section begins (i.e., the number of the first activity-defining card. .sp declare gecon$exc_offset fixed bin (17) ext static; .sp E__n_t_r_y: gcos_con_$nonact .sp This entry contains the offset, in double words, from the beginning of cardtable, where the third section begins (i.e., the number of the first activity terminating card). .sp declare gcos_con_$nonact fixed bin(17) ext static; .sp E__n_t_r_y: gcos_con_$activity_table .sp This entry is a table containing an entry for each of the activity-defining cards. .sp declare gcos_con_$activity_table ext static; .sp The form of each entry is the following structure: .sp .nf .in 13 .un 8 declare 1 at entry aligned based, 2 rib_offset fixed bin, 2 non_dollar_filecode char(4), 2 conon_switch fixed bin; .sp .fi .in 0 .in 25 .un 25 1) vib_offset is the word offset, from the beginning of gcos_con_, of the variable length informaion block (see below) for this activity card. .sp .un 25 2) non_dollar_filecode is the filecodes where all non-dollar-size cards are to be written, for this activity. .sp .un 25 3) canon_switch is the index, in a table of tab settings, of the proper set of tab settings for the non-dollar cards associated with this activity. .sp .in 0 Variable length information blocks: .sp This section is not an entry; it is accessed by means of vib_offset, described above. .sp For each activity card, there is a variable length information block of the following form: .sp .nf .in 13 .un 8 declare 1 vib aligned based, 2 activity char(8), 2 psw bit(18) unalgined, 2 time_limit fixed bin(17) unaligned, 2 storage_limit fixed bin(17) unaligned, 2 sysout_limit fixed bin(17) unaligned, 2 op_offset fixed bin(17) unalinged, 2 op_len fixed bin(17) unaligned, .sp .in 0 followed by: .sp .in 13 2 file_control bit(18) unaligned, 2 filecode char(2) unaligned, .sp .fi .in 0 repeated once for every file required by the activity, followed by: .sp .in 13 2 end_indicator fixed bin(35) init(0); .sp .in 0 .fi .in 20 .un 20 1) activity is the name of the activity. .sp .un 20 2) psw initial psw.settings. .sp .un 20 3) time_limit time limit in seconds. .sp .un 20 4) storage_limit storage limit in words. .sp .un 20 5) sepout_limit sysout limit in lines. .sp .un 20 6) op_offset word offset, from the beginning of gcos_con_ of the option table ineffect for this activity. .sp .un 20 7) op_len length words of the option table (see below) in effect for this activity. .sp .un 20 8) file_control initial settings for switches in file information block, for this files. .sp .un 20 9) filecode filecode of this file. .sp .in 0 8 and 9 are repeated once for each file that is always required by the activity. .sp Option table: .sp This section is not an entry; it is accessed by means of op_offset, described above. .sp For each option, there is a table entry of the following form: .sp .nf .in 13 .un 8 declare 1 op_tab aligned based, 2 option_type char(8), 2 index fixed bin(17) unaligned, 2 psw_bits bit(18) unaligned; .sp .fi .in 0 .in 16 .un 16 1) option_type is the name of the option. .sp .un 16 2) index is the offset, in an array of label variables, of the label of the processing routine, in gecos_activity, for this option. .sp .un 16 3) psw_bits are psw bit settings for this option. .if copyright_end  gcos_create_file_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 17136 .tr ! xx .m1 2 .oh 1 $$$___________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_create_file_ $ .oh 4 $$$___________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/16/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $___________________$$$ .eh 2 $$$$ .eh 3 $ gcos_create_file_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $___________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_create_file_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to create or locate a Multics segment and associate it (using ios_$attach) with a fib having a given filecode. The fib must have been previously initialized by GCOS_OPEN_file_. If no fib is found with a matching filecode, then gcos_error_will be called to abort the job. .sp If an existing segment is to be located, and it cannot be found, gcos_error_will be called to abort the job. If a pathname of an existing segment is not given in the call, a file will be created (in the working directory if it is a print, punch, or sysout file, otherwise in the process directory). The pathname of the created file will be constructed by taking the filecode, replacing all *'s with +'s to avoid interfering with the Multics * convention, and appending a period followed by a unique 15 character string. .sp E__n_t_r_y: gcos_create_file_ .sp U__s_a_g_e .sp declare gcos_create_file external entry (char(*), ptr)); .sp call gcos_creare_file (filecode, path ptr); .sp .in 15 .un 15 1) filecode is the gcos filecode of the file to be created or located. (Input) .sp .un 15 2) path_ptr is a pointer to a fixed length, aligned 200 character string, containing the full pathname of a file to be located. If the pointer is null, a scratch fill will be created, and named as described above. (Input) .if copyright_end  gcos_data_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 9009 .tr ! xx .m1 2 .oh 1 $$$____________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_data_ $ .oh 4 $$$____________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/16/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $____________$$$ .eh 2 $$$$ .eh 3 $ gcos_data_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $____________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_data_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process $ DATA cards. It will set the non-dollar filecode equal to the one given on the card (if none is given, the default is i*), open and create the file, and set switches indicating which options were present on the card. .sp E__n_t_r_y: gcos_data_ .sp U__s_a_g_e .sp declare gcos_data_ external entry (char(80)); .sp call gcos_data_ (card); .sp .in 9 .un 9 1) card is the 80-character ASCII image of the card to be processed. (Input) .if copyright_end  gcos_endjob_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 10242 .tr ! xx .m1 2 .oh 1 $$$______________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_endjob_ $ .oh 4 $$$______________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/16/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $______________$$$ .eh 2 $$$$ .eh 3 $ gcos_endjob_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $______________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_endjob_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to perform end of job processing. It is called either when a $ ENDJOB card is found in the job deck, or when the job is being aborted before it has finished. .sp The procedure dispasses of sysout files, and all other files, as appropriate, prints execution time and time job ended, and returns to gocs_ (the main simulator routine) via a non local go to gcos_ immediately returns to the caller (normally the command processor). .sp E__n_t_r_y: gcos_endjob_ .sp U__s_a_g_e .sp declare gcos_endjob_ ext entry; .sp call gcos_endjob; .sp There are no arguments .if copyright_end  gcos_error_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 13725 .tr ! xx .m1 2 .oh 1 $$$_____________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_error_ $ .oh 4 $$$_____________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/16/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $_____________$$$ .eh 2 $$$$ .eh 3 $ gcos_error_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $_____________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_error_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to print an optional error message and abort the job being run. .sp The error message is taken from a table within the program. The input argument is an index to that table. The error messages do not correspond to any of the regular GCOS abort codes; they refer to errors occuring in the simulation of gcos. (If the error code is >100, it is assumed to be from error_table, and com_err_ is called, instead.) .sp The program returns to GCOS_ via a non-local gots, to abort the job. An option call to debug (set by the -db option of the gcos command) proceeds this return. .sp E__n_t_r_y: gcos_error_ .sp U__s_a_g_e .sp declare gcos_error_ external entry (fixed bin); .sp call gcos_error_ (code); .sp .in 9 .un 9 1) code is either a) an index to the table of error messages contained in gcos_error_, or b) an entry in the Multics segment error_table_. It is used to select the error message to be printed, prior to the job's being aborted. (Input) .if copyright_end  gcos_etc_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 16587 .tr ! xx .m1 2 .oh 1 $$$___________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_etc_ $ .oh 4 $$$___________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/13/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $___________$$$ .eh 2 $$$$ .eh 3 $ gcos_etc_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $___________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_etc_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process control cards that require little or no processing. It contains an entry point for each such card. .sp E__n_t_r_y: gcos_etc_ .sp This entry point will always abort the job, since the $ ETC card is a continuation card, should be read by one of the other control card processors, and may not stand alone. .sp U__s_a_g_e .sp declare gcos_etc_external entry (char(80)); .sp call gcos_etc_ (card); .sp .in 10 .un 10 1) card is the 80-character ASCII image of the $ ETC card. (Input) .sp .in 0 E__n_t_r_y: gcos_etc_$gcos_endcopy .sp This entry point merely returns. An andcopy card read in the main loop in ignored-not treated as an error. .sp U__s_a_g_e .sp declare gcos_etc_$gcos_endcopyext entry (char(80)); .sp call gcos_etc_$gcos_endcopy (card); .sp .in 10 .un 10 1) card is the 80-character ASCII image of the $ ENDCOPY card to be processed. (Input) .sp .in 0 E__n_t_r_y: gcos_etc_$gcos_comment .sp This entry will print the comment field (colums 16-72) of the $ COMMENT card on the console. .sp U__s_a_g_e .sp declare gcos_etc_$gcos_comment external entry (char(80)); .sp call gcos_etc_$gcos_comment (card); .sp .in 10 .un 10 1) card is the 80-characters ASCII image of the $ COMMENT card to be processed. (Input) .if copyright_end  gcos_fault_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 17829 .tr ! xx .m1 2 .oh 1 $$$_____________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_fault_ $ .oh 4 $$$_____________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/15/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $_____________$$$ .eh 2 $$$$ .eh 3 $ gcos_fault_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $_____________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_fault_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to handle all faults occurring in the gcos slave program, except for mme's. It is established as the handler for "unclaimed signal" by a call to condition_ in gcos_run_activity_. .sp If the fault which occurred is one which may be handled by the slave program, the fault vector in the slave program prefix is examined to see if a handler has been established for the fault. If no, the saved machine conditions are altered so that control will pass to the handler when this procedure returns. If no handler has been established, or if the fault is one which can not be handle by the slave program, the jog is aborted. .sp E__n_t_r_y: gcos_fault_$unclaimed_signal .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_fault_$unclaimed_signal external entry (ptr, char(*), ptr, ptr, bit(1)); .sp .in 10 .un 5 call gcos_fault_$unclaimed_signal (mc_ptr, fault_name, cp, info_ptr, ret_sw); .sp .fi .in 0 .in 15 .un 15 1) mc_ptr is a pointer to the saved machine conditions at the time of the fault. (Input) .sp .un 15 2) fault_name is the name of the fault. (Input) .sp .un 15 3) cp is a pointer to crawl out data from fim. (Not used) .sp .un 15 4) info_ptr is a pointer to sortware fault data. (Not used) .sp .un 15 5) ret_sw is a switch which, if = "1"b upon return, indicates to signal_ that the handler (i.e. this procedure) did not handle the fault, and the next handler should be called. (Output) .if copyright_end  gcos_fileproc_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 14040 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_fileproc_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/15/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_fileproc_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_fileproc_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process the various file assignment control cards. There are several entry points, each used for one or more control cards. They are all declared and called the save way: .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_fileproc_$ external entry char(80)); .sp .in 10 .un 5 call gcos_fileproce_$ (card); .sp .fi .in 0 .in 9 .un 9 1) card is the 80 character ASCII image of the card to be processed. (Input) .sp .in 0 E__n_t_r_y: gcos_fileproc_$gcos_print .sp This entry point processes $PRINT control cards. .sp E__n_t_r_y: gcos_fileproc_$gcos_punch .sp This entry point processes $ POUCH control cards. .sp E__n_t_r_y: gcos_fileproc_$gcos_drum .sp This entry point processes $ DRUM control cards. .sp E__n_t_r_y: gcos_fileproc_$gcos_disk .sp This entry point processes $ DISK, $DISC, and $ MASS control cards. .sp E__n_t_r_y: gcos_fileproc_$gcos_tape .sp This entry point processes $ TAPE control cards. .if copyright_end  gcos_gebcd_ascii_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 10611 .tr ! xx .m1 2 .oh 1 $$$___________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_gebcd_ascii_ $ .oh 4 $$$___________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/15/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $___________________$$$ .eh 2 $$$$ .eh 3 $ gcos_gebcd_ascii_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $___________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_gebcd_ascii_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to translate a BCD character string to ASCII. .sp E__n_t_r_y: gcos_gebcd_ascii_ .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_gebcd_ascii_ external entry (ptr, fixed bin, ptr); .sp .in 10 .un 5 call gcos_gebcd_ascii (bcd_pointer, bed_count, ascii_pointer); .sp .fi .in 0 .in 20 .un 20 1) bcd_pointer is a pointer to an aligned BCD string. (Input) .sp .un 20 2) bcd_count is the number of BCD characters in the string. (Input) .sp .un 20 3) ascii_pointer is a pointer to an aligned, nonvarying string where the translated ASCII charcters are to be placed. (Input) .if copyright_end  gcos_gein_pass1_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 15156 .tr ! xx .m1 2 .oh 1 $$$__________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_gein_pass1_ $ .oh 4 $$$__________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/16/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $__________________$$$ .eh 2 $$$$ .eh 3 $ gcos_gein_pass1_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $__________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_gein_pass1_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GOC environment simulator to perform initial processing of the job deck. .sp If the deck was typed in free format from a console, then tabs are replaced by the number of spaces necessary to align the fields following the tabs in the proper columms. The colums are different for the various types of cards. The card types are determined by examining control cards. .sp The resulting new job deck is written into a segment in the process directory called "gcos_job_deck". If the gocs_job_deck overflows, up to three additional segments (gcos_job_deck_z to 4) are created in the process directory. .sp The deck is scanned for control cards that define execution activities), and switches are set to insure that privious activities will save object code. .sp E__n_t_r_y: gcos_gein_pass1_ .sp U__s_a_g_e .sp declare gcos_gein_pass1_ext entry (pointer, fixed bin); .sp call gcos_gein_pass1_ (segptr, seglen); .sp .in 12 .un 12 1) segptr is a pointer to the segment containings the job deck. (Input) .sp .un 12 2) seglen is the length in characters of the segment containing the job deck. (Input) .if copyright_end  gcos_get_dcw_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 21960 .tr ! xx .m1 2 .oh 1 $$$_______________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_get_dcw_ $ .oh 4 $$$_______________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/14/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $_______________$$$ .eh 2 $$$$ .eh 3 $ gcos_get_dcw_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $_______________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_get_dcw_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to interpret a DCW list supplied as one of the arguments of a mme inos. It is called with a pointer to the file for the file invalved in the I/O. It returns three values to the caller: 1) the number of words to be transferred to or from core; 2) the location, relative to the start of the gcos slave area segment, where the transfer is to begin; and 3) a switch indicators whether the returned count represents all the data to be transferred, or whether a discontiguous transfer is represented (i.e., skip data on input, or jump to new storage location on output), in which case, another call to gcos_get_dcw_ should be made, to obtain the next count and location. When this routine returns, fib.dcw_pointer has been moved to 1 location past the last dcw interpreted (i.e., to the next dcw, if there is one). .sp E__n_t_r_y: gcos_get_dcw_ .sp This entry is used. .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_get_dcw_ ext entry (pointer, fixed bin, fixed bin, bit(1)); .sp .in 10 .un 5 call gcos_get_dcw_ (fib_pointer, count, location, continue_switch) .sp .fi .in 0 .in 20 .un 20 1) fib_pointers is a pointer to the fib of the file invalved in the I/O. (Input) .sp .un 20 2) count is the number of contiquous words to be transferred to or from core. (Output) .sp .un 20 3) location is the number of the word, in the gcos slave area segment, where the transfer is to begin. (Output) .sp .un 20 4) continue_switch is set to "0"b if count represents all the data to be transferred; it is set to "1"b if a) on input, the last dcw interpreted had an action code indicating that same words of data should be skipped, or b) on output, if the data address in the next dcw to be interpreted specifies any location other than the word immediately following the last word specified by the address and count in the last dcw interpreted. (Output) .if copyright_end  gcos_getfield_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 28872 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_getfield_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/29/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_getfield_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_getfield_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to extract a variable from the variable field of a $ control card. It is called with three arguments, and it can return values in all three of than. In addition, it sets and uses the external static switch, gcos_stat_$gf. The third argument is a switch indicating the result of the call. If it is zero, then a variable has been retuned in the second argument; if it is 1, the variable is null i.e., there werf two adjacent commas on the card; if it is 2, the logical end of the card ends with a comma, indicating continuation onto a $ ETC card, this procedure will read the next card by calling gcos_read_card_ (if it is not a $ETC card, the job will be aborted), and return the first variable from the variable field of that card. (The variable field of a card is colums 16-72 inclusive.) If a $ ETC card is read, it will be returned to the caller in the first argument. .sp The caller must set gcos stat_$gf equal to zero before calling this procedure for the first time after reading a card. This setting indicates to getfield that it is starting a new card, and it phoved reset its internal static column pointer to 16. This procedure will set gcos_stat_$gf equal to 1 when it is in the middle of a card, and equal to 2 when it detects the logical end of the variable field. Note that this setting occurs one call before the result switch is set to 2: when this procedure returning the last variable in the field, it will set its result switch to zero, and gcos_stat_$gf to 2; on the next call, the result switch will be set to 2. Thus the user can save a call by checking gcos_stat_$gf. .sp If the variable field on the card ends with a command in column 72, gcos_stat_$gf will be set to 3, indicating to this procedure that is shoved immediately read a $ETC card when it is next called. .sp The length of the variable is compared to the length of the input argument in which the variable is to be returned. If the former is greater, the job will be aborted. .sp E__n_t_r_y: gcos_getfield_ .sp This entry is used to. .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_getfield_external entry (char(80), char(*), fixed bin); .sp .in 10 .un 5 call gcos_getfield_ (card, field, result); .sp .fi .in 0 .in 13 .un 13 1) card is the 80 character (ascii) represintation of the card from which the variable is to be extracted. (Input and Output) .sp .un 13 2) field is a fixed length character string in which the varible is returned. (Output) .sp .un 13 3) result is a three valued switch indicating the result of the call: (0-variable returned, 1-null variable, 2-end variable field). (Output) .if copyright_end  gcos_ident_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 8901 .tr ! xx .m1 2 .oh 1 $$$_____________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_ident_ $ .oh 4 $$$_____________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/29/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $_____________$$$ .eh 2 $$$$ .eh 3 $ gcos_ident_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $_____________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_ident_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process the $ IDENT card. .sp The identification field is saved for later placement in the slave program prefix. The presence of the $ IDENT card, in proper sequence in the deck, is noted. .sp E__n_t_r_y: gcos_ident_ .sp U__s_a_g_e .sp declare gcos_ident_external entry (char(80)); .sp call gcos_ident_ (card); .sp .in 10 .un 10 1) card is the 80-character ASCII image of the control card to be processed. (Input) .if copyright_end  gcos_incode_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 8343 .tr ! xx .m1 2 .oh 1 $$$______________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_incode_ $ .oh 4 $$$______________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/14/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $______________$$$ .eh 2 $$$$ .eh 3 $ gcos_incode_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $______________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_incode_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process $INCODE cards. It sets a switch indicating the code used to punch the input cards (which are to be translated into bed). .sp E__n_t_r_y: gcos_incode_ .sp U__s_a_g_e .sp declare gcos_incode_ external entry (char(80)); .sp call gcos_incode_ (card); .sp .in 10 .un 10 1) card is the 80-character ASCII imape of the card to be processed. (Input) .if copyright_end  gcos_limits_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 9333 .tr ! xx .m1 2 .oh 1 $$$______________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_limits_ $ .oh 4 $$$______________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/14/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $______________$$$ .eh 2 $$$$ .eh 3 $ gcos_limits_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $______________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_limits_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process $ LIMITS cards. It interprets limit fipures for time, max card, loader-shared core, and sysout print lines, and stores them for use during the running of an activity. An error in any of the four option fields will cause the job to be aborted. .sp E__n_t_r_y: gcos_limits_ .sp U__s_a_g_e .sp declare gcos_limits_external entry (char(80)); .sp call gcos_limits_(card); .sp .in 10 .un 10 1) card is the 80 character ASCII image of the card to be processed. .if copyright_end  gcos_loader_card_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 17685 .tr ! xx .m1 2 .oh 1 $$$___________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_loader_card_ $ .oh 4 $$$___________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/14/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $___________________$$$ .eh 2 $$$$ .eh 3 $ gcos_loader_card_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $___________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_loader_card_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process all loader control cards. These cards include: OPTION, USE, EQUATE, DUMP, LINK, LIBRARY, ENTRY, RECCOM, DKEND, OBJECT, LOWLOAP, NOLIB, SOURCE| and FFILE (the latter depending on context_sometimes it is not a loader card). These cards are copied onto the ra* file, which is created if it does not already exist. .sp There are three entry points: one each to process LINK and OBJECT cards, and one to process all the others. All three are called with the same argument: .sp .in 10 .un 10 1) card is the 80 character (ASCII) image of the card to be processed. (Input) .sp .in 0 E__n_t_r_y: gcos_loader_card_ .sp This entry copies the card to the r* file and returns. .sp U__s_a_g_e .sp declare gcos_loader_card_ext entry (char(80)); .sp call gcos_loader_card_ (card); .sp E__n_t_r_y: gcos_loader_card_$gcos_link .sp This entry turns on PSWbit 15, and copies the card to the r* file. .sp U__s_a_g_e .sp declare gcos_loader_card_$gcos_link ext entry (char(80)); .sp call gcos_loader_card_$gcos_link (card); .sp E__n_t_r_y: gcos_loader_card_$gcos_object .sp This entry sets the non dollar file code to r* and copies the card to the r* file. .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_loader_card_$gcos_object ext entry (char180)); .sp .in 10 .un 5 call gcos_loader_card_$gcos_object (card); .if copyright_end  gcos_mme_bort_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 35163 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_bort_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/14/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_bort_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_bort_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process aborts, either from a slave program, or from another part of the simulator. There are three entry points: one for MME 63BORT one too mme's not implemented in the simulator, and one for aborts from simulator routines called during the running of an activity. .sp After performing the processing described below, under the individnal entry point, this procedure will to the following: .sp .in 4 .un 4 1) if the abort occurred while a wrap up routine was being executed, print a message and return to gcos_run_activity via a non local transfer to gcos_stat_$mme_return. .sp .un 4 2) put instruction counter and abort code in slave prefix, for use of a possible wrap up routine. .sp .un 4 3) if the -debug option was specified, in the gcos command, offer the user the choice of a) entering debug, b) returning to the caller, or c) continuing with normal abort processing, with possible wrap up processing. If the -debug option was not specified, then normal abort processing is performed. Normal abort processing is performed in gcos_run_activity_, reached via a nonlocal transfer to gcos_stat_mme_return. .sp .in 0 E__n_t_r_y: gcos_mme_bort_ .sp This entry extracts the abort code from bits 25-36 of the register in the saved machine conditions, converts it to ascii, prints it in a message, and then performs the command processing described above. .sp U__s_a_g_e .sp declare gcos_mme_bort_ external entry (ptr, fixed bin); .sp call gcos_mme_bort_ (mc_ptr, increment); .sp .in 15 .un 15 1) mc_ptr is a pointer to the saved machine conditions at the time of the mme. (Input) .sp .un 15 2) increment is the number of parameter words following the mme instruction, to be skipped over when returning. (Output) .sp .in 0 E__n_t_r_y: gcos_mme_bort_$not_imp .sp This entry prints the type of the unimplemented mme, sets the abort code to "i1", and then performs the common processing described above. .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_mme_bort_$not_imp external entry (ptr, fixed bin, fixed bin); .sp .in 10 .un 5 call gcos_mme_bort_$not_imp (mc_ptr, increment, mme_type); .sp .fi .in 0 .in 15 .un 15 1) mc_ptr same as above. .sp .un 15 2) increment same as above. .sp .un 15 3) mme_type is the mme type, from the address field of the mme instruction. (Input) .sp .in 0 E__n_t_r_y: gcos_mme_bort_$simulator .sp This entry is called by other simulator routines when a fatal error is detected during the running of an activity. It obtains the name of the calling routine and the off set of the call, from the previous stack frame, and prints these, and the abort code, on the user's console. Then it checks for possible extra arguments in the call (providing additional explanation of the abort), and prints these if present, via a call to cu_$gen_call (ioa_...). Then it performs the commaon processing described above. .sp U__s_a_g_e .sp declare gcos_mme_bort_$simulator ext entry (char(*)); .sp call gcos_mme_bort_$smulator (code); .sp .in 9 .un 9 1) code is the gcos abort corresponding to the abort. (Input) .sp .in 0 N__o_t_e .sp Additional arguments may be declared and used in the call, to provide more explanation of the abort. They must be in the order and format of the arguments used in calls to ioa_. .if copyright_end  gcos_mme_call_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 22275 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_call_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/14/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_call_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_call_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process mme's GECALL and GERSTR. It will search a ** file; if me exists (or, for MME GERTR, the file code specified in the register). Otherwise, it will search the system library (file code * gs, in the simulator). For all three cases, it searches the catalog (which is NOT in the same format as the one procedured by the System Editor) for the program whose name is specified in the first parameter word. Locating it, the program reads the preface, obtains the origin, length, entry point, and relocation information, modifies them, if arigin or entry point were specified in the mme, loads the program into the gcos slave area segment, and performs relocation, if necessary. It returns the load origin and program length in the a register, and the entry point address in the upper part of the of register. Then it sets increment (normally the number of parameter words that follow the mme, to be skipped over on return) so that it contains the offset of the entry point, relative to the mme. This forces control to pass to the loaded program when the mme processor returns. .sp E__n_t_r_y: gcos_mme_call_ .sp U__s_a_g_e .sp declare gcos_mme_call_ enternal entry (ptr, fixed bin); .sp call gcos_mme_call_ (mc_ptr, increment); .sp .in 15 .un 15 1) mc_ptr is a pointer to the saved machine conditions at the time of the mme. (Input) .sp .un 15 2) increment is the address, relative to the mme, of the entry point of the called program. (Output) .sp .in 0 E__n_t_r_y: gcos_mme_call_$mme_rstr .sp This entry causes the library whose file code is contained in the q reqister, to be searched, instead of either the ** file or the system library (95) .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_mme_call_$mme_rstr external entry (ptr, fixed bin); .sp .in 10 .un 5 call gcos_mme_call_$mme_rstr (mc_ptr, uncrement); .sp .fi .in 0 Same arguments as above. .if copyright_end  gcos_mme_caller_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 14805 .tr ! xx .m1 2 .oh 1 $$$__________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_caller_ $ .oh 4 $$$__________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/14/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $__________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_caller_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $__________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_caller_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is a transfer vector written in ALM. It is used by the GCOS invironment simulator to transfer to the proper processing routine for a particular mme, using can index corresponding to the mme type. .sp This procedure operates in the stack frame of its caller. Thus, the argument list passed to this procedure is passed along to the mme processing routined, and when that routine returns, control will pass to the routine that called this procedure. .sp E__n_t_r_y: gcos_mme_caller_ .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_mme_caller external entry (pointer, fixed bin, fixed bin); .sp .in 10 .un 5 call gcos_mme_caller (fault_pointer, increment, mme_type); .sp .fi .in 0 .in 20 .un 20 1) fault_pointer is a pointer to the saved machine conditions at the time the mme. (Input) .sp .un 20 2) increment is the number of parameter words that follow the mme instruction, which are to be skipped over when the mme processor returns. (Output) .sp .un 20 3) mme_type is the number in the address field of the mme instruction, which identifies the type of the mme. (Input) .if copyright_end  gcos_mme_check_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 24768 .tr ! xx .m1 2 .oh 1 $$$_________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_check_ $ .oh 4 $$$_________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/23/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $_________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_check_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $_________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_check_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to by pass normal fault processing during the execution of an activity, in order to save time in the processing of mme's. .sp The signal pointer in the user's stack is set, by gcos_run_activity to point to this procedure, rather than to the normal signal procedure. When a fault occurs, this procedure checks for one of the gcos mme's, and transfers to the simulator routine gocs_mme_processor_, if appropriate. Otherwise, it transfer control to the procedure which was originally pointed to by the signal pointer in the stack (normally signal_), which performs the normal fault processing. .sp In addition to changing the signal pointer, gcos_run_activity_ initializes this procedure with a call to gcos_mme_check_$init. .sp This procedure does not establish its own stack frame. Thus, the arguments that it is called with are passed along to the routine it calls, and when that routine returns, control passes directly to the caller of this procedure. .sp E__n_t_r_y: gcos_mme_check_ .sp U__s_a_g_e .sp declare gcos_mme_check_ external entry (char(*), ptr, ptr); .sp call gcos_mme_check_ (fault_mme, mc_ptr_ info_ptr); .sp .in 20 .un 20 1) fault_name is the name of the fault. If it is not "mme1", then control is passed to the normal signal procedure. (Input) .sp .un 20 2) mc_ptr is a pointer to the saved machine conditions at the time of the fault. If the saved tsr and psr do not match the segment number of the gcos slave area segment, then control is passed to the normal signal procedure. (Input) .sp .un 20 3) info_ptr is a pointer to information about a softwarefault. It is not used by this procedure, but is passed on to the selected fault processor (either the normal signal procedure or gcos_mme_processor_). (Input) .sp .in 0 E__n_t_r_y: gcos_mme_check_$init .sp U__s_a_g_e .sp declare gcos_mme_check_$init external entry (ptr); .sp call gcos_mme_check_$init (gcos_seg_ptr); .sp .in 20 .un 20 1) gcos_seg_ptr is a pointer to the gcos slave core segment. The segment number is saved in an internal static variable for later comparison with the saved tsr and psr. (Input) .if copyright_end  gcos_mme_fadd_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 11286 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_fadd_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/14/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_fadd_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_fadd_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process a MMEGEFADD. This mme is used to obtain physical addresses for use in operator messages. Since physical addresses are meaningless in this simulated environment, a standard bit pattern is returned in the a and q registers. (If the file does not exist all zeros are returned.) .sp E__n_t_r_y: gcos_mme_fadd_ .sp U__s_a_g_e .sp declare gcos_mme_fadd_ ext entry (ptr, fixed bin); .sp call gcos_mme_fadd_ (mc_ptr, increment); .sp .in 15 .un 15 1) mc_ptr is a pointer to the saved machine conditions at the time of the mme. (Input) .sp .un 15 2) increment is the number of parameter words, following the mme, to be skipped over when returning. (Output) .if copyright_end  gcos_mme_fcon_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 13365 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_fcon_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$9/7/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_fcon_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_fcon_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process a MME GEFCON. It copies certain information about a file from the simulator's fib for the file into the fcb for the file, in the slave area. The address of the first fcb is given in the upper part of the q register. If several fcb's are chained together (each containing a pointer to the next one) then all the fcb's in the chain well have information copied from the corresponding fib's. If there is no fib corresponding to a given fcb, it is skipped over, with no warning. The filecodes is used to associate the fib and the fcb. .sp U__s_a_g_e .sp declare gcos_mme_fcon_ ext entry (ptr, fixed bin); .sp call gcos_mme_fcon_ (mc_ptr, imcremcnt); .sp .in 15 .un 15 1) mc_ptr is a pointer to the saved machine conditions at the time of the mme. (Input) .sp .un 15 2) increment is the number of parameter words following the mme instruction, to be skipped over when return in. (Output) .if copyright_end  gcos_mme_fini_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 10647 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_fini_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/14/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_fini_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_fini_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment, simulator to process a MME GEFINI. It calls gcos_write_$force to force the sysout Guffers to be written out, and then returns to the cleanup section of gcos_run_activity_ via a non-local transfer to gcos_stat_$mme_rtrn. .sp E__n_t_r_y: gcos_mme_fini_ .sp U__s_a_g_e .sp declare gcos_mme_fini_ ext entry (ptr, fixed bin); .sp call gcos_mme_fini_ (inc_ptr, increment); .sp .in 15 .un 15 1) mc_ptr is a pointer to the saved machine conditions at the time of the mme. (Not used) .sp .un 15 2) increment is the number of parameter words following the mme, to be skipped over when return in. (Not used) .if copyright_end  gcos_mme_inos_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 37647 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_inos_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$User Ring$ .oh 8 $$$6/12/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_inos_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_inos_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process a MME GEINOS. (It is also used to process the MME GEENOC at the end of a courtesy call.) .sp It looks up the device and IOC commands from the operation word (s) following the mme, in a tables of commands appropriate for the device type, and simulates the commands (as closely as possible) by means of calls to ios_. It sets increment to skip over the parameter words, and then returns, unless a courtesy call was requested. To process a countesy call, it saves the saved machine conditions and the increment in intermal static, sets increment equal to the address, relative to the mme, of the courtesy call routine, and returns. When the courtesy call is ended by a MME GEENDC, it restores the saved machine comditions and the increment, and returns going to the instruction after the last parameter word. In addition to the two entry points for mme processing, there are two entry points, callable from command level, used to turn on and off debugging output. .sp E__n_t_r_y: gcos_mme_inos_ .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_mme_inos_ external entry (ptr, fixed bin); .sp .nf .in 10 .un 5 call gcos_mme_inos_ (mc_ptr, increment); .sp .fi .in 15 .un 15 1) mc_ptr is a pointer to the saved machine conditions at the time of the name. (Input) .sp .un 15 2) increment is the number of parameter words following the mme, to be skipped over when returning. (To wake a courtesy call, increment is set, instead, to the address of the courtesy call routine relative to the mme.) (Input) .sp .in 0 E__n_t_r_y: gcos_mme_inos_$mme_endc .sp This entry restores machine conditions and returns to the instruction following the MME GEINOS, when a courtesy call is ended by a MME GEENOC. .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_mme_inos_$mme_endc external entry (ptr, fixed bin); .sp .nf .in 10 .un 5 call gcos_mme_inos_$mme_endc (mc_ptr, increment); .sp .fi .in 15 .un 15 1) mc_ptr is a pointer to the saved machine comditions at the time of the MME GEENDC. These machine conditions are changed to be those that were saved at the time of the MME GEINOS. (Input) .sp .un 15 2) increment is the number of parameter words following the MME GEINOS, to be skipped over when returning. (Output) .sp .in 0 E__n_t_r_y: gcos_mme_inos_$flip .sp This entry can be called from command level to turn on an off the I/O print switch. Each call flips the switch. When the switch is on, then in each call to gcos_mme_inos_, the file code is looked up in a list of filecodes to be traced (see gcos_mme_inos_$trace, below), and if it is in the list, the operation word, identification word, and the dcw list are call printed in octal on the console. .sp U__s_a_g_e .sp .in 13 .un 8 declare gcos_mme_inos_lflip external entry; .sp .in 10 .un 5 call gcos_mme_inos_$fileflip; .sp .in 0 E__n_t_r_y: gcos_mme_inos_$trace .sp This entry can be called from command level to set up a list of filecodes for which information is to be printed when the I/O print switch is on. Each call deletes any filecodes in the list before adding new ones. If a call is made with no filecodes as arguments, then tracing is enabled for all filecodes (whenever the print switch is on). .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_mme_inos_$trace ecternal entry options (variable); .sp .nf .in 10 .un 5 call gcos_mme_inos_$trace (fc2_ ..., fc_n); .sp .fi .in 15 .un 15 1) fc_i is a character string containing the file code of a file whose MME GEINOS calls are to be traced. (Input) .bp .in 0 N__o_t_e .sp Up to 20 filecodes may be specified. .if copyright_end  gcos_mme_laps_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 15876 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_laps_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/16/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_laps_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_laps_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process a MME GELAPS. This mme returns, in the q reqister, the cpu time used by the activity, in 64ths of a second. In the simulator, the time returned will include all the time used by the user's Multics process sence the activity started. This will include Multics overhead, plus any time used by interactions at the console, but not time used by other Multics uses. .sp The init entry point is called by gcos_run_activity_ to same, in internal static, the process time used, just before the activity is started. .sp E__n_t_r_y: gcos_mme_laps_ .sp U__s_a_g_e .sp declare gcos_mme_laps external entry (ptr, fixed bin); .sp call gcos_mme_laps (mc_ptr, increment); .sp .in 15 .un 15 1) mc_ptr is a pointer to the saved machine conditions at the time of the mme. (Input) .sp .un 15 2) increment is the number of parameter words following the mme, to be skipped over when returning. (Output) .sp .in 0 E__n_t_r_y: gcos_mme_laps_$init .sp This entry is called by gcos_run_activity to save the process elapsed time, just before an activity is started. .sp U__s_a_g_e .sp declare gcos_mme_laps_$init ext entry; .sp call gcos_mme_laps_$init; .if copyright_end  gcos_mme_more_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.2 11574 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_more_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/16/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_more_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_more_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process a MME GEMORE. .sp It interprets the request code in the first parameter word, and attempts to satisfy it. It it is unable to do so, it sets increment to 1, causing return to be made to the denial return ward. Otherwise, it sets increment to 2, causing return to be made to the success return word. .sp E__n_t_r_y: gcos_mme_more_ .sp U__s_a_g_e .sp declare gcos_mme_more_ ext entry (ptr, fixed bin); .sp call gcos_mme_more_ (mc_ptr, increment); .sp .in 15 .un 15 1) mc_ptr is a pointer to the saved machine conditions at the time of the mme. (Input) .sp .un 15 2) increment is the number of parameter words following the mme instruction, to be skipped when returning. (Output) .if copyright_end  gcos_mme_mrel_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 19692 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_mrel_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/18/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_mrel_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_mrel_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process a MME GEMREL. The number of words of upper and lower memory to be released are each truncated to be multiples of 1024. If lower memory is released, the entire contents of the gcos slave area segment is moved down by the number of words of lower memory released, thus simulating base address relaction. The number of words remaining allocated is increased, if necessary, to ensure that it is a multiple of 1024. The slave area segment is then truncated to the specified length. The increment argument is set to the return address relative to the MME GEMREL instruction focing control to pass to that address when this process returns. .sp An additional entry point is provided, to turn on a switch which causes this procedure to enter debug just before returning, so that breaks may be set in the program that was (preeumably) just loaded into the slave area. .sp E__n_t_r_y: gcos_mme_mrel_ .sp U__s_a_g_e .sp declare gcos_mme_mrel_ ext entry (ptr, fixed bin); .sp call gcos_mme_mrel_ (mc_ptr, increment); .sp .in 15 .un 15 1) mc_ptr is a pointer to the saved machine condition at the time of the mme. (Input) .sp .un 15 2) increment is the address, relative to the mme instruction that control is to pass to, when this procedure returns. (Output) .sp .in 0 E__n_t_r_y: gcos_mme_mrel_$set .sp This entry can be called from command level to turn on and off a switch which causes debug to be entered just before this procedure returns. Each call flizso the switch. .sp U__s_a_g_e .sp declare gcos_mme_check_$set ext entry; .sp call gcos_mme_check_$set; .if copyright_end  gcos_mme_processor_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 28602 .tr ! xx .m1 2 .oh 1 $$$_____________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_processor_ $ .oh 4 $$$_____________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/23/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $_____________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_processor_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $_____________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_processor_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process mme's occurring in the gcos slave program. It uses the mme type in the address field of the mme instruction as an index into a transfer rector (gcos_mme_caller_) to pass control to the proper processing routine for the mme. .sp It checks to see if a courtesy call is being processed, and if so, whether the mme is legal during a courtesy call. It collects statics on number of calls and time used, for each mme. .sp When the mme processing routine returns, this procedure modifies the saved machine conditions to force control to return to the instruction after the last parameter word following the mme instruction. .sp In addition to the main entry point, there are two additional entry points, used to turn on and off debugging output. .sp E__n_t_r_y: gcos_mme_processor_ .sp This entry is called by gcos_mme_check_ when it discovers that the fault was due to a gcos mme. .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_mme_processor_ external entry (char(*), ptr, ptr); .sp .in 10 .un 5 call gcos_mme_processor_ (fault_name, mc_ptr, info_ptr); .sp .fi .in 0 .in 15 .un 15 1) fault_name will always be "mme1" when this procedure is called. (Input) .sp .un 15 2) mc_ptr is a pointer to the saved machine conditions at the time of the fault. (Input) .sp .un 15 3) info_ptr is a pointer to information about software faults. (Not used) .sp .in 0 E__n_t_r_y: gcos_mme_processor_$mme_trace .sp This entry can be called from command level to turn an and off the mme trace switch. Each call flips the switch. When the switch is on, this procedure will print the mme name on the user's console, just before calling the processor for the mme. .sp U__s_a_g_e .sp declare gcos_mme_processor_$mme_trace external entry; .sp call gcos_nine_processor_$mme_trace; .sp There are no arguments .sp E__n_t_r_y: gcos_mme_processor_$watcher .sp This entry can be called from command level to set a watch on one particular word in the gcos slave area segment. The word is compared with its previous value, before and after the nine processor is called. If the word has changed, its new value is printed on the console. .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_mme_processor_$watcher external entry (char(*)); .sp .in 10 .un 5 call gcos_mme_processor_$watcher (location); .sp .fi .in 0 .in 15 .un 15 1) location is a character string giving the octal location to be watched. If the string is null, the watcher is turned off, and any location is was watching is forgotten. (Input) .if copyright_end  gcos_mme_relc_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 10584 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_relc_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/23/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_relc_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_relc_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process a MME GERELC. .sp Since asynchronous I/O is not currently implemented in the simulator, there will never be any outstanding I/O requess to wait for, so this procedure always return immediately. .sp E__n_t_r_y: gcos_mme_relc_ .sp U__s_a_g_e .sp declare gcos_mme_relc_ ext entry (ptr, fixed bin); .sp call gcos_mme_relc_ (me_ptr, increment); .sp .in 15 .un 15 1) mc_ptr is a pointer to the saved machine conditions at the time of the mme. (Input) .sp .un 15 2) increment is the number of words following the mme instruction, to be skipped over when returning. (Output) .if copyright_end  gcos_mme_rels_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 13401 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_rels_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/23/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_rels_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_rels_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process a MME GERELS. For each filecode in the list, the fib's are searched for a match. If none is found, the filecode is skipped, with no warning. If the files are to be deallocated, the "open" switch in the fib is turned off. Otherwise, the disposition code in the fib is set as specified in the list. If a disposition of "S" or "C" is being set, then if the PLUS in the fib is zero, it is set to the filecode. (This allows a subsequent activity to refer to the file using its filecode as a LUD on a $file card.) .sp E__n_t_r_y: gcos_mme_rels_ .sp U__s_a_g_e .sp declare gcos_mme_rels_ext entry (ptr, fixed bin); .sp call gcos_mme_rels_ (mc_ptr, increment); .sp .in 15 .un 15 1) mc_ptr is a pointer to the saved machine conditions at the time of the mme. (Input) .sp .un 15 2) increment is the number of words following the mme instruction, to be skipped over when returning. (Output) .if copyright_end  gcos_mme_rets_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 10026 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_rets_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$6/15/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_rets_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_rets_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process a MME GERETS. It turns off each PSW bit for which the corresponding bit in the q register is on, and returns the result in the q register. .sp E__n_t_r_y: gcos_mme_rets_ .sp U__s_a_g_e .sp declare gcos_mme_rets_ ext entry (ptr, increment); .sp call gcos_mme_rets_ (mc_ptr, increment); .sp .in 15 .un 15 1) mc_ptr is a pointer to the saved machine conditions at the time of the mme. (Input) .sp .un 15 2) increment is the number of parameter words following the mme, to be skipped over when returning. (Output) .if copyright_end  gcos_mme_road_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 10872 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_road_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/29/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_road_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_road_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process a MME GEROAD. Since asynchronons I/O not currently implemented in the simulator, there will never be any contstanding I/O requests to wait for, so this procedure always returns immediately. .sp E__n_t_r_y: gcos_mme_road_ .sp U__s_a_g_e .sp declare gcos_mme_road_ ext entry (ptr, fixed bin); .sp call gcos_mme_road_ (mc_ptr, increment); .sp .in 15 .un 15 1) mc_ptr is a pointer to the saved machine conditions at the time of the name. (Input) .sp .un 15 2) increment is the number of parameter words following the mme instruction, to be skipped over when returning. (Always zero for this mme.) (Output) .if copyright_end  gcos_mme_save_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 11547 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_save_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/29/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_save_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_save_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process a MME GESAVE. .sp It builds the preface, writes it on the file, writes the program on the file, and adds a catology entry for the program. It does not check for a program of the save name already in the file. The format of the catelog is not the same as that produced by the System Editor. .sp E__n_t_r_y: gcos_mme_save_ .sp U__s_a_g_e .sp declare gcos_mme_save_ ext entry (ptr, fixed bin); .sp call gcos_mme_save_ (mc_ptr, increment); .sp .in 15 .un 15 1) mc_ptr is a pointer to the saved machine conditions at the time of the mme. (Input) .sp .un 15 2) increment is the number of paramter words following the mme instruction, to be skipped over when returning. (Output) .if copyright_end  gcos_mme_sets_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 10152 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_sets_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$6/15/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_sets_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_sets_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process a MME GESETS. It turns on each bit in the PSW for which the corresponding bit of the q register is on, and returns the result in the q register. .sp E__n_t_r_y: gcos_mme_sets_ .sp U__s_a_g_e .sp declare gcos_mme_sets_ ext entry (ptr, fixed bin); .sp call gcos_mme_sets_ (mc_ptr, increment); .sp .in 15 .un 15 1) mc_ptr is a pointer to the saved machine conditions at the time of the mme. (Input) .sp .un 15 2) increment is the number of parameter words following the mme instruction, to be skipped when returning. (Output) .if copyright_end  gcos_mme_syot_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 16011 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_syot_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$6/15/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_syot_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_syot_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process a MME GESYOT. .sp Each call to this mme will write one 320 word block on the simulator's *so file. See gcos_sysout_dispose_ for more information about *so. The records, which are located via the fcb and the dcw, are examined for valid rew's and the end of the block is identified by either a) an involid rcw, or b) more than 320 words. The count in the dcw is not used. Any records past the 320 word limit are ignored. The activity number and account vid. Are placed in word 3 of the block. Status word 1 of the fcb is set, but not status word 2, since it is used for temporary storage by gefrc. .sp The "print file" form of the macro call is accepted, but the printing will not start immediately, as in the real GCOS; the file is merly placed on the simulator's sysout queue. .sp E__n_t_r_y: gcos_mme_syot_ .sp U__s_a_g_e .sp declare gcos_mme_syot_ext entry (ptr, fixed bin); .sp call gcos_mme_syot_ (mc_ptr, increment); .sp .in 15 .un 15 1) mc_ptr is a pointer to the saved machine conditions at the time of the mme. (Input) .sp .un 15 2) increment is the number of parameter words following the mme instruction, to be skipped over when returning. (Output) .if copyright_end  gcos_mme_time_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 11358 .tr ! xx .m1 2 .oh 1 $$$________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_mme_time_ $ .oh 4 $$$________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$6/15/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $________________$$$ .eh 2 $$$$ .eh 3 $ gcos_mme_time_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_mme_time_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process a MME GETIME. .sp It uses calls to clock_ date_time_ and decode_clock_value_, to obtain the local time, and extracts month, day, and year, placing them in the a register, and the number of 1/64 seconds since midnight (local standard time), placing it in the q register. .sp E__n_t_r_y: gcos_mme_time_ .sp U__s_a_g_e .sp declare gcos_mme_time_ ext entry (ptr, fixed bin); .sp call gcos_mme_time_ (mc_ptr, increment); .sp .in 15 .un 15 1) mc_ptr is a pointer to the saved machine conditions at the time of the mme. (Input) .sp .un 15 2) increment is the number of parameter words following the mme instruction, to be skipped over when returning. (Output) .if copyright_end  gcos_open_file_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 18972 .tr ! xx .m1 2 .oh 1 $$$_________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_open_file_ $ .oh 4 $$$_________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$User Ring$ .oh 8 $$$6/14/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $_________________$$$ .eh 2 $$$$ .eh 3 $ gcos_open_file_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $_________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_open_file_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to open a gcos file by assigning and initializing a file. It is called with the filecode of the file, and it returns a pointer to the file. If the file was already open, (i.e., a used file with a matching filecode was found to exist), then an indicator is returned, along with a pointer to the existing file. If a file cannot be assigned because they are all used, then gcos_error_ will be called to abort the job. .sp E__n_t_r_y: gcos_open_file_ .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_open_file_ entry (char(*), ptr, bit(17); .sp .nf .in 10 .un 5 call bcos_open_file_ (filecode, ptr, present .sp .fi .in 15 .un 15 1) filecode is the gcos file code of the file to be opened (e.g., ptr). (Input) .sp .un 15 2) ptr i a pointer to the file assigned to the file. (Output) .sp .un 15 3) present is net equal to "1"b if the file was already open a file was already assigned to the file. (Output) .sp .in 0 N__o_t_e_s .sp This routine assigns an "attach" name (i.e. a stream name to be used later, in a call to ios_$attach). .sp The filecode cannot be used as the attach name, because of the manipulation of filecodes that can take place during a bcos job. Thus, a unique attach name is created; it consists of the letter "g" followed by the ascii codes for the digits of he file number, in reverse order. That is, if file number 123 is assigned to the file, the attach name will be "g321." .sp This routine does no Multics I/O it merely assignes and intialings the file within the gcos simulator. .if copyright_end  gcos_print_file.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 18297 .tr ! xx .m1 2 .oh 1 $$$_________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_print_file $ .oh 4 $$$_________________$ .oh 5 $$$$ .oh 6 $$$Command$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$4/10/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $_________________$$$ .eh 2 $$$$ .eh 3 $ gcos_print_file $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $_________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_print_file, gpf .sp .oh 6 $$$Page %$ .oh 7 The gcos_print_file command will read a GCOS file in system standard format and output that file in ASCII. If a given record cannot be converted to ASCII the corresponding output line will be a message to that effect. .sp U__s_a_g_e .sp .nf gcos_print_file -option1_ ... -option_n argument1_ ... argument_n .sp .fi .in 15 .un 15 1) option _i may be chosen from the following list of options: .sp .un 15 -bf will cause suppression of nonconversion messages in the output. Default is to include these messages. .sp .un 15 -fi will cause input to be read from a file. This is the default. .sp .un 15 -lg will cause nonconversion messages to be placed in output. This is the default. .sp .un 15 -ti will causes input to be read from tape. Default is to read input from a file. .sp .un 15 -7 will cause seven track reading for tape input. This is the default. .sp .un 15 -9 will cause nine track reading for tape input. The default is to read 7-track tape. .sp .un 15 2) argument_i is the name of the input. For segment input, this name corresponds to the relative path name of the GCOS object segment. For tape input, this name corresponds to the tape label. The number of arguments is independent of the number of options. .sp .in 0 N__o_t_e_s .sp Once an option is specified, it remains in force unless nullified by another option. .sp If either the -7 or -9 option is specified, the "-tp" option must be in force. .if copyright_end  gcos_prmfl_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 11025 .tr ! xx .m1 2 .oh 1 $$$_____________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_prmfl_ $ .oh 4 $$$_____________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$User Ring$ .oh 8 $$$6/15/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $_____________$$$ .eh 2 $$$$ .eh 3 $ gcos_prmfl_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $_____________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_prmfl_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process and PRMFL control cards. It will open the file, using the given filecode, set the permission and access according to the information on the control card, and create (or attach) a segment in the Multics storage system having the Multics path name given on the control card. .sp It will accept a GCOS file string, and translate it into a Multics path name or it will accept a Multics path name (a departure from real GCOS). .sp E__n_t_r_y: gcos_prmfl_ .sp U__s_a_g_e .sp .in 13 .un 8 declare gcos_prmfl_ external entry (char(80)); .sp .in 10 .un 5 call gcos_prmfl_ (card); .sp .in 10 .un 10 1) card is the 80-character ASCII image of the card to be processed. (Input) .if copyright_end  gcos_read_card_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 17541 .tr ! xx .m1 2 .oh 1 $$$_________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_read_card_ $ .oh 4 $$$_________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/23/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $_________________$$$ .eh 2 $$$$ .eh 3 $ gcos_read_card_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $_________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_read_card_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to read a card from the canonicalized job deck stored in from 1 to 4 gcos job deck segments in the process directory. .sp The function of the $ SELECT card is implemented in this procedure: when a $ SELECT card is encountered, the pathname and current read pointer of the current input segment is saved in a stack, and input is switched to the selected segment. .sp E__n_t_r_y: gcos_read_card_ .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_read_card_ ext entry (pointer, fixed bin, bit(2)); .sp .in 10 .un 5 call gcos_read_card_ (cardp, cardl, rcrd_type); .sp .fi .in 0 .in 15 .un 15 1) cardp is a pointer to an 80-character string containing the card. (Output) .sp .un 15 2) cardl is the length in characters of the card. It will be 80 for all except binary cards. (Output) .sp .un 15 3) rcrd_type is a code indicating the type of card read: .sp "01"b indicates a binary card; .br "10"b indicates an ascii card. .sp .in 0 E__n_t_r_y: trace .sp This entry is used to turn an and off the switch that causes rdir cards to be printed. Each time it is entered, it flips the switch. (Control cards other than rdir are printed by the main gcos routine, if control card printing requested.) .sp U__s_a_g_e .sp declare gcos_read_card_$trace external entry; .sp call gcos_read_card_$trace; .sp There are no arguments. .if copyright_end  gcos_read_line_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 22104 .tr ! xx .m1 2 .oh 1 $$$_________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_read_line_ $ .oh 4 $$$_________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$4/9/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $_________________$$$ .eh 2 $$$$ .eh 3 $ gcos_read_line_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $_________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_read_line_ .sp .oh 6 $$$Page %$ .oh 7 The gcos_read_line_ procedure will read a line of input in system standard format and return that line to the caller with a flag indicating the type of line read and a flag indicating when an EOF was reached. This procedure requires that input first be attached to input_stream and that gcos_read_line_$read_line_init be called. .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_read_line_ entry (ptr, fixed bin, bit(1) aligned, bit(1) aligned, fixed bin(35)); .sp .nf .in 10 .un 5 call gcos_read_line_ (line_ptr, line_len, data_type, eof, code); .sp .fi .in 20 .un 20 1) line_ptr is a pointer to an aligned user-provided buffer whose length is 980 bits. (Input) .sp .un 20 2) line_len is the length of the line read. (Output) .sp .un 20 3) data_type is a flag indicating the type of data which was read: .sp .in 0 .nf "1"b = bcd; "0"b = binary. (Output) .sp .fi .in 20 .un 20 4) eof is a flag indicating when end of input has been reached: .sp .in 0 .nf "0"b = not end of input; "1"b = end of input. (Output) .sp .fi .in 20 .un 20 5) code is a status code. (Output) .sp .in 0 N__o_t_e .sp Once end of input has been read, it will no longer be possible to call gcos_read_line_ unless gcos_read_line_$read_line_init is again called. .sp E__n_t_r_y: $read_line_init .sp This entry is used to initialize input prior to calling gcos_read_line_. Its usage requires that input first be attached to input_stream. .bp .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_read_line_$read_line_init entry bit(1) aligned, fixed bin(35)); .sp .nf .in 10 .un 5 call gcos_read_line_$read_line_init (file_input, code); .sp .fi .in 15 .un 15 1) file_input is _o_n if input is from a file; is _o_f_f if input is from tape. (Input) .sp .un 15 2) code is a status code. (Output) .if copyright_end  gcos_run_activity_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 17109 .tr ! xx .m1 2 .oh 1 $$$____________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_run_activity_ $ .oh 4 $$$____________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/23/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $____________________$$$ .eh 2 $$$$ .eh 3 $ gcos_run_activity_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $____________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_run_activity_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to run a gcos activity. It performs the following mojor functions: .sp .in 4 .un 4 1) perform house keeping chores on fibs and associated files: .sp .un 4 2) create the gcos slave area segment if it does not already exist, set it to the requested length, and then remove append permission: .sp .un 4 3) set up condition handlers for mme's and other faults: .sp .un 4 4) initialize the slave prefix in the gcos slave area segment with a MME GECALL, and other information, such as: program name, activity number, load limits, ident card, etc. .sp .un 4 5) set can external static label variable to point to a statement in this procedure to be returned to when the gcos activity terminates .sp .un 4 6) set cpu timer information .sp .un 4 7) call a procedure gcos_set_slave_ which will load the base address register and then transfer to the gcos slave program in BAR mode. .sp .in 0 when the activity terminates: .sp .in 4 .un 4 1) compute and print timer information .sp .un 4 2) dispose of files, by calling gcos_cleanup_ .sp .un 4 3) return to gcos_ (the main simulator procedure), to continue through the job deck. .sp .in 0 E__n_t_r_y: gcos_run_activity_ .sp U__s_a_g_e .sp declare gcos_run_activity_external entry; .sp call gcos_run_activity; .sp There are no arguments .if copyright_end  gcos_snumb_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 8262 .tr ! xx .m1 2 .oh 1 $$$_____________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_snumb_ $ .oh 4 $$$_____________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/17/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $_____________$$$ .eh 2 $$$$ .eh 3 $ gcos_snumb_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $_____________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_snumb_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process the $ SNUMB control card. .sp It checks for a previous $ SNUMB card (an error), and it saves the job identifier. .sp E__n_t_r_y: gcos_snumb_ .sp U__s_a_g_e .sp declare gcos_snumb_ external entry (char(80)); .sp call gcos_snumb_ (card); .sp .in 9 .un 9 1) card is the 80-character ASCII image of the control card to be processed. (Input) .if copyright_end  gcos_stat_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 57132 .tr ! xx .m1 2 .oh 1 $$$____________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_stat_ $ .oh 4 $$$____________$ .oh 5 $$$$ .oh 6 $$$Data Base$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/21/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $____________$$$ .eh 2 $$$$ .eh 3 $ gcos_stat_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $____________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_stat_ .sp .oh 6 $$$Page %$ .oh 7 This segment contains external static storage used by the GCOS environment simulator. It is written in ALM. The pl1 declarations for The entries in this segment are contained in gcos_ext_stat_.incl.pl1. To save space, those declare statements are not reproduced completely here; instead, the descriptive information from them is shown to bhe right of each entry name. (The phrase "external static" which applies to all, is not shown.) .sp E__n_t_r_y: gcos_stat_$stat_size fixed bin .sp Contains the size in words of the external static segment. .sp E__n_t_r_y: gcos_stat_$init_switches bit(72) aligned .sp Switches used to indicate that certain internal static variables, including label arrays, have been initialized. .sp E__n_t_r_y: gcos_stat_$fibsize fixed bin .sp Contains the size in words of one file information block (fib). The structure of a fib is described in gcos_fib_.incl.pl1 .sp E__n_t_r_y: gcos_stat_$fibent fixed bin .sp This entry contains the number of file information blocks that are provided in the simulator. .sp E__n_t_r_y: gcos_stat_$fib ext static .sp This is an area, fibsize*fibent words long, reserved for file information blocks. .sp E__n_t_r_y: gcos_stat_$flags fixed bin .sp This is a word reserved for switches. Each bit has a meaning. The names of each bit is given in gcos_flags_.incl.pl1. .sp E__n_t_r_y: gcos_stat_$nondollar char(3) .sp Contains the filecode where nondollar cards are to be written, during an activity definition. .sp E__n_t_r_y: gcos_stat_$abort_return .sp Contains a label variable which points to the return statement in gcos. Used for both normal and abort job endings, to force the unwinder to clean up the stack, by doing a non-local gots. .sp E__n_t_r_y: gcos_stat$excflg char(3) .sp Contains the filecode where dollar sign control cards are to be written, during an activity defintion. .sp E__n_t_r_y: gcos_stat$activl char(8) .sp Contains ascii representation of the activity number, and the account ID (taken from the $SNUMB card). .sp E__n_t_r_y: gcos_stat$shart_actid .sp Contains compacted (bcd) form of activity number and account I.D. .sp E__n_t_r_y: gcos_stat$ident char(60) .sp Contains colums 16-72 of a $ IDENT card. .sp E__n_t_r_y: gcos_stat$psw bit(36) .sp Contains program switch word. .sp E__n_t_r_y: gcos_stat$incode fixed bin .sp Contains incode card translation switches. .sp E__n_t_r_y: gcos_stat$excmsk bit(36) .sp Contains one switch for each activity in a job, saving whether an execution activity follows this activity. .sp E__n_t_r_y: gcos_stat$activity_no fixed bin .sp Contains the number of the activity currently being defined or run. .sp E__n_t_r_y: gcos_stat$activity_name char(8) .sp Contains the name of the activity currently being defined or run. .sp E__n_t_r_y: gcos_stat$time_limit fixed bin(71) .sp Contains time limit for current activity. .sp E__n_t_r_y: gcos_stat$sysout_limit fixed bin .sp Contains sysout line limit for current activity. .sp E__n_t_r_y: gcos_stat$storage_limit fixed bin .sp Contains storage limit for current activity. .sp E__n_t_r_y: gcos_stat$max_mem fixed bin .sp Contains largest amount of storage ever available to an activity, under the simulator. .sp E__n_t_r_y: gcos_stat$ldress fixed bin .sp Contains size of loader shared storage for current activity. .sp E__n_t_r_y: gcos_stat$gk fixed bin .sp Switch used by getfield procedure. .sp E__n_t_r_y: gcos_stat$mme_rtrn .sp Contains a label variable which points to the activity cleanup section of gcos_run_activity_. Used during normal termination of an activity, to force the unwinder to clean up the stack, by doing a non-local go to. .sp E__n_t_r_y: gcos_stat$abort_code (char(2) .sp Contains the abort code from the gcos program. .sp E__n_t_r_y: gcos_stat$sysout_queue (20)char(200) .sp Contains full pathnames of all sysout files produced by the job. .sp E__n_t_r_y: gcos_stat$sqindex fixed bin .sp Contains current offset of nexe unused entry in sysout_queue. .sp E__n_t_r_y: gcos_stat$job_real_time fixed bin(71) .sp Contains job start time, in microseconds, from clock_. .sp E__n_t_r_y: gcos_stat$job_cpu_time fixed bin(71) .sp Contains process cpu time in microseconds, at start of job. .sp E__n_t_r_y: gcos_stat$gcos_seg .sp Contains pointer to the gcos slave area segment in the process directory. .sp E__n_t_r_y: gcos_stat$statistics 2 total time (34) fixed bin(71), .br 2 count(34) fixed bin(71); .sp Contains statistics on the usage of each of the 34 mme types. .sp E__n_t_r:y gcos_stat$last_mme fixed bin .sp Contains name of last mme executed, for debugging purpose. .sp E__n_t_r_: gcos_stat$job_deck pointer .sp Contains pointer to first segment in process directory, containing canonicalized job deck. .sp E__n_t_r_y: gcos_stat$id_size fixed bin .sp Contains size, in characters, of the canonicalized job deck. .sp E__n_t_r_y: gcos_stat$p char(4) .sp Contains attach name given to first p* file that was allocated. .sp E__n_t_r_y: gcos_stat$e char(4) .sp Contains attach name given to first c* file allocated. .sp E__n_t_r_y: gcos_stat$gs .sp Contains attach name of *gsfile .sp E__n_t_r_y: gcos_stat$so .sp Contains attach name of *so file. .sp E__n_t_r_y: gcos_stat$np char(1) .sp Contains a new page character. .sp E__n_t_r_y gcos_stat$nl char(4) .sp Contains four new line characters .sp E__n_t_r_y: gcos_stat$sig_ptr ptr .sp Contains pointer that was in signal pointer in stack header at invocation of gocs command. .if copyright_end  gcos_syot_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 10215 .tr ! xx .m1 2 .oh 1 $$$____________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_syot_ $ .oh 4 $$$____________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$5/29/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $____________$$$ .eh 2 $$$$ .eh 3 $ gcos_syot_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $____________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_syot_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to process $ SYSOUT cards. The simulator writes all sysout on file *so; this procedure will make the filecode on the $ SYSOUT card synonymous with *so by creating a fib identical to the one for *so (except for the filecode) and attaching it to the save Multics output stream that *so is attached to. The extra fib is created only so that MME GEFCON will work. .sp E__n_t_r_y: gcos_syot .sp U__s_a_g_e .sp declare gcos_syot_ external entry (char(80)); .sp call gcos_syot_ (card); .sp .in 10 .un 10 1) card is the 80-character ASCII image of the card to be processed. (Input) .if copyright_end  gcos_sysout_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 11178 .tr ! xx .m1 2 .oh 1 $$$______________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_sysout_ $ .oh 4 $$$______________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$6/15/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $______________$$$ .eh 2 $$$$ .eh 3 $ gcos_sysout_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $______________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_sysout_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to output sysout files at the end of a job. .sp By default, it will convert to ASCII, and schedule for dprinting and deleteing, all files on the sysout queue. If the -hold or the -list options are in effect, then it will convert nofiles, or convert (but not dprint or delete) print files only, respectively. It will print on the console, the pathnames of any sysout that were not schuduled for dprint-and-delete-ing. If the -list option is in effect, the names of the converted files are printed, instead of the BCD sysout files. .sp E__n_t_r_y: gcos_sysout_ .sp U__s_a_g_e .sp declare gcos_sysout_ext entry; .sp call gcos_sysout_; .sp There are no arguments. .if copyright_end  gcos_sysout_dispose_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 10620 .tr ! xx .m1 2 .oh 1 $$$______________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_sysout_dispose_ $ .oh 4 $$$______________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$6/15/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $______________________$$$ .eh 2 $$$$ .eh 3 $ gcos_sysout_dispose_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $______________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_sysout_dispose_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to dispose of sysout files at the end of an activity and at the end of a job. .sp The procedure is called with the filecode of a sysout file. Each record of the file is appended to either p* or c* (print or punch file) depending on the media code in the record. Then the file reinitialized to the state it had when it was opened. .sp E__n_t_r_y: gcos_sysout_dispose_ .sp U__s_a_g_e .sp declare gcos_sysout_dispose_external entry (char(*)); .sp call gcos_sysout_dispose_ (fc); .sp .in 10 .un 10 1) fc is the filecode of the sysout file to be disposed of. (Input)  gcos_time_convert_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 10845 .tr ! xx .m1 2 .oh 1 $$$____________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_time_convert_ $ .oh 4 $$$____________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$6/15/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $____________________$$$ .eh 2 $$$$ .eh 3 $ gcos_time_convert_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $____________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_time_convert_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to format a time for printing. Input is a fixed bin(52) time in microseconds. Output is a character string of length 19, of the following form: .sp "mmmm mins ss.t secs" .sp where m = minutes; .sp s = seconds; .sp t = tenths of seconds. .sp E__n_t_r_y: gcos_time_convert_ .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_time_convert_external entry (fixed bin 52), char(19)); .sp .in 10 .un 5 call gcos_time_convert_ (bin_time, char_time); .sp .fi .in 0 1) bin_time is time in microseconds. (Input) .sp 2) char_time is time in minutes, seconds, and tenths. (Output) .if copyright_end  gcos_update_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 8550 .tr ! xx .m1 2 .oh 1 $$$______________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_update_ $ .oh 4 $$$______________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$6/15/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $______________$$$ .eh 2 $$$$ .eh 3 $ gcos_update_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $______________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_update_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulators to process $UPDATE cards. It sets the non-dollar filecode to a*, turns on bit 9 of the PSW, opens and creates the a* file, and writes theUPDATE card on it. .sp E__n_t_r_y: gcos_update_ .sp U__s_a_g_e .sp declare gcos_update_external entry (char(80)); .sp call gcos_update_ (card); .sp .in 10 .un 10 1) card is the 80-character ASCII image of the card to be processed. (Input) .if copyright_end  gcos_user.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 41580 .tr ! xx .m1 2 .oh 1 $$$___________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_user $ .oh 4 $$$___________$ .oh 5 $$$$ .oh 6 $$$Special Command$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$01/15/74$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $___________$$$ .eh 2 $$$$ .eh 3 $ gcos_user $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $___________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_user .sp .oh 6 $$$Page %$ .oh 7 This command is used by the GCOS administrator to maintain the gcos_user_table_segment. .sp E__n_t_r_y: gcos_user$add .sp U__s_a_g_e .sp The procedure will request the following data: .sp .nf gcos_userid: These fields correspond to the gcos_password: fields on the $USERID card of the GCOS operating system. .sp multics_person: These fields make up the multics_project: Multics userid (person.project) to be used when the gcos_daemon submits an absentee process from a GCOS job card deck or IMCV tape. The first $USERID card in the job will be used by the daemon. (If there is no $USERID card, the daemon submits the process under the anonymous.Gcos ID. .sp .fi .in 0 .fi .in 0 N__o_t_e_s .sp If the operation is successful, a message will so indicate; otherwise one of several "failure" messages will be printed. .sp Entries are placed into the table in ASCII sequence by gcos_userid to facilitate searching for ID validation. .sp The only characters acceptable for gcos_user and gcos_password are the following: (small) "a" through (small) "z", "O" through "9" and "." (period). .sp Attempts to use any other characters will be rejected. .sp (GCOS job control cards (records) are comprised of 6-bit BCD characters. The BCD alphabetic characters are converted to lower case ASCII for processing by the daemon and the GCOS Evironment Simulator. Thus, the lower case table usage). .sp See E__r_r_o_r_M__e_s_s_a_g_e_s. .sp .bp E__n_t_r_y: gcos_user$delete .sp U__s_a_g_e .sp gcos_user$delete gcos_userid_1 .. gcos_userid_n .sp N__o_t_e_s .sp The given gcos_userids will be deleted from the gcos_user_table_. Entries not found in the table will be identified and the remaining items will be processed. .sp See E__r_r_o_r_M__e_s_s_a_g_e_s. .sp E__n_t_r_y: gcos_user$print .sp U__s_a_g_e .sp gcos_user$print (...) .sp Key -header, -hdr .sp No additional arguments are used. This key causes the fields of the gcos_user_table_ header to be printed out in their appropriate representations. .sp -gcos_userid, -gid .sp This key, followed by one or more gcos_userids, will cause the fields in the respective table entries to be printed. .sp N__o_t_e_s .sp Entries not found in the table will be identified and skipped. .sp See E__r_r_o_r_M__e_s_s_a_g_e_s .sp E__n_t_r_y: gcos_user$init_table .sp This entry calls gcos_user_$init_table and interprets the status return. Nothing is printed if the operation is successful. .sp U__s_a_g_e .sp gcos_user$init_table .bp N__o_t_e_s .sp The gcos_user_table_ segment must have a zero bitcount before this function can be executed. .sp E__r_r_o_r_M__e_s_s_a_g_e_s .sp The following status codes are generated by the gcos_user_ subroutine. These codes are in addition to the standard system status codes and are distinguished from the standard system codes by having values less than, or equal to the value of gut_et_count. .sp C__o_d_e M__e_a_n_i_n_g .sp 1 gcos_userid not found in the table. .sp 2 gcos_userid and password don't agree. .sp 3 gcos_user_table_ destroyed. .sp 4 gcos_user_table_ is full. The entry is not .br added. .sp 5 gcos_userid is already in the table. .sp 6 gcos_user_table_ is not found. .sp 7 gcos_user_table_ is empty. .sp 8 gcos_user_table_ has zero bit count. .sp 9 gcos_userid and index don't agree. .sp 10 table bit count is >0. It can't initialize. .if copyright_end  gcos_user_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 38583 .tr ! xx .m1 2 .oh 1 $$$____________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_user_ $ .oh 4 $$$____________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$01/29/74$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $____________$$$ .eh 2 $$$$ .eh 3 $ gcos_user_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $____________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_user_ .sp .oh 6 $$$Page %$ .oh 7 This subroutine performs service functions for the "gcos_user_" command and the gcos SysDaemon. It is the focal point for all accesses to the gcos_user_table_ segment. .sp All entries into gcos_user_ check to see if the gcos_user_table_ has been initiated. If not, an internal subroutine is called to do this. .sp When the table segment is first initiated, the structure and header data are validated. .sp E__n_t_r_y: gcos_user_$add .sp This entry inserts a given entry into the table. The active count is incremented. .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_user_$add entry (ptr, fixed bin(35)); .sp .in 10 .un 5 call gcos_user_$add (gutep, gut_code); .sp .fi .in 20 .un 20 1) gutep is a pointer to the entry to be inserted into the gcos_user_table_ segment. (Input) .sp .un 20 2) gut_code is the return status code. This code can be either a standard status code or a special gcos_user_ status code. All values >1000 are assumed to be standard status codes. (Output) .sp .in 0 N__o_t_e_s .sp Entries are checked for duplication of the gcos_userid field before insertion. Duplicates are not allowed. Entries are inserted into the table in ASCII sequence by gcos_userid. .sp E__n_t_r_y: gcos_user_$delete .sp This entry deletes the given table entry. The table is compacted, if nesessary, and the active_count is decremented. .bp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_user_$delete (char (12), fixed bin, fixed bin(35)); .sp .nf .in 10 .un 5 call gcos_user_$delete (gcos_userid, gute_index, gut_code); .sp .fi .in 20 .un 20 1) gcos_userid is the "gcos_userid" to be deleted. (Input) .sp .un 20 2) gute_index is the index (subscript) of the table entry to be deleted. (Input) .sp .un 20 3) gut_code is as before. (Output) .sp .in 0 N__o_t_e_s .sp The gcos_userid of the table entry selected by the gute_index must agree with the ID supplied in the calling sequence. .sp E__n_t_r_y: gcos_user_$get_table_ptr .sp This entry returns a pointer to the gcos_user_table_ segment. .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_user_$get_table_ptr entry (ptr, fixed bin(35)); .sp .nf .in 10 .un 5 call gcos_user_$get_table_ptr (gutp, gut_code); .sp .fi .in 20 .un 20 1) gutp is the pointer to the gcos_user_table_ segment. It will be set to null if any errors are detected. (Output) .sp .un 20 2) gut_code is as before. (Output) .sp .in 0 E__n_t_r_y: gcos_user_$validate .sp This entry is used to validate the gcos_userid and gcos_password and return corresponding Multics person and project values. .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_user_$validate entry (char(12), char(12), ptr, fixed bin(35)); .sp .nf .in 10 .un 5 call gcos_user_$validate (gcos_userid, gcos_password, gutep, gut_code); .sp .fi .in 20 .un 20 1) gcos_userid is the gcos userid to be validated. (Input) .sp .un 20 2) gcos_password is the associated gcos password. (Input) .sp .un 20 3) gutep is the return pointer pointing to the entry in the table matching the gcos_userid. This pointer will be set to null if the entry is not found or if the userid and password do not agree. (Output) .sp .un 20 4) gut_code is the status returned, as before. (Output) .sp .in 0 E__n_t_r_y: gcos_user_$init_table .sp This entry initializes all header data in the gcos_user_table_ segment. .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_user_$init_table_ entry (fixed bin(35)); .sp .in 10 .un 5 call gcos_user_$init_table (gut_code); .sp .fi .in 20 .un 20 1) gut_code is as before. (Output) .sp .in 0 N__o_t_e_s .sp The table must have its bit count set to zero before initialization is allowed. .if copyright_end  gcos_user_table_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 43254 .tr ! xx .m1 2 .oh 1 $$$__________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_user_table_ $ .oh 4 $$$__________________$ .oh 5 $$$$ .oh 6 $$$Data Base$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$9/24/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $__________________$$$ .eh 2 $$$$ .eh 3 $ gcos_user_table_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $__________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_user_table_ .sp .oh 6 $$$Page %$ .oh 7 The segment "gcos_user_table_" is accessible only by the SysDaemons and the GCOS Administrator. It contains the GCOS userids and passwords of all GCOS Environment users who wish to access "permanent GCOS files" within the Multics Storage System. .sp The table is used primarily by the GCOS daemon to validate GCOS userid$password values found in a GCOS "job stream". When the entry is validated, the GCOS daemon uses the Multics userid (person.project) when it submits the GCOS "job" as a Multics absentee process. .sp The table is defined by two include files "gcos_user_table_hdr_.incl.pl1" and "gcos_user_table_entry_.incl.pl1". The "hdr" and "entry" incl's are both included in "gcos_user_table_.incl.pl1". .sp .nf declare gutp ptr internal static init (null); .sp .nf declare 1 gcos_user_table_based (gutp), 2 gut_version_no fixed bin, 2 gut_hdr_len fixed bin, 2 gut_global_ctl_len fixed bin, 2 gut_entry_len fixed bin, 2 gut_last_update fixed bin (71), 2 gut_updater_id char (32), 2 gut_max_count fixed bin, 2 gut_active_count fixed bin, 2 gut_first_entry_index fixed bin, 2 gut_last_entry_index fixed bin, 2 gut_filler (46) fixed bin, 2 gut_global_ctl, 3 gut_global_ctl_filler (64) fixed bin, 2 gut_entry (gut_max_count), 3 gut_entry_status fixed bin, 3 gut_entry_filler (31) fixed bin; .sp .fi .in 26 .un 26 1) gutp is used to access the table. It is defined as internal static so that the table need be initiated only once per process. .sp .un 26 2) gcos_user_table_ is the table itself. .sp .un 26 3) gut_version_no is the current version of the table format. The current version is 1. .sp .un 26 4) gut_hdr_len is the length of the table up to the first entry. Note that this includes the length of the global control section within the header. .sp .un 26 5) gut_global_ctl_len is the length of the section within the header for global control over all the entries. .sp .un 26 6) gut_entry_len is the length of each entry. .sp .un 26 7) gut_last_update is the clock reading at the time of the last update to this data base. .sp .un 26 8) gut_updater_id is the Multics userid (person.project) of the process which last initialized the table. .sp .un 26 9) gut_max_count is an arbitrary, artificial limit to the maximum size of the table. All procedures concerned with table max size use this value. .sp .un 26 10) gut_active_count is the number of entries currently in the table. The "bitcount" of the table must correspond to the number of active entries. .sp .un 26 11) gut_first_entry_index is not used at present. .sp .un 26 12) gut_last_entry_index is not used at present. .sp .un 26 13) gut_global_ctl is not used at present. .sp .un 26 14) gut_entry is the block for each entry as described under gcos_user_table_ entry_.incl.pl1. .sp .in 0 .nf declare gutep ptr; .sp .nf declare 1 gcos_user_table_entry_ based, 2 gute_status fixed bin, 2 gute_filler_1 fixed bin, 2 gute_gcos_userid char (12), 2 gute_gcos_password char (12), 2 gute_multics_person char (22), 2 gute_multics_project char (9), 2 gute_ctl, 3 gute_ctl_filler (15) fixed bin; .sp .fi .in 26 .un 26 1) gutep is a pointer to an individual entry. .sp .un 26 2) gcos_user_table_entry is the entry itself. .sp .un 26 3) gute_status is not used at present. Currently, if an entry is in the table, it is active. .sp .un 26 4) gute_gcos_userid is the "userid" for the user found on the GCOS "$USERID" control card. .sp .un 26 5) gute_gcos_password is the "password" for the user found on the GCOS "$USERID" control card. .sp .in 26 .un 26 6) gute_multics_person is the person name of the Multics user identification. .sp .un 26 7) gute_multics_project is the project name of the Multics user identification. .sp .un 26 8) gute_ctl is not used at present. .if copyright_end  gcos_write_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 27090 .tr ! xx .m1 2 .oh 1 $$$_____________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_write_ $ .oh 4 $$$_____________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$6/15/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $_____________$$$ .eh 2 $$$$ .eh 3 $ gcos_write_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $_____________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_write_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used by the GCOS environment simulator to write a record on a gcos file. Records are written in bcd, in gcos standard format. Certain ASCII characters are recognized and translated to printer control information. The rest of the ascii characters are translated to bcd, using gcos_assci_gebcd_. .sp If the file is not open, it will be opened, using gcos_open_file_ and a corresponding scratch segment will be created, using gcos_create_file_. .sp Records are buffered into 320 word blocks, which are written into the specified file, using ios_. If the length of the record is zero, and end of file record will be written. .sp Entries are provided to force a partially full buffer to be written out, and to write files whose recrods are already in bcd format. .sp E__n_t_r_y: gcos_write_ .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_write_ext entry (char(*), char(*), bit(8)); .sp .in 10 .un 5 call gcos_write_ (filecode, record, reportcode); .sp .fi .in 0 .in 15 .un 15 1) filecode is the gcos filecode of the file to be written on. (Input) .sp .un 15 2) record is the record to be written. (Input) .sp .un 15 3) reportcode is the gcos report code, to be placed in the record header. (Input) .sp .in 0 E__n_t_r_y: gcos_write_$bcd .sp This entry is used when the record is already in bcd format. .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_writebcd ext entry (char(*), char(*), bit(8)); .sp .in 10 .un 5 call gcos_write_$bcd (attname, record, reportcode); .sp .fi .in 0 .in 15 .un 15 1) attname is the Multics stream anme of the file to be written. (Input) .sp .un 15 2) record is the bcd record to be written. (Input) .sp .un 15 3) reportcode is the gcos report code, to be placed in the record header. (Input) .sp .in 0 E__n_t_r_y: gcos_write_$force .sp This entry is used to force out the contents of a buffer. .sp U__s_a_g_e .sp declare gcos_write_$force ext entry (char(*)); .sp call gcos_write_$force (filecode); .sp .in 15 .un 15 1) filecode is the gcos filecode of the file whose buffer is to be forced out. (Input) .sp .in 0 E__n_t_r_y: gcos_write_$force_bcd .sp This entry is used to force out the contents of a buffer of a bcd file. .sp U__s_a_g_e .sp declare gcos_write_$force_bcd ext entry (char(*); .sp call gcos_write$force_bcd (attname); .sp .in 15 .un 15 1) attname is the Multics stream name of the bcd file whose buffer is to be forced out. (Input) .if copyright_end  gcos_write_line_.sps.runoff 10/17/74 1250.8rew 10/17/74 1250.8 13482 .tr ! xx .m1 2 .oh 1 $$$__________________$ .oh 2 $$$$ .oh 3 $MPM SYSTEM PROGRAMMERS' SUPPLEMENT$$ gcos_write_line_ $ .oh 4 $$$__________________$ .oh 5 $$$$ .oh 6 $$$Internal Interface$ .oh 7 $$$Administrative/User Ring$ .oh 8 $$$4/10/73$ .m2 2 .m3 2 .m4 2 .if copyright_begin .eh 1 $__________________$$$ .eh 2 $$$$ .eh 3 $ gcos_write_line_ $$MPM SYSTEM PROGRAMMERS' SUPPLEMENT$ .eh 4 $__________________$$$ .eh 5 $$$$ .eh 6 $Page %$$$ N__a_m_e: gcos_write_line_ .sp .oh 6 $$$Page %$ .oh 7 This procedure is used to convert a binary or GCOS record to ASCII and writes the result on the supplied stream name user_output. .sp U__s_a_g_e .sp .nf .in 13 .un 8 declare gcos_write_line_ entry (ptr, bit(1) aligned, fixed bin(35)); .sp .nf .in 10 .un 5 call gcos_write_line_ (line_ptr, brief, type, code); .sp .fi .in 15 .un 15 1) line_ptr is a pointer to the input binary or BCD line. (Input) .sp .un 15 2) brief is a flag indicating whether conversion error messages should be written on the output stream: .sp .in 0 .nf "1"b = don't write messages; "0"b = write messages. (Input) .sp .fi .in 15 .un 15 3) type is a flag indicating the type of data to be converted and written: .sp .in 0 .nf "1"b = BCD; "0"b = binary. (Input) .sp .fi .in 15 .un 15 4) code is a status code. (Output) .sp .in 0 N__o_t_e .sp Code will be returned as 1 if a conversion error occurs. .if copyright_end  env_data_structures.runoff 03/29/79 1518.2rew 04/03/77 1351.3 405 .if l1h "Data Structures" To be supplied.  env_design.runoff 03/29/79 1518.2rew 04/03/77 1351.3 275850 .if l1h "Design" .if l2h "Design Issues" The most significant design decision made during the development of the simulator was where to put the interface between the simulator and the GCOS software - i.e., how much of the GCOS software could be taken directly from a GCOS Total System tape and run under Multics, and how much would have to be simulated. .sp It was decided to take only non-privileged slave software from the Total System Tape, and simulate all the rest. The class of non-privileged slave software includes compilers, assemblers, file utility programs, the loader, and the subroutine library used by the loader. It excludes all GCOS hardcore software, slave service area (SSA) software, and any other software that uses the .EMM (Enter Master Mode) MME to access data bases in the GCOS hardcore. Thus, the GCOS control card processor, the allocator, the MME handlers, the GCOS time sharing system, and various other privileged slave programs, are either simulated, or not supported. .sp This means that the simulator must be able to read and interpret control cards, allocate files, perform I/O, intercept MME's and perform the requested actions, collect and dispose of sysout, and provide an area for slave software to execute in. .sp The chosen interface has the advantage that it is documented in user manuals and can therefore be understood and simulated, and undocumented changes are unlikely to be made to it. .sp It has the disadvantage that it excludes a large amount of GCOS software, including the control card interpreter and the MME handlers. This is the software that actually defines the interface described in the user manuals, and it would be desirable to run this software under Multics in order to simulate perfectly the user interface, and to keep the simulation up to date with any changes made to that interface. However, the GCOS hardcore interface that is presented to the control card and MME processors is not as well documented as is the user interface, and is subject to more frequent (and undocumented) changes. Also, aside from the problems of interface specifications, and changes to them, the GCOS hardcore interface would be more difficult to simulate, for a variety of reasons having to do with differences in the address-space environment between Multics and GCOS. .sp It must be clearly understood that the GCOS Environment Simulator is not a modified version of the GCOS operating system running under Multics, and performing batch processing, job scheduling, etc. Instead, it is a group of pl1 and alm programs that run in the normal Multics environment, in a user's process. They interpret control cards, establish the slave environment, intercept GCOS MMEs and perform the requested functions, and collect and dispose of sysout, for a single GCOS job. .if l2h "Overview of GCOS and Simulator Structure" The following section defines some terms and points out some differences between the simulator and GCOS. It is intended to be readable by persons unfamiliar with GCOS. .if l3h "GCOS Job" A typical GCOS job, consisting of a FORTRAN compilation and execution, follows: .in 5 .nf card columns 1 8 16 .sp $ SNUMB 12345 $ IDENT 3X2-9YZ-4A,JONES-ROOM-222 $ FORTRAN NDECK ... source deck of FORTRAN program ... $ EXECUTE DUMP $ DATA I* ... data cards expected by the FORTRAN program ... $ ENDJOB .in 0 .sp .fi The SNUMB card provides a unique identifier for the job within the system. It is usually provided by the GCOS operator. The IDENT card contains installation-dependent accounting information, and is provided by the user. The FORTRAN card defines the beginning of the FORTRAN compilation activity. .if l3h "Activity" An activity is the execution of one or more slave programs. There are two activities in this job - the compilation and the execution (defined by the EXECUTE card). During an activity, the job is allocated a contiguous area of main storage, known as the slave area. At the end of the activity, this area is relinquished, and a (possibly) different area is allocated for the next activity. Information can be passed between activities by means of files (either permanent files or saved temporary files), or by the Program Switch Word (PSW), which is maintained by GCOS for the duration of the job. .if l3h "PSW" The first 18 bits of the PSW are used by the system, and are discussed below. The last 18 bits are available for the use of user-written programs. .sp One function of the system half (first 18 bits) of the PSW is to transmit control card information to the slave program. For example, the NDECK option on the FORTRAN card causes bit 7 to be turned off (by default, it is on, to produce an object deck from a compilation), and the DUMP option on the EXECUTE card causes bit 0 to be turned on (PSW bits are numbered 0-35). .sp At some point in the development of GCOS, all 18 system bits were assigned, and new control card options were then implemented as "stranger options". This means that any activity card having one or more options not corresponding to one of the original 18 bits will be written on a certain file (the D* file), where it can be examined by the slave program. .if l3h "Slave Program" Slave programs are those that execute in the slave area, in slave mode (as opposed to master mode). A privileged slave program is one that is permitted to enter master mode under some conditions. (Since the simulator does not support this GCOS feature, it will not be discussed further.) Slave programs communicate with the GCOS hardcore supervisor via Master Mode Entry (MME) instructions. .if l3h "MME" Execution of a MME instruction causes a hardware fault, and the supervisor, responding to the fault, calls the appropriate processing routine. The MME instruction has an operation code of 001. The address field specifies the function that the slave program is requesting of the supervisor. There are currently 37 (decimal) MMEs defined. For example, MME 1 (INOS) requests the initiation of an I/O operation; MME 7 (FINI) requests normal termination of an activity; MME 8 (BORT) requests abnormal termination of the activity; and MME 37 (INFO) requests some information about the system running the job (such as the presence or absence of certain peripheral devices). Arguments are found in the words immediately following the MME instruction. The names and numbers of all 37 MMEs, along with a brief description of their functions, can be found in the GCOS Environment Simulator user's manual. .sp Multics hardware supports four MME instructions, plus a number of other fault-generating instructions and conditions. The four MME instructions are not used at all for communication between Multics user programs and the Multics hardcore supervisor, and therefore they are available for use by subsystems (such as the GCOS Environment Simulator). The four Multics MME instructions have the names MME1, MME2, MME3, and MME4, with operation codes of 001, 004, 005, and 007, respectively. The Multics MME1 instruction corresponds to the GCOS MME instruction (the operation codes are the same). The other three Multics MME instructions are used for purposes unrelated to GCOS. It must be emphasized that the Multics MME2, MME3, and MME4 instructions have no relation to the numbers used in the address field of a Multics MME1 (or a GCOS MME) instruction to specify a function to be performed by the GCOS supervisor. .if l3h "Slave Area" Main storage address references made by a slave program are (automatically) interpreted relative to an offset in the Base Address Register (BAR). This register contains both a base and a bound; it is loaded by the GCOS supervisor, in master mode, and it is used to force a slave program to stay within the slave area allocated to it. Any attempt to reference outside this area causes abnormal termination of the activity. .if l3h "Slave Area Prefix" The first 64 (decimal) words of the slave area are assigned specific functions by GCOS (and by the simulator). Slave programs are normally loaded starting in location 66 (decimal). Locations 64 and 65 are reserved by the GCOS loader for its own use. .if l3h "Slave Service Area" There is an area immediately before the slave area, called the slave service area (SSA). Although it contains information pertinent to a single job, and is preserved on secondary storage, by GCOS, between activities, it is accessible only to supervisor programs - slave programs can not reference it directly. .if l3h "Simulation of Slave Area and SSA" The simulator uses a segment to simulate the slave area, and it attempts to make the slave area prefix look as much as possible like the one in GCOS. However, the SSA is not simulated directly. Instead, information analogous to that kept in the SSA is stored in a separate data base (see the detailed description of gcos_ext_stat_), along with other information used by the simulator. (The PSW is an example of this: in GCOS, it is kept in the SSA; in the simulator, it is kept in the above data base. Since the SSA, and thus the PSW, is not directly accessible to the slave program, MMEs are provided to examine and set the PSW bits.) .if l3h "Files" The logical connection between an I/O request from a slave program (via a MME GEINOS) and the actual device (or part thereof) used in the I/O operation, is by means of a filecode. A filecode is a 1- or 2-character string, used in one of the arguments to a MME GEINOS, and also used on a file card in a job deck or in a default file allocation. Filecodes containing asterisks (*) are reserved for use by system programs (such as compilers), while the others are free to be used by user-written programs. .sp For each activity card type (such as FORTRAN or EXECUTE), there is a set of filecodes that are allocated by default, for temporary, input, and output files. In addition, the user can place control cards in the job deck to request allocation of temporary or permanent disk files, or other devices such as tapes, printers, etc. The filecodes on these control cards can either be the same as the default filecodes (to override the default allocations), or different (to allocate additional files). .sp In the sample job shown above, the DATA I* card in the EXECUTE activity allocates a temporary file, with filecode I*, and causes the data cards following it to be written on the file. In the FORTRAN activity, there is no DATA card preceeding the source cards, so the default FORTRAN input file, S*, is allocated, and the source cards are written on it. .sp The file cards implemented by the simulator are listed in the detailed description of the procedures gcos_cc_file_cards_ and gcos_cc_data_. The default file allocations for each activity card type can be found in the assembly listing of the procedure gcos_control_tables_. .sp GCOS permanent files are similar to files in the Multics storage system under >udd. They have pathnames, and are contained in directories, under the control of a particular user (or users). The GCOS Environment Simulator user's manual contains a complete description of the similarities and differences between these files. GCOS temporary files are analogous to those created by Multics procedures in the process directory, except that GCOS temporary files have no pathnames. .if l3h "Slave Program Libraries" GCOS slave programs are found in two types of library: the subroutine library, and the software library. The subroutine library is called the L* file. It is searched by the loader (GELOAD) for mathematical, utility, and I/O subroutines called by user-written programs. It is simulated by a Multics file named gcos_library_subroutines_. .sp The software library has no filecode (but see the ** file, described below). In GCOS, it is implemented as several files, one containing the most frequently used modules and residing on the fastest secondary storage medium in the system, and the others containing less frequently used modules, and residing on slower devices. It is simulated by a single Multics file named gcos_system_software_. It contains relocatable load modules, which have already been processed by the loader, to resolve all external references (subroutine calls), and thus are ready to be executed. The loader itself, plus all the compilers, assemblers, and utility programs, are contained in this library. .sp Modules are called from the software library via the MME GECALL instruction, which requests the GCOS supervisor to search the software library for the module named in the argument of the MME GECALL. A user can provide an alternate library, to be searched before the system software library, in any activity, by naming the alternate library on a file card containing the filecode "**". .sp The simulator provides an additional facility (not provided in GCOS) for using another software library: if the -userlib control argument is given on the gcos command line, a Multics file named gcos_second_software_ will be searched for. If it is found, that library will be searched, in every activity, after gcos_system_software_, by the MME GECALL processor (gcos_mme_call_), for any module not found in gcos_system_software_. .sp Most of the compilers and utility programs in the software library have corresponding activity cards, such as FORTRAN and EXECUTE (EXECUTE corresponds to the loader), which cause the system to issue a MME GECALL to load and execute the corresponding program. Less frequently used utility programs, and any installation-written programs in the software library (or user-written programs in the ** file) can be loaded and executed using the PROGRAM card, on which the name of the program to be executed is supplied as an argument. .sp Large software packages, such as compilers, which will not fit into the slave area all at once, are implemented as a group of overlay modules. Each member of the group is a separate module in the software library and is brought into core by means of a MME GECALL issued by the main module, which remains in core, in the lower part of the slave area. The default load address of a module is given in the preface record (see below) which preceeds it in the library; this address can be overridden by another address given as an argument to the MME GECALL instruction. .if l3h "Software Libraries and GCOS System Loadable Files" There are two software library formats acceptable to MME GECALL in the simulator. One is the "random system loadable file" format, which is produced by SYSEDIT, and is normally found (in GCOS) in ** files built by users. The other is a simulator format file, which is built by the simulator maintenance tool, gcos_build_library, from files read from a GCOS total system tape. These latter files are "magnetic tape system loadable files" produced by SYSEDIT, and their format is different from that of random system loadable files. .sp Except for a small section of code in the procedure gcos_mme_call_ in the simulator, which reads random system loadable files, all simulator and support software deals only with the tape format and simulator format files, and can not be used to manipulate (i.e., to modify) random system loadable files. A slave program can successfully GECALL a module from a random file, and can create such a file using SYSEDIT, under the simulator. However, SYSEDIT can not be used to modify a simulator format file, and the simulator support tools can not be used to modify a random file. .sp A tape format system loadable file contains the sequence: a preface record (DCW block), followed by data blocks and possibly one relocation block, for each module in the file. The preface record contains a 6-word header, plus one DCW (one word) for each 3840 (or less) word data block. When read from tape into a Multics file, the preface record and the relocation and data blocks occupy contiguous words of storage (short blocks are not padded to their maximum lengths). This is not the case for random system loadable files produced by SYSEDIT, and therefore the same software will not successfully read both types of files. .sp A random system loadable file contains, in addition to the blocks found in a tape file, catalog blocks and available space blocks. Catalog blocks each contain entries for a small number of modules, and a pointer to the next catalog block in the chain. .sp Searching such a file containing a large number of modules would be time-consuming. GCOS solves this problem by building a table (the GECALL table) in core, at bootload time. The GECALL table is an easy-to-search catalog of the software library. The simulator solves this problem by putting the equivalent of the GECALL table at the beginning of its software library. .sp All blocks in a random file are of maximum length, with unused words containing zeros. The maximum lengths of the various types of blocks are different. They also vary with the device type. This information can be found in the GCOS SYSEDIT manual (BS18). One item in the first 6 words of the preface record is the length of the module itself. For a tape file, this is given in words, but for a random file, it is given in blocks (whose lengths are a function of the device type). .sp A simulator format system loadable file is a tape format system loadable file (as described above) with a 1000-word catalog at the beginning. Word 1 of the catalog is unused; word 2 is a count of the modules cataloged, and the next 499 pairs of words contain the name and offset, respectively, of the modules, in the order they occur in the file. (The names are in BCD.) The offset of a module is the word offset, from the beginning of the file, of its preface record. The offset of the first module is therefore 1000. .if l3h "Standard System Format (SSF) Files and GEFRC" GCOS SSF files are read and written by slave programs and by the simulator. Slave programs usually use the I/O subroutines, known collectively as File and Record Control (GEFRC), that are found in the subroutine library (L*). Almost all GCOS files are in SSF. (Two that are not, however, are the software and subroutine libraries themselves.) Procedures within the simulator also read and write SSF files. The format of these files is defined below. .sp SSF files are made up of blocks of 320 or fewer words. Each block is headed by a block control word (BCW), which is followed by one or more records. Each record is headed by a record control word (RCW), which is followd by the data words of the record. Fields within the BCW and RCW describe the length and contents of the words that follow. The end of the file is signified by an RCW of a special form. The following declarations describe SSF files: .sp .nf .ne 6 dcl 1 block aligned based, 2 bcw aligned, 3 serial_number fixed bin (17) unaligned, 3 length fixed bin (17) unaligned, 2 contents (0 refer (block.bcw.length)) bit (36) aligned; .sp dcl 1 record aligned based, 2 rcw aligned, 3 length fixed bin (17) unaligned, 3 eof bit (6) unaligned, 3 zero bit (2) unaligned, 3 media_code bit (4) unaligned, 3 report_code bit (6) unaligned, 2 contents (0 refer (record.rcw.length)) bit (36) aligned; .sp .fi The length of a block (in words) is specified by block.bcw.length. The BCW itself is not included in this length. For tape files, blocks of 320 or fewer words are written, but for disk files, blocks of exactly 320 words are written, with padding being supplied, either by GCOS or by the simulator. This is so that, when the blocks are read back, a read of 320 words will yield exactly one block, and will not include the bcw and first few contents words of the next block. .sp The block serial number (block.bcw.serial_number) starts at 1 and is incremented by 1 for each new record. GEFRC input routines check this number and will treat out-of-sequence numbers as an error. .sp The length of a record (in words) is specified by record.rcw.length. The RCW itself is not included in this length. .sp An rcw containing a length field of zero, and 17 (octal) in the eof field indicates the end of the file. .sp The media code describes the contents of the record. Only those media codes used by the simulator and its support routines are listed below: .sp .in 5 1 - binary card .br 2 - BCD card .br 3 - BCD print line .br 6 - Standard ASCII .sp .in 0 The report code is used in sysout files, so that records belonging to different reports can be written on the same sysout collector file, and separated during printing. .if l2h "Overview of Simulator Operation" Conceptually, there are three major parts of the simulator: the input reader, the allocator, and the MME simulator. However, the procedures making up the simulator do not all belong to just one of those parts since there are some subroutines called by all three parts, and there is one procedure which is, itself, the major part of the allocator, but it also calls the input reader and the MME simulator, and could therefore be considered the main driving procedure for the entire simulator. .sp Execution of the simulator begins when the gcos command is given. The command procedure, gcos, performs some initialization, and then processes the arguments given on the command line and stores the results of the argument processing in the simulator's external static data segment, gcos_ext_stat_. Then it calls the allocator, gcos_gein_. The allocator performs some additional initialization, and then calls the input reader, gcos_gein_pass1_. .sp The input reader reads completely through the job deck file (whose pathname was one of the arguments on the gcos command line), and any selected files (files whose pathnames are given on $ SELECT cards). The job deck file and the selected files can contain Multics ASCII lines or GCOS SSF records containing BCD or binary card images. These lines or records are translated to the proper form, and written into the job stream file ([pd]>gcos_job_stream_file_). This is a temporary file whose format is designed for convenience of processing by the allocator. The contents of any selected files are also translated, and copied into the job stream file in place of their respective $ SELECT cards. .sp During this first pass through the job deck, a small number of control cards are interpreted and processed, and a limited amount of error-checking on the control cards is performed. This differs from GCOS, where the first pass through the deck interprets all of the control cards, processes most of them completely, and performs a thorough check for control card errors. This causes a functional difference between GCOS and the simulator: in GCOS, control card errors detected during the first pass cause the job to be aborted before any activities have been run; in the simulator, control card errors are detected during the allocation for an activity, and cause the job to be aborted, but only after the previous activities have been run. .sp When the input reader completes its initial pass through the job deck, it returns to the allocator, to begin the second and final pass, during which the activities in the job are actually run. .sp The allocator reads cards, one at a time, from the job stream file. A small number of control cards are treated as special cases and processed in-line by gcos_gein_. However, for most of the control cards, the card type is looked up in a table of control card types, in the simulator's external static constant segment, gcos_control_tables_. Then, assuming the card is found, its position in the table is used as an index into a transfer vector, gcos_cc_caller_, to call the proper processing routine for the control card. (All of the control card processing routines have names of the form gcos_cc__.) .sp Non-control cards are written onto a file, for processing by the slave program. The filecode of the file on which they are written is determined, either explicitly or implicitly, by the control cards that preceed them. .sp The positions of the control cards within the table have a significance other than determining a transfer vector entry. The cards are arranged in the table by category: file cards (e.g. $ TAPE, $ FILE), activity defining cards (e.g. $ FORTRAN, $ EXECUTE), and activity terminating cards (e.g. $ BREAK, $ ENDJOB). .sp An activity definition consists of an activity defining card, followed optionally by file cards, defining files to be used by the activity, and other miscellaneous control and data cards. The name, allocator, is derived from the major function of this pass, which is to allocate the files to be used by the activity. .sp Whenever an activity defining or activity terminating card is read, following an activity definition (and signifying the end of that activity definition), then the allocator calls the MME simulator to run the activity that was being allocated, before beginning allocation for the next activity. .sp The MME simulator, gcos_run_activity_, establishes the environment in which the slave program will run, alters some process parameters so that the simulator will gain control whenever a MME occurs, and then transfers control to the slave area, using a mechanism that is not a standard Multics call. .sp The MME simulator initializes the slave area prefix. This includes placing a MME GECALL in location 26 (32 octal) and the name of the slave program to be executed in location 27. It sets up handlers to allow the simulator to gain control whenever a MME or other fault occurs in the slave program. It sets a cpu timer to the cpu time limit for the activity. Then it transfers to location 26 of the slave area, by means of a call to gcos_set_slave_. .sp A stack frame is set up by gcos_set_slave_. Then it loads the Base Address Register (BAR) with the limits specified in the argument list (normally zero for the lower limit, and the user-requested slave storage allocation for the upper limit). Then it executes a TSS (Transfer and Set Slave) instruction, to the specified location. This causes BAR mode to be entered. In BAR mode, certain instructions that are legal in a Multics user program become illegal, and any references to locations outside the limits specified by the BAR cause a fault. This effectively restricts the slave program to read, execute, and modify only locations in the slave area, within the limits specified by the BAR. The slave program executes in the stack frame of gcos_set_slave_. .sp The execution of the MME GECALL (that was placed in location 26 by the simulator) causes a fault. At this point, the fact that the activity is just starting becomes irrelevant. This MME is handled by the simulator, using the same mechanism (described below) that is used to handle any other MME that occurs during execution of the slave program. .sp Before calling gcos_set_slave_, gcos_run_activity_ saves the signal_ pointer from the ring-4 stack header, and replaces it with a pointer to the procedure gcos_check_for_mme_. It also establishes the procedure gcos_fault_processor_ as a handler for the "any_other" condition. When a MME, or any other fault not normally handled by the Multics hardcore supervisor, occurs, the first ring-4 procedure to receive control is gcos_check_for_mme_. .sp Without setting up a stack frame, it examines the machine conditions, to determine the cause of the fault. If it was a MME, gcos_check_for_mme_ calls gcos_mme_processor_, passing it the same argument list that was passed to it. (This argument list is the one that is normally passed to signal_.) gcos_mme_processor_ obtains the mme number from the address field of the MME instruction, and checks it for validity. If the mme number is valid, gcos_mme_processor_ uses it as an index into the transfer vector gcos_mme_caller_, to call the proper handler for the MME. (The names of the mme-handling procedures are of the form: gcos_mme_xxxx_, where xxxx is the last four characters of the mme name.) .sp The handlers all return an argument, increment, which is the number of argument words following the MME, which must be skipped over when returning to the slave program. gcos_mme_processor_ returns to the proper slave area location, as determined by the value of increment. .sp If the fault was not a MME, gcos_check_for_mme_ calls signal_ (a pointer to which was saved during activity initialization). signal_ is the normal user-ring signalling procedure. Since gcos_fault_processor_ was established as an any_other handler, it is called by signal_. It checks for faults that a slave program is allowed to handle (such as divide check). If the fault is one of these, and if the slave program has established a handler for it (by storing the location of its handler in the fault vector in the slave area prefix), then control is transferred to that location in the slave area. Otherwise a default action is taken, usually a simulated MME GEBORT. If the fault is one that normally occurs only in a Multics procedure, and could not occur in a slave program (such as a linkage fault), then the simulation is aborted (unless the simulator is running in debugging mode, in which case the debug command is called). .sp When the activity is to be terminated, either normally or abnormally, gcos_mme_bort_ or gcos_mme_fini_ transfers control back to gcos_run_activity_ via a nonlocal goto, using a label variable in gcos_ext_stat_ that was initialized by gcos_run_activity_ before gcos_set_slave_ was called. Wrapup and abort subactivity processing, if required, are handled at this time. This involves transfer of control back to the slave program. When the activity is completly finished, gcos_run_activity_ returns to gcos_gein_. .sp The special handling of MME faults described above is done for efficiency. The normal Multics signalling mechanism could have been used, by establishing gcos_mme_processor_ as a handler for the MME1 condition. However, since MMEs occur very often in slave programs, a great deal of overhead is eliminated by the special handling of MME faults. .sp When the job is finished, the ENDJOB control card processor, gcos_cc_endjob_, closes all files, converts, and queues for daemon output, any sysout files, and then transfers control back to gcos_gein_. Since gcos_cc_endjob_ can be called by several procedures, to clean up after an aborted simulation as well as to process an ENDJOB card, it performs a nonlocal goto using a label variable in gcos_ext_stat_, instead of performing a normal return. gcos_gein_ returns returns to gcos, which returns to the command processor, ending the simulation of one job. .sp  env_module_descriptions.runoff 03/29/79 1518.3rew 04/03/77 1351.3 432 .if l1h "Module Descriptions" To be supplied  section_1.runoff 03/29/79 1518.3rew 04/03/77 1351.3 72549 .if init_plm "AN77" .if toc_on .sr section 1 .if l0h "Introduction" .if l1h "Introduction to Manual" .if l2h "Software Described" This manual describes the internal logic of those Multics procedures connected with GCOS simulation. Those procedures include: .sp .in 5 .un 5 <> The GCOS Environment Simulator, which is invoked by the gcos command, and runs one GCOS job, immediately, in the process that invokes it (i.e. it does not submit an absentee request to run the job). .sp .un 5 <> The GCOS Daemon, which reads GCOS jobs from cards or IMCV tapes, and submits an absentee request to run each GCOS job. The absentee job uses the gcos command to invoke the simulator. .sp .un 5 <> The commands gcos_card_utility (gcu), gcos_sysprint (gsp), and gcos_syspunch (gspn), which copy files in the Multics storage system, translating between Multics and GCOS formats. .sp .un 5 <> The subroutines gcos_gsr_read_ and gcos_gsr_write_, which can be called from user-written pl1 procedures, to read and write files in the Multics storage system, in GCOS Standard System Format (SSF). .in 0 .if l2h "Other Sources of Information" The reader of this manual is assumed to be familiar with the user documentation for this software, which can be found in the following Multics manuals: .sp .in 5 .un 5 <> GCOS Environment Simulator, Order No. AN05, which contains, in addition to instructions for their use, some overview information on the internal operation of the simulator and the daemon, and the interface between them. .sp .un 5 <> MPM Volume II - Commands and Active Functions, Order No. AG92, which contains descriptions of the usage of the commands: gcos, gcos_card_utility, gcos_sysprint, and gcos_syspunch. .sp .un 5 <> Subsystem Writers Guide, Order No. AK92, which contains descriptions of the subroutines gcos_gsr_read_ and gcos_gsr_write_. .sp .in 0 The reader is also assumed to have access to the compilation listings of the procedures described herein. Detailed information, available in the listings, will not be repeated here. .sp Information on GCOS file formats, and on the user interface of the GCOS operating system (which is partially simulated by the Multics GCOS Subsystem) can be found in the following GCOS manuals: .sp .in 5 .un 5 <> General Comprehensive Operating Supervisor (GCOS), Order No. BR43 .sp .un 5 <> Control Cards Reference Manual, Order No. BS19 .sp .un 5 <> File and Record Control (GEFRC), Order No. BN85 .sp .in 0 A complete list of GCOS user and program logic manuals can be found at the beginning of any of the above manuals. Although some detailed information on the internal operation of GCOS can be found in some of the manuals in that list, the most reliable detailed information, needed for correct simulation, can only be found in assembly listings of GCOS hardcore modules, such as the modules GEIN and ALC1. .if l2h "Organization of Manual" Section I describes the problem to be solved - that of providing the ability to run GCOS jobs under Multics - and it describes the contributions made to the solution of that problem by the simulator, the daemon, and the various other commands and subroutines. .sp Section II discusses the simulator's operation in general, and it also contains detailed descriptions of each external procedure making up the simulator, including its calling sequence, function, and internal operation. .sp Sections III and IV contain analogous information for the GCOS Daemon, and for the gcos file-manipulating commands and subroutines, respectively. .sp Section V describes the tools used, and the debugging and installing procedures followed, in maintaining and updating the simulator and the daemon. .if l1h "Introduction to GCOS Subsystem" .if l2h "Puropse of GCOS Subsystem" The GCOS simulation facilities allow: .sp .in 5 .un 5 <> GCOS jobs to be run under Multics; .sp .un 5 <>> GCOS Standard System Format (SSF) files to be maintained in the Multics storage system. .sp .in 0 These facilities are desirable in Multics for several reasons: .sp .in 5 .un 5 <> Customers with an investment in GCOS applications software will be able to continue using that software on Multics. .sp .un 5 <> Certain software available in GCOS but not presently available in Multics will be made available to Multics users. This software includes the ALGOL, COBOL, and JOVIAL compilers, and the DN355 Assembler and Simulator, the latter two of which are used in development of the DN355 software for Multics. .sp .un 5 <> Debugging aids (some built into the simulator, some a part of Multics) can be used to observe and control the execution of a GCOS slave program, for the purpose of debugging it. .sp .in 0 .if l2h "Limitations of GCOS Subsystem" GCOS is a batch processing, multiprogramming, multiprocessing operating system. It includes facilities for time sharing, remote job entry, and transaction processing, and it maintains a structured file system. .sp The GCOS simulator makes use of analogous Multics facilities for some of the above, and excludes others as being impractical to simulate. Multiprogramming and multiprocessing are a part of Multics, and the simulator benefits from them just as any other Multics procedures do. The GCOS time sharing interface is not simulated, since the equivalent affects can be achieved by Multics time sharing users, using the gcos command and the file-manipulating commands, along with the standard Multics commands. The GCOS file system is not simulated since the Multics storage system provides equivalent (although not identical) features. Remote job entry is not simulated. A planned Multics facility will provide similar capabilities. Batch processing is provided by the GCOS Daemon. Transaction processing and IDS are not simulated, because of the difficulty of making the Multics file-locking and interprocess communication facilities available to a slave program executing within the GCOS simulator. Communication between two GCOS jobs in simultaneous execution (INTERCOM) is not provided, for similar reasons. .if l2h "Functions of GCOS Subsystem Components" The GCOS Environment Simulator, which is invoked by the gcos command, simulates the interface that GCOS presents to a single job. It reads and interprets control cards, allocates files, loads slave software, transfers control to it, intercepts MMEs and performs the requested services, collects output (SYSOUT), and (optionally) translates and queues it for printing or punching by the Multics I/O Daemon. .sp The GCOS Daemon simulates the interface that GCOS presents to a group of jobs on cards or IMCV tapes. It reads each job from the input medium, examines several cards in it for purposes of job scheduling, accounting, and access control. For each job, it constructs an absentee job that will establish the proper accounting and access environment, invoke the simulator using the gcos command, and then queue requests to print and punch the output. .sp The gcos_sysprint and gcos_syspunch commands are called by the simulator, to translate the (BCD and binary) sysout and simulated printer and card punch files into formats (ASCII and raw) suitable for printing or punching by the Multics I/O Daemon. The automatic translation and daemon output requests made by the simulator are optional, and these commands are available to allow users to perform just the translation functions. .sp The gcos_card_utility command copies card image files, translating them to/from Multics ASCII from/to any one of a number of GCOS formats. It is not an integral part of the simulation, but is provided as a convenience to users, for maintaining GCOS files in the Multics storage system, and for transferring files between the two systems. .sp The subroutines gcos_gsr_read_ and gcos_gsr_write_ are used by the daemon and the commands gcos_sysprint and gcos_syspunch, to read and write GCOS SSF files, one record at a time. They are also available to users, allowing GCOS SSF files to be read or written by any Multics pl1 procedure. .sp  section_2.runoff 03/29/79 1518.3rew 04/03/77 1351.3 1251 .if init_plm "AN77" .if toc_on .sr section 2 .if l0h "GCOS Environment" .if env_design .if env_data_structures .if env_module_descriptions  section_3.runoff 03/29/79 1518.3rew 04/03/77 1351.3 738 .if init_plm "AN77" .if toc_on .sr section 3 .if l0h "GCOS Daemon" To be supplied  section_4.runoff 03/29/79 1518.4rew 04/03/77 1351.3 954 .if init_plm "AN77" .if toc_on .sr section 4 .if l0h "GCOS User Commands and Subroutines" To be supplied.  section_5.runoff 03/29/79 1518.4rew 04/03/77 1351.3 936 .if init_plm "AN77" .if toc_on .sr section 5 .if l0h "Maintenance Tools and Procedures" To be supplied. ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved