On Friday 15 April 2005 8:50 am, Colin Carter wrote:
If you're an old COBOL guy you are probably aware that a very large proportion of today's active code is still in COBOL (and FORTRAN). Yes. My first language was FORTRAN on an IBM 7044. I learned COBOL and Assembler a bit later.
There are very few new applications written in COBOL, but there are COBOL
compilers available on all systems.
BTW: I am aware of the memory layouts of both the AMD64 (in both 32-bit and
64-bit mode) as well as EM64T (Intel's x86-64) as well as the Itanium.
The advantage of the AMD64 and EM64T over the Itanium today is that existing
32-bit code and 32-bit Operating systems run well. The AMD64 handles NUMA
better than Intel today. Both these chips will serve the desktops and low
end servers well for the next few years, and the Itanium is better for the
high end servers.
Note that Linux has been a 64-bit OS since 1994 when it was ported to the
Alpha by Jim Paradis and Linus. Actually Jim did the first port of 32-bit
Linux, then Linus followed shortly with a full 64-bit port.
But, going back to standards. I was involved in porting some Burroughs COBOL
apps to IBM 370 COBOL. What a mess:
numbers: Both used BCD numbers, in COBOL, for example picture 9999.99.
In IBM, the above picture would pack to 4 bytes, because IBM always used a
nybble for a sign. Burroughts addressed at the nybble level, and this
picture would fit into 3 bytes because Burroughs did not require a sign
nybble. In the picture s9999.99, on Burroughs this would be 3.5 bytes or 7
nybbles.
Another Burroughsism:
01 foo.
02 bar1 99999.99.
02 bar2 99999.99.
01 fubar redefines foo picture 99999999999999.
In this case you could add fubar to another similar structure, and as long
as the fields did not overflow, you would get the right amount. On IBM you
were guaranteed to crash with an 0C7 exception.
This is one example of why programming standards (as in ISO or ANSI) are
important. Back in those days, interoperability was something that was not
done very often. Today, as I mentioned, when I write some code, it must be
portable to 64-bit, 32-bit, little-endian, big-endian, and various OS's. By
writing to a standard, my code should be reasonably portable.
--
Jerry Feldman