" *********************************************************** " * * " * Copyright, (C) Honeywell Information Systems Inc., 1982 * " * * " * Copyright (c) 1972 by Massachusetts Institute of * " * Technology and Honeywell Information Systems, Inc. * " * * " *********************************************************** " ncopy -- disk copy package for BOS SAVE mechanism. " coded 2/21/75 by Noel I. Morris " modified 11/75 for NSS by Noel I. Morris " Modified November 1981 by C. Hornig to not use IOM rel mode. name ncopy include bosequ include bos_toequ include fs_dev_types " include ntape_equ include config_cards " events are: " 0 = bad data xfer " 1 = no disk " 2 = good " 3 = run call " " xrs are: " 3 = queue index " org ntape_org org taperopen tra * org tapewopen tra * org taper tra * org tapew tra * org inittape tra inittape_ org opentaper tra * org opentapew tra opentapew_ org runtape tra runtape_ org endtape tra endtape_ " " tsx2 inittape to initialize tape package " zero tapeden ignored by ncopy " zero fatal_error go here on fatal error in opentape(r w)_ inittape_: stx2 intpx2 save X2 ldq 2,2 pick up error return stq tperret and retain tsx2 ljust left-justify subsys name tsx2 geas and convert to ASCII sta tpsubsys save subsystem name lrl 36 move to Q lda =achnl look for CHNL card tsx2 getconf .. tra tpnochnl .. cmpq com|CHNL_cd.sub,7 with correct subsystem name tnz getmore .. eax7 3*2,7 step config index to third channel group eax6 3 test for non-null channel group tpsccd: szn com|CHNL_cd.nchan,7 .. tpnz tpfch use last channel group eax7 -3,7 try previous group eax6 -1,6 .. tpnz tpsccd until finished tpnochnl: stz tpdevt clear devt word lls 36 subsystem name in A tsx2 find_disk look for subsystem arg tpdevt tra tpconferr lxl7 tpdevt get config card index anx7 =o777760,du and mask eax7 DISK_cd.iom-CHNL_cd.iom,7 adjust for difference between cards tpfch: lda com|CHNL_cd.iom,7 get IOM number sba 1,dl minus 1 als 6 move over ada com|CHNL_cd.chn,7 insert channel number ada com|CHNL_cd.nchan,7 add number of channels sba 1,dl minus 1 to get last channel als 18 place in AU sta tpchanno als 9 Shift to PCW position sta tppcw+1 intpx2: eax2 * restore X2 tra 3,2 " " tsx2 endtape to close out tape endtape_: stx2 tpet here to end a tape stc1 tpfin tsx2 runtape szn tpfin wait until finished tnz *-2 tsx2 erpt print total errors on tape acc "disk errors = ^d." arg tperrors tpet: tra * " " tsx2 opentape(r/w) to open tape " zero queue " zero tapeno opentapew_: stc2 setrtn set return loc from setape tra setape perform setup operations lda =o310000,du get write command stca tpwidcw,40 and set in IDCW eax2 tpw0 simulate call tra tpqtest enter subroutine to get next queue entry " " Finish with current queue entry and get next one. tpwql: tsx2 tpnextq on to the next tpw0: tra tpweot end of tape return szn tpeotsw if end of tape tnz tpweot lda 1,3 get ID cana =o17,du look at device type tze tpwql ignore header and preamble records eaq 0,au get device type in QU qrl 18 move to QL anq =o17,dl mask stq tpdid and save stca tparea,60 save volume index ana =o777777,dl mask the Multics address tsx2 mulbos convert device address to BOS arg tpdid .. tra * .. arl 12 sector number right-justified in A stca tpsect,17 save sector number ldq tparea get area number szn tplastarea have we set an area yet? tmi *+3 if not, don't close tape cmpq tplastarea still the same area? tnz tpeot1 if not same, force an EOT condition stq tplastarea save area number absa xs1|0 get abs addr of data als 6 in AU stca tpwidcw+1,70 set address in DCW lda tplenq get length of data arl 18 in AL stca tpwidcw+1,03 set tally in DCW tsx2 tpwrit write record tra tpwql go get more " " End of logical or physical tape. tpeot1: stq tplastarea save new area number tpweot: tpreot: " Done with tape, unload it unless it is the last. szn tpfin Zero if tape full, not if closing out last tape. tnz tpnorwun lda tpdevt Check the device id to make sure we can rewind,/unload it ana =o17,dl lda fs_dev.media_removable-1,al tze tpnorwun Nope, can't do it tsx2 dotape Rewind and unload tape, expecting another. oct 72 tra *+1 tpnorwun: lda tpeot,dl get EOT flag orsa 0,3 set in queue entry stz tprunning tape no longer connected tsx2 tpret wait for new open call stz tpfin let endtape return tra tpret " tpwrit: stx2 tpwx2 here to write a record stz tptryct reset count of tries to write tprewt: tsx2 connect_iom start io zero tppcw,tpsidcw stc2 tprunning set state tsx2 tpret tra tpwbad retry io errors tra tprewt retry no tape tpwx2: tra * tpwbad: aos tptryct count another try lda tptryct check for 5 tries cmpa 5,dl .. tmi tprewt keep trying lda tpstat,dl get error flag orsa 0,3 and set in queue entry tra tpwx2 return and continue " " tsx2 runtape to keep tape moving runtape_: stx2 tprunx2 save callers regs szn tprunning tape connected? tze tpstatp if not, skip check_status call tsx2 check_status arg =0 tra *+2 tra *+1 tpstatp: lda tpstatus get saved status cmpa tpoldstatus has it changed? tze tprunx2 if not, don't print it sta tpoldstatus save for comparison tsx2 erpt print error status acc 'ncopy: disk status = ^w.' arg tpstatus lda tpdetail convert detailed status to hex tsx2 hexwd sta tphex ldaq tpdetail lls 24 tsx2 hexwd sta tphex+1 ldq tpdetail+1 lls 48 tsx2 hexwd ora =h0000 " sta tphex+2 tsx2 erpt print detailed status acc 'ncopy: detailed status = ^g^g^g.' arg tphex arg tphex+1 arg tphex+2 tprunx2: eax2 * szn tprunning tape running now? tnz 0,2 if so, return to caller sreg tphisreg lreg tpmyreg load mine ldx2 tpstate and tra to state prog tra 0,2 at run entry tpret: stx2 tpstate remember where we were sreg tpmyreg here to return, save my regs lreg tphisreg and load theirs tra 0,2 " " ldaq status " tsx2 tpint to deliver status tpint: sznc tprunning tape connected? tze 0,2 if not, must be spurious call sreg tphisreg save callers machine lreg tpmyreg restore mine ldx2 tpstate lda tphisreg+4 get status cana =o370000770000 Check for all bad status. tnz tperr If bad, analyze error. stz tpstatus Clear old status. stz tpoldstatus .. tra 2,2 Report normal termination. tperr: sta tpstatus save tsx2 xio_wait read detailed status vfd 18/tpdetail,12/2 zero tpchanno,18 tra *+1 ldx2 tpstate state in X2 again lda tpstatus status in A eaq 0,au Major status in QU. qrl 12 Right-justify in QU. anq =o37,du Mask major status and power bit. tra tpdisp,qu Dispatch on major status. tpdisp: tra tpbio 0: IOM channel or central error tra tpatt 1: device busy tra tpatt 2: device attention tra tpbio 3: device data alert tra tpbio 4: end of file tra tpbio 5: command reject tra tpbio 6: tra tpbio 7: tra tpbio 10: tra tpbio 11: tra tpbio 12: MPC device attention tra tpbio 13: MPC device data alert tra tpbio 14: tra tpbio 15: MPC command reject tra tpbio 16: tra tpbio 17: tra tpatt 20: peripheral absent or power off tpbio: aos tperrors count errors tra 0,2 take error return tpatt: tra 1,2 Retry operation. " " Utility subroutines. " tsx2 setape to set up PCW and IDCW's. setape: eax2 2,2 change return loc sreg tphisreg save registers ldx3 -2,2 get queue pointer in X3 lda -1,2* get tape # in A sta tapeno fill tape number into pcw's als 18 but first place in devt word sta tpdevt .. als 6 stca tppcw,20 stca tpsidcw,20 stca tpwidcw,20 stca tpdidcw,20 stz tpfin clear flags stz tpeotsw stz tperrors Clear error count. tsx2 get_status_interrupt reset status handler routine arg =0,0 lda tpsubsys subsystem name in A tsx2 find_disk get subsystem info arg tpdevt tra tperret,* tsx2 query_disk see if disk is storage system volume arg tpdevt tra tperret,* tra set1 tsx2 ask_disk ask if disk can be overwritten tra tperret,* if not, take error return set1: tsx2 get_status_interrupt Run "interrupt" driven for faster response. zero tpchanno,tpint setrtn: tra * return to caller " " tsx2 tpnextq to discard current queue and get next entry tpnextq: lda tpdone,dl finish with current queue entry orsa 0,3 turn on done bit ldx3 0,3 step to next queue entry tpqtest: lda 0,3 get flags cana tpdone,dl anything to do? tze tpnd if so, go to it szn tpfin finished with tape? tnz 0,2 if so, take end of tape return stx2 tpnqx2 save X2 stz tprunning set state to waiting tsx2 tpret and wait for more work tpnqx2: eax2 * run call, restore X2 tra tpqtest see if more work to do tpnd: cana tpskip,dl skip this queue entry? tnz tpnextq if so, go get another one ora tpstat,dl turn off error bit era tpstat,dl .. sta 0,3 store flags back in queue entry ldx7 2,3 get segment # and offset eaa 0,7 segment # in A (0-2) anx7 =o77777,du mask the offset arl 15 right-justify segment # in AU easp xs1,0,au pr 4 -> data segment eawp xs1,0,7 .. lxl7 2,3 get length from queue eax7 1,7 round to next even anx7 =o777776,du .. stx7 tplenq save data length tra 1,2 return to caller " " tsx2 dotape to perform non-data transfer operation " oct command " tra error dotape: stx2 dx lda 0,2 als 30 fill in command stca tpdidcw,40 domore: tsx2 connect_iom start oper zero tppcw,tpdidcw stc2 tprunning tsx2 tpret wait for status tra dobad tra domore dx: eax2 * tra 2,2 dobad: ldx2 dx tra 1,2 " tpconferr: tsx2 erpt acc "ncopy: Cannot get disk channel number." tra tperret,* " " Storage and Constants. tpstate: bss ,1 last loc'n in ntape package tprunning:bss ,1 non-zero if tape connected tpfin: bss ,1 non-zero to finish up tape tpeotsw: bss ,1 non-zero when EOT reflector encountered tperret: bss ,1 error return tapeno: bss ,1 current tape handler # tplenq: bss ,1 length of logical record from queue tpchanno: bss ,1 tape channel # tptryct: bss ,1 count of tries to write record tpstatus: bss ,1 tpoldstatus: bss ,1 even tpdetail: bss ,2 tphex: bss ,3 tptemp: bss ,1 tperrors: bss ,1 count of errors on tape tpsubsys: bss ,1 disk subsystem name tpdevt: bss ,1 devt word tpdid: bss ,1 device type of record type tparea: bss ,1 volume # of record ID tplastarea: dec -1 previous volume # tpsect: vfd 12/0,24/0 sector address for seek " " DCW Lists and Tape Buffers. even tppcw: vfd o6/40,6/0,6/0,3/7,3/2,6/2,6/1 reset status (PSIA compat.) vfd 9/*-* tpsidcw: vfd o6/34,6/0,6/0,3/7,3/2,6/0,6/0 Seek. vfd 18/tpsect+pgmorg,6/0,12/1 IOTD tpsect,1 tpwidcw: vfd o6/31,6/0,6/0,3/7,3/0,6/0,6/0 Write disk. vfd 18/0,6/0,12/0 IOTD tpdidcw: vfd o6/0,6/0,6/0,3/7,3/0,6/2,6/1 Non-data operation. tpddcw: vfd 6/0,6/0,6/0,3/7,3/0,6/2,6/1 Request status (just in case). eight bss tpmyreg,8 bss tphisreg,8 include qdisk " include fs_vol_label 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 " "