From: SMTP%"munroe@DMC.COM" 6-JUN-1994 11:37:55.66 To: EVERHART CC: Subj: locking code into memory Date: Wed, 01 Jun 1994 20:39:51 EDT From: munroe@DMC.COM To: croll@DMC.COM, everhart@DMC.COM Cc: croll@acornsw.com, EVERHART@arisia.gce.com Message-Id: <0097F516.D60F8BFE.1892@DMC.COM> Subject: locking code into memory From: MX%"mahan@TGV.COM" 1-JUN-1994 18:38:58.17 To: MUNROE CC: Subj: Re: Locking code into memory... Return-Path: Received: from TGV.COM by dmc.com (MX V3.3 VAX) with SMTP; Wed, 01 Jun 1994 17:43:48 EDT Date: Wed, 1 Jun 94 14:43:40 PDT From: mahan@TGV.COM (Patrick L. Mahan) Message-ID: <940601144340.606008cd@TGV.COM> Subject: Re: Locking code into memory... To: munroe@dmc.com X-ST-Vmsmail-To: ST%"munroe@dmc.com" In article <1994Jun1.140921.2678@thehulk> you write: # #In the vein of "I KNEW I should have kept that...": # #A while back there was a discussion of how to get the addresses #of code in order to lock them down using LCKPAG. The eventual #hack had to do with declaring bogus entry descriptors, but I #can't for the life of me remember the details. # #Can someone out there refresh my memory? # It was me, and I had posted to ALPHA-IDS first. Basically what you need to do is create 2 PSECTS that you can address inside you program and place all of the code that needs to be locked down inside one or more modules. Then using the Linker COLLECT and CLUSTER statements you can group the code with the 2 special psects bracketing these modules. This causes the code as well as the linkage pointers to become locked down into memory. For example: ! ! Cluster START_OF_CODE_LINKAGES, $LINKAGE and END_OF_CODE_LINKAGES ! CLUSTER=START_OF_LOCKED_CLUSTER ! mark the start of the cluster CLUSTER=LOCKED_CLUSTER,,,LOCK_MODULE1,LOCK_MODULE2,LOCK_MODULE3 CLUSTER=END_OF_LOCKED_CLUSTER ! mark the end of the cluster ! ! Collect START* into the start of locked cluster ! COLLECT=START_OF_LOCKED_CLUSTER,START_OF_LOCKED_CODE ! ! Collect END* into the end of locked cluster ! COLLECT=END_OF_LOCKED_CLUSTER,END_OF_LOCKED_CODE -- Patrick L. Mahan --- TGV Window Washer ------------------------------- Mahan@TGV.COM --------- Always listen to the experts. They'll tell you what - Lazarus Long can't be done, and why. Then do it. From the Notebooks of Lazarus Long -- Dick Munroe Internet: munroe@dmc.com Acorn Software, Inc. UUCP: ...uunet!thehulk!munroe 267 Cox St. Office: (508) 568-1618 Hudson, Ma. 01749 USA FAX: (508) 562-1133 GET CONNECTED!!! Send mail to info@dmc.com to find out about DMConnection.