" " Begin include file .... getsec.incl.alm " Created by Craig Jensen on 10/18/72. " Modified THVV 3/75 for nss: Not use space Multics can't page into " This subroutine is used to allocate space on the BOS disk. " " Example of usage: " lda len,dl Indicate size of area wanted (in 64 word units). " tsx2 getsec " tra error Error transfer if out of disk space. " sta =v24/sector,12/len Assigned sector address with count. getsec: stx2 gs_x2 Save return reg. " ENSURE THAT THE SIZE OF THE SPACE REQUESTED IS LESS THAN THE NO. OF SECTORS PER CYL. lxl7 com|bos_dvt Get index which points to the no. of sectors per cyl. cmpa fs_dev.mult_sect_per_cyl-1,7 Is a cyl. big enough? tmi will_fit_in_cyl Yes, continue. tze will_fit_in_cyl Yes, continue. tsx2 erpt No, gripe. acc "Allocation request larger than cylinder size." ldx2 gs_x2 Restore return reg. tra 0,2 Return to caller's error routine. " SEE IF THERE IS ENOUGH SPACE IN THE CYLINDER WE LAST ALLOCATED SPACE FROM will_fit_in_cyl: " Space left in cyl. = mult_sect_per_cyl - remainder of (com|used / mult_sect_per_cyl) sta gs_len Save size of the space needed. ldq com|used Get the sector no. of the first free sector. qrl 12 Right-justify div fs_dev.mult_sect_per_cyl-1,7 Get # of sectors alloc. in current cyl. neg 0 Subtract this from # of sectors per cyl. to get ada fs_dev.mult_sect_per_cyl-1,7 # of sectors in current cyl. yet available. cmpa gs_len Is there enough space in the current cyl.? tpl found_room Yes, continue to next step. ada fs_dev.rem_per_cyl-1,7 Also, waste the "gap". als 12 shift to sector address position asa com|used No, bump the free sector addr. to the next cyl. " ALLOCATE THE SPACE AND UPDATE THE CURRENT SECTOR POINTER found_room: ldq gs_len Hold length in Q. lda com|used Get next available sector stca gs_len,74 Place in word with sector count. qls 12 Shift to sector address position. asq com|used Increment current sector address. " ENSURE THAT THE BOS DISK SPACE HAS NOT BEEN EXCEEDED lda com|used cmpa com|useable Next sector no. > max. sector no.? tmoz gs_finish No, finish up. tsx2 erpt Yes, gripe. acc "Out of Bos disk space." ldx2 gs_x2 Restore return reg. tra 0,2 Return to caller's error routine. " FINISH UP AND RETURN gs_finish: lda gs_len Assigned sector # in A. tra 1,2 Normal return. " DATA AREAS gs_len: bss ,1 Size of area to be allocated. gs_x2: bss ,1 Place to save x2. " End of include file ...... getsec.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 " "