.Title CRVIRT -- Create Region for Virtual .Enabl lc ;+ ; ; CRVIRT -- Create Region for use of Fast Virtual Routines ; ; Author: Gary L. Maxwell ; National Strong Motion Data Center ; Branch of Engineering Seismology and Geology ; U.S. Geological Survey ; 345 Middlefield Road, Mailstop 977 ; Menlo Park, California 94025 ; ; Version: Y01 ; Support: RSX-11M/M-Plus ; ;- .Mcall rdbdf$ rdbdf$ ; Define Region Definition Block offsets .Mcall crrg$s .psect $code,ro,i ;+ ; ; Subroutine CRVIRT (isize, irdb, ierr) ; ; Create a region of memory ; ; isize Size of region to create, expressed as 512 byte blocks ; ; irdb Region definition block, defined as INTEGER*2 irdb(8) ; ; ierr Output status: 1 - Successful ; <0 - Unsuccessful - contains DSW value ; ; CRVIRT initializes the RDB and requests the Executive to create the ; region. If successful, upon return the task is attached to the region. ; ;- ISIZE = 2 IRDB = 4 IERR = 6 Crvirt:: mov #ie.alg,@IERR(r5) ; Assume parameter problems mov IRDB(r5),r0 ; Get RDB address mov r0,r1 ; Copy to initialize clr (r1)+ ; Clear region ID mov @ISIZE(r5),r2 ; Get size the user wants bit #160000,r2 ; Check for the impossible bne 95$ ; Return IE.ALG ash #3,r2 ; Multiply by 8 mov r2,(r1)+ ; Set size to create clr (r1)+ ; Don't set a name for the region clr (r1)+ ; ... mov #<^RGEN>,(r1)+ ; Make sure it goes into GEN partition clr (r1)+ ; ... mov #,(r1)+ ; Setup status word mov #167000,(r1)+ ; Setup protection mask crrg$s r0 ; Create the region mov $dsw,@IERR(r5) ; Set return code 95$: return ; Return to caller .end