[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multinational FTPAPI



Sender: Christian <chrisv5@xxxxxx>

Scott Klement wrote:
Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>

Why does IBM not (nicely!) port the record level, DSPF, PRTF I/O to C and through away this RPG? I mean... a language which uses 16 bit pointers for strings on a 64 bit platform is a joke!

That's 16 *byte* pointers, not 16-bit pointers! The iSeries system design uses something called "single-level store." Part of the design for this includes the fact that all disk or memory on the system can be addressed with a pointer -- and that means a very big pointer, 16 bytes (or 128 bits) long.

I guess you did not read my statement well enough. The internal pointer (counter, whatever) for managing character string pointers apparently has 16 BITS (two bytes, to make it clear). Or why else do you think does Appendix A for the ILE RPG manual say:


Function			Restriction
-------------------------------------------------------------
Character field length 		Maximum length is 65535 bytes
Graphic or UCS-2 field length 	Maximum length is 32766 bytes

In other words, the maximum length of a string is 2 ^ 16 - 1 (Graphic/UCS-2 use two byte per character) which *just* makes me think they are using 16 BIT pointers (offsets?). You can see the same when you look at the internal representation of strings of the type *VarSize. Two bytes length counter in front of the characters themselves. Give me a break, that is ridiculous!

This has nothing to do with RPG, specifically, it's the way the platform works. All languages use 16-byte pointers.

The single exception to this is for memory that's stored in teraspace isntead of the traditional single-level store. (Teraspace data is "mapped" across SLS spaces, so it's not actually direct memory access, but a sort of virtual interface to memory.) Teraspace pointers in C can be 8-byte (64-bit) pointers, which run a little faster because of the 64-bit nature of the system, whereas RPG still has to use 16-byte pointers (128-bit) for teraspace. But, I've never written anything where the difference is noticable.

I know pretty well that the iSeries is a virtual 128 bit machine emulated on 64 mit hardware (formerly 48 bit). Trust me, I have enough experience and knowledge to know how computers & compilers work. I might not know each platform equally well, but computers are all basically all the same) only marketing guys will tell you otherwise).


Anyway, what is your objection to 16-byte pointers on a 64-bit system?

None! You just did not understand what I said. Well, one could say that 128 bit is sort of a waste. While I disagree with Mr. Gates (640KB is *not* enough), I guess few people *really* understand the magnitude of 2^64 (hint: it is roughly 2*10^18). But hey, it's a good way to sell hardware (by artificially inflating storage space).


Regards,
Christian
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------