assm 01 09-23-82 12.172 fnp metering subroutines page 1 preface program break 172 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 1 setbpt end of binary card 00000001 assm 01 09-23-82 12.172 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 09-23-82 12.172 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 001102 0 date 00005 031002 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 39 symref setbpt 40 00012 41 buffer assm 01 09-23-82 12.173 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 09-23-82 12.173 fnp metering subroutines page 5 mincs, mincd -- simple increment meters 44 45 ************************************************************* 46 * 47 * mincs -- single precision increment 48 * 49 * inputs: 50 * a -- address of single-word meter 51 * q -- increment (positive or negative) 52 * 53 ************************************************************* 54 00012 55 mincs subr ics,(inh,x2) 00024 0 44 141 165 56 ldi l.a001-* inhbit interrupts and overflow 00025 0332 00 0 57 cax2 get address of meter 00026 7333 00 0 58 cqa 00027 2 16 000 0 59 asa 0,2 update it 00030 60 return mincs 61 62 63 ************************************************************* 64 * 65 * mincd -- increment a double-precision meter 66 * 67 * inputs: 68 * a -- address of doubleword to update 69 * q -- increment (positive or negative) 70 * 71 ************************************************************* 72 00032 73 mincd subr icd,(inh,x2) 00044 0 44 121 165 74 ldi l.a001-* inhibit interrupts and overflow 00045 0332 00 0 75 cax2 get address of meter 00046 7333 00 0 76 cqa end of binary card 00000002 00047 0335 22 0 77 lrs 18 get double-precision increment in aq 00050 2 15 000 0 78 adaq 0,2 update meter 00051 2 14 000 0 79 staq 0,2 00052 80 return mincd assm 01 09-23-82 12.173 fnp metering subroutines page 6 mupdat -- update cumulative meter 82 83 ************************************************************* 84 * 85 * mupdat -- updates a cumulative meter for averaging 86 * 87 * inputs: 88 * a -- address of doubleword meter, followed by 89 * doubleword count of updates 90 * 91 * q -- increment (positive or negative) 92 * 93 ************************************************************* 94 00054 95 mupdat subr upd,(inh,x2) 00066 0 44 077 165 96 ldi l.a001-* inhibit interrupts and overflow 00067 0332 00 0 97 cax2 get address of meter 00070 7333 00 0 98 cqa 00071 0335 22 0 99 lrs 18 get doubleword increment in aq 00072 2 15 000 0 100 adaq 0,2 00073 2 14 000 0 101 staq 0,2 update meter 00074 673 000 0 102 ila 0 get double-precision 1 00075 473 001 0 103 ilq 1 00076 2 15 002 0 104 adaq 2,2 add it to update count 00077 2 14 002 0 105 staq 2,2 00100 106 return mupdat assm 01 09-23-82 12.173 fnp metering subroutines page 7 mmsg -- update count & length of message 108 109 ************************************************************* 110 * 111 * mmsg -- increments counts and maintains average 112 * length for synchronous messages. also 113 * keeps track of minimum and maximum length 114 * 115 * inputs: 116 * a -- address of 6-word area containing the 117 * following: 118 * message count (2 words) 119 * cumulative message length (2 words) 120 * minimum message length (1 word) 121 * maximum message length (1 word) 122 * 123 * x3 - address of first buffer in message 124 * 125 ************************************************************* 126 00102 127 mmsg subr msg,(inh,x2,x3) end of binary card 00000003 00117 0 44 046 165 128 ldi l.a001-* inhibit interrupts and overflows 00120 0332 00 0 129 cax2 get address of metering area 00121 0 56 050 171 130 stz maccum-* initialize total length 00122 3333 00 0 131 cx3a 00123 0 74 040 163 132 tze msgbak-* no message, never mind 133 00124 4 10 044 170 134 msg010 tsy a.a001-*,* setbpt 00125 4333 00 0 135 cax3 00126 3 07 001 0 136 lda bf.tly,3 get the buffer tally 00127 0 34 037 166 137 ana l.a002-* =buftmk 00130 0 16 041 171 138 asa maccum-* increment running total 00131 3 07 001 0 139 lda bf.flg,3 last buffer in message? 00132 0 31 035 167 140 cana l.a003-* =bfflst 00133 0 64 003 136 141 tnz msg020-* yes, stop counting 00134 3 07 000 0 142 lda bf.nxt,3 next buffer 00135 0 64 767 124 143 tnz msg010-* if any 144 00136 673 000 0 145 msg020 ila 0 get double-precision 1 00137 473 001 0 146 ilq 1 00140 2 15 000 0 147 adaq 0,2 update message count 00141 2 14 000 0 148 staq 0,2 00142 673 000 0 149 ila 0 00143 0 47 026 171 150 ldq maccum-* get accumulated message length 00144 2 15 002 0 151 adaq 2,2 00145 2 14 002 0 152 staq 2,2 add it into total lengths 00146 0 47 023 171 153 ldq maccum-* get message length again 00147 2 20 004 0 154 szn 4,2 was the minimum ever set? 00150 0 74 011 161 155 tze msg040-* no, just set min. and max. 00151 2 67 004 0 156 cmpq 4,2 check minimum 00152 0 65 003 155 157 tpl msg030-* we haven't got a new one assm 01 09-23-82 12.173 fnp metering subroutines page 8 mmsg -- update count & length of message 00153 2 57 004 0 158 stq 4,2 we do, store it 00154 0 71 007 163 159 tra msgbak-* done 160 00155 2 67 005 0 161 msg030 cmpq 5,2 check maximum 00156 0 75 005 163 162 tmi msgbak-* we haven't beaten it 00157 2 57 005 0 163 stq 5,2 we have, store new one 00160 0 71 003 163 164 tra msgbak-* 165 00161 2 57 004 0 166 msg040 stq 4,2 first time, set both 00162 2 57 005 0 167 stq 5,2 00163 168 msgbak return mmsg 169 assm 01 09-23-82 12.173 fnp metering subroutines page 9 storage for all metering subroutines 171 00165 024000 0 172 l.a001 oct 024000 bits to inhibit interrupts and overflow end of binary card 00000004 00166 0 00777 0 173 l.a002 zero buftmk 00167 040000 0 174 l.a003 vfd 18/bfflst 175 00170 0 01000 3 176 a.a001 ind setbpt 177 00171 178 maccum bss 1 for accumulate length of current message 179 end of binary card 00000005 180 end 172 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 09-23-82 12.173 fnp metering subroutines page 10 octal symbol references by sequence no. 170 a.a001 176 134 176 40000 bfflst 41 41 174 1 bf.flg 41 41 139 0 bf.nxt 41 41 142 1 bf.tly 41 41 136 777 buftmk 41 41 173 165 l.a001 172 56 74 96 128 172 166 l.a002 173 137 173 167 l.a003 174 140 174 171 maccum 178 130 138 150 153 178 4 macwk1 127 55 60 73 80 95 106 127 168 10 macwk2 127 55 73 95 127 0 meters 31 31 32 32 mincd 73 35 73 80 12 mincs 55 34 55 60 102 mmsg 127 37 127 168 124 msg010 134 134 143 136 msg020 145 141 145 155 msg030 161 157 161 161 msg040 166 155 166 163 msgbak 168 132 159 162 164 168 54 mupdat 95 36 95 106 1 setbpt 39 176 ** 46141 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