64 bit math with a 32 bit CPU
Humanoido
Posts: 5,770
How to convert a Prop chip from 32 bit to 64 bit in a very simple way?
Think ultra very simple example here...
edit subject
from: 32 to 64BIT Prop
to: 64 bit math with a 32 bit CPU
Post Edited (humanoido) : 8/14/2009 8:27:39 AM GMT
Think ultra very simple example here...
edit subject
from: 32 to 64BIT Prop
to: 64 bit math with a 32 bit CPU
Post Edited (humanoido) : 8/14/2009 8:27:39 AM GMT
Comments
*Peter*
I hope that helps.
Thanks,
Doug
For example:
add a, b wc
addx c, d
That would add a to be, then the overflow would appear in c plus d. Of course you need to figure out what to do when the value is split across two registers.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
You do know this, don't you?
*Peter*
·
-Phil
But, what he's trying to do is pretty much beyond the prop chip in a SIMPLE way. Anying with 64 bit math will require complex stuff all over the place.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
'More like failing to acknowledge that there are limits. It's not anger, just heavy eye-rolling.
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
humanoido
*Stamp SEED Supercomputer *Basic Stamp Supercomputer *TriCore Stamp Supercomputer
*Minuscule Stamp Supercomputer *Three Dimensional Computer *Penguin with 12 Brains
*Penguin Tech *StampOne News! *Penguin Robot Society
A 32 bit CPU is a 32 bit CPU is a 32 bit CPU. There's no way to change that.
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
humanoido
Lol! I like that
You can do any task with a propeller that you can do with a supercomputer.
It's just that the supercomputer can do something really intense, like say, simulate a complex weather system in perhaps
.1 seconds and the propeller might take a century.
It's all a cost/performance issue....picking the right hardware for the job at hand.
It's amazing what can be done with an 8 dollar prop...it's also amazing what geeks did with old 1mhz 8 bit computers in the 70's.
Those old coders must have been magicians!
I have used something as cheap and simple as a 50 cent 8 bit ATtiny11 to do a job...and it did it very well!
I have used a 500mhz ARM9 board to do much more complex jobs...at a cost of around 250.00 ... the ATtiny11 could never
have handled the job.
For a few really intense projects we used a small motherboard with a quad core cpu at 2.6Ghz. We used a small flash drive
to boot Linux and the mobo had built in ethernet, video, audio, usb..etc. The cost was about 350.00 but the power of the board was
amazing...this is what you use if you get a project requiring Angel dust and a magic wand
Now I am learning how to squeeze every last bit of power from the 8 dollar Propeller and it turns out to be able to stand
in for an ARM in some projects, this saves $ and makes me look smarter than I really am
So, I say squeeze all you can out of the Prop...it's really fun to do that, but don't expect it to perform like a 500mhz ARM or a quad core 64bit AMD.
In SPIN, variables may be signed 32 bit numbers (native) or unsigned 16 or 8 bit numbers.· The latter are done by zero extending the input values to 32 bits and truncating the result to 8 or 16 bits.· In PASM the 32 bit values mean what the programmer wants them to and do not have any specific format (i.e. signed versus unsigned, integer versus fraction) except for the context in which they are used.
As Kye indicated, the Carry flag may be used to extend the ADD and SUBtract operations across multiple registers and thus to any number of bits.· This same feature has been used since the earliest microprocessors.· Unfortunately, in order to access the flags you will need to program in PASM.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Composite NTSC sprite driver: Forum
NTSC & PAL driver templates: ObEx Forum
OnePinTVText driver: ObEx Forum
using this technique in Propeller Assembly language so it can serve as a benchmark.
humanoido
so check for this and increment upper 32bit sum.
sub is similar - 2 subs, a check for underflow and a fix
Post Edited (Timmoore) : 9/3/2009 7:25:02 PM GMT