Restored from previous forum. Originally posted by Pupil.
your code doesn't work because PB uses signed bytes and the sign is transfered when you assign the byte value to another variable of another type.. that's why:
'a.b=-1 : b.w = a'
results in that b now equals -1
solve problem by changing your peekb() lines to this:
c.w=PeekB(@n+1) & $ff
Restored from previous forum. Originally posted by El_Choni.
If that doesn't work, try making n a global (local variables are in the stack, and I remember having problems with that when using asm in a procedure some time ago).
Restored from previous forum. Originally posted by tejon.
thanks, as you can see i am toying with the idea of using the fpu
for greater precision.
but some things are missing from the fpu, there's no StrToFloat
or FloatToStr, and apparently no log function.