The little problem is that you MUST use variable in your 16x16 bit multiplication, unless it's not going to work.
Code:
rlow var word
rhigh var word
rtotal var word
RPM VAR WORD
tbase var word
a var word
b var word
a=500
b=600
'
'
'
rhigh=1400
rlow=1400
rtotal = (rhigh + rlow) /10
tbase = a*b
rpm = div32 rtotal
this return 1071
you should have better resolution with...
Code:
rlow var word
rhigh var word
rtotal var word
RPM VAR WORD
tbase var word
a var word
b var word
a=5000
b=600
'
'
'
rhigh=1400
rlow=1400
rtotal = (rhigh + rlow)
tbase = a*b
rpm = div32 rtotal
Last edited by mister_e; - 11th April 2008 at 04:20.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks