DataMuseum.dkPresents historical artifacts from the history of: CR80 Hard and Floppy Disks |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CR80 Hard and Floppy Disks Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 10692 (0x29c4) Types: TextFile Names: »INIT.P«
└─⟦b8af24a88⟧ Bits:30005796 CR80 Disc Pack ( MINICAMPS ) └─ ⟦this⟧ »GENS.D!SYSGEN.D!FMS.D!DUAL.D!INIT.P«
======== COMPILATION STARTED AT: 81:08:21 09:59 ======== INIT.S 00.00001 "-------------------------------------------------------------------- 00.00002 " 00.00003 " PROJECT: AMOS 00.00004 " 00.00005 " MODULE NAME: CR File System, adaption and initialize module 00.00006 " MODULE ID NMB: CSS/920 00.00007 " MODULE VERSION: 0301 00.00008 " MODULE TYPE: MAIN MODULE 00.00009 " MODULE FILES: S 00.00010 " IO.I 00.00011 " CONFIG.S 00.00012 " MERGE FILES: @**GENS.D*SWELLPREFIX.D*GENERALPARAMS.S 00.00013 " @**GENS.D*SWELLPREFIX.D*X2GENPARAMS.S 00.00014 " @**GENS.D*SWELLPREFIX.D*MONITORNAMES.S 00.00015 " @**GENS.D*SWELLPREFIX.D*COMONPARAMS.S 00.00016 " 00.00017 " SPECIFICATIONS: Informal 00.00018 " AUTHOR/DATE: NMJ/800919 00.00019 " 00.00020 " DELIVERABLE: YES 00.00021 " SOURCE LANGUAGE: SWELL 00.00022 " COMPILE COMPUTER: CR80 00.00023 " TARGET COMPUTER: CR80 00.00024 " OPERATING SYSTEM: AMOS 00.00025 " 00.00026 "-------------------------------------------------------------------- 00.00027 " 00.00028 " CHANGE RECORD 00.00029 " 00.00030 " VERSION AUTHOR/DATE DESCRIPTION OF CHANGE 00.00031 " ------- ----------- --------------------- 00.00032 " 00.00033 " 0001 NMJ/800919 Pre-release 00.00034 " 0101 GMC/801231 First official release. 00.00035 " 0102 GMC/810119 No change to this submodule. 00.00036 " 0103 GMC/810223 Check of sectors available introduced. 00.00037 " 0201 GMC/810318 No change to this submodule. 00.00038 " 0202 GMC/810401 Minor changes to source text layout. 00.00039 " 0203 GMC/810427 No change to this submodule. 00.00040 " 0301 GMC/810603 Minor change to init-dcm parameters. 00.00041 " 00.00042 "-------------------------------------------------------------------- 00.00043 "«ff»00.00044 00.00044 00.00045 00.00046 MAINMODULE FMS_INIT; 00.00047 "------------------- 00.00048 00.00049 00.00050 00.00051 %NOLIST 00.00058 %PRINT 00.00059 %SOURCE ======== IO.I ======== INIT.S 00.00059 00.00060 00.00061 00.00062 import var 00.00063 sectors_available : integer; 00.00064 00.00065 var 00.00066 init_corout: coroutine_descriptor; 00.00067 init_sem: semaphore; 00.00068 00.00069 00.00070 procedure init_sys(r6); "registers destroyed" 00.00071 00.00072 " Activates all modules in the system by calling their initialize procedures. 00.00073 " Each module should initialize its own data structures, including coroutines 00.00074 " and semaphores. 00.00075 " Workarea may be allocated from a common workarea pool. 00.00076 " Conventions for initialize procedure calls: 00.00077 " 00.00078 " r0 top of free workarea pool 00.00079 " r4 call: 00.00080 " first free of workarea when called 00.00081 " return: 00.00082 " first free of workarea; 00.00083 " on return, >> r0 implies workarea is too small 00.00084 00.00085 %LIST 00.00086 "page«ff»00.00087 00.00087 %SOURCE ======== CONFIG.S 06.00001 "Configuration parameters" 06.00002 "------------------------" 06.00003 06.00004 06.00005 const 06.00006 06.00007 nbr_fhs = 3; "number of file handlers 06.00008 nbr_chs = 0; "number of CRAM handlers 06.00009 nbr_ths = 0; "number of transaction handlers 06.00010 06.00011 nbr_local_ports = 0; 06.00012 nbr_dmas = 1; 06.00013 06.00014 nbr_fd_drvs = 1; "number of floppy disk drivers that the FMS can use; 06.00015 "they are assumed to have process names FDD000, 06.00016 "FDD001, etc. 06.00017 nbr_cdc_drvs= 2; "number of CDC disk drivers that the FMS can use; 06.00018 "they are assumed to have process names CDC000, 06.00019 "CDC001, etc. 06.00020 06.00021 nbr_ucbs = 25; "number of user control blocks: represents the 06.00022 "maximum number of processes that can use the FMS 06.00023 "at a time 06.00024 nbr_dcbs = 4; "number of device control blocks: represents the 06.00025 "maximum number of devices that may be assigned 06.00026 "at a time 06.00027 nbr_fcbs = 70; "number of file control blocks: represents the 06.00028 "maximum number of files that may be open 06.00029 "at a time 06.00030 nbr_caps = 90; "number of capabilities: represents the max nbr of 06.00031 "connections between files and users that may exist 06.00032 "at a time (and hence must be >= nbr_fcbs) 06.00033 nbr_dbcbs = 0; "number of database control blocks: represents the 06.00034 "maximum number of databases that may be used 06.00035 "at a time 06.00036 06.00037 cramteststacksize = 100; 06.00038 06.00039 cache_size = 32; "number of sectors in the cache: increasing this 06.00040 "value should increase efficiency, but it also 06.00041 "increases the workarea required by the FMS process; 06.00042 "normally it should be set to a low value to begin 06.00043 "with (25 for example), then the system should be 06.00044 "configured to give the FMS as large a process space 06.00045 "as possible, while still keeping it and the disk 06.00046 "drivers in the same memory section, then the cache 06.00047 "size can be increased so that the excessive process 06.00048 "space is minimal. 06.00049 06.00050 export var 06.00051 dma_port_spec_table: array [0..6*nbr_dmas] of integer; 06.00052 "Each entry consisting of the dma process name, and the nbr of 06.00053 "ports for low, medium and high priority, respectively. 06.00054 06.00055 init 06.00056 dma_port_spec_table= 06.00057 'DMA000', 0, 4, 0, 06.00058 -1; "table terminator 06.00059 06.00060 var 06.00061 cram_init_table: array [0..nbr_chs+nbr_dbcbs] of integer; 06.00062 "One entry per CRAM handler. An entry consists of the blocksize (in 06.00063 "bytes), followed by the identification number of each dbcb that is 06.00064 "to be handled by the handler. 06.00065 06.00066 init 06.00067 cram_init_table= 06.00068 -1; "table terminator 06.00069 06.00070 ======== INIT.S 00.00087 00.00088 00.00089 00.00090 00.00091 "Submodule initialisation procedures 00.00092 "----------------------------------- 00.00093 00.00094 import procedure init_ctrl(nbr_local_ports, cache_size, nbr_dmas : integer; r0; r4; r6); 00.00095 00.00096 import procedure init_dcm(cache_size, nbr_dcbs, nbr_caps, nbr_dbcbs, nbr_ths : integer; 00.00097 r0; r4; r6); 00.00098 00.00099 import procedure init_fm(nbr_fhs, nbr_fd_drvs, nbr_cdc_drvs, nbr_dcbs, 00.00100 nbr_ucbs, nbr_fcbs, nbr_caps : integer; 00.00101 r0; r4; r6); 00.00102 00.00103 %WHEN nbr_ths = 0 SKIP 00.00104" import procedure init_tqm(nbr_ths : integer; 00.00105" r0; r4; r6); 00.00106"%COMPILE 00.00107 00.00108 %WHEN nbr_chs = 0 SKIP 00.00109" import procedure init_cram(cramteststacksize : integer; 00.00110" cram_init_table_ptr : pointer; 00.00111" r0; r4; r6); 00.00112"%COMPILE 00.00113 00.00114 00.00115 00.00116 label workarea_small; 00.00117 00.00118 var 00.00119 link:integer; 00.00120 00.00121 begin "init sys 00.00122 r6=> link; 00.00123 00.00124 -size(process_head)=> r5; 00.00125 r5@process_head.bound=> r0 + 1; 00.00126 r5@process_head.gen_head.word_size=> r4 + r5; 00.00127 r0=> r6; 00.00128 while r6-1 >>= r4 do clr(r6@integer); "clear workarea" 00.00129 00.00130 init_dcm(cache_size, nbr_dcbs, nbr_fhs, nbr_dbcbs, nbr_ths, r0, r4, r6); 00.00131 if r0 << r4 then goto workarea_small; 00.00132 00.00133 init_ctrl(nbr_local_ports, cache_size, nbr_dmas, r0, r4, r6); 00.00134 if r0 << r4 then goto workarea_small; 00.00135 00.00136 init_fm(nbr_fhs, nbr_fd_drvs, nbr_cdc_drvs, nbr_dcbs, nbr_ucbs, 00.00137 nbr_fcbs, nbr_caps, r0, r4, r6); 00.00138 if r0 << r4 then goto workarea_small; 00.00139 00.00140 %WHEN nbr_ths = 0 SKIP 00.00141" init_tqm(nbr_ths, r0, r4, r6); 00.00142" if r0 << r4 then goto workarea_small; 00.00143"%COMPILE 00.00144 00.00145 %WHEN nbr_chs = 0 SKIP 00.00146" init_cram(cramteststacksize, address(cram_init_table), r0, r4, r6); 00.00147" if r0 << r4 then goto workarea_small; 00.00148"%COMPILE 00.00149 00.00150 if sectors_available => r6 < 0 then 00.00151 begin 00.00152 out_text(address('INSUFFICIENT CACHE SIZE(:10:)(:0:)')=> r2, r6); 00.00153 mon(terminate, 2 => r0, 2 => r1, r7) 00.00154 end; 00.00155 00.00156 if r4 << r0 then 00.00157 begin 00.00158 out_text(address('EXCESSIVE PROCESS SPACE (:0:)')=>r2, r6); 00.00159 out_hexa(r0-r4=>r2, r6); 00.00160 out_text(address('(:10:)(:0:)')=>r2, r6); 00.00161 end; 00.00162 00.00163 exit(link); 00.00164 00.00165 workarea_small: 00.00166 out_text(address('INSUFFICIENT PROCESS SPACE(:10:)(:0:)')=>r2, r6); 00.00167 mon(terminate, 1=>r0, 1=>r1, r7); 00.00168 00.00169 end "init_sys"; 00.00170 00.00171 00.00172 export var 00.00173 comon_data: comon_var; 00.00174 00.00175 00.00176 begin "main program" 00.00177 init_oc(r1, r6); 00.00178 out_text(address('FILE SYSTEM ACTIVE(:10:)(:0:)')=>r2, r6); 00.00179 mon(cor, address(comon_data), cm_init, address(init_corout)=>r0, r7); 00.00180 init_sys(r6); 00.00181 mon(cor, address(comon_data), sem_init, address(init_sem)=>r5, r7); 00.00182 mon(cor, address(comon_data), cm_wait, r5, r7); "wait forever" 00.00183 end; 00.00184 00.00185 00.00186 ENDMODULE LINES: 832 CODESIZE VARSIZE CONSTSIZE TEMPSIZE -------- ------- --------- -------- #0059 #0023 #0033 #0000 SWELL VARIABLES: ===========BLOCK: 00.00070 INIT_SYS 0036 0000 CRAM_INIT_TABLE 002F 0000 DMA_PORT_SPEC_TABLE 0037 0000 LINK ===========BLOCK: 00.00046 FMS_INIT 0038 0000 COMON_DATA 0023 0000 INIT_COROUT 002C 0000 INIT_SEM 0000 0004 SECTORS_AVAILABLE «a5»