.TITLE INIVMF - INITIALIZE VM POOL (FORTRAN INTERFACE) .SBTTL INIVMF - TITLE PAGE .PSECT VMX$$$,RO,I .IDENT /V01.01/ .ENABL LC ; ; ************************************************************************ ; * ; THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS ONLY. DIGITAL EQUIPMENT * ; COMPUTER USER'S SOCIETY, DIGITAL EQUIPMENT CORPORATION, MONSANTO, AND * ; THE AUTHOR DISCLAIM ALL WARRANTIES ON THE PROGRAM, INCLUDING WITHOUT * ; LIMITATION, ALL IMPLIED WARRANTIES OF MERCHANTABLITY AND FITNESS. * ; * ; FULL PERMISSION AND CONSENT IS HEREBY GIVEN TO DECUS AND TO THE DECUS * ; SPECIAL INTEREST GROUPS TO REPRODUCE, DISTRIBUTE, AND PUBLISH AND * ; PERMIT OTHERS TO REPRODUCE IN WHOLE OR IN PART, IN ANY FORM AND * ; WITHOUT RESTRICTION, THIS PROGRAM AND ANY INFORMATION RELATING TO IT. * ; * ; ************************************************************************ ; ; INITIALIZE VM POOL (FORTRAN INTERFACE) ; ; VERSION: V01.01 ; ; AUTHOR: R.W. STAMERJOHN MAPC 02-NOV-81 ; ; MODIFICATION HISTORY: ; ; V01.01 RWS 02-NOV-81 INITIAL VERSION ; .SBTTL INIVMF - DOCUMENTATION ;+ ; The region_descriptor is required for PLAS versions and is ignored ; for other versions. The format of the 06-word array is as follows ; (all sizes are in bytes): ; ; |=======================================| ; | Starting APR (no default) | 00 ; |---------------------------------------| ; | | 02 ; |-- Region Size (default pool_size) --| ; | | 04 ; |---------------------------------------| ; | Window Size (default 4 K Words) | 06 ; |---------------------------------------| ; | | 10 ; |-- Region Name (default blank) --| ; | | 12 ; |=======================================| ; ; The swapping_descriptor is required for disk-based versions and is ; ignored otherwise. The format of the 06-word array is as follows ; (all sizes are in bytes): ; ; |=======================================| ; | Swapping LUN (required) | 00 ; |---------------------------------------| ; | Device Name (default "SY") | 02 ; |---------------------------------------| ; | Device Unit (default zero) | 04 ; |---------------------------------------| ; | Swapping Size (default 512) | 06 ; |---------------------------------------| ; | Swapping Buffer Address (required) | 10 ; |---------------------------------------| ; | Swapping Buffer Size (required) | 12 ; |=======================================| ; ; Note, the swapping buffer is used to map the current in-core ; mapping to the correct virtual address. Each cell is three ; words and maps a unit of the swapping size. The available space ; in the swapping buffer will limit (if necessary) the space ; allocated in the task image or in the region. The buffer must ; in the root of the task. ;- ; .SBTTL INIVMF - DECLARATIONS .DSABL GBL .DSABL CRF ; ; MACRO LIBRARY CALLS: ; .MCALL CALLR ;Call subroutine and return ; ; GLOBAL DECLARATIONS: ; .GLOBL INIVMF ;Module entry ; ; GLOBAL REFERENCES: ; ; VM subroutines. ; .GLOBL CHK$VF ;Check for legal arguments .GLOBL INI$VM ;Initialize routine .ENABL CRF .SBTTL INIVMF * INITIALIZE VM POOL (FORTRAN INTERFACE) ; ;+ ; This routine is a Fortran callable subroutine to initializ a VM ; pool It translates the Fortran arguments into the interface format ; and calls the initialization interface routine. ; ; INPUT: ; ; Call by: CALL INIVMF (pool_size, ; 1 pool_increment[, ; 2 region_descriptor][, ; 3 swapping_decsriptor]) ; ; pool_size = maximum pool size (bytes) (I*4) ; pool_increment = pool extension size (bytes) (I*2) ; region_descriptor = 06-word array (see above) ; swapping_descriptor = 06-word array (see above) ; ; OUTPUT: ; ; The VM is initialized for allocation and access. ; ; REGISTERS: ; ; Uses: R0-R5 Saves: None Stack: 1 word ;- INIVMF:: ;Ref label CALL CHK$VF ;Check for legal arguments .BYTE 4,2 ; Must be at least two and maximum of 4 ; ; Setup call to actual initialization routine. ; MOV (R5)+,R4 ;Get address of maximum pool size MOV (R4)+,R1 ;Get pool size (low) MOV (R4)+,R0 ;Get pool size (high) MOV @(R5),R2 ;Get pool increment CMP -(R5),-(R5) ;Backup to argument block CLR R3 ;Assume no region descriptor CMPB #3,(R5) ;Is the a third argument? BGT 1000$ ; If GT - no, skip MOV 6(R5),R3 ;Get address of region descriptor INC R3 ;Test for null argument BEQ 1000$ ; If EQ - yes, skip DEC R3 ;Reverse effect of test 1000$: CLR R4 ;Assume no swapping descriptor CMPB #4,(R5) ;Is there a fourth argument? BGT 1100$ ; If GT - no, skip MOV 10(R5),R4 ;Get swapping descriptor INC R4 ;Test for null argument BEQ 1100$ ; If EQ - yes, skip DEC R4 ;Reverse effect of test 1100$: CALLR INI$VM ;Call initialization routine. .END