Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!mcnc!rti!rcb
From: rcb@rti.UUCP (Random)
Newsgroups: comp.os.vms
Subject: Re: Are Transfer Vectors Truly Useful When Creating Shareable Images?
Message-ID: <1571@rti.UUCP>
Date: Wed, 22-Jul-87 13:22:07 EDT
Article-I.D.: rti.1571
Posted: Wed Jul 22 13:22:07 1987
Date-Received: Fri, 24-Jul-87 05:15:33 EDT
References: <8707220428.AA22024@ucbvax.Berkeley.EDU>
Reply-To: rcb@rti.UUCP (Random)
Distribution: world
Organization: Research Triangle Institute, NC
Lines: 62

In article <8707220428.AA22024@ucbvax.Berkeley.EDU> F1142S30%unika2@germany.CSNET (Juergen Renz) writes:
>In article <2961@blia.BLI.COM> forrest@blia.BLI.COM (Jon Forrest) writes:
>Randy Buckland answers:
>>...
>>The pointers will always be 4 bytes and the addresses won't change. ...
>
>Your wrong Randy !
>One transfer vector takes up to 8 bytes (entry routine):
>
>        .transfer       routine
>        .mask           routine
>        jmp             L^routine+2
>
>or at least 2 bytes (subroutine):
>
>        .transfer       subroutine
>        bsb             subroutine      ! this is not recommended
>
>mostly it takes 6 bytes for subroutines:
>
>        .transfer       subroutine
>        jmp             L^subroutine

Next time, try reading the article before flaming. I was not talking about
normal transfer vectors. I was talking about pointers doing the same kind of
job for global data in a shared image that transfer vectors do for procedures.
An example follows:

	.transfer	routine1
	.mask		routine1
	jmp		routine1+2

	.transfer	routine2
	.mask		routine2
	jmp		routine2+2

	data1_ptr::
	    .address	data1
	
	data2_ptr::
	    .address	data2
	
	data3_ptr::
	    .address	data3
	
	.transfer	routine3
	.mask		routine3
	jmp		routine3+3

This is not as easy as transfer vectors, but it will work. The transfer
vector for routine3 should probably have an ".align quad" in front
of it, but it is not needed. Then, in you code, you can simply use

	globalref int *data1_ptr;
	foo = *data1_ptr;

I hope this make things a little clearer.
-- 
					Randy Buckland
					Research Triangle Institute
					rcb@rti.rti.org [128.109.139.2]
					{decvax,ihnp4,seismo}!mcnc!rti-sel!rcb