It was thus said that the Great Dave McGuire once stated:
On 07/02/2012 09:10 PM, Sean Conner wrote:
It was thus said that the Great Dave McGuire once
stated:
Well, at work, we develop code that has to run on both 32 and 64 bit
systems (Pentium and SPARC, so I get the fun of byte swapping too!). I
don't even know what the size of a 'long' is on the 64 bit system (but I
don't really have to care when I can select uint32_t or uint64_t as needed).
I *do not* envy you there. ;)
It hasn't been that bad. In fact, the testing tools I wrote (that's my
job---to test the code the other developers write) were more portable than
the code I was testing! (our lead developer has this insane embedded mindset
where I swear he thinks we're writing our code for 1MHz 6502s instead of
64bit multicore SPARC but that's a rant for another time; he didn't bother
with byte swapping (because every cycle is sacred) on the network protocols
because, well, hey, we're using only SPARCs, until that wasn't the case).
I learned C
during the large 16-bit/32-bit switch (MS-DOS) and there, the
sizes of nearly *everything* changed on what memory model was used ...
I learned it a hair earlier than that (386s were just hitting the
streets) but never did much development (in C anyway) in DOS. I was
mostly 68K at the time.
-spc (If I recall correctly, there were several
different compilers for
68k based systems where an 'int' could be 16 bits or 32 bits ... )
I don't recall any of those...any recollection of which ones?
I seem to recall the Latice C compiler for the Amiga (I still own it)
spent a chapter or two on linking with the output from other compilers that
may use different sized ints (68000, internal 32 bit, external 16 bit bus,
so arguments could be made for using either size for an int).
-spc