Hi.
Can the DIV32 be used with constants? I have to make the division myvar=217770/adval and was thinking in using this:
con1 con 21777
con2 con 10
dummy var word
dummy=con1*con2
myvar=div32 adval
Is this OK?
Ioannis
Hi.
Can the DIV32 be used with constants? I have to make the division myvar=217770/adval and was thinking in using this:
con1 con 21777
con2 con 10
dummy var word
dummy=con1*con2
myvar=div32 adval
Is this OK?
Ioannis
DIV32 can use a constant.
But in your multiplication prior to the DIV32, one of the values have to be a WORD.
Otherwise the constants are multiplied at compile time and the PBP system registers aren't loaded with the proper values at Run-Time.
You can also use the PutMulResult macro I posted back in 2003.
http://www.picbasic.co.uk/forum/show...24&p=50#post50
DT
Bookmarks