" " Begin include file ...... cvadd.incl.alm " revised for nss 3/75 THVV " Last modified 3/12/76 by Noel I. Morris " ADDRESS CONVERSION PACKAGE FOR BOS " Multics address format: " " --------------------------------------------------------------------------- " | record number | " --------------------------------------------------------------------------- " | iom | channel | unit number | config card ptr | device type | " --------------------------------------------------------------------------- " " " BOS address format: " " --------------------------------------------------------------------------- " | sector number | sector count | " --------------------------------------------------------------------------- " | iom channel unit number | device type | " --------------------------------------------------------------------------- " " " Format of phyadd: " " --------------------------------------------------------------------------- " | unit | " --------------------------------------------------------------------------- " | cylinder | " --------------------------------------------------------------------------- " | track | " --------------------------------------------------------------------------- " | record | " --------------------------------------------------------------------------- " " lda =v24/bosad,12/n to read or write a device " tsx2 (r|w)dev " arg dt_wd (vfd 3/iom,6/chn,9/drive,18/device_type) " nop seg|offset " tra error " " tsx2 phybos Converts contents of "phyadd" to bos address " arg dt_wd .. input " tra error .. never " sta =v24/bosad,12/1 " " lda =v24/bosad " tsx2 bosphy converts bos to "phyadd" contents " arg dt_wd .. input " tra error .. never " " lda =v24/bosad,12/n bos addr to multics addr " tsx2 bosmul " arg dt_wd .. input " tra error .. error return " sta multicsaddr DL " " lda devadd multics to bos " tsx2 mulbos " arg dt_wd .. input " tra error .. error return " sta =v24/bosad,12/16 " " ldx0 argno starts scan in "arg" here " tsx2 argbos converts arg list to bos addr " arg dt_wd .. output " arg print number .. for printing " tra error .. if bad addr " sta =v24/bosad,12/n .. RESULT " stq =v24/maxbosad,12/0 .. " stx0 next argno " " lda model_no " tsx2 lookup_model Get device type from model " tra bad_model Illegal model number " sta device_type " " lda device_name Get device type from device name " tsx2 lookup_devname .. " tra bad_name Illegal device name " sta device_type " " lda subsystem_name " tsx2 find_disk Get devt from subsystem name " arg devt Must have device address set " tra error " " tsx2 find_root Get devt for the root volume " tra error " sta root_devt " " lda partname " tsx2 find_part Get devt and address range " arg devt " tra bad_part " sta frec " stq nrecs " " cvinit: tra 0,2 initialization no longer needed include rwdev " phybos: lxl7 0,2* get dev type anx7 =o17,du mask device type code tra *,7 tra cv.pb1 bulk tra cv.pb2 MSS500 tra cv.pb3 MSS450 tra cv.pb4 MSS400 (d191) tra cv.pb5 DSU190 tra cv.pb6 DSU181 tra cv.pb7 MSS501 cv.pb1: stz phyadd+1 zero out extraneous cells stz phyadd+2 not used in bulk store computation cv.pb2: cv.pb3: cv.pb4: cv.pb5: cv.pb6: cv.pb7: ldq phyadd cylinder number mpy fs_dev.track_per_cyl-1,7 adq phyadd+1 track number mpy fs_dev.sect_per_track-1,7 adq phyadd+2 record number lls 36+12 cv.pbr: ora =1,dl add size bit tra 2,2 bosphy: arl 12 shift off length lxl7 0,2* dev type anx7 =o17,du mask device type code cmpa fs_dev.sect_per_dev-1,7 Check against limits. tpl 1,2 Error if too big. lrl 36 disk sector in Q div fs_dev.sect_per_track-1,7 sta phyadd+2 record number div fs_dev.track_per_cyl-1,7 sta phyadd+1 track number stq phyadd cylinder number tra 2,2 " bosmul: lxl7 0,2* dev type anx7 =o17,du mask device type code arl 12 Put sector no. in AL cmpa fs_dev.sect_per_dev-1,7 check for legal sector address tpl 1,2 .. sta cv.temp lrl 36 sector number to Q div fs_dev.sect_per_cyl-1,7 Q = cylinder # cmpa fs_dev.mult_sect_per_cyl-1,7 in unusable part of cylinder? tmi *+3 if so, lca fs_dev.rem_per_cyl-1,7 round the sector number down asa cv.temp .. mpy fs_dev.rem_per_cyl-1,7 reduce sector count by "gap" lls 36 neg ada cv.temp ..to get number of sectors used arl 4 Divide adjusted number by 16 (sectors/rec) tra 2,2 mulbos: lxl7 0,2* anx7 =o17,du mask device type code cmpa 0,du Check for legitimate Multics address. tmi 1,2 .. cmpa fs_dev.rec_per_dev-1,7 tpl 1,2 lrl 36 position qls 4 mpy by 16 stq cv.temp div fs_dev.mult_sect_per_cyl-1,7 Get cylinder number mpy fs_dev.rem_per_cyl-1,7 Compute size of "gaps" not used lls 36 ada cv.temp Add in integral sectors als 12 Shift to left half ora =16,dl Insert sector count tra 2,2 " argbos: stx3 cv.abx3 switch x2 to x3 eax3 0,2 stz 0,3* clear devt word stz cv.ab.offset clear address offset lda arg,0 Pick up first word typed, s/b keyword eax0 1,0 Step to next arg. cmpa =h root tze cv.ab.root_type if root volume type cmpa =h part tze cv.ab.part_type if partition type cmpa =h vol tze cv.ab.vol_type If phys vol name " Process [ | RECORD | SECTOR ] cv.ab.phy_type: tsx2 ljust tsx2 geas cmpa =abulk Bulk store? tze cv.ab.notb If so, don't get device number. sta cv.temp save device name lda darg,0 get number of disk unit tmoz cv.ab.err1 if zero, in error sta arg,0 this'll fix patch command eax0 1,0 step to next arg als 18 Pos for dvt word sta 0,3* Stow lda cv.temp Get subsystem name again. cv.ab.notb: tsx2 find_disk Look up disk card arg 0,3* tra cv.ab.err tra cv.ab.exit " Process ROOT [ | RECORD | SECTOR ] cv.ab.root_type: tsx2 find_root Find device info for root volume. tra cv.ab.err sta 0,3* Save root devt. tra cv.ab.exit And join common code. " Process PART [ | RECORD | SECTOR ] cv.ab.part_type: lda arg,0 Get partition name. tsx2 ljust Left-justify. tsx2 geas Convert to ASCII. tsx2 find_part Look up partition. arg 0,3* tra cv.ab.err sta cv.ab.offset Save address offset. adq cv.ab.offset Compute address limit. sbq 1,dl .. lls 36 Address limit in A. tsx2 mulbos Convert to BOS address. arg 0,3* tra cv.ab.err2 arl 12 Right-justify address limit. sta cv.ab.limit And save. eax0 1,0 Step to next arg. tra cv.ab.exit1 Join common code. " Process VOL [ | RECORD | SECTOR ] cv.ab.vol_type: tra cv.ab.err CODE TO BE SUPPLIED. " cv.ab.exit: lxl7 0,3* Get device type in X7. anx7 =o17,du .. lda fs_dev.sect_per_dev-1,7 Get number of sectors on device. sba 1,dl Compute max sector number. sta cv.ab.limit Save sector address limit. cv.ab.exit1: lda arg,0 Get Multics address or "SECTOR" cmpa =hsector Do we want sector address? tnz cv.ab.record No, use as record number. eax0 1,0 Sector address. Step to next arg. lda cv.ab.offset Get record offset. tsx2 mulbos Convert to sector offset. arg 0,3* tra cv.ab.err2 arl 12 Right-justify. sta cv.ab.offset And save. tsx2 cvgno Get sector number. ada cv.ab.offset Add in the offset. sta 1,3* Save for printing. als 12 Place in sector address position. ora 1,dl With sector count of 1. tra cv.ab.exit2 And exit. cv.ab.record: cmpa =hrecord Redundancy here to make Bernie happy. tnz *+2 He forgets what default is. eax0 1,0 Step over arg. tsx2 cvgno And get real number. ada cv.ab.offset Add record offset. sta 1,3* Save record number for printing. tsx2 mulbos Convert to BOS addr. arg 0,3* .. tra cv.ab.err2 cv.ab.exit2: lrl 12 Place address in AL. cmpa cv.ab.limit Compare against limit. tpnz cv.ab.err2 .. lls 12 Move back to correct position. ldq cv.ab.limit Get address limit. qls 12 In correct position. eax2 0,3 restore exit cv.abx3: eax3 * return normal tra 3,2 cv.ab.err: eax2 0,3 Retrieve x3 ldx3 cv.abx3 .. tra 2,2 cvgno: lda arg,0 get next arg tmi cvgbad must be positive cmpa =o100,du and within range tpl cvgbad .. eax0 1,0 step to next arg tra 0,2 and return cvgbad: lda 0,dl use zero instead tra 0,2 return without bumping X0 cv.ab.limit: bss ,1 cv.ab.offset: bss ,1 " " find_disk - Given subsystem name, finds devt " this pgm sets iom, chn, dev type " Device number must already be set in devt. " find_disk: stx2 cv.fd.gy cmpa =abulk Special case for bulk store. tze cv.fd.fb Skip disk card lookup. ldq =o777,dl Look at first 3 chars of A. cmk =adsk. Must be "dskn". tnz cv.fd.err3 Otherwise, error. tsx2 getperiph Get PRPH card for disk tra cv.fd.conf_err lda com|DISK_cd.iom,7 DISK found. get physical parameters.. iom sba 1,dl minus 1 als 6 ora com|DISK_cd.chn,7 .. channel als 18+9 ldx2 cv.fd.gy restore X2 orsa 0,2* and return IOM and channel number eaa 0,7 config card index in AU arl 18 shift to AL orsa 0,2* and save lda 0,2* Get devt word. arl 18 Right-justify device number. ana =o777,dl Mask it. tze cv.fd.gy If device zero, just give subsys info. cv.fd.ml: szn com|DISK_cd.ndrives,7 End of type groups? tmi cv.fd.err2 If so, error. sba com|DISK_cd.ndrives,7 Subtract number of drives. tmoz *+3 If negative, we've found type group. eax7 2,7 Step to next type group. tra cv.fd.ml .. lda com|DISK_cd.model,7 .. model number cv.fd.lk: tsx2 lookup_devmodel Look up model number. tra cv.fd.err1 cv.fd.gy: eax2 * orsa 0,2* insert type code tra 2,2 cv.fd.conf_err: tsx2 cv.conf_err cv.fd.err: ldx2 cv.fd.gy tra 1,2 cv.fd.fb: ldq =a " Look for BULK card. tsx2 getconf .. tra cv.fd.conf_err Error if not found. ldq com|BULK_cd.nrec,7 Get number of records on this bulk store. stq fs_dev.rec_per_dev Set table entry. qls 4 Compute number of sectors. stq fs_dev.sect_per_dev Set table entry. tra cv.fd.lk Now, look up data for bulk store. " " find_root - Find root devt. find_root: stx2 cv.fr.gx save X2 lda =aroot Look for "ROOT" config card. ldq =a " tsx2 getconf tra cv.fr.conf_err lda com|ROOT_cd.drive,7 Get drive number. als 18 In AU. sta cv.fr.temp Save. lda com|ROOT_cd.sub,7 Get subsystem name. tsx2 find_disk Look up disk subsystem. arg cv.fr.temp tra cv.fr.err cv.fr.gx: eax2 * lda cv.fr.temp Answer in A. tra 1,2 cv.fr.conf_err: tsx2 cv.conf_err cv.fr.err: ldx2 cv.fr.gx tra 0,2 cv.fr.temp: bss ,1 " " find_part - get device and extent of partition. find_part: stx2 cv.fp.x2 Save X2. sta cv.fp.pn Save partition name. lrl 36 Shift partition name to Q. lda =apart Search for PART card. tsx2 getconf .. tra cv.fp.conf_err .. cmpq com|PART_cd.name,7 Correct one? tnz getmore If not, keep looking. lda com|PART_cd.drive,7 Get drive number. sta cv.temp1 Save temporarily. als 18 Shift to correct position in devt word. sta cv.fp.devt And save. lda com|PART_cd.sub,7 Get subsystem name sta cv.temp Save temporarily. tsx2 find_disk Get devt info for this subsystem. arg cv.fp.devt .. tra cv.fp.err .. lda =v24/label.part/64,12/1 Read correct sector from disk label. tsx2 rdev .. arg cv.fp.devt .. nop cv.dbuff .. tra cv.fp.err .. lda cv.dbuff+label.nparts-label.nparts/64*64 als 2 Get number of parts * 4. eax7 0,al In X7. lda cv.fp.pn Partition name in A. cv.fp.loop: eax7 -4,7 Decrement label index. tmi cv.fp.err1 If not found, error. cmpa cv.dbuff+label.part-label.part/64*64,7 tnz cv.fp.loop Loop until part found. cv.fp.x2: eax2 * Restore X2. lda cv.fp.devt Get devt. sta 0,2* And return to caller. lda cv.dbuff+label.frec-label.frec/64*64,7 ldq cv.dbuff+label.nrec-label.nrec/64*64,7 tra 2,2 Return with extent in AQ. cv.fp.conf_err: tsx2 cv.conf_err cv.fp.err:ldx2 cv.fp.x2 Restore X2. tra 1,2 Take error return. cv.fp.devt: bss ,1 devt word cv.fp.pn: bss ,1 partition name " cv.conf_err: stx2 cv.cfe.x2 sta cv.temp stq cv.temp1 tsx2 erpt acc "No ^a ^a config card." arg cv.temp arg cv.temp1 cv.cfe.x2:eax2 * tra 0,2 cv.ab.err1: tsx2 erpt acc "No disk drive specified." tra cv.ab.err cv.ab.err2: tsx2 erpt acc "Illegal device address." tra cv.ab.err " cv.fd.err1: sta cv.temp tsx2 erpt acc "Illegal model ^d. on disk card." arg cv.temp tra cv.fd.err cv.fd.err2: tsx2 erpt acc "Illegal device number." tra cv.fd.err cv.fd.err3: sta cv.temp tsx2 erpt acc "^a does not specify disk subsystem." arg cv.temp tra cv.fd.err cv.fp.err1: tsx2 erpt acc "No part ^a on ^a ^d." arg cv.fp.pn arg cv.temp arg cv.temp1 tra cv.fp.err " lookup_devmodel: stx0 lkdmx0 Save X0. eax7 0 Initialize table index. rpt fs_dev.n_models,1,tze Search table of models. cmpa fs_dev.models,7 .. lkdmx0: eax0 * Restore X0. ttn 0,2 Take error return if not found in table. lda fs_dev.modelx-fs_dev.models-1,7 Get device type. tra 1,2 Return to caller. " " Storage cv.temp: oct 0 cv.temp1: oct 0 cv.dbuff: bss ,64 disk sector buffer lth_of_phy_addr: "Number of parts in phy addr zero 1 bulk zero 3 MSS500 zero 3 MSS450 zero 3 MSS400 (d191) zero 3 DSU190 zero 3 DSU181 zero 3 MSS501 phyadd: bss ,3 " End of include file ...... cvadd.incl.alm " " " ----------------------------------------------------------- " " " " 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 " "