assm 01 12-10-82 15.943 fnp metering subroutines page 1 preface program break 166 common length 0 v count bits 5 primary symdef entry mincs 12 mincd 32 mupdat 54 mmsg 102 secondary symdef entry .chain 0 block length symref end of binary card 00000001 assm 01 12-10-82 15.943 fnp metering subroutines page 2 1 * *********************************************************** 2 * * * 3 * * copyright, (c) honeywell information systems inc., 1982 * 4 * * * 5 * * copyright (c) 1972 by massachusetts institute of * 6 * * technology and honeywell information systems, inc. * 7 * * * 8 * *********************************************************** 9 assm 01 12-10-82 15.943 fnp metering subroutines page 3 11 lbl ,meters 12 pcc off 15 16 ************************************************************* 17 * 18 * this set of subroutines implements the updating of 19 * meters kept by the fnp 20 * 21 * it has entries for incrementing single- and double- 22 * word meters, for updating cumulative meters 23 * intended for maintaining averages, and for keeping 24 * track of synchronous message counts and lengths. 25 * 26 * all entries must run with interrupts and overflow 27 * faults inhibited. 28 * 29 ************************************************************* 30 00000 31 meters null 00000 32 start meters symdef -.chain 00000 even 00000 000000 0 .chain dec 0 00001 442563 0 bci 2,meters 00002 255162 0 00003 0 00000 1 ind meters 00004 010201 0 date 00005 001002 0 00006 330000 0 bci 4,.002. 00007 023320 0 00010 202020 0 00011 202020 0 33 34 symdef mincs 35 symdef mincd 36 symdef mupdat 37 symdef mmsg 38 00012 39 buffer assm 01 12-10-82 15.946 fnp metering subroutines page 4 buffer format 000000 bf.nxt equ 0 address of next buffer in chain 000001 bf.siz equ bf.nxt+1 size of buffer (bits0-2) 000001 bf.flg equ bf.nxt+1 flags (bits3-8) 000001 bf.tly equ bf.nxt+1 tally of buffer (bits9-17) 000002 bf.dta equ bf.siz+1 start of data 000040 bufsiz equ 32 buffer size 000074 bufnch equ bufsiz*2-4 number of data characters in a buffer 000050 bufmax equ 40 maximum number of input buffers 000012 bufpre equ 10 number of buffers to trigger pre-exhaust 000005 bufshf equ 5 number of bits shifted to divide by bufsi 000024 bufres equ 20 number of reserved buffers 700000 bufsmk bool 700000 mask to isolate bf.siz 077000 buffmk bool 077000 mask to isolate bf.flg 000777 buftmk bool 000777 mask to isolate bf.tly 000002 bufthr equ 2 threshold at which to send send_output 000400 bfmsiz equ 256 maximum buffer size in words ******************************** * buffer flags ******************************** 040000 bfflst bool 040000 last buffer in message 020000 bffbrk bool 020000 buffer contains break character 010000 bfftra bool 010000 throw away this buffer when done inputtin 004000 bffrpy bool 004000 buffer is last in replay chain 002000 bffctl bool 002000 buffer consists of keybd/prtr control 001000 bffhld bool 001000 hold output buffer until dmpout assm 01 12-10-82 15.946 fnp metering subroutines page 5 mincs, mincd -- simple increment meters 42 43 ************************************************************* 44 * 45 * mincs -- single precision increment 46 * 47 * inputs: 48 * a -- address of single-word meter 49 * q -- increment (positive or negative) 50 * 51 ************************************************************* 52 00012 53 mincs subr ics,(inh,x2) 00024 0 44 135 161 54 ldi l.a001-* inhbit interrupts and overflow 00025 0332 00 0 55 cax2 get address of meter 00026 7333 00 0 56 cqa 00027 2 16 000 0 57 asa 0,2 update it 00030 58 return mincs 59 60 61 ************************************************************* 62 * 63 * mincd -- increment a double-precision meter 64 * 65 * inputs: 66 * a -- address of doubleword to update 67 * q -- increment (positive or negative) 68 * 69 ************************************************************* 70 00032 71 mincd subr icd,(inh,x2) 00044 0 44 115 161 72 ldi l.a001-* inhibit interrupts and overflow 00045 0332 00 0 73 cax2 get address of meter 00046 7333 00 0 74 cqa end of binary card 00000002 00047 0335 22 0 75 lrs 18 get double-precision increment in aq 00050 2 15 000 0 76 adaq 0,2 update meter 00051 2 14 000 0 77 staq 0,2 00052 78 return mincd assm 01 12-10-82 15.946 fnp metering subroutines page 6 mupdat -- update cumulative meter 80 81 ************************************************************* 82 * 83 * mupdat -- updates a cumulative meter for averaging 84 * 85 * inputs: 86 * a -- address of doubleword meter, followed by 87 * doubleword count of updates 88 * 89 * q -- increment (positive or negative) 90 * 91 ************************************************************* 92 00054 93 mupdat subr upd,(inh,x2) 00066 0 44 073 161 94 ldi l.a001-* inhibit interrupts and overflow 00067 0332 00 0 95 cax2 get address of meter 00070 7333 00 0 96 cqa 00071 0335 22 0 97 lrs 18 get doubleword increment in aq 00072 2 15 000 0 98 adaq 0,2 00073 2 14 000 0 99 staq 0,2 update meter 00074 673 000 0 100 ila 0 get double-precision 1 00075 473 001 0 101 ilq 1 00076 2 15 002 0 102 adaq 2,2 add it to update count 00077 2 14 002 0 103 staq 2,2 00100 104 return mupdat assm 01 12-10-82 15.946 fnp metering subroutines page 7 mmsg -- update count & length of message 106 107 ************************************************************* 108 * 109 * mmsg -- increments counts and maintains average 110 * length for synchronous messages. also 111 * keeps track of minimum and maximum length 112 * 113 * inputs: 114 * a -- address of 6-word area containing the 115 * following: 116 * message count (2 words) 117 * cumulative message length (2 words) 118 * minimum message length (1 word) 119 * maximum message length (1 word) 120 * 121 * x3 - address of first buffer in message 122 * 123 ************************************************************* 124 00102 125 mmsg subr msg,(inh,x2,x3) end of binary card 00000003 00117 0 44 042 161 126 ldi l.a001-* inhibit interrupts and overflows 00120 0332 00 0 127 cax2 get address of metering area 00121 0 56 043 164 128 stz maccum-* initialize total length 129 00122 3 07 001 0 130 msg010 lda bf.tly,3 get the buffer tally 00123 0 34 037 162 131 ana l.a002-* =buftmk 00124 0 16 040 164 132 asa maccum-* increment running total 00125 3 07 001 0 133 lda bf.flg,3 last buffer in message? 00126 0 31 035 163 134 cana l.a003-* =bfflst 00127 0 64 003 132 135 tnz msg020-* yes, stop counting 00130 3 41 000 0 136 ldx3 bf.nxt,3 next buffer 00131 0 64 771 122 137 tnz msg010-* if any 138 00132 673 000 0 139 msg020 ila 0 get double-precision 1 00133 473 001 0 140 ilq 1 00134 2 15 000 0 141 adaq 0,2 update message count 00135 2 14 000 0 142 staq 0,2 00136 673 000 0 143 ila 0 00137 0 47 025 164 144 ldq maccum-* get accumulated message length 00140 2 15 002 0 145 adaq 2,2 00141 2 14 002 0 146 staq 2,2 add it into total lengths 00142 0 47 022 164 147 ldq maccum-* get message length again 00143 2 20 004 0 148 szn 4,2 was the minimum ever set? 00144 0 74 011 155 149 tze msg040-* no, just set min. and max. 00145 2 67 004 0 150 cmpq 4,2 check minimum 00146 0 65 003 151 151 tpl msg030-* we haven't got a new one 00147 2 57 004 0 152 stq 4,2 we do, store it 00150 0 71 007 157 153 tra msgbak-* done 154 00151 2 67 005 0 155 msg030 cmpq 5,2 check maximum assm 01 12-10-82 15.946 fnp metering subroutines page 8 mmsg -- update count & length of message 00152 0 75 005 157 156 tmi msgbak-* we haven't beaten it 00153 2 57 005 0 157 stq 5,2 we have, store new one 00154 0 71 003 157 158 tra msgbak-* 159 00155 2 57 004 0 160 msg040 stq 4,2 first time, set both 00156 2 57 005 0 161 stq 5,2 00157 162 msgbak return mmsg 163 assm 01 12-10-82 15.946 fnp metering subroutines page 9 storage for all metering subroutines 165 00161 024000 0 166 l.a001 oct 024000 bits to inhibit interrupts and overflow 00162 0 00777 0 167 l.a002 zero buftmk 00163 040000 0 168 l.a003 vfd 18/bfflst 169 00164 170 maccum bss 1 for accumulate length of current message 171 end of binary card 00000004 172 end 166 is the next available location. 355map version/assembly dates gmpa 770711/071177 gmpb 770711/071177 gmpc 770711/071177 there were no warning flags in the above assembly assm 01 12-10-82 15.946 fnp metering subroutines page 10 octal symbol references by sequence no. 40000 bfflst 39 39 168 1 bf.flg 39 39 133 0 bf.nxt 39 39 136 1 bf.tly 39 39 130 777 buftmk 39 39 167 161 l.a001 166 54 72 94 126 166 162 l.a002 167 131 167 163 l.a003 168 134 168 164 maccum 170 128 132 144 147 170 4 macwk1 125 53 58 71 78 93 104 125 162 10 macwk2 125 53 71 93 125 0 meters 31 31 32 32 mincd 71 35 71 78 12 mincs 53 34 53 58 102 mmsg 125 37 125 162 122 msg010 130 130 137 132 msg020 139 135 139 151 msg030 155 151 155 155 msg040 160 149 160 157 msgbak 162 153 156 158 162 54 mupdat 93 36 93 104 ** 45948 words of memory were used by 355map for this assembly. ----------------------------------------------------------- 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