COMPILATION LISTING OF SEGMENT apl_date_time_ Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 11/29/83 1559.9 mst Tue Options: optimize map 1 /* ****************************************************** 2* * * 3* * * 4* * Copyright (c) 1972 by Massachusetts Institute of * 5* * Technology and Honeywell Information Systems, Inc. * 6* * * 7* * * 8* ****************************************************** */ 9 10 /* format: style3 */ 11 apl_date_time_: 12 procedure (P_time) returns (char (17)); 13 14 /* program to format date/time into APL/360 format. 15* Written by PG on 740208 16* Modified 800116 by PG to use pictures, and put in colons (like VS APL) 17**/ 18 19 /* parameters */ 20 21 declare P_time fixed binary (71) parameter; 22 23 /* entries */ 24 25 declare decode_clock_value_ entry (fixed bin (71), fixed bin (17), fixed bin (17), fixed bin (17), fixed bin (71), 26 fixed bin (17), char (3) aligned); 27 28 /* automatic */ 29 30 declare (day_of_month, day_of_week, hour, minute, month, second, seconds_since_midnight, year) 31 fixed bin (17), 32 time_of_day fixed bin (71), 33 time_zone char (3) aligned; 34 35 declare 1 apl_time unaligned, 36 2 hour picture "99", 37 2 colon1 char (1), 38 2 minute picture "99", 39 2 colon2 char (1), 40 2 second picture "99", 41 2 space char (1), 42 2 month picture "99", 43 2 slash1 char (1), 44 2 day picture "99", 45 2 slash2 char (1), 46 2 year picture "99"; 47 48 /* builtin */ 49 50 declare (divide, float, max, string) 51 builtin; 52 53 /* APL time format: 54* "HH:MM:SS MM/DD/YY" */ 55 56 /* program */ 57 58 call decode_clock_value_ (P_time, month, day_of_month, year, time_of_day, day_of_week, time_zone); 59 60 string (apl_time) = " : : / /"; 61 62 seconds_since_midnight = float (time_of_day, 63) / 1e6; 63 /* convert microseconds to seconds */ 64 65 hour = divide (seconds_since_midnight, 3600, 16, 0); 66 minute = divide (seconds_since_midnight - 3600 * hour, 60, 16, 0); 67 second = seconds_since_midnight - 3600 * hour - 60 * minute; 68 69 apl_time.hour = hour; 70 apl_time.minute = minute; 71 apl_time.second = second; 72 apl_time.month = month; 73 apl_time.day = day_of_month; 74 apl_time.year = max (year - 1900, 0); /* don't bomb if year is 0 */ 75 76 return (string (apl_time)); 77 78 end /* apl_date_time_ */; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/29/83 1346.2 apl_date_time_.pl1 >special_ldd>on>apl.1129>apl_date_time_.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. P_time parameter fixed bin(71,0) dcl 21 set ref 11 58* apl_time 000113 automatic structure level 1 packed unaligned dcl 35 set ref 60* 76 day 3 000113 automatic picture(2) level 2 packed unaligned dcl 35 set ref 73* day_of_month 000100 automatic fixed bin(17,0) dcl 30 set ref 58* 73 day_of_week 000101 automatic fixed bin(17,0) dcl 30 set ref 58* decode_clock_value_ 000010 constant entry external dcl 25 ref 58 divide builtin function dcl 50 ref 65 66 float builtin function dcl 50 ref 62 hour 000102 automatic fixed bin(17,0) dcl 30 in procedure "apl_date_time_" set ref 65* 66 67 69 hour 000113 automatic picture(2) level 2 in structure "apl_time" packed unaligned dcl 35 in procedure "apl_date_time_" set ref 69* max builtin function dcl 50 ref 74 minute 0(27) 000113 automatic picture(2) level 2 in structure "apl_time" packed unaligned dcl 35 in procedure "apl_date_time_" set ref 70* minute 000103 automatic fixed bin(17,0) dcl 30 in procedure "apl_date_time_" set ref 66* 67 70 month 000104 automatic fixed bin(17,0) dcl 30 in procedure "apl_date_time_" set ref 58* 72 month 2(09) 000113 automatic picture(2) level 2 in structure "apl_time" packed unaligned dcl 35 in procedure "apl_date_time_" set ref 72* second 000105 automatic fixed bin(17,0) dcl 30 in procedure "apl_date_time_" set ref 67* 71 second 1(18) 000113 automatic picture(2) level 2 in structure "apl_time" packed unaligned dcl 35 in procedure "apl_date_time_" set ref 71* seconds_since_midnight 000106 automatic fixed bin(17,0) dcl 30 set ref 62* 65 66 67 string builtin function dcl 50 set ref 60* 76 time_of_day 000110 automatic fixed bin(71,0) dcl 30 set ref 58* 62 time_zone 000112 automatic char(3) dcl 30 set ref 58* year 3(27) 000113 automatic picture(2) level 2 in structure "apl_time" packed unaligned dcl 35 in procedure "apl_date_time_" set ref 74* year 000107 automatic fixed bin(17,0) dcl 30 in procedure "apl_date_time_" set ref 58* 74 NAME DECLARED BY EXPLICIT CONTEXT. apl_date_time_ 000013 constant entry external dcl 11 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 220 232 163 230 Length 376 163 12 127 35 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME apl_date_time_ 100 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME apl_date_time_ 000100 day_of_month apl_date_time_ 000101 day_of_week apl_date_time_ 000102 hour apl_date_time_ 000103 minute apl_date_time_ 000104 month apl_date_time_ 000105 second apl_date_time_ 000106 seconds_since_midnight apl_date_time_ 000107 year apl_date_time_ 000110 time_of_day apl_date_time_ 000112 time_zone apl_date_time_ 000113 apl_time apl_date_time_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return fl2_to_fx1 ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. decode_clock_value_ NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000007 58 000020 60 000043 62 000046 65 000056 66 000060 67 000067 69 000074 70 000103 71 000112 72 000121 73 000130 74 000137 76 000154 ----------------------------------------------------------- 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