" *********************************************************** " * * " * Copyright, (C) Honeywell Information Systems Inc., 1982 * " * * " * Copyright (c) 1972 by Massachusetts Institute of * " * Technology and Honeywell Information Systems, Inc. * " * * " *********************************************************** " MPCD - Micro Programmed Controller Dump " " Written 11/19/74 by David A. Kayden " Modified November 1981 by C. Hornig to not use IOM rel mode. include bosequ include bos_toequ " stx2 x2 save X2 tsx2 init_io initialize IOM package tsx2 ttyinit initialize operator's console package arg ttyrequest ldx2 x2 restore X2 ldx7 mem|0,2 lda mem|1,7 get first argument tmi no_arg sta devname loop: eax7 1,7 look for additional arguments lda mem|1,7 cmpa =-1 tze mpc02 eax6 keywords rpt 3,1,tze cmpa 0,6 tnz unknown aos switches-keywords-1,6 tra loop mpc02: lda devname get device name again tsx2 ljust left justify for conversion tsx2 geas convert to ascii eax6 2 skip device 1 (bulk store) cmpa cvnamla,*6 tze device eax6 1,6 cmpx6 fs_dev.max_dev_type,du tmoz *-4 tsx2 getperiph tra not_found lda devname cmpa =h tape tnz urc lda com|4,7 make sure it's an mts500 cmpa 500,dl tnz not_mpc nope lda com|9,7 get the number of tape drives ada com|11,7 sta numunits tra mpc04 device: tsx2 getconf tra not_found sxl6 did save the device id lda com|5,7 save number of drives sta numunits lda com|4,7 channel no. tra mpc05 urc: stc2 urcflg lda =h urc sta devname mpc04: lda com|3,7 get channel no. mpc05: als 18 sta channo als 9 sta pcwa+1 arl 27 tsx2 octwd lls 36 tsx2 bzel stca chnl,03 tsx2 rdclock put date/time into header sta date stq time lda =h ptpkg eaq pt_org tsx2 ldcom load the printer package tra x2 tsx2 initprint initialize for printing eax7 0 setup the printer heading mlr (),(),fill(20) desc6a heading,head_lth*6 desc6a pthdr,head_lth*6 tsx2 printon lda dumpsw ora tracesw tze mpc85 " " Loop to perform a hex dump of MPC read/write memory " and/or format the event trace table " cycle: szn dumpsw are we doing a hex dump ? tnz connect yes lda rmdcw arl 2 look at current mpc address eax1 ,au is this the first block ? tze connect yes - we need it cmpx1 trqaddr is this the trace table block ? tnz mpc80 no - skip mpc memory read connect: tsx2 connect_iom zero pcwa,ddcw tsx2 check_status arg channo tra *-2 tra io_error ldx6 rmdcw was this the first block ? tnz mpc30 no szn urcflg find the trace table pointer tnz mpc10 lda buffer+120 trace table pointer (stored at 00F0) arl 18 tra mpc20 mpc10: lda buffer+87 trace table pointer for URC (at 00AF) mpc20: lrl 8 arl 1 lls 8 eax6 ,al anx6 =o777000,du stx6 trqaddr beginning of trace table ana =o777,dl last entry in trace table sta trqptr mpc30: szn dumpsw should we do a hex dump ? tze mpc50 no - skip this tsx2 headform lda rmdcw arl 2 eax1 ,au eax0 buffer tsx2 space blank the print line mpc40: tsx2 fmdump format one line of dump tsx2 print print it adlx1 16,du increment mpc memory address canx1 =o777,du tnz mpc40 entire buffer not yet printed mpc50: szn tracesw do we expand the trace table ? tze mpc80 no lda rmdcw arl 2 eax1 ,au cmpx1 trqaddr is this the trace table block ? tnz mpc80 no eax1 buffer init buffer position mlr (),(),fill(20) change the heading line desc6a theading,3*6 desc6a pthdr+1,4*6 tsx2 headform start a new page mpc60: lda 0,1 fetch a pair of entries tsx2 trace lda 0,1 do the right hand entry als 18 tsx2 trace adlx1 1,du increment buffer position cmpx1 buffer+256,du tnc mpc60 mpc80: lda rmdcw advance to next mpc memory block adla 512*4,du sta rmdcw arl 2 eax6 ,au cmpx6 4096,du tnc cycle mpc85: lda devname eax5 devtab find this device in our table rpt devtabsz/2,2,tze cmpa 0,5 tnz x2 not there - sorry, no data ldx6 -1,5 stx6 statdesc save address of descriptions lxl6 -1,5 stx6 numstats save the number of counters mlr (),(),fill(20) change the heading line desc6a sheading,3*6 desc6a pthdr+1,4*6 mlr (),(),fill(020) desc6a *,0 desc6a pthdr+10,2*6 mlr (),(),fill(00) clear a buffer area in case we are reseting desc6a *,0 desc6a buffer+100,10*6 tsx2 headform stz lincnt init count of lines printed on this page lda =ampc " find the mpc config card for this mpc tsx2 getconf so we can print the device stats for each LA tra no_mpc lxl6 com|2,7 check for match with LA-0 cmpx6 channo tze mpcfound lxl6 com|5,7 check for match with LA-1 cmpx6 channo tnz getmore get another mpc config card mpcfound: lda com|5,7 save channel no. of LA-1 sta la_1 lda com|2,7 process LA-0 first tsx2 stats lda la_1 process LA-1 if present tmi x2 tsx2 stats ttyrequest: x2: ldx2 *,du lca 1,dl tra mem|1,2 no_arg: tsx2 erpt acc "device keyword missing" tsx2 erpt acc "usage: mpcd [periph id or device id] -dump- -trace- -reset-" tra x2 io_error: staq status tsx2 erpt acc "mpc error: stat=^w ^w" arg status arg status+1 tra x2 unknown: sta temp tsx2 erpt acc "^g unknown" arg temp tra x2 not_found: tsx2 erpt acc "^g not found" arg devname tra x2 not_mpc: tsx2 erpt acc "^g is not an mpc device" arg devname tra x2 no_mpc: tsx2 erpt acc "no mpc config card found for ^g" arg devname tra x2 " " Format the mpc read/write memory for printing fmdump: stx2 fmx2 eaa 0,1 store mpc address in print line als 2 tsx2 hexadd eax6 8 print eight words (32 bytes) per line fm2: ldq =o20,dl stq tal1,sc stq tal1,sc fm3: ldq =o20,dl stq tal1,sc stq tal1,sc lda 0,0 tsx2 stbyte store even byte tsx2 stbyte store odd byte ldq =o20,dl stq tal1,sc space tsx2 stbyte store even byte tsx2 stbyte store odd byte adlx0 1,du next word sblx6 1,du fmx2: tze * done cmpx6 4,du tnz fm3 tra fm2 tal1r: vfd 18/line,12/120,6/0 tal1: dec 0 stbyte: als 1 tsx7 sthex tsx7 sthex tra 0,2 sthex: ldq 0,dl llr 4 mlr (ql),() desc6a hextb,1 desc6a temp(5),1 ldq temp stq tal1,sc tra 0,7 hextb: bci "0123456789abcdef " hexadd: eax6 4 ldq tal1r refresh the tally stq tal1 hx1: tsx7 sthex eax6 -1,6 tnz hx1 tra 0,2 " " Format and print one entry in mpc trace table " " au - trace entry in byte format " x2 - return address " trace: stx2 trcx2 szn urcflg trace table is half as large tze trc1 for a URC ldq trc_no make sure we have the right half erq trqptr canq =o400,dl tnz tr9 no trc1: lrl 18+8 arl 1 lrl 36-8 stq trc_item save trace word tsx2 space blank the print line lda trc_item als 36-16 tsx2 hexadd print hex representation of trace entry lda trc_item szn urcflg trace format is different tnz urtrace for a unit record controller cana =o100000,dl tnz stat transfer if bit 0 of mpc word set arl 6 ana 3,dl ldx2 trctab,al trace type code is in bits 8 and 9 tra title stat: tsx2 title bci "status",12 tsx2 lc logical channel lda =hmajor- sta line+5 lda trc_item als 36-10 arl 2 ldq tal2r tsx2 stoctal insert major status lda =hub- s stca line+7,01 stca line+8,70 lda trc_item als 36-6 ldq tal3r tsx2 stoctal insert substatus tsx2 print print trace entry tsx2 space tra tr8 cmd: bci "command",12 tsx2 op tra tr4 go add the device # poll: bci "polling",12 lda =hca#- " sta line+5 lda trc_item ca # als 36-2 arl 1 ldq tal5r insert channel adaptor # tra tr6 print and return idcw: bci "idcw",12 tsx2 lc lc tra tr4 go add the device spec: bci "special",12 lda =htype- " sta line+5 lda devname cmpa =h tape tze tr2 tsx2 lc logical channel lda trc_item als 36-10 ldq tal6r tra tr3 tr2: lda trc_item als 36-15 ldq tal7r tr3: tsx2 stbin tr4: lda trc_item als 36-6 tr5: ldq =h d add device number stq line+7 ldq =hevice- stq line+8 ldq tal9r tr6: tsx2 stoctal insert device number tr8: tsx2 print lda trc_no check for most recent trace item cmpa trqptr tnz tr9 mlr (),(),fill(54) print a divider of all asteriks desc6a *,0 desc6a line,20*6 tsx2 print tr9: aos trc_no increment trace item number trcx2: tra * op: lda =hopcode sta line+5 lda =h- " sta line+6 lda trc_item als 36-14 ldq tal4r tra stoctal insert opcode lc: lda =hlc- " sta line+3 lda trc_item als 36-15 ldq tal8r tra stbin urtrace: arl 14 ldx2 urctab,al tra title urcmd: bci "ur command",12 tsx2 op tra urjoin+1 urstat: bci "ur status",12 lda =hmajor- sta line+5 lda trc_item als 36-14 ldq tal2r tsx2 stoctal insert major status tra urjoin+1 urspec: bci "ur special",12 lda =hlc- " sta line+3 lda trc_item als 36-12 ldq tal2d tra urjoin urint: bci "ur interrupt",12 lda =hint se sta line+4 lda =hrv cod sta line+5 lda =he- " sta line+6 lda trc_item als 36-12 ldq tal5d urjoin: tsx2 stbin lda trc_item als 36-8 arl 2 tra tr5 title: lda 0,2 insert trace type into line sta line+1 lda 1,2 sta line+2 tra 2,2 stbin: eax7 1 shift size tra *+2 stoctal: eax7 3 shift size stq tal1 stbin1: ana -1,du alr 0,7 sta tal1,sc ttf stbin1 tra 0,2 trctab: " trace item processors arg cmd 0 0 arg poll 0 1 arg idcw 1 0 arg spec 1 1 urctab: " urc trace item processors arg urcmd 0 0 arg urstat 0 1 arg urspec 1 0 arg urint 1 1 tal2r: vfd 18/line+6,12/2,6/0 major status tal3r: vfd 18/line+8,12/2,6/3 substatus tal4r: vfd 18/line+6,12/2,6/1 opcode tal5r: vfd 18/line+5,12/1,6/4 ca# tal6r: vfd 18/line+5,12/2,6/5 special type tal7r: vfd 18/line+5,12/7,6/5 special type - mts500 tal8r: vfd 18/line+3,12/5,6/3 lc tal9r: vfd 18/line+9,12/2,6/0 device tal2d: vfd 18/line+3,12/4,6/3 ur special tal5d: vfd 18/line+6,12/4,6/2 ur int serv code trc_item: dec 0 trc_no: dec 0 " " Read and Print Device Statistics " stats: stx2 statx2 eax6 ,al stx6 channo tsx2 octwd lls 36 tsx2 bzel stca chnl,03 stz unit lda numunits sta units szn did is this a Multics device tze stat1 no lda =hrea a yes - change headings from "unit" to "area" stca unit_hd,01 stca unit_hd+1,70 tsx2 cvinit lxl7 did eax5 cvnamla,* eax5 -23,5 stx5 cvbmt lda cvbmt,*7 sta maptal stat1: ldq units no. of units left to process statx2: tze * done cmpq 8,dl process units in groups of eight or less tmoz *+2 ldq 8,dl lda units stq units subtract current subgroup ssa units from count of remaining units mpy 10,du adq buffer,du stq endbuf stz statcnt ldx6 numstats see if this group will fit on this page adx6 4,du adx6 lincnt stx6 lincnt cmpx6 52,du tmi *+3 yes stz lincnt no - reset line count tsx2 headform and go to top of page tsx2 space tsx2 print print a blank line tsx2 print mlr (),(),fill(020) desc6a chnl-1,2*6 desc6a line+1,2*6 eax3 line+6 init print line offset eax1 buffer init buffer position stat2: szn did tze stat3 lda maptal,sc get next area no. from device map sta unit ada 1,dl convert to a hardware unit no. tra stat4 stat3: aos unit lda unit stat4: als 12 position unit no. stca channo,04 for xio_wait stx1 *+2 set buffer location for this unit tsx2 xio_wait vfd 18/*,12/10 zero channo,22 read controller register tra io_error szn resetsw are we resetting the counters ? tze stat5 no tsx2 xio_wait yes vfd 18/buffer+100,12/10 zero channo,14 tra io_error stat5: ldaq unit_hd sta 0,3 stq 1,3 lda unit get unit number tsx2 octwd convert lls 36 tsx2 bzel ana =o7777,dl orsa 1,3 place in print line eax3 2,3 eax1 10,1 cmpx1 endbuf tmi stat2 tsx2 print print the heading of unit numbers tsx2 space tsx2 print print a blank line ldx1 statdesc address of list of counter descriptions eax4 buffer stx4 bufposit stz offsetsw stat6: tsx2 space eax3 line odd; rpd 6,1 move a counter description to the print line lda 0,1 sta 0,3 stat8: lda 0,4 szn offsetsw tnz *+2 arl 18 ana -1,dl sta temp btd (),() convert binary counter to decimal desc9a temp,4 desc4ns temp1,8 mlr (),() desc4a temp1(2),6 desc6a temp,6 lda temp tsx2 bzel sta 1,3 store counter in the print line eax3 2,3 increment print line position eax4 10,4 increment buffer position cmpx4 endbuf tmi stat8 tsx2 print print one line of counters aos statcnt ldx4 bufposit szn offsetsw tnz *+3 aos offsetsw tra stat6 stz offsetsw eax4 1,4 stx4 bufposit lxl6 statcnt cmpx6 numstats tmi stat6 tra stat1 " devtab: bci ' d181' zero disk,10 bci ' d190' zero disk,16 bci ' e190' zero disk,16 bci ' d191' zero disk,16 bci ' e191' zero disk,16 bci ' tape' zero tape,8 equ devtabsz,*-devtab disk: bci "movement seeks",36 bci "data sectors written",36 bci "data sectors read",36 bci "data transfer commands executed",36 bci "seek incompletes",36 bci "header verification errors",36 bci "transfer timing errors",36 bci "data check character alerts",36 bci "count check character alerts",36 bci "dli parity errors",36 bci "alternate tracks processed",36 bci "edac correctable errors",36 bci "edac uncorrectable errors",36 bci "retries before edac correction",36 bci "dci counter",36 bci "spare counter",36 tape: bci "read records",36 bci "write records",36 bci "records with write error",36 bci "records with read error",36 bci "transfer timing errors",36 bci "marginal records",36 bci "pe records with single track correct",36 bci "mtc read count",36 even unit_hd: bci " unit-00" " bss buffer,256 channo: dec 0 rmdcw: vfd 16/0,16/512,4/0 even bss status,2 bss trqptr,1 bss trqaddr,1 did: dec 0 bss unit,1 bss maptal,1 bss cvbmt,1 bss numunits,1 bss units,1 bss bufposit,1 bss endbuf,1 bss offsetsw,1 bss statcnt,1 bss statdesc,1 bss numstats,1 bss lincnt,1 bss la_1,1 bss temp,1 bss temp1,1 keywords: bci " dump" bci " trace" bci " reset" switches: dumpsw: dec 0 tracesw: dec 0 resetsw: dec 0 urcflg: dec 0 even pcwa: vfd 6/40,6/0,6/0,3/7,3/2,6/2,6/1 PCWA vfd 9/0 PCWB ddcw: vfd 6/2,6/0,6/0,3/7,3/2,o6/40/,6/2 zero rmdcw+pgmorg,1 vfd 6/6,6/0,6/0,3/7,3/0,o6/40/,6/1 zero buffer+pgmorg,256 heading: bci " mpc read/write memory dump " bci " mm/dd hh.mm" bci " prph channel nn" equ head_lth,*-heading equ date,heading+6 equ time,heading+7 equ devname,heading+9 equ chnl,heading+11 theading: bci " event trace table" sheading: bci " device statistics" include pt_equ include fs_dev_types include bos_tv include bos_common end " " " ----------------------------------------------------------- " " " " 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 " "