The CDP1802 did its math 1 bit at a time. The Z80 did internal stuff in groups of 4 bits. The 8080 did some things in 8 or 16 bits. The PDP-8 did 12 bits. The 68000 did 16 bits. Everyone does a limited number of bits at a time. [....]
What you mean "we".
If a processor did everything required in one instruction, there would be no need for programmers to write multiple instruction programs.
How much money are you willing to supply? I can guarantee that anything less than six or seven hundred dollars will get you told to f*ck yourself, especially when a minimum wage job will make more money and won't be nearly as tedious.
The _only_ problem with this approach is that these days google makes posts last forever, which means that X years from now some unfortunate soul might hit upon a Sky post in response to a search for real information. With zero gainsayers said soul might even believe it. :-(
Terje
--
-
"almost all programming can be viewed as an exercise in caching"
Your x86 BCD reference jogs my memory back to 80's on BYTE Magazine's BIX (Byte Information eXchange) teleconferencing system (cosy).
Some of us processor-bigots, in the CPU or CPUs confernece, had an informal my-cpu-is-better-than-yours speed competition involving multiplication of 72-bit unsigned binary integers. The 9 bytes were picked, in theory, so as not to give arbitrary advantage to cpus of particular word sizes.
My entry for Apple /// (8-bit cpu Mostek 6502B) just used the lowest level bit bit-test/add/shifting/carry instructions. The code first determined the 6 10-byte results from one of the multipliers (the one on the left {smile}) when multiplied by 2, 4, 8, 16, 32, 64 and 128. This actually meant 8 results were precalculated in that multiplying by 0 was obvious and multiplying by 1 was already given. The 6 values were done with simple bitshifts/carry/add. Once that was done then the other multipler was processed bit-by-bit right-to-left and answer adjusted/accumulated accordingly just like a school child would do in decimal on paper. Choosing which multiplier (OK, multiplier, multiplicand) to process based on the lower number of 1 was sometimes useful.
This simple-minded low-level approach actually outperformed other cpus including 8086, 8088, z80, 8080, etc. lovingly handcrafted in assembler making use of, ahem, higher instructions.
The code used maybe a half dozen rather simple MACROs. Of course, the fact that there was ample room in the 6502B's "zero page of 256 bytes) to do all the work was a big boost. In effect, the zero page's faster access meant you could treat it as 256 registers.
Cheers, - Jim
Jim Keohane, Multi-Platforms, > Skybuck Fly> > It's not only about reinventing the wheel, it's also about
Lets see, there is the MIPS 4500, 5000, and 10000 series, some later Transputers, Sun Ultrasparc (64 bit), DEC Alpha, HP PA-RISC 8900, some late model VAX's, PowerPC G5, and Opterons all have this capability in hardware. Some of this is 20 years old, where have you been?
BTW implementing wide math is not all that difficult. Usually cost or IP issues prevent libraries from being used. I have done the basics (+, -, /, and X) for 6502 and 8051; stretching them from 8 to 32 bits was straightforward is a bit laborious to test. All the necessary assembler (hardware) instructions are present in x86, 68K, PPC, Alpha, and many other architectures (Even including IBM 360/370/390).
--
JosephKK
Gegen dummheit kampfen die Gotter Selbst, vergebens.
--Schiller
You use yours and i'll use properly parmeterized libraries for each target and call them from "C" or whatever HLL; and we can test to see which performs better.
--
JosephKK
Gegen dummheit kampfen die Gotter Selbst, vergebens.
--Schiller
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.