From: wall@rndhse.enet.dec.com (David F. Wall)
Subject: Re: Vax-11 Macro
Date: 1996/04/17 [thread overview]
Message-ID: <4l2q7c$vk8@zk2nws.zko.dec.com> (raw)
In-Reply-To: 00001be4+00001892@msn.com
In article <00001be4+00001892@msn.com>, JohnnyO@msn.com (John Olavesen) writes:
>Is it possible to dynamically allocate memory in using VAX-11 Macro
>assembly language? If so, how would you go about doing it?
Sure it is. The assembler on OpenVMS Vax and compiler on OpenVMS Alpha do it
all the time.
Here's a simple user-mode, IPL 0, OpenVMS case:
pushab my$memory_block ; Address of the allocated block to here
pushl #512 ; How much I want (in bytes)
calls #2,lib$get_vm ; Ask the system for it
blbs r0,okay ; Go off and use it
not_ok: ; Deal with maybe not getting it...
And when you're done with it...
pushab my$memory_block ; Address of address of block
pushl #512 ; Size of block (in bytes)
calls #2,lib$free_vm ; Fly, be free!
It occurs to me that you may not be working on an OpenVMS system, but any
other operating system that supports an VAX-11 MACRO assembler will also
have in it someplace primitives for memory allocation and deallocation.
Call them in the approved fashion and away you go.
--
Me, not Digital
David F. Wall (Digital Equipment Corp., Nashua, NH)
UUCP ...!decwrl!rndhse.enet!wall
Internet wall@rndhse.enet.dec.com
- or - wall%rndhse.enet@decwrl.dec.com
---
prev parent reply other threads:[~1996-04-17 4:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-04-16 4:00 Vax-11 Macro John Olavesen
1996-04-16 4:00 ` David Bratton
1996-04-17 4:00 ` John Aldridge
1996-04-17 4:00 ` Rodney Iwashina
1996-04-19 4:00 ` Sam Samalsson
1996-04-17 4:00 ` David F. Wall [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox