Computer math (was 33! science project)
Long long ago, I ran Whitesmiths' "C" compiler under CP/M on a Z80 system but forgot what data types were "native". I also have PL/1 for CP/M. While "native" data types are definitely faster (word-sized integers), even the Z80 had math co-processors. Before it was on-die, there was a variety of 8087 math co-processors by Cyrix, AMD as well as Intel. So speed and precision were far from "standardized". -- jeff jonas
On 03/22/2018 07:11 AM, Jeffrey Jonas via vcf-midatlantic wrote:
Long long ago, I ran Whitesmiths' "C" compiler under CP/M on a Z80 system but forgot what data types were "native". I also have PL/1 for CP/M.
While "native" data types are definitely faster (word-sized integers), even the Z80 had math co-processors. Before it was on-die, there was a variety of 8087 math co-processors by Cyrix, AMD as well as Intel. So speed and precision were far from "standardized".
I recall there were standards, a lot of them. There were several floating point standards (even within the IEEE standards). Many seem to have grown from the fact that smaller systems grew into larger ones. Even today this continues. I know that there is a Big Numbers library (not necessarily a standard) for handling really big numbers. Back to retro, my Atari BASIC supports floating point. The floating point package maintains numbers internally as 6-byte quantities: a 5-byte (10 BCD digit) mantissa with a 1-byte exponent. I thought it had an IEEE standard but I can't find anything on it at the moment. Also I recall AMD having a few FPU (AMD9511). I always wondered how much that might have helped a processor like the 6502. Some more info on the 8231, 9511 and 9512 FPUs: http://www.cpushack.com/2010/09/23/arithmetic-processors-then-and-now/ -- Linux Home Automation Neil Cherry ncherry@linuxha.com http://www.linuxha.com/ Main site http://linuxha.blogspot.com/ My HA Blog Author of: Linux Smart Homes For Dummies
On Thu, Mar 22, 2018 at 7:11 AM, Jeffrey Jonas via vcf-midatlantic < vcf-midatlantic@lists.vintagecomputerfederation.org> wrote:
Long long ago, I ran Whitesmiths' "C" compiler under CP/M on a Z80 system but forgot what data types were "native". I also have PL/1 for CP/M.
While "native" data types are definitely faster (word-sized integers), even the Z80 had math co-processors. Before it was on-die, there was a variety of 8087 math co-processors by Cyrix, AMD as well as Intel. So speed and precision were far from "standardized".
-- jeff jonas
thanks Jeff for mentioning about the C compilers, I hadn't considered them as my favorite then was still Fortran. that's something I like to try as well including the PL/I compiler I still have to make some disk images of these for my Kaypro, but I at least I found where to download these compilers About the Z80 math co-processors, I guess you mean the Intel i8231 and the AMD 9511, both equal, these worked for any 8080/Z80 These came out in the late 70s, I use one on my Compupro SS-1 card I used this for one of my old VCF exhibits about Floating Point on S-100 using my Imsai And Herb has a great resource which I relied upon for this, it's been updated since then at this link http://www.retrotechnology.com/herbs_stuff/float.html And the Pascal MT+ compiler supported this co-processor During that same time period, both Intel and AMD came out with intermediate solutions, both the i8232 and the 9512 Both attempts included the current draft of the IEEE-754 spec but with limited math functions. but at least they started to include double-precision arithmetic with an 11bit exponent, I'm not sure if any of the compilers took advantage of these as they did with the 8087. There was even a discrete design on a S-100 Floating Point card from Northstar. But I think that had limited precision. And I don't think any of the home microcomputers with built-in BASIC ever had true double-precision. But there is a question if one of them with alternate language compilers had any support for this, eg Pascal on C64. But Intel took a pro-active stance and made a very strong design for the 8087 in 1980, as they started designing this in the late 70s, using the draft from the IEEE-754, and they included nearly all math functions, as well as single[32bit], double[64bit] and extended precision[80bit], and with their matching exponent sizes to gain a larger range of numbers with each precision. What you said about standards is true, even the mainframes & minicomputers had their issues about getting a Floating Point standard since the 1960s. IBM was really the golden standard for a long time and many companies followed their format so datasets would remain compatible. Since many projects, just as at my first job, involved transporting data between several vendors in the same system. But even CDC and CRAY with their supercomputers had great influence in defining the later standard as they had an expanded definition of using double-precision and larger exponents. Even at my first job, and I noticed other companies tried to get their firmware patched to match the new IEEE-754 in 1985. As a curiosity, I like to get my Compupro 86 running since that has a 8087 and find matching compilers in CP/M-86. Along with finding matching compilers for the DOS machines using the 8087. Dan -- _ ____ / \__/ Scotty, We Need More Power !! \_/ _\__ Aye, Cap'n, but we've only got 80 columns !!
On 03/22/2018 07:11 AM, Jeffrey Jonas via vcf-midatlantic wrote:
Long long ago, I ran Whitesmiths' "C" compiler under CP/M on a Z80 system but forgot what data types were "native". I also have PL/1 for CP/M.
While "native" data types are definitely faster (word-sized integers), even the Z80 had math co-processors. Before it was on-die, there was a variety of 8087 math co-processors by Cyrix, AMD as well as Intel. So speed and precision were far from "standardized".
The Z80 did not "have" math coprocessors. There is no provision for tightly-coupled coprocessors on the Z80. That functionality first appeared (in that side of the world anyway) with the 8086, for which there were several coprocessors (not just math) designed. There are a number of generalized math coprocessors that could be made to work with the Z80, like the venerable Am9511. With all of these designs, the Z80 never knew it was there, it was just another device mapped into I/O or memory space. -Dave -- Dave McGuire, AK4HZ New Kensington, PA
participants (4)
-
Dan Roganti -
Dave McGuire -
Jeffrey Jonas -
Neil Cherry