[comp.os.vms] VAXC RTL "bug"

BOLTHOUSE%MCOPN1@eg.ti.COM (06/08/87)

it doesn't seem like much of a "bug" to me to have the RTL only read()
64K bytes at a time.  that's a standard VAX number for the size of the
largest string you can manipulate.  look at the VAX architecture manual
at the MOVC5 instruction, for example.  you'll notice that the srclen
and dstlen parts of the instruction are *words*, not longwords.  that's
about 64K.  you can bet RMS (which is what read() eventually calls...)
uses movc5/movc3 to get the stuff read from system space into your P0
space...  also, in the $qio(w) system call, the largest space available
in the IOSB for transfer count is 16 bits (64K...), probably for the
same reasons.

'taint a bug, 'tis a feature.  you wouldn't want RMS to have a tight for
loop to move data around when it can be done with one instruction...

david l. bolthouse
texas instruments defense electronics information systems VAX system suport
(and a bad typist...sigh)
mckinney, texas

ma bell:    214.952.2059
internet:   bolthouse%mcopn1@ti-eg.com

tli@sargas.usc.edu.UUCP (06/09/87)

In article <8706090257.AA28467@ucbvax.Berkeley.EDU> BOLTHOUSE%MCOPN1@eg.ti.COM writes:
    
    it doesn't seem like much of a "bug" to me to have the RTL only read()
    64K bytes at a time. 'taint a bug, 'tis a feature.  you wouldn't
    want RMS to have a tight for loop to move data around when it can
    be done with one instruction... 
    
Gee, and I guess a loop around a call to movc3 would be too difficult,
wouldn't it?
-- 
Tony Li - USC University Computing Services	"Fene mele kiki bobo"
Uucp: oberon!tli						-- Joe Isuzu
Bitnet: tli@uscvaxq, tli@ramoth
Internet: tli@sargas.usc.edu

mcguffey@unc.cs.unc.edu (Michael McGuffey) (06/09/87)

In article <8706090257.AA28467@ucbvax.Berkeley.EDU> BOLTHOUSE%MCOPN1@eg.ti.COM writes:
>
>it doesn't seem like much of a "bug" to me to have the RTL only read()
>64K bytes at a time.  that's a standard VAX number for the size of the
>largest string you can manipulate.  look at the VAX architecture manual
>at the MOVC5 instruction, for example.  you'll notice that the srclen
>and dstlen parts of the instruction are *words*, not longwords.  that's
>about 64K.  you can bet RMS (which is what read() eventually calls...)
>uses movc5/movc3 to get the stuff read from system space into your P0
>space...  
>
>'taint a bug, 'tis a feature.  you wouldn't want RMS to have a tight for
>loop to move data around when it can be done with one instruction...
>

No.  But, it would be nice if:

	a) the RTL read() called the RMS function enough times to transfer
		the correct number of bytes.  It's not too difficult.  That's
		how I got around the "bug".

	b) the description of the read() function in the VAXC reference
		manual contained a statement saying the largest read is 64K.

*FLAMEON*
I may be wrong, but doesn't a VAX running your favorite flavor of unix and
a VAX running VMS use the same machine instruction set... or have the unix
hackers rewritten the VAX architecture manual to include a MOVLARGE instruction
to move arbitrarily large strings.  If unix can do the job in one call to 
read(), VMS should be able to also. 
*FLAMEOFF*

Throughout this whole ordeal, I remain faithful to my VAX and VMS.

mike
mcguffey@dopey.cs.unc.edu