1748254 Members
4207 Online
108760 Solutions
New Discussion юеВ

Re: IA64

 
SOLVED
Go to solution
MJ26
Frequent Advisor

IA64

Does anyone know of any good .pdf's or websites that explain Vector Tables and how to program with them? I have a macro that was written on Alpha, and will not port over to IA64 successfully. I am looking around the web, and cannot find too many helpful readings. We can rewrite the MACRO if necessary in FORTRAN or in C (if thats possible). Thanks!
19 REPLIES 19
Hoff
Honored Contributor

Re: IA64

I'm going to make assumptions and guesses around your intended question, and around just what you mean by "vector table" here, and presume that this is a question on porting a Macro32 shareable image transfer vector module from OpenVMS VAX over to the mechanisms used on OpenVMS Alpha and OpenVMS I64. If so, then start reading here:

http://labs.hoffmanlabs.com/node/163

If that's not the particular "vector table" you're referring to, then please post a hunk of the Macro32 code involved; some additional background, context, and a reproducer.
abrsvc
Respected Contributor

Re: IA64

You indicate that this macro code was written on the Alpha. If the code is Macro64, tehn it will need to be re-written. Post a snippet here and we shouldbe able to guide you.

Dan
MJ26
Frequent Advisor

Re: IA64

$TY PAALGI_VECTOR.MAR
.title lgi$loginout_callouts - data transfer vector holder definition
.ident /v1.4/

lgi$loginout_callouts::

.long 9
.address paalgi_init
.long 0
.address paalgi_decwinit
.address paalgi_identify
.address paalgi_authenticate
.long 0
.long 0
.address paalgi_logout
.long 0

.end
Hoff
Honored Contributor

Re: IA64

Ah, OK.

So you need help declaring a VMS data structure.

For this case, I'd probably use the declarations that are present in LGIDEF, but that's your call.

Here's the data structure definition you're working with:

http://h71000.www7.hp.com/doc/731final/4493/4493pro_038.html

The necessary declarations are present in Macro32 library, in the Bliss library, and in the C library. Probably in various other language definition libraries, too.

Here's how to get a look at the C struct declaration:

$ lib sys$share:sys$lib_c.tlb/extr=LGIDEF/out=lgidef.h

Here's an introduction to C programming on VMS, and which includes a discussion of SYS$LIB_C.TLB:

http://labs.hoffmanlabs.com/node/273

Whomever coded that Macro32 module didn't do it using the system declarations (no big deal); that'd normally be a block buffer declaration (.blkb, probably) and then the Macro32 symbolic offsets from LGIDEF module. (There's no macro declaration, so what was done with that Macro32 code is functional.)

To that end, there are examples of referring to the *DEF modules in various Macro32 examples, including here:

SYS$EXAMPLES:LAT$RATING_DPT.MAR
SYS$EXAMPLES:PREFER.MAR

Those show DEF declarations, and the rest of the stuff.

.blkb LGI$S_LGIARG_VECTOR


I'd guess that the Macro32 compiler error you're hitting is related to a (missing) PSECT declaration, but I'd need to run a build on an Itanium to confirm that. Probably something like:

.PSECT $RWDATA,RD,WRT,NOEXE,NOSHR

needs to be added ahead of the declarations. But without an Itanium box and without the diagnostics, the specific error isn't clear. (That code should still build, so there's probably something pretty simple wrong with it.)

Here's an introduction to Macro32 programming on VMS:

http://labs.hoffmanlabs.com/node/1435
Jess Goodman
Esteemed Contributor

Re: IA64

Offhand, I can not see why that macro code would not work on IA64. But it is possible to use C for LOGINOUT callouts, at least on VAX and Alpha, and I would hope that there is not a general problem with LGI callouts on IA64.

See the C code example attached to my response in this thread:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1182554
I have one, but it's personal.
abrsvc
Respected Contributor

Re: IA64

My first suspicion is that the addresses are unaligned. Using the library offsets rather than specific ".long" directives etc. should resolve the problem. The offsets will create an exceptable structure and should work on both Alpha and I64 without change.

Dan
Robert Gezelter
Honored Contributor

Re: IA64

MJ26,

First, welcome to the HP ITRC OpenVMS Forum.

So that we can understand precisely what is happening, it would be extremely helpful if you could post the precise error message that you are encountering.

An alignment problem can be addressed directly by properly aligning the PSECT or by using the .ALIGN macro directive.

More information would be extremely useful.

- Bob Gezelter, http://www.rlgsc.com
Hein van den Heuvel
Honored Contributor

Re: IA64

>> I have a macro that was written on Alpha, and will not port over to IA64 successfully.

Please show use how you come to that conclusion.

The macro you present compiles to the exact same definitions/psects/references/aligment on Alpha as on Itanium. For yucks I tried using "AMAC V5.0-120" and "IMAC V5.0-120-4". They both generate a Psect: . BLANK . 00000028 (00040.) 01 (001.) NOPIC CON REL LCL NOSHR EXE RD WRT
Now as Hoff says, those Psect attribute may no longer be appropriate.

Have you read Jess's reply carefully? You only awared it 5-points suggesting it did not help, yet he points to a rather complete and working example.

Good luck!
Hein
abrsvc
Respected Contributor
Solution

Re: IA64

For clarity in regards to my alignment statement. I wonder if the structure has changed in appearance slightly with the upgrade to I64 such that the "spacing" between elements is no longer as described in the macro definition presented. Using the symbolic offsets ususally prevents this type of problem.

The C solution is perhaps the best though.

Dan