[mod.computers.vax] vaxtpu programming

@seismo.UUCP (06/29/86)

Hello,

  I was wondering if anyone knew of a way to access a globally defined
symbol while in VAXTPU?  In other languages, such as basic, the call
would resemble

a% = lib$getsymbol("the_symbol",a$)

  Any help or suggestions would be useful.  As I am not  a member
of the mailing list, please send mail to me directly at

BOB @ BCVAX3 .bitnet

  Thanks for your help !
Bob
Boston College

LEICHTER-JERRY@YALE.ARPA (07/03/86)

    ...
      I was wondering if anyone knew of a way to access a globally defined
    symbol while in VAXTPU?....
There is no direct way to do this; i.e., there is neither a TPU primitive
to access the values of DCL symbols, nor any general call-out interface that
would let you call LIB$GET_SYMBOL (or whatever it's called).

HOWEVER, there IS a primitive named CALL_USER that allows you to call out to
a user-provided program written in some other language (such as BASIC).  The
user program has to be built into a shareable image, which TPU will find
using LIB$FIND_IMAGE_SYMBOL.

CALL_USER takes one integer and one string argument, which are passed on the
the user program, and returns a single string value, passed back from the user
program.  This should be sufficient for the purpose you have in mind.

Another approach is to use the callable TPU interface.  You can use it to
build a single image with your CALL_USER routine already in it, and do various
fancy things.
							-- Jerry
-------